调试mk
This commit is contained in:
@@ -925,6 +925,7 @@ import { getDictionary as getBizDictionary } from '@/api/system/dictbiz';
|
||||
import { getList as getUserList } from '@/api/system/user';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
||||
import { submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||
import { ElImageViewer } from 'element-plus';
|
||||
import { OpenFileViewer } from '@open-file-viewer/vue';
|
||||
import PdfPreview from '@/components/pdf-preview/main.vue';
|
||||
@@ -1589,7 +1590,17 @@ export default {
|
||||
}
|
||||
const run = value => {
|
||||
const args = operation.prompt ? [row.id, value] : [row.id];
|
||||
this.api[operation.action](...args).then(res => {
|
||||
const request = () => this.api[operation.action](...args);
|
||||
const afterMk =
|
||||
operation.action === 'submitApproval'
|
||||
? submitMkApprovalFlow({
|
||||
bizType: 'project-apply',
|
||||
formInstanceId: row.id,
|
||||
subjectName: row.projectName || '',
|
||||
approvalStatus: row.approvalStatus || '',
|
||||
}).then(() => request())
|
||||
: request();
|
||||
afterMk.then(res => {
|
||||
if (res.data?.success === false || res.data?.data === false) {
|
||||
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
|
||||
return;
|
||||
@@ -1757,9 +1768,26 @@ export default {
|
||||
this.$message.error(res.data?.msg || '保存失败,请联系管理员');
|
||||
return;
|
||||
}
|
||||
this.$message.success('操作成功!');
|
||||
this.closeProjectForm();
|
||||
this.onLoad(this.page, this.query);
|
||||
const data = res.data?.data || {};
|
||||
const id = data.id || this.form.id;
|
||||
const name = data.projectName || this.form.projectName || '';
|
||||
const status = data.approvalStatus || this.form.approvalStatus || '';
|
||||
if (!id) {
|
||||
this.$message.success('操作成功!');
|
||||
this.closeProjectForm();
|
||||
this.onLoad(this.page, this.query);
|
||||
return;
|
||||
}
|
||||
return submitMkApprovalFlow({
|
||||
bizType: 'project-apply',
|
||||
formInstanceId: id,
|
||||
subjectName: name,
|
||||
approvalStatus: status,
|
||||
}).then(() => {
|
||||
this.$message.success('提交成功!');
|
||||
this.closeProjectForm();
|
||||
this.onLoad(this.page, this.query);
|
||||
});
|
||||
},
|
||||
error => {
|
||||
window.console.log(error);
|
||||
@@ -1827,9 +1855,23 @@ export default {
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.$message.success(`${needSubmit ? '提交' : '保存'}成功!`);
|
||||
this.closeProjectForm();
|
||||
this.onLoad(this.page, this.query);
|
||||
if (!needSubmit) {
|
||||
this.$message.success('保存成功!');
|
||||
this.closeProjectForm();
|
||||
this.onLoad(this.page, this.query);
|
||||
return;
|
||||
}
|
||||
const id = this.form.id;
|
||||
return submitMkApprovalFlow({
|
||||
bizType: 'project-apply',
|
||||
formInstanceId: id,
|
||||
subjectName: this.form.projectName || '',
|
||||
approvalStatus: this.form.approvalStatus || 'change_rejected',
|
||||
}).then(() => {
|
||||
this.$message.success('提交成功!');
|
||||
this.closeProjectForm();
|
||||
this.onLoad(this.page, this.query);
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
this.submitLoading = false;
|
||||
|
||||
Reference in New Issue
Block a user