|
|
@@ -141,16 +141,14 @@
|
|
|
v-if="active == 0"
|
|
|
@click="() => (active = 1)"
|
|
|
>下一步
|
|
|
- </el-button
|
|
|
- >
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
v-if="active == 1"
|
|
|
@click="() => (active = 0)"
|
|
|
>上一步
|
|
|
- </el-button
|
|
|
- >
|
|
|
+ </el-button>
|
|
|
<el-button type="primary" size="small" @click="submit">完成</el-button>
|
|
|
<el-button size="small" @click="cancel">关闭</el-button>
|
|
|
</div>
|
|
|
@@ -166,11 +164,11 @@ import {
|
|
|
listAllUserBind,
|
|
|
listSimpleUserGroups
|
|
|
} from './api';
|
|
|
-import {treeClassifyCodeEnum} from '@/enum/dict';
|
|
|
-import {listRoles} from '@/api/system/role';
|
|
|
-import {listOrganizations} from '@/api/system/organization';
|
|
|
+import { treeClassifyCodeEnum } from '@/enum/dict';
|
|
|
+import { listRoles } from '@/api/system/role';
|
|
|
+import { listOrganizations } from '@/api/system/organization';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
-import {getByCode} from '@/api/system/dictionary-data';
|
|
|
+import { getByCode } from '@/api/system/dictionary-data';
|
|
|
import {getProduceTreeByCode} from "@/api/main";
|
|
|
|
|
|
export default {
|
|
|
@@ -180,7 +178,7 @@ export default {
|
|
|
processSubmitDialogFlag: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -191,7 +189,8 @@ export default {
|
|
|
name: '',
|
|
|
businessId: '',
|
|
|
noticeScope: [],
|
|
|
- businessKey: ''
|
|
|
+ businessKey: '',
|
|
|
+ formCreateUserId: ''
|
|
|
},
|
|
|
active: 0,
|
|
|
bpmnXML: null,
|
|
|
@@ -232,8 +231,8 @@ export default {
|
|
|
// 获得岗位列表 暂无岗位概念
|
|
|
this.postOptions = [];
|
|
|
/*listSimplePosts().then(response => {
|
|
|
- this.postOptions.push(...response.data);
|
|
|
- });*/
|
|
|
+ this.postOptions.push(...response.data);
|
|
|
+});*/
|
|
|
// 获得用户列表
|
|
|
this.userOptions = [];
|
|
|
listAllUserBind().then((data) => {
|
|
|
@@ -251,47 +250,54 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
init(row = {}) {
|
|
|
- this.form = Object.assign( this.form, row);
|
|
|
- this.getDefaultInfo(row.businessKey)
|
|
|
+ this.form = { ...this.form, ...row };
|
|
|
+ // this.form.businessId = row.id;
|
|
|
+ // this.form.businessKey = row.businessKey;
|
|
|
+ // this.form.formCreateUserId = row.createUserId;
|
|
|
+ this.getDefaultInfo(row.businessKey);
|
|
|
},
|
|
|
async getDefaultInfo(businessKey) {
|
|
|
- let info = await getProcessDefinitionInfo({code: businessKey})
|
|
|
- this.form.LCFL = info?.category
|
|
|
- this.form.FQLC = info?.modelId
|
|
|
- this.form.name = info?.name
|
|
|
- this.form.key = info?.key
|
|
|
- this.form.processDefinitionId = info?.id
|
|
|
- if (this.form.LCFL) await this.getProcessList(this.form.LCFL)
|
|
|
+ let info = await getProcessDefinitionInfo({code: businessKey});
|
|
|
+ this.form.LCFL = info?.category;
|
|
|
+ this.form.FQLC = info?.modelId;
|
|
|
+ this.form.name = info?.name;
|
|
|
+ this.form.key = info?.key;
|
|
|
+ this.form.processDefinitionId = info?.id;
|
|
|
+ if (this.form.LCFL) await this.getProcessList(this.form.LCFL);
|
|
|
if (this.form.FQLC) {
|
|
|
- await this.getProcessDefinitionBpmnXMLInfo(info.id)
|
|
|
- await this.getTaskAssignRuleListInfo({modelId: info.modelId, processDefinitionId: info.id})
|
|
|
+ await this.getProcessDefinitionBpmnXMLInfo(info.id);
|
|
|
+ await this.getTaskAssignRuleListInfo({
|
|
|
+ modelId: info.modelId,
|
|
|
+ processDefinitionId: info.id
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
async changeLCFL(val) {
|
|
|
this.bpmnXML = null;
|
|
|
this.form.processDefinitionId = null;
|
|
|
this.form.FQLC = null;
|
|
|
- await this.getProcessList(val)
|
|
|
+ await this.getProcessList(val);
|
|
|
},
|
|
|
async getProcessList(val) {
|
|
|
let params = {
|
|
|
pageNo: 1,
|
|
|
pageSize: 999,
|
|
|
processTypeId: val
|
|
|
- }
|
|
|
+ };
|
|
|
const {list} = await getModelPage(params);
|
|
|
- this.processList = list.filter(
|
|
|
- (item) => item.processDefinition
|
|
|
- );
|
|
|
+ this.processList = list.filter((item) => item.processDefinition);
|
|
|
},
|
|
|
async changeFQLC(val) {
|
|
|
if (!val) return;
|
|
|
let find = this.processList.find((item) => item.id === val) || {};
|
|
|
this.form.name = find.name;
|
|
|
this.form.key = find.key;
|
|
|
- this.form.processDefinitionId = find.processDefinition.id
|
|
|
- await this.getProcessDefinitionBpmnXMLInfo(find.processDefinition.id)
|
|
|
- await this.getTaskAssignRuleListInfo({modelId: find.id, processDefinitionId: find.processDefinition.id})
|
|
|
+ this.form.processDefinitionId = find.processDefinition.id;
|
|
|
+ await this.getProcessDefinitionBpmnXMLInfo(find.processDefinition.id);
|
|
|
+ await this.getTaskAssignRuleListInfo({
|
|
|
+ modelId: find.id,
|
|
|
+ processDefinitionId: find.processDefinition.id
|
|
|
+ });
|
|
|
},
|
|
|
async getProcessDefinitionBpmnXMLInfo(val) {
|
|
|
// 加载流程图
|
|
|
@@ -393,9 +399,9 @@ export default {
|
|
|
},
|
|
|
async submit() {
|
|
|
await processInstanceCreateAPI(this.form);
|
|
|
- this.$message('提交审核成功')
|
|
|
- this.$emit('reload')
|
|
|
- this.cancel()
|
|
|
+ this.$message('提交审核成功');
|
|
|
+ this.$emit('reload');
|
|
|
+ this.cancel();
|
|
|
},
|
|
|
cancel() {
|
|
|
this.$emit('update:processSubmitDialogFlag', false);
|