提交 88646bea 编写于 作者: JEECG低代码平台's avatar JEECG低代码平台

让不对接流程的表单,生成的页面代码更简洁

上级 9915b848
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<#assign form_popup = false> <#assign form_popup = false>
<#assign form_cat_tree = false> <#assign form_cat_tree = false>
<#assign form_cat_back = ""> <#assign form_cat_back = "">
<#assign bpm_flag=false>
<#assign form_span = 24> <#assign form_span = 24>
<#if tableVo.fieldRowNum==2> <#if tableVo.fieldRowNum==2>
<#assign form_span = 12> <#assign form_span = 12>
...@@ -17,6 +18,9 @@ ...@@ -17,6 +18,9 @@
<#assign form_span = 6> <#assign form_span = 6>
</#if> </#if>
<#list columns as po> <#list columns as po>
<#if po.fieldDbName=='bpm_status'>
<#assign bpm_flag=true>
</#if>
<#if po.isShow =='Y' && po.fieldName != 'id'> <#if po.isShow =='Y' && po.fieldName != 'id'>
<#assign form_field_dictCode=""> <#assign form_field_dictCode="">
<#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1>
...@@ -102,9 +106,11 @@ ...@@ -102,9 +106,11 @@
</a-col> </a-col>
</#if> </#if>
</#list> </#list>
<#if bpm_flag>
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center"> <a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
<a-button @click="submitForm">提 交</a-button> <a-button @click="submitForm">提 交</a-button>
</a-col> </a-col>
</#if>
</a-row> </a-row>
</a-form-model> </a-form-model>
</j-form-container> </j-form-container>
...@@ -121,6 +127,7 @@ ...@@ -121,6 +127,7 @@
components: { components: {
}, },
props: { props: {
<#if bpm_flag>
//流程表单data //流程表单data
formData: { formData: {
type: Object, type: Object,
...@@ -133,6 +140,7 @@ ...@@ -133,6 +140,7 @@
default: false, default: false,
required: false required: false
}, },
</#if>
//表单禁用 //表单禁用
disabled: { disabled: {
type: Boolean, type: Boolean,
...@@ -164,14 +172,17 @@ ...@@ -164,14 +172,17 @@
}, },
computed: { computed: {
formDisabled(){ formDisabled(){
<#if bpm_flag>
if(this.formBpm===true){ if(this.formBpm===true){
if(this.formData.disabled===false){ if(this.formData.disabled===false){
return false return false
} }
return true return true
} }
</#if>
return this.disabled return this.disabled
}, },
<#if bpm_flag>
showFlowSubmitButton(){ showFlowSubmitButton(){
if(this.formBpm===true){ if(this.formBpm===true){
if(this.formData.disabled===false){ if(this.formData.disabled===false){
...@@ -180,12 +191,15 @@ ...@@ -180,12 +191,15 @@
} }
return false return false
} }
</#if>
}, },
created () { created () {
//备份model原始值 //备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
<#if bpm_flag>
//如果是流程中表单,则需要加载流程表单data //如果是流程中表单,则需要加载流程表单data
this.showFlowData(); this.showFlowData();
</#if>
}, },
methods: { methods: {
add () { add () {
...@@ -195,6 +209,7 @@ ...@@ -195,6 +209,7 @@
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
this.visible = true; this.visible = true;
}, },
<#if bpm_flag>
//渲染流程表单数据 //渲染流程表单数据
showFlowData(){ showFlowData(){
if(this.formBpm === true){ if(this.formBpm === true){
...@@ -206,6 +221,7 @@ ...@@ -206,6 +221,7 @@
}); });
} }
}, },
</#if>
submitForm () { submitForm () {
const that = this; const that = this;
// 触发表单验证 // 触发表单验证
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册