feat: 调整cmes界面

This commit is contained in:
caoqianming 2024-02-04 14:16:59 +08:00
parent 4dc0136368
commit 26b055ab6f
2 changed files with 89 additions and 87 deletions

View File

@ -1,77 +1,86 @@
<template> <template>
<el-card class="enpelCard"> <el-container>
<template #header> <el-header style="height: 40%">
<div class="card-header"> <el-container>
<span>CEMS监测清单</span> <el-header>
</div> <div class="panel_title">CEMS监测清单</div>
</template> </el-header>
<div> <el-main class="nopadding">
<scTable :data="tableData" style="width: 100%;" size="large" :apiObj="apiObj" row-key="id" :params="params" <scTable :data="tableData" style="width: 100%;" size="large" :apiObj="apiObj" row-key="id"
hidePagination @row-click="rowClick"> :params="params" hidePagination hideDo @row-click="rowClick">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column prop="equipment_number" label="设备编号" width="180" /> <el-table-column prop="equipment_number" label="设备编号" width="120" />
<el-table-column prop="equipment_name" label="设备名称" /> <el-table-column prop="equipment_name" label="设备名称" width="180" />
<el-table-column prop="name" label="监测状态" /> <el-table-column prop="name" label="监测状态" />
<el-table-column label="颗粒物实测(mg/m3)"> <el-table-column label="颗粒物实测(mg/m3)" width="180">
<template #default="scope"> <template #default="scope">
{{ scope.row.equipment_envdata.dust_rtd ? scope.row.equipment_envdata.dust_rtd : '-' }} {{ scope.row.equipment_envdata.dust_rtd ? scope.row.equipment_envdata.dust_rtd : '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="颗粒物折算(mg/m3)"> <el-table-column label="颗粒物折算(mg/m3)" width="180">
<template #default="scope"> <template #default="scope">
{{ scope.row.equipment_envdata.dust_zs ? scope.row.equipment_envdata.dust_zs : '-' }} {{ scope.row.equipment_envdata.dust_zs ? scope.row.equipment_envdata.dust_zs : '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="温度(℃)"> <el-table-column label="温度(℃)">
<template #default="scope"> <template #default="scope">
{{ scope.row.equipment_envdata.temperature ? scope.row.equipment_envdata.temperature : '-' }} {{ scope.row.equipment_envdata.temperature ? scope.row.equipment_envdata.temperature : '-'
</template> }}
</el-table-column> </template>
<el-table-column label="压力(KPa)"> </el-table-column>
<template #default="scope"> <el-table-column label="压力(KPa)">
{{ scope.row.equipment_envdata.pressure ? scope.row.equipment_envdata.pressure : '-' }} <template #default="scope">
</template> {{ scope.row.equipment_envdata.pressure ? scope.row.equipment_envdata.pressure : '-' }}
</el-table-column> </template>
<el-table-column label="流速(m/s)"> </el-table-column>
<template #default="scope"> <el-table-column label="流速(m/s)">
{{ scope.row.equipment_envdata.speed ? scope.row.equipment_envdata.speed : '-' }} <template #default="scope">
</template> {{ scope.row.equipment_envdata.speed ? scope.row.equipment_envdata.speed : '-' }}
</el-table-column> </template>
<el-table-column label="湿度(%)"> </el-table-column>
<template #default="scope"> <el-table-column label="湿度(%)">
{{ scope.row.equipment_envdata.humidity ? scope.row.equipment_envdata.humidity : '-' }} <template #default="scope">
</template> {{ scope.row.equipment_envdata.humidity ? scope.row.equipment_envdata.humidity : '-' }}
</el-table-column> </template>
<el-table-column label="流量(m3/h)"> </el-table-column>
<template #default="scope"> <el-table-column label="流量(m3/h)">
{{ scope.row.equipment_envdata.flux ? scope.row.equipment_envdata.flux : '-' }} <template #default="scope">
</template> {{ scope.row.equipment_envdata.flux ? scope.row.equipment_envdata.flux : '-' }}
</el-table-column> </template>
<el-table-column label="监测达标率" /> </el-table-column>
</scTable> <el-table-column label="监测达标率" />
</div> </scTable>
</el-main>
</el-container>
</el-card> </el-header>
<div style="height: 8px;"></div> <el-main class="nopadding">
<el-card style="width: 100%; " v-show="currentEquipmentId != ''" class="enpelCard"> <el-container>
<template #header> <el-main class="nopadding">
<div class="card-header"> <el-container>
<span>CEMS监测详情</span> <el-header>
<el-button @click="handleQuery">刷新</el-button> <div class="left-panel">
</div> <div class="panel_title">CEMS监测详情</div>
</template> </div>
<div style="display:flex"> <div class="right-panel">
<div style="width: 500px"> <el-date-picker v-model="timeRange" type="datetimerange" range-separator=""
<el-date-picker v-model="timeRange" type="datetimerange" range-separator="" start-placeholder="开始时间" start-placeholder="开始时间" end-placeholder="结束时间" @change="handleQuery"
end-placeholder="结束时间" @change="handleQuery" style="width: 100%" /> style="width: 100%" />
</div> <el-select v-model="query.time_bucket" placeholder="周期" style="margin-left:4px"
@change="handleQuery">
<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"
<el-option v-for="item in timeOptions" :key="item.value" :label="item.label" :value="item.value" /> :value="item.value" />
</el-select> </el-select>
</div> </div>
<div id="cChart" style="width: 100%; height:400px; margin-top: 16px"></div> </el-header>
</el-card> <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> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
@ -173,19 +182,21 @@ export default {
}, },
handleQuery() { handleQuery() {
let time1 = this.timeRange[0] let that = this;
let time2 = this.timeRange[1] let timeRange = Object.assign([], that.timeRange);;
let time1 = timeRange[0]
let time2 = timeRange[1];
let formatstr = 'yyyy-MM-dd hh:mm:ss' let formatstr = 'yyyy-MM-dd hh:mm:ss'
if (this.query.time_bucket == '1 minute') { if (this.query.time_bucket == '1 minute') {
time2.setTime(time2.getTime() + 1000 * 60); time2 = new Date(time2.getTime() + 1000 * 60);
formatstr = 'yyyy-MM-dd hh:mm:00' formatstr = 'yyyy-MM-dd hh:mm:00'
} }
else if (this.query.time_bucket == '1 hour') { else if (this.query.time_bucket == '1 hour') {
time2.setTime(time2.getTime() + 1000 * 60 * 60); time2 = new Date(time2.getTime() + 1000 * 60 * 60);
formatstr = 'yyyy-MM-dd hh:00:00' formatstr = 'yyyy-MM-dd hh:00:00'
} }
else if (this.query.time_bucket == '1 day') { else if (this.query.time_bucket == '1 day') {
time2.setTime(time2.getTime() + 1000 * 60 * 60 * 24); time2 = new Date(time2.getTime() + 1000 * 60 * 60 * 24);
formatstr = 'yyyy-MM-dd' formatstr = 'yyyy-MM-dd'
} }
this.query.start_time = this.$TOOL.dateFormat(time1, formatstr) this.query.start_time = this.$TOOL.dateFormat(time1, formatstr)

View File

@ -48,13 +48,4 @@ export default {
} }
} }
} }
</script> </script>
<style scoped>
.panel_title {
font-size: 22px;
}
el-header {
background: aqua;
}
</style>