Merge branch 'v2' of https://e.coding.net/ctcdevteam/ehs/ehs_web into v2
This commit is contained in:
commit
d51041cd20
|
@ -63,14 +63,14 @@
|
|||
<div style="display:flex">
|
||||
<div style="width: 500px">
|
||||
<el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" start-placeholder="开始时间"
|
||||
end-placeholder="结束时间" value-format="YYYY-MM-DD HH:mm:ss" @change="handleQuery" style="width: 100%" />
|
||||
end-placeholder="结束时间" @change="handleQuery" style="width: 100%" />
|
||||
</div>
|
||||
|
||||
<el-select v-model="query.time_bucket" placeholder="周期" style="margin-left:4px" @change="handleQuery">
|
||||
<el-option v-for="item in timeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
<div id="cChart" style="width: 100%; height:400px"></div>
|
||||
<div id="cChart" style="width: 100%; height:400px; margin-top: 16px"></div>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -135,17 +135,13 @@ export default {
|
|||
var now = new Date();
|
||||
var start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 3);
|
||||
let start_ = this.$TOOL.dateFormat(start)
|
||||
let now_ = this.$TOOL.dateFormat(now)
|
||||
this.timeRange = [start_, now_]
|
||||
this.timeRange = [start, now]
|
||||
},
|
||||
rowClick(row) {
|
||||
this.currentEquipmentId = row.equipment;
|
||||
this.currentEquipmentName = row.equipment_name;
|
||||
this.query.equipment_id = row.equipment;
|
||||
this.query.start_time = this.timeRange[0];
|
||||
this.query.end_time = this.timeRange[1];
|
||||
this.$nextTick(() => { this.initChart() })
|
||||
this.$nextTick(() => { this.handleQuery() })
|
||||
|
||||
},
|
||||
initChart() {
|
||||
|
@ -155,12 +151,13 @@ export default {
|
|||
myChart = echarts.init(document.getElementById('cChart'), 'dark');
|
||||
}
|
||||
myChart.showLoading();
|
||||
this.$API.bi.dataset.exec.req('enp_edata', {
|
||||
this.$API.bi.dataset.exec.req('enp_edata2', {
|
||||
query: this.query,
|
||||
raise_exception: true
|
||||
}).then(res => {
|
||||
let newOption = Object.assign({}, this.basicOption);
|
||||
let ds0 = res.data.ds0
|
||||
ds0.pop()
|
||||
let series = []
|
||||
if (ds0) {
|
||||
let ds00 = ds0[0]
|
||||
|
@ -176,8 +173,23 @@ export default {
|
|||
|
||||
},
|
||||
handleQuery() {
|
||||
this.query.start_time = this.timeRange[0]
|
||||
this.query.end_time = this.timeRange[1]
|
||||
let time1 = this.timeRange[0]
|
||||
let time2 = this.timeRange[1]
|
||||
let formatstr = 'yyyy-MM-dd hh:mm:ss'
|
||||
if (this.query.time_bucket == '1 minute') {
|
||||
time2.setTime(time2.getTime() + 1000 * 60);
|
||||
formatstr = 'yyyy-MM-dd hh:mm:00'
|
||||
}
|
||||
else if (this.query.time_bucket == '1 hour') {
|
||||
time2.setTime(time2.getTime() + 1000 * 60 * 60);
|
||||
formatstr = 'yyyy-MM-dd hh:00:00'
|
||||
}
|
||||
else if (this.query.time_bucket == '1 day') {
|
||||
time2.setTime(time2.getTime() + 1000 * 60 * 60 * 24);
|
||||
formatstr = 'yyyy-MM-dd'
|
||||
}
|
||||
this.query.start_time = this.$TOOL.dateFormat(time1, formatstr)
|
||||
this.query.end_time = this.$TOOL.dateFormat(time2, formatstr)
|
||||
this.initChart()
|
||||
}
|
||||
},
|
||||
|
|
|
@ -46,7 +46,8 @@ export default {
|
|||
"hour": 15,
|
||||
"year": 2024,
|
||||
"month": 1,
|
||||
"metric": "dust_rtd"
|
||||
"metric": "dust_rtd",
|
||||
"drain_type": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<template>
|
||||
<el-card header="污染源清单">
|
||||
<scTable :data="tableData" style="width: 100%;" size="large" :apiObj="apiObj" row-key="id" :params="params"
|
||||
hidePagination @row-click="rowClick">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column prop="number" label="污染源编号" width="180" />
|
||||
<el-table-column prop="name" label="污染源名称" />
|
||||
<el-table-column prop="name" label="监测状态" />
|
||||
</scTable>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.enp.drain.list,
|
||||
params: { type: 20 },
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -36,7 +36,8 @@
|
|||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="enpMenu">
|
||||
<el-dropdown-item command="wuran">污染源管控制</el-dropdown-item>
|
||||
<el-dropdown-item command="pollutant">污染源清单</el-dropdown-item>
|
||||
<el-dropdown-item command="pollutant2">污染源监测</el-dropdown-item>
|
||||
<el-dropdown-item>智能治理</el-dropdown-item>
|
||||
<el-dropdown-item>设备清单</el-dropdown-item>
|
||||
<el-dropdown-item>环境质量</el-dropdown-item>
|
||||
|
@ -286,6 +287,7 @@
|
|||
<cems-drawer v-else-if="activeDrawerName == 'cems'" @close="closeDialog"></cems-drawer>
|
||||
<cems2-drawer v-else-if="activeDrawerName == 'cems2'" @close="closeDialog"></cems2-drawer>
|
||||
<cems-export v-else-if="activeDrawerName == 'cemsExport'" @close="closeDialog"></cems-export>
|
||||
<pollutant v-else-if="activeDrawerName == 'pollutant'" @close="closeDialog"></pollutant>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</el-main>
|
||||
|
@ -301,6 +303,7 @@ import orgDialog from "./enpComponents/orgwryList"
|
|||
import cemsDrawer from './enpComponents/cems.vue'
|
||||
import cems2Drawer from './enpComponents/cems2.vue'
|
||||
import cemsExport from './enpComponents/cemsExport.vue'
|
||||
import pollutant from "./enpComponents/pollutant.vue"
|
||||
import 'babylonjs-loaders';
|
||||
import 'animate.css';
|
||||
export default {
|
||||
|
@ -308,7 +311,8 @@ export default {
|
|||
orgDialog,
|
||||
cemsDrawer,
|
||||
cems2Drawer,
|
||||
cemsExport
|
||||
cemsExport,
|
||||
pollutant
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue