From 1d79d3950a3d8c489ca9ee2c88a50b01e2b5ab6e Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 09 五月 2024 14:54:32 +0800 Subject: [PATCH] 新增首页看板点击图表出现的弹窗组件 --- src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue index f6ae0f2..d5cad81 100644 --- a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue +++ b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue @@ -5,7 +5,7 @@ <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="5" :sm="5" :xs="5"> + <a-col :md="4" :sm="4" :xs="4"> <a-form-item label="椹卞姩绫诲瀷"> <a-auto-complete v-model="queryParam.driveType" @@ -17,7 +17,20 @@ </a-form-item> </a-col> - <a-col :md="7" :sm="7" :xs="7"> + <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="['寮�濮嬫椂闂�', '缁撴潫鏃堕棿']" @@ -33,6 +46,7 @@ <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> @@ -334,9 +348,12 @@ * 褰撴祻瑙堝櫒鍙绐楀彛灏哄鍙戠敓鏀瑰彉鏃惰Е鍙� */ handleWindowResize(){ - const boxHeight = +window.getComputedStyle(document.getElementById('EfficiencyShift')).height.slice(0,-2) - const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0,-2) - this.scrollY = boxHeight - tableHeadHeight + const devicePixelRatio = window.devicePixelRatio // 娴忚鍣ㄧ缉鏀炬瘮 + if (devicePixelRatio < 1) return // 缂╂斁姣斿皬浜�1鏃朵笉杩涜楂樺害閲嶆柊璁剧疆锛屽洜涓簊crollY鍙樺ぇ鍚庤〃鏍艰秴鍑洪儴鍒嗕細琚殣钘忓鑷存粴鍔ㄦ潯涓嶅彲瑙� + const clientHeight = document.body.clientHeight // 娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴� + const containerTopToClientTopHeight = document.getElementById('EfficiencyShift').getBoundingClientRect().top // 琛ㄦ牸瀹瑰櫒椤堕儴鍒版祻瑙堝櫒鍙鍖哄煙椤堕儴鐨勯棿璺� + const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0, -2) // 琛ㄦ牸琛ㄥご楂樺害 + this.scrollY = clientHeight - containerTopToClientTopHeight - tableHeadHeight // 琛ㄦ牸鍨傜洿婊氬姩鏉¢珮搴� } } } -- Gitblit v1.9.3