cnhis-design-vue 0.2.28-beta → 0.2.29-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "0.2.28-beta",
3
+ "version": "0.2.29-beta",
4
4
  "description": "基于 Ant Desgin Vue 的UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div class="r-scale">
3
3
  <slot v-if="spinning">
4
- <a-spin :indicator="indicator" />
4
+ <a-spin :indicator="indicator" tip="加载中..." />
5
5
  </slot>
6
- <slot v-else>
6
+ <slot v-if="!spinning && !hasFrontAddress">
7
7
  <div v-if="noData">暂无数据</div>
8
8
  <!-- <NoData v-if="noData" :noDataImg="noDataImg" :noDataTip="noDataTip"></NoData> -->
9
9
  <template v-else>
@@ -598,7 +598,8 @@ export default create({
598
598
  isFinished: false,
599
599
  maxScore: 0,
600
600
  originConfig: {},
601
- paramsEvaluate: null
601
+ paramsEvaluate: null,
602
+ hasFrontAddress: true
602
603
  };
603
604
  },
604
605
  mounted() {
@@ -618,6 +619,7 @@ export default create({
618
619
  this.initForm(configData);
619
620
  } catch (error) {
620
621
  this.spinning = false;
622
+ this.hasFrontAddress = false;
621
623
  this.setNoData(true, error?.resultMsg, error?.result);
622
624
  }
623
625
  },
@@ -627,7 +629,11 @@ export default create({
627
629
  },
628
630
  initForm(data) {
629
631
  let { list = [], map = {}, isFinished = false } = data;
630
- this.handleFrontAddress(list);
632
+ let curUrl = this.handleFrontAddress(list);
633
+ if (curUrl) {
634
+ window.location.href = curUrl;
635
+ return;
636
+ }
631
637
  map.maxScore && (this.maxScore = map.maxScore);
632
638
  this.isFinished = isFinished;
633
639
  if (data.isLackCustomer) {
@@ -670,13 +676,14 @@ export default create({
670
676
  this.rules = this.formatRules(this.formArray);
671
677
  this.fontSize = data.fontSize;
672
678
  this.spinning = false;
679
+ this.hasFrontAddress = false;
673
680
  },
674
681
  handleFrontAddress(list) {
675
682
  if (!list || !list.length) return;
676
683
  let matchItem = list.find(item => item.type === "FRONT_ADDRESS");
677
684
  if (!matchItem || !Object.keys(matchItem).length) return;
678
685
  let setting;
679
- if (matchItem.setting && this.$utils.isJSON(matchItem.setting)) {
686
+ if (matchItem.setting && utils.isJSON(matchItem.setting)) {
680
687
  setting = JSON.parse(matchItem.setting);
681
688
  }
682
689
  if (!setting || !Object.keys(setting).length) return;
@@ -691,7 +698,7 @@ export default create({
691
698
  preStr = "&";
692
699
  }
693
700
  let curUrl = `${frontAddress}${preStr}redirect_url=${encodeURIComponent(urlHref)}`;
694
- window.location.href = curUrl;
701
+ return curUrl;
695
702
  }
696
703
  },
697
704
  handleBtnParamsEvaluate(params) {