projects/mesxc-zjl #291

Merged
juzi merged 4 commits from projects/mesxc-zjl into projects/mesxc-test 2024-03-28 17:11:59 +08:00
Showing only changes of commit 5d16c37965 - Show all commits

View File

@ -9,10 +9,11 @@
<div class="itemBox"> <div class="itemBox">
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'> <div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
<div class="itemSub"> <div class="itemSub">
<p class="itemNum">{{item.checkValue ? (item.checkValue).toFixed(2) : '-'}}</p> <p class="itemNum">{{ item.checkValue ? (item.checkValue).toFixed(2) : '-' }}</p>
<p class="itemDescribe" :title="item.name"> <p class="itemDescribe" :title="item.name">
<img src="./../../../../../assets/images/detectionData.png" alt=""> <img src="./../../../../../assets/images/detectionData.png" alt="">
{{item.name}}</p> {{ item.name }}
</p>
</div> </div>
</div> </div>
</div> </div>
@ -24,8 +25,8 @@
<span>检测指标趋势图</span> <span>检测指标趋势图</span>
</div> </div>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<search-area @submit="getTrend"/> <search-area @submit="getTrend" />
<line-chart :chartData="chartData" v-show='Object.keys(chartData).length !== 0' :timeDim="queryParams.timeDim"/> <line-chart :chartData="chartData" v-show='Object.keys(chartData).length !== 0' :timeDim="queryParams.timeDim" />
<!-- 没有数据 --> <!-- 没有数据 -->
<div class="no-data-bg" v-show='Object.keys(chartData).length === 0'></div> <div class="no-data-bg" v-show='Object.keys(chartData).length === 0'></div>
</div> </div>
@ -37,11 +38,11 @@ import LineChart from './../../components/lineChart'
import SearchArea from './../../components/searchArea' import SearchArea from './../../components/searchArea'
import moment from 'moment' import moment from 'moment'
export default { export default {
name: 'Voc', name: 'VocManagement',
data(){ data() {
return { return {
realtimeList:[], realtimeList: [],
queryParams:{ queryParams: {
checkType: 3, checkType: 3,
timeDim: null, timeDim: null,
timeRange: [] timeRange: []
@ -53,18 +54,18 @@ export default {
mounted() { mounted() {
this.getMsg() this.getMsg()
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value // this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value //
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000] this.queryParams.timeRange = [moment().startOf('day') + 0, moment().endOf('day') - 59 * 61 * 1000]
this.getTrend() this.getTrend()
}, },
methods: { methods: {
getMsg() { getMsg() {
environmentalCheckRealtime({checkType: 3}).then(res => { environmentalCheckRealtime({ checkType: 3 }).then(res => {
console.log(res) console.log(res)
this.realtimeList = res.data || [] this.realtimeList = res.data || []
}) })
}, },
getTrend() { getTrend() {
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => { environmentalCheckRealtimeTrend({ ...this.queryParams }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.chartData = res.data this.chartData = res.data
} else { } else {
@ -85,34 +86,41 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
.voc { .voc {
background-color: #f2f4f9; background-color: #f2f4f9;
.box1 { .box1 {
height: 172px; height: 172px;
padding: 12px 16px 0; padding: 12px 16px 0;
margin-bottom: 8px; margin-bottom: 8px;
background-color: #fff; background-color: #fff;
border-radius: 9px; border-radius: 9px;
.itemBox { .itemBox {
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
overflow: auto; overflow: auto;
.itemClass { .itemClass {
width: 198px; width: 198px;
height: 88px; height: 88px;
// border: 1px solid green; // border: 1px solid green;
padding: 12px 0px 12px 18px; padding: 12px 0px 12px 18px;
.itemSub { .itemSub {
width: 176px; width: 176px;
height: 65px; height: 65px;
padding-right: 26px; padding-right: 26px;
border-right: 1px solid #E8E8E8; border-right: 1px solid #E8E8E8;
P{
P {
margin: 0; margin: 0;
img { img {
width: 24px; width: 24px;
height: 24px; height: 24px;
vertical-align: middle; vertical-align: middle;
} }
} }
.itemNum { .itemNum {
font-size: 32px; font-size: 32px;
font-weight: 600; font-weight: 600;
@ -120,33 +128,41 @@ export default {
color: #3E6AF7; color: #3E6AF7;
text-align: right; text-align: right;
} }
.itemDescribe { .itemDescribe {
font-size: 16px; font-size: 16px;
text-align: right; text-align: right;
white-space: nowrap; /* 防止换行 */ white-space: nowrap;
overflow: hidden; /* 隐藏超出部分 */ /* 防止换行 */
text-overflow: ellipsis; /* 添加省略号 */ overflow: hidden;
/* 隐藏超出部分 */
text-overflow: ellipsis;
/* 添加省略号 */
} }
} }
} }
} }
.itemClass:last-child > .itemSub{
.itemClass:last-child>.itemSub {
border: none !important; border: none !important;
} }
} }
.box2 { .box2 {
background-color: #fff; background-color: #fff;
border-radius: 9px; border-radius: 9px;
padding: 16px; padding: 16px;
height: calc(100vh - 308px); height: calc(100vh - 308px);
} }
.boxTitle { .boxTitle {
display: inline-block; display: inline-block;
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
margin:0 10px 20px 0; margin: 0 10px 20px 0;
} }
.blueTitle { .blueTitle {
content: ''; content: '';
display: inline-block; display: inline-block;