Commit 1f655da3 authored by liuyuping's avatar liuyuping

'2021-12-8'

parent 04c53770
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<script src="https://webapi.amap.com/maps?v=1.4.15&key=bfa930cbec820fc1c16f8f54348f98e3&plugin=Map3D,AMap.DistrictSearch,AMap.Geocoder,AMap.MouseTool,AMap.Autocomplete,AMap.PlaceSearch"></script> <script src="https://webapi.amap.com/maps?v=1.4.15&key=bfa930cbec820fc1c16f8f54348f98e3&plugin=Map3D,AMap.DistrictSearch,AMap.Geocoder,AMap.MouseTool,AMap.Autocomplete,AMap.PlaceSearch"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" /> <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.css" />
<script src="https://cdn.bootcss.com/echarts/4.6.0/echarts.min.js"></script> <script src="https://cdn.bootcss.com/echarts/4.6.0/echarts.min.js"></script>
<script src="https://www.thingjs.com/static/historyVersion/thing.min.js"></script> <script src="https://www.thingjs.com/static/historyVersion/thing.min.js"></script>
<script src="https://www.thingjs.com/static/release/thing.widget.min.js"></script> <script src="https://www.thingjs.com/static/release/thing.widget.min.js"></script>
......
...@@ -29,3 +29,81 @@ export function analyzeAlarmNum(companycode) { ...@@ -29,3 +29,81 @@ export function analyzeAlarmNum(companycode) {
} }
}) })
} }
export function analyzeHDNum(deptId) {
return request5({
url: '/api/hiddenDanger/analyzeNum',
method: 'get',
params: {
deptId
}
})
}
export function sensorAlarmNum(deptId) {
return request5({
url: '/api/sensor/analyzeAlarmNum',
method: 'get',
params: {
deptId
}
})
}
export function createInfoCard(deptId) {
return request5({
url: '/api/alarm/createInfoCard',
method: 'get',
params: {
deptId
}
})
}
// 隐患趋势
export function analyzeOutputTrend() {
return request5({
url: '/api/output/analyzeOutputTrend',
method: 'get'
})
}
// 重大安全隐患统计
export function analyzeEachMonthNum(level) {
return request5({
url: '/api/hiddenDanger/analyzeEachMonthNum',
method: 'get',
params: {
level
}
})
}
// 企业- 分析各等级风险数量
export function analyzeEnterRiskNum(deptId) {
return request5({
url: '/api/dept/analyzeEachRiskLevelNum',
method: 'get',
params: {
deptId
}
})
}
// 行业- 分析各等级风险数量
export function analyzeIndusRiskNum(detailId) {
return request5({
url: '/api/dictDetail/analyzeEachRiskLevelNum',
method: 'get',
params: {
detailId
}
})
}
// 区域- 分析各等级风险数量
export function analyzeRegionRiskNum() {
return request5({
url: '/api/areaRiskLevel/analyzeEachRiskLevelNum',
method: 'get'
})
}
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="big-data-chart1"> <div class="big-data-chart1">
<div class="alarm-sum-wrapper"> <div class="alarm-sum-wrapper">
<div>设备总数量</div> <div>设备总数量</div>
<div>378</div> <div>{{sensorSum}}</div>
</div> </div>
<div class="big-data-chart1-alarm1"></div> <div class="big-data-chart1-alarm1"></div>
</div> </div>
...@@ -52,22 +52,24 @@ ...@@ -52,22 +52,24 @@
<script> <script>
import { dictDetail } from '@/api/index.js' import { dictDetail } from '@/api/index.js'
import { sensorAlarmNum, analyzeOutputTrend, analyzeHDNum, analyzeIndusRiskNum } from '@/api/operatePortrait.js'
export default { export default {
data() { data() {
return { return {
curIndus: [], curIndus: [],
curChosenIndus: '煤矿' curChosenIndus: '煤矿',
sensorSum: 0
} }
}, },
mounted() { async mounted() {
dictDetail({ await dictDetail({
page: 0, page: 0,
size: 999, size: 999,
sort: 'id,desc', sort: 'id,desc',
dictName: '所属行业' dictName: '所属行业'
}).then(res => { }).then(res => {
console.log(res, 'dictDetail dictDetail dictDetail')
this.curIndus = res.content.filter(item => item.createBy==='admin') this.curIndus = res.content.filter(item => item.createBy==='admin')
console.log(this.curIndus, 'this.curIndus _________ this.curIndus')
}) })
this.init1() this.init1()
this.init3() this.init3()
...@@ -75,7 +77,14 @@ export default { ...@@ -75,7 +77,14 @@ export default {
this.init7() this.init7()
}, },
methods: { methods: {
init1() { async init1() {
let alarmNum = 0
let normalNum = 0
await sensorAlarmNum(this.$store.state.compony_info.id).then(res => {
alarmNum = res.alarmNum
normalNum = res.normalNum
this.sensorSum = res.totalNum
})
const targetDom = document.querySelector('.big-data-chart1-alarm1') const targetDom = document.querySelector('.big-data-chart1-alarm1')
const mychart = echarts.init(targetDom) const mychart = echarts.init(targetDom)
const option = { const option = {
...@@ -107,11 +116,11 @@ export default { ...@@ -107,11 +116,11 @@ export default {
}, },
data: [ data: [
{ {
value: 178, value: normalNum,
name: '在线设备' name: '在线设备'
}, },
{ {
value: 200, value: alarmNum,
name: '离线设备' name: '离线设备'
} }
] ]
...@@ -120,237 +129,234 @@ export default { ...@@ -120,237 +129,234 @@ export default {
} }
mychart.setOption(option) mychart.setOption(option)
}, },
init3() { async init3() {
const targetDom = document.querySelector('.big-data-chart3'); await analyzeOutputTrend().then(res => {
const mychart = echarts.init(targetDom) let myRenderTime = []
const option = { let curMaxSize = 0;
color: ["#E74C3C", "#F39C12", "#ECF0F1", "#9B59B6", "#2ECC71"], let curIndex = 0;
tooltip: { res.forEach((item, index) => {
trigger: "axis" if (item.monthOutputDtos.length > curMaxSize) {
}, curMaxSize = item.monthOutputDtos.length
grid: { curIndex = index
left: '10%',
top: '15%',
bottom: '10%',
right: '10%'
},
xAxis: {
type: "category",
name: '时间',
nameTextStyle: {
color: '#ffffff'
},
axisLabel: {
color: "#FFF"
},
data: ['2021-1','2021-2','2021-3','2021-4']
},
yAxis: {
type: "value",
name: '产量',
axisLine: {
show: false
},
nameTextStyle: {
color: '#ffffff'
},
splitLine: {
show: true,
lineStyle: {
color: "rgba(255,255,255,.1)"
}
},
axisLabel: {
color: "#fff"
} }
}, })
series: [ myRenderTime = res[curIndex].monthOutputDtos.map(item => item.ym)
{ const targetDom = document.querySelector('.big-data-chart3');
type: 'line', const mychart = echarts.init(targetDom)
name: '非煤矿山', const option = {
smooth: true, color: ["#E74C3C", "#F39C12", "#ECF0F1", "#9B59B6", "#2ECC71"],
symbol: 'none', tooltip: {
data: [20, 50, 80, 10] trigger: "axis"
}, },
{ grid: {
type: 'line', left: '10%',
name: '煤矿', top: '15%',
smooth: true, bottom: '10%',
symbol: 'none', right: '10%'
data: [10, 90, 20, 70]
}, },
{ xAxis: {
type: 'line', type: "category",
name: '危险化学品企业', name: '时间',
smooth: true, nameTextStyle: {
symbol: 'none', color: '#ffffff'
data: [80, 30, 10, 50] },
axisLabel: {
color: "#FFF"
},
data: myRenderTime
}, },
{ yAxis: {
type: 'line', type: "value",
name: '冶金工贸', name: '产量',
smooth: true, axisLine: {
symbol: 'none', show: false
data: [0, 0, 0, 0] },
} nameTextStyle: {
] color: '#ffffff'
} },
mychart.setOption(option) splitLine: {
}, show: true,
init5() { lineStyle: {
const targetDom = document.querySelector('.big-data-chart5') color: "rgba(255,255,255,.1)"
const mychart = echarts.init(targetDom) }
const option = {
title: {
text: "总数量",
subtext: "" + 0,
left: "center",
top: "40%",
textStyle: {
color: "#F88F12",
fontSize: "20"
}, },
subtextStyle: { axisLabel: {
color: "#F88F12", color: "#fff"
fontSize: "20"
} }
}, },
tooltip: { series: res.map(item => {
trigger: "item" return {
}, type: 'line',
legend: { name: item.industry,
show: false smooth: true,
}, symbol: 'none',
series: [ data: item.monthOutputDtos.map(item => item.output)
{ }
type: "pie", })
radius: ["40%", "78%"], }
avoidLabelOverLap: true, mychart.setOption(option)
data: [ })
{ },
value: 0, async init5() {
name: "重大隐患未闭环", await analyzeHDNum().then(res => {
itemStyle: { console.log(res, 'analyzeHDNum analyzeHDNum analyzeHDNum')
color: "#E74C3C" const targetDom = document.querySelector('.big-data-chart5')
} const mychart = echarts.init(targetDom)
}, const option = {
{ title: {
value: 0, text: "总数量",
name: "重大隐患已闭环", subtext: "" + res.totalNum,
itemStyle: { left: "center",
color: "#FDFA02" top: "40%",
} textStyle: {
}, color: "#F88F12",
], fontSize: "20"
label: { },
align: "left", subtextStyle: {
normal: { color: "#F88F12",
formatter(v) { fontSize: "20"
return `${v.name}\n${v.value}`; }
},
tooltip: {
trigger: "item"
},
legend: {
show: false
},
series: [
{
type: "pie",
radius: ["40%", "78%"],
avoidLabelOverLap: true,
data: [
{
value: res.seriousNotRectifiedNum,
name: "重大隐患未闭环",
itemStyle: {
color: "#E74C3C"
}
},
{
value: res.seriousRectifiedNum,
name: "重大隐患已闭环",
itemStyle: {
color: "#FDFA02"
}
}, },
textStyle: { ],
fontSize: 16 label: {
align: "left",
normal: {
formatter(v) {
return `${v.name}\n${v.value}`;
},
textStyle: {
fontSize: 16
}
} }
},
labelLine: {
length: 3,
length2: 10
} }
},
labelLine: {
length: 3,
length2: 10
} }
} ]
] }
} mychart.setOption(option)
mychart.setOption(option) })
}, },
init7() { async init7() {
let lowNum = Math.floor(Math.random() * 7) await analyzeIndusRiskNum(this.curIndus.filter(item => item.label === this.curChosenIndus)[0].id).then(res => {
let generalNum = Math.floor(Math.random() * 2) let lowNum = res.riskBlueNum
let greaterNum = 0 let generalNum = res.riskYellowNum
let majorNum = 0 let greaterNum = res.riskOrangeNum
let totalNum = lowNum + generalNum let majorNum = res.riskRedNum
const targetDom = document.querySelector('.big-data-chart7') let totalNum = res.totalNum
const mychart = echarts.init(targetDom) const targetDom = document.querySelector('.big-data-chart7')
mychart.clear() const mychart = echarts.init(targetDom)
const option = { mychart.clear()
title: { const option = {
text: "总数量", title: {
subtext: "" + totalNum, text: "总数量",
left: "center", subtext: "" + totalNum,
top: "40%", left: "center",
textStyle: { top: "40%",
color: "#F88F12", textStyle: {
fontSize: "20" color: "#F88F12",
fontSize: "20"
},
subtextStyle: {
color: "#F88F12",
fontSize: "20"
}
}, },
subtextStyle: { tooltip: {
color: "#F88F12", trigger: "item"
fontSize: "20" },
} legend: {
}, show: false
tooltip: { },
trigger: "item" series: [
}, {
legend: { type: "pie",
show: false radius: ["40%", "78%"],
}, avoidLabelOverLap: true,
series: [ data: [
{ {
type: "pie", value: lowNum,
radius: ["40%", "78%"], name: "低风险",
avoidLabelOverLap: true, itemStyle: {
data: [ color: "#057AFD"
{ }
value: lowNum, },
name: "低风险", {
itemStyle: { value: generalNum,
color: "#057AFD" name: "一般风险",
} itemStyle: {
}, color: "#FEFA03"
{ }
value: generalNum,
name: "一般风险",
itemStyle: {
color: "#FEFA03"
}
},
{
value: greaterNum,
name: "较大风险",
itemStyle: {
color: "#F88F12"
}
},
{
value: majorNum,
name: "重大风险",
itemStyle: {
color: "#FF414B"
}
},
],
label: {
align: "left",
normal: {
formatter(v) {
return `${v.name}\n${v.value}`;
}, },
textStyle: { {
fontSize: 16 value: greaterNum,
name: "较大风险",
itemStyle: {
color: "#F88F12"
}
},
{
value: majorNum,
name: "重大风险",
itemStyle: {
color: "#FF414B"
}
},
],
label: {
align: "left",
normal: {
formatter(v) {
return `${v.name}\n${v.value}`;
},
textStyle: {
fontSize: 16
}
} }
},
labelLine: {
length: 3,
length2: 10
} }
},
labelLine: {
length: 3,
length2: 10
} }
} ]
] }
} mychart.setOption(option)
mychart.setOption(option) })
} }
}, },
watch: { watch: {
curChosenIndus(newVal, oldVal) { curChosenIndus(newVal, oldVal) {
console.log(newVal, oldVal, 'curChosenIndus curChosenIndus')
if (newVal !== oldVal) { if (newVal !== oldVal) {
this.init7() this.init7()
} }
......
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
<div class="big-data-chart2-alarm-sum2"> <div class="big-data-chart2-alarm-sum2">
<div class="big-data-chart2-sum"> <div class="big-data-chart2-sum">
<span>报警数量</span> <span>报警数量</span>
<span>324</span> <span>{{sensorAlarmSum}}</span>
</div> </div>
<div class="big-data-chart2-sum"> <div class="big-data-chart2-sum">
<span>解除报警数量</span> <span>解除报警数量</span>
<span>156</span> <span>{{sensorNoAlarmSum}}</span>
</div> </div>
</div> </div>
<div class="big-data-chart2-table-wrapper"> <div class="big-data-chart2-table-wrapper">
...@@ -22,8 +22,16 @@ ...@@ -22,8 +22,16 @@
<span class="big-data-chart2-table-title2">报警状态</span> <span class="big-data-chart2-table-title2">报警状态</span>
<span class="big-data-chart2-table-title3">时间</span> <span class="big-data-chart2-table-title3">时间</span>
</div> </div>
<div class="big-data-chart2-table-content-wrapper"> <div class="big-data-chart2-table-content-wrapper" style="height:20vh">
<div class="big-data-chart2-table-content-item"> <div>
<div v-for="item in alarmContent" :key="item.alarmContent" class="big-data-chart2-table-content-item">
<span>{{item.alarmContent}}</span>
<span>{{item.canceled}}</span>
<span>{{item.alarmTime}}</span>
</div>
</div>
<!-- <div class="big-data-chart2-table-content-item">
<span>监视模块</span> <span>监视模块</span>
<span>已解除</span> <span>已解除</span>
<span>2021-11-21</span> <span>2021-11-21</span>
...@@ -32,7 +40,7 @@ ...@@ -32,7 +40,7 @@
<span>控制模块</span> <span>控制模块</span>
<span style="color: red;">报警</span> <span style="color: red;">报警</span>
<span>2021-11-11</span> <span>2021-11-11</span>
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -77,29 +85,53 @@ ...@@ -77,29 +85,53 @@
<script> <script>
import { dept } from '@/api/index.js' import { dept } from '@/api/index.js'
import { createInfoCard, analyzeEachMonthNum, analyzeEnterRiskNum, analyzeRegionRiskNum } from '@/api/operatePortrait.js'
export default { export default {
data() { data() {
return { return {
curEnterprises: [], curEnterprises: [],
curChosenEnter: '山金白音呼布', curChosenEnter: '山金白音呼布',
isShowCurSelect: false isShowCurSelect: false,
sensorAlarmSum: 0,
sensorNoAlarmSum: 0,
alarmContent: []
} }
}, },
mounted() { async mounted() {
dept().then(res => { await dept().then(res => {
console.log(res, 'bigdataRight bigdataRight bigdataRight bigdataRight')
const toIndex = res.content.map(item => item.name).indexOf('测试企业') const toIndex = res.content.map(item => item.name).indexOf('测试企业')
if (toIndex >= -1) { if (toIndex >= -1) {
res.content.splice(toIndex, 1) res.content.splice(toIndex, 1)
} }
this.curEnterprises = [...res.content] this.curEnterprises = [...res.content]
}) })
createInfoCard(this.$store.state.compony_info.id).then(res => {
this.sensorAlarmSum = res.notCanceledNum
this.sensorNoAlarmSum = res.canceledNum
this.alarmContent = [...res.infoCardDtoAlarmDtos]
})
this.init4() this.init4()
this.init6() this.init6()
this.init8() this.init8()
}, },
methods: { methods: {
init4() { async init4() {
let normalHD = []
let majorHD = []
let xAxisTime = []
await analyzeEachMonthNum('一般隐患').then(res => {
normalHD = [...res]
})
await analyzeEachMonthNum('重大隐患').then(res => {
majorHD = [...res]
})
if (normalHD.length > majorHD.length) {
xAxisTime = normalHD.map(item => item.ym)
} else if (normalHD.length < majorHD.length) {
xAxisTime = majorHD.map(item => item.ym)
} else {
xAxisTime = [...new Set([...normalHD.map(item => item.ym), ...majorHD.map(item => item.ym)])]
}
const targetDom = document.querySelector('.big-data-chart4'); const targetDom = document.querySelector('.big-data-chart4');
const mychart = echarts.init(targetDom) const mychart = echarts.init(targetDom)
const option = { const option = {
...@@ -122,7 +154,7 @@ export default { ...@@ -122,7 +154,7 @@ export default {
axisLabel: { axisLabel: {
color: "#FFF" color: "#FFF"
}, },
data: ['2021-1','2021-2','2021-3','2021-4'] data: xAxisTime
}, },
yAxis: { yAxis: {
type: "value", type: "value",
...@@ -144,185 +176,204 @@ export default { ...@@ -144,185 +176,204 @@ export default {
} }
}, },
series: [ series: [
{
name: '一般隐患',
type: 'bar',
stack: 'total',
data: normalHD.map(item => item.num)
},
{ {
name: '重大隐患', name: '重大隐患',
type: 'bar', type: 'bar',
stack: 'total', stack: 'total',
data: [0, 0, 0, 0] data: majorHD.map(item => item.num)
} }
] ]
} }
mychart.setOption(option) mychart.setOption(option)
}, },
init6() { async init6() {
let lowNum = Math.floor(Math.random() * 6) await analyzeEnterRiskNum(this.curEnterprises.filter(item => item.name === this.curChosenEnter)[0].id).then(res => {
let generalNum = Math.floor(Math.random() * 1) console.log(res, 'ananlyzeEnterRiskNum _____________ analyzeEnterRiskNum')
let greaterNum = 0 let lowNum = res.riskBlueNum
let majorNum = 0 let generalNum = res.riskYellowNum
let totalNum = lowNum + generalNum let greaterNum = res.riskOrangeNum
let majorNum = res.riskRedNum
const targetDom = document.querySelector('.big-data-chart6') let totalNum = res.totalNum
const mychart = echarts.init(targetDom)
mychart.clear(); const targetDom = document.querySelector('.big-data-chart6')
const option = { const mychart = echarts.init(targetDom)
title: { mychart.clear();
text: "总数量", const option = {
subtext: "" + totalNum, title: {
left: "center", text: "总数量",
top: "40%", subtext: "" + totalNum,
textStyle: { left: "center",
color: "#F88F12", top: "40%",
fontSize: "20" textStyle: {
color: "#F88F12",
fontSize: "20"
},
subtextStyle: {
color: "#F88F12",
fontSize: "20"
}
}, },
subtextStyle: { tooltip: {
color: "#F88F12", trigger: "item"
fontSize: "20" },
} legend: {
}, show: false
tooltip: { },
trigger: "item" series: [
}, {
legend: { type: "pie",
show: false radius: ["40%", "78%"],
}, avoidLabelOverLap: true,
series: [ data: [
{ {
type: "pie", value: lowNum,
radius: ["40%", "78%"], name: "低风险",
avoidLabelOverLap: true, itemStyle: {
data: [ color: "#057AFD"
{ }
value: lowNum, },
name: "低风险", {
itemStyle: { value: generalNum,
color: "#057AFD" name: "一般风险",
} itemStyle: {
}, color: "#FEFA03"
{ }
value: generalNum,
name: "一般风险",
itemStyle: {
color: "#FEFA03"
}
},
{
value: greaterNum,
name: "较大风险",
itemStyle: {
color: "#F88F12"
}
},
{
value: majorNum,
name: "重大风险",
itemStyle: {
color: "#FF414B"
}
},
],
label: {
align: "left",
normal: {
formatter(v) {
return `${v.name}\n${v.value}`;
}, },
textStyle: { {
fontSize: 16 value: greaterNum,
name: "较大风险",
itemStyle: {
color: "#F88F12"
}
},
{
value: majorNum,
name: "重大风险",
itemStyle: {
color: "#FF414B"
}
},
],
label: {
align: "left",
normal: {
formatter(v) {
return `${v.name}\n${v.value}`;
},
textStyle: {
fontSize: 16
}
} }
},
labelLine: {
length: 3,
length2: 10
} }
},
labelLine: {
length: 3,
length2: 10
} }
} ]
] }
} mychart.setOption(option)
mychart.setOption(option) })
console.log(this.curChosenEnter, 'this.curChosenEnter this.curChosenEnter')
console.log(this.curEnterprises, 'this.curEnterprises this.curEnterprises')
}, },
init8() { async init8() {
const targetDom = document.querySelector('.big-data-chart8') await analyzeRegionRiskNum().then(res => {
const mychart = echarts.init(targetDom) console.log(res, 'analyzeRegionRiskNum _____ annlyzeRegionRiskNum')
const option = { let lowNum = res.riskBlueNum
title: { let generalNum = res.riskYellowNum
text: "总数量", let greaterNum = res.riskOrangeNum
subtext: "" + 44, let majorNum = res.riskRedNum
left: "center", let totalNum = res.totalNum
top: "40%", const targetDom = document.querySelector('.big-data-chart8')
textStyle: { const mychart = echarts.init(targetDom)
color: "#F88F12", const option = {
fontSize: "20" title: {
text: "总数量",
subtext: "" + totalNum,
left: "center",
top: "40%",
textStyle: {
color: "#F88F12",
fontSize: "20"
},
subtextStyle: {
color: "#F88F12",
fontSize: "20"
}
}, },
subtextStyle: { tooltip: {
color: "#F88F12", trigger: "item"
fontSize: "20" },
} legend: {
}, show: false
tooltip: { },
trigger: "item" series: [
}, {
legend: { type: "pie",
show: false radius: ["40%", "78%"],
}, avoidLabelOverLap: true,
series: [ data: [
{ {
type: "pie", value: lowNum,
radius: ["40%", "78%"], name: "低风险",
avoidLabelOverLap: true, itemStyle: {
data: [ color: "#057AFD"
{ }
value: 32, },
name: "低风险", {
itemStyle: { value: generalNum,
color: "#057AFD" name: "一般风险",
} itemStyle: {
}, color: "#FEFA03"
{ }
value: 12, },
name: "一般风险", {
itemStyle: { value: greaterNum,
color: "#FEFA03" name: "较大风险",
} itemStyle: {
}, color: "#F88F12"
{ }
value: 0,
name: "较大风险",
itemStyle: {
color: "#F88F12"
}
},
{
value: 0,
name: "重大风险",
itemStyle: {
color: "#FF414B"
}
},
],
label: {
align: "left",
normal: {
formatter(v) {
return `${v.name}\n${v.value}`;
}, },
textStyle: { {
fontSize: 16 value: majorNum,
name: "重大风险",
itemStyle: {
color: "#FF414B"
}
},
],
label: {
align: "left",
normal: {
formatter(v) {
return `${v.name}\n${v.value}`;
},
textStyle: {
fontSize: 16
}
} }
},
labelLine: {
length: 3,
length2: 10
} }
},
labelLine: {
length: 3,
length2: 10
} }
} ]
] }
} mychart.setOption(option)
mychart.setOption(option) })
} }
}, },
watch: { watch: {
curChosenEnter(newVal, oldVal) { curChosenEnter(newVal, oldVal) {
console.log(newVal, oldVal, 'curChosenEnter curChosenEnter')
if (newVal !== oldVal) { if (newVal !== oldVal) {
this.init6() this.init6()
} }
...@@ -347,6 +398,10 @@ export default { ...@@ -347,6 +398,10 @@ export default {
} */ } */
</style> </style>
<style lang="scss"> <style lang="scss">
.big-data2 {
height: 33.33%;
overflow: hidden;
}
.to-right-top-select { .to-right-top-select {
position: absolute; position: absolute;
right: 0; right: 0;
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</template> </template>
<script> <script>
import { monitorDevice, monitorData, analyzeAlarmNum } from '@/api/operatePortrait.js' import { monitorDevice, monitorData, analyzeAlarmNum, analyzeHDNum } from '@/api/operatePortrait.js'
export default { export default {
data() { data() {
return { return {
...@@ -99,22 +99,27 @@ export default { ...@@ -99,22 +99,27 @@ export default {
}, },
async mounted() { async mounted() {
console.log(this.$store.state.compony_info.companycode, 'this.$store.state.compony_info.companycode') console.log(this.$store.state.compony_info.companycode, 'this.$store.state.compony_info.companycode')
// await monitorDevice(this.$store.state.compony_info.id).then(res => { await monitorDevice(this.$store.state.compony_info.id).then(res => {
// this.offline = res.offlineNum + '' this.offline = res.offlineNum + ''
// this.online = res.onlineNum + '' this.online = res.onlineNum + ''
// this.deviceSum = res.totalNum + '' this.deviceSum = res.totalNum + ''
// }) })
// await monitorData(this.$store.state.compony_info.companycode).then(res => { await monitorData(this.$store.state.compony_info.companycode).then(res => {
// this.monitorSum = (res.monitorStationNum? res.monitorStationNum: '0') + '' this.monitorSum = (res.monitorStationNum? res.monitorStationNum: '0') + ''
// this.monitorData = (res.monitorDataNum? res.monitorDataNum : '0') + '' this.monitorData = (res.monitorDataNum? res.monitorDataNum : '0') + ''
// this.alarmSum = (res.alarmNum? res.alarmNum : '0') + '' this.alarmSum = (res.alarmNum? res.alarmNum : '0') + ''
// this.timeSum = (res.monitorDays? res.monitorDays : '0') + '' this.timeSum = (res.monitorDays? res.monitorDays : '0') + ''
// }) })
// await analyzeAlarmNum(this.$store.state.compony_info.companycode).then(res => { await analyzeAlarmNum(this.$store.state.compony_info.companycode).then(res => {
// this.lowRisk = (res.yellowNum? res.yellowNum : '0') + '' this.lowRisk = (res.yellowNum? res.yellowNum : '0') + ''
// this.generalRisk = (res.orangeNum? res.orangeNum : '0') + '' this.generalRisk = (res.orangeNum? res.orangeNum : '0') + ''
// this.greaterRisk = (res.redNum? res.redNum : '0') + '' this.greaterRisk = (res.redNum? res.redNum : '0') + ''
// }) })
await analyzeHDNum(this.$store.state.compony_info.id).then(res => {
console.log(res, 'analyzeHDNum analyzeHDNum')
this.noCloseLoop = res.seriousNotRectifiedNum
this.closeLoop = res.seriousRectifiedNum
})
this.mineMethod = this.$store.state.compony_info.mine this.mineMethod = this.$store.state.compony_info.mine
this.area = this.$store.state.compony_info.area this.area = this.$store.state.compony_info.area
this.yields = this.$store.state.compony_info.capacity this.yields = this.$store.state.compony_info.capacity
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment