菜单变动

This commit is contained in:
shijing 2024-02-19 10:58:47 +08:00
commit 6244d0d49f
7 changed files with 544 additions and 3 deletions

View File

@ -43,7 +43,7 @@
{{ scope.row.equipment_envdata.humidity ? scope.row.equipment_envdata.humidity : '-' }}
</template>
</el-table-column>
<el-table-column label="流量(m3/h)">
<el-table-column label="流量(m3/h)" width="130">
<template #default="scope">
{{ scope.row.equipment_envdata.flux ? scope.row.equipment_envdata.flux : '-' }}
</template>

View File

@ -0,0 +1,183 @@
<template>
<el-container>
<el-header style="height: 40%">
<el-container>
<el-header>
<div class="panel_title">污染源监测清单</div>
</el-header>
<el-main class="nopadding">
<scTable :data="tableData" style="width: 100%;" size="large" :apiObj="apiObj" row-key="id"
:params="params" hidePagination hideDo @row-click="rowClick">
<el-table-column type="index" width="50" />
<el-table-column prop="equipment_number" label="设备编号" width="120" />
<el-table-column prop="equipment_name" label="设备名称" width="180" />
<el-table-column prop="mgroup_name" label="所属工段" width="120">
<template #default="scope">
<span v-if="scope.row.drain_">{{ scope.row.drain_.mgroup_name }}</span>
</template>
</el-table-column>
<el-table-column label="监测状态" />
<el-table-column label="TSP(mg/m3)">
<template #default="scope">
{{ scope.row.equipment_envdata.tsp ? scope.row.equipment_envdata.tsp : '-' }}
</template>
</el-table-column>
<el-table-column label="温度(℃)">
<template #default="scope">
{{ scope.row.equipment_envdata.temperature ? scope.row.equipment_envdata.temperature : '-'
}}
</template>
</el-table-column>
<el-table-column label="湿度(%)">
<template #default="scope">
{{ scope.row.equipment_envdata.humidity ? scope.row.equipment_envdata.humidity : '-' }}
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</el-header>
<el-main class="nopadding">
<el-container>
<el-main class="nopadding">
<el-container>
<el-header>
<div class="left-panel">
<div class="panel_title">污染源监测详情</div>
</div>
<div class="right-panel">
<el-date-picker v-model="timeRange" type="datetimerange" range-separator=""
start-placeholder="开始时间" end-placeholder="结束时间" @change="handleQuery"
style="width: 100%" />
<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>
</el-header>
<el-main class="nppadding">
<div v-show="currentEquipmentId != ''" id="cChart" style="width: 100%; height:100%;"></div>
</el-main>
</el-container>
</el-main>
</el-container>
</el-main>
</el-container>
</template>
<script>
import * as echarts from "echarts";
export default {
data() {
return {
apiObj: this.$API.enp.drain_equip.list,
params: { drain__type: 20, equipment__type: 20, has_envdata: 'yes' },
currentEquipmentId: '',
currentEquipmentName: '',
timeRange: [],
timeOptions: [
{ label: '分钟', value: '1 minute' },
{ label: '小时', value: '1 hour' },
{ label: '天', value: '1 day' },
],
basicOption: {
title: {
text: '设备名称'
},
tooltip: {
trigger: 'axis'
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
dataset: {
source: []
},
xAxis: { type: 'category' },
yAxis: {},
// series: [{ type: 'line' }, { type: 'line' }, { type: 'line' }, { type: 'line' }, { type: 'line' }, { type: 'line' }],
series: [
{ type: 'line', encode: { y: 'tsp', seriesName: ["tsp"] } },
{ type: 'line', encode: { y: '温度', seriesName: ["温度"] } },
{ type: 'line', encode: { y: '压力', seriesName: ["压力"] } }]
},
query: {
"end_time": "",
"start_time": "",
"time_bucket": "1 hour",
"equipment_id": ''
}
}
},
mounted() {
this.initTimeRange()
},
methods: {
initTimeRange() {
var now = new Date();
var start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 3);
this.timeRange = [start, now]
},
rowClick(row) {
this.currentEquipmentId = row.equipment;
this.currentEquipmentName = row.equipment_name;
this.query.equipment_id = row.equipment;
this.$nextTick(() => { this.handleQuery() })
},
initChart() {
var that = this;
var myChart = echarts.getInstanceByDom(document.getElementById('cChart'));
if (myChart == undefined) {
myChart = echarts.init(document.getElementById('cChart'), 'dark');
}
myChart.showLoading();
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()
newOption.dataset.source = res.data.ds0;
newOption.title.text = this.currentEquipmentName;
myChart.setOption(newOption);
}).then(() => { myChart.hideLoading() })
},
handleQuery() {
let that = this;
let timeRange = Object.assign([], that.timeRange);;
let time1 = timeRange[0]
let time2 = timeRange[1];
let formatstr = 'yyyy-MM-dd hh:mm:ss'
if (this.query.time_bucket == '1 minute') {
time2 = new Date(time2.getTime() + 1000 * 60);
formatstr = 'yyyy-MM-dd hh:mm:00'
}
else if (this.query.time_bucket == '1 hour') {
time2 = new Date(time2.getTime() + 1000 * 60 * 60);
formatstr = 'yyyy-MM-dd hh:00:00'
}
else if (this.query.time_bucket == '1 day') {
time2 = new Date(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()
}
},
}
</script>

