eoss-mobiles 0.2.69 → 0.2.70

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.
Files changed (45) hide show
  1. package/lib/checkbox.js +0 -2
  2. package/lib/eoss-mobile.common.js +603 -320
  3. package/lib/esign.js +3 -3
  4. package/lib/field.js +7 -3
  5. package/lib/flow-btn.js +3 -7
  6. package/lib/flow-list.js +0 -2
  7. package/lib/flow.js +8 -12
  8. package/lib/form.js +2 -5
  9. package/lib/index.js +1 -1
  10. package/lib/picker.js +127 -41
  11. package/lib/radio.js +0 -2
  12. package/lib/retrial-auth.js +0 -2
  13. package/lib/selector.js +422 -224
  14. package/lib/table-column.js +0 -2
  15. package/lib/table.js +0 -2
  16. package/lib/theme-chalk/flow.css +1 -1
  17. package/lib/theme-chalk/index.css +1 -1
  18. package/lib/theme-chalk/picker.css +1 -1
  19. package/lib/theme-chalk/selector.css +1 -1
  20. package/lib/theme-chalk/tree.css +1 -1
  21. package/lib/utils/http.js +0 -1
  22. package/lib/utils/util.js +0 -1
  23. package/package.json +1 -1
  24. package/packages/esign/src/main.vue +1 -1
  25. package/packages/field/src/main.vue +2 -1
  26. package/packages/flow/src/components/Opinion.vue +1 -2
  27. package/packages/flow/src/flowMix.js +0 -1
  28. package/packages/flow-btn/src/main.vue +0 -1
  29. package/packages/form/src/main.vue +163 -166
  30. package/packages/picker/src/main.vue +48 -2
  31. package/packages/selector/src/main.vue +64 -25
  32. package/packages/selector/src/selector-field.vue +6 -2
  33. package/packages/selector/src/selector-tree.vue +48 -3
  34. package/packages/selector/src/tree.vue +120 -41
  35. package/packages/theme-chalk/lib/flow.css +1 -1
  36. package/packages/theme-chalk/lib/index.css +1 -1
  37. package/packages/theme-chalk/lib/picker.css +1 -1
  38. package/packages/theme-chalk/lib/selector.css +1 -1
  39. package/packages/theme-chalk/lib/tree.css +1 -1
  40. package/packages/theme-chalk/src/picker.scss +15 -11
  41. package/packages/theme-chalk/src/selector.scss +11 -1
  42. package/packages/theme-chalk/src/tree.scss +14 -2
  43. package/src/index.js +1 -1
  44. package/src/utils/http.js +0 -1
  45. package/src/utils/util.js +0 -1
package/lib/picker.js CHANGED
@@ -659,7 +659,6 @@ var formatDate = function formatDate(date, fmt) {
659
659
  'q+': quarter[Math.ceil((obj.getMonth() + 1) / 3) - 1], // 季度
660
660
  S: obj.getMilliseconds() // 毫秒
661
661
  };
662
- console.log(o, 'o');
663
662
  if (/(y+)/.test(fmt)) {
664
663
  fmt = fmt.replace(RegExp.$1, (obj.getFullYear() + '').substr(4 - RegExp.$1.length));
665
664
  }
