@zscreate/zhxy-app-component 1.0.297 → 1.0.299
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -314,7 +314,8 @@ export default {
|
|
|
314
314
|
thrqList: null,
|
|
315
315
|
zjfmFormDesign: false,
|
|
316
316
|
thrqDataModalShow: '',
|
|
317
|
-
formDesignFlag: false
|
|
317
|
+
formDesignFlag: false,
|
|
318
|
+
unwatch:null
|
|
318
319
|
}
|
|
319
320
|
},
|
|
320
321
|
watch: {
|
|
@@ -911,7 +912,13 @@ export default {
|
|
|
911
912
|
}
|
|
912
913
|
this.formFunctions._init = true
|
|
913
914
|
await this.$nextTick()
|
|
914
|
-
this
|
|
915
|
+
this.initLinkAge();
|
|
916
|
+
},
|
|
917
|
+
initLinkAge(){
|
|
918
|
+
if(this.unwatch){
|
|
919
|
+
this.unwatch();
|
|
920
|
+
}
|
|
921
|
+
this.unwatch = this.$watch('models', async (newVal, oldVal) => {
|
|
915
922
|
await timeout(0)
|
|
916
923
|
let diffModels = reduce(newVal, function(result, value, key) {
|
|
917
924
|
return isEqual(value, oldVal?.[key]) ?
|
|
@@ -1019,6 +1026,23 @@ export default {
|
|
|
1019
1026
|
this.$set(widget.options, 'disabled', flag)
|
|
1020
1027
|
break
|
|
1021
1028
|
}
|
|
1029
|
+
// 当子表单内容column元素都隐藏时,隐藏整个子表单项
|
|
1030
|
+
this.data.list = this.data.list.map(item=>{
|
|
1031
|
+
if(item.type == "table"){
|
|
1032
|
+
const sum = item.columns.reduce((pre,current)=>{
|
|
1033
|
+
if(!current.options.canView){
|
|
1034
|
+
pre++;
|
|
1035
|
+
}
|
|
1036
|
+
return pre;
|
|
1037
|
+
},0)
|
|
1038
|
+
if(sum == item.columns.length){
|
|
1039
|
+
this.$set(item.options,"canView",false);
|
|
1040
|
+
}else{
|
|
1041
|
+
this.$set(item.options,"canView",true);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
return item;
|
|
1045
|
+
})
|
|
1022
1046
|
})
|
|
1023
1047
|
|
|
1024
1048
|
})
|