From b6d89c86d31ad156185893659913b92e4631d25c Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 21 八月 2025 17:35:49 +0800 Subject: [PATCH] 1、产品质量隐患确认表批量打印及导出功能 2、调整点检和二保批量打印功能代码 --- src/views/eam/maintenance/EamInspectionOrderList.vue | 7 src/views/eam/repair/modules/EamProductHazardsBatchPrintModal.vue | 218 ++++++++++++++++++++++++ src/views/eam/repair/EamReportProductHazardsList.vue | 140 +++++++-------- src/views/eam/maintenance/modules/EamInspectionOrderBatchPrintModal.vue | 5 src/views/eam/maintenance/modules/EamSecondMaintenanceOrderBatchPrintModal.vue | 5 src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue | 161 +++++++---------- 6 files changed, 358 insertions(+), 178 deletions(-) diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue index da54591..1da8178 100644 --- a/src/views/eam/maintenance/EamInspectionOrderList.vue +++ b/src/views/eam/maintenance/EamInspectionOrderList.vue @@ -60,14 +60,15 @@ <!--</a-button>--> <!--</a-dropdown>--> - <a-button type="primary" icon="delete" @click="batchZf('ABOLISH')" v-has="'eam:inspection:abolish'" - :disabled="selectedRowKeys.length===0">鎵归噺浣滃簾 - </a-button> + <a-button type="primary" icon="form" @click="batchLq('UNDER_INSPECTION')" v-has="'eam:inspection:collect'" :disabled="selectedRowKeys.length===0">鎵归噺棰嗗彇 </a-button> <a-button type="primary" icon="monitor" @click="handleBatchPrint" :disabled="selectedRowKeys.length===0">鎵归噺棰勮 </a-button> + <a-button type="danger" icon="delete" @click="batchZf('ABOLISH')" v-has="'eam:inspection:abolish'" + :disabled="selectedRowKeys.length===0">鎵归噺浣滃簾 + </a-button> </div> <!-- table鍖哄煙-begin --> diff --git a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue index e5a267a..a675c0b 100644 --- a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue @@ -41,21 +41,20 @@ <a-button v-has="'secondMaintenanceOrder:add'" @click="handleAdd" type="primary" icon="plus">鏂板</a-button> <a-button v-has="'secondMaintenanceOrder:batchAdd'" @click="handleBatchAdd" type="primary" icon="plus">鎵归噺鏂板 </a-button> - <a-button v-has="'secondMaintenanceOrder:batchAbolish'" @click="handlerBatchAbolish" type="primary" - icon="delete" :disabled="selectedRowKeys.length===0"> - 鎵归噺浣滃簾 - </a-button> + <a-button v-has="'secondMaintenanceOrder:batchCollect'" @click="handlerBatchCollect" type="primary" icon="form" :disabled="selectedRowKeys.length===0"> 鎵归噺棰嗗彇 </a-button> - <a-button v-has="'secondMaintenanceOrder:batchRestore'" @click="handlerBatchRestore" type="primary" - :disabled="selectedRowKeys.length===0" - icon="reload"> - 鎵归噺杩樺師 + <a-button @click="handleBatchPrint" type="primary" icon="monitor" :disabled="selectedRowKeys.length===0">鎵归噺棰勮 </a-button> - <a-button v-has="'secondMaintenanceOrder:batchAdd'" @click="handleBatchPrint" type="primary" icon="monitor" - :disabled="selectedRowKeys.length===0">鎵归噺棰勮 + <a-button v-has="'secondMaintenanceOrder:batchAbolish'" @click="handlerBatchAbolish" type="danger" + icon="delete" :disabled="selectedRowKeys.length===0"> + 鎵归噺浣滃簾 + </a-button> + <a-button v-has="'secondMaintenanceOrder:batchRestore'" @click="handlerBatchRestore" + :disabled="selectedRowKeys.length===0" icon="reload"> + 鎵归噺杩樺師 </a-button> <!-- <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> @@ -446,102 +445,68 @@ //鎵归噺杩樺師 handlerBatchRestore() { - if (!this.url.restoreBatch) { - this.$message.error('璇疯缃畊rl.restoreBatch灞炴��!') - return + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' } - if (this.selectedRowKeys.length <= 0) { - // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); - this.$notification.warning({ - message: '娑堟伅', - description: '璇烽�夋嫨涓�鏉¤褰�' - }) - return - } else { - var ids = '' - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ',' + var that = this + this.$confirm({ + title: '纭杩樺師', + content: '鏄惁杩樺師閫変腑鏁版嵁锛屽彧鏈変綔搴熺姸鎬佺殑鏁版嵁鎵嶅彲杩樺師鎴愬姛?', + onOk: function() { + that.loading = true + deleteAction(that.url.restoreBatch, { ids: ids }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + that.onClearSelected() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.loading = false + }) } - var that = this - this.$confirm({ - title: '纭杩樺師', - content: '鏄惁杩樺師閫変腑鏁版嵁锛屽彧鏈変綔搴熺姸鎬佺殑鏁版嵁鎵嶅彲杩樺師鎴愬姛?', - onOk: function() { - that.loading = true - deleteAction(that.url.restoreBatch, { ids: ids }).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.reCalculatePage(that.selectedRowKeys.length) - // that.$message.success(res.message); - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - that.onClearSelected() - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }).finally(() => { - that.loading = false - }) - } - }) - } + }) }, //鎵归噺棰嗗彇 handlerBatchCollect() { - if (!this.url.collectBatch) { - this.$message.error('璇疯缃畊rl.abolishBatch灞炴��!') - return + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' } - if (this.selectedRowKeys.length <= 0) { - // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); - this.$notification.warning({ - message: '娑堟伅', - description: '璇烽�夋嫨涓�鏉¤褰�' - }) - return - } else { - var ids = '' - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ',' + var that = this + this.$confirm({ + title: '纭棰嗗彇', + content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?', + onOk: function() { + that.loading = true + deleteAction(that.url.collectBatch, { ids: ids }).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + that.onClearSelected() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.loading = false + }) } - var that = this - this.$confirm({ - title: '纭棰嗗彇', - content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?', - onOk: function() { - that.loading = true - deleteAction(that.url.collectBatch, { ids: ids }).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.reCalculatePage(that.selectedRowKeys.length) - // that.$message.success(res.message); - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - that.onClearSelected() - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }).finally(() => { - that.loading = false - }) - } - }) - } + }) }, // 鎵归噺鎵撳嵃 diff --git a/src/views/eam/maintenance/modules/EamInspectionOrderBatchPrintModal.vue b/src/views/eam/maintenance/modules/EamInspectionOrderBatchPrintModal.vue index dbc9c10..5c5280e 100644 --- a/src/views/eam/maintenance/modules/EamInspectionOrderBatchPrintModal.vue +++ b/src/views/eam/maintenance/modules/EamInspectionOrderBatchPrintModal.vue @@ -111,7 +111,7 @@ <template slot="footer"> <a-button @click="handleCancel">鍏抽棴</a-button> - <a-button type="primary" @click="handleImport">瀵煎嚭</a-button> + <a-button type="primary" @click="handleExportToExcel">瀵煎嚭</a-button> <a-button type="primary" v-print="'#dataTable'">鎵撳嵃</a-button> </template> </j-modal> @@ -153,7 +153,8 @@ }) }, - handleImport() { + // 瀵煎嚭鍒癊xcel + handleExportToExcel() { document.querySelectorAll('table.import-table').forEach(element => { console.log('element', element.id) $(element).table2excel({ diff --git a/src/views/eam/maintenance/modules/EamSecondMaintenanceOrderBatchPrintModal.vue b/src/views/eam/maintenance/modules/EamSecondMaintenanceOrderBatchPrintModal.vue index 7f531ec..f4b6b7d 100644 --- a/src/views/eam/maintenance/modules/EamSecondMaintenanceOrderBatchPrintModal.vue +++ b/src/views/eam/maintenance/modules/EamSecondMaintenanceOrderBatchPrintModal.vue @@ -98,7 +98,7 @@ <template slot="footer"> <a-button @click="handleCancel">鍏抽棴</a-button> - <a-button type="primary" @click="handleImport">瀵煎嚭</a-button> + <a-button type="primary" @click="handleExportToExcel">瀵煎嚭</a-button> <a-button type="primary" v-print="'#dataTable'">鎵撳嵃</a-button> </template> </j-modal> @@ -140,7 +140,8 @@ }) }, - handleImport() { + // 瀵煎嚭鍒癊xcel + handleExportToExcel() { document.querySelectorAll('table.import-table').forEach(element => { console.log('element', element.id) $(element).table2excel({ diff --git a/src/views/eam/repair/EamReportProductHazardsList.vue b/src/views/eam/repair/EamReportProductHazardsList.vue index 4aefc27..24e6ddc 100644 --- a/src/views/eam/repair/EamReportProductHazardsList.vue +++ b/src/views/eam/repair/EamReportProductHazardsList.vue @@ -35,38 +35,22 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> -<!-- <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>--> -<!-- <a-button type="primary" icon="download" @click="handleExportXls('浜у搧瀹夊叏闅愭偅纭')">瀵煎嚭</a-button>--> -<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> -<!-- <a-button type="primary" icon="import">瀵煎叆</a-button>--> -<!-- </a-upload>--> - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> - </a-dropdown> + <a-button @click="handleBatchPrint" type="primary" icon="monitor" :disabled="selectedRowKeys.length===0">鎵归噺棰勮 + </a-button> + <a-button icon="delete" type="danger" @click="batchDel" :disabled="selectedRowKeys.length===0">鎵归噺鍒犻櫎</a-button> </div> <!-- table鍖哄煙-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ + selectedRowKeys.length }}</a>椤� <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> </div> - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - :scroll="{x:'max-content'}" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> + <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" + :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> <span slot="action" slot-scope="text, record"> <template v-if="record.confirmStatus==='PENDING_SUBMIT'"> @@ -94,7 +78,10 @@ <!--瀹℃壒绐楀彛--> <report-product-hazards-approval-modal ref="reportProductHazardsApprovalModal" - :selectShenpiData="selectedRowData"/> + :selectShenpiData="selectedRowData"/> + + <!--鎵归噺鎵撳嵃寮圭獥--> + <eam-product-hazards-batch-print-modal ref="batchPrintModal"/> </a-card> </template> @@ -102,15 +89,17 @@ import '@/assets/less/TableExpand.less' import EamReportProductHazardsModal from './modules/EamReportProductHazardsModal' import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import {getAction} from "@api/manage"; + import { getAction } from '@api/manage' import ReportProductHazardsApprovalModal - from "@views/flowable/workflow/repairOrder/ReportProductHazardsApprovalModal.vue"; - import LxSearchEquipmentSelect from "@views/eam/equipment/modules/LxSearchEquipmentSelect.vue"; + from '@views/flowable/workflow/repairOrder/ReportProductHazardsApprovalModal.vue' + import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' + import EamProductHazardsBatchPrintModal from './modules/EamProductHazardsBatchPrintModal' export default { - name: "EamReportProductHazardsList", - mixins:[JeecgListMixin], + name: 'EamReportProductHazardsList', + mixins: [JeecgListMixin], components: { + EamProductHazardsBatchPrintModal, LxSearchEquipmentSelect, ReportProductHazardsApprovalModal, EamReportProductHazardsModal @@ -124,7 +113,7 @@ type: Object } }, - data () { + data() { return { description: '浜у搧瀹夊叏闅愭偅纭绠$悊椤甸潰', disableMixinCreated: true, @@ -181,74 +170,74 @@ align: 'center', dataIndex: 'quantity' }, - { + { title: '鎿嶄綔宸�', - align:"center", + align: 'center', dataIndex: 'confirmer_dictText' - }, - { + }, + { title: '鎿嶄綔宸ョ‘璁ゆ椂闂�', - align:"center", + align: 'center', dataIndex: 'confirmTime' - }, - { + }, + { title: '浜у搧鎹熷け鎯呭喌', - align:"center", + align: 'center', dataIndex: 'productLoss_dictText' - }, - { + }, + { title: '浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽', - align:"center", + align: 'center', dataIndex: 'qualityAnalysis', scopedSlots: { customRender: 'qualityAnalysis' } - }, - { + }, + { title: '涓荤宸ヨ壓', - align:"center", + align: 'center', dataIndex: 'technologist_dictText' - }, - { + }, + { title: '涓荤宸ヨ壓纭鏃堕棿', - align:"center", + align: 'center', dataIndex: 'technologistTime' - }, - { + }, + { title: '涓荤宸ヨ壓纭鎰忚', - align:"center", + align: 'center', dataIndex: 'technologistComment' - }, - { + }, + { title: '閮ㄧ骇棰嗗', - align:"center", + align: 'center', dataIndex: 'deputyDepartment_dictText' - }, - { + }, + { title: '閮ㄧ骇棰嗗纭鏃堕棿', - align:"center", + align: 'center', dataIndex: 'deputyDepartmentTime' - }, - { + }, + { title: '閮ㄧ骇棰嗗纭鎰忚', - align:"center", + align: 'center', dataIndex: 'deputyDepartmentComment' - }, - { + }, + { title: 'HF缂栫爜', align: 'center', dataIndex: 'hfCode' - }, + } ], selectedRowData: {}, - url: { - list: "/eam/eamReportProductHazards/list", - delete: "/eam/eamReportProductHazards/delete", - deleteBatch: "/eam/eamReportProductHazards/deleteBatch", - exportXlsUrl: "eam/eamReportProductHazards/exportXls", - importExcelUrl: "eam/eamReportProductHazards/importExcel", - submit:"/eam/eamReportProductHazards/submit", - }, - } - }, + url: { + list: '/eam/eamReportProductHazards/list', + delete: '/eam/eamReportProductHazards/delete', + deleteBatch: '/eam/eamReportProductHazards/deleteBatch', + exportXlsUrl: 'eam/eamReportProductHazards/exportXls', + importExcelUrl: 'eam/eamReportProductHazards/importExcel', + submit: '/eam/eamReportProductHazards/submit' + } + } + }, created() { if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam) else { @@ -289,6 +278,11 @@ }) }, + // 鎵归噺鎵撳嵃 + handleBatchPrint() { + this.$refs.batchPrintModal.handlePreview(this.selectedRowKeys.join()) + }, + /** * 鐐瑰嚮璇︽儏鏃惰Е鍙戞椂瑙﹀彂 * @param record diff --git a/src/views/eam/repair/modules/EamProductHazardsBatchPrintModal.vue b/src/views/eam/repair/modules/EamProductHazardsBatchPrintModal.vue new file mode 100644 index 0000000..5c2ec46 --- /dev/null +++ b/src/views/eam/repair/modules/EamProductHazardsBatchPrintModal.vue @@ -0,0 +1,218 @@ +<template> + <j-modal title="棰勮锛堜粎鍙瑙堝凡瀹屾垚宸ュ崟锛�" :width="948" :visible="visible" switchFullscreen centered + :mask-closable="false" @cancel="handleCancel" cancelText="鍏抽棴"> + <a-spin :spinning="spinning" style="height: 100%"> + <div id="dataTable"> + <div v-for="dataItem in dataSource" class="table-container"> + <div style="page-break-before:always"></div> + + <table class="import-table" :id="dataItem.equipmentCode"> + <thead> + <tr> + <td colspan="12" style="border: none"> + <div style="text-align: right">{{dataItem.hfCode}}</div> + </td> + </tr> + </thead> + + <tbody> + <tr style="height: 48px;"> + <th colspan="12" style="border: none;font-size: 20px">浜у搧璐ㄩ噺闅愭偅纭琛�</th> + </tr> + + <tr> + <td colspan="6" style="border: none;padding-left: 20px"> + <div style="text-align: left">浣跨敤鍗曚綅锛歿{dataItem.factoryName}}</div> + </td> + <td colspan="6" style="border: none;padding-right: 20px"> + <div style="text-align: right"> + {{dataItem.confirmTime.split('-')[0]}} 骞� {{dataItem.confirmTime.split('-')[1]}} 鏈� + {{dataItem.confirmTime.split('-')[2]}} 鏃� + </div> + </td> + </tr> + + <tr> + <td colspan="2">璁惧鍚嶇О</td> + <td colspan="2">{{dataItem.equipmentName}}</td> + <td colspan="2">璁惧鍨嬪彿</td> + <td colspan="2">{{dataItem.equipmentModel}}</td> + <td colspan="2">缁熶竴缂栧彿</td> + <td colspan="2">{{dataItem.equipmentCode}}</td> + </tr> + + <tr> + <td colspan="2">鍔犲伐闆朵欢鍙�</td> + <td colspan="2">{{dataItem.processingPart}}</td> + <td colspan="2">鎵规鍙�</td> + <td colspan="2">{{dataItem.batchNumber}}</td> + <td colspan="2">浠舵暟</td> + <td colspan="2">{{dataItem.quantity}}</td> + </tr> + + <tr> + <td colspan="2" style="text-align: left;padding: 5px">璁惧鏁呴殰鐜拌薄鎻忚堪</td> + <td colspan="10" style="text-align: left;padding: 5px"> + <div style="text-align: left" v-html="dataItem.faultDescription.replace(/\n/g,'<br/>')"></div> + <br/><br/> + <div style="text-align: right;padding-right: 20px">鎿嶄綔浜哄憳绛惧瓧锛歿{dataItem.confirmer_dictText}}</div> + </td> + </tr> + + <tr> + <td colspan="2" style="text-align: left;padding: 5px">璁惧鏁呴殰瀵逛骇鍝佽川閲忓奖鍝嶅垎鏋�</td> + <td colspan="10" style="padding: 5px"> + <div style="text-align: left">浜у搧鎹熷け鎯呭喌锛歿{+dataItem.technologistResult===1?'鏄紙鈭氾級鍚︼紙锛�':'鏄紙锛夊惁锛堚垰锛�'}}</div> + <div style="text-align: left">浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽锛�</div> + <div style="text-align: left" v-html="dataItem.qualityAnalysis.replace(/\n/g,'<br/>')"></div> + <br/><br/> + <div style="text-align: right;padding-right: 20px">涓荤宸ヨ壓绛惧瓧锛歿{dataItem.technologist_dictText}}</div> + </td> + </tr> + + <tr> + <td colspan="12" style="padding: 5px"> + <div style="text-align:left;">{{dataItem.deputyDepartmentComment}}</div> + <br/><br/> + <div style="text-align: right;padding-right: 20px">绛惧瓧锛堝壇閮ㄧ骇浠ヤ笂棰嗗锛夛細{{dataItem.deputyDepartment_dictText}} + </div> + <br/> + <div style="text-align: right;padding-right: 20px"> + {{dataItem.deputyDepartmentTime.split('-')[0]}} 骞� {{dataItem.deputyDepartmentTime.split('-')[1]}} 鏈� + {{dataItem.deputyDepartmentTime.split('-')[2]}} 鏃� + </div> + </td> + </tr> + </tbody> + </table> + </div> + </div> + </a-spin> + + <template slot="footer"> + <a-button @click="handleCancel">鍏抽棴</a-button> + <a-button type="primary" @click="handleImport">瀵煎嚭</a-button> + <a-button type="primary" v-print="'#dataTable'">鎵撳嵃</a-button> + </template> + </j-modal> +</template> + +<script> + import { getAction } from '@/api/manage' + import $ from 'jquery' + import '@/components/table2excel/table2excel' + + export default { + name: 'EamProductHazardsBatchPrintModal', + data() { + return { + visible: false, + spinning: false, + dataSource: [ + { + hfCode: 'HF-16548ASDSADA', + equipmentName: '鎵嬫墦鍗佺偣澶�', + equipmentModel: '6500P', + equipmentCode: '2125400', + factoryName: '鐕冩満鍘�', + maintenanceDateFormatted: '2025骞�5鏈�20鏃�' + + } + ], + url: { + list: '/eam/eamReportProductHazards/batchExport' + } + } + }, + methods: { + /** + * 鎵归噺棰勮 + * @param ids String 涓婚〉闈㈠垪琛ㄥ嬀閫塱ds + */ + handlePreview(ids) { + this.visible = true + this.spinning = true + this.dataSource = [] + const that = this + getAction(this.url.list, { ids }) + .then(res => { + if (res.success) that.dataSource = res.result + }) + .finally(() => { + that.spinning = false + }) + }, + + // 瀵煎嚭鍒癊xcel + handleImport() { + document.querySelectorAll('table.import-table').forEach(item => { + $(item).table2excel({ + exclude: '.noExl', + name: 'Excel Document Name', + filename: '浜у搧璐ㄩ噺闅愭偅纭琛�-' + item.id, + exclude_img: true, + fileext: '.xls', + exclude_links: true, + exclude_inputs: false + }) + }) + + }, + + handleCancel() { + this.close() + }, + + close() { + this.$emit('close') + this.visible = false + if (this.$refs.form) this.$refs.form.clearValidate() + } + } + } +</script> + +<style scoped lang="less"> + /deep/ .ant-modal { + height: 90%; + overflow: hidden; + + .ant-modal-content { + height: 100%; + display: flex; + flex-direction: column; + overflow: hidden; + + ::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + .ant-modal-body { + flex: 1; + overflow: auto; + } + } + } + + .table-container:not(:last-child) { + margin-bottom: 20px; + } + + table { + width: 100%; + text-align: center; + table-layout: fixed; + + td, th { + border: 1px solid #000; + } + + td.vertical-display { + transform: rotate(360deg); + writing-mode: vertical-lr; + letter-spacing: 5px; + padding: 10px 0; + } + } +</style> \ No newline at end of file -- Gitblit v1.9.3