@@ -86,6 +88,10 @@
type: Boolean,
default: false
},
+ defaultTags: {
+ type: Array,
+ default: null
+ },
},
data(){
return {
@@ -95,12 +101,15 @@
path: '',
label: '',
showTree: false,
+ locationId: '',
},
processList: [],
+ processTags: [],
+ defaultProcessCheckedKeys: [],
+ showProcessTree: false,
direction: 'vertically',
directionOpts: [{value: 'vertically', label: '纵向排布'},{value: 'horizontal', label: '横向排布'}],
modelName: '',
- processTags: [],
popoverVisible: false
},
treeProps: {
@@ -137,7 +146,9 @@
this.$emit('getResult');
this.clearData();
// 子流程树节点所选清空
- this.$refs.subProcessModelTree.setCheckedKeys([]);
+ if (this.$refs.subProcessModelTree) {
+ this.$refs.subProcessModelTree.setCheckedKeys([]);
+ }
},
closeAdapter(done) {
this.close();
@@ -151,6 +162,9 @@
this.subProcessForm.popoverVisible = false;
this.subProcessForm.position.label = '';
this.subProcessForm.position.showTree = false;
+ this.subProcessForm.position.locationId = '';
+ this.subProcessForm.defaultProcessCheckedKeys = [];
+ this.subProcessForm.showProcessTree = false;
},
// 生成端到端总图
generateSubProcessModel(){
@@ -214,6 +228,9 @@
if (ro.result === 'ok') {
// console.log('节点选中接口',ro.data);
that.subProcessForm.processTags = ro.data;
+ that.subProcessForm.processTags.forEach(tag => {
+ that.subProcessForm.processList.push(tag.value);
+ });
}
})
.catch(err => {
@@ -285,16 +302,34 @@
this.subProcessForm.position.label = pathNames.reverse().join("/");
this.subProcessForm.position.path = pathIds.reverse().join("/");
+ this.subProcessForm.position.locationId = node.data.id;
+
this.$refs.positionPopover.doClose();
},
+ processPopoverShowEvent(){
+ this.subProcessForm.showProcessTree = true;
+ },
+ processPopoverHideEvent(){
+ this.subProcessForm.showProcessTree = false;
+ },
positionPopoverShowEvent(){
this.subProcessForm.position.showTree = true;
+ },
+ positionPopoverHideEvent(){
+ this.subProcessForm.position.showTree = false;
}
},
watch: {
visible(val) {
this.dialogVisible = val;
if (val) {
+ // 从更多icon进来则将上一界面选中的文件默认添加
+ if (this.defaultTags != null) {
+ this.subProcessForm.processTags = [...this.defaultTags];
+ this.defaultTags.forEach(tag => {
+ this.subProcessForm.defaultProcessCheckedKeys.push(tag.value);
+ });
+ }
this.initData();
}
}