View File

@ -0,0 +1,114 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
<el-select></el-select>
<span style="width: 4px;"></span>
<el-button type="primary">查询</el-button>
</div>
<div class="right-panel">
<div class="typebox">
<span style="color:red;">
<img style="height: 16px; weight: 16px;"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAQCAYAAAAbBi9cAAABgElEQVQ4T52TzS4DURiG3++0op0REgtiU2emKsSmSz8XwB2oK1BXgCtQV4ArUFeAC/Cz7I7QzkxtJBYSkhmVtOeTM6Hamv6Z7XneZ97v/BD6fK401xEHrLJ/2QulXosMxJ5so6SZlBNkCWh043uK3LSxTUzHOszEeasSnAwtepybHB9pfD6AMB2KGC/12GgmU359j5J1beRK84AE9lpDrFCwPH9/YJEzk5gVCXEPokRbiLmmamrBfq5VO2WRjTzbPAWQ07B0/JDxbJO/w0Xp+Ft9Ra5MLhOJaxBCwR8Rg5nVquV93LbKOhuRZxlXIFr5gSIa6Z2/kW6wps/gh2sTuTK5SUIUW/8UKdIGpXKW93H2R+RKJEgYdwDJQUQAe6yCRctDTfPNRq5t7hJQ6Pdk2q4DsGc5/mFTVE5jKq5MffkmOkXdRgs5xltd+PNzFbyEjaq2ccSgfFSbnqJwJD6edYIdqqbGlhBXJQbFhxnrd5O5jrrI6uM+B9HGfyTNDPPFF8KilQlAZVW/AAAAAElFTkSuQmCC" />
产治未同步</span>
</div>
<div class="typebox">
<div class="greenb radio"></div>
<div class="green">设备正常</div>
</div>
<div class="typebox">
<div class="orangeb radio"></div>
<div class="orange">设备待机</div>
</div>
<div class="typebox">
<div class="grayb radio"></div>
<div class="gray">设备离线</div>
</div>
<div class="typebox">
<div class="redb radio"></div>
<div class="red">设备故障</div>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable style="width: 100%;" size="large" :apiObj="apiObj" row-key="id" :params="params" hidePagination hideDo>
<el-table-column prop="name" label="污染源编号" />
<el-table-column prop="type" label="污染源名称" />
<el-table-column label="生产设备名称">
<template #default="scope">
<span v-if="scope.row.drain_">{{ scope.row.drain_.mgroup_name }}</span>
</template>
</el-table-column>
<el-table-column label="生产设备名称">
<template #default="scope">
<span v-if="scope.row.drain_">{{ scope.row.drain_.mgroup_name }}</span>
</template>
</el-table-column>
<el-table-column prop="type" label="待机时间" />
<el-table-column label="治理设备名称">
<template #default="scope">
<span v-if="scope.row.drain_">{{ scope.row.drain_.mgroup_name }}</span>
</template>
</el-table-column>
<el-table-column prop="type" label="待机时间" />
<el-table-column prop="type" label="污染浓度" />
</scTable>
</el-main>
</el-container>
</template>
<script>
export default {
data() {
return {
apiObj: null,
params: {}
}
}
}
</script>
<style scoped>
.typebox {
font-size: 14px;
font-weight: 400;
margin-right: 10px;
display: flex
}
.radio {
width: 14px;
height: 14px;
border-radius: 50%;
}
.red {
color: red;
}
.redb {
background: red;
}
.green {
color: #00d614;
}
.greenb {
background: #00d614;
}
.orange {
color: #ff9600
}
.orangeb {
background: #ff9600
}
.gray {
color: #cbcbcb;
}
.grayb {
background: #cbcbcb
}</style>

