流程编辑
This commit is contained in:
1 parent
7751704fe7
commit
696457321b
6 files changed
+915
-313
No files matched your search
@@ -1,39 +1,27 @@
|
||||
<template id="edit-line">
|
||||
<v-form v-model="isFormValid" ref="dataForm" lazy-validation>
|
||||
<v-row>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<v-row class="ma-0 pa-0">
|
||||
<v-col cols="12" class="ma-0 pa-0 mb-1">
|
||||
<span class="jh-input-label">GUID</span>
|
||||
<v-text-field class="jh-v-input" dense filled single-line disabled label="GUID" v-model="line.id"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<v-col cols="12" class="ma-0 pa-0 mb-1">
|
||||
<span class="jh-input-label">源活动</span>
|
||||
<v-text-field class="jh-v-input" dense filled single-line disabled label="源活动" v-model="line.from"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<v-col cols="12" class="ma-0 pa-0 mb-1">
|
||||
<span class="jh-input-label">目标活动</span>
|
||||
<v-text-field class="jh-v-input" dense filled single-line disabled label="目标活动" v-model="line.to"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<v-col cols="12" class="ma-0 pa-0 mb-1">
|
||||
<span class="jh-input-label">名称</span>
|
||||
<v-text-field class="jh-v-input" dense filled single-line label="名称" v-model="line.label"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3" v-if="mode == 'serial'">
|
||||
<span class="jh-input-label">操作类型</span>
|
||||
<v-select
|
||||
:items="lineTypeList"
|
||||
dense filled single-line
|
||||
class="jh-v-input"
|
||||
label="操作类型"
|
||||
color="success"
|
||||
item-color="success"
|
||||
v-model="line.type"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<v-col cols="12" class="ma-0 pa-0 mb-1">
|
||||
<span class="jh-input-label">执行Hook</span>
|
||||
<v-text-field class="jh-v-input" dense filled single-line label="执行Hook" v-model="line.hook"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<v-col cols="12" class="ma-0 pa-0 mb-1">
|
||||
<span class="jh-input-label">备注说明</span>
|
||||
<v-text-field class="jh-v-input" dense filled single-line label="备注说明" v-model="line.Remark"></v-text-field>
|
||||
</v-col>
|
||||
@@ -50,10 +38,6 @@
|
||||
lf: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'serial'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -61,14 +45,16 @@
|
||||
line: { label: '' },
|
||||
isUpdate: false,
|
||||
isFormValid: true,
|
||||
lineTypeList: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
line: {
|
||||
handler: function (line) {
|
||||
handler: async function (line) {
|
||||
// 更新节点或者连线的文案
|
||||
this.lf.updateText(line.id, `${line.type}-${line.label}`);
|
||||
this.lf.setProperties(line.id, line);
|
||||
// 更新数据
|
||||
await this.$emit('reflesh-workflow')
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
@@ -79,10 +65,9 @@
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
init(line, lineTypeList) {
|
||||
init(line) {
|
||||
this.isUpdate = false;
|
||||
this.line = line.properties;
|
||||
this.lineTypeList = lineTypeList;
|
||||
this.$nextTick(() => {
|
||||
this.isUpdate = true;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user