askbot-dragon 1.5.71-beta → 1.5.73-beta

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.
@@ -620,7 +620,7 @@
620
620
  readonly
621
621
  clickable
622
622
  name="picker"
623
- :value="Array.isArray(item.value)?item.value.join(','):item.value"
623
+ :value="showSelectText(item.formField.extInfo ? (item.formField.extInfo.option || item.formField.extInfo.options) : [],item.value)"
624
624
  :label=item.formField.name
625
625
  :placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
626
626
  @click="selectClick(item.fieldId,'select',item)"
@@ -641,6 +641,31 @@
641
641
  </span>
642
642
  </template>
643
643
  </van-field>
644
+ <!-- <van-field
645
+ readonly
646
+ clickable
647
+ name="picker"
648
+ :value="Array.isArray(item.value)?item.value.join(','):item.value"
649
+ :label=item.formField.name
650
+ :placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
651
+ @click="selectClick(item.fieldId,'select',item)"
652
+ :required="item.required || isRequiredFn(item.formField)"
653
+ :disabled="disableds"
654
+ @click-right-icon.stop="SelectClear(item.fieldId)"
655
+ :right-icon="item.value && item.value.length? 'close' : 'van-icon van-icon-arrow van-cell__right-icon'"
656
+ >
657
+ <template slot="label">
658
+ <span style="padding-right: 5px">{{item.formField.name}}</span>
659
+ <span v-if="item.formField.remark && item.formField.remark.enable"
660
+ @click.stop="leftIcon(item.formField.remark)">
661
+ <i class="el-icon-warning-outline"></i>
662
+ </span>
663
+ <span v-else-if="item.formField.extInfo && item.formField.extInfo.remark && item.formField.extInfo.remark.enable"
664
+ @click.stop="leftIcon(item.formField.extInfo.remark)">
665
+ <i class="el-icon-warning-outline"></i>
666
+ </span>
667
+ </template>
668
+ </van-field> -->
644
669
  </template>
645
670
  </div>
646
671
  <div v-if="item.formField.type === 'REF_TEMPLATE' || item.formField.type === 'REF'" class="form-field-item-value">
@@ -1222,6 +1247,30 @@ export default {
1222
1247
  that.defaultClick()
1223
1248
  },
1224
1249
  methods: {
1250
+ showSelectText(option, itemValue){
1251
+ let text = "";
1252
+ if(Array.isArray(itemValue)){
1253
+ itemValue.forEach((cell, cellIndex) => {
1254
+ option.forEach(item => {
1255
+ if(item.value == cell) {
1256
+ if(cellIndex !== 0){
1257
+ text = text + ',' + item.label;
1258
+ } else {
1259
+ text = item.label;
1260
+ }
1261
+ }
1262
+ })
1263
+ })
1264
+
1265
+ } else {
1266
+ option.forEach(item => {
1267
+ if(item.value == itemValue) {
1268
+ text = item.label;
1269
+ }
1270
+ })
1271
+ }
1272
+ return text;
1273
+ },
1225
1274
  listenField(){
1226
1275
  clearTimeout(this.listenTimer);
1227
1276
  this.listenTimer = null;
@@ -1980,17 +2029,14 @@ export default {
1980
2029
  },
1981
2030
  //日期的选择器
1982
2031
  onConfirmCalendar(date, item) {
1983
- this.dateValue[item.fieldId] = this.formatDate(date);
1984
- item.value = date;
1985
- this.showCalendar = false;
1986
- /* for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
1987
- if (this.formShow.form.formFieldRelation[i].fieldId === id) {
1988
- this.dateValue[id] = this.formatDate(date)
2032
+ this.dateValue[this.dateId] = this.formatDate(date);
2033
+ for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
2034
+ if (this.formShow.form.formFieldRelation[i].fieldId === this.dateId) {
1989
2035
  this.formShow.form.formFieldRelation[i].value = date
1990
- this.showCalendar = false;
1991
2036
  break
1992
2037
  }
1993
- }*/
2038
+ }
2039
+ this.showCalendar = false;
1994
2040
  },
1995
2041
  //下拉的选择器
1996
2042
  onConfirmSelect(value, item) {
@@ -2211,13 +2257,14 @@ export default {
2211
2257
  dateClick(id) {
2212
2258
  if(this.disableds === false)
2213
2259
  {
2214
- for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
2215
- if (this.formShow.form.formFieldRelation[i].fieldId === id) {
2216
- this.dateId = id
2217
- this.showCalendar = true
2218
- break
2219
- }
2220
- }
2260
+ // for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
2261
+ // if (this.formShow.form.formFieldRelation[i].fieldId === id) {
2262
+
2263
+ // break
2264
+ // }
2265
+ // }
2266
+ this.dateId = id
2267
+ this.showCalendar = true
2221
2268
  }
2222
2269
 
2223
2270
  },