1、产品质量隐患确认表批量打印及导出功能
2、调整点检和二保批量打印功能代码
| | |
| | | <!--</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 --> |
| | |
| | | <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"> |
| | |
| | | |
| | | //æ¹éè¿å |
| | | handlerBatchRestore() { |
| | | if (!this.url.restoreBatch) { |
| | | this.$message.error('请设置url.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('请设置url.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 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // æ¹éæå° |
| | |
| | | |
| | | <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> |
| | |
| | | }) |
| | | }, |
| | | |
| | | handleImport() { |
| | | // 导åºå°Excel |
| | | handleExportToExcel() { |
| | | document.querySelectorAll('table.import-table').forEach(element => { |
| | | console.log('element', element.id) |
| | | $(element).table2excel({ |
| | |
| | | |
| | | <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> |
| | |
| | | }) |
| | | }, |
| | | |
| | | handleImport() { |
| | | // 导åºå°Excel |
| | | handleExportToExcel() { |
| | | document.querySelectorAll('table.import-table').forEach(element => { |
| | | console.log('element', element.id) |
| | | $(element).table2excel({ |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <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'"> |
| | |
| | | |
| | | <!--审æ¹çªå£--> |
| | | <report-product-hazards-approval-modal ref="reportProductHazardsApprovalModal" |
| | | :selectShenpiData="selectedRowData"/> |
| | | :selectShenpiData="selectedRowData"/> |
| | | |
| | | <!--æ¹éæå°å¼¹çª--> |
| | | <eam-product-hazards-batch-print-modal ref="batchPrintModal"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | 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 |
| | |
| | | type: Object |
| | | } |
| | | }, |
| | | data () { |
| | | data() { |
| | | return { |
| | | description: '产åå®å
¨éæ£ç¡®è®¤ç®¡ç页é¢', |
| | | disableMixinCreated: true, |
| | |
| | | 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 { |
| | |
| | | }) |
| | | }, |
| | | |
| | | // æ¹éæå° |
| | | handleBatchPrint() { |
| | | this.$refs.batchPrintModal.handlePreview(this.selectedRowKeys.join()) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»è¯¦æ
æ¶è§¦åæ¶è§¦å |
| | | * @param record |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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 主页é¢å表å¾éids |
| | | */ |
| | | 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 |
| | | }) |
| | | }, |
| | | |
| | | // 导åºå°Excel |
| | | 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> |