fix: enp 设备状态查询的优化
This commit is contained in:
parent
2ce50e7bac
commit
aa2a4c136c
|
@ -49,7 +49,7 @@ export const runningStateEnum = new EnumFactory({
|
||||||
20: { text: '待机', type: 'primary' },
|
20: { text: '待机', type: 'primary' },
|
||||||
30: { text: '停机', type: 'warning' },
|
30: { text: '停机', type: 'warning' },
|
||||||
40: { text: '故障', type: 'danger' },
|
40: { text: '故障', type: 'danger' },
|
||||||
50: { text: '未知', type: 'info' },
|
50: { text: '离线', type: 'info' },
|
||||||
}, parseInt)
|
}, parseInt)
|
||||||
|
|
||||||
export const onlingEnum = new EnumFactory({
|
export const onlingEnum = new EnumFactory({
|
||||||
|
|
|
@ -570,8 +570,11 @@ export default {
|
||||||
},
|
},
|
||||||
getChartTime() {
|
getChartTime() {
|
||||||
let endDate = new Date();
|
let endDate = new Date();
|
||||||
|
endDate.setTime(endDate.getTime() - 1000 * 60);
|
||||||
|
endDate.setSeconds(0);
|
||||||
let startDate = new Date();
|
let startDate = new Date();
|
||||||
startDate.setTime(endDate.getTime() - 1000 * 3600 * 6);
|
startDate.setTime(endDate.getTime() - 1000 * 3600 * 6);
|
||||||
|
startDate.setSeconds(0);
|
||||||
console.log(tool.dateFormat1(startDate), tool.dateFormat1(endDate));
|
console.log(tool.dateFormat1(startDate), tool.dateFormat1(endDate));
|
||||||
let params = {
|
let params = {
|
||||||
query: {
|
query: {
|
||||||
|
@ -681,7 +684,6 @@ export default {
|
||||||
type: item.cate_code,
|
type: item.cate_code,
|
||||||
cate_code: item.cate_code,
|
cate_code: item.cate_code,
|
||||||
state: item.running_state,
|
state: item.running_state,
|
||||||
is_online: item.is_online,
|
|
||||||
};
|
};
|
||||||
let config = {
|
let config = {
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -710,7 +712,6 @@ export default {
|
||||||
id = "11111",
|
id = "11111",
|
||||||
type,
|
type,
|
||||||
height,
|
height,
|
||||||
is_online,
|
|
||||||
cate_code,
|
cate_code,
|
||||||
state,
|
state,
|
||||||
} = attrs;
|
} = attrs;
|
||||||
|
@ -731,7 +732,6 @@ export default {
|
||||||
attrs: attrs,
|
attrs: attrs,
|
||||||
id: id,
|
id: id,
|
||||||
type: type,
|
type: type,
|
||||||
is_online: is_online,
|
|
||||||
cate_code: cate_code,
|
cate_code: cate_code,
|
||||||
state: state,
|
state: state,
|
||||||
position: Cesium.Cartesian3.fromDegrees(
|
position: Cesium.Cartesian3.fromDegrees(
|
||||||
|
|
|
@ -431,7 +431,7 @@ export default {
|
||||||
// echarts.connect([myChart, myChart2])
|
// echarts.connect([myChart, myChart2])
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
params['equipment_id'] = this.eqs.id
|
params['equipment_id'] = this.eqs.id
|
||||||
that.$API.bi.dataset.exec.req('eq_status', params).then(res2 => {
|
that.$API.bi.dataset.exec.req('enp_eq_rs', params).then(res2 => {
|
||||||
let newOption2 = Object.assign({}, this.basicOption);
|
let newOption2 = Object.assign({}, this.basicOption);
|
||||||
newOption2.yAxis.minInterval = 1;
|
newOption2.yAxis.minInterval = 1;
|
||||||
newOption2.dataset.source = res2.data.ds0;
|
newOption2.dataset.source = res2.data.ds0;
|
||||||
|
@ -442,7 +442,7 @@ export default {
|
||||||
})
|
})
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
params['equipment_id'] = this.eqz.id
|
params['equipment_id'] = this.eqz.id
|
||||||
that.$API.bi.dataset.exec.req('eq_status', params).then(res3 => {
|
that.$API.bi.dataset.exec.req('enp_eq_rs', params).then(res3 => {
|
||||||
let newOption3 = Object.assign({}, this.basicOption);
|
let newOption3 = Object.assign({}, this.basicOption);
|
||||||
newOption3.yAxis.minInterval = 1;
|
newOption3.yAxis.minInterval = 1;
|
||||||
newOption3.dataset.source = res3.data.ds0;
|
newOption3.dataset.source = res3.data.ds0;
|
||||||
|
|
|
@ -310,14 +310,14 @@ export default {
|
||||||
var bicode = 'enp_edata2'
|
var bicode = 'enp_edata2'
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
var myChart = echarts.getInstanceByDom(document.getElementById('dataChart'));
|
var myChart = echarts.getInstanceByDom(document.getElementById('dataChart'));
|
||||||
bicode = 'eq_status'
|
bicode = 'enp_eq_rs'
|
||||||
myChart.showLoading();
|
myChart.showLoading();
|
||||||
} else if (type == 2) {
|
} else if (type == 2) {
|
||||||
var myChart2 = echarts.getInstanceByDom(document.getElementById('dataChart2'));
|
var myChart2 = echarts.getInstanceByDom(document.getElementById('dataChart2'));
|
||||||
myChart2.showLoading();
|
myChart2.showLoading();
|
||||||
} else if (type == 3) {
|
} else if (type == 3) {
|
||||||
var myChart3 = echarts.getInstanceByDom(document.getElementById('dataChart3'));
|
var myChart3 = echarts.getInstanceByDom(document.getElementById('dataChart3'));
|
||||||
bicode = 'eq_status'
|
bicode = 'enp_eq_rs'
|
||||||
myChart3.showLoading();
|
myChart3.showLoading();
|
||||||
}
|
}
|
||||||
// else {
|
// else {
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<el-tag :type="runningStateEnum[item.running_state]?.type">{{
|
<el-tag :type="runningStateEnum[item.running_state]?.type">{{
|
||||||
runningStateEnum[item.running_state]?.text }}</el-tag>|
|
runningStateEnum[item.running_state]?.text }}</el-tag>|
|
||||||
{{ item.name }} |
|
{{ item.name }} |
|
||||||
运行时间 <span style="font-weight:bold; font-size: 1.6vh">{{ item.total_duration_run
|
运行时间 <span style="font-weight:bold; font-size: 1.6vh">{{ item.duration_run
|
||||||
}}</span> h
|
}}</span> h
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
<div v-if="item.type == 30">
|
<div v-if="item.type == 30">
|
||||||
<div><el-tag :type="runningStateEnum[item.running_state]?.type">{{
|
<div><el-tag :type="runningStateEnum[item.running_state]?.type">{{
|
||||||
runningStateEnum[item.running_state]?.text }}</el-tag>|{{ item.name }} |
|
runningStateEnum[item.running_state]?.text }}</el-tag>|{{ item.name }} |
|
||||||
运行时间 <span style="font-weight:bold; font-size: 1.6vh">{{ item.total_duration_run
|
运行时间 <span style="font-weight:bold; font-size: 1.6vh">{{ item.duration_run
|
||||||
}}</span> h
|
}}</span> h
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-for="item in scope.row.equip_data" v-bind:key="item.id">
|
<div v-for="item in scope.row.equip_data" v-bind:key="item.id">
|
||||||
<div v-if="item.type == 40">
|
<div v-if="item.type == 40">
|
||||||
<div>{{ item.avg_tsp }}
|
<div>TSP均值 {{ item.avg_tsp }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -82,11 +82,16 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="24" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="计算公式">
|
<el-form-item label="计算公式">
|
||||||
<el-input v-model="form.formula" clearable></el-input>
|
<el-input v-model="form.formula" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="调用方法">
|
||||||
|
<el-input v-model="form.func_on_change" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="8" :sm="24">
|
<el-col :md="8" :sm="24">
|
||||||
<el-form-item label="是否启用">
|
<el-form-item label="是否启用">
|
||||||
<el-switch v-model="form.enabled"/>
|
<el-switch v-model="form.enabled"/>
|
||||||
|
|
Loading…
Reference in New Issue