Browse Source

关联表单-数据填充规则-v0.23

lwx_v6
liwenxuan 1 year ago
parent
commit
ccc02cd7f6
  1. 40
      src/components/DesignForm/formControlPropertiNew.vue
  2. 17
      src/widget/associatedforms/associatedFormsChildFillRole.vue

40
src/components/DesignForm/formControlPropertiNew.vue

@ -2129,6 +2129,7 @@ function formidChanged(){
let childTableCount = 0
for(let n = 0;n<resDataOnlyChild.value.length;n++){
console.log(resDataOnlyChild.value[n])
resDataOnlyChild.value[n].disabled=false
childTableCount++
}
console.log(childTableCount)
@ -2454,6 +2455,7 @@ function associatedFormsDataRangeDialoghandle(){
let childTableCount = 0
for(let n = 0;n<resDataOnlyChild.value.length;n++){
console.log(resDataOnlyChild.value[n])
resDataOnlyChild.value[n].disabled=false
childTableCount = n;
}
console.log(childTableCount)
@ -2613,21 +2615,29 @@ function addFillRole(){
}
function addChildFillRole(){
let onlyNumber = uuidv4().replaceAll('-','').toString(); //
controlData.value.control.fillRoles.child.push({
id: onlyNumber,
tableKey: '',
filterCondition:{
conditionHtml: '',
conditionHtmlCopy: '',
gongShi:{
formulaHtml:'',
mathsFormula:'',
mathsString:'',
},
},
childRoles:[]
})
//
//currentChildTableCount
//controlData.value.control.fillRoles.child.length
if(controlData.value.control.fillRoles.child.length<currentChildTableCount){
let onlyNumber = uuidv4().replaceAll('-','').toString(); //
controlData.value.control.fillRoles.child.push({
id: onlyNumber,
tableKey: '',
filterCondition:{
conditionHtml: '',
conditionHtmlCopy: '',
gongShi:{
formulaHtml:'',
mathsFormula:'',
mathsString:'',
},
},
childRoles:[]
})
}else{
alert("当前关联表单共 "+controlData.value.control.fillRoles.child.length+" 张子表,不可再添加")
}
}
function delRole(id:String){

17
src/widget/associatedforms/associatedFormsChildFillRole.vue

@ -12,15 +12,28 @@
v-model="rightValue1" style="width: 290px;" :data="rightTreeSource"
check-strictly :render-after-expand="false" filterable @change="rightChanged" />
<Delete style="width: 22px; height: 22px; margin-right: 35px;cursor: pointer; color: #50A6FF;margin-top: 10px; display: block; float:right" @click="delRole" /> -->
</div>
<el-button type="primary" @click="innerVisible = true">
open
</el-button>
<!-- <el-button v-if="selectedChildTable1===''" style="padding-top: 5px;" type="primary" link append-to-body="true" modal="true" @click="associatedFormsDataRangeDialoghandle" >设置筛选条件选填</el-button>
<div v-if="selectedChildTable1!==''" style="width:100%; cursor: pointer;" @click="associatedFormsDataRangeDialoghandle" v-html="controlData.control.dataRangeConditionHtml"></div> -->
</div>
<el-dialog
v-model="innerVisible"
width="500"
title="Inner Dialog"
append-to-body
>
{{ currentKey }}
</el-dialog>
</template>
<script setup lang="ts">
import { Close } from '@element-plus/icons-vue'
const innerVisible = ref(false)
const props = defineProps({
childTableList: {
type: Object,

Loading…
Cancel
Save