Browse Source

关联表单默认为标签左右布局

lwx_v6
liwenxuan 1 year ago
parent
commit
6bb96dcb11
  1. 6
      src/components/DesignForm/formControlPropertiNew.vue
  2. 2
      src/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue
  3. 23
      src/widget/associatedforms/associatedForms.vue
  4. 3
      src/widget/associatedforms/index.vue

6
src/components/DesignForm/formControlPropertiNew.vue

@ -1775,6 +1775,12 @@ const showImagePreview = ref(false)
} }
}); });
}else if(controlData.value.type==='associatedForms'){ }else if(controlData.value.type==='associatedForms'){
/* if(controlData.value.item.label){
}else{
controlData.value.item.label = "关联表单"
}
controlData.value.item.showLabel = true */
console.log(controlData.value.control.fillRoles) console.log(controlData.value.control.fillRoles)
if(controlData.value.control.fillRoles.length==0){ if(controlData.value.control.fillRoles.length==0){
controlData.value.control.fillRoles = [ controlData.value.control.fillRoles = [

2
src/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue

@ -106,7 +106,7 @@ const getTaskFormData = () =>{
state.id=props.versionid state.id=props.versionid
state.formData = stringToObj(data.tableFormPage.mastesform) state.formData = stringToObj(data.tableFormPage.mastesform)
state.formData.config.hideField = []//:confighideField, state.formData.config.hideField = []//:confighideField,
console.log("tableFlow---echoTableFormPage---data.tableFormPage.mastesform",data.tableFormPage.mastesform) //console.log("tableFlow---echoTableFormPage---data.tableFormPage.mastesform",data.tableFormPage.mastesform)
state.dict = string2json(data.tableFormPage.dict) state.dict = string2json(data.tableFormPage.dict)
state.formData.powerstr = string2json(data.tableFormPage.powerstr) state.formData.powerstr = string2json(data.tableFormPage.powerstr)
judgeSubmitCancel({"name":data.tableFormPage.mastesformjson}) judgeSubmitCancel({"name":data.tableFormPage.mastesformjson})

23
src/widget/associatedforms/associatedForms.vue

@ -1,10 +1,12 @@
<template> <template>
<!-- <el-input v-model="input" style="width: 240px" placeholder="" /> --> <div class="container">
<el-select v-model="value1" placeholder="请选择" style="width: 240px" @change="asfValueChanged"> <!-- <span style="font-size: 14px; margin-right: 12px;padding-top: 4px;" class="small-span" >{{ props.data.item?props.data.item.label:"关联表单" }}</span> -->
<el-select v-model="value1" placeholder="请选择" class="big-span" @change="asfValueChanged">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div>
</template> </template>
@ -97,4 +99,19 @@ function getAsfDataTitles() {
} }
</script> </script>
<style></style> <style>
/* style="font-size: 14px; margin-right: 12px;" */
.container {
display: flex;
}
.small-span {
width: auto; /* 您可以根据需要调整第一个 span 的宽度比例 */
}
.big-span {
flex: 1; /* 第二个 span 占据剩余的所有宽度 */
}
</style>

3
src/widget/associatedforms/index.vue

@ -12,9 +12,10 @@
:label="getLabel(data.item as FormItem)" :label="getLabel(data.item as FormItem)"
> >
<input v-model="value" type="hidden" > <input v-model="value" type="hidden" >
<AssociatedForms :data="props.data" :form-props="formProps" :tablekey="props.tablekey" @value-changed="valueChanged"></AssociatedForms>
</el-form-item> </el-form-item>
<AssociatedForms :data="props.data" :form-props="formProps" :tablekey="props.tablekey" @value-changed="valueChanged"></AssociatedForms>
</template> </template>
<script lang='ts' setup> <script lang='ts' setup>
import AssociatedForms from './associatedForms.vue'; import AssociatedForms from './associatedForms.vue';

Loading…
Cancel
Save