修复小bug
This commit is contained in:
parent
c04b3e4908
commit
f2ab33a2ce
|
|
@ -58,13 +58,13 @@
|
||||||
<span class="in1con_lf_moreimg" @click="zdinfor">介绍>></span>
|
<span class="in1con_lf_moreimg" @click="zdinfor">介绍>></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="jczcov">
|
<div class="jczcov">
|
||||||
<div class="switchLive">
|
|
||||||
<span v-show="!currentPlayerLive" @click="switchLive(true)">录播</span>
|
|
||||||
<span v-show="currentPlayerLive" @click="switchLive(false)">直播</span>
|
|
||||||
</div>
|
|
||||||
<el-carousel width="100%" arrow="always" :interval="5000">
|
<el-carousel width="100%" arrow="always" :interval="5000">
|
||||||
<el-carousel-item class="jczcov_lf" v-for="value in stationDetail.deviceList" :key="value.id">
|
<el-carousel-item class="jczcov_lf" v-for="value in stationDetail.deviceList" :key="value.id">
|
||||||
<div class="jczimg" :id="value.deployCode"></div>
|
<div class="switchLive">
|
||||||
|
<span v-show="!currentPlayerLive[value.deployCode]" @click="switchLive(true, value.deployCode)">录播</span>
|
||||||
|
<span v-show="currentPlayerLive[value.deployCode]" @click="switchLive(false, value.deployCode)">直播</span>
|
||||||
|
</div>
|
||||||
|
<div class="jczimg" :id="'ezplayer' + value.deployCode"></div>
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</el-carousel>
|
</el-carousel>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -466,7 +466,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
stationList:[],
|
stationList:[],
|
||||||
currentPlayerLive: true,
|
currentPlayerLive: {},
|
||||||
singleEchartDialogShowFlag: false,
|
singleEchartDialogShowFlag: false,
|
||||||
singleEchartData: null,
|
singleEchartData: null,
|
||||||
stationCode: '',
|
stationCode: '',
|
||||||
|
|
@ -490,8 +490,7 @@ export default {
|
||||||
fullscreen: false, //全屏
|
fullscreen: false, //全屏
|
||||||
qczddialogTableVisible: false,
|
qczddialogTableVisible: false,
|
||||||
waterData: {},
|
waterData: {},
|
||||||
summryAllData: null,
|
summryAllDataJson: null,
|
||||||
echartIndex: 0,
|
|
||||||
maintainLogList: [],
|
maintainLogList: [],
|
||||||
dateType: 'monthDays',
|
dateType: 'monthDays',
|
||||||
dateTypeOptions: [ {
|
dateTypeOptions: [ {
|
||||||
|
|
@ -614,50 +613,32 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeDateType() {
|
changeDateType() {
|
||||||
// this.summryAllData = null;
|
|
||||||
this.initChartData();
|
this.initChartData();
|
||||||
},
|
},
|
||||||
initChartData() {
|
initChartData() {
|
||||||
|
let that = this;
|
||||||
this.riverList = [];
|
this.riverList = [];
|
||||||
this.summryAllData = [];
|
this.summryAllDataJson = {};
|
||||||
getIndexSummry({summrayMode: this.dateType, statsionCode: this.stationCode}).then(res => {
|
getIndexSummry({summrayMode: this.dateType, stationCode: this.stationCode}).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.summryAllData = res.result;
|
res.result.map(item => {
|
||||||
let len = this.summryAllData.length;
|
that.summryAllDataJson[item.stationCode] = item;
|
||||||
// this.summryAllData.map((item1, index) => {
|
});
|
||||||
// if (index % 2 === 0 && item1['datas'] && (index + 1) < len) {
|
this.initEchartDom()
|
||||||
// let data1 = item1['datas'];
|
|
||||||
// let keys = Object.keys(data1);
|
|
||||||
// let data2 = this.summryAllData[index + 1]['datas'];
|
|
||||||
// let data3 = {}
|
|
||||||
// let item3 = JSON.parse(JSON.stringify(item1));
|
|
||||||
// if (data2) {
|
|
||||||
// keys.map(key => {
|
|
||||||
// if (data1[key] instanceof Array) {
|
|
||||||
// data3[key] = []
|
|
||||||
// data1[key].map((itemSub, index) => {
|
|
||||||
// data3[key].push((data2[key][index] - data1[key][index]).toFixed(2))
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// item3['datas'] = data3;
|
|
||||||
// this.riverList.push(item3);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
this.initEchartDom(this.echartIndex)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 折线图数据
|
// 折线图数据
|
||||||
initEchartDom(index, times) {
|
initEchartDom(times) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let domKey = `myChartDiv0`;
|
let domKey = `myChartDiv0`;
|
||||||
let divDom = document.getElementById(domKey);
|
let divDom = document.getElementById(domKey);
|
||||||
if (!divDom) {
|
if (!divDom) {
|
||||||
console.warn('没找到dom,两秒后重试:', domKey, divDom)
|
console.warn('没找到dom,两秒后重试:', domKey, divDom)
|
||||||
if (times !== 2) {
|
if (times !== 2) {
|
||||||
setTimeout(()=>{this.initEchartDom(index,2)}, 1500);
|
setTimeout(() => {
|
||||||
|
this.initEchartDom(2)
|
||||||
|
}, 1500);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -665,7 +646,7 @@ export default {
|
||||||
this.echartObj.dispose();
|
this.echartObj.dispose();
|
||||||
}
|
}
|
||||||
this.echartObj = this.$echarts.init(divDom);
|
this.echartObj = this.$echarts.init(divDom);
|
||||||
let data = this.summryAllData[index];
|
let data = this.summryAllDataJson[this.stationCode];
|
||||||
let dataObj = [];
|
let dataObj = [];
|
||||||
let i = 0;
|
let i = 0;
|
||||||
let colors = [
|
let colors = [
|
||||||
|
|
@ -833,7 +814,8 @@ export default {
|
||||||
this.stationType = res.result.stationType
|
this.stationType = res.result.stationType
|
||||||
this.DetailListAirData = res.result.latestAirData[0]
|
this.DetailListAirData = res.result.latestAirData[0]
|
||||||
//空气数据
|
//空气数据
|
||||||
if (this.DetailListAirData) { }
|
if (this.DetailListAirData) {
|
||||||
|
}
|
||||||
if (this.stationDetail.latestWaterData[0]) { //水数据
|
if (this.stationDetail.latestWaterData[0]) { //水数据
|
||||||
this.stationDetail.latestWaterData.map(item => {
|
this.stationDetail.latestWaterData.map(item => {
|
||||||
if (item.survItem == 'dataWaterTemp') {
|
if (item.survItem == 'dataWaterTemp') {
|
||||||
|
|
@ -853,33 +835,38 @@ export default {
|
||||||
}
|
}
|
||||||
// 土壤数据
|
// 土壤数据
|
||||||
// this.DetailListSoilData = res.result.latestSoilData[0]
|
// this.DetailListSoilData = res.result.latestSoilData[0]
|
||||||
that.currentPlayerLive = false;
|
that.currentPlayerLive = {};
|
||||||
// 监控画面
|
// 监控画面
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.switchLive(true);
|
this.switchLive(true);
|
||||||
}, 2000)
|
}, 2000)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
switchLive(live){
|
switchLive(live, deployCode) {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.stationDetail.deviceList.forEach((item) => {
|
this.stationDetail.deviceList.forEach((item) => {
|
||||||
|
if (!deployCode) {
|
||||||
that.initPlayer(item, live);
|
that.initPlayer(item, live);
|
||||||
|
} else if (deployCode == item.deployCode) {
|
||||||
|
that.initPlayer(item, live);
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initPlayer(itm, live) {
|
initPlayer(itm, live) {
|
||||||
let that = this;
|
let that = this;
|
||||||
if(this.currentPlayerLive === live){
|
if (this.currentPlayerLive[itm.deployCode] === live) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
that.currentPlayerLive = live;
|
that.currentPlayerLive[itm.deployCode] = live;
|
||||||
if (that.player[itm.deployCode]) {
|
if (that.player[itm.deployCode]) {
|
||||||
that.player[itm.deployCode].stop();
|
that.player[itm.deployCode].stop();
|
||||||
that.player[itm.deployCode].destroy();
|
that.player[itm.deployCode].destroy();
|
||||||
}
|
}
|
||||||
that.player[itm.deployCode] = new EZUIKit.EZUIKitPlayer({
|
that.player[itm.deployCode] = new EZUIKit.EZUIKitPlayer({
|
||||||
id: itm.deployCode,
|
id: 'ezplayer' + itm.deployCode,
|
||||||
accessToken: itm.ysToken,
|
accessToken: itm.ysToken,
|
||||||
url: itm.deviceUrl,
|
url: itm.deviceUrl || itm.deviceIotUrl,
|
||||||
template: live ? "pcLive" : "pcRec", // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
|
template: live ? "pcLive" : "pcRec", // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
|
||||||
audio: false, // 是否默认开启声音 0 - 关闭 1 - 开启
|
audio: false, // 是否默认开启声音 0 - 关闭 1 - 开启
|
||||||
sound: 0,
|
sound: 0,
|
||||||
|
|
@ -2533,6 +2520,7 @@ a:hover {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.wucanshuDiv {
|
.wucanshuDiv {
|
||||||
width: 144px;
|
width: 144px;
|
||||||
height: 104px;
|
height: 104px;
|
||||||
|
|
@ -2541,6 +2529,7 @@ a:hover {
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.wucanshuValueDiv {
|
.wucanshuValueDiv {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-family: HYChangLiSongKeBen, sans-serif;
|
font-family: HYChangLiSongKeBen, sans-serif;
|
||||||
|
|
@ -2552,17 +2541,20 @@ a:hover {
|
||||||
padding-left: 27px;
|
padding-left: 27px;
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.typeStyle {
|
.typeStyle {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wucanshuValueDiv:hover {
|
.wucanshuValueDiv:hover {
|
||||||
color: #f4d877;
|
color: #f4d877;
|
||||||
font-size: 29px;
|
font-size: 29px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wucanshuDiv:hover {
|
.wucanshuDiv:hover {
|
||||||
color: #f4d877 !important;
|
color: #f4d877 !important;
|
||||||
font-size: 29px !important;
|
font-size: 29px !important;
|
||||||
|
|
@ -2576,6 +2568,7 @@ a:hover {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.maintainLog {
|
.maintainLog {
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 28px;
|
bottom: 28px;
|
||||||
|
|
@ -2585,6 +2578,7 @@ a:hover {
|
||||||
background-origin: border-box;
|
background-origin: border-box;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
color: white;
|
color: white;
|
||||||
|
|
||||||
.maintainLogContent {
|
.maintainLogContent {
|
||||||
padding-left: 74px;
|
padding-left: 74px;
|
||||||
//padding-top: 8px;
|
//padding-top: 8px;
|
||||||
|
|
@ -2594,28 +2588,40 @@ a:hover {
|
||||||
text-overflow: ellipsis; /* 显示省略号 */
|
text-overflow: ellipsis; /* 显示省略号 */
|
||||||
white-space: nowrap; /* 禁止换行 */
|
white-space: nowrap; /* 禁止换行 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.maintainLogPerson {
|
.maintainLogPerson {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.maintainLogTime {
|
.maintainLogTime {
|
||||||
padding-left: 74px;
|
padding-left: 74px;
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
color: #bcbbbb;
|
color: #bcbbbb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-timeline-item__tail {
|
.el-timeline-item__tail {
|
||||||
border-left-color: rgb(71 105 172) !important;
|
border-left-color: rgb(71 105 172) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTypeEchart2 {
|
.dataTypeEchart2 {
|
||||||
left: 246px;
|
left: 246px;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switchLive {
|
.switchLive {
|
||||||
position: absolute; cursor:pointer; top: 68px;right: 16px;color: rgb(255, 255, 255);z-index: 500;
|
position: absolute;
|
||||||
|
cursor: pointer;
|
||||||
|
top: 2px;
|
||||||
|
right: 16px;
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
z-index: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switchLive:hover {
|
.switchLive:hover {
|
||||||
color: rgb(236, 196, 23);
|
color: rgb(236, 196, 23);
|
||||||
}
|
}
|
||||||
|
|
||||||
.switchStation {
|
.switchStation {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 450px;
|
right: 450px;
|
||||||
|
|
@ -2623,6 +2629,7 @@ a:hover {
|
||||||
z-index: 2000;
|
z-index: 2000;
|
||||||
width: 180px
|
width: 180px
|
||||||
}
|
}
|
||||||
|
|
||||||
.xuqingchuli {
|
.xuqingchuli {
|
||||||
.in1con_lf_tit {
|
.in1con_lf_tit {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -2631,6 +2638,7 @@ a:hover {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.in1con_lf_titshow {
|
.in1con_lf_titshow {
|
||||||
font-size: 1vw;
|
font-size: 1vw;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
@ -2645,15 +2653,18 @@ a:hover {
|
||||||
margin-top: 1vw;
|
margin-top: 1vw;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qxfwzcl_left {
|
.qxfwzcl_left {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qxfwzcl_rit {
|
.qxfwzcl_rit {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
float: right;
|
float: right;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qxfwzcl_left_tit {
|
.qxfwzcl_left_tit {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 1.4vw;
|
height: 1.4vw;
|
||||||
|
|
@ -2665,6 +2676,7 @@ a:hover {
|
||||||
padding-left: 0.6vw;
|
padding-left: 0.6vw;
|
||||||
font-size: 0.7vw;
|
font-size: 0.7vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qxfwzcl_left_num {
|
.qxfwzcl_left_num {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -2674,6 +2686,7 @@ a:hover {
|
||||||
margin-top: 0.2vw;
|
margin-top: 0.2vw;
|
||||||
margin-bottom: 1vw;
|
margin-bottom: 1vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.in1con_lf_imglf_num_jix {
|
.in1con_lf_imglf_num_jix {
|
||||||
font-size: 1.5vw;
|
font-size: 1.5vw;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
|
|
@ -2689,6 +2702,7 @@ a:hover {
|
||||||
left: 25%;
|
left: 25%;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qxfwzcl_rit_num {
|
.qxfwzcl_rit_num {
|
||||||
font-size: 2vw;
|
font-size: 2vw;
|
||||||
color: #f1ff0d;
|
color: #f1ff0d;
|
||||||
|
|
@ -2697,6 +2711,7 @@ a:hover {
|
||||||
left: 34%;
|
left: 34%;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.png01_iSpt {
|
.png01_iSpt {
|
||||||
width: 150%;
|
width: 150%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue