From 73dbf3aabed9a07df0d27fb0c6bafa94a3d9805a Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期一, 07 七月 2025 21:16:57 +0800 Subject: [PATCH] 修改导入 --- src/views/eam/base/EamMaintenanceStandardList.vue | 103 +++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 82 insertions(+), 21 deletions(-) diff --git a/src/views/eam/base/EamMaintenanceStandardList.vue b/src/views/eam/base/EamMaintenanceStandardList.vue index 04196b6..72d1d7e 100644 --- a/src/views/eam/base/EamMaintenanceStandardList.vue +++ b/src/views/eam/base/EamMaintenanceStandardList.vue @@ -104,19 +104,22 @@ :customRow='clickThenSelect' @change="handleTableChange"> <span slot="action" slot-scope="text, record"> - <a v-if="record.standardStatus === 'WAIT_SUBMIT'" @click.stop="handleEdit(record)">缂栬緫</a> - - <template v-if="record.standardStatus === 'START'"> - <a-divider type="vertical"/> - - <a @click.stop="handleUpgrade(record)">鍗囩増</a> - </template> + <a v-if="record.standardStatus === 'START'" @click.stop="handleUpgrade(record)">鍗囩増</a> <template v-if="record.standardStatus === 'WAIT_SUBMIT'"> - <a-divider type="vertical"/> + <a @click.stop="handleEdit(record)">缂栬緫</a> + + <a-divider type="vertical"/> + + <a-popconfirm title="纭畾鍙戣捣娴佺▼鍚�?" @confirm="() => startProcess(record.id)"> + <a @click.stop="event=>event.stopPropagation()">鍙戣捣娴佺▼</a> + </a-popconfirm> + + + <a-divider type="vertical"/> <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a @click="event=>event.stopPropagation()">鍒犻櫎</a> + <a @click.stop="event=>event.stopPropagation()">鍒犻櫎</a> </a-popconfirm> </template> </span> @@ -125,7 +128,8 @@ <a-tabs defaultActiveKey="1"> <a-tab-pane tab='淇濆吇鏍囧噯鏄庣粏椤�' key="1"> <div class="table-operator" style="margin:-16px"> - <eam-maintenance-standard-detail-list ref="standardDetailRef" :standardId="standardId"/> + <eam-maintenance-standard-detail-list ref="standardDetailRef" :standardId="standardId" + :pageSelectionRow="selectionRows[0]"/> </div> </a-tab-pane> @@ -134,7 +138,7 @@ <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> - <eamMaintenanceStandard-modal ref="modalForm" @ok="modalFormOk"></eamMaintenanceStandard-modal> + <eamMaintenanceStandard-modal ref="modalForm" @ok="modalFormOk"/> </a-card> </template> @@ -143,7 +147,7 @@ import EamMaintenanceStandardModal from './modules/EamMaintenanceStandardModal' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import EamMaintenanceStandardDetailList from '@views/eam/base/modules/EamMaintenanceStandardDetailList' - import { deleteAction, templateXlsDownload } from '@api/manage' + import { deleteAction, getAction, templateXlsDownload } from '@api/manage' import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' @@ -233,16 +237,15 @@ list: '/eam/maintenanceStandard/list', delete: '/eam/maintenanceStandard/delete', deleteBatch: '/eam/maintenanceStandard/deleteBatch', + startProcess: '/eam/maintenanceStandard/saveEamMaintenanceStandardProcess', exportXlsUrl: 'eam/maintenanceStandard/exportXls', - inspectionImportExcel: 'eam/maintenanceStandard/inspectionImportExcel', - weekMaintenanceImportExcel: 'eam/maintenanceStandard/weekMaintenanceImportExcel', - secondMaintenanceImportExcel: 'eam/maintenanceStandard/secondMaintenanceImportExcel', - thirdMaintenanceImportExcel: 'eam/maintenanceStandard/thirdMaintenanceImportExcel', + inspectionImportExcel: '/eam/maintenanceStandard/importPointInspection', + secondMaintenanceImportExcel: '/eam/maintenanceStandard/importSecondMaintenanceStandard', + thirdMaintenanceImportExcel: '/eam/maintenanceStandard/importThirdMaintenanceStandard', inspectionXlsDownloadUrl: '瀵煎叆妯℃澘/鐐规鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx', weekMaintenanceXlsDownloadUrl: '瀵煎叆妯℃澘/鍛ㄤ繚鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx', secondMaintenanceXlsDownloadUrl: '瀵煎叆妯℃澘/浜屼繚鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx', - thirdMaintenanceXlsDownloadUrl: '瀵煎叆妯℃澘/涓変繚鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx', - abolish: '/eam/maintenanceStandard/abolish' + thirdMaintenanceXlsDownloadUrl: '瀵煎叆妯℃澘/涓変繚鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx' }, standardId: '-1' } @@ -250,9 +253,6 @@ computed: { inspectionImportExcel: function() { return `${window._CONFIG['domianURL']}/${this.url.inspectionImportExcel}` - }, - weekMaintenanceImportExcel: function() { - return `${window._CONFIG['domianURL']}/${this.url.weekMaintenanceImportExcel}` }, secondMaintenanceImportExcel: function() { return `${window._CONFIG['domianURL']}/${this.url.secondMaintenanceImportExcel}` @@ -308,6 +308,33 @@ templateXlsDownload(url) }, + /** + * 鐐瑰嚮鍙戣捣娴佺▼瑙﹀彂 + * @param id 鍒楄〃琛岃褰旾D + */ + startProcess(id) { + this.loading = true + const that = this + getAction(this.url.startProcess, { id }) + .then(res => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.loading = false + }) + }, + handleUpgrade(record) { //鍗囩増 this.$refs.modalForm.upgrade(record) @@ -315,6 +342,40 @@ this.$refs.modalForm.disableSubmit = false }, + batchDel() { + 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 + getAction(that.url.deleteBatch, { 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 + }) + } + }) + }, + searchReset() { this.standardId = '-1' this.queryParam = {} -- Gitblit v1.9.3