From dbb3445dc720a8f36b3424e73f2e02a6b0f9deb6 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期日, 27 四月 2025 11:31:57 +0800 Subject: [PATCH] art: 从沃克项目迁移设备管理代码到航宇 --- src/views/eam/base/EamMaintenanceStandardList.vue | 57 ++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 48 insertions(+), 9 deletions(-) diff --git a/src/views/eam/base/EamMaintenanceStandardList.vue b/src/views/eam/base/EamMaintenanceStandardList.vue index 02719bc..a422f17 100644 --- a/src/views/eam/base/EamMaintenanceStandardList.vue +++ b/src/views/eam/base/EamMaintenanceStandardList.vue @@ -45,15 +45,15 @@ <div class="table-operator"> <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="inspectionImportExcel" - @change="inspectionImportExcel"> - <a-button type="primary" icon="import">鐐规瀵煎叆</a-button> + @change="handleImportExcel"> + <a-button type="primary" icon="import">鐐规鏍囧噯瀵煎叆</a-button> </a-upload> - <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)">鐐规妯℃澘涓嬭浇</a-button> + <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)">鐐规鏍囧噯妯℃澘涓嬭浇</a-button> <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="weekMaintenanceImportExcel" - @change="weekMaintenanceImportExcel"> - <a-button type="primary" icon="import">鍛ㄤ繚瀵煎叆</a-button> + @change="handleImportExcel"> + <a-button type="primary" icon="import">鍛ㄤ繚鏍囧噯瀵煎叆</a-button> </a-upload> - <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.weekMaintenanceXlsDownloadUrl)">鍛ㄤ繚妯℃澘涓嬭浇</a-button> + <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.weekMaintenanceXlsDownloadUrl)">鍛ㄤ繚鏍囧噯妯℃澘涓嬭浇</a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="batchDel"> @@ -94,12 +94,20 @@ <a v-if="text && text !== ''" @click.stop="handlePreview(record)">棰勮</a> </template> <span slot="action" slot-scope="text, record"> - <a @click.stop="handleEdit(record)">缂栬緫</a> + <a v-if="record.standardStatus === 'NORMAL'" @click.stop="handleEdit(record)">缂栬緫</a> <a-divider type="vertical"/> <a-dropdown> <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a> <a-menu slot="overlay"> + <a-menu-item v-if="record.standardStatus === 'NORMAL'"> + <a @click.stop="handleUpgrade(record)">鍗囩増</a> + </a-menu-item> + <a-menu-item v-if="record.standardStatus === 'NORMAL'"> + <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleAbolish(record.id)"> + <a>浣滃簾</a> + </a-popconfirm> + </a-menu-item> <a-menu-item> <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> <a>鍒犻櫎</a> @@ -133,7 +141,7 @@ import EamMaintenanceStandardModal from './modules/EamMaintenanceStandardModal' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import EamMaintenanceStandardDetailList from '@views/eam/base/modules/EamMaintenanceStandardDetailList' -import { templateXlsDownload } from '@api/manage' +import { deleteAction, templateXlsDownload } from '@api/manage' import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' @@ -218,7 +226,7 @@ weekMaintenanceImportExcel: 'eam/maintenanceStandard/weekMaintenanceImportExcel', inspectionXlsDownloadUrl: '瀵煎叆妯℃澘/鐐规鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx', weekMaintenanceXlsDownloadUrl: '瀵煎叆妯℃澘/鍛ㄤ繚鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx', - + abolish: '/eam/maintenanceStandard/abolish', }, fileUrl: '', standardId: '-1' @@ -293,6 +301,37 @@ handleTemplateXlsDownload(url) { templateXlsDownload(url) }, + handleAbolish: function (id) { + if(!this.url.abolish){ + this.$message.error("璇疯缃畊rl.abolish灞炴��!") + return + } + var that = this; + deleteAction(that.url.abolish, {id: id}).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + that.reCalculatePage(1) + // that.$message.success(res.message); + that.$notification.success({ + message:'娑堟伅', + description:res.message + }); + that.loadData(); + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message:'娑堟伅', + description:res.message + }); + } + }); + }, + handleUpgrade(record) { + //鍗囩増 + this.$refs.modalForm.upgrade(record); + this.$refs.modalForm.title = "鍗囩増"; + this.$refs.modalForm.disableSubmit = false; + }, } } </script> -- Gitblit v1.9.3