78 lines
2.5 KiB
HTML
78 lines
2.5 KiB
HTML
<template id="edit-line">
|
|
<v-form v-model="isFormValid" ref="dataForm" lazy-validation>
|
|
<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="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="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="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="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="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>
|
|
</v-row>
|
|
</v-form>
|
|
</template>
|
|
|
|
<script>
|
|
Vue.component("edit-line", {
|
|
template: '#edit-line',
|
|
vuetify: new Vuetify(),
|
|
name: 'editLine',
|
|
props: {
|
|
lf: {
|
|
type: Object,
|
|
default: null
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
line: { label: '' },
|
|
isUpdate: false,
|
|
isFormValid: true,
|
|
}
|
|
},
|
|
watch: {
|
|
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
|
|
}
|
|
},
|
|
computed: {
|
|
isMobile() {
|
|
return window.innerWidth < 600;
|
|
},
|
|
},
|
|
methods: {
|
|
init(line) {
|
|
this.isUpdate = false;
|
|
this.line = line.properties;
|
|
this.$nextTick(() => {
|
|
this.isUpdate = true;
|
|
});
|
|
},
|
|
}
|
|
})
|
|
</script>
|