eoss-mobiles 0.2.30 → 0.2.32
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/CHANGELOG.md +8 -2
- package/lib/checkbox.js +22 -8
- package/lib/eoss-mobile.common.js +85 -54
- package/lib/flow-btn.js +22 -8
- package/lib/flow-list.js +22 -8
- package/lib/flow.js +22 -8
- package/lib/index.js +1 -1
- package/lib/picker.js +79 -48
- package/lib/radio.js +22 -8
- package/lib/retrial-auth.js +22 -8
- package/lib/selector.js +22 -8
- package/lib/table-column.js +22 -8
- package/lib/table.js +22 -8
- package/lib/utils/axios.js +16 -3
- package/lib/utils/http.js +6 -5
- package/package.json +1 -1
- package/packages/picker/src/main.vue +20 -2
- package/src/index.js +1 -1
- package/src/utils/axios.js +30 -6
- package/src/utils/http.js +31 -5
package/lib/picker.js
CHANGED
|
@@ -1740,6 +1740,8 @@ var axios_ajax = function ajax(url) {
|
|
|
1740
1740
|
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1741
1741
|
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
1742
1742
|
var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
|
|
1743
|
+
var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1744
|
+
var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
|
|
1743
1745
|
|
|
1744
1746
|
var http = external_axios_default.a.create({
|
|
1745
1747
|
baseURL: apiUrl,
|
|
@@ -1803,6 +1805,13 @@ var axios_ajax = function ajax(url) {
|
|
|
1803
1805
|
if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
|
|
1804
1806
|
delete config.headers.deviceId;
|
|
1805
1807
|
}
|
|
1808
|
+
if (!isData) {
|
|
1809
|
+
delete config.data;
|
|
1810
|
+
}
|
|
1811
|
+
if (!isParams) {
|
|
1812
|
+
delete config.params;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1806
1815
|
return config;
|
|
1807
1816
|
}, function (error) {
|
|
1808
1817
|
return Promise.error(error);
|
|
@@ -1886,6 +1895,8 @@ var base = {
|
|
|
1886
1895
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1887
1896
|
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1888
1897
|
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
1898
|
+
var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1899
|
+
var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1889
1900
|
|
|
1890
1901
|
if (params.params && url.search('registerNew') === -1) {
|
|
1891
1902
|
params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
|
|
@@ -1904,16 +1915,18 @@ var base = {
|
|
|
1904
1915
|
}
|
|
1905
1916
|
return axios_ajax(url, {
|
|
1906
1917
|
params: params
|
|
1907
|
-
}, headers, format);
|
|
1918
|
+
}, headers, format, 'get', isData, isParams);
|
|
1908
1919
|
},
|
|
1909
1920
|
post: function post(url, params, headers, format) {
|
|
1910
|
-
|
|
1921
|
+
var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1922
|
+
var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1923
|
+
|
|
1911
1924
|
if (params.params) {
|
|
1912
1925
|
params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
|
|
1913
1926
|
} else {
|
|
1914
1927
|
params.userId = params.userId || util["a" /* default */].getStorage('userId');
|
|
1915
1928
|
}
|
|
1916
|
-
return axios_ajax(url, params, headers, format, 'post');
|
|
1929
|
+
return axios_ajax(url, params, headers, format, 'post', isData, isParams);
|
|
1917
1930
|
}
|
|
1918
1931
|
};
|
|
1919
1932
|
/* harmony default export */ var axios = (base);
|
|
@@ -1921,21 +1934,22 @@ var base = {
|
|
|
1921
1934
|
|
|
1922
1935
|
var http_request = function request(options) {
|
|
1923
1936
|
var fn = void 0;
|
|
1937
|
+
console.log(options, 'sss');
|
|
1924
1938
|
switch (options.type) {
|
|
1925
1939
|
case 'post':
|
|
1926
|
-
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1940
|
+
fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
|
|
1927
1941
|
break;
|
|
1928
1942
|
case 'POST':
|
|
1929
|
-
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1943
|
+
fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
|
|
1930
1944
|
break;
|
|
1931
1945
|
case 'get':
|
|
1932
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1946
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1933
1947
|
break;
|
|
1934
1948
|
case 'GET':
|
|
1935
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1949
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1936
1950
|
break;
|
|
1937
1951
|
default:
|
|
1938
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1952
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1939
1953
|
}
|
|
1940
1954
|
return fn;
|
|
1941
1955
|
};
|
|
@@ -2039,7 +2053,7 @@ module.exports = require("sm-crypto");
|
|
|
2039
2053
|
// ESM COMPAT FLAG
|
|
2040
2054
|
__webpack_require__.r(__webpack_exports__);
|
|
2041
2055
|
|
|
2042
|
-
// 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=
|
|
2056
|
+
// 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=6f8d4ed8&
|
|
2043
2057
|
var render = function () {
|
|
2044
2058
|
var _vm = this
|
|
2045
2059
|
var _h = _vm.$createElement
|
|
@@ -2311,7 +2325,7 @@ var staticRenderFns = []
|
|
|
2311
2325
|
render._withStripped = true
|
|
2312
2326
|
|
|
2313
2327
|
|
|
2314
|
-
// CONCATENATED MODULE: ./packages/picker/src/main.vue?vue&type=template&id=
|
|
2328
|
+
// CONCATENATED MODULE: ./packages/picker/src/main.vue?vue&type=template&id=6f8d4ed8&
|
|
2315
2329
|
|
|
2316
2330
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
2317
2331
|
var api = __webpack_require__(2);
|
|
@@ -2525,6 +2539,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2525
2539
|
type: String,
|
|
2526
2540
|
default: 'name'
|
|
2527
2541
|
},
|
|
2542
|
+
objectType: {
|
|
2543
|
+
type: Boolean,
|
|
2544
|
+
default: true
|
|
2545
|
+
},
|
|
2528
2546
|
sysAppCode: {
|
|
2529
2547
|
type: String,
|
|
2530
2548
|
default: ''
|
|
@@ -2573,7 +2591,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2573
2591
|
return this.getValue();
|
|
2574
2592
|
},
|
|
2575
2593
|
set: function set(val) {
|
|
2576
|
-
this
|
|
2594
|
+
var _this = this;
|
|
2595
|
+
|
|
2596
|
+
if (!this.objectType && val.length === undefined) {
|
|
2597
|
+
this.$emit('input', val[this.sysAppCode ? 'cciValue' : this.valueKey]);
|
|
2598
|
+
} else if (!this.objectType && val.length != undefined) {
|
|
2599
|
+
val.map(function (x) {
|
|
2600
|
+
if ((typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object') {
|
|
2601
|
+
x = x[_this.sysAppCode ? 'cciValue' : _this.valueKey];
|
|
2602
|
+
}
|
|
2603
|
+
});
|
|
2604
|
+
this.$emit('input', val);
|
|
2605
|
+
} else {
|
|
2606
|
+
this.$emit('input', val);
|
|
2607
|
+
}
|
|
2577
2608
|
}
|
|
2578
2609
|
}
|
|
2579
2610
|
},
|
|
@@ -2621,7 +2652,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2621
2652
|
}
|
|
2622
2653
|
},
|
|
2623
2654
|
mounted: function mounted() {
|
|
2624
|
-
var
|
|
2655
|
+
var _this2 = this;
|
|
2625
2656
|
|
|
2626
2657
|
if ((this.sysAppCode || this.url) && this.newColumns.length == 0 && !this.isCheck) {
|
|
2627
2658
|
this.getSysCode();
|
|
@@ -2636,7 +2667,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2636
2667
|
} else if (this.isCheck) {
|
|
2637
2668
|
var _data = this.value;
|
|
2638
2669
|
_data.map(function (item) {
|
|
2639
|
-
|
|
2670
|
+
_this2.checkList.push(item[_this2.valueKey] || item.value || item);
|
|
2640
2671
|
});
|
|
2641
2672
|
}
|
|
2642
2673
|
},
|
|
@@ -2677,13 +2708,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2677
2708
|
this.$refs.checkboxes[index].toggle();
|
|
2678
2709
|
},
|
|
2679
2710
|
onConfirm: function onConfirm(value, isConfirm) {
|
|
2680
|
-
var
|
|
2711
|
+
var _this3 = this;
|
|
2681
2712
|
|
|
2682
2713
|
if (isConfirm) {
|
|
2683
2714
|
if (this.isCheck) {
|
|
2684
2715
|
var data = [];
|
|
2685
2716
|
this.newColumns.filter(function (x) {
|
|
2686
|
-
|
|
2717
|
+
_this3.checkList.find(function (y) {
|
|
2687
2718
|
if (x.value === y) {
|
|
2688
2719
|
data.push(x);
|
|
2689
2720
|
}
|
|
@@ -2697,7 +2728,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2697
2728
|
if (this.isCheck) {
|
|
2698
2729
|
this.checkList = [];
|
|
2699
2730
|
this.pickerValue.map(function (x) {
|
|
2700
|
-
|
|
2731
|
+
_this3.checkList.push(x.value);
|
|
2701
2732
|
});
|
|
2702
2733
|
}
|
|
2703
2734
|
}
|
|
@@ -2705,15 +2736,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2705
2736
|
this.showPicker = false;
|
|
2706
2737
|
},
|
|
2707
2738
|
getValue: function getValue() {
|
|
2708
|
-
var
|
|
2739
|
+
var _this4 = this;
|
|
2709
2740
|
|
|
2710
2741
|
var value = '';
|
|
2711
2742
|
if (this.isCheck) {
|
|
2712
2743
|
var val = [];
|
|
2713
2744
|
if (this.newColumns && this.newColumns.length > 0) {
|
|
2714
2745
|
this.newColumns.filter(function (x) {
|
|
2715
|
-
|
|
2716
|
-
if (x[
|
|
2746
|
+
_this4.value.find(function (y) {
|
|
2747
|
+
if (x[_this4.valueKey] == y || x[_this4.valueKey] == y.value) {
|
|
2717
2748
|
val.push(x);
|
|
2718
2749
|
}
|
|
2719
2750
|
});
|
|
@@ -2731,7 +2762,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2731
2762
|
this.newColumns.map(function (x, i) {
|
|
2732
2763
|
if (typeof x === 'string' && value.indexOf(x) != -1) {
|
|
2733
2764
|
index = i;
|
|
2734
|
-
} else if (x[
|
|
2765
|
+
} else if (x[_this4.newValueKey] == value || x[_this4.newValueKey].indexOf(value) != -1) {
|
|
2735
2766
|
index = i;
|
|
2736
2767
|
}
|
|
2737
2768
|
});
|
|
@@ -2739,8 +2770,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2739
2770
|
} else {
|
|
2740
2771
|
var list = [];
|
|
2741
2772
|
this.value.map(function (item) {
|
|
2742
|
-
if (item[
|
|
2743
|
-
list.push(item[
|
|
2773
|
+
if (item[_this4.labelKey] || item[_this4.newValueKey]) {
|
|
2774
|
+
list.push(item[_this4.labelKey] || item[_this4.newValueKey]);
|
|
2744
2775
|
} else if (typeof item === 'string') {
|
|
2745
2776
|
list.push(item);
|
|
2746
2777
|
}
|
|
@@ -2750,7 +2781,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2750
2781
|
this.newColumns.map(function (x, i) {
|
|
2751
2782
|
if (typeof x === 'string' && value.indexOf(x) != -1) {
|
|
2752
2783
|
_index = i;
|
|
2753
|
-
} else if (x[
|
|
2784
|
+
} else if (x[_this4.newValueKey] === value) {
|
|
2754
2785
|
_index = i;
|
|
2755
2786
|
}
|
|
2756
2787
|
});
|
|
@@ -2763,9 +2794,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2763
2794
|
if (typeof x === 'string' && value.indexOf(x) != -1) {
|
|
2764
2795
|
_index2 = i;
|
|
2765
2796
|
value = x;
|
|
2766
|
-
} else if (x[
|
|
2797
|
+
} else if (x[_this4.newValueKey] === value) {
|
|
2767
2798
|
_index2 = i;
|
|
2768
|
-
value = x[
|
|
2799
|
+
value = x[_this4.labelKey] || x[_this4.newValueKey];
|
|
2769
2800
|
}
|
|
2770
2801
|
});
|
|
2771
2802
|
this.newDefaultIndex = _index2;
|
|
@@ -2775,7 +2806,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2775
2806
|
return value;
|
|
2776
2807
|
},
|
|
2777
2808
|
getSysCode: function getSysCode() {
|
|
2778
|
-
var
|
|
2809
|
+
var _this5 = this;
|
|
2779
2810
|
|
|
2780
2811
|
var url = this.url,
|
|
2781
2812
|
method = this.method,
|
|
@@ -2798,45 +2829,45 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2798
2829
|
rCode = res.rCode,
|
|
2799
2830
|
results = res.results;
|
|
2800
2831
|
|
|
2801
|
-
|
|
2832
|
+
_this5.listLoading = false;
|
|
2802
2833
|
if (status == 'success' || rCode === 0 || status === true) {
|
|
2803
|
-
var info =
|
|
2834
|
+
var info = _this5.resultsName ? data ? data[_this5.resultsName] : results[_this5.resultsName] : data ? data : results;
|
|
2804
2835
|
info.map(function (x) {
|
|
2805
|
-
if (
|
|
2806
|
-
x.name = x[sysAppCode ? 'shortName' :
|
|
2836
|
+
if (_this5.isCheck) {
|
|
2837
|
+
x.name = x[sysAppCode ? 'shortName' : _this5.labelKey] && x[sysAppCode ? 'shortName' : _this5.labelKey].replace(/<[^>]+>/g, '');
|
|
2807
2838
|
} else {
|
|
2808
|
-
x.name = x[sysAppCode ? 'shortName' :
|
|
2839
|
+
x.name = x[sysAppCode ? 'shortName' : _this5.labelKey];
|
|
2809
2840
|
}
|
|
2810
|
-
x.value = x[sysAppCode ? 'cciValue' :
|
|
2841
|
+
x.value = x[sysAppCode ? 'cciValue' : _this5.valueKey];
|
|
2811
2842
|
});
|
|
2812
2843
|
if (data && data.totalCount) {
|
|
2813
|
-
|
|
2814
|
-
if (data.totalCount ===
|
|
2815
|
-
|
|
2844
|
+
_this5.total = data.totalCount;
|
|
2845
|
+
if (data.totalCount === _this5.newColumns.length) {
|
|
2846
|
+
_this5.listFinished = true;
|
|
2816
2847
|
} else {
|
|
2817
|
-
if (
|
|
2818
|
-
|
|
2848
|
+
if (_this5.newColumns.length != 0) {
|
|
2849
|
+
_this5.newColumns.push.apply(_this5.newColumns, info);
|
|
2819
2850
|
} else {
|
|
2820
|
-
|
|
2851
|
+
_this5.newColumns = info;
|
|
2821
2852
|
}
|
|
2822
|
-
|
|
2853
|
+
_this5.pageIndex = res.data.nextPageNo;
|
|
2823
2854
|
}
|
|
2824
2855
|
} else {
|
|
2825
|
-
|
|
2826
|
-
|
|
2856
|
+
_this5.listFinished = true;
|
|
2857
|
+
_this5.newColumns = info;
|
|
2827
2858
|
}
|
|
2828
|
-
if (
|
|
2829
|
-
|
|
2830
|
-
|
|
2859
|
+
if (_this5.beforResponse) {
|
|
2860
|
+
_this5.newColumns = _this5.beforResponse(_this5.newColumns);
|
|
2861
|
+
_this5.getValue();
|
|
2831
2862
|
} else {
|
|
2832
|
-
|
|
2863
|
+
_this5.getValue();
|
|
2833
2864
|
}
|
|
2834
2865
|
} else {
|
|
2835
|
-
|
|
2866
|
+
_this5.$toast(message);
|
|
2836
2867
|
}
|
|
2837
|
-
|
|
2868
|
+
_this5.newLoading = false;
|
|
2838
2869
|
}).catch(function (err) {
|
|
2839
|
-
|
|
2870
|
+
_this5.$toast(err.message);
|
|
2840
2871
|
});
|
|
2841
2872
|
},
|
|
2842
2873
|
handlePicker: function handlePicker() {
|
package/lib/radio.js
CHANGED
|
@@ -1740,6 +1740,8 @@ var axios_ajax = function ajax(url) {
|
|
|
1740
1740
|
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1741
1741
|
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
1742
1742
|
var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
|
|
1743
|
+
var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1744
|
+
var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
|
|
1743
1745
|
|
|
1744
1746
|
var http = external_axios_default.a.create({
|
|
1745
1747
|
baseURL: apiUrl,
|
|
@@ -1803,6 +1805,13 @@ var axios_ajax = function ajax(url) {
|
|
|
1803
1805
|
if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
|
|
1804
1806
|
delete config.headers.deviceId;
|
|
1805
1807
|
}
|
|
1808
|
+
if (!isData) {
|
|
1809
|
+
delete config.data;
|
|
1810
|
+
}
|
|
1811
|
+
if (!isParams) {
|
|
1812
|
+
delete config.params;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1806
1815
|
return config;
|
|
1807
1816
|
}, function (error) {
|
|
1808
1817
|
return Promise.error(error);
|
|
@@ -1886,6 +1895,8 @@ var base = {
|
|
|
1886
1895
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1887
1896
|
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1888
1897
|
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
1898
|
+
var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1899
|
+
var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1889
1900
|
|
|
1890
1901
|
if (params.params && url.search('registerNew') === -1) {
|
|
1891
1902
|
params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
|
|
@@ -1904,16 +1915,18 @@ var base = {
|
|
|
1904
1915
|
}
|
|
1905
1916
|
return axios_ajax(url, {
|
|
1906
1917
|
params: params
|
|
1907
|
-
}, headers, format);
|
|
1918
|
+
}, headers, format, 'get', isData, isParams);
|
|
1908
1919
|
},
|
|
1909
1920
|
post: function post(url, params, headers, format) {
|
|
1910
|
-
|
|
1921
|
+
var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1922
|
+
var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1923
|
+
|
|
1911
1924
|
if (params.params) {
|
|
1912
1925
|
params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
|
|
1913
1926
|
} else {
|
|
1914
1927
|
params.userId = params.userId || util["a" /* default */].getStorage('userId');
|
|
1915
1928
|
}
|
|
1916
|
-
return axios_ajax(url, params, headers, format, 'post');
|
|
1929
|
+
return axios_ajax(url, params, headers, format, 'post', isData, isParams);
|
|
1917
1930
|
}
|
|
1918
1931
|
};
|
|
1919
1932
|
/* harmony default export */ var axios = (base);
|
|
@@ -1921,21 +1934,22 @@ var base = {
|
|
|
1921
1934
|
|
|
1922
1935
|
var http_request = function request(options) {
|
|
1923
1936
|
var fn = void 0;
|
|
1937
|
+
console.log(options, 'sss');
|
|
1924
1938
|
switch (options.type) {
|
|
1925
1939
|
case 'post':
|
|
1926
|
-
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1940
|
+
fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
|
|
1927
1941
|
break;
|
|
1928
1942
|
case 'POST':
|
|
1929
|
-
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1943
|
+
fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
|
|
1930
1944
|
break;
|
|
1931
1945
|
case 'get':
|
|
1932
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1946
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1933
1947
|
break;
|
|
1934
1948
|
case 'GET':
|
|
1935
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1949
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1936
1950
|
break;
|
|
1937
1951
|
default:
|
|
1938
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1952
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1939
1953
|
}
|
|
1940
1954
|
return fn;
|
|
1941
1955
|
};
|
package/lib/retrial-auth.js
CHANGED
|
@@ -1744,6 +1744,8 @@ var axios_ajax = function ajax(url) {
|
|
|
1744
1744
|
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1745
1745
|
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
1746
1746
|
var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
|
|
1747
|
+
var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1748
|
+
var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
|
|
1747
1749
|
|
|
1748
1750
|
var http = external_axios_default.a.create({
|
|
1749
1751
|
baseURL: apiUrl,
|
|
@@ -1807,6 +1809,13 @@ var axios_ajax = function ajax(url) {
|
|
|
1807
1809
|
if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
|
|
1808
1810
|
delete config.headers.deviceId;
|
|
1809
1811
|
}
|
|
1812
|
+
if (!isData) {
|
|
1813
|
+
delete config.data;
|
|
1814
|
+
}
|
|
1815
|
+
if (!isParams) {
|
|
1816
|
+
delete config.params;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1810
1819
|
return config;
|
|
1811
1820
|
}, function (error) {
|
|
1812
1821
|
return Promise.error(error);
|
|
@@ -1890,6 +1899,8 @@ var base = {
|
|
|
1890
1899
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1891
1900
|
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1892
1901
|
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
1902
|
+
var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1903
|
+
var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1893
1904
|
|
|
1894
1905
|
if (params.params && url.search('registerNew') === -1) {
|
|
1895
1906
|
params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
|
|
@@ -1908,16 +1919,18 @@ var base = {
|
|
|
1908
1919
|
}
|
|
1909
1920
|
return axios_ajax(url, {
|
|
1910
1921
|
params: params
|
|
1911
|
-
}, headers, format);
|
|
1922
|
+
}, headers, format, 'get', isData, isParams);
|
|
1912
1923
|
},
|
|
1913
1924
|
post: function post(url, params, headers, format) {
|
|
1914
|
-
|
|
1925
|
+
var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1926
|
+
var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1927
|
+
|
|
1915
1928
|
if (params.params) {
|
|
1916
1929
|
params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
|
|
1917
1930
|
} else {
|
|
1918
1931
|
params.userId = params.userId || util["a" /* default */].getStorage('userId');
|
|
1919
1932
|
}
|
|
1920
|
-
return axios_ajax(url, params, headers, format, 'post');
|
|
1933
|
+
return axios_ajax(url, params, headers, format, 'post', isData, isParams);
|
|
1921
1934
|
}
|
|
1922
1935
|
};
|
|
1923
1936
|
/* harmony default export */ var axios = (base);
|
|
@@ -1925,21 +1938,22 @@ var base = {
|
|
|
1925
1938
|
|
|
1926
1939
|
var http_request = function request(options) {
|
|
1927
1940
|
var fn = void 0;
|
|
1941
|
+
console.log(options, 'sss');
|
|
1928
1942
|
switch (options.type) {
|
|
1929
1943
|
case 'post':
|
|
1930
|
-
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1944
|
+
fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
|
|
1931
1945
|
break;
|
|
1932
1946
|
case 'POST':
|
|
1933
|
-
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1947
|
+
fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
|
|
1934
1948
|
break;
|
|
1935
1949
|
case 'get':
|
|
1936
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1950
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1937
1951
|
break;
|
|
1938
1952
|
case 'GET':
|
|
1939
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1953
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1940
1954
|
break;
|
|
1941
1955
|
default:
|
|
1942
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1956
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1943
1957
|
}
|
|
1944
1958
|
return fn;
|
|
1945
1959
|
};
|
package/lib/selector.js
CHANGED
|
@@ -1740,6 +1740,8 @@ var axios_ajax = function ajax(url) {
|
|
|
1740
1740
|
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1741
1741
|
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
1742
1742
|
var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
|
|
1743
|
+
var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1744
|
+
var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
|
|
1743
1745
|
|
|
1744
1746
|
var http = external_axios_default.a.create({
|
|
1745
1747
|
baseURL: apiUrl,
|
|
@@ -1803,6 +1805,13 @@ var axios_ajax = function ajax(url) {
|
|
|
1803
1805
|
if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
|
|
1804
1806
|
delete config.headers.deviceId;
|
|
1805
1807
|
}
|
|
1808
|
+
if (!isData) {
|
|
1809
|
+
delete config.data;
|
|
1810
|
+
}
|
|
1811
|
+
if (!isParams) {
|
|
1812
|
+
delete config.params;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1806
1815
|
return config;
|
|
1807
1816
|
}, function (error) {
|
|
1808
1817
|
return Promise.error(error);
|
|
@@ -1886,6 +1895,8 @@ var base = {
|
|
|
1886
1895
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1887
1896
|
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1888
1897
|
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
1898
|
+
var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1899
|
+
var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1889
1900
|
|
|
1890
1901
|
if (params.params && url.search('registerNew') === -1) {
|
|
1891
1902
|
params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
|
|
@@ -1904,16 +1915,18 @@ var base = {
|
|
|
1904
1915
|
}
|
|
1905
1916
|
return axios_ajax(url, {
|
|
1906
1917
|
params: params
|
|
1907
|
-
}, headers, format);
|
|
1918
|
+
}, headers, format, 'get', isData, isParams);
|
|
1908
1919
|
},
|
|
1909
1920
|
post: function post(url, params, headers, format) {
|
|
1910
|
-
|
|
1921
|
+
var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1922
|
+
var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1923
|
+
|
|
1911
1924
|
if (params.params) {
|
|
1912
1925
|
params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
|
|
1913
1926
|
} else {
|
|
1914
1927
|
params.userId = params.userId || util["a" /* default */].getStorage('userId');
|
|
1915
1928
|
}
|
|
1916
|
-
return axios_ajax(url, params, headers, format, 'post');
|
|
1929
|
+
return axios_ajax(url, params, headers, format, 'post', isData, isParams);
|
|
1917
1930
|
}
|
|
1918
1931
|
};
|
|
1919
1932
|
/* harmony default export */ var axios = (base);
|
|
@@ -1921,21 +1934,22 @@ var base = {
|
|
|
1921
1934
|
|
|
1922
1935
|
var http_request = function request(options) {
|
|
1923
1936
|
var fn = void 0;
|
|
1937
|
+
console.log(options, 'sss');
|
|
1924
1938
|
switch (options.type) {
|
|
1925
1939
|
case 'post':
|
|
1926
|
-
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1940
|
+
fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
|
|
1927
1941
|
break;
|
|
1928
1942
|
case 'POST':
|
|
1929
|
-
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1943
|
+
fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
|
|
1930
1944
|
break;
|
|
1931
1945
|
case 'get':
|
|
1932
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1946
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1933
1947
|
break;
|
|
1934
1948
|
case 'GET':
|
|
1935
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1949
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1936
1950
|
break;
|
|
1937
1951
|
default:
|
|
1938
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1952
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1939
1953
|
}
|
|
1940
1954
|
return fn;
|
|
1941
1955
|
};
|
package/lib/table-column.js
CHANGED
|
@@ -1740,6 +1740,8 @@ var axios_ajax = function ajax(url) {
|
|
|
1740
1740
|
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1741
1741
|
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
1742
1742
|
var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
|
|
1743
|
+
var isData = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1744
|
+
var isParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
|
|
1743
1745
|
|
|
1744
1746
|
var http = external_axios_default.a.create({
|
|
1745
1747
|
baseURL: apiUrl,
|
|
@@ -1803,6 +1805,13 @@ var axios_ajax = function ajax(url) {
|
|
|
1803
1805
|
if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
|
|
1804
1806
|
delete config.headers.deviceId;
|
|
1805
1807
|
}
|
|
1808
|
+
if (!isData) {
|
|
1809
|
+
delete config.data;
|
|
1810
|
+
}
|
|
1811
|
+
if (!isParams) {
|
|
1812
|
+
delete config.params;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1806
1815
|
return config;
|
|
1807
1816
|
}, function (error) {
|
|
1808
1817
|
return Promise.error(error);
|
|
@@ -1886,6 +1895,8 @@ var base = {
|
|
|
1886
1895
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1887
1896
|
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1888
1897
|
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
1898
|
+
var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1899
|
+
var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1889
1900
|
|
|
1890
1901
|
if (params.params && url.search('registerNew') === -1) {
|
|
1891
1902
|
params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
|
|
@@ -1904,16 +1915,18 @@ var base = {
|
|
|
1904
1915
|
}
|
|
1905
1916
|
return axios_ajax(url, {
|
|
1906
1917
|
params: params
|
|
1907
|
-
}, headers, format);
|
|
1918
|
+
}, headers, format, 'get', isData, isParams);
|
|
1908
1919
|
},
|
|
1909
1920
|
post: function post(url, params, headers, format) {
|
|
1910
|
-
|
|
1921
|
+
var isData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
1922
|
+
var isParams = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1923
|
+
|
|
1911
1924
|
if (params.params) {
|
|
1912
1925
|
params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
|
|
1913
1926
|
} else {
|
|
1914
1927
|
params.userId = params.userId || util["a" /* default */].getStorage('userId');
|
|
1915
1928
|
}
|
|
1916
|
-
return axios_ajax(url, params, headers, format, 'post');
|
|
1929
|
+
return axios_ajax(url, params, headers, format, 'post', isData, isParams);
|
|
1917
1930
|
}
|
|
1918
1931
|
};
|
|
1919
1932
|
/* harmony default export */ var axios = (base);
|
|
@@ -1921,21 +1934,22 @@ var base = {
|
|
|
1921
1934
|
|
|
1922
1935
|
var http_request = function request(options) {
|
|
1923
1936
|
var fn = void 0;
|
|
1937
|
+
console.log(options, 'sss');
|
|
1924
1938
|
switch (options.type) {
|
|
1925
1939
|
case 'post':
|
|
1926
|
-
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1940
|
+
fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
|
|
1927
1941
|
break;
|
|
1928
1942
|
case 'POST':
|
|
1929
|
-
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1943
|
+
fn = axios.post(options.url, options.params, options.headers, options.format, options.isData, options.isParams);
|
|
1930
1944
|
break;
|
|
1931
1945
|
case 'get':
|
|
1932
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1946
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1933
1947
|
break;
|
|
1934
1948
|
case 'GET':
|
|
1935
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1949
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1936
1950
|
break;
|
|
1937
1951
|
default:
|
|
1938
|
-
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1952
|
+
fn = axios.get(options.url, options.params, options.headers = {}, options.format = false, options.isData = true, options.isParams = true);
|
|
1939
1953
|
}
|
|
1940
1954
|
return fn;
|
|
1941
1955
|
};
|