From a751e547d67c4f8e2c6fddf958c1559f792515bd Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期五, 27 六月 2025 16:11:50 +0800 Subject: [PATCH] 添加工作流 --- src/views/eam/DailyMaintenanceStandardList.vue | 103 +++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 83 insertions(+), 20 deletions(-) diff --git a/src/views/eam/DailyMaintenanceStandardList.vue b/src/views/eam/DailyMaintenanceStandardList.vue index 38a7ee1..4edd32c 100644 --- a/src/views/eam/DailyMaintenanceStandardList.vue +++ b/src/views/eam/DailyMaintenanceStandardList.vue @@ -1,6 +1,6 @@ <template> <a-card - title="鍛ㄦ湡鎬т繚鍏绘爣鍑�" + title="" :bordered='false' > <div class='table-page-search-wrapper'> @@ -28,10 +28,10 @@ :md='8' :sm='24' > - <a-form-item label='璁惧鍚嶇О'> + <a-form-item label='缁熶竴缂栧彿'> <a-input - placeholder='璇疯緭鍏ヨ澶囧悕绉�' - v-model='queryParam.name' + placeholder='璇疯緭鍏ョ粺涓�缂栧彿' + v-model='queryParam.equipmentNum' ></a-input> </a-form-item> </a-col> @@ -91,17 +91,6 @@ icon='plus' v-has="'dailyMaintenanceStandard:add'" >缂栧埗</a-button> - <a-button - type='primary' - @click='searchQuery' - icon='search' - >鏌ヨ</a-button> - <a-button - type='primary' - @click='searchReset' - icon='reload' - style='margin-left: 8px' - >閲嶇疆</a-button> <a-upload name="file" :showUploadList="false" @@ -113,8 +102,31 @@ <a-button type="primary" icon="import" + v-has="'dailyMaintenanceStandard:import'" >瀵煎叆</a-button> </a-upload> + <a-button + type="primary" + @click="handleDownload" + icon="download" + >妯$増涓嬭浇</a-button> + <a-button + v-show="selectedRowKeys.length == 1 " + type="primary" + @click="handlePrint(selectionRows[0])" + icon="highlight" + >妯$増鎵撳嵃</a-button> + <a-button + type='primary' + @click='searchQuery' + icon='search' + >鏌ヨ</a-button> + <a-button + type='primary' + @click='searchReset' + icon='reload' + style='margin-left: 8px' + >閲嶇疆</a-button> </div> <!-- table鍖哄煙-begin --> @@ -286,7 +298,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import { getAction, postAction, requestPut } from '@/api/manage' +import { getAction, postAction, requestPut, downFile } from '@/api/manage' import DailyMaintenanceStandardDetail from './modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail' import MaintenanceStandardPlanningMaterial from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardPlanningMaterial' import MaintenanceStandardSafetyRequirement from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardSafetyRequirement' @@ -366,9 +378,19 @@ // dataIndex: 'specificEquipment', // }, { + title: '瀹℃牳缁撴灉', + align: 'center', + dataIndex: 'maintenanceStandardUda1', + }, + { title: '瀹℃牳鎰忚', align: 'center', dataIndex: 'auditFeedback', + }, + { + title: '瀹℃壒缁撴灉', + align: 'center', + dataIndex: 'maintenanceStandardUda2', }, { title: '瀹℃壒鎰忚', @@ -454,12 +476,14 @@ deleteBatch: '/eam/maintenanceStandard/deleteBatch', versionTakeEffect: "/eam/maintenanceStandard/versionTakeEffect", importExcelUrl: "/eam/maintenanceStandard/importExcelOfTwoMaintenance", + download: '/sys/upload/downloadFile', + uploadList: '/sys/upload/list', }, /* 鍒嗛〉鍙傛暟 */ ipagination: { current: 1, - pageSize: 5, - pageSizeOptions: ['5', '10', '50'], + pageSize: 20, + pageSizeOptions: ['5', '10', '20', '50'], showTotal: (total, range) => { return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' }, @@ -468,7 +492,7 @@ total: 0 }, maintenanceStandardId: '-1', - queryParam: { type: 'daily' } + queryParam: { type: 'daily', maintenanceType: '2' } } }, computed: { @@ -588,9 +612,48 @@ searchReset() { this.maintenanceStandardId = '-1' - this.queryParam = { type: 'daily' } + this.queryParam = { type: 'daily', maintenanceType: '2' } this.loadData(1); }, + + handleDownload() { + var params = {}//鏌ヨ鏉′欢 + params.type = "twoMaintenance" + params.pageNo = 1 + params.pageSize = 10 + getAction(this.url.uploadList, params).then((res2) => { + if (res2.success) { + if (res2.result.records.length > 0) { + downFile(this.url.download, { id: res2.result.records[0].id }).then((res) => { + if (!res) { + this.$message.warning('鏂囦欢涓嬭浇澶辫触') + return + } else { + let fileName = res2.result.records[0].name + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([res]), fileName) + } else { + let url = window.URL.createObjectURL(new Blob([res])) + let link = document.createElement('a') + link.style.display = 'none' + link.href = url + link.setAttribute('download', fileName) + document.body.appendChild(link) + link.click() + document.body.removeChild(link) //涓嬭浇瀹屾垚绉婚櫎鍏冪礌 + window.URL.revokeObjectURL(url) //閲婃斁鎺塨lob瀵硅薄 + } + } + }) + } + } + }) + }, + + handlePrint(record) { + let href = `${window._CONFIG['domianURL']}/jmreport/view/934696640354902016?id=` + record.id; //缃戠珯閾炬帴 + window.open(href, "_blank"); + }, } } </script> -- Gitblit v1.9.3