修复审核状态弹窗回显
This commit is contained in:
@@ -841,6 +841,14 @@ async function submitDetailAction() {
|
|||||||
Message.warning('请填写必填字段');
|
Message.warning('请填写必填字段');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 审核状态未变化时不重复请求,避免产生无意义的状态更新和审计记录。
|
||||||
|
if (
|
||||||
|
action.resource.endsWith('/:identity/status') &&
|
||||||
|
Number(actionForm.status) === Number(detail.value.status)
|
||||||
|
) {
|
||||||
|
Message.warning('审核状态未发生变化');
|
||||||
|
return;
|
||||||
|
}
|
||||||
await executeDetailAction(action);
|
await executeDetailAction(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -909,9 +917,9 @@ async function save() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openStatus(row: Row) {
|
async function openStatus(row: Row) {
|
||||||
detail.value = row;
|
detail.value = row;
|
||||||
openDetailAction({
|
await openDetailAction({
|
||||||
name: '审核状态',
|
name: '审核状态',
|
||||||
resource: `${props.definition.resource}/:identity/status`,
|
resource: `${props.definition.resource}/:identity/status`,
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
@@ -928,6 +936,9 @@ function openStatus(row: Row) {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
// 仅回显下拉框支持的审核状态;待审核等状态仍由审核人主动选择。
|
||||||
|
const currentStatus = Number(row.status);
|
||||||
|
actionForm.status = [1, 2].includes(currentStatus) ? currentStatus : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmArchive(row: Row) {
|
function confirmArchive(row: Row) {
|
||||||
|
|||||||
@@ -841,6 +841,14 @@ async function submitDetailAction() {
|
|||||||
Message.warning('请填写必填字段');
|
Message.warning('请填写必填字段');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 审核状态未变化时不重复请求,避免产生无意义的状态更新和审计记录。
|
||||||
|
if (
|
||||||
|
action.resource.endsWith('/:identity/status') &&
|
||||||
|
Number(actionForm.status) === Number(detail.value.status)
|
||||||
|
) {
|
||||||
|
Message.warning('审核状态未发生变化');
|
||||||
|
return;
|
||||||
|
}
|
||||||
await executeDetailAction(action);
|
await executeDetailAction(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -909,9 +917,9 @@ async function save() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openStatus(row: Row) {
|
async function openStatus(row: Row) {
|
||||||
detail.value = row;
|
detail.value = row;
|
||||||
openDetailAction({
|
await openDetailAction({
|
||||||
name: '审核状态',
|
name: '审核状态',
|
||||||
resource: `${props.definition.resource}/:identity/status`,
|
resource: `${props.definition.resource}/:identity/status`,
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
@@ -928,6 +936,9 @@ function openStatus(row: Row) {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
// 仅回显下拉框支持的审核状态;待审核等状态仍由审核人主动选择。
|
||||||
|
const currentStatus = Number(row.status);
|
||||||
|
actionForm.status = [1, 2].includes(currentStatus) ? currentStatus : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmArchive(row: Row) {
|
function confirmArchive(row: Row) {
|
||||||
|
|||||||
@@ -898,6 +898,14 @@ async function submitDetailAction() {
|
|||||||
Message.warning('请填写必填字段');
|
Message.warning('请填写必填字段');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 审核状态未变化时不重复请求,避免产生无意义的状态更新和审计记录。
|
||||||
|
if (
|
||||||
|
action.resource.endsWith('/:identity/status') &&
|
||||||
|
Number(actionForm.status) === Number(detail.value.status)
|
||||||
|
) {
|
||||||
|
Message.warning('审核状态未发生变化');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (hasInvalidPassword(action.fields ?? [], actionForm)) {
|
if (hasInvalidPassword(action.fields ?? [], actionForm)) {
|
||||||
Message.warning(ACCOUNT_PASSWORD_LENGTH_MESSAGE);
|
Message.warning(ACCOUNT_PASSWORD_LENGTH_MESSAGE);
|
||||||
return;
|
return;
|
||||||
@@ -974,9 +982,9 @@ async function save() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openStatus(row: Row) {
|
async function openStatus(row: Row) {
|
||||||
detail.value = row;
|
detail.value = row;
|
||||||
openDetailAction({
|
await openDetailAction({
|
||||||
name: '审核状态',
|
name: '审核状态',
|
||||||
resource: `${props.definition.resource}/:identity/status`,
|
resource: `${props.definition.resource}/:identity/status`,
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
@@ -993,6 +1001,9 @@ function openStatus(row: Row) {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
// 仅回显下拉框支持的审核状态;待审核等状态仍由审核人主动选择。
|
||||||
|
const currentStatus = Number(row.status);
|
||||||
|
actionForm.status = [1, 2].includes(currentStatus) ? currentStatus : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmArchive(row: Row) {
|
function confirmArchive(row: Row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user