From 06645999275b1a5d44e6723a0fa8e53225aed4d2 Mon Sep 17 00:00:00 2001 From: danshihao Date: Mon, 1 Jul 2024 18:14:52 +0800 Subject: [PATCH] =?UTF-8?q?[update=20=E5=8A=9F=E8=83=BD=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E4=B8=AD=E5=BF=83]=20=E5=88=97=E8=A1=A8=E3=80=81=E6=88=90?= =?UTF-8?q?=E5=91=98=E5=8D=95=E4=BD=8D=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mixins/JeroListMixin.js | 12 +++++++++--- .../FunctionalSafetyCenter.vue | 2 ++ .../FunctionalSafetyMemberUnitMaintenance.vue | 10 ++++++---- .../modules/SafetyCenterMemberUnitModule.vue | 6 +----- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/mixins/JeroListMixin.js b/src/mixins/JeroListMixin.js index 6cc6bd4..9902859 100644 --- a/src/mixins/JeroListMixin.js +++ b/src/mixins/JeroListMixin.js @@ -4,7 +4,7 @@ * data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除 */ import {filterObj} from '@/utils/util' -import {getAction, downloadFile, getFileAccessHttpUrl, postAction} from '@/api/manage' +import {getAction, downloadFile, getFileAccessHttpUrl, postAction, httpAction} from '@/api/manage' import Vue from 'vue' import {ACCESS_TOKEN, TENANT_ID} from '@/store/mutation-types' import store from '@/store' @@ -58,6 +58,8 @@ export const JeroListMixin = { superQueryParams: '', /** 高级查询拼接方式 */ superQueryMatchType: 'and', + // 新增的删除接口请求方式改成post,需要的模块设置成true + postMethodDel: false } }, created() { @@ -193,7 +195,9 @@ export const JeroListMixin = { content: '是否删除选中数据?', onOk: function () { that.loading = true - getAction(that.url.deleteBatch, {ids: ids}).then((res) => { + // 新增加的删除接口用post方式请求 + const method = that.postMethodDel ? 'POST' : 'GET' + httpAction(that.url.deleteBatch, {ids: ids}, method).then((res) => { if (res.success) { that.$message.success(res.message) // 判断当前删除的数据是否是最后一页的全部数据,如果是的话页码减一 @@ -228,7 +232,9 @@ export const JeroListMixin = { title: '确认删除', content: '确定要删除此条数据吗?', onOk: function () { - getAction(that.url.delete, {id: id}).then((res) => { + // 新增加的删除接口用post方式请求 + const method = that.postMethodDel ? 'POST' : 'GET' + httpAction(that.url.delete, {id: id}, method).then((res) => { if (res.success) { that.$message.success(res.message) // 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一 diff --git a/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue b/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue index cc9cae8..7ca590b 100644 --- a/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue +++ b/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue @@ -99,6 +99,8 @@ export default { mixins: [JeroListMixin], data() { return { + // 混入post请求删除接口 + postMethodDel: true, SafetyCenterProjectTypeEnums, IconDraftingGruop, labelCol: { diff --git a/src/views/functionalSafetyCenter/FunctionalSafetyMemberUnitMaintenance.vue b/src/views/functionalSafetyCenter/FunctionalSafetyMemberUnitMaintenance.vue index acdf6c2..67d054e 100644 --- a/src/views/functionalSafetyCenter/FunctionalSafetyMemberUnitMaintenance.vue +++ b/src/views/functionalSafetyCenter/FunctionalSafetyMemberUnitMaintenance.vue @@ -41,7 +41,7 @@ - @@ -162,6 +162,8 @@ export default { data() { return { ProjectTypeEnums, + // 混入post请求删除接口 + postMethodDel: true, disableMixinCreated: true, projectName: '', projectId: '', @@ -184,7 +186,7 @@ export default { sm: { span: 10 } }, url: { - list: '/SafetyCenterSubitem/list', + list: '/SafetyCenterSubitem/page', delete: '/SafetyCenterSubitem/delete', deleteBatch: '/SafetyCenterSubitem/deleteBatch', exportXlsUrl: '/SafetyCenterSubitem/exportXls', @@ -205,13 +207,13 @@ export default { title: '成员单位', align: 'center', // width: 280, - dataIndex: 'chargeCompanyTemporaryName', + dataIndex: 'companyId_dictText', scopedSlots: { customRender: 'projectName' } }, { title: '企业联系人', align: 'center', // width: 280, - dataIndex: 'contactsTemporaryNameOne', + dataIndex: 'contactsId_dictText', scopedSlots: { customRender: 'text' } }, { diff --git a/src/views/functionalSafetyCenter/modules/SafetyCenterMemberUnitModule.vue b/src/views/functionalSafetyCenter/modules/SafetyCenterMemberUnitModule.vue index 6e3e9e4..a6abf79 100644 --- a/src/views/functionalSafetyCenter/modules/SafetyCenterMemberUnitModule.vue +++ b/src/views/functionalSafetyCenter/modules/SafetyCenterMemberUnitModule.vue @@ -118,10 +118,6 @@ export default { contactsRepeat: { rules: [{ required: false, validator: this.validateContact }], validateTrigger: 'change' - }, - receivableAmount: { - rules: [{ required: true, validator: this.checkMoney }], - validateTrigger: 'blur' } }, selectedCompany: null, // 当前选中的企业 @@ -169,7 +165,7 @@ export default { // 回显 record.chargeCompany = { id: record.companyId, - companyName: record.chargeCompanyTemporaryName + companyName: record.companyId_dictText } // 回显选中的企业 this.selectedCompany = record.chargeCompany