|
@@ -120,6 +120,7 @@
|
|
|
width="150px"
|
|
|
/>
|
|
|
<el-table-column :label="t('inspect.createName')" align="center" prop="createName" width="130"/>
|
|
|
+ <el-table-column :label="t('iotDevice.dept')" align="center" prop="deptName" width="130"/>
|
|
|
<el-table-column :label="t('operationFill.operation')" align="center" width="180">
|
|
|
<template #default="scope">
|
|
|
<el-button
|
|
@@ -194,8 +195,10 @@ const exportLoading = ref(false);
|
|
|
|
|
|
const isLeftContentCollapsed = ref(false);
|
|
|
const hoverText = ref('');
|
|
|
+const selectedDept = ref<{ id: number; name: string }>()
|
|
|
|
|
|
const handleDeptNodeClick = async (row) => {
|
|
|
+ selectedDept.value = { id: row.id, name: row.name }
|
|
|
queryParams.deptId = row.id;
|
|
|
await getList();
|
|
|
};
|
|
@@ -229,6 +232,7 @@ const handleQuery = () => {
|
|
|
|
|
|
const resetQuery = () => {
|
|
|
queryFormRef.value.resetFields();
|
|
|
+ selectedDept.value = undefined
|
|
|
handleQuery();
|
|
|
};
|
|
|
|
|
@@ -237,7 +241,13 @@ const openForm = (type: string, id?: number) => {
|
|
|
push({ name: 'InspectPlanEdit', params: { id } });
|
|
|
return;
|
|
|
}
|
|
|
- push({ name: 'InspectPlanAdd', params: {} });
|
|
|
+ push({
|
|
|
+ name: 'InspectPlanAdd',
|
|
|
+ query: {
|
|
|
+ deptId: selectedDept.value?.id,
|
|
|
+ deptName: selectedDept.value?.name
|
|
|
+ }
|
|
|
+ })
|
|
|
};
|
|
|
|
|
|
const handleDelete = async (id: number) => {
|