@nokecy/qc-ui 1.0.96 → 1.0.97
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.
|
@@ -24,7 +24,16 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
24
24
|
* 内部配置类型(所有字段必填)
|
|
25
25
|
*/
|
|
26
26
|
/**
|
|
27
|
-
* 后端 API 响应格式
|
|
27
|
+
* 后端 API 响应格式 - 基础响应
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* 保存方案结果
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* 删除方案结果
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* 设置当前方案结果
|
|
28
37
|
*/
|
|
29
38
|
/**
|
|
30
39
|
* 后端 API 方案存储适配器
|
|
@@ -184,7 +193,7 @@ var BackendApiSchemeAdapter = exports.BackendApiSchemeAdapter = /*#__PURE__*/fun
|
|
|
184
193
|
case 0:
|
|
185
194
|
_context2.prev = 0;
|
|
186
195
|
this.log('加载所有方案数据');
|
|
187
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/
|
|
196
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/schemes");
|
|
188
197
|
_context2.next = 5;
|
|
189
198
|
return this.request(url);
|
|
190
199
|
case 5:
|
|
@@ -216,13 +225,13 @@ var BackendApiSchemeAdapter = exports.BackendApiSchemeAdapter = /*#__PURE__*/fun
|
|
|
216
225
|
key: "saveColumnScheme",
|
|
217
226
|
value: function () {
|
|
218
227
|
var _saveColumnScheme = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(gridId, scheme) {
|
|
219
|
-
var
|
|
228
|
+
var url, response;
|
|
220
229
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
221
230
|
while (1) switch (_context3.prev = _context3.next) {
|
|
222
231
|
case 0:
|
|
223
232
|
_context3.prev = 0;
|
|
224
233
|
this.log("\u4FDD\u5B58\u5217\u65B9\u6848: ".concat(gridId, " - ").concat(scheme.name));
|
|
225
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/column-scheme");
|
|
234
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/save-column-scheme");
|
|
226
235
|
_context3.next = 5;
|
|
227
236
|
return this.request(url, {
|
|
228
237
|
method: 'POST',
|
|
@@ -239,8 +248,8 @@ var BackendApiSchemeAdapter = exports.BackendApiSchemeAdapter = /*#__PURE__*/fun
|
|
|
239
248
|
}
|
|
240
249
|
throw new Error(response.message || '保存失败');
|
|
241
250
|
case 8:
|
|
242
|
-
this.log('保存成功',
|
|
243
|
-
return _context3.abrupt("return", response.
|
|
251
|
+
this.log('保存成功', response.scheme);
|
|
252
|
+
return _context3.abrupt("return", response.scheme);
|
|
244
253
|
case 12:
|
|
245
254
|
_context3.prev = 12;
|
|
246
255
|
_context3.t0 = _context3["catch"](0);
|
|
@@ -268,10 +277,10 @@ var BackendApiSchemeAdapter = exports.BackendApiSchemeAdapter = /*#__PURE__*/fun
|
|
|
268
277
|
case 0:
|
|
269
278
|
_context4.prev = 0;
|
|
270
279
|
this.log("\u5220\u9664\u5217\u65B9\u6848: ".concat(gridId, " - ").concat(schemeId));
|
|
271
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/column-scheme
|
|
280
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/delete-column-scheme?schemeId=").concat(schemeId, "&gridId=").concat(gridId);
|
|
272
281
|
_context4.next = 5;
|
|
273
282
|
return this.request(url, {
|
|
274
|
-
method: '
|
|
283
|
+
method: 'POST'
|
|
275
284
|
});
|
|
276
285
|
case 5:
|
|
277
286
|
response = _context4.sent;
|
|
@@ -305,13 +314,13 @@ var BackendApiSchemeAdapter = exports.BackendApiSchemeAdapter = /*#__PURE__*/fun
|
|
|
305
314
|
key: "saveQueryScheme",
|
|
306
315
|
value: function () {
|
|
307
316
|
var _saveQueryScheme = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(gridId, scheme) {
|
|
308
|
-
var
|
|
317
|
+
var url, response;
|
|
309
318
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
310
319
|
while (1) switch (_context5.prev = _context5.next) {
|
|
311
320
|
case 0:
|
|
312
321
|
_context5.prev = 0;
|
|
313
322
|
this.log("\u4FDD\u5B58\u67E5\u8BE2\u65B9\u6848: ".concat(gridId, " - ").concat(scheme.name));
|
|
314
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/query-scheme");
|
|
323
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/save-query-scheme");
|
|
315
324
|
_context5.next = 5;
|
|
316
325
|
return this.request(url, {
|
|
317
326
|
method: 'POST',
|
|
@@ -328,8 +337,8 @@ var BackendApiSchemeAdapter = exports.BackendApiSchemeAdapter = /*#__PURE__*/fun
|
|
|
328
337
|
}
|
|
329
338
|
throw new Error(response.message || '保存失败');
|
|
330
339
|
case 8:
|
|
331
|
-
this.log('保存成功',
|
|
332
|
-
return _context5.abrupt("return", response.
|
|
340
|
+
this.log('保存成功', response.scheme);
|
|
341
|
+
return _context5.abrupt("return", response.scheme);
|
|
333
342
|
case 12:
|
|
334
343
|
_context5.prev = 12;
|
|
335
344
|
_context5.t0 = _context5["catch"](0);
|
|
@@ -357,10 +366,10 @@ var BackendApiSchemeAdapter = exports.BackendApiSchemeAdapter = /*#__PURE__*/fun
|
|
|
357
366
|
case 0:
|
|
358
367
|
_context6.prev = 0;
|
|
359
368
|
this.log("\u5220\u9664\u67E5\u8BE2\u65B9\u6848: ".concat(gridId, " - ").concat(schemeId));
|
|
360
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/query-scheme
|
|
369
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/delete-query-scheme?schemeId=").concat(schemeId, "&gridId=").concat(gridId);
|
|
361
370
|
_context6.next = 5;
|
|
362
371
|
return this.request(url, {
|
|
363
|
-
method: '
|
|
372
|
+
method: 'POST'
|
|
364
373
|
});
|
|
365
374
|
case 5:
|
|
366
375
|
response = _context6.sent;
|
|
@@ -403,10 +412,10 @@ var BackendApiSchemeAdapter = exports.BackendApiSchemeAdapter = /*#__PURE__*/fun
|
|
|
403
412
|
columnSchemeId: columnSchemeId,
|
|
404
413
|
querySchemeId: querySchemeId
|
|
405
414
|
});
|
|
406
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/current-scheme");
|
|
415
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/set-current-scheme");
|
|
407
416
|
_context7.next = 5;
|
|
408
417
|
return this.request(url, {
|
|
409
|
-
method: '
|
|
418
|
+
method: 'POST',
|
|
410
419
|
body: JSON.stringify({
|
|
411
420
|
gridId: gridId,
|
|
412
421
|
columnSchemeId: columnSchemeId,
|
|
@@ -21,7 +21,19 @@ import { message } from 'antd';
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* 后端 API 响应格式
|
|
24
|
+
* 后端 API 响应格式 - 基础响应
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 保存方案结果
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 删除方案结果
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 设置当前方案结果
|
|
25
37
|
*/
|
|
26
38
|
|
|
27
39
|
/**
|
|
@@ -182,7 +194,7 @@ export var BackendApiSchemeAdapter = /*#__PURE__*/function () {
|
|
|
182
194
|
case 0:
|
|
183
195
|
_context2.prev = 0;
|
|
184
196
|
this.log('加载所有方案数据');
|
|
185
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/
|
|
197
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/schemes");
|
|
186
198
|
_context2.next = 5;
|
|
187
199
|
return this.request(url);
|
|
188
200
|
case 5:
|
|
@@ -214,13 +226,13 @@ export var BackendApiSchemeAdapter = /*#__PURE__*/function () {
|
|
|
214
226
|
key: "saveColumnScheme",
|
|
215
227
|
value: function () {
|
|
216
228
|
var _saveColumnScheme = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(gridId, scheme) {
|
|
217
|
-
var
|
|
229
|
+
var url, response;
|
|
218
230
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
219
231
|
while (1) switch (_context3.prev = _context3.next) {
|
|
220
232
|
case 0:
|
|
221
233
|
_context3.prev = 0;
|
|
222
234
|
this.log("\u4FDD\u5B58\u5217\u65B9\u6848: ".concat(gridId, " - ").concat(scheme.name));
|
|
223
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/column-scheme");
|
|
235
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/save-column-scheme");
|
|
224
236
|
_context3.next = 5;
|
|
225
237
|
return this.request(url, {
|
|
226
238
|
method: 'POST',
|
|
@@ -237,8 +249,8 @@ export var BackendApiSchemeAdapter = /*#__PURE__*/function () {
|
|
|
237
249
|
}
|
|
238
250
|
throw new Error(response.message || '保存失败');
|
|
239
251
|
case 8:
|
|
240
|
-
this.log('保存成功',
|
|
241
|
-
return _context3.abrupt("return", response.
|
|
252
|
+
this.log('保存成功', response.scheme);
|
|
253
|
+
return _context3.abrupt("return", response.scheme);
|
|
242
254
|
case 12:
|
|
243
255
|
_context3.prev = 12;
|
|
244
256
|
_context3.t0 = _context3["catch"](0);
|
|
@@ -266,10 +278,10 @@ export var BackendApiSchemeAdapter = /*#__PURE__*/function () {
|
|
|
266
278
|
case 0:
|
|
267
279
|
_context4.prev = 0;
|
|
268
280
|
this.log("\u5220\u9664\u5217\u65B9\u6848: ".concat(gridId, " - ").concat(schemeId));
|
|
269
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/column-scheme
|
|
281
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/delete-column-scheme?schemeId=").concat(schemeId, "&gridId=").concat(gridId);
|
|
270
282
|
_context4.next = 5;
|
|
271
283
|
return this.request(url, {
|
|
272
|
-
method: '
|
|
284
|
+
method: 'POST'
|
|
273
285
|
});
|
|
274
286
|
case 5:
|
|
275
287
|
response = _context4.sent;
|
|
@@ -303,13 +315,13 @@ export var BackendApiSchemeAdapter = /*#__PURE__*/function () {
|
|
|
303
315
|
key: "saveQueryScheme",
|
|
304
316
|
value: function () {
|
|
305
317
|
var _saveQueryScheme = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(gridId, scheme) {
|
|
306
|
-
var
|
|
318
|
+
var url, response;
|
|
307
319
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
308
320
|
while (1) switch (_context5.prev = _context5.next) {
|
|
309
321
|
case 0:
|
|
310
322
|
_context5.prev = 0;
|
|
311
323
|
this.log("\u4FDD\u5B58\u67E5\u8BE2\u65B9\u6848: ".concat(gridId, " - ").concat(scheme.name));
|
|
312
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/query-scheme");
|
|
324
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/save-query-scheme");
|
|
313
325
|
_context5.next = 5;
|
|
314
326
|
return this.request(url, {
|
|
315
327
|
method: 'POST',
|
|
@@ -326,8 +338,8 @@ export var BackendApiSchemeAdapter = /*#__PURE__*/function () {
|
|
|
326
338
|
}
|
|
327
339
|
throw new Error(response.message || '保存失败');
|
|
328
340
|
case 8:
|
|
329
|
-
this.log('保存成功',
|
|
330
|
-
return _context5.abrupt("return", response.
|
|
341
|
+
this.log('保存成功', response.scheme);
|
|
342
|
+
return _context5.abrupt("return", response.scheme);
|
|
331
343
|
case 12:
|
|
332
344
|
_context5.prev = 12;
|
|
333
345
|
_context5.t0 = _context5["catch"](0);
|
|
@@ -355,10 +367,10 @@ export var BackendApiSchemeAdapter = /*#__PURE__*/function () {
|
|
|
355
367
|
case 0:
|
|
356
368
|
_context6.prev = 0;
|
|
357
369
|
this.log("\u5220\u9664\u67E5\u8BE2\u65B9\u6848: ".concat(gridId, " - ").concat(schemeId));
|
|
358
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/query-scheme
|
|
370
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/delete-query-scheme?schemeId=").concat(schemeId, "&gridId=").concat(gridId);
|
|
359
371
|
_context6.next = 5;
|
|
360
372
|
return this.request(url, {
|
|
361
|
-
method: '
|
|
373
|
+
method: 'POST'
|
|
362
374
|
});
|
|
363
375
|
case 5:
|
|
364
376
|
response = _context6.sent;
|
|
@@ -401,10 +413,10 @@ export var BackendApiSchemeAdapter = /*#__PURE__*/function () {
|
|
|
401
413
|
columnSchemeId: columnSchemeId,
|
|
402
414
|
querySchemeId: querySchemeId
|
|
403
415
|
});
|
|
404
|
-
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/current-scheme");
|
|
416
|
+
url = "".concat(this.config.apiBaseUrl, "/api/extra-object/table-scheme/set-current-scheme");
|
|
405
417
|
_context7.next = 5;
|
|
406
418
|
return this.request(url, {
|
|
407
|
-
method: '
|
|
419
|
+
method: 'POST',
|
|
408
420
|
body: JSON.stringify({
|
|
409
421
|
gridId: gridId,
|
|
410
422
|
columnSchemeId: columnSchemeId,
|