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

17
src/widget/associatedforms/associatedFormsChildFillRole.vue

@ -12,15 +12,28 @@
v-model="rightValue1" style="width: 290px;" :data="rightTreeSource" v-model="rightValue1" style="width: 290px;" :data="rightTreeSource"
check-strictly :render-after-expand="false" filterable @change="rightChanged" /> 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" /> --> <Delete style="width: 22px; height: 22px; margin-right: 35px;cursor: pointer; color: #50A6FF;margin-top: 10px; display: block; float:right" @click="delRole" /> -->
<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> </div>
<el-dialog
v-model="innerVisible"
width="500"
title="Inner Dialog"
append-to-body
>
{{ currentKey }}
</el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { Close } from '@element-plus/icons-vue' import { Close } from '@element-plus/icons-vue'
const innerVisible = ref(false)
const props = defineProps({ const props = defineProps({
childTableList: { childTableList: {
type: Object, type: Object,

Loading…
Cancel
Save