View File

@ -0,0 +1,45 @@
<template>
<el-container>
<el-header>
<el-menu mode="horizontal" :default-active="activeIndex" :ellipsis="false" @select="handleSelect">
<el-menu-item index="1">厂区环境治理</el-menu-item>
<el-menu-item index="2">生产过程治理</el-menu-item>
<el-menu-item index="3">物料输送治理</el-menu-item>
</el-menu>
</el-header>
<el-main class="nopadding">
<smartg_carwash v-if="activeIndex == '1'"></smartg_carwash>
<smartg_prod v-if="activeIndex == '2'"></smartg_prod>
<smartg_trans v-if="activeIndex == '3'"></smartg_trans>
</el-main>
</el-container>
</template>
<script>
import smartg_carwash from "./smartg_carwash.vue";
import smartg_prod from "./smartg_prod.vue";
import smartg_trans from "./smarg_trans.vue";
export default {
components: {
smartg_carwash,
smartg_prod,
smartg_trans
},
data() {
return {
activeIndex: "1",
tableData: [],
}
},
methods: {
handleSelect(key, keyPath) {
this.activeIndex = key;
}
}
}
</script>
<style>
.el-tabs {
height: 100%;
}
</style>

View File

@ -0,0 +1,79 @@
<template>
<el-container>
<el-aside width="70%">
<el-container>
<el-header>
<div class="left-panel">
<div class="left-panel">洗车行为统计</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable style="width: 100%;" size="large" :apiObj="apiObj" row-key="id" :params="params" hidePagination
hideDo>
<el-table-column type="index" width="50" />
<el-table-column prop="start_time" label="开始时间" width="120" />
<el-table-column prop="end_time" label="结束时间" width="120" />
<el-table-column label="洗车时长">
<template #default="scope">
<span v-if="scope.row.drain_">{{ scope.row.drain_.mgroup_name }}</span>
</template>
</el-table-column>
<el-table-column label="压力" />
<el-table-column label="流量">
<template #default="scope">
{{ scope.row.equipment_envdata.tsp ? scope.row.equipment_envdata.tsp :
'-' }}
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</el-aside>
<el-main class="nopadding">
<el-container>
<el-header>
<div class="left-panel">环卫车智能调度</div>
</el-header>
<el-main class="nopadding">
<el-container>
<el-header>
<div class="left-panel">
<span>厂区环境(PM10):</span>
<span style="color: green"> 36ug/m3</span>
</div>
</el-header>
<el-main class="nopadding">
<scTable style="width: 100%;" size="large" :apiObj="apiObj2" row-key="id" :params="params2"
hidePagination hideDo>
<el-table-column type="index" width="50" />
<el-table-column prop="name" label="环卫车名称" />
<el-table-column prop="type" label="环卫车类型" />
<el-table-column label="今日工作时长">
<template #default="scope">
<span v-if="scope.row.drain_">{{ scope.row.drain_.mgroup_name }}</span>
</template>
</el-table-column>
</scTable>
</el-main>
<el-footer height="400px">
xx
</el-footer>
</el-container>
</el-main>
</el-container>
</el-main>
</el-container>
</template>
<script>
export default {
data() {
return {
apiObj: null,
params: {},
apiObj2: null,
params2: {},
}
}
}
</script>

View File

