From 0b3d2deb37745ea5dce42fa4a18f22a29d2f4a12 Mon Sep 17 00:00:00 2001 From: fei.wang <wf18701153496@163.com> Date: 星期三, 16 四月 2025 09:13:24 +0800 Subject: [PATCH] v2.0.2更新时间4.16 --- src/views/dpdv/dpdv.vue | 215 +++++++++++++++++++++++++++++++---------------------- 1 files changed, 124 insertions(+), 91 deletions(-) diff --git a/src/views/dpdv/dpdv.vue b/src/views/dpdv/dpdv.vue index e01a4ff..d0eb566 100644 --- a/src/views/dpdv/dpdv.vue +++ b/src/views/dpdv/dpdv.vue @@ -77,17 +77,22 @@ @click="monitorvisible = false">鍏抽棴</el-button> <el-divider content-position="right"></el-divider> <!-- <dv-border-box-12 class="monitor" style="position: absolute;z-index: 2004;"> --> - <el-table class="dptable" :data="monitorGridData" height="250" style=" overflow: auto;" > + <el-table class="dptable" :data="monitorGridData" height="250" style=" overflow: auto;"> <el-table-column width="80" property="date" label="缂栧彿"><template slot-scope="scope"> {{ scope.row.tagid }} </template></el-table-column> <el-table-column width="150" property="name" label="鍚嶇О"> <template slot-scope="scope"> {{ scope.row.anchorname }} </template></el-table-column> - <el-table-column width="80" property="address" label="鐘舵��"> <template slot-scope="scope"> - <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span> + <el-table-column width="120" property="address" label="鐘舵��"> <template slot-scope="scope"> + <!-- <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span> <span v-else-if="scope.row.onlie == '0'"><img - src="../../assets/images/offline.png"></span> + src="../../assets/images/offline.png"></span> --> + <span v-if="scope.row.onlie == '1'">鍦ㄧ嚎</span> + <span v-else-if="scope.row.onlie == '0'">绂荤嚎</span> + <span v-else-if="scope.row.onlie == '4'">楂樼簿搴�</span> + <span v-else-if="scope.row.onlie == '6'">瓒呴槇鍊煎憡璀�</span> + <span v-else-if="scope.row.onlie == '7'">闈為珮绮惧害鍛婅</span> </template></el-table-column> <el-table-column width="150" property="address" label="鏃堕棿"> <template slot-scope="scope"> <span>{{ scope.row.addtime }}</span> @@ -96,7 +101,7 @@ <!-- </dv-border-box-12> --> <el-button class="title_right_monitor" type="text" style="color: aliceblue; font-size: 30px;" slot="reference">{{ - monitorNum }}</el-button> + monitorNum }}</el-button> <!-- <span class="title_right_monitor" slot="reference" @click="monitorNumList">{{ monitorNum }}</span> --> </el-popover> @@ -113,10 +118,15 @@ <el-table-column width="150" property="name" label="鍚嶇О"> <template slot-scope="scope"> {{ scope.row.anchorname }} </template></el-table-column> - <el-table-column width="80" property="address" label="鐘舵��"> <template slot-scope="scope"> - <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span> + <el-table-column width="120" property="address" label="鐘舵��"> <template slot-scope="scope"> + <!-- <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span> <span v-else-if="scope.row.onlie == '0'"><img - src="../../assets/images/offline.png"></span> + src="../../assets/images/offline.png"></span> --> + <span v-if="scope.row.onlie == '1'">鍦ㄧ嚎</span> + <span v-else-if="scope.row.onlie == '0'">绂荤嚎</span> + <span v-else-if="scope.row.onlie == '4'">楂樼簿搴�</span> + <span v-else-if="scope.row.onlie == '6'">瓒呴槇鍊煎憡璀�</span> + <span v-else-if="scope.row.onlie == '7'">闈為珮绮惧害鍛婅</span> </template></el-table-column> <el-table-column width="150" property="address" label="鏃堕棿"> <template slot-scope="scope"> <span>{{ scope.row.addtime }}</span> @@ -125,7 +135,7 @@ <!-- </dv-border-box-12> --> <el-button class="title_right_standard" type="text" style="color: aliceblue; font-size: 30px;" slot="reference">{{ - standardNum }}</el-button> + standardNum }}</el-button> <!-- <span class="title_right_standard" slot="reference">{{ standardNum }}</span> --> <!-- <span class="title_right_monitor" @click="monitorNumList">{{ monitorNum }}</span> --> </el-popover> @@ -143,10 +153,16 @@ <el-table-column width="150" property="name" label="鍚嶇О"> <template slot-scope="scope"> {{ scope.row.anchorname }} </template></el-table-column> - <el-table-column width="80" property="address" label="鐘舵��"> <template slot-scope="scope"> - <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span> + <el-table-column width="120" property="address" label="鐘舵��"> <template slot-scope="scope"> + <!-- <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span> <span v-else-if="scope.row.onlie == '0'"><img - src="../../assets/images/offline.png"></span> + src="../../assets/images/offline.png"></span> --> + + <span v-if="scope.row.onlie == '1'">鍦ㄧ嚎</span> + <span v-else-if="scope.row.onlie == '0'">绂荤嚎</span> + <span v-else-if="scope.row.onlie == '4'">楂樼簿搴�</span> + <span v-else-if="scope.row.onlie == '6'">瓒呴槇鍊煎憡璀�</span> + <span v-else-if="scope.row.onlie == '7'">闈為珮绮惧害鍛婅</span> </template></el-table-column> <el-table-column width="150" property="address" label="绂荤嚎鏃堕棿"> <template slot-scope="scope"> <span>{{ scope.row.addtime }}</span> @@ -155,7 +171,7 @@ <!-- </dv-border-box-12> --> <el-button class="title_right_offline" type="text" style="color: aliceblue; font-size: 30px;" slot="reference">{{ - offlineNum }}</el-button> + offlineNum }}</el-button> <!-- <span class="title_right_offline" slot="reference">{{ offlineNum }}</span> --> <!-- <span class="title_right_offline" >{{ offlineNum }}</span> --> <!-- <span class="title_right_monitor" @click="monitorNumList">{{ monitorNum }}</span> --> @@ -177,7 +193,7 @@ <el-table-column width="80" property="address" label="鎶ヨ绫诲瀷"> <template slot-scope="scope"> {{ scope.row.alarmtype }} </template></el-table-column> - <el-table-column width="80" property="address" label="澶勭悊鐘舵��"> <template slot-scope="scope"> + <el-table-column width="80" property="address" label="澶勭悊鐘舵��"> <template slot-scope="scope"> {{ scope.row.status }} </template></el-table-column> <el-table-column width="150" property="address" label="鏃堕棿"> <template slot-scope="scope"> @@ -200,7 +216,7 @@ <!-- </dv-border-box-12> --> <el-button class="title_right_alarm" type="text" style="color: aliceblue; font-size: 30px;" slot="reference">{{ - alarmNum }}</el-button> + alarmNum }}</el-button> <!-- <span class="title_right_alarm" slot="reference">{{ alarmNum }}</span> --> <!-- <span class="title_right_offline" >{{ offlineNum }}</span> --> <!-- <span class="title_right_offline" >{{ offlineNum }}</span> --> @@ -247,14 +263,19 @@ </el-table-column> --> <el-table-column label="璁惧鐘舵��" width="160" align="center"> <template slot-scope="scope"> - <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span> - <span v-else-if="scope.row.onlie == '0'"><img src="../../assets/images/offline.png"></span> + <!-- <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span> + <span v-else-if="scope.row.onlie == '0'"><img src="../../assets/images/offline.png"></span> --> + <span v-if="scope.row.onlie == '1'">鍦ㄧ嚎</span> + <span v-else-if="scope.row.onlie == '0'">绂荤嚎</span> + <span v-else-if="scope.row.onlie == '4'">楂樼簿搴�</span> + <span v-else-if="scope.row.onlie == '6'">瓒呴槇鍊煎憡璀�</span> + <span v-else-if="scope.row.onlie == '7'">闈為珮绮惧害鍛婅</span> </template> </el-table-column> <el-table-column label="鍗槦鏁�" align="center"> <template slot-scope="scope"> - <span>{{ scope.row.gpsnum }}</span> + <span>{{ scope.row.gpsnum+"/"+scope.row.gpsstate }}</span> </template> </el-table-column> <el-table-column label="鍒嗘瀽鏃堕棿" align="center"> @@ -285,13 +306,13 @@ <el-dialog :modal="false" :visible.sync="processingdialogVisible" title="澶勭悊"> - + <el-form ref="dataForm" :model="temp" label-width="120px" label-position="right"> <el-form-item label="搴忓彿"> <el-input v-model="temp.id - " /> + " /> </el-form-item> - <el-form-item label="蹇�熷鐞�" > + <el-form-item label="蹇�熷鐞�"> <el-radio-group v-model="radio" v-removeAriaHidden class="dpradio"> <el-radio :label="3" class="dpradio">鏃犻渶澶勭悊</el-radio> <el-radio :label="6" class="dpradio">璇姤</el-radio> @@ -316,7 +337,7 @@ <!-- 鏌ョ湅瀵硅瘽妗� --> <!-- <el-dialog :modal="false" :visible.sync="dialogVisible" :title="dialogType === 'view' ? '鏌ョ湅' : '鏂板'" custom-class="lineChart"> --> - <!-- <el-form ref="dataForm" :model="temp" label-width="120px" label-position="right"> + <!-- <el-form ref="dataForm" :model="temp" label-width="120px" label-position="right"> <el-form-item label="缂栧彿"> <el-input v-model="temp.tagid" readonly /> </el-form-item> @@ -336,19 +357,22 @@ <el-input v-model="temp.gpsnum" readonly /> </el-form-item> </el-form> --> - - <div class="lineChart" v-if="dialogVisible" style="background-color:rgb(8, 17, 56) ;"> - <span style=" display: flex;justify-content: center;align-items: center;font-size: 25px;margin-top: 20px;"> {{ temp.anchorname+"-" +temp.tagid+"鍙樺寲瓒嬪娍鍥�"}}</span> - - <el-button type="text" class="monitor_left_bnt" - style="position: absolute;right: 20px;top: 0;font-size: 25px;" - @click="dialogVisible = false">鍏抽棴</el-button> - <el-divider content-position="right"></el-divider> - <line-chart :chart-data="lineChartData" height="85%" /> - <!-- <el-button type="primary" @click="dialogVisible = false"> + + <div class="lineChart" v-if="dialogVisible" style="background-color:rgb(8, 17, 56) ;"> + <span + style=" display: flex;justify-content: center;align-items: center;font-size: 25px;margin-top: 20px;"> + {{ + temp.anchorname + "-" + temp.tagid+"鍙樺寲瓒嬪娍鍥�"}}</span> + + <el-button type="text" class="monitor_left_bnt" + style="position: absolute;right: 20px;top: 0;font-size: 25px;" + @click="dialogVisible = false">鍏抽棴</el-button> + <el-divider content-position="right"></el-divider> + <line-chart :chart-data="lineChartData" height="85%" /> + <!-- <el-button type="primary" @click="dialogVisible = false"> 鍏抽棴 </el-button> --> - </div> + </div> <!-- </el-dialog> --> </div> <!-- </dv-full-screen-container> --> @@ -459,7 +483,7 @@ import Pagination from '@/components/Pagination' import drawMixin from "@/utils/drawMixin"; //鑷�傚簲缂╂斁 import { formatTime1 } from "@/utils/index.js"; //鏃ユ湡鏍煎紡杞崲 -import { getList, getEquipment, alldevice, getdevicestate, getsystem,getEquipmentmonitor,getEquipmenttwo } from '@/api/user' +import { getList, getEquipment, alldevice, getdevicestate, getsystem, getEquipmentmonitor, getEquipmenttwo } from '@/api/user' import { deepClone } from '@/utils' import { handlechart2, handlechartupdate3 } from '@/api/analysis' const lineChartData = { @@ -489,7 +513,7 @@ }, data() { return { - month:'', + month: '', barChartData: { tagid: '', ed: [], @@ -553,7 +577,7 @@ offlineNum: 0,//绂荤嚎璁惧 alarmNum: 0,//鎶ヨ鏉℃暟 messageNum: 0,//鎶ユ枃鏉℃暟 - alerttime:'', + alerttime: '', total: 0, dialogVisible: false, dialogType: 'view', @@ -565,7 +589,7 @@ }, created() { console.log(333333333); - + this.fetchData() this.monitordata() }, @@ -574,7 +598,7 @@ const params = { username: localStorage.getItem('username'), phone: localStorage.getItem('phone') }; alldevice(params).then(response => { console.log(response.data.dataList); - + this.initMap(response.data.dataList, response.data.view) }) @@ -693,9 +717,9 @@ fetchData() { const params = { csname: localStorage.getItem('username'), phone: localStorage.getItem('phone') }; getsystem(params).then(response => { - if (response.data.systemname!=null) { + if (response.data.systemname != null) { localStorage.setItem('systemname', response.data.systemname); - }else{ + } else { localStorage.setItem('systemname', response.data.systemname); } this.systemname = response.data.systemname @@ -707,14 +731,14 @@ getEquipmentmonitor(params1).then(response => { console.log(4444444); this.list = response.data -console.log(response); -this.listLoading = false + console.log(response); + this.listLoading = false }) const params2 = { username: localStorage.getItem('username'), phone: localStorage.getItem('phone') }; getEquipmenttwo(params2).then(response => { console.log(5555555555); - this.processBarModel = [] + this.processBarModel = [] // this.list = response.data var json = { edmm: [], @@ -737,7 +761,7 @@ json.winmin = response.data[index].winmin } this.barChartData = json -console.log(response); + console.log(response); }) // getList(this.listQuery).then(response => { @@ -768,6 +792,9 @@ // this.total = response.data.total // this.listLoading = false // }) + setTimeout(() => { + this.fetchData() + }, 10000); }, //鍙充晶鏁版嵁 monitordata() { @@ -784,11 +811,11 @@ this.alarmNum = response.data.alarmNum this.messageNum = response.data.messageNum this.alerttime = response.data.alerttime - + }) setTimeout(() => { this.monitordata() - }, 15000); + }, 10000); }, resetTemp() { this.temp = Object.assign({}, _temp) @@ -801,22 +828,22 @@ var new_year = currentDate.getFullYear(); // 鍙栧綋鍓嶇殑骞翠唤锛堝疄闄呮槸杈撳叆鏃ユ湡鐨勫勾浠斤級 var month = currentDate.getMonth(); // 鑾峰彇鏈堜唤锛�0-11锛� var new_month = month + 1; // 灏嗘湀浠借浆鎹负鍙鐨勬牸寮忥紙1-12锛� - this.month=new_month + this.month = new_month // 鑾峰彇褰撴湀鐨勭涓�澶� var firstDay = new Date(new_year, new_month - 6, 1); // 鏈堜唤闇�瑕佸噺1锛屽洜涓篻etMonth()杩斿洖鐨勬槸0-11 const newDate = formatTime1(firstDay, "yyyy-MM-dd"); //鑾峰彇褰撳墠骞存湀鏃� const dateYear = formatTime1(new Date(), "yyyy-MM-dd"); - const params = { date1: dateYear, date2: newDate, username: localStorage.getItem('username') || '' ,tagid:scope.row.tagid}; + const params = { date1: dateYear, date2: newDate, username: localStorage.getItem('username') || '', tagid: scope.row.tagid }; console.log(params); - + handlechartupdate3(params).then(response => { this.lineChartData = response.data console.log(response.data); this.dialogVisible = true }) this.resetTemp() - + this.dialogType = 'view' this.temp = deepClone(scope.row) // this.$nextTick(() => { @@ -836,26 +863,26 @@ }, //璺宠浆鍚庡彴 backstage() { - - window.open('/#/large/dashboard'); + + window.open('/#/large/dashboard'); // window.open('/dashboard'); // window.open('http://localhost:8084/#/dashboard'); // this.$router.push({ path: '/dashboard' }) }, - //閫�鍑� -// backout() { - backout() { - this.$store.dispatch('user/logout') - this.$router.push(`/login?redirect=${this.$route.fullPath}`) - }, + //閫�鍑� + // backout() { + backout() { + this.$store.dispatch('user/logout') + this.$router.push(`/login?redirect=${this.$route.fullPath}`) + }, // window.open('/#/large/dashboard'); - // window.open('/dashboard'); - // window.open('http://localhost:8084/#/dashboard'); - // this.$router.push({ path: '/dashboard' }) + // window.open('/dashboard'); + // window.open('http://localhost:8084/#/dashboard'); + // this.$router.push({ path: '/dashboard' }) - // }, - + // }, + //褰撳墠鏃堕棿 timeFn() { this.timing = setInterval(() => { @@ -899,7 +926,6 @@ </script> <style lang="scss" scoped> - #index { color: #d3d6dd; // width: 118%; @@ -944,6 +970,7 @@ height: 80px; background: url(../../assets/images/topright.png) no-repeat; } + .right { position: absolute; top: 100px; @@ -1036,16 +1063,17 @@ margin-top: 69px; margin-left: 68px; } - .el-radio__input { - white-space: nowrap; - cursor: pointer; - outline: none; - display: inline-block; - line-height: 1; - position: relative; - vertical-align: middle; -} + .el-radio__input { + white-space: nowrap; + cursor: pointer; + outline: none; + display: inline-block; + line-height: 1; + position: relative; + vertical-align: middle; + + } .title_left_tdmm.el-radio__input.is-checked .el-radio__inner { border-color: #1890ff; @@ -1093,15 +1121,18 @@ background-color: rgb(8, 17, 56); color: #fff; } - .dpradio::v-deep.el-radio__input, .el-radio__input { - white-space: nowrap; - cursor: pointer; - outline: none; - display: inline-block; - line-height: 1; - position: relative; - vertical-align: middle; -} + + .dpradio::v-deep.el-radio__input, + .el-radio__input { + white-space: nowrap; + cursor: pointer; + outline: none; + display: inline-block; + line-height: 1; + position: relative; + vertical-align: middle; + } + // 琛ㄥご杈规 ::v-deep .el-table tr { background-color: transparent !important; @@ -1305,7 +1336,7 @@ margin-left: 280px; } - + .custom-table .el-table__row .el-table_1_column_1 { color: #ffffff; @@ -1320,15 +1351,17 @@ } + .dpradio.el-radio__input { - white-space: nowrap; - cursor: pointer; - outline: none; - display: inline-block; - line-height: 1; - position: relative; - vertical-align: middle; -} + white-space: nowrap; + cursor: pointer; + outline: none; + display: inline-block; + line-height: 1; + position: relative; + vertical-align: middle; + } + .page { // width: 100%; height: 20%; -- Gitblit v1.9.3