eoss-mobiles 0.2.19 → 0.2.21

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/lib/picker.js CHANGED
@@ -1740,8 +1740,8 @@ var axios_ajax = function ajax(url) {
1740
1740
  withCredentials: false
1741
1741
  });
1742
1742
  http.interceptors.request.use(function (config) {
1743
- if (type === 'post' && format) {
1744
- config.data = external_qs_default.a.stringify(params);
1743
+ if (type === 'post' && !format) {
1744
+ config.params = external_qs_default.a.stringify(params.params || params);
1745
1745
  if (!config.headers['content-type'] && !headers['Content-Type']) {
1746
1746
  config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1747
1747
  }
@@ -1749,7 +1749,7 @@ var axios_ajax = function ajax(url) {
1749
1749
  if (!config.headers['content-type'] && !headers['Content-Type']) {
1750
1750
  config.headers['content-type'] = 'application/json;charset=UTF-8';
1751
1751
  }
1752
- config.data = params;
1752
+ config.params = params.params || params;
1753
1753
  }
1754
1754
 
1755
1755
  if (util["a" /* default */].getStorage('token')) {
@@ -1896,6 +1896,7 @@ var base = {
1896
1896
  }, headers, format);
1897
1897
  },
1898
1898
  post: function post(url, params, headers, format) {
1899
+ console.log(params, 'params');
1899
1900
  if (params.params) {
1900
1901
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1901
1902
  } else {
@@ -1908,6 +1909,7 @@ var base = {
1908
1909
  // CONCATENATED MODULE: ./src/utils/http.js
1909
1910
 
1910
1911
  var http_request = function request(options) {
1912
+ console.log(options, 'options');
1911
1913
  var fn = void 0;
1912
1914
  switch (options.type) {
1913
1915
  case 'post':
@@ -2027,7 +2029,7 @@ module.exports = require("sm-crypto");
2027
2029
  // ESM COMPAT FLAG
2028
2030
  __webpack_require__.r(__webpack_exports__);
2029
2031
 
2030
- // 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=ddf89e2e&
2032
+ // 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=f54ad734&
2031
2033
  var render = function () {
2032
2034
  var _vm = this
2033
2035
  var _h = _vm.$createElement
@@ -2299,7 +2301,7 @@ var staticRenderFns = []
2299
2301
  render._withStripped = true
2300
2302
 
2301
2303
 
2302
- // CONCATENATED MODULE: ./packages/picker/src/main.vue?vue&type=template&id=ddf89e2e&
2304
+ // CONCATENATED MODULE: ./packages/picker/src/main.vue?vue&type=template&id=f54ad734&
2303
2305
 
2304
2306
  // EXTERNAL MODULE: ./src/config/api.js
2305
2307
  var api = __webpack_require__(2);
@@ -2432,6 +2434,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2432
2434
  //
2433
2435
  //
2434
2436
  //
2437
+ //
2438
+ //
2435
2439
 
2436
2440
 
2437
2441
 
@@ -2780,20 +2784,22 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2780
2784
  Object(http["a" /* default */])(params).then(function (res) {
2781
2785
  var status = res.status,
2782
2786
  data = res.data,
2783
- message = res.message;
2787
+ message = res.message,
2788
+ rCode = res.rCode,
2789
+ results = res.results;
2784
2790
 
2785
2791
  _this4.listLoading = false;
2786
- if (status == 'success') {
2787
- var info = _this4.resultsName ? data[_this4.resultsName] : data;
2792
+ if (status == 'success' || rCode === 0 || status === true) {
2793
+ var info = _this4.resultsName ? data ? data[_this4.resultsName] : results[_this4.resultsName] : data ? data : results;
2788
2794
  info.map(function (x) {
2789
2795
  if (_this4.isCheck) {
2790
- x.name = x[_this4.labelKey != 'name' && _this4.labelKey || 'shortName'] && x[_this4.labelKey != 'name' && _this4.labelKey || 'shortName'].replace(/<[^>]+>/g, '');
2796
+ x.name = x[sysAppCode ? 'shortName' : _this4.labelKey] && x[sysAppCode ? 'shortName' : _this4.labelKey].replace(/<[^>]+>/g, '');
2791
2797
  } else {
2792
- x.name = x[_this4.labelKey != 'name' && _this4.labelKey || 'shortName'];
2798
+ x.name = x[sysAppCode ? 'shortName' : _this4.labelKey];
2793
2799
  }
2794
- x.value = x[_this4.valueKey != 'value' && _this4.valueKey || 'cciValue'];
2800
+ x.value = x[sysAppCode ? 'cciValue' : _this4.valueKey];
2795
2801
  });
2796
- if (data.totalCount) {
2802
+ if (data && data.totalCount) {
2797
2803
  _this4.total = data.totalCount;
2798
2804
  if (data.totalCount === _this4.newColumns.length) {
2799
2805
  _this4.listFinished = true;
@@ -2809,7 +2815,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2809
2815
  _this4.listFinished = true;
2810
2816
  _this4.newColumns = info;
2811
2817
  }
2812
- if (_this4.isTable) _this4.$emit('tableColumns', _this4.newColumns);
2813
2818
  if (_this4.beforResponse) {
2814
2819
  _this4.newColumns = _this4.beforResponse(_this4.newColumns);
2815
2820
  _this4.getValue();
package/lib/radio.js CHANGED
@@ -1740,8 +1740,8 @@ var axios_ajax = function ajax(url) {
1740
1740
  withCredentials: false
1741
1741
  });
1742
1742
  http.interceptors.request.use(function (config) {
1743
- if (type === 'post' && format) {
1744
- config.data = external_qs_default.a.stringify(params);
1743
+ if (type === 'post' && !format) {
1744
+ config.params = external_qs_default.a.stringify(params.params || params);
1745
1745
  if (!config.headers['content-type'] && !headers['Content-Type']) {
1746
1746
  config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1747
1747
  }
@@ -1749,7 +1749,7 @@ var axios_ajax = function ajax(url) {
1749
1749
  if (!config.headers['content-type'] && !headers['Content-Type']) {
1750
1750
  config.headers['content-type'] = 'application/json;charset=UTF-8';
1751
1751
  }
1752
- config.data = params;
1752
+ config.params = params.params || params;
1753
1753
  }
1754
1754
 
1755
1755
  if (util["a" /* default */].getStorage('token')) {
@@ -1896,6 +1896,7 @@ var base = {
1896
1896
  }, headers, format);
1897
1897
  },
1898
1898
  post: function post(url, params, headers, format) {
1899
+ console.log(params, 'params');
1899
1900
  if (params.params) {
1900
1901
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1901
1902
  } else {
@@ -1908,6 +1909,7 @@ var base = {
1908
1909
  // CONCATENATED MODULE: ./src/utils/http.js
1909
1910
 
1910
1911
  var http_request = function request(options) {
1912
+ console.log(options, 'options');
1911
1913
  var fn = void 0;
1912
1914
  switch (options.type) {
1913
1915
  case 'post':
@@ -2026,7 +2028,7 @@ module.exports = require("sm-crypto");
2026
2028
  // ESM COMPAT FLAG
2027
2029
  __webpack_require__.r(__webpack_exports__);
2028
2030
 
2029
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/main.vue?vue&type=template&id=99c78332&
2031
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/main.vue?vue&type=template&id=2145df10&
2030
2032
  var render = function () {
2031
2033
  var _vm = this
2032
2034
  var _h = _vm.$createElement
@@ -2068,7 +2070,9 @@ var render = function () {
2068
2070
  false
2069
2071
  ),
2070
2072
  [
2071
- _vm._v("\n " + _vm._s(item[_vm.labelKey]) + "\n "),
2073
+ _c("span", {
2074
+ domProps: { innerHTML: _vm._s(item[_vm.labelKey]) },
2075
+ }),
2072
2076
  _vm._t("default", null, {
2073
2077
  slot: "icon",
2074
2078
  checked: item[_vm.valueKey] == _vm.newRadio,
@@ -2087,7 +2091,7 @@ var staticRenderFns = []
2087
2091
  render._withStripped = true
2088
2092
 
2089
2093
 
2090
- // CONCATENATED MODULE: ./packages/radio/src/main.vue?vue&type=template&id=99c78332&
2094
+ // CONCATENATED MODULE: ./packages/radio/src/main.vue?vue&type=template&id=2145df10&
2091
2095
 
2092
2096
  // EXTERNAL MODULE: ./src/config/api.js
2093
2097
  var api = __webpack_require__(2);
@@ -2191,7 +2195,11 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
2191
2195
  type: Boolean,
2192
2196
  default: false
2193
2197
  },
2194
- baseUrl: String
2198
+ baseUrl: String,
2199
+ allowHtml: {
2200
+ type: Boolean,
2201
+ default: false
2202
+ }
2195
2203
  },
2196
2204
  computed: {
2197
2205
  newRadio: {
@@ -2206,6 +2214,11 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
2206
2214
  watch: {
2207
2215
  data: {
2208
2216
  handler: function handler(val) {
2217
+ var _this = this;
2218
+
2219
+ val.map(function (item) {
2220
+ item[_this.labelKey] = _this.allowHtml ? item[_this.labelKey] : item[_this.labelKey].replace(/<[^>]+>/g, '');
2221
+ });
2209
2222
  this.newData = val;
2210
2223
  },
2211
2224
 
@@ -2230,7 +2243,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
2230
2243
  // this.$emit('change', val);
2231
2244
  // },
2232
2245
  getSysCode: function getSysCode() {
2233
- var _this = this;
2246
+ var _this2 = this;
2234
2247
 
2235
2248
  var url = this.url,
2236
2249
  method = this.method,
@@ -2247,20 +2260,21 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
2247
2260
  Object(http["a" /* default */])(params).then(function (res) {
2248
2261
  var status = res.status,
2249
2262
  data = res.data,
2250
- message = res.message;
2251
-
2252
- if (status == 'success') {
2253
- data.map(function (item) {
2254
- item.name = item.shortName;
2255
- item.value = item.cciValue;
2263
+ message = res.message,
2264
+ rCode = res.rCode,
2265
+ results = res.results;
2266
+
2267
+ if (status == 'success' || rCode === 0 || status === true) {
2268
+ [].concat(data || results).map(function (item) {
2269
+ item.name = _this2.allowHtml ? item[sysAppCode ? 'shortName' : _this2.labelKey] : item[sysAppCode ? 'shortName' : _this2.labelKey].replace(/<[^>]+>/g, '');
2270
+ item.value = item[sysAppCode ? 'cciValue' : _this2.value];
2256
2271
  });
2257
- _this.newData = data;
2258
- if (_this.isTable) _this.$emit('tableColumns', _this.newData);
2272
+ _this2.newData = data || results;
2259
2273
  } else {
2260
- _this.$toast(message);
2274
+ _this2.$toast(message);
2261
2275
  }
2262
2276
  }).catch(function (err) {
2263
- _this.$toast(err.message);
2277
+ _this2.$toast(err.message);
2264
2278
  });
2265
2279
  }
2266
2280
  }
@@ -1744,8 +1744,8 @@ var axios_ajax = function ajax(url) {
1744
1744
  withCredentials: false
1745
1745
  });
1746
1746
  http.interceptors.request.use(function (config) {
1747
- if (type === 'post' && format) {
1748
- config.data = external_qs_default.a.stringify(params);
1747
+ if (type === 'post' && !format) {
1748
+ config.params = external_qs_default.a.stringify(params.params || params);
1749
1749
  if (!config.headers['content-type'] && !headers['Content-Type']) {
1750
1750
  config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1751
1751
  }
@@ -1753,7 +1753,7 @@ var axios_ajax = function ajax(url) {
1753
1753
  if (!config.headers['content-type'] && !headers['Content-Type']) {
1754
1754
  config.headers['content-type'] = 'application/json;charset=UTF-8';
1755
1755
  }
1756
- config.data = params;
1756
+ config.params = params.params || params;
1757
1757
  }
1758
1758
 
1759
1759
  if (util["a" /* default */].getStorage('token')) {
@@ -1900,6 +1900,7 @@ var base = {
1900
1900
  }, headers, format);
1901
1901
  },
1902
1902
  post: function post(url, params, headers, format) {
1903
+ console.log(params, 'params');
1903
1904
  if (params.params) {
1904
1905
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1905
1906
  } else {
@@ -1912,6 +1913,7 @@ var base = {
1912
1913
  // CONCATENATED MODULE: ./src/utils/http.js
1913
1914
 
1914
1915
  var http_request = function request(options) {
1916
+ console.log(options, 'options');
1915
1917
  var fn = void 0;
1916
1918
  switch (options.type) {
1917
1919
  case 'post':
package/lib/selector.js CHANGED
@@ -1740,8 +1740,8 @@ var axios_ajax = function ajax(url) {
1740
1740
  withCredentials: false
1741
1741
  });
1742
1742
  http.interceptors.request.use(function (config) {
1743
- if (type === 'post' && format) {
1744
- config.data = external_qs_default.a.stringify(params);
1743
+ if (type === 'post' && !format) {
1744
+ config.params = external_qs_default.a.stringify(params.params || params);
1745
1745
  if (!config.headers['content-type'] && !headers['Content-Type']) {
1746
1746
  config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1747
1747
  }
@@ -1749,7 +1749,7 @@ var axios_ajax = function ajax(url) {
1749
1749
  if (!config.headers['content-type'] && !headers['Content-Type']) {
1750
1750
  config.headers['content-type'] = 'application/json;charset=UTF-8';
1751
1751
  }
1752
- config.data = params;
1752
+ config.params = params.params || params;
1753
1753
  }
1754
1754
 
1755
1755
  if (util["a" /* default */].getStorage('token')) {
@@ -1896,6 +1896,7 @@ var base = {
1896
1896
  }, headers, format);
1897
1897
  },
1898
1898
  post: function post(url, params, headers, format) {
1899
+ console.log(params, 'params');
1899
1900
  if (params.params) {
1900
1901
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1901
1902
  } else {
@@ -1908,6 +1909,7 @@ var base = {
1908
1909
  // CONCATENATED MODULE: ./src/utils/http.js
1909
1910
 
1910
1911
  var http_request = function request(options) {
1912
+ console.log(options, 'options');
1911
1913
  var fn = void 0;
1912
1914
  switch (options.type) {
1913
1915
  case 'post':