安全隐患清单检查标准的bug问题

pull/1/head
dearlin 2024-02-05 15:20:30 +08:00
parent 357924a7c0
commit dfc19df839
2 changed files with 10 additions and 13 deletions

View File

@ -168,10 +168,7 @@
> >
选择其他检查标准 选择其他检查标准
</el-button> </el-button>
<el-button <el-button type="primary" @click="addStandard">
type="primary"
@click="data.addOrEditDialog.visible = true"
>
添加检查标准 添加检查标准
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -331,7 +328,6 @@ const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle();
const inventoryTypeList = await layoutFnGetInventoryType(); const inventoryTypeList = await layoutFnGetInventoryType();
const fnGetData = async () => { const fnGetData = async () => {
console.log(WHETHER_HAZARDS);
if (!ID) return; if (!ID) return;
const resData = await getCheckStandardManagementView({ ID }); const resData = await getCheckStandardManagementView({ ID });
data.form = resData.pd; data.form = resData.pd;
@ -385,9 +381,13 @@ const fnTableSelection = async () => {
tableRef.value.toggleRowSelection(item); tableRef.value.toggleRowSelection(item);
}); });
}; };
const addStandard = () => {
data.addOrEditDialog.visible = true;
};
const fnAddStandardSubmit = (item) => { const fnAddStandardSubmit = (item) => {
data.list.push(item); const obj = Object.assign({}, item);
data.listAll.push(item); data.list.push(obj);
data.listAll.push(JSON.stringify(obj));
fnTableSelection(); fnTableSelection();
}; };
const fnSelectStandardSubmit = (listData) => { const fnSelectStandardSubmit = (listData) => {

View File

@ -121,11 +121,6 @@ const props = defineProps({
required: true, required: true,
default: () => [], default: () => [],
}, },
listData: {
type: Array,
required: true,
default: () => [],
},
type: { type: {
type: String, type: String,
required: true, required: true,
@ -221,7 +216,9 @@ const rules = {
], ],
}; };
const fnClose = () => { const fnClose = () => {
// form.resetFields(); formRef.value.resetFields();
data.CHECK_CATEGORY_NAME = "";
data.CHECK_ITEM_NAME = "";
visible.value = false; visible.value = false;
}; };
const fnSubmit = debounce( const fnSubmit = debounce(