111 lines
3.6 KiB
HTML
111 lines
3.6 KiB
HTML
<template id="edit-line">
|
|
<!-- <el-form :model="line" ref="dataForm" label-width="100px" class="flowEditForm margin13" size="mini">
|
|
<el-form-item label="GUID">
|
|
<el-input disabled v-model="line.id"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="源活动">
|
|
<el-input disabled v-model="line.from"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="目标活动">
|
|
<el-input disabled v-model="line.to"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="名称">
|
|
<el-input v-model="line.label"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="备注说明">
|
|
<el-input v-model="line.Remark" type="textarea" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
|
|
</el-form-item>
|
|
</el-form> -->
|
|
|
|
<v-form v-model="isFormValid" ref="dataForm" lazy-validation>
|
|
<v-row class="px-2" :class="{'pb-7': isMobile}">
|
|
<v-col cols="12" class=" pb-3">
|
|
<span class="inputLabel">GUID</span>
|
|
<v-text-field class="jh-v-input mr-2" dense filled single-line disabled label="GUID" v-model="line.id"></v-text-field>
|
|
</v-col>
|
|
<v-col cols="12" class=" pb-3">
|
|
<span class="inputLabel">源活动</span>
|
|
<v-text-field class="jh-v-input mr-2" dense filled single-line disabled label="源活动" v-model="line.from"></v-text-field>
|
|
</v-col>
|
|
<v-col cols="12" class=" pb-3">
|
|
<span class="inputLabel">目标活动</span>
|
|
<v-text-field class="jh-v-input mr-2" dense filled single-line disabled label="目标活动" v-model="line.to"></v-text-field>
|
|
</v-col>
|
|
<v-col cols="12" class=" pb-3">
|
|
<span class="inputLabel">名称</span>
|
|
<v-text-field class="jh-v-input mr-2" 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="inputLabel">操作类型</span>
|
|
<v-select
|
|
:items="lineTypeList"
|
|
dense filled single-line
|
|
class="jh-v-input mr-2"
|
|
label="操作类型"
|
|
color="success"
|
|
item-color="success"
|
|
v-model="line.type"
|
|
></v-select>
|
|
</v-col>
|
|
<v-col cols="12" class=" pb-3">
|
|
<span class="inputLabel">执行Hook</span>
|
|
<v-text-field class="jh-v-input mr-2" dense filled single-line label="执行Hook" v-model="line.hook"></v-text-field>
|
|
</v-col>
|
|
<v-col cols="12" class=" pb-3">
|
|
<span class="inputLabel">备注说明</span>
|
|
<v-text-field class="jh-v-input mr-2" 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
|
|
},
|
|
mode: {
|
|
type: String,
|
|
default: 'serial'
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
line: { label: '' },
|
|
isUpdate: false,
|
|
isFormValid: true,
|
|
lineTypeList: []
|
|
}
|
|
},
|
|
watch: {
|
|
line: {
|
|
handler: function (line) {
|
|
this.lf.updateText(line.id, `${line.type}-${line.label}`);
|
|
this.lf.setProperties(line.id, line);
|
|
},
|
|
deep: true
|
|
}
|
|
},
|
|
computed: {
|
|
isMobile() {
|
|
return window.innerWidth < 600;
|
|
},
|
|
},
|
|
methods: {
|
|
init(line, lineTypeList) {
|
|
this.isUpdate = false;
|
|
this.line = line.properties;
|
|
this.lineTypeList = lineTypeList;
|
|
this.$nextTick(() => {
|
|
this.isUpdate = true;
|
|
});
|
|
},
|
|
}
|
|
})
|
|
</script>
|