From 7676da638a45f49018a1b78a96213fe8e9ba4819 Mon Sep 17 00:00:00 2001 From: wangxingyuan <2944009893@qq.com> Date: Tue, 8 Jul 2025 16:04:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/point/site_management.js | 24 ++ .../patrolpointmnt/patrolpoint/index.vue | 1 + .../point/components/site_VideoDialog.vue | 7 +- src/views/point/site_management.vue | 335 ++++++++---------- 4 files changed, 177 insertions(+), 190 deletions(-) diff --git a/src/api/point/site_management.js b/src/api/point/site_management.js index 64bafde..83a217c 100644 --- a/src/api/point/site_management.js +++ b/src/api/point/site_management.js @@ -142,4 +142,28 @@ export function bindingPreset (data) { method: 'post', data: data }) +} +// 预置点列表 +export function getPresetList (params) { + return request({ + url: '/patrol/preset', + method: 'get', + params: params + }) +} +// 解绑 +export function presetRemove (params) { + return request({ + url: `/patrol/preset/remove/${params}`, + method: 'get', + // params: params + }) +} +// 监测设备查询 +export function eqpbookList (params) { + return request({ + url: `/basedata/eqpbook/list`, + method: 'get', + params: params + }) } \ No newline at end of file diff --git a/src/views/basedata/patrolpointmnt/patrolpoint/index.vue b/src/views/basedata/patrolpointmnt/patrolpoint/index.vue index 7cbc1a9..e96e3f3 100644 --- a/src/views/basedata/patrolpointmnt/patrolpoint/index.vue +++ b/src/views/basedata/patrolpointmnt/patrolpoint/index.vue @@ -416,6 +416,7 @@ export default { }, // 智能识别类型弹框 tableTyle(row) { + this.tableItem=[] this.type = 1; this.tableItem = row; this.tableItem.alarmThreshold = JSON.parse(row.alarmThreshold); diff --git a/src/views/point/components/site_VideoDialog.vue b/src/views/point/components/site_VideoDialog.vue index 229b7e3..fe8c554 100644 --- a/src/views/point/components/site_VideoDialog.vue +++ b/src/views/point/components/site_VideoDialog.vue @@ -207,7 +207,7 @@ export default { data() { return { bindingMonitorPointTitle: "绑定可见光检测点", - pointDialogShow: false, + // pointDialogShow: false, dialogPointTree: [], defaultPropsMonitor: { children: "children", @@ -239,7 +239,8 @@ export default { }, methods: { bindingMonitorPointClose() { - this.pointDialogShow = false; + // this.pointDialogShow = false; + this.$emit("site_videoDialogClose",false); }, // 绑定可见光监测点点击树事件 handleMonitor(e) { @@ -435,7 +436,6 @@ export default { saveDot1() { this.presetData.presetPosName = this.presetName; this.presetData.presetActionList = this.bindingMonitorPointTableData; - bindingPreset(this.presetData).then((res) => { console.log(res, 11111); if (res.code == 200) { @@ -458,6 +458,7 @@ export default { presetParamList: [], }; this.pointDialogShow=false; + this.$emit('site_saveDot1',true) } else { this.$message.error(res.msg); } diff --git a/src/views/point/site_management.vue b/src/views/point/site_management.vue index ba4b84d..36031fe 100644 --- a/src/views/point/site_management.vue +++ b/src/views/point/site_management.vue @@ -204,7 +204,14 @@ align="center" > + + + + + + + +
@@ -433,124 +467,14 @@ }} - - - + + + + + +
@@ -844,6 +777,9 @@ import { edit, editItem, postRemove, + getPresetList, + presetRemove, + eqpbookList, // vl, // listByEqIdAndChannelId } from "@/api/point/site_management"; @@ -852,7 +788,7 @@ export default { name: "SiteManagement", components: { videoPlayer, - siteVideoDialog + siteVideoDialog, }, data() { return { @@ -920,28 +856,7 @@ export default { bindingMonitorPointTableData: [], InspectionDialogVisible: false, queryParams: {}, - InspectionTableData: [ - { - date: "2016-05-02", - name: "王小虎", - address: "上海市普陀区金沙江路 1518 弄", - }, - { - date: "2016-05-04", - name: "王小虎", - address: "上海市普陀区金沙江路 1517 弄", - }, - { - date: "2016-05-01", - name: "王小虎", - address: "上海市普陀区金沙江路 1519 弄", - }, - { - date: "2016-05-03", - name: "王小虎", - address: "上海市普陀区金沙江路 1516 弄", - }, - ], + InspectionTableData: [], upload: { // 是否显示弹出层(用户导入) open: false, @@ -983,9 +898,17 @@ export default { // label: "name", // }, // listByEqIdAndChanneData: [], - pointDialogDataName:{}, - pointDialogShow:false, - dialogProp:{} + pointDialogDataName: "", + pointDialogShow: false, + dialogProp: {}, + presetList: [], + changeCurrentRowData: {}, + dialogChannelImg: false, + dialogChannelImgSrc: "", + eqpbookListQuery: { + pageNum: 1, + pageSize: 10, + }, }; }, mounted() { @@ -1039,11 +962,26 @@ export default { }, changeCurrentRow(row) { - this.dialogProp=row; + this.dialogProp = row; this.currentRowId = row.id; // 更新当前点击的行ID - this.RightBtnShow=false + this.RightBtnShow = false; this.rowStyle(row); + this.changeCurrentRowData = { + patrolpointId: row.patrolpointId, + }; + this.getPresetListFn(); + }, + getPresetListFn() { + getPresetList(this.changeCurrentRowData).then((res) => { + if (res.code == 200) { + this.presetList = res.data; + if (res.data.length != 0) { + this.RightBtnShow = true; + } + } + }); }, + // 更改选中行背景色 rowStyle(row) { if (this.name === row.name) { @@ -1081,7 +1019,6 @@ export default { this.bindingMonitorPointDialogVisible = false; }, bindingMonitorBtn(type) { - if (type == 0) { // 绑定可见光监测点 // this.bindingMonitorPointTitle = this.$t( @@ -1095,7 +1032,6 @@ export default { this.pointDialogDataName = this.$t( "site_management.BindVisibleLightMonitoringPoints" ); - } else { // this.bindingMonitorPointTitle = this.$t( // "site_management.BindThermalImagingMonitoringPoints" @@ -1104,42 +1040,23 @@ export default { "site_management.BindThermalImagingMonitoringPoints" ); } - this.pointDialogShow=true; + this.pointDialogShow = true; // this.bindingMonitorPointDialogVisible = true; }, - // clickFun() {}, - // renderHeader(h, { column, $index }, type) { - // let that = this; - // return h("div", [ - // // 列名称 - // h("span", column.label), - // // 按钮 - // h( - // "el-button", - // { - // props: { - // type: "text", - // size: "small", - // }, - // style: "margin-left: 5px;", - // on: { - // click: function () { - // that.clickButton(type); - // }, - // }, - // }, - // this.$t("share.addTo") - // ), - // ]); - // }, - // clickButton(type) { - // console.log("我点击了" + type + "的列"); - // }, + site_videoDialogClose() { + this.pointDialogShow = false; + }, InspectionHandleClose() { this.InspectionDialogVisible = false; }, InspectionBtn() { this.InspectionDialogVisible = true; + eqpbookList(this.eqpbookListQuery).then((res) => { + console.log(res,1111) + if(res.code==200){ + this.InspectionTableData=res.rows + } + }); }, InspectionChangeCurrentRow(row) { this.currentRowId = row.id; // 更新当前点击的行ID @@ -1218,17 +1135,61 @@ export default { }, // 绑定可见光监测点点击树事件 - handleMonitor(e){ + handleMonitor(e) { if (e.eqpbookId) { // console.log(e,'点击了') - listByEqIdAndChannelId({channelCode:e.channelCode,patroldeviceCode:e.patroldeviceCode}).then(res=>{ - console.log(e,'摄像头列表') - if(res.code==200){ - this.listByEqIdAndChanneData=res.data; + listByEqIdAndChannelId({ + channelCode: e.channelCode, + patroldeviceCode: e.patroldeviceCode, + }).then((res) => { + console.log(e, "摄像头列表"); + if (res.code == 200) { + this.listByEqIdAndChanneData = res.data; } - }) + }); } - } + }, + // 解绑 + presetDotEdit(row) { + this.$confirm("确定解绑预置点吗?", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + presetRemove(row.presetPosId).then((res) => { + if (res.code == 200) { + this.getPresetListFn(); + this.$message({ + type: "success", + message: "解绑成功!", + }); + } else { + this.$message({ + type: "error", + message: res.msg, + }); + } + }); + }) + .catch(() => { + this.$message({ + type: "info", + message: "取消解绑", + }); + }); + }, + site_saveDot1() { + this.getPresetListFn(); + }, + // 查看快照 + presetDotImg(channelImg) { + this.dialogChannelImg = true; + this.dialogChannelImgSrc = channelImg; + }, + dialogChannelImgHandleClose() { + this.dialogChannelImg = false; + }, }, };