From 3bf26caa2d19285d1594812ada41087283fe267e Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Thu, 10 Aug 2023 18:09:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 1 + src/components/common/Sidebar.vue | 4 + src/router/index.js | 8 + .../monitoringEquipment/SIMCard/index.vue | 154 ----- .../deviceReport/index.vue | 599 ++++++++++++++++++ .../components/parameterSetDialog.vue | 199 +++++- .../components/setschedule.vue | 6 + 7 files changed, 786 insertions(+), 185 deletions(-) delete mode 100644 src/views/management/monitoringEquipment/SIMCard/index.vue create mode 100644 src/views/management/monitoringEquipment/deviceReport/index.vue diff --git a/src/App.vue b/src/App.vue index 2577842..5866cd2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,6 +11,7 @@ export default { return {}; }, mounted() {}, + methods: {}, created() { //new DevicePixelRatio().init(); }, diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue index 3cfdbf5..c62495f 100644 --- a/src/components/common/Sidebar.vue +++ b/src/components/common/Sidebar.vue @@ -106,6 +106,10 @@ export default { index: "/devicePhotoSchedule", title: "拍照时间表设置", }, + { + index: "/deviceReport", + title: "装置报表", + }, // { // index: "/deviceUpgrade", // title: "装置升级", diff --git a/src/router/index.js b/src/router/index.js index 50c18af..ef410e1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -112,6 +112,14 @@ const routes = [ ), meta: { title: "拍照时间表设置", icon: "el-icon-setting" }, }, + { + path: "/deviceReport", + component: () => + import( + /* webpackChunkName: "tabs" */ "../views/management/monitoringEquipment/deviceReport/index.vue" + ), + meta: { title: "装置报表", icon: "el-icon-setting" }, + }, { path: "/imageSettings", diff --git a/src/views/management/monitoringEquipment/SIMCard/index.vue b/src/views/management/monitoringEquipment/SIMCard/index.vue deleted file mode 100644 index 2f8202a..0000000 --- a/src/views/management/monitoringEquipment/SIMCard/index.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - - 新增 - 修改 - 删除 - 查询 - 质保延期 - 导入 - 导入模板下载 - 导出 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.date }} - - - - - - - - - - - - - - - diff --git a/src/views/management/monitoringEquipment/deviceReport/index.vue b/src/views/management/monitoringEquipment/deviceReport/index.vue new file mode 100644 index 0000000..20b2dbc --- /dev/null +++ b/src/views/management/monitoringEquipment/deviceReport/index.vue @@ -0,0 +1,599 @@ + + + + + 装置报表 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + 导出 + + + + + + + + + + + + + + + {{ scope.row.lineName }} + + + + + {{ scope.row.towerName }} + + + + + + + + + + + 移动 + 联通 + 电信 + + + + + + {{ scope.row.isonline ? "在线" : "离线" }} + + + + + + + + + {{ + scope.row.workingDate == null + ? "" + : $moment(scope.row.workingDate).format("yy-MM-DD") + }} + + + + {{ scope.row.isonline ? "在线" : "离线" }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue b/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue index 47154a5..83b3237 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue @@ -8,7 +8,7 @@ @close="handleclose" > - + @@ -39,28 +39,36 @@ - + - + - + + + + - 查询 + 查询 @@ -70,20 +78,27 @@ - - + + - - + + - - + + + + + - 设置 + 设置 @@ -263,7 +278,9 @@ > - 查询 + 查询 @@ -340,11 +357,19 @@ export default { data() { return { isShow: false, - activeName: "1", + activeName: "2", deviceTimeForm: { zztime: "", //装置时间 newzztime: "", //新装置时间 }, + //采样参数 + samplingForm: { + mainTime: "", + sampleCount: "", + sampleFrequency: "", + heartbeatTime: "", + }, + runStatusForm: {}, gpsForm: {}, //gps位置 tabsActive: "first", @@ -373,27 +398,139 @@ export default { this.$refs.videoCaptureref.getRatio(); } }, - setTermFn() { + //装置时间查询 + searchTime() {}, + //装置时间设置 + setTime() {}, + //采样参数查询 + // -act=sampling [0xA4 ] --flag=[Request Set Flag, default is set=1, 0: request] --rf=[Request Flag] --reqtype=[Request Type] --maintime=[Main Time] --samplecount=[Sample Count] --samplingfreq=[Sample Frequency] --heartbeat=[Heartbeat Time] + samplingSearch() { + let params = [ + { + name: "act", + value: "sampling", + }, + { + name: "flag", + value: 0, + }, + { + name: "rf", + value: 15, + }, + { + name: "reqtype", + value: "0xA4", + }, + { + name: "maintime", + value: "", + }, + { + name: "samplecount", + value: "", + }, + { + name: "samplingfreq", + value: "", + }, + { + name: "heartbeat", + value: "", + }, + ]; + this.setTermFn(params); + }, + samplingSet() { + let params = [ + { + name: "act", + value: "sampling", + }, + { + name: "flag", + value: 1, + }, + { + name: "rf", + value: 15, + }, + { + name: "reqtype", + value: "0xA4", + }, + { + name: "maintime", + value: this.samplingForm.maintime, + }, + { + name: "samplecount", + value: this.samplingForm.samplecount, + }, + { + name: "samplingfreq", + value: this.samplingForm.samplingfreq, + }, + { + name: "heartbeat", + value: this.samplingForm.heartbeat, + }, + ]; + this.setTermFn(params); + }, + //装置状态报 + runstatusSearch() { + let params = [ + { + name: "act", + value: "runningstatus", + }, + ]; + this.setTermFn(params); + }, + setTermFn(dataParams) { console.log("点击了统一的接口", "runningstatus"); setTermCamera({ termId: this.rowData.id, - list: [{ name: "act", value: "gpsinfo" }], + list: dataParams, }) .then((res) => { console.log(res); this.requestid = res.data.requestId; this.getinfo(); - // this.timer = window.setInterval(() => { - // this.getinfo(); - // this.i++; - // }, 1000); + this.timer = window.setInterval(() => { + this.getinfo(); + this.i++; + }, 1000); }) .catch((err) => {}); }, getinfo() { getTermCameraRequest({ requestid: this.requestid }) .then((res) => { - console.log(res); + if (res.data.success == 1) { + // && res.data.result == 255 + console.log(JSON.parse(res.data.data)); + this.samplingForm = JSON.parse(res.data.data); + this.i = 0; + this.$message({ + duration: 1500, + showClose: true, + message: "信息已更新", + type: "success", + }); + clearInterval(this.timer); + } else if (this.i > 9) { + this.loading = false; + this.i = 0; + this.$message({ + duration: 1500, + showClose: true, + message: "暂未获取到信息,请稍后再试!!", + type: "warning", + }); + clearInterval(this.timer); + } }) .catch(); }, @@ -463,7 +600,7 @@ export default { }, handleclose() { this.isShow = false; - this.activeName = "1"; + this.activeName = "2"; this.tabsActive = "first"; this.gpsForm = {}; }, @@ -473,7 +610,7 @@ export default {