Commit 79dd7494 by 前端

Merge branch 'hotfix_v1.50.1' into 'master'

上线合并

See merge request !46
2 parents b4ce31b0 820d663d
...@@ -42,18 +42,18 @@ export default { ...@@ -42,18 +42,18 @@ export default {
drawBarLine() { drawBarLine() {
this.barLineOptions = { this.barLineOptions = {
grid: { grid: {
right: '19%', right: '5%',
left: '15%' left: `${this.linetype == 1 ? '13%' : '5%'}`
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
name: (this.linetype == 1 ? '周' : '天')+(this.lineChartsYear && '\n('+this.lineChartsYear + '年'+')'), // name: (this.linetype == 1 ? '周' : '天')+(this.lineChartsYear && '\n('+this.lineChartsYear + '年'+')'),
// nameLocation: 'center', // nameLocation: 'center',
// nameGap: 20, // nameGap: 20,
nameTextStyle: { // nameTextStyle: {
fontSize: 10, // fontSize: 10,
lineHeight: 16 // lineHeight: 16
}, // },
boundaryGap: false,//坐标轴两边留白 boundaryGap: false,//坐标轴两边留白
data: this.xAxisData, data: this.xAxisData,
axisLabel: { //坐标轴刻度标签的相关设置。 axisLabel: { //坐标轴刻度标签的相关设置。
......
...@@ -254,9 +254,10 @@ export default { ...@@ -254,9 +254,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pie-box { .pie-box {
background: #181C36; background: rgba(24 ,28, 54 ,0.9);
font-weight: 500; font-weight: 500;
font-size: 12px; font-size: 12px;
border-radius: 8px;
color: #A3A4AF; color: #A3A4AF;
text-align: center; text-align: center;
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</el-row> </el-row>
<ul class="monitor-list" style="max-height: calc(100vh - 380px)"> <ul class="monitor-list" style="max-height: calc(100vh - 380px)">
<template v-for="(sn, key) in monitorList.itemArr"> <template v-for="(sn, key) in monitorList.itemArr">
<li class="monitor-list-item" :key="sn" @click="openMapInfoWindow(sn, monitorList[sn].source)" v-if="key !== 'count' && <li class="monitor-list-item" :key="sn" @click="openMapInfoWindow(sn, monitorList[sn].source, monitorList[sn].vid)" v-if="key !== 'count' &&
monitorList[sn] && monitorList[sn] &&
(monitorList[sn].source == monitorFilterType || (monitorList[sn].source == monitorFilterType ||
monitorFilterType == '') monitorFilterType == '')
...@@ -465,7 +465,8 @@ export default { ...@@ -465,7 +465,8 @@ export default {
} }
console.log(list); console.log(list);
let defaultVid = list && list.length ? list[list.length-1].vid : null
localStorage.setItem('vehicleId', defaultVid)
let items = []; let items = [];
items = list.map((item) => { items = list.map((item) => {
return { return {
...@@ -476,6 +477,7 @@ export default { ...@@ -476,6 +477,7 @@ export default {
id: item.id, id: item.id,
source: item.source === "有线" ? "1" : "0", source: item.source === "有线" ? "1" : "0",
sourceType: item.source, sourceType: item.source,
vid: item.vid
}; };
}); });
...@@ -777,6 +779,7 @@ export default { ...@@ -777,6 +779,7 @@ export default {
return false; return false;
} }
this.vidCode = list[0].vid; this.vidCode = list[0].vid;
localStorage.setItem('vehicleId', list && list[0] ? list[0].vid : null)
for (var i = 0, len = list.length; i < len; i++) { for (var i = 0, len = list.length; i < len; i++) {
_this.handleSelect(list[i]); _this.handleSelect(list[i]);
} }
...@@ -819,6 +822,7 @@ export default { ...@@ -819,6 +822,7 @@ export default {
id: item.id, id: item.id,
source: item.source === "有线" ? "1" : "0", source: item.source === "有线" ? "1" : "0",
sourceType: item.source, sourceType: item.source,
vid: item.vid
}); });
} else { } else {
console.log("展开节点", item); console.log("展开节点", item);
...@@ -1168,7 +1172,8 @@ export default { ...@@ -1168,7 +1172,8 @@ export default {
terminate() { terminate() {
this._drawTimeoutId && window.clearTimeout(this._drawTimeoutId); this._drawTimeoutId && window.clearTimeout(this._drawTimeoutId);
}, },
openMapInfoWindow(sn, source) { openMapInfoWindow(sn, source, vid) {
localStorage.setItem('vehicleId', vid)
EventBus.$emit("uiMap.monitor.openInfoWindow", `${sn}:${source}`); EventBus.$emit("uiMap.monitor.openInfoWindow", `${sn}:${source}`);
}, },
downloadTpl() { downloadTpl() {
......
...@@ -534,7 +534,7 @@ MapService.prototype = { ...@@ -534,7 +534,7 @@ MapService.prototype = {
riskBtn.classList.add('resident_btn_hidden'); riskBtn.classList.add('resident_btn_hidden');
} }
riskBtn.onclick = function() { riskBtn.onclick = function() {
let id = info.vidCode || localStorage.getItem('vehicleId'); let id = localStorage.getItem('vehicleId');
queryCode = `vehicleId=${id}` queryCode = `vehicleId=${id}`
mapService.openPage(`#/monitor/alarmAnalysis?${queryCode}`) mapService.openPage(`#/monitor/alarmAnalysis?${queryCode}`)
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!