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/DailyMaintenanceStandard3List.vue | 88 +++++++++++++++++++++++++++++++++++++------ 1 files changed, 75 insertions(+), 13 deletions(-) diff --git a/src/views/eam/DailyMaintenanceStandard3List.vue b/src/views/eam/DailyMaintenanceStandard3List.vue index 96409ab..33bdd9d 100644 --- a/src/views/eam/DailyMaintenanceStandard3List.vue +++ b/src/views/eam/DailyMaintenanceStandard3List.vue @@ -1,6 +1,6 @@ <template> <a-card - title="涓夌骇淇濆吇鏍囧噯" + title="" :bordered='false' > <div class='table-page-search-wrapper'> @@ -91,17 +91,6 @@ icon='plus' v-has="'dailyMaintenance3Standard: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" @@ -116,6 +105,28 @@ v-has="'dailyMaintenance3Standard: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 --> @@ -287,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/dailyMaintenanceStandard3/DailyMaintenanceStandardDetail' import MaintenanceStandardPlanningMaterial from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardPlanningMaterial' import MaintenanceStandardSafetyRequirement from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardSafetyRequirement' @@ -367,9 +378,19 @@ // dataIndex: 'specificEquipment', // }, { + title: '瀹℃牳缁撴灉', + align: 'center', + dataIndex: 'maintenanceStandardUda1', + }, + { title: '瀹℃牳鎰忚', align: 'center', dataIndex: 'auditFeedback', + }, + { + title: '瀹℃壒缁撴灉', + align: 'center', + dataIndex: 'maintenanceStandardUda2', }, { title: '瀹℃壒鎰忚', @@ -455,6 +476,8 @@ deleteBatch: '/eam/maintenanceStandard/deleteBatch', versionTakeEffect: "/eam/maintenanceStandard/versionTakeEffect", importExcelUrl: "/eam/maintenanceStandard/importExcelOfTwoMaintenance", + download: '/sys/upload/downloadFile', + uploadList: '/sys/upload/list', }, /* 鍒嗛〉鍙傛暟 */ ipagination: { @@ -592,6 +615,45 @@ this.queryParam = { type: 'daily', maintenanceType: '3' } this.loadData(1); }, + + handleDownload() { + var params = {}//鏌ヨ鏉′欢 + params.type = "threeMaintenance" + 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/934708250372923392?id=` + record.id; //缃戠珯閾炬帴 + window.open(href, "_blank"); + }, } } </script> -- Gitblit v1.9.3