diff --git a/src/pages/index/code/code_module/index.vue b/src/pages/index/code/code_module/index.vue index 7581ede..a9c96ad 100644 --- a/src/pages/index/code/code_module/index.vue +++ b/src/pages/index/code/code_module/index.vue @@ -283,32 +283,31 @@ const AuditData = reactive({ function handleAudit(row) { const Ids = row.code_module_guid || selectionData.value.map(v => v.code_module_guid).join() console.log(Ids); - - ElMessageBox.prompt("是否通过审核?
(可在下方输入框填写审核结果消息附言)", "系统提示", { - distinguishCancelAndClose: true, - dangerouslyUseHTMLString: true, + ElMessageBox({ + title: '系统提示', + message: '是否通过审核?', + showCancelButton: true, confirmButtonText: '通过', cancelButtonText: '驳回', + showInput: true, + distinguishCancelAndClose: true, type: "warning", - }) - .then(async (info) => { - AuditData.code_module_audit = 2 - AuditData.code_module_guid = Ids - AuditData.ps = info.value - Audit() - }) - .catch((action) => { - if (action == 'cancel') { + inputPlaceholder: '可填写审核结果消息附言', + beforeClose: async (action, instance, done) => { + if (action === 'confirm') { + AuditData.code_module_audit = 2 + AuditData.code_module_guid = Ids + AuditData.ps = instance.inputValue + Audit() + } else if (action === 'cancel') { AuditData.code_module_audit = 3 AuditData.code_module_guid = Ids - AuditData.ps = info.value + AuditData.ps = instance.inputValue Audit() - // console.log("拒绝"); } - else { - // console.log("关闭"); - } - }) + done() + }, + }).catch(() => { }) } // 审核 diff --git a/src/pages/index/code/code_module_category/index.vue b/src/pages/index/code/code_module_category/index.vue index 6248be7..ced5715 100644 --- a/src/pages/index/code/code_module_category/index.vue +++ b/src/pages/index/code/code_module_category/index.vue @@ -239,35 +239,34 @@ const handleDelete = data => { //审核数据 const handleAudit = data => { let code_module_category_guid = data.map(v => v.code_module_category_guid).join() - ElMessageBox.prompt("是否通过审核?
(可在下方输入框填写审核结果消息附言)", "系统提示", { - distinguishCancelAndClose: true, - dangerouslyUseHTMLString: true, + ElMessageBox({ + title: '系统提示', + message: '是否通过审核?', + showCancelButton: true, confirmButtonText: '通过', cancelButtonText: '驳回', + showInput: true, + distinguishCancelAndClose: true, type: "warning", - }) - .then(async (info) => { - const res = await auditCodeModuleCategory({ - code_module_category_guid: code_module_category_guid, - code_module_category_audit: 2, - ps: info.value - }); - if (res) { - getList() - } - }) - .catch(async (action) => { - if (action == 'cancel') { + inputPlaceholder: '可填写审核结果消息附言', + beforeClose: async (action, instance, done) => { + if (action === 'confirm') { + const res = await auditCodeModuleCategory({ + code_module_category_guid: code_module_category_guid, + code_module_category_audit: 2, + ps: instance.inputValue + }); + } else if (action === 'cancel') { const res = await auditCodeModuleCategory({ code_module_category_guid: code_module_category_guid, code_module_category_audit: 3, - ps: info.value + ps: instance.inputValue }); - if (res) { - getList() - } } - }) + getList() + done() + }, + }).catch(() => { }) }; // 修改