diff --git a/src/views/management/userEquipment/towerInformation/components/addDialog.vue b/src/views/management/userEquipment/towerInformation/components/addDialog.vue index cc85d8f..cc1ef04 100644 --- a/src/views/management/userEquipment/towerInformation/components/addDialog.vue +++ b/src/views/management/userEquipment/towerInformation/components/addDialog.vue @@ -97,6 +97,8 @@ export default { let formArr = []; formArr.push(this.formdata); console.log(this.formdata); + console.log(this.formdata.name.replace(/——/g, "-")); + this.formdata.name = this.formdata.name.replace(/——/g, "-"); addTowerApi({ list: formArr }) .then((res) => { this.isShow = false; diff --git a/src/views/realTimeMonitor/components/morePicPreveiw.vue b/src/views/realTimeMonitor/components/morePicPreveiw.vue index 1187742..066e047 100644 --- a/src/views/realTimeMonitor/components/morePicPreveiw.vue +++ b/src/views/realTimeMonitor/components/morePicPreveiw.vue @@ -52,6 +52,9 @@ export default { this.isShow = true; console.log(data); this.deviceData = data; + if (data.photoTime == null) { + data.photoTime = new Date().getTime(); + } this.getTerminalPhotoList(data.channelid, data.photoTime, data.termid); }, //获取图片 diff --git a/src/views/stritl/index.vue b/src/views/stritl/index.vue index a1fdfdc..07d3071 100644 --- a/src/views/stritl/index.vue +++ b/src/views/stritl/index.vue @@ -8,21 +8,35 @@ > -->
-

+

装置总数 - {{ termDataNum.totalNum }} + {{ termDataNum.totalNum ? termDataNum.totalNum : 0 }}

-

+

在线数量 - {{ termDataNum.onlineNum }} + {{ + termDataNum.onlineNum ? termDataNum.onlineNum : 0 + }}

-

+

离线率 - {{ (termDataNum.offlinePercent * 100).toFixed(2) }}% + {{ + termDataNum.offlinePercent + ? (termDataNum.offlinePercent * 100).toFixed(2) + : 0 + }}%

- 在线率 - {{ (termDataNum.onlinePercent * 100).toFixed(2) }}% + 在线率 + {{ + termDataNum.onlinePercent + ? (termDataNum.onlinePercent * 100).toFixed(2) + : 0 + }}%

@@ -156,10 +170,13 @@ export default { }, methods: { //查看在线列表 - handleLook() { + handleLook(val) { + console.log(val); this.dialogTableVisible = true; this.exportLoading = true; - getOnlineTerminalList() + getOnlineTerminalList({ + type: val, + }) .then((res) => { console.log(res); this.onLineData = res.data; @@ -234,8 +251,9 @@ export default { getEchart2() { this.$nextTick(() => { console.log(this.termDataNum); - this.$echarts.init(document.getElementById("echart2")).dispose(); - this.myChart2 = this.$echarts.init(document.getElementById("echart2")); + let that = this; + that.$echarts.init(document.getElementById("echart2")).dispose(); + that.myChart2 = this.$echarts.init(document.getElementById("echart2")); let option = { // title: { // text: "装置在线统计", @@ -280,15 +298,23 @@ export default { show: true, }, data: [ - { value: this.termDataNum.onlineNum, name: "在线" }, - { value: this.termDataNum.offlineNum, name: "离线" }, + { value: that.termDataNum.onlineNum, name: "在线" }, + { value: that.termDataNum.offlineNum, name: "离线" }, ], }, ], }; - this.myChart2.setOption(option); + that.myChart2.setOption(option); window.addEventListener("resize", () => { - this.myChart2.resize(); + that.myChart2.resize(); + }); + that.myChart2.on("click", function (params) { + console.log(params); + if (params.name == "在线") { + that.handleLook(1); + } else { + that.handleLook(0); + } }); }); }, @@ -491,6 +517,9 @@ export default { flex-direction: column; justify-content: space-around; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); + &:hover { + cursor: pointer; + } &:first-child { &:hover { cursor: pointer;