diff --git a/src/views/xj/document/maintenance-notice/index.vue b/src/views/xj/document/maintenance-notice/index.vue index ff1b3c7..ce4cdde 100644 --- a/src/views/xj/document/maintenance-notice/index.vue +++ b/src/views/xj/document/maintenance-notice/index.vue @@ -2,88 +2,186 @@ * @Author: SunTao 328867980@qq.com * @Date: 2024-11-20 11:58:33 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2025-02-21 16:25:56 + * @LastEditTime: 2025-02-25 10:51:19 * @FilePath: \znxjxt-ui\src\views\xj\document\maintenance-notice\index.vue * @Description: 养护通知单 --> - +
- +
- - + + - +
- Main Image -
+ Main Image +
采集时间: {{ new Date(currentImageItem.createdTime).toLocaleString() }} @@ -153,8 +316,12 @@ 病害类型: {{ currentImageItem.defectTypeName || "暂无数据" }} 病害面积:{{ currentImageItem.targetArea }}平方米 病害长度:{{ - currentImageItem.targetLen * 1 <= 0 ? "暂无数据" : `${currentImageItem.targetLen}米` }}
+ currentImageItem.targetLen * 1 <= 0 + ? "暂无数据" + : `${currentImageItem.targetLen}米` + }}
+
@@ -291,11 +458,11 @@ export default { this.getSegmentList(); this.getDefectData(); this.setCausesList(); - this.setSegmentTypeList() - this.setRampTypeList() - this.setRoadDirectionList() - this.setStationLocation() - this.setDiseFirstType() + this.setSegmentTypeList(); + this.setRampTypeList(); + this.setRoadDirectionList(); + this.setStationLocation(); + this.setDiseFirstType(); }, methods: { /** @@ -331,7 +498,7 @@ export default { if (code === 200) { this.causesList = data; } - }) + }); }, /** @@ -343,7 +510,7 @@ export default { if (code === 200) { this.segmentTypeList = data; } - }) + }); }, /** @@ -355,7 +522,7 @@ export default { if (code === 200) { this.rampTypeList = data; } - }) + }); }, /** @@ -367,7 +534,7 @@ export default { if (code === 200) { this.roadDirectionList = data; } - }) + }); }, /** @@ -379,7 +546,7 @@ export default { if (code === 200) { this.stationLocationList = data; } - }) + }); }, /** @@ -391,7 +558,7 @@ export default { if (code === 200) { this.diseFirstType = data; } - }) + }); }, /** @@ -463,13 +630,13 @@ export default { ...this.pagination, startTime: this.dateTime ? this.dateTime[0] : "", endTime: this.dateTime ? this.dateTime[1] : "", - maintenanceStatus: "未生成" + maintenanceStatus: "未生成", }; getMaintenanceNoticeList(dataItem) .then(({ code, data }) => { if (code === 200) { - this.lengthSum = data.len.totalLen; - this.areaSum = data.len.totalArea.toFixed(3) + this.lengthSum = data.len.totalLen.toFixed(3); + this.areaSum = data.len.totalArea.toFixed(3); this.noticeList = data.table.rows; this.tableTotal = data.table.total; } @@ -533,7 +700,7 @@ export default { this.getList(); this.$modal.msgSuccess("删除成功"); }) - .catch(() => { }); + .catch(() => {}); }, /** diff --git a/src/views/xj/document/view-notification/components/view-dialog.vue b/src/views/xj/document/view-notification/components/view-dialog.vue index a3211ee..9bf0f5b 100644 --- a/src/views/xj/document/view-notification/components/view-dialog.vue +++ b/src/views/xj/document/view-notification/components/view-dialog.vue @@ -2,25 +2,51 @@ * @Author: SunTao 328867980@qq.com * @Date: 2025-02-24 14:18:41 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2025-02-24 15:53:57 + * @LastEditTime: 2025-02-25 16:31:38 * @FilePath: \znxjxt-ui\src\views\xj\document\view-notification\components\view-dialog.vue * @Description: 查看通知单-查看详情 --> @@ -251,9 +534,9 @@ import { getCrossDropDown, getRampDropDown, } from "@/api/xj/document"; -import { getnoticeDetail } from "@/api/xj/document-view" +import { getnoticeDetail } from "@/api/xj/document-view"; import FssmScroll from "@/components/scroll/fssm-scroll.vue"; -import FssmMap from '@/components/map/fssm-map.vue'; +import FssmMap from "@/components/map/fssm-map.vue"; import { Feature } from "ol"; import { Point } from "ol/geom"; import { Style, Icon, Fill, Text } from "ol/style"; @@ -266,7 +549,7 @@ export default { props: { dialogItem: { type: Object, - default: () => { }, + default: () => {}, }, // 病害成因下拉数据 causesList: { @@ -276,7 +559,7 @@ export default { // 病害类型下拉数据 diseFirstType: { type: Array, - default: () => [] + default: () => [], }, // 路段类型下拉数据 segmentTypeList: { @@ -296,7 +579,7 @@ export default { // 收费站位置下拉数据 stationLocationList: { type: Array, - default: () => [] + default: () => [], }, }, data() { @@ -346,7 +629,7 @@ export default { // 所在路段 diseRoadPart: "", // 详细描述 - diseElaDecs: "" + diseElaDecs: "", }, // 病害类型二级下拉数据 diseTypeDetailedList: [], @@ -403,23 +686,33 @@ export default { diseRoadPosiType: [ { required: true, message: "请选择路段类型", trigger: "change" }, ], - diseTypeDetailed: [{ required: true, message: "请选择病害二级类型", trigger: "change" }], - matTaskAreaId: [{ required: true, message: "请选择工区", trigger: "change" }], + diseTypeDetailed: [ + { required: true, message: "请选择病害二级类型", trigger: "change" }, + ], + matTaskAreaId: [ + { required: true, message: "请选择工区", trigger: "change" }, + ], diseFirstType: [ { required: true, message: "请选择病害类型", trigger: "change" }, ], matTWorkStationId: [ { required: true, message: "请选择工作站", trigger: "change" }, ], - diseRoadDirec: [{ required: true, message: "请选择方向", trigger: "change" }], - diseRoadLine: [{ required: true, message: "请选择车道", trigger: "blur" }], + diseRoadDirec: [ + { required: true, message: "请选择方向", trigger: "change" }, + ], + diseRoadLine: [ + { required: true, message: "请选择车道", trigger: "blur" }, + ], stationCode: [ { required: true, message: "请选择收费站", trigger: "change" }, ], stationLocation: [ { required: true, message: "请选择收费站位置", trigger: "change" }, ], - rampType: [{ required: true, message: "请选择匝道", trigger: "change" }], + rampType: [ + { required: true, message: "请选择匝道", trigger: "change" }, + ], rampInterchangeCode: [ { required: true, message: "请选择匝道立交", trigger: "change" }, ], @@ -456,106 +749,107 @@ export default { diseRoadPart: [ { required: true, message: "请选择所在路段", trigger: "change" }, ], - } + }; }, isStakeStartRequired() { - return this.editForm.diseRoadPosiType !== '2' - } + return this.editForm.diseRoadPosiType !== "2"; + }, }, watch: { dialogItem: { handler(val) { - this.editForm = JSON.parse(JSON.stringify(val)) - getnoticeDetail({ id: val.id }).then(({ data, code, }) => { + this.changeDetailed(val.diseFirstType); + this.changeRampIntOrientation(val.rampInterchangeCode); + this.editForm = JSON.parse(JSON.stringify(val)); + getnoticeDetail({ id: val.id }).then(({ data, code }) => { if (code === 200) { - this.checkedDiseaseList = data + this.checkedDiseaseList = data; } - }) + }); }, deep: true, immediate: true, }, }, mounted() { - this.handleDiseRoadPart() - this.handleMatTaskArea() - this.handleMatWorkStation() - this.handleConnBridge() - this.handleConnTunnel() - this.handleStationCode() - this.handleRampIntOrientation() + this.handleDiseRoadPart(); + this.handleMatTaskArea(); + this.handleMatWorkStation(); + this.handleConnBridge(); + this.handleConnTunnel(); + this.handleStationCode(); + this.handleRampIntOrientation(); }, methods: { /** - * @description: 获取所在路段下拉数据 - * @param {*} - * @return {*} - */ + * @description: 获取所在路段下拉数据 + * @param {*} + * @return {*} + */ handleDiseRoadPart(str) { getDiseRoadPartDropDown({ name: str }).then(({ code, data }) => { if (code === 200) { - this.roadPartList = data + this.roadPartList = data; } - }) + }); }, /** - * @description: 修改所在路段事件 - * @param {*} - * @return {*} - */ + * @description: 修改所在路段事件 + * @param {*} + * @return {*} + */ changeDiseRoadPart(value) { if (!value) { - this.handleDiseRoadPart() + this.handleDiseRoadPart(); } }, /** - * @description: 获取工区下拉数据 - * @param {*} - * @return {*} - */ + * @description: 获取工区下拉数据 + * @param {*} + * @return {*} + */ handleMatTaskArea(str) { getTaskareaDropDown({ name: str }).then(({ code, data }) => { if (code === 200) { - this.taskAreaList = data + this.taskAreaList = data; } - }) + }); }, - /** - * @description: 修改工区事件 - * @param {*} - * @return {*} - */ + * @description: 修改工区事件 + * @param {*} + * @return {*} + */ changeMatTaskArea(value) { if (!value) { - this.handleMatTaskArea() + this.handleMatTaskArea(); } }, /** - * @description: 获取工作站下拉数据 - * @param {*} - * @return {*} - */ + * @description: 获取工作站下拉数据 + * @param {*} + * @return {*} + */ handleMatWorkStation(str) { getWorkstationDropDown({ name: str }).then(({ code, data }) => { if (code === 200) { - this.matWorkStationList = data + this.matWorkStationList = data; } - }) + }); }, /** - * @description: 工作站修改事件 - * @param {*} - * @return {*} - */ + * @description: 工作站修改事件 + * @param {*} + * @return {*} + */ changeMatWorkStation(value) { if (!value) { - this.handleMatWorkStation() + this.handleMatWorkStation(); } }, @@ -567,19 +861,19 @@ export default { handleConnBridge(str) { getBridgeDropDown({ name: str }).then(({ code, data }) => { if (code === 200) { - this.connBridgeList = data + this.connBridgeList = data; } - }) + }); }, /** - * @description: 桥梁修改事件 - * @param {*} - * @return {*} - */ + * @description: 桥梁修改事件 + * @param {*} + * @return {*} + */ changeConnBridge(value) { if (!value) { - this.handleConnBridge() + this.handleConnBridge(); } }, @@ -591,19 +885,19 @@ export default { handleConnTunnel(str) { getTunnelDropDown({ name: str }).then(({ code, data }) => { if (code === 200) { - this.connTunnelList = data + this.connTunnelList = data; } - }) + }); }, /** - * @description: 隧道修改事件 - * @param {*} - * @return {*} - */ + * @description: 隧道修改事件 + * @param {*} + * @return {*} + */ changeConnTunnel(value) { if (!value) { - this.handleConnTunnel() + this.handleConnTunnel(); } }, @@ -615,19 +909,19 @@ export default { handleStationCode(str) { getStationDropDown({ name: str }).then(({ code, data }) => { if (code === 200) { - this.stationCodeList = data + this.stationCodeList = data; } - }) + }); }, /** - * @description: 收费站修改事件 - * @param {*} - * @return {*} - */ + * @description: 收费站修改事件 + * @param {*} + * @return {*} + */ changeStationCode(value) { if (!value) { - this.handleStationCode() + this.handleStationCode(); } }, @@ -639,22 +933,22 @@ export default { handleRampIntOrientation(str) { getCrossDropDown({ name: str }).then(({ code, data }) => { if (code === 200) { - this.rampIntOrientationList = data + this.rampIntOrientationList = data; } - }) + }); }, /** - * @description: 互通立交修改事件 - * @param {*} - * @return {*} - */ + * @description: 互通立交修改事件 + * @param {*} + * @return {*} + */ changeRampIntOrientation(value) { if (!value) { - this.handleRampIntOrientation() + this.handleRampIntOrientation(); } - this.editForm.rampIntOrientation = "" - this.handleRampInterchangeCode() + this.editForm.rampIntOrientation = ""; + this.handleRampInterchangeCode(); }, /** @@ -663,42 +957,44 @@ export default { * @return {*} */ handleRampInterchangeCode() { - getRampDropDown({ crossid: this.editForm.rampInterchangeCode }).then(({ code, data }) => { - if (code === 200) { - this.rampInterchangeCodeList = data + getRampDropDown({ crossid: this.editForm.rampInterchangeCode }).then( + ({ code, data }) => { + if (code === 200) { + this.rampInterchangeCodeList = data; + } } - }) + ); }, /** - * @description: 病害类型一级修改事件 - * @param {*} row - * @return {*} - */ + * @description: 病害类型一级修改事件 + * @param {*} row + * @return {*} + */ changeDetailed(value) { this.editForm.diseTypeDetailed = ""; - const [child] = this.diseFirstType.filter(item => item.value === value) + const [child] = this.diseFirstType.filter((item) => item.value === value); getDiseTypeDetailed({ parentId: child.key }).then(({ code, data }) => { if (code === 200) { this.diseTypeDetailedList = data; } - }) + }); }, /** - * @description: 列表行绑定id - * @param {*} row - * @return {*} - */ + * @description: 列表行绑定id + * @param {*} row + * @return {*} + */ getRowKey(row) { return row.snapshotId; }, /** - * @description: 列表行删除事件 - * @param {*} row - * @return {*} - */ + * @description: 列表行删除事件 + * @param {*} row + * @return {*} + */ handleDelete(index) { this.checkedDiseaseList.splice(index, 1); }, @@ -716,15 +1012,17 @@ export default { submitForm() { this.$refs.editForm.validate((valid) => { if (valid) { - const defectId = this.checkedDiseaseList?.map(item => item.id) - addMaintenanceNotice({ ...this.editForm, defectId }).then(({ code, data }) => { - if (code === 200) { - this.$message.success("生成成功"); - this.$emit("cancel"); - } else { - this.$message.error(data); + const defectId = this.checkedDiseaseList?.map((item) => item.id); + addMaintenanceNotice({ ...this.editForm, defectId }).then( + ({ code, data }) => { + if (code === 200) { + this.$message.success("生成成功"); + this.$emit("cancel"); + } else { + this.$message.error(data); + } } - }); + ); } }); }, @@ -735,7 +1033,7 @@ export default { * @return {*} */ viewMapSelected(tip) { - this.mapTip = tip + this.mapTip = tip; // 地图打点 if (!tip && this.checkedDiseaseList.length > 0) { // 修改地图中心点位 @@ -748,7 +1046,7 @@ export default { this.$nextTick(() => { this.fitMapToPoints(pointArray); this.drawPoint(); - }) + }); } }, @@ -852,9 +1150,10 @@ export default { return new Style({ image: new Icon({ crossOrigin: "anonymous", - src: require(`@/assets/screen/index/${feature.getProperties().features[0].get("data").defectTypeName - || "龟裂" - }.png`), + src: require(`@/assets/screen/index/${ + feature.getProperties().features[0].get("data") + .defectTypeName || "龟裂" + }.png`), // 图标缩放比例 scale: 0.5, displacement: [0, 30], @@ -909,7 +1208,6 @@ export default { center: feature.getGeometry().getCoordinates(), zoom: map.getView().getZoom() + 1, }); - } } }, @@ -920,7 +1218,7 @@ export default { * @return {*} */ viewSelected() { - this.diseaseVisible = true + this.diseaseVisible = true; }, /** @@ -939,7 +1237,7 @@ export default { * @return {*} */ diseaseCancel() { - this.diseaseVisible = false + this.diseaseVisible = false; }, /** @@ -1049,7 +1347,7 @@ export default { color: #f01515; } - >div { + > div { margin: 0.5rem 0; } } @@ -1062,7 +1360,6 @@ export default { justify-content: flex-end; } - /* 查看大图弹窗 */ .image-container { position: relative; diff --git a/src/views/xj/document/view-notification/index.vue b/src/views/xj/document/view-notification/index.vue index 9a8076f..8edbfe3 100644 --- a/src/views/xj/document/view-notification/index.vue +++ b/src/views/xj/document/view-notification/index.vue @@ -286,7 +286,7 @@ export default { // 弹窗显隐控制 dialogVisible: false, - // 传弹窗id + // 传弹窗数据 dialogItem: {}, } },