Browse Source

fix: 修改水闸和堤防检查监督逻辑

sy-water-data-board-ui
panyuyi 1 year ago
parent
commit
2d0910a62b
  1. 22
      src/views/dike/runManage/enginerring/components/Drawer.vue
  2. 238
      src/views/dike/runManage/superVisionInspetion/projectManage/projectReport.vue
  3. 60
      src/views/dike/runManage/superVisionInspetion/projectManage/projectReportPage.vue
  4. 47
      src/views/dike/runManage/superVisionInspetion/questionManage/index.vue
  5. 180
      src/views/dike/runManage/superVisionInspetion/statisticAnalysis/index.vue
  6. 3
      src/views/dike/runManage/superVisionInspetion/tasksManage/tasksDetails.vue
  7. 242
      src/views/sluice/runManage/supervisionInspetion/projectManage/projectReport.vue
  8. 61
      src/views/sluice/runManage/supervisionInspetion/projectManage/projectReportPage.vue
  9. 58
      src/views/sluice/runManage/supervisionInspetion/questionManage/index.vue
  10. 2
      src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/components/Pie.vue
  11. 187
      src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/index.vue
  12. 3
      src/views/sluice/runManage/supervisionInspetion/tasksManage/tasksDetails.vue
  13. 32
      vue.config.js

22
src/views/dike/runManage/enginerring/components/Drawer.vue

