askbot-dragon 0.8.28 → 0.8.30
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.
- package/package.json +1 -1
- package/src/components/formTemplate.vue +30 -18
package/package.json
CHANGED
|
@@ -575,6 +575,20 @@
|
|
|
575
575
|
</span>
|
|
576
576
|
</template>
|
|
577
577
|
</van-field>
|
|
578
|
+
<van-popup v-model="selectPicker" position="bottom" :style="{ height: '300px' }">
|
|
579
|
+
<select-popup
|
|
580
|
+
:options="optionsList[selectDetail.fieldId]"
|
|
581
|
+
:defaultValue="defaultValue"
|
|
582
|
+
@onConfim="confirmSelect"
|
|
583
|
+
@onclose= "selectPicker = false"
|
|
584
|
+
:multiple="selectDetail.formField && selectDetail.formField.extInfo && selectDetail.formField.extInfo.selectType ==='多选'?true:false"
|
|
585
|
+
ref="selectPopup"
|
|
586
|
+
:props="{
|
|
587
|
+
value:'value',
|
|
588
|
+
label:'label'
|
|
589
|
+
}"
|
|
590
|
+
></select-popup>
|
|
591
|
+
</van-popup>
|
|
578
592
|
</template>
|
|
579
593
|
</div>
|
|
580
594
|
<div v-if="item.formField.type === 'REF_TEMPLATE' || item.formField.type === 'REF'" class="form-field-item-value">
|
|
@@ -720,20 +734,7 @@
|
|
|
720
734
|
}"
|
|
721
735
|
></select-popup>
|
|
722
736
|
</el-drawer>
|
|
723
|
-
|
|
724
|
-
<select-popup
|
|
725
|
-
:options="optionsList[selectDetail.fieldId]"
|
|
726
|
-
:defaultValue="defaultValue"
|
|
727
|
-
@onConfim="confirmSelect"
|
|
728
|
-
@onclose= "selectPicker = false"
|
|
729
|
-
:multiple="selectDetail.formField && selectDetail.formField.extInfo && selectDetail.formField.extInfo.selectType ==='多选'?true:false"
|
|
730
|
-
ref="selectPopup"
|
|
731
|
-
:props="{
|
|
732
|
-
value:'value',
|
|
733
|
-
label:'label'
|
|
734
|
-
}"
|
|
735
|
-
></select-popup>
|
|
736
|
-
</van-popup>
|
|
737
|
+
|
|
737
738
|
</div>
|
|
738
739
|
</template>
|
|
739
740
|
|
|
@@ -916,6 +917,7 @@ export default {
|
|
|
916
917
|
if (item.value && item.value.length){
|
|
917
918
|
this.$set(this.fieldValue,item.fieldId,item.value)
|
|
918
919
|
}
|
|
920
|
+
let itemType = item.relationDisplay
|
|
919
921
|
this.$set(item,'relationDisplay',this.relationSet(item.formField,'dependentFieldId'))
|
|
920
922
|
if(item.formField.type === 'CHECKBOX'){
|
|
921
923
|
if(!item.value){
|
|
@@ -925,12 +927,22 @@ export default {
|
|
|
925
927
|
item.value = item.formField.defaultValue
|
|
926
928
|
}
|
|
927
929
|
}
|
|
928
|
-
if (item.relationDisplay && this.fieldValue[item.fieldId]){
|
|
929
|
-
item.value =
|
|
930
|
-
|
|
930
|
+
if (item.relationDisplay && this.fieldValue[item.fieldId] && itemType !== item.relationDisplay){
|
|
931
|
+
item.value = JSON.parse(JSON.stringify(this.fieldValue[item.fieldId]));
|
|
932
|
+
if (item.formField.type === 'CASCADER'){
|
|
933
|
+
this.extInfoFieldValue[item.fieldId] = item.formField.extInfo.fieldValue?item.formField.extInfo.fieldValue:null
|
|
934
|
+
}
|
|
935
|
+
else {
|
|
936
|
+
this.extInfoFieldValue[item.fieldId] = this.extInfoFieldValue[item.fieldId];
|
|
937
|
+
}
|
|
931
938
|
}
|
|
932
939
|
if (!item.relationDisplay){
|
|
933
|
-
item.
|
|
940
|
+
if(item.formField.type === 'CHECKBOX'){
|
|
941
|
+
item.value = []
|
|
942
|
+
}
|
|
943
|
+
else {
|
|
944
|
+
item.value = ""
|
|
945
|
+
}
|
|
934
946
|
this.extInfoFieldValue[item.fieldId] = []
|
|
935
947
|
this.selectValues[item.fieldId] = []
|
|
936
948
|
this.extInfoFieldValue[item.fieldId] = []
|