|
@@ -50,6 +50,36 @@
|
|
|
clearable
|
|
clearable
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="select-box--item">
|
|
|
|
|
+ <span>部门名称:</span>
|
|
|
|
|
+ <el-cascader
|
|
|
|
|
+ v-model="tableQuery.queryParam.rectificationDepartmentId"
|
|
|
|
|
+ style="width: 170px"
|
|
|
|
|
+ ref="cascaderRef"
|
|
|
|
|
+ :options="firstLevelDepts"
|
|
|
|
|
+ :props="cascaderProp"
|
|
|
|
|
+ :show-all-levels="false"
|
|
|
|
|
+ placeholder="部门名称"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ @change="handleChangeDept"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="select-box--item">
|
|
|
|
|
+ <span>隐患类别:</span>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="tableQuery.queryParam.typeId"
|
|
|
|
|
+ placeholder="请选择隐患类别"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ filterable
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="option in hiddenRiskCategoriesList || []"
|
|
|
|
|
+ :key="option.id"
|
|
|
|
|
+ :label="option.categoryName"
|
|
|
|
|
+ :value="option.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
</section>
|
|
</section>
|
|
|
<section class="search-btn">
|
|
<section class="search-btn">
|
|
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
|
@@ -69,6 +99,15 @@
|
|
|
@update:pageSize="handleSizeChange"
|
|
@update:pageSize="handleSizeChange"
|
|
|
@update:pageNumber="handleCurrentChange"
|
|
@update:pageNumber="handleCurrentChange"
|
|
|
>
|
|
>
|
|
|
|
|
+ <template #rectificationDepartmentNames="scope">
|
|
|
|
|
+ <span>{{ scope.row.rectificationDepartmentNames || '-' }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #rectificationResponsiblePerson="scope">
|
|
|
|
|
+ <span>{{ scope.row.rectificationResponsiblePerson || '-' }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #isDrawLessonsPush="scope">
|
|
|
|
|
+ <span>{{ scope.row.isDrawLessonsPush === 1 ? '是' : '否' }}</span>
|
|
|
|
|
+ </template>
|
|
|
<template #currentNode="scope">
|
|
<template #currentNode="scope">
|
|
|
<span>{{ scope.row.currentNode }}</span>
|
|
<span>{{ scope.row.currentNode }}</span>
|
|
|
</template>
|
|
</template>
|
|
@@ -248,10 +287,13 @@
|
|
|
import BatchImport from '@/components/batch-import/BatchImport.vue';
|
|
import BatchImport from '@/components/batch-import/BatchImport.vue';
|
|
|
import { useGlobSetting } from '@/hooks/setting';
|
|
import { useGlobSetting } from '@/hooks/setting';
|
|
|
import urlJoin from 'url-join';
|
|
import urlJoin from 'url-join';
|
|
|
|
|
+ import { formatDeptTree } from '@/views/disaster/utils/formatDeptTree';
|
|
|
import { useUserInfoHook } from '@/hooks/useUserInfoHook'
|
|
import { useUserInfoHook } from '@/hooks/useUserInfoHook'
|
|
|
|
|
+ import { queryDangerTypePage } from '@/api/production-safety';
|
|
|
const { id } = useUserInfoHook();
|
|
const { id } = useUserInfoHook();
|
|
|
-
|
|
|
|
|
|
|
+ const cascaderRef = ref();
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
+ const hiddenRiskCategoriesList = ref();
|
|
|
|
|
|
|
|
// 表格
|
|
// 表格
|
|
|
const basicTableRef = ref<InstanceType<typeof BasicTable>>();
|
|
const basicTableRef = ref<InstanceType<typeof BasicTable>>();
|
|
@@ -267,9 +309,20 @@
|
|
|
keyword: '',
|
|
keyword: '',
|
|
|
status: undefined,
|
|
status: undefined,
|
|
|
taskSource: '',
|
|
taskSource: '',
|
|
|
|
|
+ rectificationDepartmentId: undefined,
|
|
|
|
|
+ typeId: undefined,
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ const firstLevelDepts = ref<any[]>([]);
|
|
|
|
|
+ const cascaderProp = {
|
|
|
|
|
+ expandTrigger: 'hover',
|
|
|
|
|
+ checkStrictly: true,
|
|
|
|
|
+ // emitPath: false,
|
|
|
|
|
+ value: 'id',
|
|
|
|
|
+ label: 'deptName',
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
const handleSizeChange = (value: number) => {
|
|
const handleSizeChange = (value: number) => {
|
|
|
pagination.pageSize = value;
|
|
pagination.pageSize = value;
|
|
|
tableQuery.pageSize = value;
|
|
tableQuery.pageSize = value;
|
|
@@ -302,6 +355,9 @@
|
|
|
statusId: item.statusId,
|
|
statusId: item.statusId,
|
|
|
reviewPersonId: item.reviewPersonId,
|
|
reviewPersonId: item.reviewPersonId,
|
|
|
rectificationResponsibleIds: Number(item.rectificationResponsibleIds),
|
|
rectificationResponsibleIds: Number(item.rectificationResponsibleIds),
|
|
|
|
|
+ rectificationDepartmentNames: item.rectificationDepartmentNames,
|
|
|
|
|
+ rectificationResponsiblePerson: item.rectificationResponsiblePerson,
|
|
|
|
|
+ isDrawLessonsPush: item.isDrawLessonsPush,
|
|
|
}));
|
|
}));
|
|
|
pagination.total = (res as any).totalRow ?? (res as any).total ?? 0;
|
|
pagination.total = (res as any).totalRow ?? (res as any).total ?? 0;
|
|
|
} else {
|
|
} else {
|
|
@@ -588,8 +644,31 @@
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- onMounted(() => {
|
|
|
|
|
|
|
+ const getDeptData = () => {
|
|
|
|
|
+ getAllDepartments().then((res) => {
|
|
|
|
|
+ firstLevelDepts.value = formatDeptTree(res);
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const handleChangeDept = () => {
|
|
|
|
|
+ const deptInfo = cascaderRef.value?.getCheckedNodes();
|
|
|
|
|
+ if (deptInfo?.[0]) {
|
|
|
|
|
+ tableQuery.queryParam.rectificationDepartmentId = deptInfo[0].value;
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ onMounted(async () => {
|
|
|
getTableData();
|
|
getTableData();
|
|
|
|
|
+ getDeptData();
|
|
|
|
|
+ await queryDangerTypePage({
|
|
|
|
|
+ pageNumber: 1,
|
|
|
|
|
+ pageSize: 9999,
|
|
|
|
|
+ queryParam: {
|
|
|
|
|
+ status: 1
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ hiddenRiskCategoriesList.value = res?.records || [];
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|