@@ -1936,7 +1935,6 @@ var base = {
1936
1935
 
1937
1936
  var http_request = function request(options) {
1938
1937
  var fn = void 0;
1939
- console.log(options, 'sss');
1940
1938
  switch (options.type) {
1941
1939
  case 'post':
1942
1940
  fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
@@ -2056,7 +2054,7 @@ module.exports = require("sm-crypto");
2056
2054
  // ESM COMPAT FLAG
2057
2055
  __webpack_require__.r(__webpack_exports__);
2058
2056
 
2059
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/picker/src/main.vue?vue&type=template&id=8ae7f90c&
2057
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/picker/src/main.vue?vue&type=template&id=25f9a248&
2060
2058
  var render = function () {
2061
2059
  var _vm = this
2062
2060
  var _h = _vm.$createElement
@@ -2212,6 +2210,26 @@ var render = function () {
2212
2210
  _vm.$listeners
2213
2211
  ),
2214
2212
  [
2213
+ _vm.isSearch
2214
+ ? _c(
2215
+ "template",
2216
+ { slot: "columns-top" },
2217
+ [
2218
+ _c("em-search", {
2219
+ attrs: { placeholder: "请输入搜索关键词" },
2220
+ on: { search: _vm.handleSearch },
2221
+ model: {
2222
+ value: _vm.keyWord,
2223
+ callback: function ($$v) {
2224
+ _vm.keyWord = $$v
2225
+ },
2226
+ expression: "keyWord",
2227
+ },
2228
+ }),
2229
+ ],
2230
+ 1
2231
+ )
2232
+ : _vm._e(),
2215
2233
  _vm._l(_vm.$slots, function (index, name) {
2216
2234
  return _c("template", { slot: name }, [_vm._t(name)], 2)
2217
2235
  }),
@@ -2245,7 +2263,27 @@ var render = function () {
2245
2263
  _vm.$listeners
2246
2264
  ),
2247
2265
  [
2248
- _c("template", { slot: "columns-top" }, [
2266
+ _vm.isSearch
2267
+ ? _c(
2268
+ "template",
2269
+ { slot: "columns-top" },
2270
+ [
2271
+ _c("em-search", {
2272
+ attrs: { placeholder: "请输入搜索关键词" },
2273
+ on: { search: _vm.handleSearch },
2274
+ model: {
2275
+ value: _vm.keyWord,
2276
+ callback: function ($$v) {
2277
+ _vm.keyWord = $$v
2278
+ },
2279
+ expression: "keyWord",
2280
+ },
2281
+ }),
2282
+ ],
2283
+ 1
2284
+ )
2285
+ : _vm._e(),
2286
+ _c("template", { slot: "columns-bottom" }, [
2249
2287
  _c(
2250
2288
  "div",
2251
2289
  { staticClass: "em-picker__columns" },
@@ -2331,7 +2369,7 @@ var staticRenderFns = []
2331
2369
  render._withStripped = true
2332
2370
 
2333
2371
 
2334
- // CONCATENATED MODULE: ./packages/picker/src/main.vue?vue&type=template&id=8ae7f90c&
2372
+ // CONCATENATED MODULE: ./packages/picker/src/main.vue?vue&type=template&id=25f9a248&
2335
2373
 
2336
2374
  // EXTERNAL MODULE: ./src/config/api.js
2337
2375
  var api = __webpack_require__(2);
@@ -2469,6 +2507,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2469
2507
  //
2470
2508
  //
2471
2509
  //
2510
+ //
2511
+ //
2512
+ //
2513
+ //
2514
+ //
2515
+ //
2516
+ //
2517
+ //
2518
+ //
2519
+ //
2520
+ //
2521
+ //
2522
+ //
2523
+ //
2472
2524
 
2473
2525
 
2474
2526
 
@@ -2479,6 +2531,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2479
2531
  return {
2480
2532
  showPicker: false,
2481
2533
  newLoading: false,
2534
+ keyWord: '',
2482
2535
  newLabelKey: '',
2483
2536
  newValueKey: '',
2484
2537
  listLoading: false,
@@ -2497,6 +2550,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2497
2550
  type: [String, Array, Object],
2498
2551
  default: ''
2499
2552
  },
2553
+ isSearch: {
2554
+ type: Boolean,
2555
+ default: false
2556
+ },
2500
2557
  hideLabel: {
2501
2558
  type: Boolean,
2502
2559
  default: false
@@ -2544,6 +2601,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2544
2601
  type: String,
2545
2602
  default: 'value'
2546
2603
  },
2604
+ searchKey: {
2605
+ type: String,
2606
+ default: 'keyWord'
2607
+ },
2547
2608
  labelKey: {
2548
2609
  type: String,
2549
2610
  default: 'name'
@@ -2618,6 +2679,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2618
2679
  }
2619
2680
  },
2620
2681
  watch: {
2682
+ events: {
2683
+ type: Object,
2684
+ default: function _default() {}
2685
+ },
2621
2686
  labelKey: {
2622
2687
  handler: function handler(val) {
2623
2688
  this.newLabelKey = val;
@@ -2682,6 +2747,22 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2682
2747
  },
2683
2748
 
2684
2749
  methods: {
2750
+ handleSearch: function handleSearch() {
2751
+ var _this3 = this;
2752
+
2753
+ this.$emit('search', this.keyWord);
2754
+
2755
+ if (this.columns.length > 0) {
2756
+ this.newColumns = this.columns.filter(function (x) {
2757
+ return x[_this3.labelKey].indexOf(_this3.keyWord) != -1;
2758
+ });
2759
+ if (!this.keyWord) {
2760
+ this.newColumns = this.columns;
2761
+ }
2762
+ }
2763
+
2764
+ if (this.columns && this.columns.length == 0 || !this.columns) this.getSysCode();
2765
+ },
2685
2766
  handleClick: function handleClick(val) {
2686
2767
  if (this.linkTag) {
2687
2768
  this.$emit('tagClick', val);
@@ -2712,19 +2793,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2712
2793
  return x != res.value;
2713
2794
  });
2714
2795
  this.$emit('input', this.pickerValue);
2796
+
2715
2797
  this.$emit('tagDelete', this.pickerValue);
2716
2798
  },
2717
2799
  toggle: function toggle(index) {
2718
2800
  this.$refs.checkboxes[index].toggle();
2719
2801
  },
2720
2802
  onConfirm: function onConfirm(value, isConfirm) {
2721
- var _this3 = this;
2803
+ var _this4 = this;
2722
2804
 
2723
2805
  if (isConfirm) {
2724
2806
  if (this.isCheck) {
2725
2807
  var data = [];
2726
2808
  this.newColumns.filter(function (x) {
2727
- _this3.checkList.find(function (y) {
2809
+ _this4.checkList.find(function (y) {
2728
2810
  if (x.value === y) {
2729
2811
  data.push(x);
2730
2812
  }
@@ -2738,7 +2820,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2738
2820
  if (this.isCheck) {
2739
2821
  this.checkList = [];
2740
2822
  this.pickerValue.map(function (x) {
2741
- _this3.checkList.push(x.value);
2823
+ _this4.checkList.push(x.value);
2742
2824
  });
2743
2825
  }
2744
2826
  }
@@ -2746,15 +2828,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2746
2828
  this.showPicker = false;
2747
2829
  },
2748
2830
  getValue: function getValue() {
2749
- var _this4 = this;
2831
+ var _this5 = this;
2750
2832
 
2751
2833
  var value = '';
2752
2834
  if (this.isCheck) {
2753
2835
  var val = [];
2754
2836
  if (this.newColumns && this.newColumns.length > 0) {
2755
2837
  this.newColumns.filter(function (x) {
2756
- _this4.value.find(function (y) {
2757
- if (x[_this4.valueKey] == y || x[_this4.valueKey] == y.value) {
2838
+ _this5.value.find(function (y) {
2839
+ if (x[_this5.valueKey] == y || x[_this5.valueKey] == y.value) {
2758
2840
  val.push(x);
2759
2841
  }
2760
2842
  });
@@ -2772,7 +2854,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2772
2854
  this.newColumns.map(function (x, i) {
2773
2855
  if (typeof x === 'string' && value.indexOf(x) != -1) {
2774
2856
  index = i;
2775
- } else if (x[_this4.newValueKey] == value || x[_this4.newValueKey].indexOf(value) != -1) {
2857
+ } else if (x[_this5.newValueKey] == value || x[_this5.newValueKey].indexOf(value) != -1) {
2776
2858
  index = i;
2777
2859
  }
2778
2860
  });
@@ -2780,8 +2862,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2780
2862
  } else {
2781
2863
  var list = [];
2782
2864
  this.value.map(function (item) {
2783
- if (item[_this4.labelKey] || item[_this4.newValueKey]) {
2784
- list.push(item[_this4.labelKey] || item[_this4.newValueKey]);
2865
+ if (item[_this5.labelKey] || item[_this5.newValueKey]) {
2866
+ list.push(item[_this5.labelKey] || item[_this5.newValueKey]);
2785
2867
  } else if (typeof item === 'string') {
2786
2868
  list.push(item);
2787
2869
  }
@@ -2791,7 +2873,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2791
2873
  this.newColumns.map(function (x, i) {
2792
2874
  if (typeof x === 'string' && value.indexOf(x) != -1) {
2793
2875
  _index = i;
2794
- } else if (x[_this4.newValueKey] === value) {
2876
+ } else if (x[_this5.newValueKey] === value) {
2795
2877
  _index = i;
2796
2878
  }
2797
2879
  });
@@ -2804,9 +2886,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2804
2886
  if (typeof x === 'string' && value.indexOf(x) != -1) {
2805
2887
  _index2 = i;
2806
2888
  value = x;
2807
- } else if (x[_this4.newValueKey] === value) {
2889
+ } else if (x[_this5.newValueKey] === value) {
2808
2890
  _index2 = i;
2809
- value = x[_this4.labelKey] || x[_this4.newValueKey];
2891
+ value = x[_this5.labelKey] || x[_this5.newValueKey];
2810
2892
  }
2811
2893
  });
2812
2894
  this.newDefaultIndex = _index2;
@@ -2816,12 +2898,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2816
2898
  return value;
2817
2899
  },
2818
2900
  getSysCode: function getSysCode() {
2819
- var _this5 = this;
2901
+ var _this6 = this;
2820
2902
 
2821
2903
  var url = this.url,
2822
2904
  method = this.method,
2823
2905
  sysAppCode = this.sysAppCode,
2824
- param = this.param;
2906
+ param = this.param,
2907
+ keyWord = this.keyWord;
2825
2908
 
2826
2909
  var params = {
2827
2910
  url: this.baseUrl ? this.baseUrl + (url || api["c" /* findSysCode */]) : url || api["c" /* findSysCode */],
@@ -2831,6 +2914,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2831
2914
  pageIndex: this.pageIndex
2832
2915
  }, param)
2833
2916
  };
2917
+ if (this.isSearch) {
2918
+ params.params[this.searchKey] = keyWord;
2919
+ }
2834
2920
  this.newLoading = true;
2835
2921
  Object(http["a" /* default */])(params).then(function (res) {
2836
2922
  var status = res.status,
@@ -2839,45 +2925,45 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2839
2925
  rCode = res.rCode,
2840
2926
  results = res.results;
2841
2927
 
2842
- _this5.listLoading = false;
2928
+ _this6.listLoading = false;
2843
2929
  if (status == 'success' || rCode === 0 || status === true) {
2844
- var info = _this5.resultsName ? data ? data[_this5.resultsName] : results[_this5.resultsName] : data ? data : results;
2930
+ var info = _this6.resultsName ? data ? data[_this6.resultsName] : results[_this6.resultsName] : data ? data : results;
2845
2931
  info.map(function (x) {
2846
- if (_this5.isCheck) {
2847
- x.name = x[sysAppCode ? 'shortName' : _this5.labelKey] && x[sysAppCode ? 'shortName' : _this5.labelKey].replace(/<[^>]+>/g, '');
2932
+ if (_this6.isCheck) {
2933
+ x.name = x[sysAppCode ? 'shortName' : _this6.labelKey] && x[sysAppCode ? 'shortName' : _this6.labelKey].replace(/<[^>]+>/g, '');
2848
2934
  } else {
2849
- x.name = x[sysAppCode ? 'shortName' : _this5.labelKey];
2935
+ x.name = x[sysAppCode ? 'shortName' : _this6.labelKey];
2850
2936
  }
2851
- x.value = x[sysAppCode ? 'cciValue' : _this5.valueKey];
2937
+ x.value = x[sysAppCode ? 'cciValue' : _this6.valueKey];
2852
2938
  });
2853
2939
  if (data && data.totalCount) {
2854
- _this5.total = data.totalCount;
2855
- if (data.totalCount === _this5.newColumns.length) {
2856
- _this5.listFinished = true;
2940
+ _this6.total = data.totalCount;
2941
+ if (data.totalCount === _this6.newColumns.length) {
2942
+ _this6.listFinished = true;
2857
2943
  } else {
2858
- if (_this5.newColumns.length != 0) {
2859
- _this5.newColumns.push.apply(_this5.newColumns, info);
2944
+ if (_this6.newColumns.length != 0) {
2945
+ _this6.newColumns.push.apply(_this6.newColumns, info);
2860
2946
  } else {
2861
- _this5.newColumns = info;
2947
+ _this6.newColumns = info;
2862
2948
  }
2863
- _this5.pageIndex = res.data.nextPageNo;
2949
+ _this6.pageIndex = res.data.nextPageNo;
2864
2950
  }
2865
2951
  } else {
2866
- _this5.listFinished = true;
2867
- _this5.newColumns = info;
2952
+ _this6.listFinished = true;
2953
+ _this6.newColumns = info;
2868
2954
  }
2869
- if (_this5.beforResponse) {
2870
- _this5.newColumns = _this5.beforResponse(_this5.newColumns);
2871
- _this5.getValue();
2955
+ if (_this6.beforResponse) {
2956
+ _this6.newColumns = _this6.beforResponse(_this6.newColumns);
2957
+ _this6.getValue();
2872
2958
  } else {
2873
- _this5.getValue();
2959
+ _this6.getValue();
2874
2960
  }
2875
2961
  } else {
2876
- _this5.$toast(message);
2962
+ _this6.$toast(message);
2877
2963
  }
2878
- _this5.newLoading = false;
2964
+ _this6.newLoading = false;
2879
2965
  }).catch(function (err) {
2880
- _this5.$toast(err.message);
2966
+ _this6.$toast(err.message);
2881
2967
  });
2882
2968
  },
2883
2969
  handlePicker: function handlePicker() {
package/lib/radio.js CHANGED
@@ -659,7 +659,6 @@ var formatDate = function formatDate(date, fmt) {
659
659
  'q+': quarter[Math.ceil((obj.getMonth() + 1) / 3) - 1], // 季度
660
660
  S: obj.getMilliseconds() // 毫秒
661
661
  };
662
- console.log(o, 'o');
663
662
  if (/(y+)/.test(fmt)) {
664
663
  fmt = fmt.replace(RegExp.$1, (obj.getFullYear() + '').substr(4 - RegExp.$1.length));
665
664
  }
@@ -1936,7 +1935,6 @@ var base = {
1936
1935
 
1937
1936
  var http_request = function request(options) {
1938
1937
  var fn = void 0;
1939
- console.log(options, 'sss');
1940
1938
  switch (options.type) {
1941
1939
  case 'post':
1942
1940
  fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
@@ -660,7 +660,6 @@ var formatDate = function formatDate(date, fmt) {
660
660
  'q+': quarter[Math.ceil((obj.getMonth() + 1) / 3) - 1], // 季度
661
661
  S: obj.getMilliseconds() // 毫秒
662
662
  };
663
- console.log(o, 'o');
664
663
  if (/(y+)/.test(fmt)) {
665
664
  fmt = fmt.replace(RegExp.$1, (obj.getFullYear() + '').substr(4 - RegExp.$1.length));
666
665
  }
@@ -1940,7 +1939,6 @@ var base = {
1940
1939
 
1941
1940
  var http_request = function request(options) {
1942
1941
  var fn = void 0;
1943
- console.log(options, 'sss');
1944
1942
  switch (options.type) {
1945
1943
  case 'post':
1946
1944
  fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);