@ -0,0 +1,114 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
<el-select></el-select>
<span style="width: 4px;"></span>
<el-button type="primary">查询</el-button>
</div>
<div class="right-panel">
<div class="typebox">
<span style="color:red;">
<img style="height: 16px; weight: 16px;"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAQCAYAAAAbBi9cAAABgElEQVQ4T52TzS4DURiG3++0op0REgtiU2emKsSmSz8XwB2oK1BXgCtQV4ArUFeAC/Cz7I7QzkxtJBYSkhmVtOeTM6Hamv6Z7XneZ97v/BD6fK401xEHrLJ/2QulXosMxJ5so6SZlBNkCWh043uK3LSxTUzHOszEeasSnAwtepybHB9pfD6AMB2KGC/12GgmU359j5J1beRK84AE9lpDrFCwPH9/YJEzk5gVCXEPokRbiLmmamrBfq5VO2WRjTzbPAWQ07B0/JDxbJO/w0Xp+Ft9Ra5MLhOJaxBCwR8Rg5nVquV93LbKOhuRZxlXIFr5gSIa6Z2/kW6wps/gh2sTuTK5SUIUW/8UKdIGpXKW93H2R+RKJEgYdwDJQUQAe6yCRctDTfPNRq5t7hJQ6Pdk2q4DsGc5/mFTVE5jKq5MffkmOkXdRgs5xltd+PNzFbyEjaq2ccSgfFSbnqJwJD6edYIdqqbGlhBXJQbFhxnrd5O5jrrI6uM+B9HGfyTNDPPFF8KilQlAZVW/AAAAAElFTkSuQmCC" />
产治未同步</span>
</div>
<div class="typebox">
<div class="greenb radio"></div>
<div class="green">设备正常</div>
</div>
<div class="typebox">
<div class="orangeb radio"></div>
<div class="orange">设备待机</div>
</div>
<div class="typebox">
<div class="grayb radio"></div>
<div class="gray">设备离线</div>
</div>
<div class="typebox">
<div class="redb radio"></div>
<div class="red">设备故障</div>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable style="width: 100%;" size="large" :apiObj="apiObj" row-key="id" :params="params" hidePagination hideDo>
<el-table-column prop="name" label="污染源编号" />
<el-table-column prop="type" label="污染源名称" />
<el-table-column label="生产设备名称">
<template #default="scope">
<span v-if="scope.row.drain_">{{ scope.row.drain_.mgroup_name }}</span>
</template>
</el-table-column>
<el-table-column label="生产设备名称">
<template #default="scope">
<span v-if="scope.row.drain_">{{ scope.row.drain_.mgroup_name }}</span>
</template>
</el-table-column>
<el-table-column prop="type" label="待机时间" />
<el-table-column label="治理设备名称">
<template #default="scope">
<span v-if="scope.row.drain_">{{ scope.row.drain_.mgroup_name }}</span>
</template>
</el-table-column>
<el-table-column prop="type" label="待机时间" />
<el-table-column prop="type" label="污染浓度" />
</scTable>
</el-main>
</el-container>
</template>
<script>
export default {
data() {
return {
apiObj: null,
params: {}
}
}
}
</script>
<style scoped>
.typebox {
font-size: 14px;
font-weight: 400;
margin-right: 10px;
display: flex
}
.radio {
width: 14px;
height: 14px;
border-radius: 50%;
}
.red {
color: red;
}
.redb {
background: red;
}
.green {
color: #00d614;
}
.greenb {
background: #00d614;
}
.orange {
color: #ff9600
}
.orangeb {
background: #ff9600
}
.gray {
color: #cbcbcb;
}
.grayb {
background: #cbcbcb
}</style>

View File

@ -43,7 +43,7 @@
<el-dropdown-menu class="enpMenu">
<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 command="smartg">智能治理</el-dropdown-item>
<el-dropdown-item>设备清单</el-dropdown-item>
<el-dropdown-item>环境质量</el-dropdown-item>
<el-dropdown-item>台账管理</el-dropdown-item>
@ -331,6 +331,8 @@
<!-- 台账管理 -->
<ledger v-else-if="activeDrawerName == 'ledger'" @close="closeDialog"></ledger>
<alarmrecord v-else-if="activeDrawerName == 'alarmrecord'" @close="closeDialog"></alarmrecord>
<pollutant2 v-else-if="activeDrawerName == 'pollutant2'" @close="closeDialog"></pollutant2>
<smartg v-else-if="activeDrawerName == 'smartg'" @close="closeDialog"></smartg>
</el-drawer>
</div>
</el-main>
@ -354,6 +356,8 @@ import envirmonitor from "./enpComponents/envirmonitor.vue";
import pollutecalendar from "./enpComponents/pollutecalendar.vue";
import ledger from "./enpComponents/ledger.vue";//
import alarmrecord from "./enpComponents/alarmrecord.vue";
import pollutant2 from "./enpComponents/pollutant2.vue"
import smartg from "./enpComponents/smartg.vue"
import 'babylonjs-loaders';
import 'animate.css';
export default {
@ -369,7 +373,9 @@ export default {
envirmonitor,
pollutecalendar,
ledger,
alarmrecord
alarmrecord,
pollutant2,
smartg
},
data() {
return {