From 120cf05bfd146a9bd1c011c9dd0244a57d0dea64 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期五, 12 一月 2024 17:35:43 +0800 Subject: [PATCH] 1、优化代码:mdc全局页面表格区域内容若需滚动无需翻至最底部且部分页面竖向滚动会滚动整个页面调整为仅滚动表格区域,表格操作列右固定以满足不同分辨率下操作列始终显示不被遮挡 2、优化代码:mdc全局左侧树组件所在区域的滚动条将不再进行全部内容滚动,调整为仅只有树组件内容滚动 3、优化代码:报警分析、利用率走势分析以及利用率分段分析页面在浏览器窗口尺寸变化后重绘图表以适应页面新尺寸 4、设备综合效率分析页面取消分页器以便能一次性导出所有表格数据 5、mdc全局左侧树区域宽度增大,右侧数据展示区域宽度减小 --- src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue | 53 ++++++++++++++++++++++++++++++++++------------------- 1 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue index 24eb98a..ecbcaae 100644 --- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue +++ b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue @@ -14,12 +14,18 @@ <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange"/> </a-form-item> </a-col> - <a-col :md="3" :sm="3" :xs="3"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - </a-col> <a-col :md="2" :sm="2" :xs="2"> - <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> + <a-space> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> + </a-space> </a-col> + <!--<a-col :md="2" :sm="2" :xs="2">--> + <!--<a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>--> + <!--</a-col>--> + <!--<a-col :md="2" :sm="2" :xs="2">--> + <!--<a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>--> + <!--</a-col>--> </a-row> </a-form> </div> @@ -360,7 +366,10 @@ color:'#000', }, // formatter:"鏃堕暱锛歿c}H", - formatter:params=>String(params.value).length==2?`鏃堕暱锛�${String(params.value).slice(1)}H`:`鏃堕暱锛�${String(params.value)}H` + formatter:params=>{ + const value=String(params.value) + return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H` + } }, itemStyle: { normal: { @@ -458,7 +467,10 @@ color:'#000', }, // formatter:"鏃堕暱锛歿c}H", - formatter:params=>String(params.value).length==2?`鏃堕暱锛�${String(params.value).slice(1)}H`:`鏃堕暱锛�${String(params.value)}H` + formatter:params=>{ + const value=String(params.value) + return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H` + } }, itemStyle: { normal: { @@ -552,7 +564,10 @@ color:'#000', }, // formatter:"鏃堕暱锛歿c}H", - formatter:params=>String(params.value).length==2?`鏃堕暱锛�${String(params.value).slice(1)}H`:`鏃堕暱锛�${String(params.value)}H` + formatter:params=>{ + const value=String(params.value) + return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H` + } }, itemStyle: { normal: { @@ -580,9 +595,9 @@ StartupLine.setOption(StartupLine_option); }, queryStatistical(){ + if(this.queryParams.collectTime){ getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{ if(res.success){ - // console.log(res); this.StatCharOpeningRate = res.result.openRate; this.StatCharUsedRate = res.result.utilizationRate; this.UtilizationHeight = res.result.openRate; @@ -595,16 +610,20 @@ this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong); this.draw(); } - else{ - this.draw(); - } }) + }else{ + this.$notification.warning({ + message:'娑堟伅', + description:'璇烽�夋嫨鏃堕棿' + }) + } }, dataChange(val) { this.queryParam.collectTime1 = ""; - this.queryParams.dateTime = val.format('YYYYMMDD') - this.queryParams.collectTime = val.format('YYYY-MM-DD'); - + if(val){ + this.queryParams.dateTime = val.format('YYYYMMDD') + this.queryParams.collectTime = val.format('YYYY-MM-DD'); + } }, initEquipmentNode(id) { let _this = this @@ -643,7 +662,7 @@ this.queryParam = {} this.queryParams = {} // this.dates = [] - this.queryStatistical() + // this.queryStatistical() // this.onClearSelected() }, searchQuery(){ @@ -658,18 +677,14 @@ this.$set(this.queryParam, 'equipmentId', val.equipmentId) this.queryParams.parentId = '' this.queryParams.equipmentId = val.equipmentId - this.searchQuery() }else{ this.queryParams.parentId = val.key this.queryParams.equipmentId = '' this.$set(this.queryParam, 'tierName', val.title) - this.searchQuery() } this.searchQuery() } // this.searchQuery(); - - } } -- Gitblit v1.9.3