From d2547913ef2e150d8bb18bc8f7423515c7ed71d0 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 25 四月 2025 14:04:29 +0800 Subject: [PATCH] 1、调整设备台账铭牌二维码大小 2、待机停机页面功能开发 --- src/views/mdc/base/modules/EquipmentStandbyShutDown/EquipmentStandbyShutdownList.vue | 302 +++++++++++++++++++++++++------------------------ 1 files changed, 155 insertions(+), 147 deletions(-) diff --git a/src/views/mdc/base/modules/EquipmentStandbyShutDown/EquipmentStandbyShutdownList.vue b/src/views/mdc/base/modules/EquipmentStandbyShutDown/EquipmentStandbyShutdownList.vue index 4aa61a5..bbbc17b 100644 --- a/src/views/mdc/base/modules/EquipmentStandbyShutDown/EquipmentStandbyShutdownList.vue +++ b/src/views/mdc/base/modules/EquipmentStandbyShutDown/EquipmentStandbyShutdownList.vue @@ -6,17 +6,26 @@ <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> <a-col :md="4" :sm="4"> - <a-form-item label="鏃ユ湡"> - <a-date-picker value-format="YYYY-MM-DD" style="width: 100%" v-model="queryParam.theDate"/> + <a-form-item label="鍋滄満鏃ユ湡"> + <a-date-picker placeholder="璇烽�夋嫨鍋滄満鏃ユ湡" value-format="YYYY-MM-DD" style="width: 100%" + v-model="queryParam.theDate" :allow-clear="false"/> </a-form-item> </a-col> - <a-col :md="2" :sm="2" :xs="2"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-col :md="4" :sm="4" :xs="4"> + <a-space> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button @click="searchReset" icon="reload">閲嶇疆</a-button> + </a-space> </a-col> </a-row> </a-form> </div> + </div> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> </div> <div style="overflow: hidden;width: 100%;flex: 1" id="DeviceList"> @@ -30,7 +39,7 @@ </template> <template slot="action" slot-scope="text, record"> - <a @click="handleReport(record)">涓婃姤</a> + <a @click="handleEdit(record)">缂栬緫</a> <a-divider type="vertical"/> @@ -46,168 +55,167 @@ </template> <script> -import moment from 'moment' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import EquipmentStandbyShutdownModal - from '@views/mdc/base/modules/EquipmentStandbyShutDown/EquipmentStandbyShutdownModal.vue' + import moment from 'moment' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import EquipmentStandbyShutdownModal + from '@views/mdc/base/modules/EquipmentStandbyShutDown/EquipmentStandbyShutdownModal.vue' -export default { - name: 'EquipmentStandbyShutdownList', - components: { EquipmentStandbyShutdownModal }, - mixins: [JeecgListMixin], - data() { - return { - disableMixinCreated: true, - scrollY: 465, - queryParam: { - theDate: moment().subtract('days', 1).format('YYYY-MM-DD') - }, - columns: [ - { - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 60, - align: 'center', - customRender: function(t, r, index) { - return parseInt(index) + 1 + export default { + name: 'EquipmentStandbyShutdownList', + components: { EquipmentStandbyShutdownModal }, + mixins: [JeecgListMixin], + data() { + return { + disableMixinCreated: true, + scrollY: 465, + queryParam: { + theDate: moment().subtract('days', 1).format('YYYY-MM-DD') + }, + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '璁惧缂栧彿', + align: 'center', + dataIndex: 'equipmentId', + width: 200 + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName', + width: 200 + }, + { + title: '鍋滄満绫诲瀷', + align: 'center', + dataIndex: 'downtimeType', + scopedSlots: { customRender: 'downtimeType' }, + width: 150 + }, + { + title: '鍋滄満鍘熷洜', + align: 'center', + dataIndex: 'downtimeDescription', + width: 200 + }, + { + title: '鍋滄満鏃ユ湡', + align: 'center', + dataIndex: 'theDate', + width: 150 + }, + { + title: '鍋滄満鏃堕暱(min)', + align: 'center', + dataIndex: 'downLong', + width: 150 + }, + { + title: '澶囨敞', + align: 'center', + dataIndex: 'remark' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + width: 150, + scopedSlots: { customRender: 'action' }, + fixed: 'right' } - }, - { - title: '璁惧缂栧彿', - align: 'center', - dataIndex: 'equipmentId', - width: 200 - }, - { - title: '璁惧鍚嶇О', - align: 'center', - dataIndex: 'equipmentName', - width: 200 - }, - { - title: '鍋滄満绫诲瀷', - align: 'center', - dataIndex: 'downtimeType', - scopedSlots: { customRender: 'downtimeType' }, - width: 150 - }, - { - title: '鍋滄満鍘熷洜', - align: 'center', - dataIndex: 'downtimeDescription', - width: 200 - }, - { - title: '寮�濮嬫椂闂�', - align: 'center', - dataIndex: 'startDate', - width: 150 - }, - { - title: '缁撴潫鏃堕棿', - align: 'center', - dataIndex: 'endDate', - width: 150 - }, - { - title: '澶囨敞', - align: 'center', - dataIndex: 'remark', - width: 200 - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - width: 150, - scopedSlots: { customRender: 'action' }, - fixed: 'right' + ], + url: { + list: '/mdc/mdcDowntime/list', + delete: '/mdc/mdcDowntime/delete' } - ], - url: { - list: '/mdc/mdcDowntime/list', - delete: '/mdc/mdcDowntime/delete' } - } - }, - props: { node: {}, Type: '' }, - created() { - this.queryParam.typeTree = '1' - this.loadData() - }, - mounted() { - window.addEventListener('resize', this.handleWindowResize) - this.handleWindowResize() - }, - beforeDestroy() { - window.removeEventListener('resize', this.handleWindowResize) - }, - watch: { - Type(valmath) { - this.queryParam.typeTree = valmath }, - node(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 - if (JSON.stringify(val) != '{}') { - if (val.equipmentId != null) { - this.queryParam.equipmentId = val.equipmentId - this.queryParam.parentId = '' - } else { - this.queryParam.parentId = val.key - this.queryParam.equipmentId = '' + props: { node: {}, Type: '' }, + created() { + this.queryParam.typeTree = '1' + this.loadData() + }, + mounted() { + window.addEventListener('resize', this.handleWindowResize) + this.handleWindowResize() + }, + beforeDestroy() { + window.removeEventListener('resize', this.handleWindowResize) + }, + watch: { + Type(valmath) { + this.queryParam.typeTree = valmath + }, + node(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + if (JSON.stringify(val) != '{}') { + if (val.equipmentId != null) { + this.queryParam.equipmentId = val.equipmentId + this.queryParam.parentId = '' + } else { + this.queryParam.parentId = val.key + this.queryParam.equipmentId = '' + } + this.loadData(1) } + } + }, + methods: { + searchReset() { + this.queryParam = { theDate: moment().subtract('days', 1).format('YYYY-MM-DD') } this.loadData(1) - } - } - }, - methods: { - handleReport(record) { - this.$refs.modalForm.edit(record) - this.$refs.modalForm.title = '涓婃姤' - }, + }, - handleWindowResize() { - const boxHeight = +window.getComputedStyle(document.getElementById('DeviceList')).height.slice(0, -2) - const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0, -2) - this.scrollY = boxHeight - tableHeadHeight - 50 + handleWindowResize() { + const boxHeight = +window.getComputedStyle(document.getElementById('DeviceList')).height.slice(0, -2) + const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0, -2) + this.scrollY = boxHeight - tableHeadHeight - 50 + } } } -} </script> <style scoped> -.page-container { - overflow: hidden; - display: flex; - flex-direction: column; -} - -@media screen and (min-width: 1920px) { .page-container { - height: 812px !important; + overflow: hidden; + display: flex; + flex-direction: column; } -} -@media screen and (min-width: 1680px) and (max-width: 1920px) { - .page-container { - height: 812px !important; + @media screen and (min-width: 1920px) { + .page-container { + height: 812px !important; + } } -} -@media screen and (min-width: 1400px) and (max-width: 1680px) { - .page-container { - height: 664px !important; + @media screen and (min-width: 1680px) and (max-width: 1920px) { + .page-container { + height: 812px !important; + } } -} -@media screen and (min-width: 1280px) and (max-width: 1400px) { - .page-container { - height: 565px !important; + @media screen and (min-width: 1400px) and (max-width: 1680px) { + .page-container { + height: 664px !important; + } } -} -@media screen and (max-width: 1280px) { - .page-container { - height: 565px !important; + @media screen and (min-width: 1280px) and (max-width: 1400px) { + .page-container { + height: 565px !important; + } } -} + + @media screen and (max-width: 1280px) { + .page-container { + height: 565px !important; + } + } </style> \ No newline at end of file -- Gitblit v1.9.3