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/DailyInspectionStandardList.vue | 93 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 91 insertions(+), 2 deletions(-) diff --git a/src/views/eam/DailyInspectionStandardList.vue b/src/views/eam/DailyInspectionStandardList.vue index 6025a98..8473bf0 100644 --- a/src/views/eam/DailyInspectionStandardList.vue +++ b/src/views/eam/DailyInspectionStandardList.vue @@ -1,6 +1,6 @@ <template> <a-card - title="鑷富缁存姢鐐规鏍囧噯" + title="" :bordered='false' > <div class='table-page-search-wrapper'> @@ -83,6 +83,17 @@ </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> @@ -137,6 +148,24 @@ :customRow='clickThenSelect' @change='handleTableChange' > + <span + slot="disUda1" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="10" + /> + </span> + <span + slot="teamName" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="10" + /> + </span> <!-- <span slot='action' @@ -244,16 +273,18 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import { getAction, requestPut } from '@/api/manage' +import { getAction, requestPut, downFile } from '@/api/manage' import DailyInspectionStandardDetail from './modules/dailyInspectionStandard/DailyInspectionStandardDetail' import DailylnspectionStandardModal from './modules/dailyInspectionStandard/DailylnspectionStandardModal' import AuditApprovalModal from './modules/dailyInspectionStandard/AuditApprovalModal' import '@/assets/less/TableExpand.less' +import JEllipsis from "@/components/jeecg/JEllipsis"; export default { name: 'DailyInspectionStandardList', mixins: [JeecgListMixin], components: { + JEllipsis, DailyInspectionStandardDetail, DailylnspectionStandardModal, AuditApprovalModal @@ -276,6 +307,12 @@ title: '鏍囧噯缂栫爜', align: 'center', dataIndex: 'num', + }, + { + title: '绠$悊鍒跺害', + align: 'center', + dataIndex: 'disUda1', + scopedSlots: { customRender: 'disUda1' }, }, { title: '绛惧鐘舵��', @@ -307,6 +344,7 @@ title: '璐d换鐝粍', align: 'center', dataIndex: 'teamName', + scopedSlots: { customRender: 'teamName' }, }, // { // title: '娲惧伐鏂瑰紡', @@ -314,9 +352,19 @@ // dataIndex: 'assignModeName', // }, { + title: '瀹℃牳缁撴灉', + align: 'center', + dataIndex: 'disUda2', + }, + { title: '瀹℃牳鎰忚', align: 'center', dataIndex: 'auditFeedback', + }, + { + title: '瀹℃壒缁撴灉', + align: 'center', + dataIndex: 'disUda3', }, { title: '瀹℃壒鎰忚', @@ -403,6 +451,8 @@ versionTakeEffect: "/eam/inspectionStandard/versionTakeEffect", importExcelUrl: "/eam/inspectionStandard/importExcel", passBatch: '/eam/inspectionStandard/auditApprovalBatch', + download: '/sys/upload/downloadFile', + uploadList: '/sys/upload/list', }, version: '1.0', dictOptions: {}, @@ -634,6 +684,45 @@ } }, + handleDownload() { + var params = {}//鏌ヨ鏉′欢 + params.type = "inspection" + 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/934677113625829376?id=` + record.id; //缃戠珯閾炬帴 + window.open(href, "_blank"); + }, + } } </script> -- Gitblit v1.9.3