ns-base-module 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SubtotalsModal/addSubtotals.d.ts +1 -0
- package/dist/SubtotalsModal/addSubtotals.d.ts.map +1 -1
- package/dist/SubtotalsModal/addSubtotals.js +3 -2
- package/dist/SubtotalsModal/dndQuota.d.ts +1 -0
- package/dist/SubtotalsModal/dndQuota.d.ts.map +1 -1
- package/dist/SubtotalsModal/dndQuota.js +108 -13
- package/dist/SubtotalsModal/index.d.ts.map +1 -1
- package/dist/SubtotalsModal/index.js +26 -3
- package/dist/SubtotalsModal/subtotalTemplate.d.ts.map +1 -1
- package/dist/SubtotalsModal/subtotalTemplate.js +123 -13
- package/dist/TableHeaderConfigPopover/index.d.ts.map +1 -1
- package/dist/TableHeaderConfigPopover/index.js +0 -7
- package/dist/umd/ns-base-module.min.js +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ interface Iprops {
|
|
|
13
13
|
handleView?: (str: string) => void;
|
|
14
14
|
onReset?: () => void;
|
|
15
15
|
commonRequest?: any;
|
|
16
|
+
checkShare?: boolean;
|
|
16
17
|
}
|
|
17
18
|
declare const _default: React.ForwardRefExoticComponent<Iprops & React.RefAttributes<unknown>>;
|
|
18
19
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addSubtotals.d.ts","sourceRoot":"","sources":["addSubtotals.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,MAAM,OAAO,CAAC;AAGf,OAAO,4CAA4C,CAAC;AAKpD,UAAU,MAAM;IACd,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAEtC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,aAAa,CAAC,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"addSubtotals.d.ts","sourceRoot":"","sources":["addSubtotals.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,MAAM,OAAO,CAAC;AAGf,OAAO,4CAA4C,CAAC;AAKpD,UAAU,MAAM;IACd,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAEtC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,aAAa,CAAC,EAAE,GAAG,CAAC;IAEpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;;AAuFD,wBAAiC"}
|
|
@@ -21,7 +21,8 @@ var Index = function Index(props, ref) {
|
|
|
21
21
|
var columns = props.columns,
|
|
22
22
|
menuCode = props.menuCode,
|
|
23
23
|
formTemplateCode = props.formTemplateCode,
|
|
24
|
-
commonRequest = props.commonRequest
|
|
24
|
+
commonRequest = props.commonRequest,
|
|
25
|
+
checkShare = props.checkShare;
|
|
25
26
|
var _useState = useState(),
|
|
26
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
28
|
name = _useState2[0],
|
|
@@ -57,7 +58,7 @@ var Index = function Index(props, ref) {
|
|
|
57
58
|
code: ((_props$editItem3 = props.editItem) === null || _props$editItem3 === void 0 ? void 0 : _props$editItem3.value) || null,
|
|
58
59
|
configs: configsStr,
|
|
59
60
|
name: name,
|
|
60
|
-
perms_type: "private",
|
|
61
|
+
perms_type: checkShare ? "public" : "private",
|
|
61
62
|
query_type: "list",
|
|
62
63
|
type: "QUOTA_TMP" //'FORM_TMP' 列表模板,'QUOTA_TMP' 分类汇总模板
|
|
63
64
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dndQuota.d.ts","sourceRoot":"","sources":["dndQuota.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dndQuota.d.ts","sourceRoot":"","sources":["dndQuota.tsx"],"names":[],"mappings":"AAeA,OAAO,KAKN,MAAM,OAAO,CAAC;AAEf,OAAO,4CAA4C,CAAC;AAapD,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD,UAAU,MAAM;IACd,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ,EAAE,CAAC;QACjB,UAAU,EAAE,QAAQ,EAAE,CAAC;QACvB,aAAa,EAAE,QAAQ,EAAE,CAAC;QAC1B,SAAS,EAAE,QAAQ,EAAE,CAAC;KACvB,CAAC;CACH;;AA+kBD,wBAAiC"}
|
|
@@ -16,8 +16,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
/* eslint-disable no-case-declarations */
|
|
18
18
|
/* eslint-disable react/no-unknown-property */
|
|
19
|
-
import { CalendarOutlined, DeleteOutlined, DownOutlined, FieldNumberOutlined, FieldStringOutlined } from "@ant-design/icons";
|
|
20
|
-
import { Dropdown, Popover, Radio, Space, Tooltip } from "antd";
|
|
19
|
+
import { ArrowDownOutlined, ArrowUpOutlined, CalculatorOutlined, CalendarOutlined, DeleteOutlined, DownOutlined, FieldNumberOutlined, FieldStringOutlined, SortAscendingOutlined } from "@ant-design/icons";
|
|
20
|
+
import { Dropdown, Input, Popover, Radio, Space, Tooltip } from "antd";
|
|
21
21
|
import { find, get, isEmpty } from "lodash";
|
|
22
22
|
import React, { forwardRef, useEffect, useImperativeHandle, useState } from "react";
|
|
23
23
|
import { ReactSortable } from "react-sortablejs";
|
|
@@ -25,6 +25,7 @@ import "../../style/components/SubtotalsModal.scss";
|
|
|
25
25
|
import IconFont from "../Icon";
|
|
26
26
|
import { initLang } from "../utils/language";
|
|
27
27
|
import { queryDictEnum } from "../utils/services/global";
|
|
28
|
+
var TextArea = Input.TextArea;
|
|
28
29
|
var component = [{
|
|
29
30
|
compId: "1",
|
|
30
31
|
compName: "栅格",
|
|
@@ -149,13 +150,13 @@ var Index = function Index(props, ref) {
|
|
|
149
150
|
var findItem = find(props.columns, function (o) {
|
|
150
151
|
return o.value === item.value;
|
|
151
152
|
});
|
|
152
|
-
if (findItem) _dimensionList.push(_objectSpread(_objectSpread({},
|
|
153
|
+
if (findItem) _dimensionList.push(_objectSpread(_objectSpread({}, findItem), item));
|
|
153
154
|
});
|
|
154
155
|
initquotaList.forEach(function (item) {
|
|
155
156
|
var findItem = find(props.columns, function (o) {
|
|
156
157
|
return o.value === item.value;
|
|
157
158
|
});
|
|
158
|
-
if (findItem) _quotaList.push(_objectSpread(_objectSpread({},
|
|
159
|
+
if (findItem) _quotaList.push(_objectSpread(_objectSpread({}, findItem), item));
|
|
159
160
|
});
|
|
160
161
|
|
|
161
162
|
// 加指标列
|
|
@@ -216,17 +217,64 @@ var Index = function Index(props, ref) {
|
|
|
216
217
|
initList();
|
|
217
218
|
}, [props.columns, props.initConfig]);
|
|
218
219
|
|
|
219
|
-
//
|
|
220
|
-
var
|
|
220
|
+
// 更新指标
|
|
221
|
+
var updateQuotaList = function updateQuotaList(_value, _code, item) {
|
|
221
222
|
var _quotaList = _toConsumableArray(quotaList);
|
|
222
223
|
for (var i = 0, l = _quotaList.length; i < l; i++) {
|
|
223
224
|
if (_quotaList[i].value === item.value) {
|
|
224
|
-
_quotaList[i]
|
|
225
|
+
_quotaList[i][_code] = _value;
|
|
225
226
|
break;
|
|
226
227
|
}
|
|
227
228
|
}
|
|
228
229
|
setQuotaList(_quotaList);
|
|
229
230
|
};
|
|
231
|
+
// 更新维度
|
|
232
|
+
var updateDimensionList = function updateDimensionList(_value, _code, item) {
|
|
233
|
+
var _dimensionList = _toConsumableArray(dimensionList);
|
|
234
|
+
for (var i = 0, l = _dimensionList.length; i < l; i++) {
|
|
235
|
+
if (_dimensionList[i].value === item.value) {
|
|
236
|
+
_dimensionList[i][_code] = _value;
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
setDimensionList(_dimensionList);
|
|
241
|
+
};
|
|
242
|
+
// 更新列
|
|
243
|
+
var updateChartColumns = function updateChartColumns(_value, _code, item) {
|
|
244
|
+
var _chartColumns = _toConsumableArray(chartColumns);
|
|
245
|
+
for (var i = 0, l = _chartColumns.length; i < l; i++) {
|
|
246
|
+
if (_chartColumns[i].value === item.value) {
|
|
247
|
+
_chartColumns[i][_code] = _value;
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
setChartColumns(_chartColumns);
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
// 选择汇总方式
|
|
255
|
+
var handleMenu = function handleMenu(e, item) {
|
|
256
|
+
updateQuotaList(e.key, "sumType", item);
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
// 表达式
|
|
260
|
+
var changeExpress = function changeExpress(e, item) {
|
|
261
|
+
updateQuotaList(e.target.value, "expression", item);
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
// 升序降序
|
|
265
|
+
var handleSorte = function handleSorte(item, val, code) {
|
|
266
|
+
var _val = val;
|
|
267
|
+
if (val === item.sort) {
|
|
268
|
+
_val = null;
|
|
269
|
+
}
|
|
270
|
+
if (code === "quota") {
|
|
271
|
+
updateQuotaList(_val, "sort", item);
|
|
272
|
+
} else if (code === "list") {
|
|
273
|
+
updateChartColumns(_val, "sort", item);
|
|
274
|
+
} else if (code === "dimension") {
|
|
275
|
+
updateDimensionList(_val, "sort", item);
|
|
276
|
+
}
|
|
277
|
+
};
|
|
230
278
|
var handleDel = function handleDel(item, index, code) {
|
|
231
279
|
if (code === "dimension") {
|
|
232
280
|
var _list = _toConsumableArray(list);
|
|
@@ -271,7 +319,22 @@ var Index = function Index(props, ref) {
|
|
|
271
319
|
}
|
|
272
320
|
}, /*#__PURE__*/React.createElement("span", {
|
|
273
321
|
className: "dnd_quota__item_label"
|
|
274
|
-
}, item.label), /*#__PURE__*/React.createElement("div", null,
|
|
322
|
+
}, item.label), /*#__PURE__*/React.createElement("div", null, item.sumType === "express" && /*#__PURE__*/React.createElement(Popover, {
|
|
323
|
+
title: "\u8868\u8FBE\u5F0F",
|
|
324
|
+
zIndex: 99998,
|
|
325
|
+
content: /*#__PURE__*/React.createElement(TextArea, {
|
|
326
|
+
placeholder: "\u8BF7\u8F93\u5165\u8868\u8FBE\u5F0F",
|
|
327
|
+
value: item === null || item === void 0 ? void 0 : item.expression,
|
|
328
|
+
onChange: function onChange(e) {
|
|
329
|
+
return changeExpress(e, item);
|
|
330
|
+
}
|
|
331
|
+
})
|
|
332
|
+
}, /*#__PURE__*/React.createElement(CalculatorOutlined, {
|
|
333
|
+
style: {
|
|
334
|
+
cursor: "pointer",
|
|
335
|
+
marginRight: 6
|
|
336
|
+
}
|
|
337
|
+
})), code === "quota" && /*#__PURE__*/React.createElement(Dropdown, {
|
|
275
338
|
menu: {
|
|
276
339
|
items: summaryTypeArr.map(function (d) {
|
|
277
340
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
@@ -287,14 +350,45 @@ var Index = function Index(props, ref) {
|
|
|
287
350
|
className: "dnd_quota__item_txt"
|
|
288
351
|
}, /*#__PURE__*/React.createElement(Space, {
|
|
289
352
|
size: 2
|
|
290
|
-
}, showMenuLabel(item.sumType), /*#__PURE__*/React.createElement(DownOutlined, null)))), item.noDelete ? null : /*#__PURE__*/React.createElement(
|
|
353
|
+
}, showMenuLabel(item.sumType), /*#__PURE__*/React.createElement(DownOutlined, null)))), item.noDelete ? null : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popover, {
|
|
354
|
+
overlayClassName: "popover-sum-content",
|
|
355
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
356
|
+
className: "popover-sum-wrap"
|
|
357
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
358
|
+
className: "popover-sum-li ".concat((item === null || item === void 0 ? void 0 : item.sort) === "asc" ? "action" : ""),
|
|
359
|
+
onClick: function onClick() {
|
|
360
|
+
handleSorte(item, "asc", code);
|
|
361
|
+
}
|
|
362
|
+
}, "\u5347\u5E8F", /*#__PURE__*/React.createElement(ArrowUpOutlined, null)), /*#__PURE__*/React.createElement("p", {
|
|
363
|
+
className: "popover-sum-li ".concat((item === null || item === void 0 ? void 0 : item.sort) === "desc" ? "action" : ""),
|
|
364
|
+
onClick: function onClick() {
|
|
365
|
+
handleSorte(item, "desc", code);
|
|
366
|
+
}
|
|
367
|
+
}, "\u964D\u5E8F", /*#__PURE__*/React.createElement(ArrowDownOutlined, null))),
|
|
368
|
+
trigger: "click",
|
|
369
|
+
placement: "top",
|
|
370
|
+
zIndex: 9998
|
|
371
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
372
|
+
title: initLang({
|
|
373
|
+
id: "list.column.sort"
|
|
374
|
+
})
|
|
375
|
+
}, /*#__PURE__*/React.createElement(SortAscendingOutlined, {
|
|
376
|
+
style: {
|
|
377
|
+
cursor: "pointer",
|
|
378
|
+
marginLeft: 6
|
|
379
|
+
}
|
|
380
|
+
}))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
381
|
+
title: initLang({
|
|
382
|
+
id: "button.delete"
|
|
383
|
+
})
|
|
384
|
+
}, /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
291
385
|
style: {
|
|
292
386
|
marginLeft: 6
|
|
293
387
|
},
|
|
294
388
|
onClick: function onClick() {
|
|
295
389
|
return handleDel(item, index, code);
|
|
296
390
|
}
|
|
297
|
-
})));
|
|
391
|
+
})))));
|
|
298
392
|
}));
|
|
299
393
|
};
|
|
300
394
|
var sortableList = function sortableList(_list) {
|
|
@@ -336,6 +430,7 @@ var Index = function Index(props, ref) {
|
|
|
336
430
|
});
|
|
337
431
|
}
|
|
338
432
|
};
|
|
433
|
+
console.log("quotaListquotaList", quotaList);
|
|
339
434
|
return /*#__PURE__*/React.createElement("div", {
|
|
340
435
|
className: "dnd_quota_main"
|
|
341
436
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -508,9 +603,9 @@ var Index = function Index(props, ref) {
|
|
|
508
603
|
setList: function setList(e) {
|
|
509
604
|
var defaultSummaryType = get(summaryTypeArr, "[0].value", "");
|
|
510
605
|
var _arr = e.map(function (d) {
|
|
511
|
-
return _objectSpread({
|
|
512
|
-
sumType: defaultSummaryType
|
|
513
|
-
}
|
|
606
|
+
return _objectSpread(_objectSpread({}, d), {}, {
|
|
607
|
+
sumType: d.sumType || defaultSummaryType
|
|
608
|
+
});
|
|
514
609
|
});
|
|
515
610
|
setQuotaList(_arr);
|
|
516
611
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAMA;;GAEG;AAIH,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,4CAA4C,CAAC;AAOpD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAE5C,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC,aAAa,EAAE,GAAG,CAAC;IAEnB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAMA;;GAEG;AAIH,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,4CAA4C,CAAC;AAOpD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAE5C,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC,aAAa,EAAE,GAAG,CAAC;IAEnB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoLxC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -15,7 +15,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { PlusOutlined } from "@ant-design/icons";
|
|
18
|
-
import { Button, Popover, Tooltip } from "antd";
|
|
18
|
+
import { Button, Checkbox, Popover, Tooltip } from "antd";
|
|
19
19
|
import React, { useRef, useState } from "react";
|
|
20
20
|
import "../../style/components/SubtotalsModal.scss";
|
|
21
21
|
import ChooseModal from "../ChooseModal";
|
|
@@ -54,10 +54,16 @@ var Index = function Index(_ref) {
|
|
|
54
54
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
55
55
|
updateTable = _useState10[0],
|
|
56
56
|
setUpdateTable = _useState10[1];
|
|
57
|
+
var _useState11 = useState(false),
|
|
58
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
59
|
+
checkShare = _useState12[0],
|
|
60
|
+
setCheckShare = _useState12[1]; // 分享其他同事
|
|
61
|
+
|
|
57
62
|
var handleAdd = function handleAdd() {
|
|
58
63
|
setInitConfig({});
|
|
59
64
|
setEditItem(null);
|
|
60
65
|
setJsons("");
|
|
66
|
+
setCheckShare(false);
|
|
61
67
|
};
|
|
62
68
|
var handleSet = function handleSet(item) {
|
|
63
69
|
try {
|
|
@@ -67,12 +73,18 @@ var Index = function Index(_ref) {
|
|
|
67
73
|
setEditItem(item);
|
|
68
74
|
setJsons("");
|
|
69
75
|
(_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 || (_modalRef$current$onS = _modalRef$current.onShow) === null || _modalRef$current$onS === void 0 || _modalRef$current$onS.call(_modalRef$current);
|
|
76
|
+
if (item.perms_type === "public") {
|
|
77
|
+
setCheckShare(true);
|
|
78
|
+
} else {
|
|
79
|
+
setCheckShare(false);
|
|
80
|
+
}
|
|
70
81
|
} catch (error) {
|
|
71
82
|
var _modalRef$current2, _modalRef$current2$on;
|
|
72
83
|
setInitConfig({});
|
|
73
84
|
setEditItem(null);
|
|
74
85
|
setJsons("");
|
|
75
86
|
(_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 || (_modalRef$current2$on = _modalRef$current2.onShow) === null || _modalRef$current2$on === void 0 || _modalRef$current2$on.call(_modalRef$current2);
|
|
87
|
+
setCheckShare(false);
|
|
76
88
|
}
|
|
77
89
|
};
|
|
78
90
|
|
|
@@ -155,7 +167,8 @@ var Index = function Index(_ref) {
|
|
|
155
167
|
onCancel: onCancel,
|
|
156
168
|
initConfig: initConfig,
|
|
157
169
|
editItem: editItem,
|
|
158
|
-
handleView: handleView
|
|
170
|
+
handleView: handleView,
|
|
171
|
+
checkShare: checkShare
|
|
159
172
|
// onReset={onReset}
|
|
160
173
|
})), /*#__PURE__*/React.createElement("div", {
|
|
161
174
|
className: "subtotals-modal-right"
|
|
@@ -165,7 +178,17 @@ var Index = function Index(_ref) {
|
|
|
165
178
|
marginTop: 4,
|
|
166
179
|
marginBottom: 16
|
|
167
180
|
}
|
|
168
|
-
}, /*#__PURE__*/React.createElement(
|
|
181
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
182
|
+
checked: checkShare,
|
|
183
|
+
onChange: function onChange(e) {
|
|
184
|
+
setCheckShare(e.target.checked);
|
|
185
|
+
},
|
|
186
|
+
style: {
|
|
187
|
+
paddingTop: 6
|
|
188
|
+
}
|
|
189
|
+
}, initLang({
|
|
190
|
+
id: "prompt.shareTemplate"
|
|
191
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
169
192
|
onClick: onCancel,
|
|
170
193
|
style: {
|
|
171
194
|
marginRight: 8
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subtotalTemplate.d.ts","sourceRoot":"","sources":["subtotalTemplate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subtotalTemplate.d.ts","sourceRoot":"","sources":["subtotalTemplate.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,4CAA4C,CAAC;AAKpD,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CACnB;AAED,UAAU,MAAM;IACd,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IACjD,SAAS,EAAE,CAAC,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC;IAEnC,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC,aAAa,EAAE,GAAG,CAAC;IAEnB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;CACxD;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAwQ3B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -4,6 +4,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
11
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; 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; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; 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); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { 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); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; 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; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
8
12
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
9
13
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -13,13 +17,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
13
17
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
18
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
import { DeleteOutlined, SettingOutlined, UserOutlined } from "@ant-design/icons";
|
|
20
|
+
import { CopyOutlined, DeleteOutlined, SettingOutlined, ShareAltOutlined, UserOutlined } from "@ant-design/icons";
|
|
17
21
|
import { Button, Popconfirm, Radio, Tooltip } from "antd";
|
|
18
22
|
import React, { useEffect, useState } from "react";
|
|
19
23
|
// import { commonRequest } from '../../../../services/global';
|
|
20
24
|
// import { crossContext } from '@/my-context';
|
|
21
25
|
import "../../style/components/SubtotalsModal.scss";
|
|
22
26
|
import { initLang } from "../utils/language";
|
|
27
|
+
import { setFormTemplates } from "../utils/services/global";
|
|
23
28
|
var Index = function Index(props) {
|
|
24
29
|
var menuCode = props.menuCode,
|
|
25
30
|
formTemplateCode = props.formTemplateCode,
|
|
@@ -33,17 +38,22 @@ var Index = function Index(props) {
|
|
|
33
38
|
var _useState3 = useState([]),
|
|
34
39
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
35
40
|
template = _useState4[0],
|
|
36
|
-
setTemplate = _useState4[1];
|
|
37
|
-
var _useState5 = useState(
|
|
41
|
+
setTemplate = _useState4[1]; // 公共模板
|
|
42
|
+
var _useState5 = useState([]),
|
|
38
43
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
templateUser = _useState6[0],
|
|
45
|
+
setTemplateUser = _useState6[1]; // 个人模板
|
|
46
|
+
var _useState7 = useState(null),
|
|
47
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
48
|
+
curItem = _useState8[0],
|
|
49
|
+
setCurItem = _useState8[1];
|
|
41
50
|
|
|
42
51
|
// console.log("commonRequest", commonRequest);
|
|
43
52
|
|
|
44
53
|
var getTemplate = /*#__PURE__*/function () {
|
|
45
54
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
46
|
-
var
|
|
55
|
+
var _res$data;
|
|
56
|
+
var res, _templateUser, _template;
|
|
47
57
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
48
58
|
while (1) switch (_context.prev = _context.next) {
|
|
49
59
|
case 0:
|
|
@@ -57,8 +67,18 @@ var Index = function Index(props) {
|
|
|
57
67
|
});
|
|
58
68
|
case 2:
|
|
59
69
|
res = _context.sent;
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
_templateUser = [];
|
|
71
|
+
_template = [];
|
|
72
|
+
res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || _res$data.forEach(function (item) {
|
|
73
|
+
if (item.perms_type === "public") {
|
|
74
|
+
_template.push(item);
|
|
75
|
+
} else {
|
|
76
|
+
_templateUser.push(item);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
setTemplate(_template);
|
|
80
|
+
setTemplateUser(_templateUser);
|
|
81
|
+
case 8:
|
|
62
82
|
case "end":
|
|
63
83
|
return _context.stop();
|
|
64
84
|
}
|
|
@@ -125,10 +145,11 @@ var Index = function Index(props) {
|
|
|
125
145
|
var val = typeof _value != "undefined" ? _value : value;
|
|
126
146
|
var dimension = [];
|
|
127
147
|
var quota = [];
|
|
128
|
-
|
|
129
|
-
|
|
148
|
+
var _template = [].concat(_toConsumableArray(template), _toConsumableArray(templateUser));
|
|
149
|
+
for (var i = 0, l = _template.length; i < l; i++) {
|
|
150
|
+
if (_template[i].value === val) {
|
|
130
151
|
var _template$i, _config$quotaList, _config$chartColumns, _config$dimensionList, _config$quotaList2;
|
|
131
|
-
var _config = JSON.parse((_template$i =
|
|
152
|
+
var _config = JSON.parse((_template$i = _template[i]) === null || _template$i === void 0 ? void 0 : _template$i.define);
|
|
132
153
|
chartDimensions = _config.dimensionList.map(function (d) {
|
|
133
154
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
134
155
|
code: d.value
|
|
@@ -182,6 +203,39 @@ var Index = function Index(props) {
|
|
|
182
203
|
setValue("");
|
|
183
204
|
handleChoose("");
|
|
184
205
|
};
|
|
206
|
+
|
|
207
|
+
// 复制成个人模板
|
|
208
|
+
var handleCopy = /*#__PURE__*/function () {
|
|
209
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(item) {
|
|
210
|
+
var params;
|
|
211
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
212
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
213
|
+
case 0:
|
|
214
|
+
params = {
|
|
215
|
+
name: item.label + "-copy",
|
|
216
|
+
is_default: "N",
|
|
217
|
+
configs: item.define,
|
|
218
|
+
menu_code: menuCode,
|
|
219
|
+
form_template_code: formTemplateCode,
|
|
220
|
+
perms_type: "private",
|
|
221
|
+
code: null,
|
|
222
|
+
query_type: "list",
|
|
223
|
+
type: "QUOTA_TMP"
|
|
224
|
+
};
|
|
225
|
+
_context3.next = 3;
|
|
226
|
+
return setFormTemplates(params);
|
|
227
|
+
case 3:
|
|
228
|
+
getTemplate();
|
|
229
|
+
case 4:
|
|
230
|
+
case "end":
|
|
231
|
+
return _context3.stop();
|
|
232
|
+
}
|
|
233
|
+
}, _callee3);
|
|
234
|
+
}));
|
|
235
|
+
return function handleCopy(_x) {
|
|
236
|
+
return _ref3.apply(this, arguments);
|
|
237
|
+
};
|
|
238
|
+
}();
|
|
185
239
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
186
240
|
onChange: onChange,
|
|
187
241
|
value: value,
|
|
@@ -195,7 +249,7 @@ var Index = function Index(props) {
|
|
|
195
249
|
className: "list-title-icon"
|
|
196
250
|
}), initLang({
|
|
197
251
|
id: "prompt.summaryTemplate"
|
|
198
|
-
})), /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
252
|
+
})), /*#__PURE__*/React.createElement(React.Fragment, null, templateUser === null || templateUser === void 0 ? void 0 : templateUser.map(function (item) {
|
|
199
253
|
return /*#__PURE__*/React.createElement("div", {
|
|
200
254
|
className: "list-radio",
|
|
201
255
|
key: item.value
|
|
@@ -235,7 +289,63 @@ var Index = function Index(props) {
|
|
|
235
289
|
return handleSet(item);
|
|
236
290
|
}
|
|
237
291
|
}))));
|
|
238
|
-
}))
|
|
292
|
+
})), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
293
|
+
className: "list-title"
|
|
294
|
+
}, /*#__PURE__*/React.createElement(ShareAltOutlined, {
|
|
295
|
+
className: "list-title-icon"
|
|
296
|
+
}), initLang({
|
|
297
|
+
id: "prompt.publicTemplate"
|
|
298
|
+
})), /*#__PURE__*/React.createElement(React.Fragment, null, template.map(function (item) {
|
|
299
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
300
|
+
className: "list-radio",
|
|
301
|
+
key: item.value
|
|
302
|
+
}, /*#__PURE__*/React.createElement(Radio, {
|
|
303
|
+
value: item.value,
|
|
304
|
+
className: "list-radio-label"
|
|
305
|
+
}, item.label), item.owner === "N" && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
306
|
+
placement: "top",
|
|
307
|
+
title: initLang({
|
|
308
|
+
id: "prompt.copyTemplate"
|
|
309
|
+
})
|
|
310
|
+
}, /*#__PURE__*/React.createElement(CopyOutlined, {
|
|
311
|
+
className: "set-icon",
|
|
312
|
+
onClick: function onClick() {
|
|
313
|
+
return handleCopy(item);
|
|
314
|
+
}
|
|
315
|
+
}))), item.owner === "Y" && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Popconfirm, {
|
|
316
|
+
title: initLang({
|
|
317
|
+
id: "message.confirm.delete"
|
|
318
|
+
}),
|
|
319
|
+
okText: initLang({
|
|
320
|
+
id: "button.ok"
|
|
321
|
+
}),
|
|
322
|
+
cancelText: initLang({
|
|
323
|
+
id: "button.cancel"
|
|
324
|
+
}),
|
|
325
|
+
onConfirm: confirm,
|
|
326
|
+
onCancel: cancel
|
|
327
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
328
|
+
placement: "top",
|
|
329
|
+
title: initLang({
|
|
330
|
+
id: "prompt.delTemplate"
|
|
331
|
+
})
|
|
332
|
+
}, /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
333
|
+
className: "set-icon",
|
|
334
|
+
onClick: function onClick() {
|
|
335
|
+
return handleDel(item);
|
|
336
|
+
}
|
|
337
|
+
}))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
338
|
+
placement: "top",
|
|
339
|
+
title: initLang({
|
|
340
|
+
id: "prompt.setTemplate"
|
|
341
|
+
})
|
|
342
|
+
}, /*#__PURE__*/React.createElement(SettingOutlined, {
|
|
343
|
+
className: "set-icon",
|
|
344
|
+
onClick: function onClick() {
|
|
345
|
+
return handleSet(item);
|
|
346
|
+
}
|
|
347
|
+
}))));
|
|
348
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
239
349
|
style: {
|
|
240
350
|
textAlign: "right",
|
|
241
351
|
marginTop: 32
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAKlE,OAAO,sDAAsD,CAAC;AAK9D,UAAU,QAAQ;IAChB,OAAO,EAAE,GAAG,CAAC;IACb,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACtC,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,OAAO,EAAE,GAAG,CAAC;IACb,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;CACf;AACD,UAAU,MAAO,SAAQ,QAAQ;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAKlE,OAAO,sDAAsD,CAAC;AAK9D,UAAU,QAAQ;IAChB,OAAO,EAAE,GAAG,CAAC;IACb,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACtC,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,OAAO,EAAE,GAAG,CAAC;IACb,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;CACf;AACD,UAAU,MAAO,SAAQ,QAAQ;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB;AA0+BD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAmD3B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -766,16 +766,9 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
766
766
|
if (item.perms_type === "private") {
|
|
767
767
|
_templateUser.push(item);
|
|
768
768
|
} else {
|
|
769
|
-
// if (item.owner === 'Y') {
|
|
770
|
-
// // 公共分享
|
|
771
|
-
// }
|
|
772
769
|
_template.push(item);
|
|
773
770
|
}
|
|
774
771
|
if (item.is_default === "Y") {
|
|
775
|
-
// if (props.init) {
|
|
776
|
-
// props.updateColumns(JSON.parse(item.define));
|
|
777
|
-
// }
|
|
778
|
-
|
|
779
772
|
setValue(item.value);
|
|
780
773
|
setCurItem(item);
|
|
781
774
|
}
|