From a6e90514db278028dec30da60fffc16ba95950af Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 02 十二月 2024 10:45:32 +0800 Subject: [PATCH] 调整MDC设备实施台账页面导入功能代码 --- src/views/system/MdcEquipmentImplementLedger.vue | 43 +++++++++++++++++++++++++++++++++---------- 1 files changed, 33 insertions(+), 10 deletions(-) diff --git a/src/views/system/MdcEquipmentImplementLedger.vue b/src/views/system/MdcEquipmentImplementLedger.vue index be03875..ee88f6c 100644 --- a/src/views/system/MdcEquipmentImplementLedger.vue +++ b/src/views/system/MdcEquipmentImplementLedger.vue @@ -5,12 +5,22 @@ <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :md="5" :sm="5"> + <a-col :md="4" :sm="4"> + <a-form-item label="杞﹂棿"> + <a-input v-model="queryParam.productionName" allowClear></a-input> + </a-form-item> + </a-col> + <a-col :md="4" :sm="4"> + <a-form-item label="宸ユ"> + <a-input v-model="queryParam.sectionName" allowClear></a-input> + </a-form-item> + </a-col> + <a-col :md="4" :sm="4"> <a-form-item label="璁惧缂栧彿"> <a-input v-model="queryParam.equipmentId" allowClear></a-input> </a-form-item> </a-col> - <a-col :md="5" :sm="5"> + <a-col :md="4" :sm="4"> <a-form-item label="璁惧鍚嶇О"> <a-input v-model="queryParam.equipmentName" allowClear></a-input> </a-form-item> @@ -28,6 +38,12 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙路 --> <div class="table-operator" style="border-top: 5px"> <a-button @click="handleAdd" type="primary" icon="plus">娣诲姞鍙拌处</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-button type="primary" icon="download" @click="handleExportXls('MDC璁惧瀹炴柦鍙拌处')">瀵煎嚭</a-button>--> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" @click="handleMenuClick"> <a-menu-item key="1"> @@ -145,14 +161,14 @@ scopedSlots: { customRender: 'isMdcInstall' } }, { - title: 'MDC纭欢瀹夎', + title: 'MDC纭欢瀹夎鎯呭喌', dataIndex: 'isMdcHardwareInstall', key: 'isMdcHardwareInstall', align: 'center', width: 150, scopedSlots: { customRender: 'isMdcHardwareInstall' } }, - { title: '瀹夎鏃堕棿', dataIndex: 'mdcInstallTime', key: 'mdcInstallTime', align: 'center', width: 150 }, + { title: 'MDC瀹夎鏃堕棿', dataIndex: 'mdcInstallTime', key: 'mdcInstallTime', align: 'center', width: 150 }, { title: 'DNC瀹夎鎯呭喌', dataIndex: 'isDncInstall', @@ -162,14 +178,14 @@ scopedSlots: { customRender: 'isDncInstall' } }, { - title: 'DNC纭欢瀹夎', + title: 'DNC纭欢瀹夎鎯呭喌', dataIndex: 'isDncHardwareInstall', key: 'isDncHardwareInstall', align: 'center', width: 150, scopedSlots: { customRender: 'isDncHardwareInstall' } }, - { title: '瀹夎鏃堕棿', dataIndex: 'dncInstallTime', key: 'dncInstallTime', align: 'center', width: 150 }, + { title: 'DNC瀹夎鏃堕棿', dataIndex: 'dncInstallTime', key: 'dncInstallTime', align: 'center', width: 150 }, { title: '鎿嶄綔', dataIndex: 'action', @@ -257,7 +273,9 @@ dataList: [], url: { mdcImplementLedgersList: '/mdc/mdcImplementLedgers/list', - mdcImplementLedgersSubList: '/mdc/mdcImplementLedgersSub/list' + mdcImplementLedgersSubList: '/mdc/mdcImplementLedgersSub/list', + exportXlsUrl: '/mdc/mdcImplementLedgers/exportXls', + importExcelUrl: '/mdc/mdcImplementLedgers/importExcel' }, columns, innerColumns, @@ -269,6 +287,11 @@ * */ created() { this.loadData() + }, + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}${this.url.importExcelUrl}`; + }, }, filters: { numFilter(value) { @@ -328,13 +351,13 @@ handleAdd: function(implementId = '', param = '') { this.$refs[param + 'modalForm'].add(implementId) - this.$refs[param + 'modalForm'].title = '鏂板' + this.$refs[param + 'modalForm'].title = !param ? '鏂板鍙拌处' : '鏂板鍙樻洿璁板綍' this.$refs[param + 'modalForm'].disableSubmit = false }, handleEdit: function(record, param = '') { this.$refs[param + 'modalForm'].edit(record) - this.$refs[param + 'modalForm'].title = '缂栬緫' + this.$refs[param + 'modalForm'].title = !param ? '缂栬緫鍙拌处' : '缂栬緫鍙樻洿璁板綍' this.$refs[param + 'modalForm'].disableSubmit = false }, @@ -345,7 +368,7 @@ handleDetail: function(record, param = '') { console.log(this.$refs[param + 'modalForm']) this.$refs[param + 'modalForm'].edit(record) - this.$refs[param + 'modalForm'].title = '璇︽儏' + this.$refs[param + 'modalForm'].title = !param ? '鍙拌处璇︽儏' : '鍙樻洿璁板綍璇︽儏' this.$refs[param + 'modalForm'].disableSubmit = true // 璋冪敤鎶藉眽琛ㄥ崟缁勪欢涓殑娓呴櫎琛ㄥ崟楠岃瘉鏂规硶 // this.$refs[param + 'modalForm'].removeValidate() -- Gitblit v1.9.3