From ead9635b902a060599264d2bdcb5399d5938cadd Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期五, 10 五月 2024 16:05:05 +0800 Subject: [PATCH] 设备加工工件报表页面修复点击左侧树右侧无法正常展示数据问题 --- src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue | 193 +++++++++++++++++++++++++----------------------- 1 files changed, 100 insertions(+), 93 deletions(-) diff --git a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue index d5cad81..919c302 100644 --- a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue +++ b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue @@ -1,78 +1,80 @@ <template> <div class="device_list"> - <!-- 鏌ヨ鍖哄煙 --> - <div class="seach-content"> - <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> - <a-row :gutter="24"> - <a-col :md="4" :sm="4" :xs="4"> - <a-form-item label="椹卞姩绫诲瀷"> - <a-auto-complete - v-model="queryParam.driveType" - :data-source="driveTypeList" - placeholder="璇烽�夋嫨椹卞姩绫诲瀷" - :filter-option="filterOption" - allowClear - /> - </a-form-item> - </a-col> + <!-- 鏌ヨ鍖哄煙 --> + <div class="seach-content"> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :md="4" :sm="4" :xs="4"> + <a-form-item label="椹卞姩绫诲瀷"> + <a-auto-complete + v-model="queryParam.driveType" + :data-source="driveTypeList" + placeholder="璇烽�夋嫨椹卞姩绫诲瀷" + :filter-option="filterOption" + allowClear + /> + </a-form-item> + </a-col> - <a-col :md="4" :sm="4" :xs="4"> - <a-form-item label="璁惧绾у埆"> - <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绾у埆" dictCode="device_level" v-model="queryParam.deviceLevel" - allow-clear/> - </a-form-item> - </a-col> - <a-col :md="4" :sm="4" :xs="4"> - <a-form-item label="璁惧绉嶇被"> - <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绉嶇被" dictCode="device_category" v-model="queryParam.deviceCategory" - allow-clear/> - </a-form-item> - </a-col> + <a-col :md="4" :sm="4" :xs="4"> + <a-form-item label="璁惧绾у埆"> + <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绾у埆" dictCode="device_level" v-model="queryParam.deviceLevel" + allow-clear/> + </a-form-item> + </a-col> + <a-col :md="4" :sm="4" :xs="4"> + <a-form-item label="璁惧绉嶇被"> + <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绉嶇被" dictCode="device_category" v-model="queryParam.deviceCategory" + allow-clear/> + </a-form-item> + </a-col> - <a-col :md="5" :sm="5" :xs="5"> - <a-form-item label="鏃堕棿"> - <a-range-picker - :placeholder="['寮�濮嬫椂闂�', '缁撴潫鏃堕棿']" - format="YYYY-MM-DD" - :value="dates" - @change="dateParamChange" - /> - </a-form-item> - </a-col> + <a-col :md="5" :sm="5" :xs="5"> + <a-form-item label="鏃堕棿"> + <a-range-picker + :placeholder="['寮�濮嬫椂闂�', '缁撴潫鏃堕棿']" + format="YYYY-MM-DD" + :value="dates" + @change="dateParamChange" + /> + </a-form-item> + </a-col> - <a-col :md="4" :sm="4" :xs="4"> - <a-space> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> - <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button> - <a-button type="primary" icon="printer" v-print="'#EfficiencyShift'" v-has="'deviceProcess:print'">鎵撳嵃</a-button> - </a-space> - </a-col> - </a-row> - </a-form> + <a-col :md="4" :sm="4" :xs="4"> + <a-space> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> + <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button> + <a-button type="primary" icon="printer" v-print="'#EfficiencyShift'" v-has="'deviceProcess:print'">鎵撳嵃 + </a-button> + </a-space> + </a-col> + </a-row> + </a-form> - </div> </div> + </div> - <div class="container" id="EfficiencyShift" style="flex:1;overflow: hidden"> - <a-table :columns="columns" rowKey="equipmentId" :dataSource="dataSource" :scroll="{x:'max-content',y:scrollY}" :pagination="false" bordered> - <span slot="duration" slot-scope="text">{{getFormattedTime(text)}}</span> - </a-table> - </div> - <!--<div class="pagination">--> - <!--<a-pagination--> - <!--:total=dataSource.total--> - <!--:show-total="(total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉"--> - <!--:page-size="+queryParam.pageSize"--> - <!--:default-current="1"--> - <!--:current=+queryParam.pageNo--> - <!--show-size-changer--> - <!--:pageSizeOptions="['20','30','40','50']"--> - <!--@change="handlePageNoChange"--> - <!--@showSizeChange="handlePageSizeChange"--> - <!--/>--> - <!--</div>--> + <div class="container" id="EfficiencyShift" style="flex:1;overflow: hidden"> + <a-table :columns="columns" rowKey="equipmentId" :dataSource="dataSource" :scroll="{x:'max-content',y:scrollY}" + :pagination="false" bordered> + <span slot="duration" slot-scope="text">{{getFormattedTime(text)}}</span> + </a-table> + </div> + <!--<div class="pagination">--> + <!--<a-pagination--> + <!--:total=dataSource.total--> + <!--:show-total="(total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉"--> + <!--:page-size="+queryParam.pageSize"--> + <!--:default-current="1"--> + <!--:current=+queryParam.pageNo--> + <!--show-size-changer--> + <!--:pageSizeOptions="['20','30','40','50']"--> + <!--@change="handlePageNoChange"--> + <!--@showSizeChange="handlePageSizeChange"--> + <!--/>--> + <!--</div>--> </div> </template> @@ -153,7 +155,7 @@ align: 'center', scopedSlots: { customRender: 'duration' }, width: 150 - }, + } // { // title: '鏃ユ湡', // dataIndex: 'theDate', @@ -163,7 +165,7 @@ ], dataSource: [], driveTypeList: [], - scrollY:465 + scrollY: 465 } }, props: { nodeTree: '', Type: '', nodePeople: '' }, @@ -174,12 +176,12 @@ this.loadData() this.getDriveTypeByApi() }, - mounted(){ - window.addEventListener('resize',this.handleWindowResize) + mounted() { + window.addEventListener('resize', this.handleWindowResize) this.handleWindowResize() }, - beforeDestroy(){ - window.removeEventListener('resize',this.handleWindowResize) + beforeDestroy() { + window.removeEventListener('resize', this.handleWindowResize) }, watch: { Type(valmath) { @@ -224,10 +226,10 @@ methods: { dateParamChange(value) { this.dates = value - if(!value.length) { + if (!value.length) { delete this.queryParam.startTime delete this.queryParam.endTime - }else{ + } else { this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') } @@ -260,7 +262,8 @@ searchReset() { this.queryParam = { pageSize: 20, - pageNo: 1 + pageNo: 1, + typeTree: 1 } this.dates = [] this.loadData() @@ -347,7 +350,7 @@ /** * 褰撴祻瑙堝櫒鍙绐楀彛灏哄鍙戠敓鏀瑰彉鏃惰Е鍙� */ - handleWindowResize(){ + handleWindowResize() { const devicePixelRatio = window.devicePixelRatio // 娴忚鍣ㄧ缉鏀炬瘮 if (devicePixelRatio < 1) return // 缂╂斁姣斿皬浜�1鏃朵笉杩涜楂樺害閲嶆柊璁剧疆锛屽洜涓簊crollY鍙樺ぇ鍚庤〃鏍艰秴鍑洪儴鍒嗕細琚殣钘忓鑷存粴鍔ㄦ潯涓嶅彲瑙� const clientHeight = document.body.clientHeight // 娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴� @@ -365,35 +368,39 @@ margin: 20px 0; } - .device_list{ + .device_list { overflow: hidden; display: flex; flex-direction: column; } - @media screen and (min-width: 1920px){ - .device_list{ - height: 811px!important; + @media screen and (min-width: 1920px) { + .device_list { + height: 811px !important; } } - @media screen and (min-width: 1680px) and (max-width: 1920px){ - .device_list{ - height: 811px!important; + + @media screen and (min-width: 1680px) and (max-width: 1920px) { + .device_list { + height: 811px !important; } } - @media screen and (min-width: 1400px) and (max-width: 1680px){ - .device_list{ - height: 663px!important; + + @media screen and (min-width: 1400px) and (max-width: 1680px) { + .device_list { + height: 663px !important; } } - @media screen and (min-width: 1280px) and (max-width: 1400px){ - .device_list{ - height: 564px!important; + + @media screen and (min-width: 1280px) and (max-width: 1400px) { + .device_list { + height: 564px !important; } } - @media screen and (max-width: 1280px){ - .device_list{ - height: 564px!important; + + @media screen and (max-width: 1280px) { + .device_list { + height: 564px !important; } } -- Gitblit v1.9.3