|
|
|
|
@ -32,7 +32,8 @@ |
|
|
|
|
@click="$router.push('/plugin/workflow/design/form')">没有想要的表单?点击去设计</el-link> |
|
|
|
|
</template> |
|
|
|
|
<template #form> |
|
|
|
|
<avue-form ref="form2" |
|
|
|
|
<avue-form v-if="option && ((option.column && option.column.length > 0) || (option.group && option.group.length > 0))" |
|
|
|
|
ref="form2" |
|
|
|
|
v-model="form" |
|
|
|
|
:option="option"></avue-form> |
|
|
|
|
</template> |
|
|
|
|
@ -172,19 +173,20 @@ export default { |
|
|
|
|
this.findObject(this.step1.option.group[0].column, 'formKey').display = true |
|
|
|
|
this.findObject(this.step1.option.group[0].column, 'tip').display = true |
|
|
|
|
this.findObject(this.step1.option.group[1].column, 'form').display = true |
|
|
|
|
this.step1.option.group[1].display = true |
|
|
|
|
} else if (val == 2) { |
|
|
|
|
this.findObject(this.step1.option.group[0].column, 'exFormKey').display = true |
|
|
|
|
this.findObject(this.step1.option.group[1].column, 'column').display = true |
|
|
|
|
this.findObject(this.step1.option.group[0].column, 'formKey').display = false |
|
|
|
|
this.findObject(this.step1.option.group[0].column, 'tip').display = false |
|
|
|
|
this.findObject(this.step1.option.group[1].column, 'form').display = false |
|
|
|
|
this.option = {} |
|
|
|
|
this.step1.option.group[1].display = true |
|
|
|
|
} else if (val == 3) { |
|
|
|
|
this.findObject(this.step1.option.group[0].column, 'exFormKey').display = false |
|
|
|
|
this.findObject(this.step1.option.group[1].column, 'column').display = false |
|
|
|
|
this.findObject(this.step1.option.group[0].column, 'formKey').display = false |
|
|
|
|
this.findObject(this.step1.option.group[0].column, 'tip').display = false |
|
|
|
|
this.findObject(this.step1.option.group[1].column, 'form').display = false |
|
|
|
|
this.option = {} |
|
|
|
|
this.step1.option.group[1].display = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -205,19 +207,16 @@ export default { |
|
|
|
|
dicData: [], |
|
|
|
|
event: { |
|
|
|
|
change: (val) => { |
|
|
|
|
this.option = {} |
|
|
|
|
_this.option = { menuBtn: false, readonly: true } |
|
|
|
|
if (val) { |
|
|
|
|
getFormByKey({ formKey: val }).then(res => { |
|
|
|
|
_this.option = { ...eval('(' + res.data.data.content.replace(/this/g, '_this') + ')'), menuBtn: false, readonly: true } |
|
|
|
|
_this.step1.option.group[1].display = true |
|
|
|
|
setTimeout(() => { |
|
|
|
|
if(_this.$refs.form2) _this.$refs.form2.clearValidate() |
|
|
|
|
}) |
|
|
|
|
_this.findObject(this.step1.option.group[1].column, 'form').display = true |
|
|
|
|
}).catch(() => { |
|
|
|
|
_this.step1.option.group[1].display = false |
|
|
|
|
_this.findObject(this.step1.option.group[1].column, 'form').display = false |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
_this.step1.option.group[1].display = false |
|
|
|
|
_this.findObject(this.step1.option.group[1].column, 'form').display = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
@ -231,13 +230,14 @@ export default { |
|
|
|
|
}, { |
|
|
|
|
label: '表单预览', |
|
|
|
|
icon: 'el-icon-view', |
|
|
|
|
display: false, |
|
|
|
|
display: true, |
|
|
|
|
arrow: false, |
|
|
|
|
column: [{ |
|
|
|
|
prop: 'form', |
|
|
|
|
labelWidth: 0, |
|
|
|
|
span: 24, |
|
|
|
|
formslot: true |
|
|
|
|
formslot: true, |
|
|
|
|
display: false |
|
|
|
|
}, { |
|
|
|
|
prop: 'column', |
|
|
|
|
labelWidth: '0', |
|
|
|
|
|