From 1d5696acbce4efc3b81ae6102c818a9d38e7bca2 Mon Sep 17 00:00:00 2001
From: xjh <2423579486@qq.com>
Date: Thu, 3 Aug 2023 11:47:46 +0800
Subject: [PATCH] =?UTF-8?q?fix:=E4=BB=A3=E7=A0=81=E5=9D=97=E5=8F=8A?=
=?UTF-8?q?=E5=85=B6=E7=B1=BB=E7=9B=AE=E5=AE=A1=E6=A0=B8=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A1=86=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/index/code/code_module/index.vue | 37 ++++++++---------
.../index/code/code_module_category/index.vue | 41 +++++++++----------
2 files changed, 38 insertions(+), 40 deletions(-)
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(() => { })
};
// 修改