Files
workflow/app/view/component/flow/editLine.html
T
2022-11-03 23:38:50 +08:00

102 lines
3.4 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="cus-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="cus-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="cus-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="cus-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">
<span class="inputLabel">操作类型</span>
<v-select
:items="lineTypeList"
dense filled single-line
class="cus-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">课程Resource</span>
<v-text-field class="cus-v-input mr-2" dense filled single-line label="课程Resource" v-model="line.hook"></v-text-field>
</v-col> -->
<v-col cols="12" class=" pb-3">
<span class="inputLabel">备注说明</span>
<v-text-field class="cus-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',
data() {
return {
line: { label: '' },
isUpdate: false,
isFormValid: true,
lineTypeList: []
}
},
watch: {
line: {
handler(val) {
if (this.isUpdate) {
this.$emit('line-save', this.line);
}
},
deep: true
}
},
computed: {
isMobile() {
return window.innerWidth < 600;
},
},
methods: {
init(item, lineTypeList) {
this.isUpdate = false;
this.line = item;
this.lineTypeList = lineTypeList;
this.$nextTick(function () {
this.isUpdate = true;
});
},
}
})
</script>