|
@@ -58,24 +58,32 @@
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
<h3>子任务记录</h3>
|
|
|
- <el-table :data="tableData" style="width: 100%; margin-top: 20px">
|
|
|
- <el-table-column prop="riskSourceType" label="风险源类型" width="150">
|
|
|
+ <el-table v-loading="loading" :data="subtaskData" style="width: 100%; margin-top: 20px">
|
|
|
+ <el-table-column label="风险源类型" align="center" prop="type" width="150">
|
|
|
<template #default="scope">
|
|
|
- <dict-tag :options="plan_type" :value="scope.row.riskSourceType" style="display: inline-block" />
|
|
|
+ <dict-tag :options="risk_type" :value="scope.row.type" style="display: inline-block" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="requiredCheckTime" label="要求排查时间" width="150"></el-table-column>
|
|
|
- <el-table-column prop="checkCycle" label="排查周期" width="150"></el-table-column>
|
|
|
- <el-table-column prop="checkRange" label="排查范围" width="150"></el-table-column>
|
|
|
- <el-table-column prop="executionDate" label="执行日期" width="150"></el-table-column>
|
|
|
- <el-table-column prop="completed" label="已完成" width="100">
|
|
|
+ <el-table-column prop="task_time" label="要求排查时间" width="150" />
|
|
|
+ <el-table-column label="排查周期" align="center" prop="cycle" width="150">
|
|
|
<template #default="scope">
|
|
|
- <span @click="handleClick(scope.row.completed, 'completed')">{{ scope.row.completed }}</span>
|
|
|
+ <dict-tag :options="risk_cycle" :value="scope.row.cycle" style="display: inline-block" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="uncompleted" label="未完成" width="100">
|
|
|
+ <el-table-column label="排查范围" align="center" prop="task_range" width="150">
|
|
|
<template #default="scope">
|
|
|
- <span @click="handleClick(scope.row.uncompleted, 'uncompleted')">{{ scope.row.uncompleted }}</span>
|
|
|
+ <dict-tag :options="risk_range" :value="scope.row.task_range" style="display: inline-block" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="create_time" label="执行日期" width="150" />
|
|
|
+ <el-table-column prop="completed_num" label="已完成" width="100" >
|
|
|
+ <template #default="scope">
|
|
|
+ <span @click="handleClick(scope.row.completed_num, 'completed_num' )" class="clickable-number">{{ scope.row.completed_num }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="incomplete_num" label="未完成" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <span @click="handleClick(scope.row.uncompleted, 'incomplete_num')" class="clickable-number">{{ scope.row.incomplete_num }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="150">
|
|
@@ -134,9 +142,8 @@
|
|
|
|
|
|
<script setup name="planList" lang="ts">
|
|
|
import { to } from 'await-to-js';
|
|
|
-import { deletePlan, getPlanDetail} from '@/api/riskPrevention/planManage';
|
|
|
import { ElMessageBox } from 'element-plus';
|
|
|
-import {deleteRisk, getRiskDetail, updatetask} from "@/api/inspectionWork/riskManagement";
|
|
|
+import {deleteRisk, getRiskDetail, updatetask, getSubtaskList} from "@/api/inspectionWork/riskManagement";
|
|
|
const router = useRouter();
|
|
|
|
|
|
const goBack = () => {
|
|
@@ -145,7 +152,8 @@ const goBack = () => {
|
|
|
|
|
|
const route = useRoute();
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
-const { mm_event_type, risk_type,risk_range,risk_cycle,risk_status } = toRefs<any>(proxy?.useDict('risk_type', 'mm_event_type', 'risk_range','risk_cycle','risk_status'));
|
|
|
+const { risk_type,risk_range,risk_cycle,risk_status } = toRefs<any>(proxy?.useDict('risk_type','risk_range','risk_cycle','risk_status'));
|
|
|
+const subtaskData = ref([]);
|
|
|
|
|
|
//已完成/未完成的页面跳转
|
|
|
const handleClick = (value: number, type: string) => {
|
|
@@ -163,7 +171,7 @@ const handleClick = (value: number, type: string) => {
|
|
|
};
|
|
|
|
|
|
// 预案编辑
|
|
|
-let detailData = ref({
|
|
|
+const detailData = ref({
|
|
|
// id: '',
|
|
|
type: '',
|
|
|
start_time: '',
|
|
@@ -172,6 +180,18 @@ let detailData = ref({
|
|
|
corn_query: '',
|
|
|
task_range: ''
|
|
|
});
|
|
|
+
|
|
|
+// const subtaskData = ref({
|
|
|
+// id: '',
|
|
|
+// create_time: '',
|
|
|
+// cycle: '',
|
|
|
+// incomplete_num: '',
|
|
|
+// task_id: '',
|
|
|
+// task_number: '',
|
|
|
+// task_range: '',
|
|
|
+// task_time: '',
|
|
|
+// completed_num: ''
|
|
|
+// });
|
|
|
let id = ref();
|
|
|
let task_number = ref();
|
|
|
let visible = ref(false);
|
|
@@ -189,6 +209,8 @@ let form = ref({
|
|
|
task_range: ''
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+
|
|
|
/** 编辑按钮操作 */
|
|
|
const planUpdate = async () => {
|
|
|
resetForm();
|
|
@@ -272,7 +294,17 @@ onMounted(() => {
|
|
|
getRiskDetail(task_number.value).then((res) => {
|
|
|
detailData.value = res.data;
|
|
|
});
|
|
|
+ getSubtaskList(task_number.value).then((res) => {
|
|
|
+ debugger
|
|
|
+ subtaskData.value = res.data;
|
|
|
+ })
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.clickable-number {
|
|
|
+ color: blue;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|