修正ts类型
This commit is contained in:
@@ -57,7 +57,13 @@
|
||||
<el-table-column label="计划路线" align="center" prop="routeNames" />
|
||||
<el-table-column label="状态" width="150" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1"></el-switch>
|
||||
<el-switch
|
||||
@change="(val: string) => handleChangeStatus(scope.row.id, val)"
|
||||
v-model="scope.row.status"
|
||||
active-value="0"
|
||||
inactive-value="1"
|
||||
></el-switch>
|
||||
<!-- 0关闭 1开启 -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="110" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
@@ -74,7 +80,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Plan" lang="ts">
|
||||
import { listPlan, getPlan, delPlan, addPlan, updatePlan } from '@/api/system/InspectionPlan/index';
|
||||
import { listPlan, getPlan, delPlan, addPlan, updatePlan, changePlanStatus } from '@/api/system/InspectionPlan/index';
|
||||
import { PlanVO, PlanQuery, PlanForm } from '@/api/system/InspectionPlan/type';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
import { numToWeek } from '@/utils/time';
|
||||
@@ -203,7 +209,13 @@ const handleUpdate = async (row?: PlanVO) => {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 状态修改 */
|
||||
function handleChangeStatus(id: string, status: string) {
|
||||
changePlanStatus(id, status).then(() => {
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
getList();
|
||||
});
|
||||
}
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
planFormRef.value?.validate(async (valid: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user