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/system/MdcEquipmentImplementLedger.vue | 58 ++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/views/system/MdcEquipmentImplementLedger.vue b/src/views/system/MdcEquipmentImplementLedger.vue index 9ab4844..7c6c11b 100644 --- a/src/views/system/MdcEquipmentImplementLedger.vue +++ b/src/views/system/MdcEquipmentImplementLedger.vue @@ -5,14 +5,24 @@ <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-form-item label="璁惧缂栧彿"> - <a-input v-model="queryParam.equipmentId" allowClear></a-input> + <a-col :md="4" :sm="4"> + <a-form-item label="杞﹂棿"> + <a-input v-model="queryParam.productionName" allowClear placeholder="璇疯緭鍏ヨ溅闂�"></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.sectionName" allowClear placeholder="璇疯緭鍏ュ伐娈�"></a-input> + </a-form-item> + </a-col> + <a-col :md="4" :sm="4"> + <a-form-item label="璁惧缂栧彿"> + <a-input v-model="queryParam.equipmentId" allowClear placeholder="璇疯緭鍏ヨ澶囩紪鍙�"></a-input> + </a-form-item> + </a-col> + <a-col :md="4" :sm="4"> <a-form-item label="璁惧鍚嶇О"> - <a-input v-model="queryParam.equipmentName" allowClear></a-input> + <a-input v-model="queryParam.equipmentName" allowClear placeholder="璇疯緭鍏ヨ澶囧悕绉�"></a-input> </a-form-item> </a-col> <a-col :lg="5" :md="5" :sm="5" :xs="5"> @@ -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"> @@ -42,8 +58,8 @@ </a-dropdown> </div> - <a-table :columns="columns" :data-source="dataList" bordered :pagination="false" :scroll="{x:'max-content'}" - :expandRowByClick="true" + <a-table :columns="columns" :data-source="dataList" bordered :pagination="ipagination" :scroll="{x:'max-content'}" + :expandRowByClick="true" @change="handleTableChange" rowKey="id" @expand="handleExpandChange" :loading="outerDataLoading" > <span slot="isMdcInstall" slot-scope="text">{{text | formatIsInstallAndStatus}}</span> @@ -127,11 +143,11 @@ const columns = [ { title: '鍏徃', dataIndex: 'companyName', key: 'companyName', align: 'center', width: 100 }, - { title: '杞﹂棿', dataIndex: 'productionName', key: 'productionName', align: 'center', width: 100 }, - { title: '宸ユ', dataIndex: 'sectionName', key: 'sectionName', align: 'center', width: 100 }, + { title: '杞﹂棿', dataIndex: 'productionName', key: 'productionName', align: 'center', width: 120 }, + { title: '宸ユ', dataIndex: 'sectionName', key: 'sectionName', align: 'center', width: 180 }, { title: '璁惧缂栧彿', dataIndex: 'equipmentId', key: 'equipmentId', align: 'center', width: 100 }, { title: '璁惧鍚嶇О', dataIndex: 'equipmentName', key: 'equipmentName', align: 'center', width: 100 }, - { title: '璁惧鍨嬪彿', dataIndex: 'equipmentModel', key: 'equipmentModel', align: 'center', width: 100 }, + { title: '璁惧鍨嬪彿', dataIndex: 'equipmentModel', key: 'equipmentModel', align: 'center', width: 150 }, { title: '璁惧绯荤粺绫诲瀷', dataIndex: 'controlSystem', key: 'controlSystem', align: 'center', width: 150 }, { title: '璁惧璐d换浜�', dataIndex: 'responsible', key: 'responsible', align: 'center', width: 150 }, { title: '璁惧瀹夋斁浣嶇疆', dataIndex: 'equipmentPosition', key: 'equipmentPosition', align: 'center', width: 150 }, @@ -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) { @@ -316,10 +339,13 @@ loadData() { this.outerDataLoading = true this.dataList = [] - getAction(this.url.mdcImplementLedgersList, this.queryParam).then(res => { + const params = this.getQueryParams() + getAction(this.url.mdcImplementLedgersList, params).then(res => { if (res.success) { this.dataList = res.result.records this.hasRequestAlarmCodeList = [] + if (res.result.total) this.ipagination.total = res.result.total + else this.ipagination.total = 0 } }).finally(() => { this.outerDataLoading = false -- Gitblit v1.9.3