From 1e1e70da5288f47d8770ba2e7f22f3362e5b577c Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期五, 08 十二月 2023 17:16:35 +0800 Subject: [PATCH] 1、全局修改密码弹窗中的新密码校验长度与数据字典password_length设置保持一致 2、报警分析页面优化过快点击多次表格行时图表内容出现数据残留以及加载图表应设置加载中动画,若不设置用户在查询时短时间内不清楚有无数据 3、车间看板以及设备监控页面设备详情弹窗右上角增加关闭按钮、设备详情弹窗透明度加深、设备详情弹窗图表表盘指针对比色加强、调整设备详情弹窗中描述列表子项标题对齐方式由左对齐改为右对齐,锁定运行数据描述列表子项数值宽度,超出部分隐藏出现省略号,悬浮出现气泡卡片 4、设备利用率、设备开动率、班次利用率页面表格前三列增加表头,依次为公司、车间、工段以及表格有关时间值调整为若小时或分钟为0则不显示 5、设备综合效率分析页面表格数据默认每页最多显示10条改为20条 6、设备加工工件报表页面完成布局及功能实现 --- src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue | 66 +++++++++++++++++++++++++++++++-- 1 files changed, 62 insertions(+), 4 deletions(-) diff --git a/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue b/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue index 952a59b..fadbf53 100644 --- a/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue +++ b/src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue @@ -1,6 +1,6 @@ <template> <div class="efficiency_list" style="width: 100%;height: 100%;"> - <a-card :bordered="false"> + <div :bordered="false" style="height: 100%"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> @@ -57,7 +57,7 @@ </div> <div id="openRateTrendChart" style="width: 100%;height: 60%"></div> </div> - </a-card> + </div> </div> </template> @@ -108,7 +108,10 @@ }, tableHeads: [], XData: [0], - YData: [0] + YData: [0], + isLazyRequest: '',// 鏄惁寮�鍚噿鍔犺浇 + requestAlldataSize: 8,// 鎬诲叡璇锋眰鐨勫垪琛ㄩ」鏁扮洰 + everyRequestDataSize: 15// 姣忔璇锋眰鐨勫垪琛ㄩ」鏁扮洰 } }, props: { nodeTree: '', Type: '', nodePeople: '' }, @@ -121,6 +124,12 @@ this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') this.queryParam.typeTree = '1' this.loadData1() + }, + mounted() { + this.tableScroll = document.querySelector('.table2') + }, + beforeDestroy() { + this.tableScroll.removeEventListener('scroll', this.tableScrollX) }, watch: { Type(valmath) { @@ -221,9 +230,13 @@ dateParamChange(v1, v2) { this.queryParam.startDate = v2[0] this.queryParam.endDate = v2[1] + this.dates = [v1[0], v1[1]] }, searchQuery() { - if (this.dates && this.dates.length > 0) { + console.log('dates', this.dates) + this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD') + this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') + if (this.dates[0] && this.dates[1]) { if (this.queryParam.typeTree == '1') { this.queryParam.parentId = this.queryParamEquip.parentId this.queryParam.equipmentId = this.queryParamEquip.equipmentId @@ -231,6 +244,7 @@ this.queryParam.parentId = this.queryParamPeople.parentId this.queryParam.equipmentId = '' } + this.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1 this.loadData1() } else { this.$notification.warning({ @@ -313,6 +327,13 @@ this.loading = true this.tableHeads = [] this.dataList = [] + // 鑻ユ棩鏈熼�夋嫨鍣ㄨ缃殑鏌ヨ璇锋眰鏁伴噺瓒呰繃15鏉″垯寮�鍚噿鍔犺浇 + if (this.requestAlldataSize > 15) { + // 寮�鍚噿鍔犺浇鍚庡皢缁撴潫鏃ユ湡璁剧疆涓哄紑濮嬫棩鏈熶箣鍚庣殑14澶╋紝鍗冲厛鏌ヨ15澶╁唴鐨勬暟鎹� + this.queryParam.endDate = moment(this.queryParam.startDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') + this.isLazyRequest = true + this.tableScroll.removeEventListener('scroll', this.tableScrollX) // 涓洪伩鍏嶆粴鍔ㄦ潯鏈夋粴鍔ㄨ窛绂诲悗鍚庣偣鍑绘煡璇㈡寜閽Е鍙戞粴鍔ㄤ簨浠讹紝鍥犳鍦ㄨЕ鍙戜簨浠跺墠绉婚櫎浜嬩欢 + } getAction(this.url.efficiencyList, this.queryParam).then(res => { if (res.success) { this.tableHeads = res.result.dates @@ -323,6 +344,7 @@ // this.checkSameData2(this.dataList) // this.combineCell(); // this.initDeviceType(this.dataList) + this.tableScroll.addEventListener('scroll', this.tableScrollX) } }).finally(() => { this.loading = false @@ -385,6 +407,41 @@ ] } openRateTrendAnalysisChart.setOption(openRateTrendChartOptions, true) + }, + + /** + * 婊氬姩鏉¤Е搴曞埛鏂拌〃鏍兼暟鎹� + */ + tableScrollX() { + // 褰撴粴鍔ㄦ潯瑙﹀簳涓旀噿鍔犺浇寮�鍚椂瑙﹀彂婊氬姩鏉¤Е搴曞埛鏂� + if (Math.ceil(this.tableScroll.scrollLeft + this.tableScroll.clientWidth) + 1 >= this.tableScroll.scrollWidth && this.isLazyRequest) { + this.loading = true + this.queryParam.startDate = moment(this.queryParam.endDate).add(1, 'days').format('YYYYMMDD') + // 鍒ゆ柇璁剧疆鎳掑姞杞藉悗鐨勭粨鏉熸椂闂存槸鍚﹁秴杩囨椂闂撮�夋嫨鍣ㄤ腑璁剧疆鐨勭粨鏉熸椂闂� + if (moment(this.queryParam.endDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') - moment(this.dates[1]).format('YYYYMMDD') < 0) { + //鍐嶆鏌ヨ鍚�15澶╁唴鐨勬暟鎹� + this.queryParam.endDate = moment(this.queryParam.endDate).add(this.everyRequestDataSize, 'days').format('YYYYMMDD') + } else { + // 濡傛灉涓嶅皬浜庢椂闂撮�夋嫨鍣ㄤ腑璁剧疆鐨勬椂闂村垯璁剧疆璇锋眰缁撴潫鏃ユ湡涓烘椂闂撮�夋嫨鍣ㄤ腑璁剧疆鐨勭粨鏉熸椂闂村苟涓斿叧闂噿鍔犺浇锛堟剰鍛崇潃鏈�鍚庝竴娆¤Е搴曞埛鏂帮級 + this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD') + this.isLazyRequest = false + } + getAction(this.url.efficiencyList, this.queryParam).then(res => { + if (res.success) { + this.tableHeads = [...this.tableHeads, ...res.result.dates] + this.dataList.forEach(item1 => { + res.result.mdcEfficiencyList.forEach(item2 => { + if (item1.equipmentId === item2.equipmentId) { + item1.dataList = [...item1.dataList, ...item2.dataList] + } + }) + }) + this.draw() + } + }).finally(() => { + this.loading = false + }) + } } } } @@ -428,6 +485,7 @@ .dataContent .mathData td { padding: 10px; /*display: none;*/ + cursor: pointer; } .dataContent .mathData:hover td { -- Gitblit v1.9.3