askbot-dragon 0.8.27 → 0.8.29

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "0.8.27",
3
+ "version": "0.8.29",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -575,20 +575,6 @@
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="selectOptions(item.formField)"
581
- :defaultValue="defaultValue"
582
- @onConfim="confirmSelect"
583
- @onclose= "selectPicker = false"
584
- :multiple="item.formField.extInfo && item.formField.extInfo.selectType ==='多选'?true:false"
585
- ref="selectPopup"
586
- :props="{
587
- value:'value',
588
- label:'label'
589
- }"
590
- ></select-popup>
591
- </van-popup>
592
578
  </template>
593
579
  </div>
594
580
  <div v-if="item.formField.type === 'REF_TEMPLATE' || item.formField.type === 'REF'" class="form-field-item-value">
@@ -734,6 +720,20 @@
734
720
  }"
735
721
  ></select-popup>
736
722
  </el-drawer>
723
+ <van-popup v-model="selectPicker" position="bottom" :style="{ height: '300px' }">
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
  </div>
738
738
  </template>
739
739
 
@@ -860,7 +860,8 @@ export default {
860
860
  selectDetail:{},
861
861
  refDefaultValue:{},
862
862
  selectOptionWidth:null,
863
- fieldValue:{}
863
+ fieldValue:{},
864
+ optionsList:{}
864
865
  }
865
866
  },
866
867
  props: {
@@ -915,6 +916,7 @@ export default {
915
916
  if (item.value && item.value.length){
916
917
  this.$set(this.fieldValue,item.fieldId,item.value)
917
918
  }
919
+ let itemType = item.relationDisplay
918
920
  this.$set(item,'relationDisplay',this.relationSet(item.formField,'dependentFieldId'))
919
921
  if(item.formField.type === 'CHECKBOX'){
920
922
  if(!item.value){
@@ -924,9 +926,14 @@ export default {
924
926
  item.value = item.formField.defaultValue
925
927
  }
926
928
  }
927
- if (item.relationDisplay && this.fieldValue[item.fieldId]){
928
- item.value = this.fieldValue[item.fieldId];
929
- this.extInfoFieldValue[item.fieldId] = this.fieldValue[item.fieldId];
929
+ if (item.relationDisplay && this.fieldValue[item.fieldId] && itemType !== item.relationDisplay){
930
+ item.value = JSON.parse(JSON.stringify(this.fieldValue[item.fieldId]));
931
+ if (item.formField.type === 'CASCADER'){
932
+ this.extInfoFieldValue[item.fieldId] = item.formField.extInfo.fieldValue?item.formField.extInfo.fieldValue:null
933
+ }
934
+ else {
935
+ this.extInfoFieldValue[item.fieldId] = this.extInfoFieldValue[item.fieldId];
936
+ }
930
937
  }
931
938
  if (!item.relationDisplay){
932
939
  item.value = []
@@ -1725,6 +1732,12 @@ export default {
1725
1732
  this.refDefaultValue[item.fieldId] = item.value?[item.value]:[]
1726
1733
  } else if (type == 'select'){
1727
1734
  this.selectPicker = true;
1735
+ if (item.formField.extInfo){
1736
+ this.optionsList[id] = item.formField.extInfo.option ? item.formField.extInfo.option:item.formField.extInfo.options
1737
+ }
1738
+ else {
1739
+ this.optionsList[id] = []
1740
+ }
1728
1741
  }
1729
1742
  if (item){
1730
1743
  this.detailField = item;