@ -207,7 +207,7 @@ export default {
</div>
</div>
<!-- 两级项目的问题 -->
<div v-else class="flex-1 flex-col items-center">
<div v-else class="flex flex-1 flex-col items-center">
<div
class="flex flex-1 items-center"
v-for="(rowItem, index4) in item.wCount"
@ -228,14 +228,12 @@ export default {
</div>
</div>
<!-- 只有一级项目的问题 -->
<div v-else class="flex-1">
<div class="flex flex-1 items-center">
<div class="w-p-50 flex items-center p-2 r-b-border h-full">
这是问题说明说明这是问题说明说明这是问题说明说明这是问题说明说明这是问题是问题说明说明
</div>
<div class="w-p-50 flex items-center p-2 r-b-border h-full">
2
</div>
<div v-else class="flex flex-1 items-center">
<div class="w-p-50 flex items-center p-2 r-b-border h-full">
只有一级项目的问题只有一级项目的问题只有一级项目的问题只有一级项目的问题只有一级项目的问题只有一级项目的问题只有一级项目的问题只有一级项目的问题
</div>
<div class="w-p-50 flex items-center p-2 r-b-border h-full">
2
</div>
</div>
</div>
@ -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);

238
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 {
>严重</el-button
>
</div>
</div>
<div class="question-row w-full">
<div class="question-col flex-shrink-0">描述</div>
<div class="question-col flex-1">
<el-input
type="textarea"
v-model="item.problemDescribe"
:rows="4"
:disabled="isDisabled"
placeholder="请输入内容"
/>
<div
class="question-row w-full"
v-if="['2', '3'].includes(item2.level)"
>
<div class="question-col flex-shrink-0">描述</div>
<div class="question-col flex-1">
<el-input
type="textarea"
v-model="item2.problemDescribe"
:rows="4"
:disabled="isDisabled"
placeholder="请输入内容"
/>
</div>
</div>
</div>
<div class="question-row w-full">
<div class="question-col flex-shrink-0">照片</div>
<div class="question-col flex-1">
<div class="flex flex-wrap">
<div
class="w-100 h-100 mr-12 mb-12"
v-for="(item, index) in item.siteSituationRecordsArr"
:key="index"
>
<el-image
style="width: 200px; min-height: 100px; height: auto"
:src="item"
:preview-src-list="[item]"
<div
class="question-row w-full"
v-if="['2', '3'].includes(item2.level)"
>
<div class="question-col flex-shrink-0">照片</div>
<div class="question-col flex-1">
<div class="flex flex-wrap">
<div
class="w-100 h-100 mr-12 mb-12"
v-for="(url, urlIndex) in item2.siteSituationRecordsArr"
:key="urlIndex"
>
<template #error>
<div
class="w-full flex justify-center items-center"
style="
height: 100px;
border: 1px solid #f0f0f0;
font-style: italic;
color: #ccc;
"
>
图片加载失败
</div>
</template>
</el-image>
<el-image
style="width: 200px; min-height: 100px; height: auto"
:src="url"
:preview-src-list="[url]"
>
<template #error>
<div
class="w-full flex justify-center items-center"
style="
height: 100px;
border: 1px solid #f0f0f0;
font-style: italic;
color: #ccc;
"
>
图片加载失败
</div>
</template>
</el-image>
</div>
</div>
</div>
<el-upload
action="#"
:disabled="isDisabled"
:http-request="handleUpload"
:auto-upload="true"
:before-upload="beforeUpload"
:showFileList="false"
accept=".jpg,.png,.jpeg"
:maxLength="99"
>
<el-button
type="primary"
@click="handleClickItem(item)"
<el-upload
action="#"
:disabled="isDisabled"
>上传</el-button
:http-request="handleUpload"
:auto-upload="true"
:before-upload="beforeUpload"
:showFileList="false"
accept=".jpg,.png,.jpeg"
:maxLength="99"
>
</el-upload>
<el-button
type="primary"
@click="handleClickItem(item2)"
:disabled="isDisabled"
>上传</el-button
>
</el-upload>
</div>
</div>
</div>
</el-tab-pane>

60
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 {

47
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 {
<div class="flex border-l-t">
<div class="w-120 p-10 border-b-r label-text">问题描述</div>
<div class="flex-1 p-10 border-b-r value-text">
{{ checkDetailData.problemDescribe }}
{{
checkDetailData.problemDto &&
checkDetailData.problemDto.problemDescribe
}}
</div>
</div>
<div class="flex border-l-t">
<div class="w-120 p-10 border-b-r label-text">现场记录情况</div>
<div class="flex-1 p-10 border-b-r">
<el-image
v-for="item in checkDetailData.siteSituationRecordsArr"
style="width: 200px; min-height: 100px; height: auto"
:src="item"
:key="item"
:preview-src-list="[item]"
></el-image>
<template v-if="checkDetailData.problemDto">
<el-image
v-for="item in checkDetailData.problemDto
.siteSituationRecordsArr"
style="width: 200px; min-height: 100px; height: auto"
:src="item"
:key="item"
class="mr-10 mb-10"
:preview-src-list="[item]"
></el-image>
</template>
</div>
</div>
</div>
<div
<!-- <div
class="w-40 flex-shrink-0 border-l-t border-b-r flex justify-center items-center font-12 color-red"
>
下发和处理状态查看内容
</div>
</div> -->
</div>
<!-- 确认状态内容 -->
<div
@ -588,16 +590,17 @@ export default {
style="width: 200px; min-height: 100px; height: auto"
:src="item"
:key="item"
class="mr-10 mb-10"
:preview-src-list="[item]"
></el-image>
</div>
</div>
</div>
<div
<!-- <div
class="w-40 flex-shrink-0 border-l-t border-b-r flex justify-center items-center font-12 color-red"
>
确认状态内容
</div>
</div> -->
</div>
<!-- 完成状态内容 -->
<div
@ -625,11 +628,11 @@ export default {
</div>
</div>
</div>
<div
<!-- <div
class="w-40 flex-shrink-0 border-l-t border-b-r flex justify-center items-center font-12 color-red"
>
完成状态内容
</div>
</div> -->
</div>
</div>
</el-dialog>

180
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 {
<div class="body slider-right">
<div class="top-title">统计分析</div>
<div class="table-box">
<div class="flex justify-between items-center">
<div class="flex title-box justify-between items-center">
<div class="title">监督检查任务统计分析</div>
<div class="select-box flex">
<div class="select-box flex items-center font-14">
<span class="mr-12">所属流域</span>
<el-select
class="statistic-analysis-select-style bg-inner"
v-model="typeSelect"
style="width: 128px"
size="mini"
@change="handleChangeType"
placeholder="请选择类型"
class="statistic-analysis-select-style"
v-model="paramsData.riverLocation"
filterable
link
remote
placeholder="请输入关键词"
:remote-method="handleGetRemoteRiverLocationData"
@focus="handleGetRemoteRiverLocationData('')"
@change="handleChangeQuery"
>
<el-option label="全部" value=""> </el-option>
<el-option
v-for="item in typeOptions"
v-for="item in riverLocationList"
:key="item.value"
class="font-12"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<!-- 工程类型 -->
<span class="ml-32 mr-12">工程类型</span>
<el-select
size="mini"
class="statistic-analysis-select-style"
v-model="paramsData.wagaType"
v-if="typeSelect === 'wagaType'"
filterable
@change="handleChangeQuery"
placeholder="请选择"
@ -244,9 +234,9 @@ export default {
>
</el-option>
</el-select>
<span class="ml-32 mr-12">行政区划</span>
<el-cascader
size="mini"
v-else-if="typeSelect === 'adcd'"
class="statistic-analysis-select-style"
:options="areasOptions"
v-model="paramsData.adcd"
@ -256,22 +246,22 @@ export default {
@change="handleChangeQuery"
>
</el-cascader>
<span class="ml-32 mr-12">监督检查任务</span>
<el-select
v-else
size="mini"
class="statistic-analysis-select-style"
v-model="paramsData.remoteValue"
v-model="paramsData.taskId"
filterable
link
remote
placeholder="请输入关键词"
:remote-method="handleGetRemoteProjectListData"
@focus="handleGetRemoteProjectListData('')"
:remote-method="handleGetRemoteTasksData"
@focus="handleGetRemoteTasksData('')"
@change="handleChangeQuery"
>
<el-option label="全部" value=""> </el-option>
<el-option
v-for="item in remoteOptions"
v-for="item in tasksList"
:key="item.value"
:label="item.label"
:value="item.value"
@ -288,12 +278,13 @@ export default {
echartsTitle="问题总数"
:itemData="questionLevelList.slice(1, 5)"
ref="pieRef1"
class="question-item"
></Pie>
<Pie
ref="pieRef2"
title="处理统计"
echartsTitle="问题处置"
class="ml-20"
class="question-item ml-20"
:itemData="questionLevelList.slice(6, 10)"
></Pie>
</div>
@ -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;
}
}
}
}
</style>
<style lang="less">
.statistic-analysis-select-style {
border: none !important;
.el-input__inner {
border: none !important;
}
}
.statistic-analysis-select-style.bg-inner {
.el-input__inner {
background-color: #f6f6f6;
border-radius: 4px;
}
}
</style>

3
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 {

242
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 {
>严重</el-button
>
</div>
</div>
<div class="question-row w-full">
<div class="question-col flex-shrink-0">描述</div>
<div class="question-col flex-1">
<el-input
type="textarea"
v-model="item.problemDescribe"
:rows="4"
:disabled="isDisabled"
placeholder="请输入内容"
/>
<div
class="question-row w-full"
v-if="['2', '3'].includes(item2.level)"
>
<div class="question-col flex-shrink-0">描述</div>
<div class="question-col flex-1">
<el-input
type="textarea"
v-model="item2.problemDescribe"
:rows="4"
:disabled="isDisabled"
placeholder="请输入内容"
/>
</div>
</div>
</div>
<div class="question-row w-full">
<div class="question-col flex-shrink-0">照片</div>
<div class="question-col flex-1">
<div class="flex flex-wrap">
<div
class="w-100 h-100 mr-12 mb-12"
v-for="(item, index) in item.siteSituationRecordsArr"
:key="index"
>
<el-image
style="width: 200px; min-height: 100px; height: auto"
:src="item"
:preview-src-list="[item]"
<div
class="question-row w-full"
v-if="['2', '3'].includes(item2.level)"
>
<div class="question-col flex-shrink-0">照片</div>
<div class="question-col flex-1">
<div class="flex flex-wrap">
<div
class="w-100 h-100 mr-12 mb-12"
v-for="(url, urlIndex) in item2.siteSituationRecordsArr"
:key="urlIndex"
>
<template #error>
<div
class="w-full flex justify-center items-center"
style="
height: 100px;
border: 1px solid #f0f0f0;
font-style: italic;
color: #ccc;
"
>
图片加载失败
</div>
</template>
</el-image>
<el-image
style="width: 200px; min-height: 100px; height: auto"
:src="url"
:preview-src-list="[url]"
>
<template #error>
<div
class="w-full flex justify-center items-center"
style="
height: 100px;
border: 1px solid #f0f0f0;
font-style: italic;
color: #ccc;
"
>
图片加载失败
</div>
</template>
</el-image>
</div>
</div>
</div>
<el-upload
action="#"
:disabled="isDisabled"
:http-request="handleUpload"
:auto-upload="true"
:before-upload="beforeUpload"
:showFileList="false"
accept=".jpg,.png,.jpeg"
:maxLength="99"
>
<el-button
type="primary"
@click="handleClickItem(item)"
<el-upload
action="#"
:disabled="isDisabled"
>上传</el-button
:http-request="handleUpload"
:auto-upload="true"
:before-upload="beforeUpload"
:showFileList="false"
accept=".jpg,.png,.jpeg"
:maxLength="99"
>
</el-upload>
<el-button
type="primary"
@click="handleClickItem(item2)"
:disabled="isDisabled"
>上传</el-button
>
</el-upload>
</div>
</div>
</div>
</el-tab-pane>

61
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 {

58
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 {
<div class="flex border-l-t">
<div class="w-120 p-10 border-b-r label-text">问题描述</div>
<div class="flex-1 p-10 border-b-r value-text">
{{ checkDetailData.problemDescribe }}
{{
checkDetailData.problemDto &&
checkDetailData.problemDto.problemDescribe
}}
</div>
</div>
<div class="flex border-l-t">
<div class="w-120 p-10 border-b-r label-text">现场记录情况</div>
<div class="flex-1 p-10 border-b-r">
<el-image
v-for="item in checkDetailData.siteSituationRecordsArr"
style="width: 200px; min-height: 100px; height: auto"
:src="item"
:key="item"
:preview-src-list="[item]"
></el-image>
<template v-if="checkDetailData.problemDto">
<el-image
v-for="item in checkDetailData.problemDto
.siteSituationRecordsArr"
style="width: 200px; min-height: 100px; height: auto"
:src="item"
:key="item"
class="mr-10 mb-10"
:preview-src-list="[item]"
></el-image>
</template>
</div>
</div>
</div>
<div
<!-- <div
class="w-40 flex-shrink-0 border-l-t border-b-r flex justify-center items-center font-12 color-red"
>
下发和处理状态查看内容
</div>
</div> -->
</div>
<!-- 确认状态内容 -->
<div
@ -619,16 +634,17 @@ export default {
style="width: 200px; min-height: 100px; height: auto"
:src="item"
:key="item"
class="mr-10 mb-10"
:preview-src-list="[item]"
></el-image>
</div>
</div>
</div>
<div
<!-- <div
class="w-40 flex-shrink-0 border-l-t border-b-r flex justify-center items-center font-12 color-red"
>
确认状态内容
</div>
</div> -->
</div>
<!-- 完成状态内容 -->
<div
@ -656,11 +672,11 @@ export default {
</div>
</div>
</div>
<div
<!-- <div
class="w-40 flex-shrink-0 border-l-t border-b-r flex justify-center items-center font-12 color-red"
>
完成状态内容
</div>
</div> -->
</div>
</div>
</el-dialog>

2
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;
}

187
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 {
<div class="body slider-right">
<div class="top-title">统计分析</div>
<div class="table-box">
<div class="flex justify-between items-center">
<div class="flex title-box justify-between items-center">
<div class="title">监督检查任务统计分析</div>
<div class="select-box flex">
<div class="select-box flex items-center font-14">
<span class="mr-12">所属流域</span>
<el-select
class="statistic-analysis-select-style bg-inner"
v-model="typeSelect"
style="width: 128px"
size="mini"
@change="handleChangeType"
placeholder="请选择类型"
class="statistic-analysis-select-style"
v-model="paramsData.riverLocation"
filterable
link
remote
placeholder="请输入关键词"
:remote-method="handleGetRemoteRiverLocationData"
@focus="handleGetRemoteRiverLocationData('')"
@change="handleChangeQuery"
>
<el-option label="全部" value=""> </el-option>
<el-option
v-for="item in typeOptions"
v-for="item in riverLocationList"
:key="item.value"
class="font-12"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<!-- 工程类型 -->
<span class="ml-32 mr-12">工程类型</span>
<el-select
size="mini"
class="statistic-analysis-select-style"
v-model="paramsData.wagaType"
v-if="typeSelect === 'wagaType'"
filterable
@change="handleChangeQuery"
placeholder="请选择"
@ -244,9 +223,9 @@ export default {
>
</el-option>
</el-select>
<span class="ml-32 mr-12">行政区划</span>
<el-cascader
size="mini"
v-else-if="typeSelect === 'adcd'"
class="statistic-analysis-select-style"
:options="areasOptions"
v-model="paramsData.adcd"
@ -256,22 +235,22 @@ export default {
@change="handleChangeQuery"
>
</el-cascader>
<span class="ml-32 mr-12">监督检查任务</span>
<el-select
v-else
size="mini"
class="statistic-analysis-select-style"
v-model="paramsData.remoteValue"
v-model="paramsData.taskId"
filterable
link
remote
placeholder="请输入关键词"
:remote-method="handleGetRemoteProjectListData"
@focus="handleGetRemoteProjectListData('')"
:remote-method="handleGetRemoteTasksData"
@focus="handleGetRemoteTasksData('')"
@change="handleChangeQuery"
>
<el-option label="全部" value=""> </el-option>
<el-option
v-for="item in remoteOptions"
v-for="item in tasksList"
:key="item.value"
:label="item.label"
:value="item.value"
@ -284,16 +263,17 @@ export default {
<!-- 问题列表 -->
<div class="question-box" v-if="questionLevelList.length">
<Pie
class="question-item"
title="问题统计"
echartsTitle="问题总数"
:itemData="questionLevelList.slice(1, 5)"
ref="pieRef1"
></Pie>
<Pie
class="question-item ml-20"
ref="pieRef2"
title="处理统计"
echartsTitle="问题处置"
class="ml-20"
:itemData="questionLevelList.slice(6, 10)"
></Pie>
</div>
@ -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;
}
}
}
}
</style>
<style lang="less">
.statistic-analysis-select-style {
border: none !important;
.el-input__inner {
border: none !important;
}
}
.statistic-analysis-select-style.bg-inner {
.el-input__inner {
background-color: #f6f6f6;
border-radius: 4px;
}
}
</style>

3
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 {

32
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',

Loading…
Cancel
Save