diff --git a/src/views/big-screen/index.vue b/src/views/big-screen/index.vue index 3a48173..67b13ea 100644 --- a/src/views/big-screen/index.vue +++ b/src/views/big-screen/index.vue @@ -2,7 +2,7 @@ * @Author: SunTao 328867980@qq.com * @Date: 2024-10-17 11:34:00 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2024-11-20 14:32:46 + * @LastEditTime: 2024-11-20 17:08:11 * @FilePath: \znxjxt-ui\src\views\big-screen\index.vue * @Description: 大屏首页 --> @@ -36,7 +36,10 @@ v-for="(item, index) in messageList" :key="`message-item-${index}`" > -
+
{ + const map = this.$refs.roadMap.instance.get("map"); + map.removeInteraction(this.selectedFeatures); + this.selectedFeatures = null; + }); this.showImageDialog = false; }, @@ -705,7 +715,10 @@ export default { } return []; }); - this.drawPoint(); + // 如果不是病害巡检,则绘制点位 + if (this.elementDiv !== "DiseaseScreen") { + this.drawPoint(); + } } }); }, @@ -931,9 +944,9 @@ export default { /* 地图选中feature事件 */ featureSelect(e) { const map = this.$refs.roadMap.instance.get("map"); - let selectedFeatures = e.selected; - if (selectedFeatures.length > 0) { - let feature = selectedFeatures[0]; + this.selectedFeatures = e.selected; + if (this.selectedFeatures.length > 0) { + let feature = this.selectedFeatures[0]; let features = feature.get("features"); // 点击线段事件 if (feature.getProperties().type === "line") { diff --git a/src/views/big-screen/overview-components/inspection-vehicles.vue b/src/views/big-screen/overview-components/inspection-vehicles.vue index 5940b97..29f3d99 100644 --- a/src/views/big-screen/overview-components/inspection-vehicles.vue +++ b/src/views/big-screen/overview-components/inspection-vehicles.vue @@ -2,8 +2,8 @@ * @Author: SunTao 328867980@qq.com * @Date: 2024-11-08 09:40:18 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2024-11-19 13:32:51 - * @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\inspection-vehicles.vue + * @LastEditTime: 2024-11-20 16:32:29 + * @FilePath: \znxjxt-ui\src\views\big-screen\overview-components\inspection-vehicles.vue * @Description: 总览大屏-巡检车辆 --> @@ -43,7 +43,7 @@ height="85%" > - + @@ -177,6 +217,8 @@ export default { ], // 预警列表 warningList: [], + // 列表勾选数据 + checkIds: [], // 分页-页数页码 pagination: { page: 1, @@ -186,6 +228,8 @@ export default { tableTotal: 0, // 列表加载状态 loading: false, + // 批量删除状态 + multiple: true, }; }, watch: { @@ -252,10 +296,64 @@ export default { endTime: this.dateTime ? this.dateTime[1] : "", }; setTimeout(() => { + this.warningList = [{id:"1", segmentName: "sSSSSSS" }]; this.loading = false; }, 100); }, + /** + * @description: 点击列表行事件 + * @param {*} val + * @return {*} + */ + handleTableChange(val) { + if (val) { + console.log(val, "ddd"); + this.getList(); + } + }, + + /** + * @description: 列表选择改变事件 + * @param {*} val + * @return {*} + */ + handleSelectionChange(selection) { + this.checkIds = selection.map((item) => item.id); + this.multiple = !selection.length; + }, + + /** + * @description: 批量删除事件 + * @return {*} + */ + handleDelete(row) { + const checkIds = row ? [row.id] : this.checkIds; + if (!checkIds.length) { + this.$modal.msgWarning("请选择要删除的记录"); + return; + } + this.$modal + .confirm(`是否确认删除选中的${checkIds.length}条记录?`) + .then(() => { + // return deleteRoad(checkIds); + }) + .then(() => { + this.getList(); + this.$refs.warningTable.clearSelection(); + this.$modal.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, + + /** + * @description: 全部已读事件 + * @return {*} + */ + handleRead() { + this.getList(); + }, + /** * @description: 切换分页 * @param {*} arg @@ -286,6 +384,22 @@ export default { padding: 1rem; } +.el-table { + .table-index { + &::before { + content: ""; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + width: 0.8rem; + height: 0.8rem; + border-radius: 50%; + background-color: #f56c6c; + } + } +} + /* 分页样式 */ .pagination-part { width: 100%; diff --git a/src/views/xj/inspection/surface-management/index.vue b/src/views/xj/inspection/surface-management/index.vue index fcca6eb..1070f34 100644 --- a/src/views/xj/inspection/surface-management/index.vue +++ b/src/views/xj/inspection/surface-management/index.vue @@ -2,7 +2,7 @@ * @Author: SunTao 328867980@qq.com * @Date: 2024-10-14 13:59:51 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2024-11-14 15:26:15 + * @LastEditTime: 2024-11-20 15:01:48 * @FilePath: \znxjxt-ui\src\views\xj\inspection\surface-management\index.vue * @Description: 巡检管理-路面病害对比 --> @@ -252,7 +252,10 @@ export default { this.dialogImgLeft = item.data; if (Object.keys(this.surfaceListRight).length > 0) { const rightImg = this.surfaceListRight.data.filter((it) => { - return it.snapshotId === item.data.snapshotId; + if (it.snapshotId === item.data.snapshotId) { + return it; + } + return []; }); this.dialogImgRight = rightImg[0]; } @@ -264,10 +267,12 @@ export default { this.dialogImgRight = item.data; if (Object.keys(this.surfaceListLeft).length > 0) { const leftImg = this.surfaceListLeft.data.filter((it) => { - return it.snapshotId === item.data.snapshotId; + if (it.snapshotId === item.data.snapshotId) { + return it; + } + return []; }); this.dialogImgLeft = leftImg[0]; - } this.viewVisible = true; },