@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.js
CHANGED
|
@@ -44,474 +44,363 @@ var serialize__default = /*#__PURE__*/_interopDefaultLegacy(serialize);
|
|
|
44
44
|
var castArray__default = /*#__PURE__*/_interopDefaultLegacy(castArray);
|
|
45
45
|
var isArray__default = /*#__PURE__*/_interopDefaultLegacy(isArray$1);
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
|
|
61
|
-
// 存储表头
|
|
62
|
-
var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
|
|
63
|
-
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
64
|
-
var configArray = JSON.parse(config);
|
|
65
|
-
var currentSetting = configArray.filter(function (item) {
|
|
66
|
-
return item.code === tableCode;
|
|
67
|
-
});
|
|
68
|
-
if (currentSetting.length) {
|
|
69
|
-
currentSetting[0].detail = JSON.stringify(configvalue);
|
|
70
|
-
} else {
|
|
71
|
-
configArray.push({
|
|
72
|
-
"code": tableCode,
|
|
73
|
-
"detail": JSON.stringify(configvalue)
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
|
|
77
|
-
};
|
|
78
|
-
// 取表头
|
|
79
|
-
var getConfigTableColumns = function getConfigTableColumns(tableCode) {
|
|
80
|
-
if (!tableCode) return [];
|
|
81
|
-
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
82
|
-
var configArray = JSON.parse(config);
|
|
83
|
-
var configSetting = configArray.filter(function (item) {
|
|
84
|
-
return item.code === tableCode;
|
|
85
|
-
});
|
|
86
|
-
if (configSetting.length) {
|
|
87
|
-
return JSON.parse(configSetting[0].detail || '[]');
|
|
88
|
-
}
|
|
89
|
-
return [];
|
|
90
|
-
};
|
|
91
|
-
var getCurrentTenantId = function getCurrentTenantId() {
|
|
92
|
-
return localStorage.getItem('current_tenant_id') || 1;
|
|
93
|
-
};
|
|
94
|
-
function getEmployeeId() {
|
|
95
|
-
var _resposne$employeeRes;
|
|
96
|
-
return (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
|
|
97
|
-
}
|
|
98
|
-
function getEmployeeCode() {
|
|
99
|
-
var _resposne$employeeRes2;
|
|
100
|
-
return resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes2 = resposne.employeeResVo) === null || _resposne$employeeRes2 === void 0 ? void 0 : _resposne$employeeRes2.employeeNumber;
|
|
101
|
-
}
|
|
102
|
-
function getSessionId() {
|
|
103
|
-
return (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
|
|
104
|
-
}
|
|
105
|
-
function getAccountId() {
|
|
106
|
-
var _resposne$accountPers;
|
|
107
|
-
return (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
|
|
108
|
-
}
|
|
109
|
-
function getUserId() {
|
|
110
|
-
var _resposne$accountPers2;
|
|
111
|
-
return (_resposne$accountPers2 = resposne.accountPersonDetail) === null || _resposne$accountPers2 === void 0 ? void 0 : _resposne$accountPers2.username;
|
|
112
|
-
}
|
|
113
|
-
function getAccountID() {
|
|
114
|
-
var _resposne$accountPers3;
|
|
115
|
-
return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers3 = resposne.accountPersonDetail) === null || _resposne$accountPers3 === void 0 ? void 0 : _resposne$accountPers3.id;
|
|
116
|
-
}
|
|
117
|
-
function getUserName() {
|
|
118
|
-
var _resposne$accountPers4;
|
|
119
|
-
return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers4 = resposne.accountPersonDetail) === null || _resposne$accountPers4 === void 0 ? void 0 : _resposne$accountPers4.employeeName;
|
|
120
|
-
}
|
|
121
|
-
function handleUserPhone() {
|
|
122
|
-
var _resposne$person;
|
|
123
|
-
var str = (resposne === null || resposne === void 0 ? void 0 : (_resposne$person = resposne.person) === null || _resposne$person === void 0 ? void 0 : _resposne$person.phone) || '';
|
|
124
|
-
var enStr = str && str.slice(0, 3) + '****' + str.slice(str.length - 4);
|
|
125
|
-
return enStr;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function handleRequestAuthHeader(config) {
|
|
129
|
-
var _config$url, _config$url2;
|
|
130
|
-
// https://www.kdocs.cn/l/coNbPpjamr5v这个表格里面涉及的接口,接口请求头里需要添加参数:x-biz-code 值就是列表里的code
|
|
131
|
-
// 例:x-biz-code=STORE_CODE
|
|
132
|
-
// 物理仓选择组件
|
|
133
|
-
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) {
|
|
134
|
-
config.headers['x-biz-code'] = 'PW_STOCK_CODE';
|
|
135
|
-
}
|
|
136
|
-
// 逻辑仓选择组件
|
|
137
|
-
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) {
|
|
138
|
-
config.headers['x-biz-code'] = 'RW_STOCK_CODE';
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
// 处理请求头
|
|
142
|
-
var handleRequestHeader = function handleRequestHeader(config) {
|
|
143
|
-
config.headers['sso-sessionid'] = getSessionId();
|
|
144
|
-
config.headers['x-account-id'] = getAccountId();
|
|
145
|
-
config.headers['x-employee-id'] = getEmployeeId();
|
|
146
|
-
config.headers['x-tenant-id'] = getCurrentTenantId();
|
|
147
|
-
if (localStorage.getItem('x-user-auth-context')) {
|
|
148
|
-
config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
|
|
149
|
-
}
|
|
150
|
-
handleRequestAuthHeader(config);
|
|
151
|
-
};
|
|
152
|
-
// 拦截器
|
|
153
|
-
axios__default['default'].interceptors.request.use(function (config) {
|
|
154
|
-
handleRequestHeader(config);
|
|
155
|
-
return config;
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
function _iterableToArrayLimit(arr, i) {
|
|
159
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
160
|
-
if (null != _i) {
|
|
161
|
-
var _s,
|
|
162
|
-
_e,
|
|
163
|
-
_x,
|
|
164
|
-
_r,
|
|
165
|
-
_arr = [],
|
|
166
|
-
_n = !0,
|
|
167
|
-
_d = !1;
|
|
47
|
+
function _iterableToArrayLimit(r, l) {
|
|
48
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
49
|
+
if (null != t) {
|
|
50
|
+
var e,
|
|
51
|
+
n,
|
|
52
|
+
i,
|
|
53
|
+
u,
|
|
54
|
+
a = [],
|
|
55
|
+
f = !0,
|
|
56
|
+
o = !1;
|
|
168
57
|
try {
|
|
169
|
-
if (
|
|
170
|
-
if (Object(
|
|
171
|
-
|
|
172
|
-
} else for (; !(
|
|
173
|
-
} catch (
|
|
174
|
-
|
|
58
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
59
|
+
if (Object(t) !== t) return;
|
|
60
|
+
f = !1;
|
|
61
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
62
|
+
} catch (r) {
|
|
63
|
+
o = !0, n = r;
|
|
175
64
|
} finally {
|
|
176
65
|
try {
|
|
177
|
-
if (!
|
|
66
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
178
67
|
} finally {
|
|
179
|
-
if (
|
|
68
|
+
if (o) throw n;
|
|
180
69
|
}
|
|
181
70
|
}
|
|
182
|
-
return
|
|
71
|
+
return a;
|
|
183
72
|
}
|
|
184
73
|
}
|
|
185
|
-
function ownKeys(
|
|
186
|
-
var
|
|
74
|
+
function ownKeys(e, r) {
|
|
75
|
+
var t = Object.keys(e);
|
|
187
76
|
if (Object.getOwnPropertySymbols) {
|
|
188
|
-
var
|
|
189
|
-
|
|
190
|
-
return Object.getOwnPropertyDescriptor(
|
|
191
|
-
})),
|
|
77
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
78
|
+
r && (o = o.filter(function (r) {
|
|
79
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
80
|
+
})), t.push.apply(t, o);
|
|
192
81
|
}
|
|
193
|
-
return
|
|
82
|
+
return t;
|
|
194
83
|
}
|
|
195
|
-
function _objectSpread2(
|
|
196
|
-
for (var
|
|
197
|
-
var
|
|
198
|
-
|
|
199
|
-
_defineProperty(
|
|
200
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
201
|
-
Object.defineProperty(
|
|
84
|
+
function _objectSpread2(e) {
|
|
85
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
86
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
87
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
88
|
+
_defineProperty(e, r, t[r]);
|
|
89
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
90
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
202
91
|
});
|
|
203
92
|
}
|
|
204
|
-
return
|
|
93
|
+
return e;
|
|
205
94
|
}
|
|
206
95
|
function _regeneratorRuntime() {
|
|
207
96
|
_regeneratorRuntime = function () {
|
|
208
|
-
return
|
|
97
|
+
return e;
|
|
209
98
|
};
|
|
210
|
-
var
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
99
|
+
var t,
|
|
100
|
+
e = {},
|
|
101
|
+
r = Object.prototype,
|
|
102
|
+
n = r.hasOwnProperty,
|
|
103
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
104
|
+
t[e] = r.value;
|
|
215
105
|
},
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
function define(
|
|
221
|
-
return Object.defineProperty(
|
|
222
|
-
value:
|
|
106
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
107
|
+
a = i.iterator || "@@iterator",
|
|
108
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
109
|
+
u = i.toStringTag || "@@toStringTag";
|
|
110
|
+
function define(t, e, r) {
|
|
111
|
+
return Object.defineProperty(t, e, {
|
|
112
|
+
value: r,
|
|
223
113
|
enumerable: !0,
|
|
224
114
|
configurable: !0,
|
|
225
115
|
writable: !0
|
|
226
|
-
}),
|
|
116
|
+
}), t[e];
|
|
227
117
|
}
|
|
228
118
|
try {
|
|
229
119
|
define({}, "");
|
|
230
|
-
} catch (
|
|
231
|
-
define = function (
|
|
232
|
-
return
|
|
120
|
+
} catch (t) {
|
|
121
|
+
define = function (t, e, r) {
|
|
122
|
+
return t[e] = r;
|
|
233
123
|
};
|
|
234
124
|
}
|
|
235
|
-
function wrap(
|
|
236
|
-
var
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return
|
|
240
|
-
value: makeInvokeMethod(
|
|
241
|
-
}),
|
|
125
|
+
function wrap(t, e, r, n) {
|
|
126
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
127
|
+
a = Object.create(i.prototype),
|
|
128
|
+
c = new Context(n || []);
|
|
129
|
+
return o(a, "_invoke", {
|
|
130
|
+
value: makeInvokeMethod(t, r, c)
|
|
131
|
+
}), a;
|
|
242
132
|
}
|
|
243
|
-
function tryCatch(
|
|
133
|
+
function tryCatch(t, e, r) {
|
|
244
134
|
try {
|
|
245
135
|
return {
|
|
246
136
|
type: "normal",
|
|
247
|
-
arg:
|
|
137
|
+
arg: t.call(e, r)
|
|
248
138
|
};
|
|
249
|
-
} catch (
|
|
139
|
+
} catch (t) {
|
|
250
140
|
return {
|
|
251
141
|
type: "throw",
|
|
252
|
-
arg:
|
|
142
|
+
arg: t
|
|
253
143
|
};
|
|
254
144
|
}
|
|
255
145
|
}
|
|
256
|
-
|
|
257
|
-
var
|
|
146
|
+
e.wrap = wrap;
|
|
147
|
+
var h = "suspendedStart",
|
|
148
|
+
l = "suspendedYield",
|
|
149
|
+
f = "executing",
|
|
150
|
+
s = "completed",
|
|
151
|
+
y = {};
|
|
258
152
|
function Generator() {}
|
|
259
153
|
function GeneratorFunction() {}
|
|
260
154
|
function GeneratorFunctionPrototype() {}
|
|
261
|
-
var
|
|
262
|
-
define(
|
|
155
|
+
var p = {};
|
|
156
|
+
define(p, a, function () {
|
|
263
157
|
return this;
|
|
264
158
|
});
|
|
265
|
-
var
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
var
|
|
269
|
-
function defineIteratorMethods(
|
|
270
|
-
["next", "throw", "return"].forEach(function (
|
|
271
|
-
define(
|
|
272
|
-
return this._invoke(
|
|
159
|
+
var d = Object.getPrototypeOf,
|
|
160
|
+
v = d && d(d(values([])));
|
|
161
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
162
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
163
|
+
function defineIteratorMethods(t) {
|
|
164
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
165
|
+
define(t, e, function (t) {
|
|
166
|
+
return this._invoke(e, t);
|
|
273
167
|
});
|
|
274
168
|
});
|
|
275
169
|
}
|
|
276
|
-
function AsyncIterator(
|
|
277
|
-
function invoke(
|
|
278
|
-
var
|
|
279
|
-
if ("throw" !==
|
|
280
|
-
var
|
|
281
|
-
|
|
282
|
-
return
|
|
283
|
-
invoke("next",
|
|
284
|
-
}, function (
|
|
285
|
-
invoke("throw",
|
|
286
|
-
}) :
|
|
287
|
-
|
|
288
|
-
}, function (
|
|
289
|
-
return invoke("throw",
|
|
170
|
+
function AsyncIterator(t, e) {
|
|
171
|
+
function invoke(r, o, i, a) {
|
|
172
|
+
var c = tryCatch(t[r], t, o);
|
|
173
|
+
if ("throw" !== c.type) {
|
|
174
|
+
var u = c.arg,
|
|
175
|
+
h = u.value;
|
|
176
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
177
|
+
invoke("next", t, i, a);
|
|
178
|
+
}, function (t) {
|
|
179
|
+
invoke("throw", t, i, a);
|
|
180
|
+
}) : e.resolve(h).then(function (t) {
|
|
181
|
+
u.value = t, i(u);
|
|
182
|
+
}, function (t) {
|
|
183
|
+
return invoke("throw", t, i, a);
|
|
290
184
|
});
|
|
291
185
|
}
|
|
292
|
-
|
|
186
|
+
a(c.arg);
|
|
293
187
|
}
|
|
294
|
-
var
|
|
295
|
-
|
|
296
|
-
value: function (
|
|
188
|
+
var r;
|
|
189
|
+
o(this, "_invoke", {
|
|
190
|
+
value: function (t, n) {
|
|
297
191
|
function callInvokeWithMethodAndArg() {
|
|
298
|
-
return new
|
|
299
|
-
invoke(
|
|
192
|
+
return new e(function (e, r) {
|
|
193
|
+
invoke(t, n, e, r);
|
|
300
194
|
});
|
|
301
195
|
}
|
|
302
|
-
return
|
|
196
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
303
197
|
}
|
|
304
198
|
});
|
|
305
199
|
}
|
|
306
|
-
function makeInvokeMethod(
|
|
307
|
-
var
|
|
308
|
-
return function (
|
|
309
|
-
if (
|
|
310
|
-
if (
|
|
311
|
-
if ("throw" ===
|
|
312
|
-
return
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
200
|
+
function makeInvokeMethod(e, r, n) {
|
|
201
|
+
var o = h;
|
|
202
|
+
return function (i, a) {
|
|
203
|
+
if (o === f) throw new Error("Generator is already running");
|
|
204
|
+
if (o === s) {
|
|
205
|
+
if ("throw" === i) throw a;
|
|
206
|
+
return {
|
|
207
|
+
value: t,
|
|
208
|
+
done: !0
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
for (n.method = i, n.arg = a;;) {
|
|
212
|
+
var c = n.delegate;
|
|
213
|
+
if (c) {
|
|
214
|
+
var u = maybeInvokeDelegate(c, n);
|
|
215
|
+
if (u) {
|
|
216
|
+
if (u === y) continue;
|
|
217
|
+
return u;
|
|
321
218
|
}
|
|
322
219
|
}
|
|
323
|
-
if ("next" ===
|
|
324
|
-
if (
|
|
325
|
-
|
|
326
|
-
} else "return" ===
|
|
327
|
-
|
|
328
|
-
var
|
|
329
|
-
if ("normal" ===
|
|
330
|
-
if (
|
|
220
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
221
|
+
if (o === h) throw o = s, n.arg;
|
|
222
|
+
n.dispatchException(n.arg);
|
|
223
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
224
|
+
o = f;
|
|
225
|
+
var p = tryCatch(e, r, n);
|
|
226
|
+
if ("normal" === p.type) {
|
|
227
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
331
228
|
return {
|
|
332
|
-
value:
|
|
333
|
-
done:
|
|
229
|
+
value: p.arg,
|
|
230
|
+
done: n.done
|
|
334
231
|
};
|
|
335
232
|
}
|
|
336
|
-
"throw" ===
|
|
233
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
337
234
|
}
|
|
338
235
|
};
|
|
339
236
|
}
|
|
340
|
-
function maybeInvokeDelegate(
|
|
341
|
-
var
|
|
342
|
-
|
|
343
|
-
if (
|
|
344
|
-
var
|
|
345
|
-
if ("throw" ===
|
|
346
|
-
var
|
|
347
|
-
return
|
|
348
|
-
}
|
|
349
|
-
function pushTryEntry(
|
|
350
|
-
var
|
|
351
|
-
tryLoc:
|
|
237
|
+
function maybeInvokeDelegate(e, r) {
|
|
238
|
+
var n = r.method,
|
|
239
|
+
o = e.iterator[n];
|
|
240
|
+
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;
|
|
241
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
242
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
243
|
+
var a = i.arg;
|
|
244
|
+
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);
|
|
245
|
+
}
|
|
246
|
+
function pushTryEntry(t) {
|
|
247
|
+
var e = {
|
|
248
|
+
tryLoc: t[0]
|
|
352
249
|
};
|
|
353
|
-
1 in
|
|
250
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
354
251
|
}
|
|
355
|
-
function resetTryEntry(
|
|
356
|
-
var
|
|
357
|
-
|
|
252
|
+
function resetTryEntry(t) {
|
|
253
|
+
var e = t.completion || {};
|
|
254
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
358
255
|
}
|
|
359
|
-
function Context(
|
|
256
|
+
function Context(t) {
|
|
360
257
|
this.tryEntries = [{
|
|
361
258
|
tryLoc: "root"
|
|
362
|
-
}],
|
|
363
|
-
}
|
|
364
|
-
function values(
|
|
365
|
-
if (
|
|
366
|
-
var
|
|
367
|
-
if (
|
|
368
|
-
if ("function" == typeof
|
|
369
|
-
if (!isNaN(
|
|
370
|
-
var
|
|
371
|
-
|
|
372
|
-
for (; ++
|
|
373
|
-
return next.value =
|
|
259
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
260
|
+
}
|
|
261
|
+
function values(e) {
|
|
262
|
+
if (e || "" === e) {
|
|
263
|
+
var r = e[a];
|
|
264
|
+
if (r) return r.call(e);
|
|
265
|
+
if ("function" == typeof e.next) return e;
|
|
266
|
+
if (!isNaN(e.length)) {
|
|
267
|
+
var o = -1,
|
|
268
|
+
i = function next() {
|
|
269
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
270
|
+
return next.value = t, next.done = !0, next;
|
|
374
271
|
};
|
|
375
|
-
return
|
|
272
|
+
return i.next = i;
|
|
376
273
|
}
|
|
377
274
|
}
|
|
378
|
-
|
|
379
|
-
next: doneResult
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
function doneResult() {
|
|
383
|
-
return {
|
|
384
|
-
value: undefined,
|
|
385
|
-
done: !0
|
|
386
|
-
};
|
|
275
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
387
276
|
}
|
|
388
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
277
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
389
278
|
value: GeneratorFunctionPrototype,
|
|
390
279
|
configurable: !0
|
|
391
|
-
}),
|
|
280
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
392
281
|
value: GeneratorFunction,
|
|
393
282
|
configurable: !0
|
|
394
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
395
|
-
var
|
|
396
|
-
return !!
|
|
397
|
-
},
|
|
398
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
399
|
-
},
|
|
283
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
284
|
+
var e = "function" == typeof t && t.constructor;
|
|
285
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
286
|
+
}, e.mark = function (t) {
|
|
287
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
288
|
+
}, e.awrap = function (t) {
|
|
400
289
|
return {
|
|
401
|
-
__await:
|
|
290
|
+
__await: t
|
|
402
291
|
};
|
|
403
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
292
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
404
293
|
return this;
|
|
405
|
-
}),
|
|
406
|
-
void 0 ===
|
|
407
|
-
var
|
|
408
|
-
return
|
|
409
|
-
return
|
|
294
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
295
|
+
void 0 === i && (i = Promise);
|
|
296
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
297
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
298
|
+
return t.done ? t.value : a.next();
|
|
410
299
|
});
|
|
411
|
-
}, defineIteratorMethods(
|
|
300
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
412
301
|
return this;
|
|
413
|
-
}), define(
|
|
302
|
+
}), define(g, "toString", function () {
|
|
414
303
|
return "[object Generator]";
|
|
415
|
-
}),
|
|
416
|
-
var
|
|
417
|
-
|
|
418
|
-
for (var
|
|
419
|
-
return
|
|
420
|
-
for (;
|
|
421
|
-
var
|
|
422
|
-
if (
|
|
304
|
+
}), e.keys = function (t) {
|
|
305
|
+
var e = Object(t),
|
|
306
|
+
r = [];
|
|
307
|
+
for (var n in e) r.push(n);
|
|
308
|
+
return r.reverse(), function next() {
|
|
309
|
+
for (; r.length;) {
|
|
310
|
+
var t = r.pop();
|
|
311
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
423
312
|
}
|
|
424
313
|
return next.done = !0, next;
|
|
425
314
|
};
|
|
426
|
-
},
|
|
315
|
+
}, e.values = values, Context.prototype = {
|
|
427
316
|
constructor: Context,
|
|
428
|
-
reset: function (
|
|
429
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
317
|
+
reset: function (e) {
|
|
318
|
+
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);
|
|
430
319
|
},
|
|
431
320
|
stop: function () {
|
|
432
321
|
this.done = !0;
|
|
433
|
-
var
|
|
434
|
-
if ("throw" ===
|
|
322
|
+
var t = this.tryEntries[0].completion;
|
|
323
|
+
if ("throw" === t.type) throw t.arg;
|
|
435
324
|
return this.rval;
|
|
436
325
|
},
|
|
437
|
-
dispatchException: function (
|
|
438
|
-
if (this.done) throw
|
|
439
|
-
var
|
|
440
|
-
function handle(
|
|
441
|
-
return
|
|
442
|
-
}
|
|
443
|
-
for (var
|
|
444
|
-
var
|
|
445
|
-
|
|
446
|
-
if ("root" ===
|
|
447
|
-
if (
|
|
448
|
-
var
|
|
449
|
-
|
|
450
|
-
if (
|
|
451
|
-
if (this.prev <
|
|
452
|
-
if (this.prev <
|
|
453
|
-
} else if (
|
|
454
|
-
if (this.prev <
|
|
326
|
+
dispatchException: function (e) {
|
|
327
|
+
if (this.done) throw e;
|
|
328
|
+
var r = this;
|
|
329
|
+
function handle(n, o) {
|
|
330
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
331
|
+
}
|
|
332
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
333
|
+
var i = this.tryEntries[o],
|
|
334
|
+
a = i.completion;
|
|
335
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
336
|
+
if (i.tryLoc <= this.prev) {
|
|
337
|
+
var c = n.call(i, "catchLoc"),
|
|
338
|
+
u = n.call(i, "finallyLoc");
|
|
339
|
+
if (c && u) {
|
|
340
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
341
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
342
|
+
} else if (c) {
|
|
343
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
455
344
|
} else {
|
|
456
|
-
if (!
|
|
457
|
-
if (this.prev <
|
|
345
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
346
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
458
347
|
}
|
|
459
348
|
}
|
|
460
349
|
}
|
|
461
350
|
},
|
|
462
|
-
abrupt: function (
|
|
463
|
-
for (var
|
|
464
|
-
var
|
|
465
|
-
if (
|
|
466
|
-
var
|
|
351
|
+
abrupt: function (t, e) {
|
|
352
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
353
|
+
var o = this.tryEntries[r];
|
|
354
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
355
|
+
var i = o;
|
|
467
356
|
break;
|
|
468
357
|
}
|
|
469
358
|
}
|
|
470
|
-
|
|
471
|
-
var
|
|
472
|
-
return
|
|
359
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
360
|
+
var a = i ? i.completion : {};
|
|
361
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
473
362
|
},
|
|
474
|
-
complete: function (
|
|
475
|
-
if ("throw" ===
|
|
476
|
-
return "break" ===
|
|
363
|
+
complete: function (t, e) {
|
|
364
|
+
if ("throw" === t.type) throw t.arg;
|
|
365
|
+
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;
|
|
477
366
|
},
|
|
478
|
-
finish: function (
|
|
479
|
-
for (var
|
|
480
|
-
var
|
|
481
|
-
if (
|
|
367
|
+
finish: function (t) {
|
|
368
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
369
|
+
var r = this.tryEntries[e];
|
|
370
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
482
371
|
}
|
|
483
372
|
},
|
|
484
|
-
catch: function (
|
|
485
|
-
for (var
|
|
486
|
-
var
|
|
487
|
-
if (
|
|
488
|
-
var
|
|
489
|
-
if ("throw" ===
|
|
490
|
-
var
|
|
491
|
-
resetTryEntry(
|
|
373
|
+
catch: function (t) {
|
|
374
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
375
|
+
var r = this.tryEntries[e];
|
|
376
|
+
if (r.tryLoc === t) {
|
|
377
|
+
var n = r.completion;
|
|
378
|
+
if ("throw" === n.type) {
|
|
379
|
+
var o = n.arg;
|
|
380
|
+
resetTryEntry(r);
|
|
492
381
|
}
|
|
493
|
-
return
|
|
382
|
+
return o;
|
|
494
383
|
}
|
|
495
384
|
}
|
|
496
385
|
throw new Error("illegal catch attempt");
|
|
497
386
|
},
|
|
498
|
-
delegateYield: function (
|
|
387
|
+
delegateYield: function (e, r, n) {
|
|
499
388
|
return this.delegate = {
|
|
500
|
-
iterator: values(
|
|
501
|
-
resultName:
|
|
502
|
-
nextLoc:
|
|
503
|
-
}, "next" === this.method && (this.arg =
|
|
389
|
+
iterator: values(e),
|
|
390
|
+
resultName: r,
|
|
391
|
+
nextLoc: n
|
|
392
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
504
393
|
}
|
|
505
|
-
},
|
|
394
|
+
}, e;
|
|
506
395
|
}
|
|
507
|
-
function _typeof(
|
|
396
|
+
function _typeof(o) {
|
|
508
397
|
"@babel/helpers - typeof";
|
|
509
398
|
|
|
510
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
511
|
-
return typeof
|
|
512
|
-
} : function (
|
|
513
|
-
return
|
|
514
|
-
}, _typeof(
|
|
399
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
400
|
+
return typeof o;
|
|
401
|
+
} : function (o) {
|
|
402
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
403
|
+
}, _typeof(o);
|
|
515
404
|
}
|
|
516
405
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
517
406
|
try {
|
|
@@ -743,6 +632,266 @@ function _toPropertyKey(arg) {
|
|
|
743
632
|
return typeof key === "symbol" ? key : String(key);
|
|
744
633
|
}
|
|
745
634
|
|
|
635
|
+
var ENUM = {
|
|
636
|
+
// 浏览器缓存信息
|
|
637
|
+
BROWSER_CACHE: {
|
|
638
|
+
COLUMN_CONDITION: 'columnCondition',
|
|
639
|
+
MAIN_AUTH_CODES: 'menuAuth_mainProject',
|
|
640
|
+
LIMIT_MENU_DATA: 'limitedMenuData',
|
|
641
|
+
USER_INFO: 'userInfo',
|
|
642
|
+
DICT_CODES: 'dicData',
|
|
643
|
+
CHILD_APP_BACK: 'child_app_back',
|
|
644
|
+
SEARCH_FIELDS_CONDITION: 'searchFieldsCondition' //表格搜索项信息缓存
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
var resposne = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
|
|
649
|
+
// 存储表头
|
|
650
|
+
var setConfigTableColumns = function setConfigTableColumns(configvalue, tableCode) {
|
|
651
|
+
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
652
|
+
var configArray = JSON.parse(config);
|
|
653
|
+
var currentSetting = configArray.filter(function (item) {
|
|
654
|
+
return item.code === tableCode;
|
|
655
|
+
});
|
|
656
|
+
if (currentSetting.length) {
|
|
657
|
+
currentSetting[0].detail = JSON.stringify(configvalue);
|
|
658
|
+
} else {
|
|
659
|
+
configArray.push({
|
|
660
|
+
"code": tableCode,
|
|
661
|
+
"detail": JSON.stringify(configvalue)
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
localStorage.setItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION, JSON.stringify(configArray));
|
|
665
|
+
};
|
|
666
|
+
// 取表头
|
|
667
|
+
var getConfigTableColumns = function getConfigTableColumns(tableCode) {
|
|
668
|
+
if (!tableCode) return [];
|
|
669
|
+
var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
|
|
670
|
+
var configArray = JSON.parse(config);
|
|
671
|
+
var configSetting = configArray.filter(function (item) {
|
|
672
|
+
return item.code === tableCode;
|
|
673
|
+
});
|
|
674
|
+
if (configSetting.length) {
|
|
675
|
+
return JSON.parse(configSetting[0].detail || '[]');
|
|
676
|
+
}
|
|
677
|
+
return [];
|
|
678
|
+
};
|
|
679
|
+
var getCurrentTenantId = function getCurrentTenantId() {
|
|
680
|
+
return localStorage.getItem('current_tenant_id') || 1;
|
|
681
|
+
};
|
|
682
|
+
function getEmployeeId() {
|
|
683
|
+
var _resposne$employeeRes;
|
|
684
|
+
return (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
|
|
685
|
+
}
|
|
686
|
+
function getEmployeeCode() {
|
|
687
|
+
var _resposne$employeeRes2;
|
|
688
|
+
return resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes2 = resposne.employeeResVo) === null || _resposne$employeeRes2 === void 0 ? void 0 : _resposne$employeeRes2.employeeNumber;
|
|
689
|
+
}
|
|
690
|
+
function getSessionId() {
|
|
691
|
+
return (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
|
|
692
|
+
}
|
|
693
|
+
function getAccountId() {
|
|
694
|
+
var _resposne$accountPers;
|
|
695
|
+
return (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
|
|
696
|
+
}
|
|
697
|
+
function getUserId() {
|
|
698
|
+
var _resposne$accountPers2;
|
|
699
|
+
return (_resposne$accountPers2 = resposne.accountPersonDetail) === null || _resposne$accountPers2 === void 0 ? void 0 : _resposne$accountPers2.username;
|
|
700
|
+
}
|
|
701
|
+
function getAccountID() {
|
|
702
|
+
var _resposne$accountPers3;
|
|
703
|
+
return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers3 = resposne.accountPersonDetail) === null || _resposne$accountPers3 === void 0 ? void 0 : _resposne$accountPers3.id;
|
|
704
|
+
}
|
|
705
|
+
function getUserName() {
|
|
706
|
+
var _resposne$accountPers4;
|
|
707
|
+
return resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers4 = resposne.accountPersonDetail) === null || _resposne$accountPers4 === void 0 ? void 0 : _resposne$accountPers4.employeeName;
|
|
708
|
+
}
|
|
709
|
+
function handleUserPhone() {
|
|
710
|
+
var _resposne$person;
|
|
711
|
+
var str = (resposne === null || resposne === void 0 ? void 0 : (_resposne$person = resposne.person) === null || _resposne$person === void 0 ? void 0 : _resposne$person.phone) || '';
|
|
712
|
+
var enStr = str && str.slice(0, 3) + '****' + str.slice(str.length - 4);
|
|
713
|
+
return enStr;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
var resposne$1 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
|
|
717
|
+
//--------赢家项目登录信息---------
|
|
718
|
+
function getEekaSessionId() {
|
|
719
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.sessionId) || '';
|
|
720
|
+
}
|
|
721
|
+
function getEekaAccountId() {
|
|
722
|
+
var _resposne$personDetai;
|
|
723
|
+
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;
|
|
724
|
+
}
|
|
725
|
+
function getEekaEmployeeId() {
|
|
726
|
+
var _resposne$personDetai2;
|
|
727
|
+
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;
|
|
728
|
+
}
|
|
729
|
+
function getEekaTenantId() {
|
|
730
|
+
var _resposne$personDetai3;
|
|
731
|
+
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;
|
|
732
|
+
}
|
|
733
|
+
function getEekaToken() {
|
|
734
|
+
return resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.token;
|
|
735
|
+
}
|
|
736
|
+
//--------赢家项目登录信息---------
|
|
737
|
+
//--------国药项目登录信息---------
|
|
738
|
+
function getGuoyaoshukeSessionId() {
|
|
739
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.sessionId) || '';
|
|
740
|
+
}
|
|
741
|
+
function getGuoyaoshukeAccountId() {
|
|
742
|
+
var _resposne$accountPers;
|
|
743
|
+
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;
|
|
744
|
+
}
|
|
745
|
+
function getGuoyaoshukeEmployeeId() {
|
|
746
|
+
var _resposne$employeeRes;
|
|
747
|
+
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;
|
|
748
|
+
}
|
|
749
|
+
function getGuoyaoshukeToken() {
|
|
750
|
+
return (resposne$1 === null || resposne$1 === void 0 ? void 0 : resposne$1.token) || '';
|
|
751
|
+
}
|
|
752
|
+
//--------国药项目登录信息---------
|
|
753
|
+
|
|
754
|
+
function handleRequestAuthHeader(config) {
|
|
755
|
+
var _config$url, _config$url2;
|
|
756
|
+
// https://www.kdocs.cn/l/coNbPpjamr5v这个表格里面涉及的接口,接口请求头里需要添加参数:x-biz-code 值就是列表里的code
|
|
757
|
+
// 例:x-biz-code=STORE_CODE
|
|
758
|
+
// 物理仓选择组件
|
|
759
|
+
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) {
|
|
760
|
+
config.headers['x-biz-code'] = 'PW_STOCK_CODE';
|
|
761
|
+
}
|
|
762
|
+
// 逻辑仓选择组件
|
|
763
|
+
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) {
|
|
764
|
+
config.headers['x-biz-code'] = 'RW_STOCK_CODE';
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
/*
|
|
768
|
+
* 获取当前组件服务项目
|
|
769
|
+
* */
|
|
770
|
+
var getCurrentUseProject = function getCurrentUseProject() {
|
|
771
|
+
var project = 'BitSun';
|
|
772
|
+
var hostname = window.location.hostname;
|
|
773
|
+
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) {
|
|
774
|
+
project = 'YingJia';
|
|
775
|
+
}
|
|
776
|
+
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) {
|
|
777
|
+
project = 'GuoYao';
|
|
778
|
+
}
|
|
779
|
+
return project;
|
|
780
|
+
};
|
|
781
|
+
/*
|
|
782
|
+
* 处理一般请求头
|
|
783
|
+
* @param {*} config 请求参数配置
|
|
784
|
+
* */
|
|
785
|
+
var handleCommonHeader = function handleCommonHeader() {
|
|
786
|
+
var commonHeaders = {};
|
|
787
|
+
var defaultHeaders = {
|
|
788
|
+
'sso-sessionid': getSessionId(),
|
|
789
|
+
'x-account-id': getAccountId(),
|
|
790
|
+
'x-employee-id': getEmployeeId(),
|
|
791
|
+
'x-tenant-id': getCurrentTenantId()
|
|
792
|
+
};
|
|
793
|
+
var type = getCurrentUseProject();
|
|
794
|
+
switch (type) {
|
|
795
|
+
case 'YingJia':
|
|
796
|
+
commonHeaders = {
|
|
797
|
+
'x-sso-sessionid': getEekaSessionId(),
|
|
798
|
+
'x-account-id': getEekaAccountId(),
|
|
799
|
+
'x-employee-id': getEekaEmployeeId(),
|
|
800
|
+
'x-tenant-id': getEekaTenantId(),
|
|
801
|
+
'x-user-token': getEekaToken()
|
|
802
|
+
};
|
|
803
|
+
break;
|
|
804
|
+
case 'GuoYao':
|
|
805
|
+
commonHeaders = {
|
|
806
|
+
'sso-sessionid': getGuoyaoshukeSessionId(),
|
|
807
|
+
'gksk-account-id': getGuoyaoshukeAccountId(),
|
|
808
|
+
'gksk-employee-id': getGuoyaoshukeEmployeeId(),
|
|
809
|
+
'gksk-tenant-id': getCurrentTenantId(),
|
|
810
|
+
'gksk-user-token': getGuoyaoshukeToken()
|
|
811
|
+
};
|
|
812
|
+
break;
|
|
813
|
+
default:
|
|
814
|
+
commonHeaders = defaultHeaders;
|
|
815
|
+
break;
|
|
816
|
+
}
|
|
817
|
+
return commonHeaders;
|
|
818
|
+
};
|
|
819
|
+
/*
|
|
820
|
+
* 处理请求头方法-包含一般请求头、权限请求头。组件默认统一处理一遍,若组件使用处需要可以单独在组件处传参进来处理
|
|
821
|
+
* @param {*} config 请求参数配置
|
|
822
|
+
* */
|
|
823
|
+
var handleRequestHeader = function handleRequestHeader(config) {
|
|
824
|
+
var commonHeaders = handleCommonHeader();
|
|
825
|
+
if (localStorage.getItem('x-user-auth-context')) {
|
|
826
|
+
// @ts-ignore
|
|
827
|
+
defaultHeaders['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
|
|
828
|
+
}
|
|
829
|
+
!!!config.headers['x-biz-code'] && handleRequestAuthHeader(config);
|
|
830
|
+
config.headers = _objectSpread2(_objectSpread2({}, commonHeaders), config.headers);
|
|
831
|
+
};
|
|
832
|
+
// 拦截器
|
|
833
|
+
axios__default['default'].interceptors.request.use(function (config) {
|
|
834
|
+
handleRequestHeader(config);
|
|
835
|
+
return config;
|
|
836
|
+
});
|
|
837
|
+
/**
|
|
838
|
+
* 处理请求路径前缀/请求路径等使用不一的问题
|
|
839
|
+
* @param {*} defaultUrl 默认请求路径
|
|
840
|
+
* @param {*} defaultPreFix 默认请求路径的前缀
|
|
841
|
+
* @param {*} config 更改请求前缀/路径集合
|
|
842
|
+
* 示例:
|
|
843
|
+
* appRequestConfig: {
|
|
844
|
+
* '/appConfig/saveUserOrder': ['/api/user-manage'],
|
|
845
|
+
* '/appConfig/saveQueryCriteria': ['/api/user-manage']
|
|
846
|
+
* }
|
|
847
|
+
*/
|
|
848
|
+
var handleRequestUrl = function handleRequestUrl(defaultPreFix, defaultUrl, config) {
|
|
849
|
+
var _Object$keys;
|
|
850
|
+
var rUrl = "".concat(defaultPreFix).concat(defaultUrl);
|
|
851
|
+
if (config && ((_Object$keys = Object.keys(config || {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
|
|
852
|
+
var value = config[defaultUrl] || [];
|
|
853
|
+
var newPreFix = value[0] || defaultPreFix;
|
|
854
|
+
var newUrl = value[1] || defaultUrl;
|
|
855
|
+
rUrl = "".concat(newPreFix).concat(newUrl);
|
|
856
|
+
}
|
|
857
|
+
return rUrl;
|
|
858
|
+
};
|
|
859
|
+
/**
|
|
860
|
+
* 处理错误请求
|
|
861
|
+
* @param {*} response 返回结果
|
|
862
|
+
* @param {*} needBackError 是否需要将错误回传到页面单独处理
|
|
863
|
+
*/
|
|
864
|
+
function handleError(response, needBackError) {
|
|
865
|
+
if (judgeIsRequestError(response)) {
|
|
866
|
+
if (response && !needBackError) {
|
|
867
|
+
// @ts-ignore
|
|
868
|
+
response.msg && message.error(response.msg);
|
|
869
|
+
}
|
|
870
|
+
return false;
|
|
871
|
+
}
|
|
872
|
+
return true;
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* 判断为请求错误
|
|
876
|
+
* @param {*} res 响应体
|
|
877
|
+
* */
|
|
878
|
+
var judgeIsRequestError = function judgeIsRequestError(res) {
|
|
879
|
+
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')) {
|
|
880
|
+
return true;
|
|
881
|
+
}
|
|
882
|
+
return false;
|
|
883
|
+
};
|
|
884
|
+
/**
|
|
885
|
+
* 判断为请求成功
|
|
886
|
+
* @param {*} res 响应体
|
|
887
|
+
* */
|
|
888
|
+
var judgeIsRequestSuccess = function judgeIsRequestSuccess(res) {
|
|
889
|
+
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') {
|
|
890
|
+
return true;
|
|
891
|
+
}
|
|
892
|
+
return false;
|
|
893
|
+
};
|
|
894
|
+
|
|
746
895
|
var checkQuantityAccuracy = function checkQuantityAccuracy(value, accuracy, errorInfo) {
|
|
747
896
|
var errorMessage = _objectSpread2({
|
|
748
897
|
showTips: true,
|
|
@@ -1283,22 +1432,6 @@ var judgeIsEmpty = function judgeIsEmpty(value) {
|
|
|
1283
1432
|
}
|
|
1284
1433
|
return false;
|
|
1285
1434
|
};
|
|
1286
|
-
/**
|
|
1287
|
-
* 处理错误请求
|
|
1288
|
-
* @param {*} response 返回结果
|
|
1289
|
-
* @param {*} needBackError 是否需要将错误回传到页面单独处理
|
|
1290
|
-
*/
|
|
1291
|
-
function handleError(response, needBackError) {
|
|
1292
|
-
// @ts-ignore
|
|
1293
|
-
if (!response || (response.code ? response.code !== '000000' : response.status !== '0')) {
|
|
1294
|
-
if (response && !needBackError) {
|
|
1295
|
-
// @ts-ignore
|
|
1296
|
-
response.msg && message.error(response.msg);
|
|
1297
|
-
}
|
|
1298
|
-
return false;
|
|
1299
|
-
}
|
|
1300
|
-
return true;
|
|
1301
|
-
}
|
|
1302
1435
|
|
|
1303
1436
|
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";
|
|
1304
1437
|
styleInject(css_248z$1);
|
|
@@ -1623,7 +1756,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1623
1756
|
checkStockNum: isCheckStockNum
|
|
1624
1757
|
})).then(function (result) {
|
|
1625
1758
|
result = result.data;
|
|
1626
|
-
if (result
|
|
1759
|
+
if (judgeIsRequestError(result)) {
|
|
1627
1760
|
antd.message.error(result.msg);
|
|
1628
1761
|
return;
|
|
1629
1762
|
}
|
|
@@ -2190,7 +2323,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
|
2190
2323
|
data: resultData
|
|
2191
2324
|
}).then(function (result) {
|
|
2192
2325
|
result = result.data;
|
|
2193
|
-
if (result
|
|
2326
|
+
if (judgeIsRequestError(result)) {
|
|
2194
2327
|
antd.message.error(result.msg);
|
|
2195
2328
|
return;
|
|
2196
2329
|
}
|
|
@@ -2900,10 +3033,9 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2900
3033
|
axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(queryParams)), {
|
|
2901
3034
|
headers: _objectSpread2({}, extralHeaders)
|
|
2902
3035
|
}).then(function (result) {
|
|
2903
|
-
var _result, _result2;
|
|
2904
3036
|
setFetching(false);
|
|
2905
3037
|
result = result.data;
|
|
2906
|
-
if ((
|
|
3038
|
+
if (judgeIsRequestError(result)) {
|
|
2907
3039
|
antd.message.error(result.msg);
|
|
2908
3040
|
return;
|
|
2909
3041
|
}
|
|
@@ -3633,7 +3765,9 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
|
|
|
3633
3765
|
onSearchSort: false
|
|
3634
3766
|
};
|
|
3635
3767
|
_this.patchUserColumnConfig = function (config) {
|
|
3636
|
-
var
|
|
3768
|
+
var _this$props = _this.props,
|
|
3769
|
+
tableCode = _this$props.tableCode,
|
|
3770
|
+
appRequestConfig = _this$props.appRequestConfig;
|
|
3637
3771
|
if (!tableCode) return;
|
|
3638
3772
|
var configvalue = config.map(function (item) {
|
|
3639
3773
|
return {
|
|
@@ -3645,15 +3779,14 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
|
|
|
3645
3779
|
};
|
|
3646
3780
|
});
|
|
3647
3781
|
axios__default['default']({
|
|
3648
|
-
url: '/user/appConfig/saveUserOrder',
|
|
3782
|
+
url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
|
|
3649
3783
|
method: 'POST',
|
|
3650
3784
|
data: {
|
|
3651
3785
|
"code": tableCode,
|
|
3652
3786
|
"detail": JSON.stringify(configvalue)
|
|
3653
3787
|
}
|
|
3654
3788
|
}).then(function (res) {
|
|
3655
|
-
|
|
3656
|
-
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
|
|
3789
|
+
if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
|
|
3657
3790
|
setConfigTableColumns(configvalue, tableCode);
|
|
3658
3791
|
} else {
|
|
3659
3792
|
antd.message.error('保存表头列自定义失败,请稍后尝试');
|
|
@@ -3661,10 +3794,10 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
|
|
|
3661
3794
|
});
|
|
3662
3795
|
};
|
|
3663
3796
|
_this.setInitValue = function (datasource) {
|
|
3664
|
-
var _this$
|
|
3665
|
-
_this$
|
|
3666
|
-
showColumns = _this$
|
|
3667
|
-
tableCode = _this$
|
|
3797
|
+
var _this$props2 = _this.props,
|
|
3798
|
+
_this$props2$showColu = _this$props2.showColumns,
|
|
3799
|
+
showColumns = _this$props2$showColu === void 0 ? [] : _this$props2$showColu,
|
|
3800
|
+
tableCode = _this$props2.tableCode;
|
|
3668
3801
|
// 获取当前列表定义数据
|
|
3669
3802
|
var columnConfig = getConfigTableColumns(tableCode);
|
|
3670
3803
|
var initialDataSourceData = columnConfig.length ? datasource.map(function (item) {
|
|
@@ -3920,9 +4053,9 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
|
|
|
3920
4053
|
var oldIndex = _ref.oldIndex,
|
|
3921
4054
|
newIndex = _ref.newIndex;
|
|
3922
4055
|
var sortDataSource = _this.state.sortDataSource;
|
|
3923
|
-
var _this$
|
|
3924
|
-
value = _this$
|
|
3925
|
-
setValue = _this$
|
|
4056
|
+
var _this$props3 = _this.props,
|
|
4057
|
+
value = _this$props3.value,
|
|
4058
|
+
setValue = _this$props3.setValue;
|
|
3926
4059
|
// if (sortDataSource[oldIndex]['fixed']) {
|
|
3927
4060
|
// message.warning('固定列不可移动');
|
|
3928
4061
|
// return;
|
|
@@ -4033,8 +4166,8 @@ var TableColumnSetting = /*#__PURE__*/function (_React$Component) {
|
|
|
4033
4166
|
_createClass(TableColumnSetting, [{
|
|
4034
4167
|
key: "componentWillReceiveProps",
|
|
4035
4168
|
value: function componentWillReceiveProps(nextProps) {
|
|
4036
|
-
var _this$
|
|
4037
|
-
if (((_this$
|
|
4169
|
+
var _this$props4, _this$props5;
|
|
4170
|
+
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)) {
|
|
4038
4171
|
this.setInitValue((nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource) || []);
|
|
4039
4172
|
}
|
|
4040
4173
|
}
|
|
@@ -4293,9 +4426,8 @@ var getSelectDataList = function getSelectDataList(record, item, selectKey) {
|
|
|
4293
4426
|
var loadSelectSource = function loadSelectSource(url, params) {
|
|
4294
4427
|
return new Promise(function (resolve, reject) {
|
|
4295
4428
|
axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(params))).then(function (result) {
|
|
4296
|
-
var _result, _result2;
|
|
4297
4429
|
result = result.data;
|
|
4298
|
-
if ((
|
|
4430
|
+
if (judgeIsRequestError(result)) {
|
|
4299
4431
|
antd.message.error(result.msg);
|
|
4300
4432
|
resolve(result);
|
|
4301
4433
|
return;
|
|
@@ -4362,9 +4494,8 @@ var _excluded$3 = ["onResize", "width"];
|
|
|
4362
4494
|
var checkSpuMatchCode = function checkSpuMatchCode(data) {
|
|
4363
4495
|
return new Promise(function (resolve, reject) {
|
|
4364
4496
|
axios__default['default'].post("/stock/rwFrontRecordSkcDetail/checkSpuMatchCode", data).then(function (result) {
|
|
4365
|
-
var _result, _result2;
|
|
4366
4497
|
result = result.data;
|
|
4367
|
-
if ((
|
|
4498
|
+
if (judgeIsRequestError(result)) {
|
|
4368
4499
|
antd.message.error(result.msg);
|
|
4369
4500
|
reject(false);
|
|
4370
4501
|
return;
|
|
@@ -5004,10 +5135,9 @@ var AddSelect = function AddSelect(props) {
|
|
|
5004
5135
|
currentPage: currentPage
|
|
5005
5136
|
}, otherParams), fixedParam), params);
|
|
5006
5137
|
axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(queryParams))).then(function (result) {
|
|
5007
|
-
var _result3, _result4;
|
|
5008
5138
|
setFetching(false);
|
|
5009
5139
|
result = result.data;
|
|
5010
|
-
if ((
|
|
5140
|
+
if (judgeIsRequestError(result)) {
|
|
5011
5141
|
antd.message.error(result.msg);
|
|
5012
5142
|
return;
|
|
5013
5143
|
}
|
|
@@ -5687,7 +5817,7 @@ var InputElement = function InputElement(_ref) {
|
|
|
5687
5817
|
var data = _ref2.data,
|
|
5688
5818
|
status = _ref2.status;
|
|
5689
5819
|
if (status === 200) {
|
|
5690
|
-
if (data
|
|
5820
|
+
if (judgeIsRequestSuccess(data)) {
|
|
5691
5821
|
var resultData = data.data.items.map(function (item, index) {
|
|
5692
5822
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
5693
5823
|
index: index
|
|
@@ -6378,7 +6508,7 @@ var BillEntry = function BillEntry(_ref3) {
|
|
|
6378
6508
|
checkStockNum: isCheckStockNum
|
|
6379
6509
|
})).then(function (result) {
|
|
6380
6510
|
result = result.data;
|
|
6381
|
-
if (result
|
|
6511
|
+
if (judgeIsRequestError(result)) {
|
|
6382
6512
|
antd.message.error(result.msg);
|
|
6383
6513
|
return {
|
|
6384
6514
|
flag: false
|
|
@@ -6662,9 +6792,8 @@ var getDictionaryTextByValue = function getDictionaryTextByValue(dicCode, value)
|
|
|
6662
6792
|
var loadSelectSource$1 = function loadSelectSource(url, params) {
|
|
6663
6793
|
return new Promise(function (resolve, reject) {
|
|
6664
6794
|
axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(params))).then(function (result) {
|
|
6665
|
-
var _result, _result2;
|
|
6666
6795
|
result = result.data;
|
|
6667
|
-
if ((
|
|
6796
|
+
if (judgeIsRequestError(result)) {
|
|
6668
6797
|
antd.message.error(result.msg);
|
|
6669
6798
|
return;
|
|
6670
6799
|
}
|
|
@@ -9247,9 +9376,8 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
9247
9376
|
React.useEffect(function () {
|
|
9248
9377
|
// type: 1 尺码组; 2 配码组
|
|
9249
9378
|
axios__default['default'].get("/items/itemPropertyValueGroup/listNoPage?qp-type-eq=2&qp-status-eq=1").then(function (result) {
|
|
9250
|
-
var _result, _result2;
|
|
9251
9379
|
result = result.data;
|
|
9252
|
-
if ((
|
|
9380
|
+
if (judgeIsRequestError(result)) {
|
|
9253
9381
|
antd.message.error(result.msg);
|
|
9254
9382
|
return;
|
|
9255
9383
|
}
|
|
@@ -9568,9 +9696,8 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
9568
9696
|
if (parProps === null || parProps === void 0 ? void 0 : parProps.isSingleColor) {
|
|
9569
9697
|
// type: 1 尺码组; 2 配码组
|
|
9570
9698
|
axios__default['default'].get("/items/itemPropertyValueGroup/listNoPage?qp-type-eq=2&qp-status-eq=1").then(function (result) {
|
|
9571
|
-
var _result3, _result4;
|
|
9572
9699
|
result = result.data;
|
|
9573
|
-
if ((
|
|
9700
|
+
if (judgeIsRequestError(result)) {
|
|
9574
9701
|
antd.message.error(result.msg);
|
|
9575
9702
|
return;
|
|
9576
9703
|
}
|
|
@@ -10080,7 +10207,7 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
10080
10207
|
while (1) switch (_context.prev = _context.next) {
|
|
10081
10208
|
case 0:
|
|
10082
10209
|
resData = (res === null || res === void 0 ? void 0 : res.data) || [];
|
|
10083
|
-
if (!(resData
|
|
10210
|
+
if (!judgeIsRequestSuccess(resData)) {
|
|
10084
10211
|
_context.next = 13;
|
|
10085
10212
|
break;
|
|
10086
10213
|
}
|
|
@@ -10544,7 +10671,7 @@ var ExportIcon = function ExportIcon(_ref) {
|
|
|
10544
10671
|
data: requestData
|
|
10545
10672
|
}, others)).then(function (result) {
|
|
10546
10673
|
result = result.data;
|
|
10547
|
-
if (result
|
|
10674
|
+
if (judgeIsRequestError(result)) {
|
|
10548
10675
|
var _result;
|
|
10549
10676
|
antd.message.error((_result = result) === null || _result === void 0 ? void 0 : _result.msg);
|
|
10550
10677
|
return;
|
|
@@ -10591,7 +10718,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
10591
10718
|
onSearchSort: false
|
|
10592
10719
|
};
|
|
10593
10720
|
_this.patchUserColumnConfig = function (config) {
|
|
10594
|
-
var
|
|
10721
|
+
var _this$props = _this.props,
|
|
10722
|
+
tableCode = _this$props.tableCode,
|
|
10723
|
+
appRequestConfig = _this$props.appRequestConfig;
|
|
10595
10724
|
if (!tableCode) return;
|
|
10596
10725
|
var configvalue = config.map(function (item) {
|
|
10597
10726
|
return {
|
|
@@ -10603,15 +10732,14 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
10603
10732
|
};
|
|
10604
10733
|
});
|
|
10605
10734
|
axios__default['default']({
|
|
10606
|
-
url: '/user/appConfig/saveUserOrder',
|
|
10735
|
+
url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
|
|
10607
10736
|
method: 'POST',
|
|
10608
10737
|
data: {
|
|
10609
10738
|
"code": tableCode,
|
|
10610
10739
|
"detail": JSON.stringify(configvalue)
|
|
10611
10740
|
}
|
|
10612
10741
|
}).then(function (res) {
|
|
10613
|
-
|
|
10614
|
-
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
|
|
10742
|
+
if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
|
|
10615
10743
|
_this.patchConfigToLocalstorage(configvalue, tableCode);
|
|
10616
10744
|
} else {
|
|
10617
10745
|
antd.message.error('保存表头列自定义失败,请稍后尝试');
|
|
@@ -10892,9 +11020,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
10892
11020
|
var oldIndex = _ref.oldIndex,
|
|
10893
11021
|
newIndex = _ref.newIndex;
|
|
10894
11022
|
var sortDataSource = _this.state.sortDataSource;
|
|
10895
|
-
var _this$
|
|
10896
|
-
value = _this$
|
|
10897
|
-
setValue = _this$
|
|
11023
|
+
var _this$props2 = _this.props,
|
|
11024
|
+
value = _this$props2.value,
|
|
11025
|
+
setValue = _this$props2.setValue;
|
|
10898
11026
|
// if (sortDataSource[oldIndex]['fixed']) {
|
|
10899
11027
|
// message.warning('固定列不可移动');
|
|
10900
11028
|
// return;
|
|
@@ -11018,8 +11146,8 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11018
11146
|
_createClass(SortableTable, [{
|
|
11019
11147
|
key: "componentWillReceiveProps",
|
|
11020
11148
|
value: function componentWillReceiveProps(nextProps) {
|
|
11021
|
-
var _this$
|
|
11022
|
-
if (((_this$
|
|
11149
|
+
var _this$props3, _this$props4;
|
|
11150
|
+
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)) {
|
|
11023
11151
|
this.setInitValue((nextProps === null || nextProps === void 0 ? void 0 : nextProps.datasource) || []);
|
|
11024
11152
|
}
|
|
11025
11153
|
}
|
|
@@ -11193,7 +11321,7 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11193
11321
|
}(React__default['default'].Component);
|
|
11194
11322
|
|
|
11195
11323
|
var _excluded$8 = ["onResize", "width"],
|
|
11196
|
-
_excluded2$3 = ["style", "columns", "tableCode", "summary", "dynamicColumns", "scroll"];
|
|
11324
|
+
_excluded2$3 = ["style", "columns", "tableCode", "appRequestConfig", "summary", "dynamicColumns", "scroll"];
|
|
11197
11325
|
var Text = antd.Typography.Text;
|
|
11198
11326
|
var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
11199
11327
|
_inherits(ColumnSettingSulaTable, _React$Component);
|
|
@@ -11357,6 +11485,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11357
11485
|
style = _this$props3$style === void 0 ? null : _this$props3$style,
|
|
11358
11486
|
columns = _this$props3.columns,
|
|
11359
11487
|
tableCode = _this$props3.tableCode,
|
|
11488
|
+
appRequestConfig = _this$props3.appRequestConfig,
|
|
11360
11489
|
_this$props3$summary = _this$props3.summary,
|
|
11361
11490
|
summary = _this$props3$summary === void 0 ? undefined : _this$props3$summary,
|
|
11362
11491
|
_this$props3$dynamicC = _this$props3.dynamicColumns,
|
|
@@ -11421,7 +11550,8 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11421
11550
|
setShowColumns: this.setShowColumns,
|
|
11422
11551
|
showColumns: this.state.showColumns,
|
|
11423
11552
|
datasource: columns || [],
|
|
11424
|
-
tableCode: tableCode
|
|
11553
|
+
tableCode: tableCode,
|
|
11554
|
+
appRequestConfig: appRequestConfig
|
|
11425
11555
|
}))), /*#__PURE__*/React__default['default'].createElement(bssula.Table, _objectSpread2({
|
|
11426
11556
|
ref: this.sulaTableRef,
|
|
11427
11557
|
style: style,
|
|
@@ -11438,7 +11568,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11438
11568
|
}(React__default['default'].Component);
|
|
11439
11569
|
|
|
11440
11570
|
var _excluded$9 = ["onResize", "width"],
|
|
11441
|
-
_excluded2$4 = ["columns", "tableCode", "summary", "dynamicColumns", "scroll"];
|
|
11571
|
+
_excluded2$4 = ["columns", "tableCode", "appRequestConfig", "summary", "dynamicColumns", "scroll"];
|
|
11442
11572
|
var Text$1 = antd.Typography.Text;
|
|
11443
11573
|
var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
11444
11574
|
_inherits(ColumnSettingTable, _React$Component);
|
|
@@ -11598,6 +11728,7 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11598
11728
|
var _this$props3 = this.props,
|
|
11599
11729
|
columns = _this$props3.columns,
|
|
11600
11730
|
tableCode = _this$props3.tableCode,
|
|
11731
|
+
appRequestConfig = _this$props3.appRequestConfig,
|
|
11601
11732
|
_this$props3$summary = _this$props3.summary,
|
|
11602
11733
|
summary = _this$props3$summary === void 0 ? undefined : _this$props3$summary,
|
|
11603
11734
|
_this$props3$dynamicC = _this$props3.dynamicColumns,
|
|
@@ -11662,7 +11793,8 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
|
11662
11793
|
setShowColumns: this.setShowColumns,
|
|
11663
11794
|
showColumns: this.state.showColumns,
|
|
11664
11795
|
datasource: columns || [],
|
|
11665
|
-
tableCode: tableCode
|
|
11796
|
+
tableCode: tableCode,
|
|
11797
|
+
appRequestConfig: appRequestConfig
|
|
11666
11798
|
}))), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
11667
11799
|
columns: showCol,
|
|
11668
11800
|
components: {
|
|
@@ -12162,6 +12294,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
12162
12294
|
bsTableCode: '' //设置table 列的标识
|
|
12163
12295
|
};
|
|
12164
12296
|
_this.patchUserColumnConfig = function (config) {
|
|
12297
|
+
var appRequestConfig = _this.props.appRequestConfig;
|
|
12165
12298
|
var that = _assertThisInitialized(_this);
|
|
12166
12299
|
var configvalue = config ? config.map(function (item) {
|
|
12167
12300
|
return {
|
|
@@ -12174,15 +12307,14 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
12174
12307
|
}) : '';
|
|
12175
12308
|
return new Promise(function (resolve, reject) {
|
|
12176
12309
|
axios__default['default']({
|
|
12177
|
-
url: '/user/appConfig/saveUserOrder',
|
|
12310
|
+
url: handleRequestUrl('/user', '/appConfig/saveUserOrder', appRequestConfig),
|
|
12178
12311
|
method: 'POST',
|
|
12179
12312
|
data: {
|
|
12180
12313
|
code: that.state.bsTableCode,
|
|
12181
12314
|
detail: configvalue ? JSON.stringify(configvalue) : ''
|
|
12182
12315
|
}
|
|
12183
12316
|
}).then(function (res) {
|
|
12184
|
-
|
|
12185
|
-
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
|
|
12317
|
+
if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
|
|
12186
12318
|
_this.patchConfigToLocalstorage(configvalue);
|
|
12187
12319
|
resolve({
|
|
12188
12320
|
status: '0'
|
|
@@ -12521,7 +12653,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
12521
12653
|
}))
|
|
12522
12654
|
}, function () {
|
|
12523
12655
|
_this.handleOk().then(function (res) {
|
|
12524
|
-
if (res
|
|
12656
|
+
if (judgeIsRequestSuccess(res)) {
|
|
12525
12657
|
antd.message.success( /*#__PURE__*/React__default['default'].createElement("span", null, "\u5B57\u6BB5\u5DF2\u9690\u85CF\uFF0C\u5982\u9700\u91CD\u65B0\u663E\u793A\u8BF7\u524D\u5F80", /*#__PURE__*/React__default['default'].createElement(antd.Typography.Link, {
|
|
12526
12658
|
underline: true,
|
|
12527
12659
|
onClick: _this.showModal
|
|
@@ -12914,6 +13046,7 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12914
13046
|
bsTableCode: '' //设置table 列的标识
|
|
12915
13047
|
};
|
|
12916
13048
|
_this.patchUserSearchFieldsConfig = function (config) {
|
|
13049
|
+
var appRequestConfig = _this.props.appRequestConfig;
|
|
12917
13050
|
var that = _assertThisInitialized(_this);
|
|
12918
13051
|
var configvalue = config ? config.map(function (item) {
|
|
12919
13052
|
return {
|
|
@@ -12922,15 +13055,14 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
12922
13055
|
};
|
|
12923
13056
|
}) : '';
|
|
12924
13057
|
axios__default['default']({
|
|
12925
|
-
url: '/user/appConfig/saveQueryCriteria',
|
|
13058
|
+
url: handleRequestUrl('/user', '/appConfig/saveQueryCriteria', appRequestConfig),
|
|
12926
13059
|
method: 'POST',
|
|
12927
13060
|
data: {
|
|
12928
13061
|
code: that.state.bsTableCode,
|
|
12929
13062
|
detail: configvalue ? JSON.stringify(configvalue) : ''
|
|
12930
13063
|
}
|
|
12931
13064
|
}).then(function (res) {
|
|
12932
|
-
|
|
12933
|
-
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
|
|
13065
|
+
if (judgeIsRequestSuccess(res === null || res === void 0 ? void 0 : res.data)) {
|
|
12934
13066
|
_this.patchConfigToLocalstorage(configvalue);
|
|
12935
13067
|
} else {
|
|
12936
13068
|
antd.message.error('保存搜索项自定义失败,请稍后尝试');
|
|
@@ -13444,7 +13576,8 @@ var BsSulaQueryTable = (function (props) {
|
|
|
13444
13576
|
setShowSearchFields = _useState14[1]; //搜索项字段
|
|
13445
13577
|
var _props$isPage = props.isPage,
|
|
13446
13578
|
pagination = props.pagination,
|
|
13447
|
-
tableCode = props.tableCode
|
|
13579
|
+
tableCode = props.tableCode,
|
|
13580
|
+
appRequestConfig = props.appRequestConfig;
|
|
13448
13581
|
var _useState15 = React.useState('100vh'),
|
|
13449
13582
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
13450
13583
|
height = _useState16[0],
|
|
@@ -13719,7 +13852,8 @@ var BsSulaQueryTable = (function (props) {
|
|
|
13719
13852
|
setShowSearchFields: setShowSearchFields,
|
|
13720
13853
|
showSearchFields: showSearchFields,
|
|
13721
13854
|
datasource: (value === null || value === void 0 ? void 0 : value.fields) || [],
|
|
13722
|
-
bsTableCode: bsTableCode
|
|
13855
|
+
bsTableCode: bsTableCode,
|
|
13856
|
+
appRequestConfig: appRequestConfig
|
|
13723
13857
|
}))),
|
|
13724
13858
|
placement: "bottomRight"
|
|
13725
13859
|
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
@@ -13831,7 +13965,8 @@ var BsSulaQueryTable = (function (props) {
|
|
|
13831
13965
|
var memoConfig = React.useMemo(function () {
|
|
13832
13966
|
return _objectSpread2(_objectSpread2({}, config), {}, {
|
|
13833
13967
|
summary: props.summary,
|
|
13834
|
-
statusMapping: props.statusMapping
|
|
13968
|
+
statusMapping: props.statusMapping,
|
|
13969
|
+
appRequestConfig: props.appRequestConfig
|
|
13835
13970
|
});
|
|
13836
13971
|
}, [value, checkedList, showColumn, props.statusMapping, showSearchFields]);
|
|
13837
13972
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(MemoQueryTable, _objectSpread2({}, memoConfig)), /*#__PURE__*/React__default['default'].createElement(SortableTable$1, {
|
|
@@ -13840,6 +13975,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
13840
13975
|
showColumn: showColumn,
|
|
13841
13976
|
datasource: (value === null || value === void 0 ? void 0 : value.columns) || [],
|
|
13842
13977
|
bsTableCode: bsTableCode,
|
|
13978
|
+
appRequestConfig: appRequestConfig,
|
|
13843
13979
|
onlyModal: true
|
|
13844
13980
|
}));
|
|
13845
13981
|
});
|
|
@@ -13950,23 +14086,24 @@ var searchMenuData = function searchMenuData(router, name, callBack) {
|
|
|
13950
14086
|
var setMenuTreeData = function setMenuTreeData(routesData) {
|
|
13951
14087
|
var authButton = localStorage.getItem(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES) ? JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES)) : [];
|
|
13952
14088
|
var _loop = function _loop(i) {
|
|
13953
|
-
|
|
13954
|
-
|
|
13955
|
-
|
|
13956
|
-
|
|
13957
|
-
|
|
13958
|
-
|
|
13959
|
-
|
|
13960
|
-
|
|
13961
|
-
|
|
13962
|
-
|
|
13963
|
-
|
|
13964
|
-
|
|
13965
|
-
|
|
13966
|
-
|
|
14089
|
+
if (routesData[i].hideInMenu) {
|
|
14090
|
+
routesData.splice(i, 1);
|
|
14091
|
+
return 0; // continue
|
|
14092
|
+
}
|
|
14093
|
+
if (routesData[i].code && authButton.every(function (item) {
|
|
14094
|
+
return routesData[i].code != item;
|
|
14095
|
+
})) {
|
|
14096
|
+
routesData.splice(i, 1);
|
|
14097
|
+
return 0; // continue
|
|
14098
|
+
}
|
|
14099
|
+
if (routesData[i].children) {
|
|
14100
|
+
setMenuTreeData(routesData[i].children);
|
|
14101
|
+
}
|
|
14102
|
+
},
|
|
14103
|
+
_ret;
|
|
13967
14104
|
for (var i = routesData.length - 1; i >= 0; i--) {
|
|
13968
|
-
|
|
13969
|
-
if (_ret ===
|
|
14105
|
+
_ret = _loop(i);
|
|
14106
|
+
if (_ret === 0) continue;
|
|
13970
14107
|
}
|
|
13971
14108
|
};
|
|
13972
14109
|
var setLoginOutPath = function setLoginOutPath() {
|
|
@@ -24134,7 +24271,7 @@ var App = function App(_ref) {
|
|
|
24134
24271
|
converter: function converter(_ref2) {
|
|
24135
24272
|
var response = _ref2.response,
|
|
24136
24273
|
data = _ref2.data;
|
|
24137
|
-
if (response
|
|
24274
|
+
if (judgeIsRequestSuccess(response)) {
|
|
24138
24275
|
// UpdateFiedList(data.filter(item => item.valueType == 20 || item.valueType == 21 || item.valueType == 22))
|
|
24139
24276
|
var resData = data.filter(function (item) {
|
|
24140
24277
|
return item.inputType != 40 && (item.valueType == 20 || item.valueType == 21 || item.valueType == 22);
|
|
@@ -26127,10 +26264,9 @@ var JsonQueryTable = /*#__PURE__*/React__default['default'].memo(function (props
|
|
|
26127
26264
|
Promise.all([axios__default['default'].get("/basic/flow/businessFieldGroup/one?moduleType=2&layoutPoint=".concat(pageType))]).then(function (_ref2) {
|
|
26128
26265
|
var _ref3 = _slicedToArray(_ref2, 1),
|
|
26129
26266
|
res = _ref3[0];
|
|
26130
|
-
var
|
|
26131
|
-
|
|
26132
|
-
|
|
26133
|
-
if (code === '000000') {
|
|
26267
|
+
var resD = (res === null || res === void 0 ? void 0 : res.data) || {};
|
|
26268
|
+
var data = resD.data;
|
|
26269
|
+
if (judgeIsRequestError(resD)) {
|
|
26134
26270
|
if (data) {
|
|
26135
26271
|
var businessType = data.businessType,
|
|
26136
26272
|
fieldGroup = data.code,
|
|
@@ -26151,15 +26287,15 @@ var JsonQueryTable = /*#__PURE__*/React__default['default'].memo(function (props
|
|
|
26151
26287
|
var axiosArr = detailTablesSetting.map(function (item) {
|
|
26152
26288
|
return axios__default['default'].get("/basic/flow/businessFieldGroup/one?moduleType=2&layoutPoint=".concat(item.tableCode));
|
|
26153
26289
|
});
|
|
26154
|
-
Promise.all(axiosArr).then(function (
|
|
26155
|
-
var
|
|
26156
|
-
resArr =
|
|
26290
|
+
Promise.all(axiosArr).then(function (_ref4) {
|
|
26291
|
+
var _ref5 = _toArray(_ref4),
|
|
26292
|
+
resArr = _ref5.slice(0);
|
|
26157
26293
|
var configParams = {};
|
|
26158
26294
|
detailTablesSetting.map(function (item, index) {
|
|
26159
26295
|
var _resArr$index;
|
|
26160
|
-
var
|
|
26161
|
-
code =
|
|
26162
|
-
data =
|
|
26296
|
+
var _ref6 = ((_resArr$index = resArr[index]) === null || _resArr$index === void 0 ? void 0 : _resArr$index.data) || {},
|
|
26297
|
+
code = _ref6.code,
|
|
26298
|
+
data = _ref6.data;
|
|
26163
26299
|
if (data) {
|
|
26164
26300
|
var businessType = data.businessType,
|
|
26165
26301
|
fieldGroup = data.code,
|