From 2d0910a62bfecec0f354561c69a60a24b0fbdae6 Mon Sep 17 00:00:00 2001 From: panyuyi Date: Sat, 16 Mar 2024 15:13:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=B0=B4=E9=97=B8?= =?UTF-8?q?=E5=92=8C=E5=A0=A4=E9=98=B2=E6=A3=80=E6=9F=A5=E7=9B=91=E7=9D=A3?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enginerring/components/Drawer.vue | 22 +- .../projectManage/projectReport.vue | 238 ++++++++--------- .../projectManage/projectReportPage.vue | 60 +++-- .../questionManage/index.vue | 47 ++-- .../statisticAnalysis/index.vue | 180 ++++++------- .../tasksManage/tasksDetails.vue | 3 +- .../projectManage/projectReport.vue | 242 +++++++++--------- .../projectManage/projectReportPage.vue | 61 +++-- .../questionManage/index.vue | 58 +++-- .../statisticAnalysis/components/Pie.vue | 2 +- .../statisticAnalysis/index.vue | 187 ++++++-------- .../tasksManage/tasksDetails.vue | 3 +- vue.config.js | 32 +-- 13 files changed, 545 insertions(+), 590 deletions(-) diff --git a/src/views/dike/runManage/enginerring/components/Drawer.vue b/src/views/dike/runManage/enginerring/components/Drawer.vue index aaf09f4..8d0a2b5 100644 --- a/src/views/dike/runManage/enginerring/components/Drawer.vue +++ b/src/views/dike/runManage/enginerring/components/Drawer.vue @@ -207,7 +207,7 @@ export default { -
+
-
-
-
- 这是问题说明说明这是问题说明说明这是问题说明说明这是问题说明说明这是问题是问题说明说明 -
-
- 2 -
+
+
+ 只有一级项目的问题只有一级项目的问题只有一级项目的问题只有一级项目的问题只有一级项目的问题只有一级项目的问题只有一级项目的问题只有一级项目的问题 +
+
+ 2
@@ -250,10 +248,10 @@ export default { .masking { position: absolute; top: 0; - width: 50%; + width: 800px; height: 100%; - left: 120%; - z-index: 2; + right: 0; + z-index: 10; background-color: #fff; transition: left 0.5s ease-in-out; box-shadow: -8px 0px 38px 0px rgba(0, 0, 0, 0.6); diff --git a/src/views/dike/runManage/superVisionInspetion/projectManage/projectReport.vue b/src/views/dike/runManage/superVisionInspetion/projectManage/projectReport.vue index b4dcc05..8f836f7 100644 --- a/src/views/dike/runManage/superVisionInspetion/projectManage/projectReport.vue +++ b/src/views/dike/runManage/superVisionInspetion/projectManage/projectReport.vue @@ -100,10 +100,17 @@ export default { id: item.id, projectId: item.projectId, projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], + + children: [ + { + ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], + level: null, + }, + ], }); } else { let exitItem = list.find((v) => v.projectId === item.projectId); @@ -112,14 +119,25 @@ export default { id: item.id, projectId: item.projectId, projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], + + children: [ + { + ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], + level: null, + }, + ], }); } else { exitItem.children.push({ ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], level: null, }); } @@ -137,29 +155,34 @@ export default { this.formData.taskId = data.taskId; this.formData.weather = data.weather; this.formData.problemList = []; - const { engineeringList, problemList } = data; + const { problemList } = data; list.forEach((item) => { - let exitItem = engineeringList.find( + let exitItem = problemList?.find( (v) => v.projectId === item.projectId ); if (exitItem) { item.newId = item.id === exitItem.id ? null : exitItem.id; - item.problemDescribe = exitItem.problemDescribe; - item.siteSituationRecords = exitItem.siteSituationRecords; - item.siteSituationRecordsArr = exitItem.siteSituationRecords - ? exitItem.siteSituationRecords.split(",") - : []; + let itemTemp = cloneDeep(item); itemTemp.children = []; - item.children.forEach((item2) => { let exitItem2 = problemList.find( (v) => v.projectItemId === item2.id ); if (exitItem2) { itemTemp.children.push(exitItem2); + item2.projectName = exitItem2.projectName; item2.level = exitItem2.level; item2.newId = item2.id === exitItem2.id ? null : exitItem2.id; + item2.problemDescribe = exitItem2.problemDescribe; + item2.siteSituationRecords = exitItem2.siteSituationRecords; + item2.siteSituationRecordsArr = exitItem2.siteSituationRecords + ? exitItem2.siteSituationRecords.split(",") + : []; + exitItem2.siteSituationRecordsArr = + exitItem2.siteSituationRecords + ? exitItem2.siteSituationRecords.split(",") + : []; } }); if (data.state === "1") { @@ -196,75 +219,30 @@ export default { console.log("err >>>>> ", err); }); }, - // 获取启用的方法配置项 - getEnableSuperviseWayData() { - getEnableSuperviseWayData({ wayId: this.$route.query.wayId }).then( - (res) => { - console.log(res); - let list = []; - res.data?.itemList?.forEach((item, index) => { - if (index === 0) { - list.push({ - projectId: item.projectId, - projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], - }); - } else { - let exitItem = list.find((v) => v.projectId === item.projectId); - if (!exitItem) { - list.push({ - projectId: item.projectId, - projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], - }); - } else { - exitItem.children.push({ - ...item, - level: null, - }); - } - } - }); - this.problemList = list; - this.activeName = list[0]?.projectId || ""; - } - ); - }, // 处理提交数据 dealFormData() { this.formData.taskId = this.$route.query.id; this.problemList.forEach((item) => { - let problemItem = { - id: item.newId || null, - levelList: [], - problemDescribe: item.problemDescribe, - siteSituationRecords: item.siteSituationRecordsArr.join(",") || "", - projectId: item.projectId, - }; if (item.children.length) { item.children.forEach((item2) => { - problemItem.levelList.push({ + let problemItem = { id: item2.newId || null, level: item2.level, - projectItemId: item2.id, - }); + problemDescribe: item2.problemDescribe, + siteSituationRecords: + item2.siteSituationRecordsArr?.join(",") || "", + projectId: item2.projectId, + projectItemId: item2.projectItemId, + }; + this.formData.problemList.push(problemItem); }); } - this.formData.problemList.push(problemItem); }); return cloneDeep(this.formData); }, handleSave() { - console.log("保存"); let data = this.dealFormData(); data.state = "0"; - console.log("data >>>>> ", data); addSuperviseEngineeringReportData(data).then((res) => { this.$message({ type: "success", @@ -277,6 +255,10 @@ export default { this.$message.warning("检查进度未达到100%,请检查"); return; } + if (!this.formData.patrolUid) { + this.$message.warning("请选择巡查人员"); + return; + } // 二次确认提交 this.$confirm("是否确认提交?", "提示", { confirmButtonText: "确定", @@ -286,13 +268,13 @@ export default { .then(() => { let data = this.dealFormData(); data.state = "1"; - console.log("data >>>>> ", data); addSuperviseEngineeringReportData(data).then((res) => { this.$message({ type: "success", message: "提交成功", }); this.formData.state = "1"; + this.$router.go(-1); }); }) .catch(() => {}); @@ -411,66 +393,72 @@ export default { >严重
-
-
-
描述
-
- +
+
描述
+
+ +
-
-
-
照片
-
-
-
- +
照片
+
+
+
- - + + + +
-
- - 上传 - + 上传 + +
diff --git a/src/views/dike/runManage/superVisionInspetion/projectManage/projectReportPage.vue b/src/views/dike/runManage/superVisionInspetion/projectManage/projectReportPage.vue index ceda192..984f4fb 100644 --- a/src/views/dike/runManage/superVisionInspetion/projectManage/projectReportPage.vue +++ b/src/views/dike/runManage/superVisionInspetion/projectManage/projectReportPage.vue @@ -189,10 +189,16 @@ export default { id: item.id, projectId: item.projectId, projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], + children: [ + { + ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], + level: null, + }, + ], }); } else { let exitItem = list.find((v) => v.projectId === item.projectId); @@ -201,14 +207,25 @@ export default { id: item.id, projectId: item.projectId, projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], + + children: [ + { + ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], + level: null, + }, + ], }); } else { exitItem.children.push({ ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], level: null, }); } @@ -234,23 +251,12 @@ export default { this.formData.pictures = []; // 产品说描述拼接一起 this.formData.describeTotal = ""; - const { engineeringList, problemList } = data; + const { problemList } = data; list.forEach((item) => { - let exitItem = engineeringList.find( + let exitItem = problemList.find( (v) => v.projectId === item.projectId ); if (exitItem) { - item.problemDescribe = exitItem.problemDescribe; - if (item.problemDescribe) { - this.formData.describeTotal += item.problemDescribe + ","; - } - item.siteSituationRecords = exitItem.siteSituationRecords; - item.siteSituationRecordsArr = exitItem.siteSituationRecords - ? exitItem.siteSituationRecords.split(",") - : []; - if (item.siteSituationRecordsArr.length > 0) { - this.formData.pictures.push(...item.siteSituationRecordsArr); - } let itemTemp = cloneDeep(item); itemTemp.children = []; item.children.forEach((item2) => { @@ -258,8 +264,15 @@ export default { (v) => v.projectItemId === item2.id ); if (exitItem2) { - item2.level = exitItem2.level; - item2.newId = item2.id === exitItem2.id ? null : exitItem2.id; + if (exitItem2.problemDescribe) { + this.formData.describeTotal += + exitItem2.problemDescribe + ","; + } + if (exitItem2.siteSituationRecords) { + this.formData.pictures.push( + ...exitItem2.siteSituationRecords.split(",") + ); + } itemTemp.children.push(exitItem2); } }); @@ -334,6 +347,7 @@ export default { top: 0; background-color: #fff; padding: 10px 24px; + z-index: 2; } } .border-l-t { diff --git a/src/views/dike/runManage/superVisionInspetion/questionManage/index.vue b/src/views/dike/runManage/superVisionInspetion/questionManage/index.vue index b5a67be..93148bd 100644 --- a/src/views/dike/runManage/superVisionInspetion/questionManage/index.vue +++ b/src/views/dike/runManage/superVisionInspetion/questionManage/index.vue @@ -63,14 +63,9 @@ export default { this.checkDialogVisible = true; getSuperviseEngineeringProblemDetailsData(row.id).then((res) => { this.checkDetailData = res?.data || {}; - if (this.checkDetailData.doneTime) { - this.checkDetailData.showDoneTime = dayjs( - this.checkDetailData.doneTime - ).format("YYYY年MM月DD日"); - } - if (this.checkDetailData.siteSituationRecords) { - this.checkDetailData.siteSituationRecordsArr = - this.checkDetailData.siteSituationRecords.split(","); + if (this.checkDetailData.problemDto?.siteSituationRecords) { + this.checkDetailData.problemDto.siteSituationRecordsArr = + this.checkDetailData.problemDto.siteSituationRecords.split(","); } if (this.checkDetailData.problemDto?.handleSituationRecords) { this.checkDetailData.problemDto.handleSituationRecordsArr = @@ -523,27 +518,34 @@ export default {
问题描述
- {{ checkDetailData.problemDescribe }} + {{ + checkDetailData.problemDto && + checkDetailData.problemDto.problemDescribe + }}
现场记录情况
- +
-
注:下发和处理状态查看内容 -
+
-->
-
注:确认状态内容 -
+ -->
-
完成状态内容 -
+ --> diff --git a/src/views/dike/runManage/superVisionInspetion/statisticAnalysis/index.vue b/src/views/dike/runManage/superVisionInspetion/statisticAnalysis/index.vue index 5607f36..aad651a 100644 --- a/src/views/dike/runManage/superVisionInspetion/statisticAnalysis/index.vue +++ b/src/views/dike/runManage/superVisionInspetion/statisticAnalysis/index.vue @@ -7,10 +7,6 @@ import { import { getAreasData } from "@/api/areas"; import Pie from "./components/Pie.vue"; -const apiMap = { - task: getSuperviseWayTaskListData, - riverLocation: null, -}; export default { name: "InspectionItems", components: { @@ -18,36 +14,19 @@ export default { }, data() { return { - typeSelect: "", - typeOptions: [ - { - label: "所属流域", - value: "riverLocation", - }, - { - label: "工程类型", - value: "wagaType", - }, - { - label: "行政区划", - value: "adcd", - }, - { - label: "监督检查任务", - value: "task", - }, - ], areasOptionProps: { emitPath: false, checkStrictly: true, //选择任意一级 }, areasOptions: [], - remoteOptions: [], + riverLocationList: [], // 流域数据 + tasksList: [], // 任务列表数据 projectTypeOptions: [], // 工程类型 paramsData: { - wagaType: "", + riverLocation: "", + dikeType: "", adcd: "", - remoteValue: "", + taskId: "", }, questionLevelList: [], }; @@ -56,10 +35,10 @@ export default { // 获取列表数据 initData() { getSuperviseStatisticTotal({ - wagaType: - this.typeSelect == "wagaType" ? this.paramsData.wagaType : null, - adcd: this.typeSelect == "adcd" ? this.paramsData.adcd : null, - taskId: this.typeSelect == "task" ? this.paramsData.remoteValue : null, + dikeType: this.paramsData.dikeType || null, + adcd: this.paramsData.adcd || null, + taskId: this.paramsData.taskId || null, + riverLocation: this.paramsData.riverLocation || null, }).then((res) => { let list = [ { @@ -135,10 +114,28 @@ export default { handleChangeQuery() { this.initData(); }, + handleGetRemoteRiverLocationData() { + // 获取远程搜索数据 + // api({ + // data: { + // name: query, + // }, + // pageSize: 20, + // pageNum: 1, + // }).then((res) => { + // if (res) { + // this.remoteOptions = res.records.map((item) => { + // return { + // label: item.name, + // value: item.id, + // }; + // }); + // } + // }); + }, // 获取远程搜索数据 - handleGetRemoteProjectListData(query) { - if (!apiMap[this.typeSelect]) return; - apiMap[this.typeSelect]({ + handleGetRemoteTasksData(query) { + getSuperviseWayTaskListData({ data: { name: query, }, @@ -146,7 +143,7 @@ export default { pageNum: 1, }).then((res) => { if (res) { - this.remoteOptions = res.records.map((item) => { + this.tasksList = res.records.map((item) => { return { label: item.name, value: item.id, @@ -176,20 +173,10 @@ export default { this.areasOptions = res; }); }, - // 重置搜索 - resetSearch() { - this.typeSelect = ""; - this.paramsData = { - wagaType: "", - adcd: "", - remoteValue: "", - }; - this.initData(); - }, }, created() { // 水闸类型 - this.getDicts("sluice_type").then((response) => { + this.getDicts("embankment_type").then((response) => { this.projectTypeOptions = response.data; }); }, @@ -204,33 +191,36 @@ export default {
统计分析
-
+
监督检查任务统计分析
-
+
+ 所属流域 - + 工程类型 + 行政区划 + 监督检查任务
@@ -319,54 +310,35 @@ export default { width: 100%; min-height: calc(100vh - 56px - 64px); margin-top: 24px; - padding: 16px; background-color: white; - .title { - padding-left: 20px; - position: relative; - &::before { - position: absolute; - left: 0; - top: 0; - content: ""; - width: 4px; - height: 16px; - background-color: #1890ff; + .title-box { + padding: 16px; + border-bottom: 1px solid #f0f0f0; + .title { + padding-left: 20px; + position: relative; + &::before { + position: absolute; + left: 0; + top: 0; + content: ""; + width: 4px; + height: 16px; + background-color: #1890ff; + } } } - .select-box { - border: 1px solid #d9d9d9; - border-radius: 4px; - padding: 8px; - } .question-box { display: flex; flex-wrap: wrap; - padding-top: 24px; - } - .question-item { - width: 250px; - height: 102px; - border-radius: 8px; - border: 1px solid #000; - padding: 10px; - margin-right: 10px; - margin-bottom: 12px; + padding: 24px; + .question-item { + flex: 1; + min-width: 250px; + margin-right: 10px; + margin-bottom: 12px; + } } } } - diff --git a/src/views/dike/runManage/superVisionInspetion/tasksManage/tasksDetails.vue b/src/views/dike/runManage/superVisionInspetion/tasksManage/tasksDetails.vue index 3f161d0..8a0c3f7 100644 --- a/src/views/dike/runManage/superVisionInspetion/tasksManage/tasksDetails.vue +++ b/src/views/dike/runManage/superVisionInspetion/tasksManage/tasksDetails.vue @@ -414,8 +414,9 @@ export default { .content-box { width: 100%; - min-height: calc(100vh - 56px - 64px); + height: calc(100vh - 56px - 64px); margin-top: 24px; + overflow: auto; padding: 16px; background-color: white; .title { diff --git a/src/views/sluice/runManage/supervisionInspetion/projectManage/projectReport.vue b/src/views/sluice/runManage/supervisionInspetion/projectManage/projectReport.vue index 1a1c670..a753302 100644 --- a/src/views/sluice/runManage/supervisionInspetion/projectManage/projectReport.vue +++ b/src/views/sluice/runManage/supervisionInspetion/projectManage/projectReport.vue @@ -41,7 +41,6 @@ export default { }, 0) ); }, 0); - console.log("hasDoneLevel >>>>> ", hasDoneLevel); return Math.floor((hasDoneLevel / sum) * 100); } else { return 0; @@ -100,10 +99,17 @@ export default { id: item.id, projectId: item.projectId, projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], + + children: [ + { + ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], + level: null, + }, + ], }); } else { let exitItem = list.find((v) => v.projectId === item.projectId); @@ -112,14 +118,25 @@ export default { id: item.id, projectId: item.projectId, projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], + + children: [ + { + ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], + level: null, + }, + ], }); } else { exitItem.children.push({ ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], level: null, }); } @@ -137,29 +154,34 @@ export default { this.formData.taskId = data.taskId; this.formData.weather = data.weather; this.formData.problemList = []; - const { engineeringList, problemList } = data; + const { problemList } = data; list.forEach((item) => { - let exitItem = engineeringList.find( + let exitItem = problemList?.find( (v) => v.projectId === item.projectId ); if (exitItem) { item.newId = item.id === exitItem.id ? null : exitItem.id; - item.problemDescribe = exitItem.problemDescribe; - item.siteSituationRecords = exitItem.siteSituationRecords; - item.siteSituationRecordsArr = exitItem.siteSituationRecords - ? exitItem.siteSituationRecords.split(",") - : []; + let itemTemp = cloneDeep(item); itemTemp.children = []; - item.children.forEach((item2) => { let exitItem2 = problemList.find( (v) => v.projectItemId === item2.id ); if (exitItem2) { itemTemp.children.push(exitItem2); + item2.projectName = exitItem2.projectName; item2.level = exitItem2.level; item2.newId = item2.id === exitItem2.id ? null : exitItem2.id; + item2.problemDescribe = exitItem2.problemDescribe; + item2.siteSituationRecords = exitItem2.siteSituationRecords; + item2.siteSituationRecordsArr = exitItem2.siteSituationRecords + ? exitItem2.siteSituationRecords.split(",") + : []; + exitItem2.siteSituationRecordsArr = + exitItem2.siteSituationRecords + ? exitItem2.siteSituationRecords.split(",") + : []; } }); if (data.state === "1") { @@ -177,7 +199,6 @@ export default { }, // 上传前 beforeUpload(e) { - console.log("beforeUpload >>>>> ", e); if (this.currentItem.siteSituationRecordsArr?.length >= 99) { this.$message.warning("最多上传99张图片"); return false; @@ -190,81 +211,36 @@ export default { fData.append("file", file); uploadFileData(fData) .then((res) => { - this.currentItem.siteSituationRecordsArr.push(res.url); + this.currentItem.siteSituationRecordsArr?.push(res.url); }) .catch((err) => { console.log("err >>>>> ", err); }); }, - // 获取启用的方法配置项 - getEnableSuperviseWayData() { - getEnableSuperviseWayData({ wayId: this.$route.query.wayId }).then( - (res) => { - console.log(res); - let list = []; - res.data?.itemList?.forEach((item, index) => { - if (index === 0) { - list.push({ - projectId: item.projectId, - projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], - }); - } else { - let exitItem = list.find((v) => v.projectId === item.projectId); - if (!exitItem) { - list.push({ - projectId: item.projectId, - projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], - }); - } else { - exitItem.children.push({ - ...item, - level: null, - }); - } - } - }); - this.problemList = list; - this.activeName = list[0]?.projectId || ""; - } - ); - }, // 处理提交数据 dealFormData() { this.formData.taskId = this.$route.query.id; this.problemList.forEach((item) => { - let problemItem = { - id: item.newId || null, - levelList: [], - problemDescribe: item.problemDescribe, - siteSituationRecords: item.siteSituationRecordsArr.join(",") || "", - projectId: item.projectId, - }; if (item.children.length) { item.children.forEach((item2) => { - problemItem.levelList.push({ + let problemItem = { id: item2.newId || null, level: item2.level, - projectItemId: item2.id, - }); + problemDescribe: item2.problemDescribe, + siteSituationRecords: + item2.siteSituationRecordsArr?.join(",") || "", + projectId: item2.projectId, + projectItemId: item2.projectItemId, + }; + this.formData.problemList.push(problemItem); }); } - this.formData.problemList.push(problemItem); }); return cloneDeep(this.formData); }, handleSave() { - console.log("保存"); let data = this.dealFormData(); data.state = "0"; - console.log("data >>>>> ", data); addSuperviseEngineeringReportData(data).then((res) => { this.$message({ type: "success", @@ -277,6 +253,10 @@ export default { this.$message.warning("检查进度未达到100%,请检查"); return; } + if (!this.formData.patrolUid) { + this.$message.warning("请选择巡查人员"); + return; + } // 二次确认提交 this.$confirm("是否确认提交?", "提示", { confirmButtonText: "确定", @@ -286,13 +266,13 @@ export default { .then(() => { let data = this.dealFormData(); data.state = "1"; - console.log("data >>>>> ", data); addSuperviseEngineeringReportData(data).then((res) => { this.$message({ type: "success", message: "提交成功", }); this.formData.state = "1"; + this.$router.go(-1); }); }) .catch(() => {}); @@ -411,66 +391,72 @@ export default { >严重
-
-
-
描述
-
- +
+
描述
+
+ +
-
-
-
照片
-
-
-
- +
照片
+
+
+
- - + + + +
-
- - 上传 - + 上传 + +
diff --git a/src/views/sluice/runManage/supervisionInspetion/projectManage/projectReportPage.vue b/src/views/sluice/runManage/supervisionInspetion/projectManage/projectReportPage.vue index a164945..570942a 100644 --- a/src/views/sluice/runManage/supervisionInspetion/projectManage/projectReportPage.vue +++ b/src/views/sluice/runManage/supervisionInspetion/projectManage/projectReportPage.vue @@ -156,6 +156,7 @@ import html2canvas from "html2canvas"; import { jsPDF } from "jspdf"; import dayjs from "dayjs"; +import { cloneDeep } from "lodash"; import { getEnableSuperviseWayData, @@ -189,10 +190,16 @@ export default { id: item.id, projectId: item.projectId, projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], + children: [ + { + ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], + level: null, + }, + ], }); } else { let exitItem = list.find((v) => v.projectId === item.projectId); @@ -201,14 +208,25 @@ export default { id: item.id, projectId: item.projectId, projectName: item.projectName, - problemDescribe: "", - siteSituationRecords: "", - siteSituationRecordsArr: [], - children: [{ ...item, level: null }], + + children: [ + { + ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], + level: null, + }, + ], }); } else { exitItem.children.push({ ...item, + projectItemId: item.id, + problemDescribe: "", + siteSituationRecords: "", + siteSituationRecordsArr: [], level: null, }); } @@ -234,23 +252,12 @@ export default { this.formData.pictures = []; // 产品说描述拼接一起 this.formData.describeTotal = ""; - const { engineeringList, problemList } = data; + const { problemList } = data; list.forEach((item) => { - let exitItem = engineeringList.find( + let exitItem = problemList.find( (v) => v.projectId === item.projectId ); if (exitItem) { - item.problemDescribe = exitItem.problemDescribe; - if (item.problemDescribe) { - this.formData.describeTotal += item.problemDescribe + ","; - } - item.siteSituationRecords = exitItem.siteSituationRecords; - item.siteSituationRecordsArr = exitItem.siteSituationRecords - ? exitItem.siteSituationRecords.split(",") - : []; - if (item.siteSituationRecordsArr.length > 0) { - this.formData.pictures.push(...item.siteSituationRecordsArr); - } let itemTemp = cloneDeep(item); itemTemp.children = []; item.children.forEach((item2) => { @@ -258,8 +265,15 @@ export default { (v) => v.projectItemId === item2.id ); if (exitItem2) { - item2.level = exitItem2.level; - item2.newId = item2.id === exitItem2.id ? null : exitItem2.id; + if (exitItem2.problemDescribe) { + this.formData.describeTotal += + exitItem2.problemDescribe + ","; + } + if (exitItem2.siteSituationRecords) { + this.formData.pictures.push( + ...exitItem2.siteSituationRecords.split(",") + ); + } itemTemp.children.push(exitItem2); } }); @@ -334,6 +348,7 @@ export default { top: 0; background-color: #fff; padding: 10px 24px; + z-index: 2; } } .border-l-t { diff --git a/src/views/sluice/runManage/supervisionInspetion/questionManage/index.vue b/src/views/sluice/runManage/supervisionInspetion/questionManage/index.vue index f7d9011..9afc422 100644 --- a/src/views/sluice/runManage/supervisionInspetion/questionManage/index.vue +++ b/src/views/sluice/runManage/supervisionInspetion/questionManage/index.vue @@ -64,14 +64,10 @@ export default { this.checkDialogVisible = true; getSuperviseEngineeringProblemDetailsData(row.id).then((res) => { this.checkDetailData = res?.data || {}; - if (this.checkDetailData.siteSituationRecords) { - this.checkDetailData.siteSituationRecordsArr = - this.checkDetailData.siteSituationRecords.split(","); + if (this.checkDetailData.problemDto?.siteSituationRecords) { + this.checkDetailData.problemDto.siteSituationRecordsArr = + this.checkDetailData.problemDto.siteSituationRecords.split(","); } - console.log( - "this.checkDetailData.problemDto?.handleSituationRecords >>>>> ", - this.checkDetailData.problemDto?.handleSituationRecords - ); if (this.checkDetailData.problemDto?.handleSituationRecords) { this.checkDetailData.problemDto.handleSituationRecordsArr = this.checkDetailData.problemDto.handleSituationRecords.split(","); @@ -268,6 +264,18 @@ export default { } return true; }, + handleUpload(e) { + const { file } = e; + let fData = new FormData(); + fData.append("file", file); + uploadFileData(fData) + .then((res) => { + this.dealForm.fileList.push(res.url); + }) + .catch((err) => { + console.log("err >>>>> ", err); + }); + }, formatAdcd(adcd) { if (adcd) { @@ -554,27 +562,34 @@ export default {
问题描述
- {{ checkDetailData.problemDescribe }} + {{ + checkDetailData.problemDto && + checkDetailData.problemDto.problemDescribe + }}
现场记录情况
- +
-
注:下发和处理状态查看内容 -
+
-->
-
注:确认状态内容 -
+ -->
-
完成状态内容 -
+ --> diff --git a/src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/components/Pie.vue b/src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/components/Pie.vue index a41ed8d..2781f97 100644 --- a/src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/components/Pie.vue +++ b/src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/components/Pie.vue @@ -143,7 +143,7 @@ export default { border-bottom: 1px solid #e5e5e5; } .canvas { - width: 500px; + min-width: 200px; height: 200px; padding: 10px; } diff --git a/src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/index.vue b/src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/index.vue index 75379ce..e072735 100644 --- a/src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/index.vue +++ b/src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/index.vue @@ -7,10 +7,6 @@ import { import { getAreasData } from "@/api/areas"; import Pie from "./components/Pie.vue"; -const apiMap = { - task: getSuperviseWayTaskListData, - riverLocation: null, -}; export default { name: "InspectionItems", components: { @@ -18,36 +14,19 @@ export default { }, data() { return { - typeSelect: "", - typeOptions: [ - { - label: "所属流域", - value: "riverLocation", - }, - { - label: "工程类型", - value: "wagaType", - }, - { - label: "行政区划", - value: "adcd", - }, - { - label: "监督检查任务", - value: "task", - }, - ], areasOptionProps: { emitPath: false, checkStrictly: true, //选择任意一级 }, areasOptions: [], - remoteOptions: [], + riverLocationList: [], // 流域数据 + tasksList: [], // 任务列表数据 projectTypeOptions: [], // 工程类型 paramsData: { + riverLocation: "", wagaType: "", adcd: "", - remoteValue: "", + taskId: "", }, questionLevelList: [], }; @@ -56,10 +35,10 @@ export default { // 获取列表数据 initData() { getSuperviseStatisticTotal({ - wagaType: - this.typeSelect == "wagaType" ? this.paramsData.wagaType : null, - adcd: this.typeSelect == "adcd" ? this.paramsData.adcd : null, - taskId: this.typeSelect == "task" ? this.paramsData.remoteValue : null, + wagaType: this.paramsData.wagaType || null, + adcd: this.paramsData.adcd || null, + taskId: this.paramsData.taskId || null, + riverLocation: this.paramsData.riverLocation || null, }).then((res) => { let list = [ { @@ -121,24 +100,31 @@ export default { this.questionLevelList = list; }); }, - handleChangeType() { - this.remoteOptions = []; - this.paramsData = { - wagaType: "", - adcd: "", - remoteValue: "", - }; - if (this.typeSelect === "") { - this.initData(); - } - }, handleChangeQuery() { this.initData(); }, + handleGetRemoteRiverLocationData() { + // 获取远程搜索数据 + // api({ + // data: { + // name: query, + // }, + // pageSize: 20, + // pageNum: 1, + // }).then((res) => { + // if (res) { + // this.remoteOptions = res.records.map((item) => { + // return { + // label: item.name, + // value: item.id, + // }; + // }); + // } + // }); + }, // 获取远程搜索数据 - handleGetRemoteProjectListData(query) { - if (!apiMap[this.typeSelect]) return; - apiMap[this.typeSelect]({ + handleGetRemoteTasksData(query) { + getSuperviseWayTaskListData({ data: { name: query, }, @@ -146,7 +132,7 @@ export default { pageNum: 1, }).then((res) => { if (res) { - this.remoteOptions = res.records.map((item) => { + this.tasksList = res.records.map((item) => { return { label: item.name, value: item.id, @@ -176,16 +162,6 @@ export default { this.areasOptions = res; }); }, - // 重置搜索 - resetSearch() { - this.typeSelect = ""; - this.paramsData = { - wagaType: "", - adcd: "", - remoteValue: "", - }; - this.initData(); - }, }, created() { // 水闸类型 @@ -204,33 +180,36 @@ export default {
统计分析
-
+
监督检查任务统计分析
-
+
+ 所属流域 - + 工程类型 + 行政区划 + 监督检查任务
@@ -319,54 +299,35 @@ export default { width: 100%; min-height: calc(100vh - 56px - 64px); margin-top: 24px; - padding: 16px; background-color: white; - .title { - padding-left: 20px; - position: relative; - &::before { - position: absolute; - left: 0; - top: 0; - content: ""; - width: 4px; - height: 16px; - background-color: #1890ff; + .title-box { + padding: 16px; + border-bottom: 1px solid #f0f0f0; + .title { + padding-left: 20px; + position: relative; + &::before { + position: absolute; + left: 0; + top: 0; + content: ""; + width: 4px; + height: 16px; + background-color: #1890ff; + } } } - .select-box { - border: 1px solid #d9d9d9; - border-radius: 4px; - padding: 8px; - } .question-box { display: flex; flex-wrap: wrap; - padding-top: 24px; - } - .question-item { - width: 250px; - height: 102px; - border-radius: 8px; - border: 1px solid #000; - padding: 10px; - margin-right: 10px; - margin-bottom: 12px; + padding: 24px; + .question-item { + flex: 1; + min-width: 250px; + margin-right: 10px; + margin-bottom: 12px; + } } } } - diff --git a/src/views/sluice/runManage/supervisionInspetion/tasksManage/tasksDetails.vue b/src/views/sluice/runManage/supervisionInspetion/tasksManage/tasksDetails.vue index bbd3ee6..12cad56 100644 --- a/src/views/sluice/runManage/supervisionInspetion/tasksManage/tasksDetails.vue +++ b/src/views/sluice/runManage/supervisionInspetion/tasksManage/tasksDetails.vue @@ -414,8 +414,9 @@ export default { .content-box { width: 100%; - min-height: calc(100vh - 56px - 64px); + height: calc(100vh - 56px - 64px); margin-top: 24px; + overflow: auto; padding: 16px; background-color: white; .title { diff --git a/vue.config.js b/vue.config.js index f9363ed..4773b9a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -43,22 +43,22 @@ module.exports = { // [process.env.VUE_APP_BASE_API +'/run/']: '/tianhui-admin-web/run/' // } // }, - // [process.env.VUE_APP_BASE_API + '/run/']: { - // target: "http://172.16.34.27:18082", - // changeOrigin: true, - // // logLevel: 'debug', - // pathRewrite: { - // [process.env.VUE_APP_BASE_API +'/run/']: '/tianhui-admin-web/run/' - // } - // }, - // [ '/profile/']: { - // target: 'http://shuili-admin.product.dev.com:30115', - // changeOrigin: true, - // // logLevel: 'debug', - // pathRewrite: { - // ['/profile/']: '/tianhui-admin-web/profile/' - // } - // }, + [process.env.VUE_APP_BASE_API + '/run/']: { + target: "http://172.16.34.27:18082", + changeOrigin: true, + // logLevel: 'debug', + pathRewrite: { + [process.env.VUE_APP_BASE_API +'/run/']: '/tianhui-admin-web/run/' + } + }, + [ '/profile/']: { + target: 'http://shuili-admin.product.dev.com:30115', + changeOrigin: true, + // logLevel: 'debug', + pathRewrite: { + ['/profile/']: '/tianhui-admin-web/profile/' + } + }, // 曹琪本地接口 // [process.env.VUE_APP_BASE_API]: { // target: 'http://172.16.34.59:18083',