review 细节调整

This commit is contained in:
yuebenshan committed 2023-02-15 18:14:37 +08:00
1 parent 15131347f4
commit 367fbdc2e3
6 files changed
+215 -215

No files matched your search

+11 -12
View File
@@ -188,7 +188,7 @@
tableDataFromBackend: [],
tableData: [],
headers: [
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed' },
{ text: '操作', value: 'action', sortable: false, width: 130, class: 'fixed', cellClass: 'fixed' },
{ text: '流程ID', value: 'workflowId' },
{ text: '流程名称', value: 'workflowName' },
],
@@ -218,9 +218,9 @@
await this.openCreateDrawer();
break;
case 'createWorkflow':
await this.prepareDoCreateWork();
await this.prepareCreateValidate();
await this.confirmCreateWorkDialog();
await this.prepareDoWorkItem();
await this.doCreateWork();
await this.closeCreateDrawer();
break;
@@ -283,7 +283,6 @@
// ---------- <<<<<<<<<< 申请项目审核 --------
async prepareCreateFormData(funObj) {
console.log(funObj);
const { workflowForm, workflowPersonList, workflowId } = funObj;
this.currentWorkflowForm = workflowForm;
this.currentWorkflowPersonList = workflowPersonList;
@@ -293,11 +292,7 @@
async openCreateDrawer() {
this.isCreateDrawerShown = true;
},
async prepareCreateValidate() {
if (!await this.$refs.createForm.validate()) {
throw new Error("请完善表单信息")
}
async prepareDoCreateWork() {
this.currentWorkflowPersonList.forEach(workflowPersonItem => {
if (!workflowPersonItem.assignValue) {
workflowPersonItem.assignValue = [];
@@ -308,6 +303,13 @@
if (!workflowPersonItem.origin) workflowPersonItem['origin'] = {};
if (!workflowPersonItem.origin.properties) workflowPersonItem.origin['properties'] = {};
workflowPersonItem.origin.properties.assignValue = workflowPersonItem.assignValue;
});
},
async prepareCreateValidate() {
if (!await this.$refs.createForm.validate()) {
throw new Error("请完善表单信息")
}
this.currentWorkflowPersonList.forEach(workflowPersonItem => {
if (workflowPersonItem.assignValue.length === 0) {
window.vtoast.fail({ message: `${workflowPersonItem.label}必填!` });
throw new Error("[prepareValidate] 审批人 false");
@@ -319,9 +321,6 @@
throw new Error("[confirmCreateFormDialog] 否");
}
},
prepareDoWorkItem() {
console.log('create', this.currentWorkflowForm);
},
async doCreateWork() {
await window.jhMask.show();
@@ -384,4 +383,4 @@
}
}
</style>
{% endblock %}
{% endblock %}