@bit-sun/business-component 2.3.28 → 2.4.0
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/dist/index.esm.js +592 -456
- package/dist/index.js +592 -456
- package/dist/utils/CustomLoginInfo.d.ts +10 -0
- package/dist/utils/requestUtils.d.ts +28 -0
- package/dist/utils/utils.d.ts +0 -6
- package/package.json +1 -1
- package/src/components/Business/AddSelectBusiness/index.tsx +3 -2
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +9 -7
- package/src/components/Business/BsSulaQueryTable/index.tsx +11 -8
- package/src/components/Business/BsSulaQueryTable/setting.tsx +7 -5
- package/src/components/Business/JsonQueryTable/components/Formula.tsx +3 -2
- package/src/components/Business/JsonQueryTable/index.tsx +8 -6
- package/src/components/Business/SearchSelect/utils.ts +2 -1
- package/src/components/Business/columnSettingTable/columnSetting.tsx +5 -4
- package/src/components/Business/columnSettingTable/index.tsx +3 -2
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +3 -2
- package/src/components/Functional/AddSelect/helps.ts +2 -1
- package/src/components/Functional/AddSelect/index.tsx +3 -2
- package/src/components/Functional/BillEntry/index.tsx +3 -2
- package/src/components/Functional/DataImport/index.tsx +2 -1
- package/src/components/Functional/DataValidation/index.tsx +2 -1
- package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +2 -1
- package/src/components/Functional/SearchSelect/index.tsx +10 -9
- package/src/components/Functional/TreeSearchSelect/index.tsx +2 -1
- package/src/components/Solution/RuleComponent/ruleFiled.js +2 -1
- package/src/plugin/TableColumnSetting/index.tsx +4 -3
- package/src/utils/CustomLoginInfo.ts +39 -0
- package/src/utils/requestUtils.ts +139 -7
- package/src/utils/utils.ts +0 -21
package/dist/index.esm.js
CHANGED
|
@@ -25,474 +25,363 @@ import { parse as parse$1 } from '@babel/parser';
|
|
|
25
25
|
import { visit } from 'ast-types';
|
|
26
26
|
import isArray$1 from 'lodash/isArray';
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
|
|
42
|
-
// 存储表头
|
|
43
|
-
var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
|
|
44
|
-
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
45
|
-
var configArray = JSON.parse(config);
|
|
46
|
-
var currentSetting = configArray.filter(function (item) {
|
|
47
|
-
return item.code === tableCode;
|
|
48
|
-
});
|
|
49
|
-
if (currentSetting.length) {
|
|
50
|
-
currentSetting[0].detail = JSON.stringify(configvalue);
|
|
51
|
-
} else {
|
|
52
|
-
configArray.push({
|
|
53
|
-
"code": tableCode,
|
|
54
|
-
"detail": JSON.stringify(configvalue)
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
|
|
58
|
-
};
|
|
59
|
-
// 取表头
|
|
60
|
-
var getConfigTableColumns = function getConfigTableColumns(tableCode) {
|
|
61
|
-
if (!tableCode) return [];
|
|
62
|
-
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
63
|
-
var configArray = JSON.parse(config);
|
|
64
|
-
var configSetting = configArray.filter(function (item) {
|
|
65
|
-
return item.code === tableCode;
|
|
66
|
-
});
|
|
67
|
-
if (configSetting.length) {
|
|
68
|
-
return JSON.parse(configSetting[0].detail || '[]');
|
|
69
|
-
}
|
|
70
|
-
return [];
|
|
71
|
-
};
|
|
72
|
-
var getCurrentTenantId = function getCurrentTenantId() {
|
|
73
|
-
return localStorage.getItem('current_tenant_id') || 1;
|
|
74
|
-
};
|
|
75
|
-
function getEmployeeId() {
|
|
76
|
-
var _resposne$employeeRes;
|
|
77
|
-
return (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
|
|
78
|
-
}
|
|
79
|
-
function getEmployeeCode() {
|
|
80
|
-
var _resposne$employeeRes2;
|
|
81
|
-
return resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes2 = resposne.employeeResVo) === null || _resposne$employeeRes2 === void 0 ? void 0 : _resposne$employeeRes2.employeeNumber;
|
|
82
|
-
}
|
|
83
|
-
function getSessionId() {
|
|
84
|
-
return (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
|
|
85
|
-
}
|
|
86
|
-
function getAccountId() {
|
|
87
|
-
var _resposne$accountPers;
|
|
88
|
-
return (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
|
|
89
|
-
}
|
|
90
|
-
function getUserId() {
|
|
91
|
-
var _resposne$accountPers2;
|
|
92
|
-
return (_resposne$accountPers2 = resposne.accountPersonDetail) === null || _resposne$accountPers2 === void 0 ? void 0 : _resposne$accountPers2.username;
|
|
93
|
-
}
|
|
94
|
-
function getAccountID() {
|
|
95
|
-
var _resposne$accountPers3;
|
|
96
|
-
return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers3 = resposne.accountPersonDetail) === null || _resposne$accountPers3 === void 0 ? void 0 : _resposne$accountPers3.id;
|
|
97
|
-
}
|
|
98
|
-
function getUserName() {
|
|
99
|
-
var _resposne$accountPers4;
|
|
100
|
-
return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers4 = resposne.accountPersonDetail) === null || _resposne$accountPers4 === void 0 ? void 0 : _resposne$accountPers4.employeeName;
|
|
101
|
-
}
|
|
102
|
-
function handleUserPhone() {
|
|
103
|
-
var _resposne$person;
|
|
104
|
-
var str = (resposne === null || resposne === void 0 ? void 0 : (_resposne$person = resposne.person) === null || _resposne$person === void 0 ? void 0 : _resposne$person.phone) || '';
|
|
105
|
-
var enStr = str && str.slice(0, 3) + '****' + str.slice(str.length - 4);
|
|
106
|
-
return enStr;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function handleRequestAuthHeader(config) {
|
|
110
|
-
var _config$url, _config$url2;
|
|
111
|
-
// https://www.kdocs.cn/l/coNbPpjamr5v这个表格里面涉及的接口,接口请求头里需要添加参数:x-biz-code 值就是列表里的code
|
|
112
|
-
// 例:x-biz-code=STORE_CODE
|
|
113
|
-
// 物理仓选择组件
|
|
114
|
-
if ((config === null || config === void 0 ? void 0 : (_config$url = config.url) === null || _config$url === void 0 ? void 0 : _config$url.indexOf('/stock/physicalWarehouse?')) > -1) {
|
|
115
|
-
config.headers['x-biz-code'] = 'PW_STOCK_CODE';
|
|
116
|
-
}
|
|
117
|
-
// 逻辑仓选择组件
|
|
118
|
-
if ((config === null || config === void 0 ? void 0 : (_config$url2 = config.url) === null || _config$url2 === void 0 ? void 0 : _config$url2.indexOf('/stock/realWarehouse?')) > -1) {
|
|
119
|
-
config.headers['x-biz-code'] = 'RW_STOCK_CODE';
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
// 处理请求头
|
|
123
|
-
var handleRequestHeader = function handleRequestHeader(config) {
|
|
124
|
-
config.headers['sso-sessionid'] = getSessionId();
|
|
125
|
-
config.headers['x-account-id'] = getAccountId();
|
|
126
|
-
config.headers['x-employee-id'] = getEmployeeId();
|
|
127
|
-
config.headers['x-tenant-id'] = getCurrentTenantId();
|
|
128
|
-
if (localStorage.getItem('x-user-auth-context')) {
|
|
129
|
-
config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
|
|
130
|
-
}
|
|
131
|
-
handleRequestAuthHeader(config);
|
|
132
|
-
};
|
|
133
|
-
// 拦截器
|
|
134
|
-
axios.interceptors.request.use(function (config) {
|
|
135
|
-
handleRequestHeader(config);
|
|
136
|
-
return config;
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
function _iterableToArrayLimit(arr, i) {
|
|
140
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
141
|
-
if (null != _i) {
|
|
142
|
-
var _s,
|
|
143
|
-
_e,
|
|
144
|
-
_x,
|
|
145
|
-
_r,
|
|
146
|
-
_arr = [],
|
|
147
|
-
_n = !0,
|
|
148
|
-
_d = !1;
|
|
28
|
+
function _iterableToArrayLimit(r, l) {
|
|
29
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
30
|
+
if (null != t) {
|
|
31
|
+
var e,
|
|
32
|
+
n,
|
|
33
|
+
i,
|
|
34
|
+
u,
|
|
35
|
+
a = [],
|
|
36
|
+
f = !0,
|
|
37
|
+
o = !1;
|
|
149
38
|
try {
|
|
150
|
-
if (
|
|
151
|
-
if (Object(
|
|
152
|
-
|
|
153
|
-
} else for (; !(
|
|
154
|
-
} catch (
|
|
155
|
-
|
|
39
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
40
|
+
if (Object(t) !== t) return;
|
|
41
|
+
f = !1;
|
|
42
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
43
|
+
} catch (r) {
|
|
44
|
+
o = !0, n = r;
|
|
156
45
|
} finally {
|
|
157
46
|
try {
|
|
158
|
-
if (!
|
|
47
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
159
48
|
} finally {
|
|
160
|
-
if (
|
|
49
|
+
if (o) throw n;
|
|
161
50
|
}
|
|
162
51
|
}
|
|
163
|
-
return
|
|
52
|
+
return a;
|
|
164
53
|
}
|
|
165
54
|
}
|
|
166
|
-
function ownKeys(
|
|
167
|
-
var
|
|
55
|
+
function ownKeys(e, r) {
|
|
56
|
+
var t = Object.keys(e);
|
|
168
57
|
if (Object.getOwnPropertySymbols) {
|
|
169
|
-
var
|
|
170
|
-
|
|
171
|
-
return Object.getOwnPropertyDescriptor(
|
|
172
|
-
})),
|
|
58
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
59
|
+
r && (o = o.filter(function (r) {
|
|
60
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
61
|
+
})), t.push.apply(t, o);
|
|
173
62
|
}
|
|
174
|
-
return
|
|
63
|
+
return t;
|
|
175
64
|
}
|
|
176
|
-
function _objectSpread2(
|
|
177
|
-
for (var
|
|
178
|
-
var
|
|
179
|
-
|
|
180
|
-
_defineProperty(
|
|
181
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
182
|
-
Object.defineProperty(
|
|
65
|
+
function _objectSpread2(e) {
|
|
66
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
67
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
68
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
69
|
+
_defineProperty(e, r, t[r]);
|
|
70
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
71
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
183
72
|
});
|
|
184
73
|
}
|
|
185
|
-
return
|
|
74
|
+
return e;
|
|
186
75
|
}
|
|
187
76
|
function _regeneratorRuntime() {
|
|
188
77
|
_regeneratorRuntime = function () {
|
|
189
|
-
return
|
|
78
|
+
return e;
|
|
190
79
|
};
|
|
191
|
-
var
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
80
|
+
var t,
|
|
81
|
+
e = {},
|
|
82
|
+
r = Object.prototype,
|
|
83
|
+
n = r.hasOwnProperty,
|
|
84
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
85
|
+
t[e] = r.value;
|
|
196
86
|
},
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
function define(
|
|
202
|
-
return Object.defineProperty(
|
|
203
|
-
value:
|
|
87
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
88
|
+
a = i.iterator || "@@iterator",
|
|
89
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
90
|
+
u = i.toStringTag || "@@toStringTag";
|
|
91
|
+
function define(t, e, r) {
|
|
92
|
+
return Object.defineProperty(t, e, {
|
|
93
|
+
value: r,
|
|
204
94
|
enumerable: !0,
|
|
205
95
|
configurable: !0,
|
|
206
96
|
writable: !0
|
|
207
|
-
}),
|
|
97
|
+
}), t[e];
|
|
208
98
|
}
|
|
209
99
|
try {
|
|
210
100
|
define({}, "");
|
|
211
|
-
} catch (
|
|
212
|
-
define = function (
|
|
213
|
-
return
|
|
101
|
+
} catch (t) {
|
|
102
|
+
define = function (t, e, r) {
|
|
103
|
+
return t[e] = r;
|
|
214
104
|
};
|
|
215
105
|
}
|
|
216
|
-
function wrap(
|
|
217
|
-
var
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return
|
|
221
|
-
value: makeInvokeMethod(
|
|
222
|
-
}),
|
|
106
|
+
function wrap(t, e, r, n) {
|
|
107
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
108
|
+
a = Object.create(i.prototype),
|
|
109
|
+
c = new Context(n || []);
|
|
110
|
+
return o(a, "_invoke", {
|
|
111
|
+
value: makeInvokeMethod(t, r, c)
|
|
112
|
+
}), a;
|
|
223
113
|
}
|
|
224
|
-
function tryCatch(
|
|
114
|
+
function tryCatch(t, e, r) {
|
|
225
115
|
try {
|
|
226
116
|
return {
|
|
227
117
|
type: "normal",
|
|
228
|
-
arg:
|
|
118
|
+
arg: t.call(e, r)
|
|
229
119
|
};
|
|
230
|
-
} catch (
|
|
120
|
+
} catch (t) {
|
|
231
121
|
return {
|
|
232
122
|
type: "throw",
|
|
233
|
-
arg:
|
|
123
|
+
arg: t
|
|
234
124
|
};
|
|
235
125
|
}
|
|
236
126
|
}
|
|
237
|
-
|
|
238
|
-
var
|
|
127
|
+
e.wrap = wrap;
|
|
128
|
+
var h = "suspendedStart",
|
|
129
|
+
l = "suspendedYield",
|
|
130
|
+
f = "executing",
|
|
131
|
+
s = "completed",
|
|
132
|
+
y = {};
|
|
239
133
|
function Generator() {}
|
|
240
134
|
function GeneratorFunction() {}
|
|
241
135
|
function GeneratorFunctionPrototype() {}
|
|
242
|
-
var
|
|
243
|
-
define(
|
|
136
|
+
var p = {};
|
|
137
|
+
define(p, a, function () {
|
|
244
138
|
return this;
|
|
245
139
|
});
|
|
246
|
-
var
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
var
|
|
250
|
-
function defineIteratorMethods(
|
|
251
|
-
["next", "throw", "return"].forEach(function (
|
|
252
|
-
define(
|
|
253
|
-
return this._invoke(
|
|
140
|
+
var d = Object.getPrototypeOf,
|
|
141
|
+
v = d && d(d(values([])));
|
|
142
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
143
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
144
|
+
function defineIteratorMethods(t) {
|
|
145
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
146
|
+
define(t, e, function (t) {
|
|
147
|
+
return this._invoke(e, t);
|
|
254
148
|
});
|
|
255
149
|
});
|
|
256
150
|
}
|
|
257
|
-
function AsyncIterator(
|
|
258
|
-
function invoke(
|
|
259
|
-
var
|
|
260
|
-
if ("throw" !==
|
|
261
|
-
var
|
|
262
|
-
|
|
263
|
-
return
|
|
264
|
-
invoke("next",
|
|
265
|
-
}, function (
|
|
266
|
-
invoke("throw",
|
|
267
|
-
}) :
|
|
268
|
-
|
|
269
|
-
}, function (
|
|
270
|
-
return invoke("throw",
|
|
151
|
+
function AsyncIterator(t, e) {
|
|
152
|
+
function invoke(r, o, i, a) {
|
|
153
|
+
var c = tryCatch(t[r], t, o);
|
|
154
|
+
if ("throw" !== c.type) {
|
|
155
|
+
var u = c.arg,
|
|
156
|
+
h = u.value;
|
|
157
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
158
|
+
invoke("next", t, i, a);
|
|
159
|
+
}, function (t) {
|
|
160
|
+
invoke("throw", t, i, a);
|
|
161
|
+
}) : e.resolve(h).then(function (t) {
|
|
162
|
+
u.value = t, i(u);
|
|
163
|
+
}, function (t) {
|
|
164
|
+
return invoke("throw", t, i, a);
|
|
271
165
|
});
|
|
272
166
|
}
|
|
273
|
-
|
|
167
|
+
a(c.arg);
|
|
274
168
|
}
|
|
275
|
-
var
|
|
276
|
-
|
|
277
|
-
value: function (
|
|
169
|
+
var r;
|
|
170
|
+
o(this, "_invoke", {
|
|
171
|
+
value: function (t, n) {
|
|
278
172
|
function callInvokeWithMethodAndArg() {
|
|
279
|
-
return new
|
|
280
|
-
invoke(
|
|
173
|
+
return new e(function (e, r) {
|
|
174
|
+
invoke(t, n, e, r);
|
|
281
175
|
});
|
|
282
176
|
}
|
|
283
|
-
return
|
|
177
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
284
178
|
}
|
|
285
179
|
});
|
|
286
180
|
}
|
|
287
|
-
function makeInvokeMethod(
|
|
288
|
-
var
|
|
289
|
-
return function (
|
|
290
|
-
if (
|
|
291
|
-
if (
|
|
292
|
-
if ("throw" ===
|
|
293
|
-
return
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
181
|
+
function makeInvokeMethod(e, r, n) {
|
|
182
|
+
var o = h;
|
|
183
|
+
return function (i, a) {
|
|
184
|
+
if (o === f) throw new Error("Generator is already running");
|
|
185
|
+
if (o === s) {
|
|
186
|
+
if ("throw" === i) throw a;
|
|
187
|
+
return {
|
|
188
|
+
value: t,
|
|
189
|
+
done: !0
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
for (n.method = i, n.arg = a;;) {
|
|
193
|
+
var c = n.delegate;
|
|
194
|
+
if (c) {
|
|
195
|
+
var u = maybeInvokeDelegate(c, n);
|
|
196
|
+
if (u) {
|
|
197
|
+
if (u === y) continue;
|
|
198
|
+
return u;
|
|
302
199
|
}
|
|
303
200
|
}
|
|
304
|
-
if ("next" ===
|
|
305
|
-
if (
|
|
306
|
-
|
|
307
|
-
} else "return" ===
|
|
308
|
-
|
|
309
|
-
var
|
|
310
|
-
if ("normal" ===
|
|
311
|
-
if (
|
|
201
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
202
|
+
if (o === h) throw o = s, n.arg;
|
|
203
|
+
n.dispatchException(n.arg);
|
|
204
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
205
|
+
o = f;
|
|
206
|
+
var p = tryCatch(e, r, n);
|
|
207
|
+
if ("normal" === p.type) {
|
|
208
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
312
209
|
return {
|
|
313
|
-
value:
|
|
314
|
-
done:
|
|
210
|
+
value: p.arg,
|
|
211
|
+
done: n.done
|
|
315
212
|
};
|
|
316
213
|
}
|
|
317
|
-
"throw" ===
|
|
214
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
318
215
|
}
|
|
319
216
|
};
|
|
320
217
|
}
|
|
321
|
-
function maybeInvokeDelegate(
|
|
322
|
-
var
|
|
323
|
-
|
|
324
|
-
if (
|
|
325
|
-
var
|
|
326
|
-
if ("throw" ===
|
|
327
|
-
var
|
|
328
|
-
return
|
|
329
|
-
}
|
|
330
|
-
function pushTryEntry(
|
|
331
|
-
var
|
|
332
|
-
tryLoc:
|
|
218
|
+
function maybeInvokeDelegate(e, r) {
|
|
219
|
+
var n = r.method,
|
|
220
|
+
o = e.iterator[n];
|
|
221
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
222
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
223
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
224
|
+
var a = i.arg;
|
|
225
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
226
|
+
}
|
|
227
|
+
function pushTryEntry(t) {
|
|
228
|
+
var e = {
|
|
229
|
+
tryLoc: t[0]
|
|
333
230
|
};
|
|
334
|
-
1 in
|
|
231
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
335
232
|
}
|
|
336
|
-
function resetTryEntry(
|
|
337
|
-
var
|
|
338
|
-
|
|
233
|
+
function resetTryEntry(t) {
|
|
234
|
+
var e = t.completion || {};
|
|
235
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
339
236
|
}
|
|
340
|
-
function Context(
|
|
237
|
+
function Context(t) {
|
|
341
238
|
this.tryEntries = [{
|
|
342
239
|
tryLoc: "root"
|
|
343
|
-
}],
|
|
344
|
-
}
|
|
345
|
-
function values(
|
|
346
|
-
if (
|
|
347
|
-
var
|
|
348
|
-
if (
|
|
349
|
-
if ("function" == typeof
|
|
350
|
-
if (!isNaN(
|
|
351
|
-
var
|
|
352
|
-
|
|
353
|
-
for (; ++
|
|
354
|
-
return next.value =
|
|
240
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
241
|
+
}
|
|
242
|
+
function values(e) {
|
|
243
|
+
if (e || "" === e) {
|
|
244
|
+
var r = e[a];
|
|
245
|
+
if (r) return r.call(e);
|
|
246
|
+
if ("function" == typeof e.next) return e;
|
|
247
|
+
if (!isNaN(e.length)) {
|
|
248
|
+
var o = -1,
|
|
249
|
+
i = function next() {
|
|
250
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
251
|
+
return next.value = t, next.done = !0, next;
|
|
355
252
|
};
|
|
356
|
-
return
|
|
253
|
+
return i.next = i;
|
|
357
254
|
}
|
|
358
255
|
}
|
|
359
|
-
|
|
360
|
-
next: doneResult
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
function doneResult() {
|
|
364
|
-
return {
|
|
365
|
-
value: undefined,
|
|
366
|
-
done: !0
|
|
367
|
-
};
|
|
256
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
368
257
|
}
|
|
369
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
258
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
370
259
|
value: GeneratorFunctionPrototype,
|
|
371
260
|
configurable: !0
|
|
372
|
-
}),
|
|
261
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
373
262
|
value: GeneratorFunction,
|
|
374
263
|
configurable: !0
|
|
375
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
376
|
-
var
|
|
377
|
-
return !!
|
|
378
|
-
},
|
|
379
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
380
|
-
},
|
|
264
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
265
|
+
var e = "function" == typeof t && t.constructor;
|
|
266
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
267
|
+
}, e.mark = function (t) {
|
|
268
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
269
|
+
}, e.awrap = function (t) {
|
|
381
270
|
return {
|
|
382
|
-
__await:
|
|
271
|
+
__await: t
|
|
383
272
|
};
|
|
384
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
273
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
385
274
|
return this;
|
|
386
|
-
}),
|
|
387
|
-
void 0 ===
|
|
388
|
-
var
|
|
389
|
-
return
|
|
390
|
-
return
|
|
275
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
276
|
+
void 0 === i && (i = Promise);
|
|
277
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
278
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
279
|
+
return t.done ? t.value : a.next();
|
|
391
280
|
});
|
|
392
|
-
}, defineIteratorMethods(
|
|
281
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
393
282
|
return this;
|
|
394
|
-
}), define(
|
|
283
|
+
}), define(g, "toString", function () {
|
|
395
284
|
return "[object Generator]";
|
|
396
|
-
}),
|
|
397
|
-
var
|
|
398
|
-
|
|
399
|
-
for (var
|
|
400
|
-
return
|
|
401
|
-
for (;
|
|
402
|
-
var
|
|
403
|
-
if (
|
|
285
|
+
}), e.keys = function (t) {
|
|
286
|
+
var e = Object(t),
|
|
287
|
+
r = [];
|
|
288
|
+
for (var n in e) r.push(n);
|
|
289
|
+
return r.reverse(), function next() {
|
|
290
|
+
for (; r.length;) {
|
|
291
|
+
var t = r.pop();
|
|
292
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
404
293
|
}
|
|
405
294
|
return next.done = !0, next;
|
|
406
295
|
};
|
|
407
|
-
},
|
|
296
|
+
}, e.values = values, Context.prototype = {
|
|
408
297
|
constructor: Context,
|
|
409
|
-
reset: function (
|
|
410
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
298
|
+
reset: function (e) {
|
|
299
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
411
300
|
},
|
|
412
301
|
stop: function () {
|
|
413
302
|
this.done = !0;
|
|
414
|
-
var
|
|
415
|
-
if ("throw" ===
|
|
303
|
+
var t = this.tryEntries[0].completion;
|
|
304
|
+
if ("throw" === t.type) throw t.arg;
|
|
416
305
|
return this.rval;
|
|
417
306
|
},
|
|
418
|
-
dispatchException: function (
|
|
419
|
-
if (this.done) throw
|
|
420
|
-
var
|
|
421
|
-
function handle(
|
|
422
|
-
return
|
|
423
|
-
}
|
|
424
|
-
for (var
|
|
425
|
-
var
|
|
426
|
-
|
|
427
|
-
if ("root" ===
|
|
428
|
-
if (
|
|
429
|
-
var
|
|
430
|
-
|
|
431
|
-
if (
|
|
432
|
-
if (this.prev <
|
|
433
|
-
if (this.prev <
|
|
434
|
-
} else if (
|
|
435
|
-
if (this.prev <
|
|
307
|
+
dispatchException: function (e) {
|
|
308
|
+
if (this.done) throw e;
|
|
309
|
+
var r = this;
|
|
310
|
+
function handle(n, o) {
|
|
311
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
312
|
+
}
|
|
313
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
314
|
+
var i = this.tryEntries[o],
|
|
315
|
+
a = i.completion;
|
|
316
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
317
|
+
if (i.tryLoc <= this.prev) {
|
|
318
|
+
var c = n.call(i, "catchLoc"),
|
|
319
|
+
u = n.call(i, "finallyLoc");
|
|
320
|
+
if (c && u) {
|
|
321
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
322
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
323
|
+
} else if (c) {
|
|
324
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
436
325
|
} else {
|
|
437
|
-
if (!
|
|
438
|
-
if (this.prev <
|
|
326
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
327
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
439
328
|
}
|
|
440
329
|
}
|
|
441
330
|
}
|
|
442
331
|
},
|
|
443
|
-
abrupt: function (
|
|
444
|
-
for (var
|
|
445
|
-
var
|
|
446
|
-
if (
|
|
447
|
-
var
|
|
332
|
+
abrupt: function (t, e) {
|
|
333
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
334
|
+
var o = this.tryEntries[r];
|
|
335
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
336
|
+
var i = o;
|
|
448
337
|
break;
|
|
449
338
|
}
|
|
450
339
|
}
|
|
451
|
-
|
|
452
|
-
var
|
|
453
|
-
return
|
|
340
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
341
|
+
var a = i ? i.completion : {};
|
|
342
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
454
343
|
},
|
|
455
|
-
complete: function (
|
|
456
|
-
if ("throw" ===
|
|
457
|
-
return "break" ===
|
|
344
|
+
complete: function (t, e) {
|
|
345
|
+
if ("throw" === t.type) throw t.arg;
|
|
346
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
458
347
|
},
|
|
459
|
-
finish: function (
|
|
460
|
-
for (var
|
|
461
|
-
var
|
|
462
|
-
if (
|
|
348
|
+
finish: function (t) {
|
|
349
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
350
|
+
var r = this.tryEntries[e];
|
|
351
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
463
352
|
}
|
|
464
353
|
},
|
|
465
|
-
catch: function (
|
|
466
|
-
for (var
|
|
467
|
-
var
|
|
468
|
-
if (
|
|
469
|
-
var
|
|
470
|
-
if ("throw" ===
|
|
471
|
-
var
|
|
472
|
-
resetTryEntry(
|
|
354
|
+
catch: function (t) {
|
|
355
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
356
|
+
var r = this.tryEntries[e];
|
|
357
|
+
if (r.tryLoc === t) {
|
|
358
|
+
var n = r.completion;
|
|
359
|
+
if ("throw" === n.type) {
|
|
360
|
+
var o = n.arg;
|
|
361
|
+
resetTryEntry(r);
|
|
473
362
|
}
|
|
474
|
-
return
|
|
363
|
+
return o;
|
|
475
364
|
}
|
|
476
365
|
}
|
|
477
366
|
throw new Error("illegal catch attempt");
|
|
478
367
|
},
|
|
479
|
-
delegateYield: function (
|
|
368
|
+
delegateYield: function (e, r, n) {
|
|
480
369
|
return this.delegate = {
|
|
481
|
-
iterator: values(
|
|
482
|
-
resultName:
|
|
483
|
-
nextLoc:
|
|
484
|
-
}, "next" === this.method && (this.arg =
|
|
370
|
+
iterator: values(e),
|
|
371
|
+
resultName: r,
|
|
372
|
+
nextLoc: n
|
|
373
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
485
374
|
}
|
|
486
|
-
},
|
|
375
|
+
}, e;
|
|
487
376
|
}
|
|
488
|
-
function _typeof(
|
|
377
|
+
function _typeof(o) {
|
|
489
378
|
"@babel/helpers - typeof";
|
|
490
379
|
|
|
491
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
492
|
-
return typeof
|
|
493
|
-
} : function (
|
|
494
|
-
return
|
|
495
|
-
}, _typeof(
|
|
380
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
381
|
+
return typeof o;
|
|
382
|
+
} : function (o) {
|
|
383
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
384
|
+
}, _typeof(o);
|
|
496
385
|
}
|
|
497
386
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
498
387
|
try {
|
|
@@ -724,6 +613,266 @@ function _toPropertyKey(arg) {
|
|
|
724
613
|
return typeof key === "symbol" ? key : String(key);
|
|
725
614
|
}
|
|
726
615
|
|
|
616
|
+
var ENUM = {
|
|
617
|
+
// 浏览器缓存信息
|
|
618
|
+
BROWSER_CACHE: {
|
|
619
|
+
COLUMN_CONDITION: 'columnCondition',
|
|
620
|
+
MAIN_AUTH_CODES: 'menuAuth_mainProject',
|
|
621
|
+
LIMIT_MENU_DATA: 'limitedMenuData',
|
|
622
|
+
USER_INFO: 'userInfo',
|
|
623
|
+
DICT_CODES: 'dicData',
|
|
624
|
+
CHILD_APP_BACK: 'child_app_back',
|
|
625
|
+
SEARCH_FIELDS_CONDITION: 'searchFieldsCondition' //表格搜索项信息缓存
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
|
|
630
|
+
// 存储表头
|
|
631
|
+
var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
|
|
632
|
+
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
633
|
+
var configArray = JSON.parse(config);
|
|
634
|
+
var currentSetting = configArray.filter(function (item) {
|
|
635
|
+
return item.code === tableCode;
|
|
636
|
+
});
|
|
637
|
+
if (currentSetting.length) {
|
|
638
|
+
currentSetting[0].detail = JSON.stringify(configvalue);
|
|
639
|
+
} else {
|
|
640
|
+
configArray.push({
|
|
641
|
+
"code": tableCode,
|
|
642
|
+
"detail": JSON.stringify(configvalue)
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
|
|
646
|
+
};
|
|
647
|
+
// 取表头
|
|
648
|
+
var getConfigTableColumns = function getConfigTableColumns(tableCode) {
|
|
649
|
+
if (!tableCode) return [];
|
|
650
|
+
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
651
|
+
var configArray = JSON.parse(config);
|
|
652
|
+
var configSetting = configArray.filter(function (item) {
|
|
653
|
+
return item.code === tableCode;
|
|
654
|
+
});
|
|
655
|
+
if (configSetting.length) {
|
|
656
|
+
return JSON.parse(configSetting[0].detail || '[]');
|
|
657
|
+
}
|
|
658
|
+
return [];
|
|
659
|
+
};
|
|
660
|
+
var getCurrentTenantId = function getCurrentTenantId() {
|
|
661
|
+
return localStorage.getItem('current_tenant_id') || 1;
|
|
662
|
+
};
|
|
663
|
+
function getEmployeeId() {
|
|
664
|
+
var _resposne$employeeRes;
|
|
665
|
+
return (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
|
|
666
|
+
}
|
|
667
|
+
function getEmployeeCode() {
|
|
668
|
+
var _resposne$employeeRes2;
|
|
669
|
+
return resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes2 = resposne.employeeResVo) === null || _resposne$employeeRes2 === void 0 ? void 0 : _resposne$employeeRes2.employeeNumber;
|
|
670
|
+
}
|
|
671
|
+
function getSessionId() {
|
|
672
|
+
return (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
|
|
673
|
+
}
|
|
674
|
+
function getAccountId() {
|
|
675
|
+
var _resposne$accountPers;
|
|
676
|
+
return (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
|
|
677
|
+
}
|
|
678
|
+
function getUserId() {
|
|
679
|
+
var _resposne$accountPers2;
|
|
680
|
+
return (_resposne$accountPers2 = resposne.accountPersonDetail) === null || _resposne$accountPers2 === void 0 ? void 0 : _resposne$accountPers2.username;
|
|
681
|
+
}
|
|
682
|
+
function getAccountID() {
|
|
683
|
+
var _resposne$accountPers3;
|
|
684
|
+
return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers3 = resposne.accountPersonDetail) === null || _resposne$accountPers3 === void 0 ? void 0 : _resposne$accountPers3.id;
|
|
685
|
+
}
|
|
686
|
+
function getUserName() {
|
|
687
|
+
var _resposne$accountPers4;
|
|
688
|
+
return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers4 = resposne.accountPersonDetail) === null || _resposne$accountPers4 === void 0 ? void 0 : _resposne$accountPers4.employeeName;
|
|
689
|
+
}
|
|
690
|
+
function handleUserPhone() {
|
|
691
|
+
var _resposne$person;
|
|
692
|
+
var str = (resposne === null || resposne === void 0 ? void 0 : (_resposne$person = resposne.person) === null || _resposne$person === void 0 ? void 0 : _resposne$person.phone) || '';
|
|
693
|
+
var enStr = str && str.slice(0, 3) + '****' + str.slice(str.length - 4);
|
|
694
|
+
return enStr;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
var resposne$1 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
|
|
698
|
+
//--------赢家项目登录信息---------
|
|
699
|
+
function getEekaSessionId() {
|
|
700
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.sessionId) || '';
|
|
701
|
+
}
|
|
702
|
+
function getEekaAccountId() {
|
|
703
|
+
var _resposne$personDetai;
|
|
704
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$personDetai = resposne$1.personDetailResDto) === null || _resposne$personDetai === void 0 ? void 0 : _resposne$personDetai.accountId) || -1;
|
|
705
|
+
}
|
|
706
|
+
function getEekaEmployeeId() {
|
|
707
|
+
var _resposne$personDetai2;
|
|
708
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$personDetai2 = resposne$1.personDetailResDto) === null || _resposne$personDetai2 === void 0 ? void 0 : _resposne$personDetai2.employeeId) || 2;
|
|
709
|
+
}
|
|
710
|
+
function getEekaTenantId() {
|
|
711
|
+
var _resposne$personDetai3;
|
|
712
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$personDetai3 = resposne$1.personDetailResDto) === null || _resposne$personDetai3 === void 0 ? void 0 : _resposne$personDetai3.tenantId) || 1;
|
|
713
|
+
}
|
|
714
|
+
function getEekaToken() {
|
|
715
|
+
return resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.token;
|
|
716
|
+
}
|
|
717
|
+
//--------赢家项目登录信息---------
|
|
718
|
+
//--------国药项目登录信息---------
|
|
719
|
+
function getGuoyaoshukeSessionId() {
|
|
720
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.sessionId) || '';
|
|
721
|
+
}
|
|
722
|
+
function getGuoyaoshukeAccountId() {
|
|
723
|
+
var _resposne$accountPers;
|
|
724
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$accountPers = resposne$1.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
|
|
725
|
+
}
|
|
726
|
+
function getGuoyaoshukeEmployeeId() {
|
|
727
|
+
var _resposne$employeeRes;
|
|
728
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : (_resposne$employeeRes = resposne$1.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
|
|
729
|
+
}
|
|
730
|
+
function getGuoyaoshukeToken() {
|
|
731
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.token) || '';
|
|
732
|
+
}
|
|
733
|
+
//--------国药项目登录信息---------
|
|
734
|
+
|
|
735
|
+
function handleRequestAuthHeader(config) {
|
|
736
|
+
var _config$url, _config$url2;
|
|
737
|
+
// https://www.kdocs.cn/l/coNbPpjamr5v这个表格里面涉及的接口,接口请求头里需要添加参数:x-biz-code 值就是列表里的code
|
|
738
|
+
// 例:x-biz-code=STORE_CODE
|
|
739
|
+
// 物理仓选择组件
|
|
740
|
+
if ((config === null || config === void 0 ? void 0 : (_config$url = config.url) === null || _config$url === void 0 ? void 0 : _config$url.indexOf('/stock/physicalWarehouse?')) > -1) {
|
|
741
|
+
config.headers['x-biz-code'] = 'PW_STOCK_CODE';
|
|
742
|
+
}
|
|
743
|
+
// 逻辑仓选择组件
|
|
744
|
+
if ((config === null || config === void 0 ? void 0 : (_config$url2 = config.url) === null || _config$url2 === void 0 ? void 0 : _config$url2.indexOf('/stock/realWarehouse?')) > -1) {
|
|
745
|
+
config.headers['x-biz-code'] = 'RW_STOCK_CODE';
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
/*
|
|
749
|
+
* 获取当前组件服务项目
|
|
750
|
+
* */
|
|
751
|
+
var getCurrentUseProject = function getCurrentUseProject() {
|
|
752
|
+
var project = 'BitSun';
|
|
753
|
+
var hostname = window.location.hostname;
|
|
754
|
+
if ((hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('omni')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('eeka')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('koradior')) > -1) {
|
|
755
|
+
project = 'YingJia';
|
|
756
|
+
}
|
|
757
|
+
if ((hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('guoyaoshuke')) > -1 || (hostname === null || hostname === void 0 ? void 0 : hostname.indexOf('10.31.249.136')) > -1) {
|
|
758
|
+
project = 'GuoYao';
|
|
759
|
+
}
|
|
760
|
+
return project;
|
|
761
|
+
};
|
|
762
|
+
/*
|
|
763
|
+
* 处理一般请求头
|
|
764
|
+
* @param {*} config 请求参数配置
|
|
765
|
+
* */
|
|
766
|
+
var handleCommonHeader = function handleCommonHeader() {
|
|
767
|
+
var commonHeaders = {};
|
|
768
|
+
var defaultHeaders = {
|
|
769
|
+
'sso-sessionid': getSessionId(),
|
|
770
|
+
'x-account-id': getAccountId(),
|
|
771
|
+
'x-employee-id': getEmployeeId(),
|
|
772
|
+
'x-tenant-id': getCurrentTenantId()
|
|
773
|
+
};
|
|
774
|
+
var type = getCurrentUseProject();
|
|
775
|
+
switch (type) {
|
|
776
|
+
case 'YingJia':
|
|
777
|
+
commonHeaders = {
|
|
778
|
+
'x-sso-sessionid': getEekaSessionId(),
|
|
779
|
+
'x-account-id': getEekaAccountId(),
|
|
780
|
+
'x-employee-id': getEekaEmployeeId(),
|
|
781
|
+
'x-tenant-id': getEekaTenantId(),
|
|
782
|
+
'x-user-token': getEekaToken()
|
|
783
|
+
};
|
|
784
|
+
break;
|
|
785
|
+
case 'GuoYao':
|
|
786
|
+
commonHeaders = {
|
|
787
|
+
'sso-sessionid': getGuoyaoshukeSessionId(),
|
|
788
|
+
'gksk-account-id': getGuoyaoshukeAccountId(),
|
|
789
|
+
'gksk-employee-id': getGuoyaoshukeEmployeeId(),
|
|
790
|
+
'gksk-tenant-id': getCurrentTenantId(),
|
|
791
|
+
'gksk-user-token': getGuoyaoshukeToken()
|
|
792
|
+
};
|
|
793
|
+
break;
|
|
794
|
+
default:
|
|
795
|
+
commonHeaders = defaultHeaders;
|
|
796
|
+
break;
|
|
797
|
+
}
|
|
798
|
+
return commonHeaders;
|
|
799
|
+
};
|
|
800
|
+
/*
|
|
801
|
+
* 处理请求头方法-包含一般请求头、权限请求头。组件默认统一处理一遍,若组件使用处需要可以单独在组件处传参进来处理
|
|
802
|
+
* @param {*} config 请求参数配置
|
|
803
|
+
* */
|
|
804
|
+
var handleRequestHeader = function handleRequestHeader(config) {
|
|
805
|
+
var commonHeaders = handleCommonHeader();
|
|
806
|
+
if (localStorage.getItem('x-user-auth-context')) {
|
|
807
|
+
// @ts-ignore
|
|
808
|
+
defaultHeaders['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
|
|
809
|
+
}
|
|
810
|
+
!!!config.headers['x-biz-code'] && handleRequestAuthHeader(config);
|
|
811
|
+
config.headers = _objectSpread2(_objectSpread2({}, commonHeaders), config.headers);
|
|
812
|
+
};
|
|
813
|
+
// 拦截器
|
|
814
|
+
axios.interceptors.request.use(function (config) {
|
|
815
|
+
handleRequestHeader(config);
|
|
816
|
+
return config;
|
|
817
|
+
});
|
|
818
|
+
/**
|
|
819
|
+
* 处理请求路径前缀/请求路径等使用不一的问题
|
|
820
|
+
* @param {*} defaultUrl 默认请求路径
|
|
821
|
+
* @param {*} defaultPreFix 默认请求路径的前缀
|
|
822
|
+
* @param {*} config 更改请求前缀/路径集合
|
|
823
|
+
* 示例:
|
|
824
|
+
* appRequestConfig: {
|
|
825
|
+
* '/appConfig/saveUserOrder': ['/api/user-manage'],
|
|
826
|
+
* '/appConfig/saveQueryCriteria': ['/api/user-manage']
|
|
827
|
+
* }
|
|
828
|
+
*/
|
|
829
|
+
var handleRequestUrl = function handleRequestUrl(defaultPreFix, defaultUrl, config) {
|
|
830
|
+
var _Object$keys;
|
|
831
|
+
var rUrl = "".concat(defaultPreFix).concat(defaultUrl);
|
|
832
|
+
if (config && ((_Object$keys = Object.keys(config || {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
|
|
833
|
+
var value = config[defaultUrl] || [];
|
|
834
|
+
var newPreFix = value[0] || defaultPreFix;
|
|
835
|
+
var newUrl = value[1] || defaultUrl;
|
|
836
|
+
rUrl = "".concat(newPreFix).concat(newUrl);
|
|
837
|
+
}
|
|
838
|
+
return rUrl;
|
|
839
|
+
};
|
|
840
|
+
/**
|
|
841
|
+
* 处理错误请求
|
|
842
|
+
* @param {*} response 返回结果
|
|
843
|
+
* @param {*} needBackError 是否需要将错误回传到页面单独处理
|
|
844
|
+
*/
|
|
845
|
+
function handleError(response, needBackError) {
|
|
846
|
+
if (judgeIsRequestError(response)) {
|
|
847
|
+
if (response && !needBackError) {
|
|
848
|
+
// @ts-ignore
|
|
849
|
+
response.msg && message.error(response.msg);
|
|
850
|
+
}
|
|
851
|
+
return false;
|
|
852
|
+
}
|
|
853
|
+
return true;
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* 判断为请求错误
|
|
857
|
+
* @param {*} res 响应体
|
|
858
|
+
* */
|
|
859
|
+
var judgeIsRequestError = function judgeIsRequestError(res) {
|
|
860
|
+
if (!res || (res === null || res === void 0 ? void 0 : res.status) && res.status !== '0' || (res === null || res === void 0 ? void 0 : res.code) && (res.code !== '000000' || res.code !== '0')) {
|
|
861
|
+
return true;
|
|
862
|
+
}
|
|
863
|
+
return false;
|
|
864
|
+
};
|
|
865
|
+
/**
|
|
866
|
+
* 判断为请求成功
|
|
867
|
+
* @param {*} res 响应体
|
|
868
|
+
* */
|
|
869
|
+
var judgeIsRequestSuccess = function judgeIsRequestSuccess(res) {
|
|
870
|
+
if ((res === null || res === void 0 ? void 0 : res.status) === '0' || (res === null || res === void 0 ? void 0 : res.code) === '000000' || (res === null || res === void 0 ? void 0 : res.code) === '0') {
|
|
871
|
+
return true;
|
|
872
|
+
}
|
|
873
|
+
return false;
|
|
874
|
+
};
|
|
875
|
+
|
|
727
876
|
var checkQuantityAccuracy = function checkQuantityAccuracy(value, accuracy, errorInfo) {
|
|
728
877
|
var errorMessage = _objectSpread2({
|
|
729
878
|
showTips: true,
|
|
@@ -1264,22 +1413,6 @@ var judgeIsEmpty = function judgeIsEmpty(value) {
|
|
|
1264
1413
|
}
|
|
1265
1414
|
return false;
|
|
1266
1415
|
};
|
|
1267
|
-
/**
|
|
1268
|
-
* 处理错误请求
|
|
1269
|
-
* @param {*} response 返回结果
|
|
1270
|
-
* @param {*} needBackError 是否需要将错误回传到页面单独处理
|
|
1271
|
-
*/
|
|
1272
|
-
function handleError(response, needBackError) {
|
|
1273
|
-
// @ts-ignore
|
|
1274
|
-
if (!response || (response.code ? response.code !== '000000' : response.status !== '0')) {
|
|
1275
|
-
if (response && !needBackError) {
|
|
1276
|
-
// @ts-ignore
|
|
1277
|
-
response.msg && message.error(response.msg);
|
|
1278
|
-
}
|
|
1279
|
-
return false;
|
|
1280
|
-
}
|
|
1281
|
-
return true;
|
|
1282
|
-
}
|
|
1283
1416
|
|
|
1284
1417
|
var css_248z$1 = ".luckysheet {\n overflow: hidden;\n}\n.luckysheet .luckysheet-work-area.luckysheet-noselected-text {\n display: none;\n}\n.sheet_table_top {\n height: 50px;\n background: #f2f2f2;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 20px;\n border: 1px solid #d8d8d8;\n}\n.sheet_table_top .menu_item_text {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.sheet_table_footer {\n height: 50px;\n background: #f2f2f2;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 20px;\n border: 1px solid #d8d8d8;\n}\n.sheet_table_text {\n color: #8f8f8f;\n}\n.sheet_table_dnd_text {\n background: #f2f2f2;\n border: 1px solid #d8d8d8;\n display: inline-block;\n width: 100px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n";
|
|
1285
1418
|
styleInject(css_248z$1);
|
|
@@ -1604,7 +1737,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1604
1737
|
checkStockNum: isCheckStockNum
|
|
1605
1738
|
})).then(function (result) {
|
|
1606
1739
|
result = result.data;
|
|
1607
|
-
if (result
|
|
1740
|
+
if (judgeIsRequestError(result)) {
|
|
1608
1741
|
message$1.error(result.msg);
|
|
1609
1742
|
return;
|
|
1610
1743
|
}
|
|
@@ -2171,7 +2304,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
|
2171
2304
|
data: resultData
|
|
2172
2305
|
}).then(function (result) {
|
|
2173
2306
|
result = result.data;
|
|
2174
|
-
if (result
|
|
2307
|
+
if (judgeIsRequestError(result)) {
|
|
2175
2308
|
message$1.error(result.msg);
|
|
2176
2309
|
return;
|
|
2177
2310
|
}
|
|
@@ -2881,10 +3014,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2881
3014
|
axios.get("".concat(url, "?").concat(stringify(queryParams)), {
|
|
2882
3015
|
headers: _objectSpread2({}, extralHeaders)
|
|
2883
3016
|
}).then(function (result) {
|
|
2884
|
-
var _result, _result2;
|
|
2885
3017
|
setFetching(false);
|
|
2886
3018
|
result = result.data;
|
|
2887
|
-
if ((
|
|
3019
|
+
if (judgeIsRequestError(result)) {
|
|
2888
3020
|
message$1.error(result.msg);
|
|
2889
3021
|
return;
|
|
2890
3022
|
}
|
|
@@ -3614,7 +3746,9 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
|
|
|
3614
3746
|
onSearchSort: false
|
|
3615
3747
|
};
|
|
3616
3748
|
_this.patchUserColumnConfig = function (config) {
|
|
3617
|
-
var
|
|
3749
|
+
var _this$props = _this.props,
|
|
3750
|
+
tableCode = _this$props.tableCode,
|
|
3751
|
+
appRequestConfig = _this$props.appRequestConfig;
|
|
3618
3752
|
if (!tableCode) return;
|
|
3619
3753
|
var configvalue = config.map(function (item) {
|
|
3620
3754
|
return {
|
|
@@ -3626,15 +3760,14 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
|
|
|
3626
3760
|
};
|
|
3627
3761
|
});
|
|
3628
3762
|
axios({
|
|
3629
|
-
url: '/user/appConfig/saveUserOrder',
|
|
3763
|
+
url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
|
|
3630
3764
|
method: 'POST',
|
|
3631
3765
|
data: {
|
|
3632
3766
|
"code": tableCode,
|
|
3633
3767
|
"detail": JSON.stringify(configvalue)
|
|
3634
3768
|
}
|
|
3635
3769
|
}).then(function (res) {
|
|
3636
|
-
|
|
3637
|
-
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
|
|
3770
|
+
if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
|
|
3638
3771
|
setConfigTableColumns(configvalue, tableCode);
|
|
3639
3772
|
} else {
|
|
3640
3773
|
message$1.error('保存表头列自定义失败,请稍后尝试');
|
|
@@ -3642,10 +3775,10 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
|
|
|
3642
3775
|
});
|
|
3643
3776
|
};
|
|
3644
3777
|
_this.setInitValue = function (datasource) {
|
|
3645
|
-
var _this$
|
|
3646
|
-
_this$
|
|
3647
|
-
showColumns = _this$
|
|
3648
|
-
tableCode = _this$
|
|
3778
|
+
var _this$props2 = _this.props,
|
|
3779
|
+
_this$props2$showColu = _this$props2.showColumns,
|
|
3780
|
+
showColumns = _this$props2$showColu === void 0 ? [] : _this$props2$showColu,
|
|
3781
|
+
tableCode = _this$props2.tableCode;
|
|
3649
3782
|
// 获取当前列表定义数据
|
|
3650
3783
|
var columnConfig = getConfigTableColumns(tableCode);
|
|
3651
3784
|
var initialDataSourceData = columnConfig.length ? datasource.map(function (item) {
|
|
@@ -3901,9 +4034,9 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
|
|
|
3901
4034
|
var oldIndex = _ref.oldIndex,
|
|
3902
4035
|
newIndex = _ref.newIndex;
|
|
3903
4036
|
var sortDataSource = _this.state.sortDataSource;
|
|
3904
|
-
var _this$
|
|
3905
|
-
value = _this$
|
|
3906
|
-
setValue = _this$
|
|
4037
|
+
var _this$props3 = _this.props,
|
|
4038
|
+
value = _this$props3.value,
|
|
4039
|
+
setValue = _this$props3.setValue;
|
|
3907
4040
|
// if (sortDataSource[oldIndex]['fixed']) {
|
|
3908
4041
|
// message.warning('固定列不可移动');
|
|
3909
4042
|
// return;
|
|
@@ -4014,8 +4147,8 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
|
|
|
4014
4147
|
_createClass(TableColumnSetting, [{
|
|
4015
4148
|
key: "componentWillReceiveProps",
|
|
4016
4149
|
value: function componentWillReceiveProps(nextProps) {
|
|
4017
|
-
var _this$
|
|
4018
|
-
if (((_this$
|
|
4150
|
+
var _this$props4, _this$props5;
|
|
4151
|
+
if (((_this$props4 = this.props) === null || _this$props4 === void 0 ? void 0 : _this$props4.datasource) && JSON.stringify((_this$props5 = this.props) === null || _this$props5 === void 0 ? void 0 : _this$props5.datasource) != JSON.stringify(nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource)) {
|
|
4019
4152
|
this.setInitValue((nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource) || []);
|
|
4020
4153
|
}
|
|
4021
4154
|
}
|
|
@@ -4274,9 +4407,8 @@ var getSelectDataList = function getSelectDataList(record, item, selectKey) {
|
|
|
4274
4407
|
var loadSelectSource = function loadSelectSource(url, params) {
|
|
4275
4408
|
return new Promise(function (resolve, reject) {
|
|
4276
4409
|
axios.get("".concat(url, "?").concat(stringify(params))).then(function (result) {
|
|
4277
|
-
var _result, _result2;
|
|
4278
4410
|
result = result.data;
|
|
4279
|
-
if ((
|
|
4411
|
+
if (judgeIsRequestError(result)) {
|
|
4280
4412
|
message$1.error(result.msg);
|
|
4281
4413
|
resolve(result);
|
|
4282
4414
|
return;
|
|
@@ -4343,9 +4475,8 @@ var _excluded$3 = ["onResize", "width"];
|
|
|
4343
4475
|
var checkSpuMatchCode = function checkSpuMatchCode(data) {
|
|
4344
4476
|
return new Promise(function (resolve, reject) {
|
|
4345
4477
|
axios.post("/stock/rwFrontRecordSkcDetail/checkSpuMatchCode", data).then(function (result) {
|
|
4346
|
-
var _result, _result2;
|
|
4347
4478
|
result = result.data;
|
|
4348
|
-
if ((
|
|
4479
|
+
if (judgeIsRequestError(result)) {
|
|
4349
4480
|
message$1.error(result.msg);
|
|
4350
4481
|
reject(false);
|
|
4351
4482
|
return;
|
|
@@ -4985,10 +5116,9 @@ var AddSelect = function AddSelect(props) {
|
|
|
4985
5116
|
currentPage: currentPage
|
|
4986
5117
|
}, otherParams), fixedParam), params);
|
|
4987
5118
|
axios.get("".concat(url, "?").concat(stringify(queryParams))).then(function (result) {
|
|
4988
|
-
var _result3, _result4;
|
|
4989
5119
|
setFetching(false);
|
|
4990
5120
|
result = result.data;
|
|
4991
|
-
if ((
|
|
5121
|
+
if (judgeIsRequestError(result)) {
|
|
4992
5122
|
message$1.error(result.msg);
|
|
4993
5123
|
return;
|
|
4994
5124
|
}
|
|
@@ -5668,7 +5798,7 @@ var InputElement = function InputElement(_ref) {
|
|
|
5668
5798
|
var data = _ref2.data,
|
|
5669
5799
|
status = _ref2.status;
|
|
5670
5800
|
if (status === 200) {
|
|
5671
|
-
if (data
|
|
5801
|
+
if (judgeIsRequestSuccess(data)) {
|
|
5672
5802
|
var resultData = data.data.items.map(function (item, index) {
|
|
5673
5803
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
5674
5804
|
index: index
|
|
@@ -6359,7 +6489,7 @@ var BillEntry = function BillEntry(_ref3) {
|
|
|
6359
6489
|
checkStockNum: isCheckStockNum
|
|
6360
6490
|
})).then(function (result) {
|
|
6361
6491
|
result = result.data;
|
|
6362
|
-
if (result
|
|
6492
|
+
if (judgeIsRequestError(result)) {
|
|
6363
6493
|
message$1.error(result.msg);
|
|
6364
6494
|
return {
|
|
6365
6495
|
flag: false
|
|
@@ -6643,9 +6773,8 @@ var getDictionaryTextByValue = function getDictionaryTextByValue(dicCode, value)
|
|
|
6643
6773
|
var loadSelectSource$1 = function loadSelectSource(url, params) {
|
|
6644
6774
|
return new Promise(function (resolve, reject) {
|
|
6645
6775
|
axios.get("".concat(url, "?").concat(stringify(params))).then(function (result) {
|
|
6646
|
-
var _result, _result2;
|
|
6647
6776
|
result = result.data;
|
|
6648
|
-
if ((
|
|
6777
|
+
if (judgeIsRequestError(result)) {
|
|
6649
6778
|
message$1.error(result.msg);
|
|
6650
6779
|
return;
|
|
6651
6780
|
}
|
|
@@ -9228,9 +9357,8 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
9228
9357
|
useEffect(function () {
|
|
9229
9358
|
// type: 1 尺码组; 2 配码组
|
|
9230
9359
|
axios.get("/items/itemPropertyValueGroup/listNoPage?qp-type-eq=2&qp-status-eq=1").then(function (result) {
|
|
9231
|
-
var _result, _result2;
|
|
9232
9360
|
result = result.data;
|
|
9233
|
-
if ((
|
|
9361
|
+
if (judgeIsRequestError(result)) {
|
|
9234
9362
|
message$1.error(result.msg);
|
|
9235
9363
|
return;
|
|
9236
9364
|
}
|
|
@@ -9549,9 +9677,8 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
9549
9677
|
if (parProps === null || parProps === void 0 ? void 0 : parProps.isSingleColor) {
|
|
9550
9678
|
// type: 1 尺码组; 2 配码组
|
|
9551
9679
|
axios.get("/items/itemPropertyValueGroup/listNoPage?qp-type-eq=2&qp-status-eq=1").then(function (result) {
|
|
9552
|
-
var _result3, _result4;
|
|
9553
9680
|
result = result.data;
|
|
9554
|
-
if ((
|
|
9681
|
+
if (judgeIsRequestError(result)) {
|
|
9555
9682
|
message$1.error(result.msg);
|
|
9556
9683
|
return;
|
|
9557
9684
|
}
|
|
@@ -10061,7 +10188,7 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
10061
10188
|
while (1) switch (_context.prev = _context.next) {
|
|
10062
10189
|
case 0:
|
|
10063
10190
|
resData = (res === null || res === void 0 ? void 0 : res.data) || [];
|
|
10064
|
-
if (!(resData
|
|
10191
|
+
if (!judgeIsRequestSuccess(resData)) {
|
|
10065
10192
|
_context.next = 13;
|
|
10066
10193
|
break;
|
|
10067
10194
|
}
|
|
@@ -10525,7 +10652,7 @@ var ExportIcon = function ExportIcon(_ref) {
|
|
|
10525
10652
|
data: requestData
|
|
10526
10653
|
}, others)).then(function (result) {
|
|
10527
10654
|
result = result.data;
|
|
10528
|
-
if (result
|
|
10655
|
+
if (judgeIsRequestError(result)) {
|
|
10529
10656
|
var _result;
|
|
10530
10657
|
message$1.error((_result = result) === null || _result === void 0 ? void 0 : _result.msg);
|
|
10531
10658
|
return;
|
|
@@ -10572,7 +10699,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
10572
10699
|
onSearchSort: false
|
|
10573
10700
|
};
|
|
10574
10701
|
_this.patchUserColumnConfig = function (config) {
|
|
10575
|
-
var
|
|
10702
|
+
var _this$props = _this.props,
|
|
10703
|
+
tableCode = _this$props.tableCode,
|
|
10704
|
+
appRequestConfig = _this$props.appRequestConfig;
|
|
10576
10705
|
if (!tableCode) return;
|
|
10577
10706
|
var configvalue = config.map(function (item) {
|
|
10578
10707
|
return {
|
|
@@ -10584,15 +10713,14 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
10584
10713
|
};
|
|
10585
10714
|
});
|
|
10586
10715
|
axios({
|
|
10587
|
-
url: '/user/appConfig/saveUserOrder',
|
|
10716
|
+
url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
|
|
10588
10717
|
method: 'POST',
|
|
10589
10718
|
data: {
|
|
10590
10719
|
"code": tableCode,
|
|
10591
10720
|
"detail": JSON.stringify(configvalue)
|
|
10592
10721
|
}
|
|
10593
10722
|
}).then(function (res) {
|
|
10594
|
-
|
|
10595
|
-
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
|
|
10723
|
+
if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
|
|
10596
10724
|
_this.patchConfigToLocalstorage(configvalue, tableCode);
|
|
10597
10725
|
} else {
|
|
10598
10726
|
message$1.error('保存表头列自定义失败,请稍后尝试');
|
|
@@ -10873,9 +11001,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
10873
11001
|
var oldIndex = _ref.oldIndex,
|
|
10874
11002
|
newIndex = _ref.newIndex;
|
|
10875
11003
|
var sortDataSource = _this.state.sortDataSource;
|
|
10876
|
-
var _this$
|
|
10877
|
-
value = _this$
|
|
10878
|
-
setValue = _this$
|
|
11004
|
+
var _this$props2 = _this.props,
|
|
11005
|
+
value = _this$props2.value,
|
|
11006
|
+
setValue = _this$props2.setValue;
|
|
10879
11007
|
// if (sortDataSource[oldIndex]['fixed']) {
|
|
10880
11008
|
// message.warning('固定列不可移动');
|
|
10881
11009
|
// return;
|
|
@@ -10999,8 +11127,8 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
10999
11127
|
_createClass(SortableTable, [{
|
|
11000
11128
|
key: "componentWillReceiveProps",
|
|
11001
11129
|
value: function componentWillReceiveProps(nextProps) {
|
|
11002
|
-
var _this$
|
|
11003
|
-
if (((_this$
|
|
11130
|
+
var _this$props3, _this$props4;
|
|
11131
|
+
if (((_this$props3 = this.props) === null || _this$props3 === void 0 ? void 0 : _this$props3.datasource) && JSON.stringify((_this$props4 = this.props) === null || _this$props4 === void 0 ? void 0 : _this$props4.datasource) != JSON.stringify(nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource)) {
|
|
11004
11132
|
this.setInitValue((nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource) || []);
|
|
11005
11133
|
}
|
|
11006
11134
|
}
|
|
@@ -11174,7 +11302,7 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11174
11302
|
}(React.Component);
|
|
11175
11303
|
|
|
11176
11304
|
var _excluded$8 = ["onResize", "width"],
|
|
11177
|
-
_excluded2$3 = ["style", "columns", "tableCode", "summary", "dynamicColumns", "scroll"];
|
|
11305
|
+
_excluded2$3 = ["style", "columns", "tableCode", "appRequestConfig", "summary", "dynamicColumns", "scroll"];
|
|
11178
11306
|
var Text = Typography.Text;
|
|
11179
11307
|
var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
11180
11308
|
_inherits(ColumnSettingSulaTable, _React$Component);
|
|
@@ -11338,6 +11466,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11338
11466
|
style = _this$props3$style === void 0 ? null : _this$props3$style,
|
|
11339
11467
|
columns = _this$props3.columns,
|
|
11340
11468
|
tableCode = _this$props3.tableCode,
|
|
11469
|
+
appRequestConfig = _this$props3.appRequestConfig,
|
|
11341
11470
|
_this$props3$summary = _this$props3.summary,
|
|
11342
11471
|
summary = _this$props3$summary === void 0 ? undefined : _this$props3$summary,
|
|
11343
11472
|
_this$props3$dynamicC = _this$props3.dynamicColumns,
|
|
@@ -11402,7 +11531,8 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11402
11531
|
setShowColumns: this.setShowColumns,
|
|
11403
11532
|
showColumns: this.state.showColumns,
|
|
11404
11533
|
datasource: columns || [],
|
|
11405
|
-
tableCode: tableCode
|
|
11534
|
+
tableCode: tableCode,
|
|
11535
|
+
appRequestConfig: appRequestConfig
|
|
11406
11536
|
}))), /*#__PURE__*/React.createElement(Table$1, _objectSpread2({
|
|
11407
11537
|
ref: this.sulaTableRef,
|
|
11408
11538
|
style: style,
|
|
@@ -11419,7 +11549,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11419
11549
|
}(React.Component);
|
|
11420
11550
|
|
|
11421
11551
|
var _excluded$9 = ["onResize", "width"],
|
|
11422
|
-
_excluded2$4 = ["columns", "tableCode", "summary", "dynamicColumns", "scroll"];
|
|
11552
|
+
_excluded2$4 = ["columns", "tableCode", "appRequestConfig", "summary", "dynamicColumns", "scroll"];
|
|
11423
11553
|
var Text$1 = Typography.Text;
|
|
11424
11554
|
var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
11425
11555
|
_inherits(ColumnSettingTable, _React$Component);
|
|
@@ -11579,6 +11709,7 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11579
11709
|
var _this$props3 = this.props,
|
|
11580
11710
|
columns = _this$props3.columns,
|
|
11581
11711
|
tableCode = _this$props3.tableCode,
|
|
11712
|
+
appRequestConfig = _this$props3.appRequestConfig,
|
|
11582
11713
|
_this$props3$summary = _this$props3.summary,
|
|
11583
11714
|
summary = _this$props3$summary === void 0 ? undefined : _this$props3$summary,
|
|
11584
11715
|
_this$props3$dynamicC = _this$props3.dynamicColumns,
|
|
@@ -11643,7 +11774,8 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11643
11774
|
setShowColumns: this.setShowColumns,
|
|
11644
11775
|
showColumns: this.state.showColumns,
|
|
11645
11776
|
datasource: columns || [],
|
|
11646
|
-
tableCode: tableCode
|
|
11777
|
+
tableCode: tableCode,
|
|
11778
|
+
appRequestConfig: appRequestConfig
|
|
11647
11779
|
}))), /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
11648
11780
|
columns: showCol,
|
|
11649
11781
|
components: {
|
|
@@ -12143,6 +12275,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
12143
12275
|
bsTableCode: '' //设置table 列的标识
|
|
12144
12276
|
};
|
|
12145
12277
|
_this.patchUserColumnConfig = function (config) {
|
|
12278
|
+
var appRequestConfig = _this.props.appRequestConfig;
|
|
12146
12279
|
var that = _assertThisInitialized(_this);
|
|
12147
12280
|
var configvalue = config ? config.map(function (item) {
|
|
12148
12281
|
return {
|
|
@@ -12155,15 +12288,14 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
12155
12288
|
}) : '';
|
|
12156
12289
|
return new Promise(function (resolve, reject) {
|
|
12157
12290
|
axios({
|
|
12158
|
-
url: '/user/appConfig/saveUserOrder',
|
|
12291
|
+
url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
|
|
12159
12292
|
method: 'POST',
|
|
12160
12293
|
data: {
|
|
12161
12294
|
code: that.state.bsTableCode,
|
|
12162
12295
|
detail: configvalue ? JSON.stringify(configvalue) : ''
|
|
12163
12296
|
}
|
|
12164
12297
|
}).then(function (res) {
|
|
12165
|
-
|
|
12166
|
-
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
|
|
12298
|
+
if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
|
|
12167
12299
|
_this.patchConfigToLocalstorage(configvalue);
|
|
12168
12300
|
resolve({
|
|
12169
12301
|
status: '0'
|
|
@@ -12502,7 +12634,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
12502
12634
|
}))
|
|
12503
12635
|
}, function () {
|
|
12504
12636
|
_this.handleOk().then(function (res) {
|
|
12505
|
-
if (res
|
|
12637
|
+
if (judgeIsRequestSuccess(res)) {
|
|
12506
12638
|
message$1.success( /*#__PURE__*/React.createElement("span", null, "\u5B57\u6BB5\u5DF2\u9690\u85CF\uFF0C\u5982\u9700\u91CD\u65B0\u663E\u793A\u8BF7\u524D\u5F80", /*#__PURE__*/React.createElement(Typography.Link, {
|
|
12507
12639
|
underline: true,
|
|
12508
12640
|
onClick: _this.showModal
|
|
@@ -12895,6 +13027,7 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12895
13027
|
bsTableCode: '' //设置table 列的标识
|
|
12896
13028
|
};
|
|
12897
13029
|
_this.patchUserSearchFieldsConfig = function (config) {
|
|
13030
|
+
var appRequestConfig = _this.props.appRequestConfig;
|
|
12898
13031
|
var that = _assertThisInitialized(_this);
|
|
12899
13032
|
var configvalue = config ? config.map(function (item) {
|
|
12900
13033
|
return {
|
|
@@ -12903,15 +13036,14 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12903
13036
|
};
|
|
12904
13037
|
}) : '';
|
|
12905
13038
|
axios({
|
|
12906
|
-
url: '/user/appConfig/saveQueryCriteria',
|
|
13039
|
+
url: handleRequestUrl('/user', '/appConfig/saveQueryCriteria', appRequestConfig),
|
|
12907
13040
|
method: 'POST',
|
|
12908
13041
|
data: {
|
|
12909
13042
|
code: that.state.bsTableCode,
|
|
12910
13043
|
detail: configvalue ? JSON.stringify(configvalue) : ''
|
|
12911
13044
|
}
|
|
12912
13045
|
}).then(function (res) {
|
|
12913
|
-
|
|
12914
|
-
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
|
|
13046
|
+
if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
|
|
12915
13047
|
_this.patchConfigToLocalstorage(configvalue);
|
|
12916
13048
|
} else {
|
|
12917
13049
|
message$1.error('保存搜索项自定义失败,请稍后尝试');
|
|
@@ -13425,7 +13557,8 @@ var BsSulaQueryTable = (function (props) {
|
|
|
13425
13557
|
setShowSearchFields = _useState14[1]; //搜索项字段
|
|
13426
13558
|
var _props$isPage = props.isPage,
|
|
13427
13559
|
pagination = props.pagination,
|
|
13428
|
-
tableCode = props.tableCode
|
|
13560
|
+
tableCode = props.tableCode,
|
|
13561
|
+
appRequestConfig = props.appRequestConfig;
|
|
13429
13562
|
var _useState15 = useState('100vh'),
|
|
13430
13563
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
13431
13564
|
height = _useState16[0],
|
|
@@ -13700,7 +13833,8 @@ var BsSulaQueryTable = (function (props) {
|
|
|
13700
13833
|
setShowSearchFields: setShowSearchFields,
|
|
13701
13834
|
showSearchFields: showSearchFields,
|
|
13702
13835
|
datasource: (value === null || value === void 0 ? void 0 : value.fields) || [],
|
|
13703
|
-
bsTableCode: bsTableCode
|
|
13836
|
+
bsTableCode: bsTableCode,
|
|
13837
|
+
appRequestConfig: appRequestConfig
|
|
13704
13838
|
}))),
|
|
13705
13839
|
placement: "bottomRight"
|
|
13706
13840
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -13812,7 +13946,8 @@ var BsSulaQueryTable = (function (props) {
|
|
|
13812
13946
|
var memoConfig = useMemo(function () {
|
|
13813
13947
|
return _objectSpread2(_objectSpread2({}, config), {}, {
|
|
13814
13948
|
summary: props.summary,
|
|
13815
|
-
statusMapping: props.statusMapping
|
|
13949
|
+
statusMapping: props.statusMapping,
|
|
13950
|
+
appRequestConfig: props.appRequestConfig
|
|
13816
13951
|
});
|
|
13817
13952
|
}, [value, checkedList, showColumn, props.statusMapping, showSearchFields]);
|
|
13818
13953
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MemoQueryTable, _objectSpread2({}, memoConfig)), /*#__PURE__*/React.createElement(SortableTable$1, {
|
|
@@ -13821,6 +13956,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
13821
13956
|
showColumn: showColumn,
|
|
13822
13957
|
datasource: (value === null || value === void 0 ? void 0 : value.columns) || [],
|
|
13823
13958
|
bsTableCode: bsTableCode,
|
|
13959
|
+
appRequestConfig: appRequestConfig,
|
|
13824
13960
|
onlyModal: true
|
|
13825
13961
|
}));
|
|
13826
13962
|
});
|
|
@@ -13931,23 +14067,24 @@ var searchMenuData = function searchMenuData(router, name, callBack) {
|
|
|
13931
14067
|
var setMenuTreeData = function setMenuTreeData(routesData) {
|
|
13932
14068
|
var authButton = localStorage.getItem(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES) ? JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES)) : [];
|
|
13933
14069
|
var _loop = function _loop(i) {
|
|
13934
|
-
|
|
13935
|
-
|
|
13936
|
-
|
|
13937
|
-
|
|
13938
|
-
|
|
13939
|
-
|
|
13940
|
-
|
|
13941
|
-
|
|
13942
|
-
|
|
13943
|
-
|
|
13944
|
-
|
|
13945
|
-
|
|
13946
|
-
|
|
13947
|
-
|
|
14070
|
+
if (routesData[i].hideInMenu) {
|
|
14071
|
+
routesData.splice(i, 1);
|
|
14072
|
+
return 0; // continue
|
|
14073
|
+
}
|
|
14074
|
+
if (routesData[i].code && authButton.every(function (item) {
|
|
14075
|
+
return routesData[i].code != item;
|
|
14076
|
+
})) {
|
|
14077
|
+
routesData.splice(i, 1);
|
|
14078
|
+
return 0; // continue
|
|
14079
|
+
}
|
|
14080
|
+
if (routesData[i].children) {
|
|
14081
|
+
setMenuTreeData(routesData[i].children);
|
|
14082
|
+
}
|
|
14083
|
+
},
|
|
14084
|
+
_ret;
|
|
13948
14085
|
for (var i = routesData.length - 1; i >= 0; i--) {
|
|
13949
|
-
|
|
13950
|
-
if (_ret ===
|
|
14086
|
+
_ret = _loop(i);
|
|
14087
|
+
if (_ret === 0) continue;
|
|
13951
14088
|
}
|
|
13952
14089
|
};
|
|
13953
14090
|
var setLoginOutPath = function setLoginOutPath() {
|
|
@@ -24115,7 +24252,7 @@ var App = function App(_ref) {
|
|
|
24115
24252
|
converter: function converter(_ref2) {
|
|
24116
24253
|
var response = _ref2.response,
|
|
24117
24254
|
data = _ref2.data;
|
|
24118
|
-
if (response
|
|
24255
|
+
if (judgeIsRequestSuccess(response)) {
|
|
24119
24256
|
// UpdateFiedList(data.filter(item => item.valueType == 20 || item.valueType == 21 || item.valueType == 22))
|
|
24120
24257
|
var resData = data.filter(function (item) {
|
|
24121
24258
|
return item.inputType != 40 && (item.valueType == 20 || item.valueType == 21 || item.valueType == 22);
|
|
@@ -26108,10 +26245,9 @@ var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
|
|
|
26108
26245
|
Promise.all([axios.get("/basic/flow/businessFieldGroup/one?moduleType=2&layoutPoint=".concat(pageType))]).then(function (_ref2) {
|
|
26109
26246
|
var _ref3 = _slicedToArray(_ref2, 1),
|
|
26110
26247
|
res = _ref3[0];
|
|
26111
|
-
var
|
|
26112
|
-
|
|
26113
|
-
|
|
26114
|
-
if (code === '000000') {
|
|
26248
|
+
var resD = (res === null || res === void 0 ? void 0 : res.data) || {};
|
|
26249
|
+
var data = resD.data;
|
|
26250
|
+
if (judgeIsRequestError(resD)) {
|
|
26115
26251
|
if (data) {
|
|
26116
26252
|
var businessType = data.businessType,
|
|
26117
26253
|
fieldGroup = data.code,
|
|
@@ -26132,15 +26268,15 @@ var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
|
|
|
26132
26268
|
var axiosArr = detailTablesSetting.map(function (item) {
|
|
26133
26269
|
return axios.get("/basic/flow/businessFieldGroup/one?moduleType=2&layoutPoint=".concat(item.tableCode));
|
|
26134
26270
|
});
|
|
26135
|
-
Promise.all(axiosArr).then(function (
|
|
26136
|
-
var
|
|
26137
|
-
resArr =
|
|
26271
|
+
Promise.all(axiosArr).then(function (_ref4) {
|
|
26272
|
+
var _ref5 = _toArray(_ref4),
|
|
26273
|
+
resArr = _ref5.slice(0);
|
|
26138
26274
|
var configParams = {};
|
|
26139
26275
|
detailTablesSetting.map(function (item, index) {
|
|
26140
26276
|
var _resArr$index;
|
|
26141
|
-
var
|
|
26142
|
-
code =
|
|
26143
|
-
data =
|
|
26277
|
+
var _ref6 = ((_resArr$index = resArr[index]) === null || _resArr$index === void 0 ? void 0 : _resArr$index.data) || {},
|
|
26278
|
+
code = _ref6.code,
|
|
26279
|
+
data = _ref6.data;
|
|
26144
26280
|
if (data) {
|
|
26145
26281
|
var businessType = data.businessType,
|
|
26146
26282
|
fieldGroup = data.code,
|