ns-base-module 1.0.12 → 1.0.14
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/ChooseModal/index.js +1 -1
- package/dist/Entry/components/TreeSelect.d.ts +4 -5
- package/dist/Entry/components/TreeSelect.d.ts.map +1 -1
- package/dist/Entry/components/TreeSelect.js +13 -5
- package/dist/Icon/index.d.ts.map +1 -1
- package/dist/Icon/index.js +2 -3
- package/dist/IconTools/index.d.ts.map +1 -1
- package/dist/IconTools/index.js +1 -1
- package/dist/SubtotalsModal/addSubtotals.d.ts.map +1 -1
- package/dist/SubtotalsModal/addSubtotals.js +1 -1
- package/dist/SubtotalsModal/dndQuota.d.ts +4 -1
- package/dist/SubtotalsModal/dndQuota.d.ts.map +1 -1
- package/dist/SubtotalsModal/dndQuota.js +158 -23
- package/dist/SubtotalsModal/index.d.ts +1 -0
- package/dist/SubtotalsModal/index.d.ts.map +1 -1
- package/dist/SubtotalsModal/index.js +15 -3
- package/dist/SubtotalsModal/viewSubtotals.d.ts +1 -0
- package/dist/SubtotalsModal/viewSubtotals.d.ts.map +1 -1
- package/dist/SubtotalsModal/viewSubtotals.js +1 -0
- package/dist/TableHeaderConfigPopover/index.d.ts +2 -0
- package/dist/TableHeaderConfigPopover/index.d.ts.map +1 -1
- package/dist/TableHeaderConfigPopover/index.js +230 -111
- package/dist/TableHeaderConfigPopover/updateColumns.d.ts +10 -0
- package/dist/TableHeaderConfigPopover/updateColumns.d.ts.map +1 -0
- package/dist/TableHeaderConfigPopover/updateColumns.js +26 -0
- package/dist/TableHeaderConfigPopover/utils.d.ts +13 -0
- package/dist/TableHeaderConfigPopover/utils.d.ts.map +1 -1
- package/dist/TableHeaderConfigPopover/utils.js +188 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/umd/ns-base-module.min.css +1 -1
- package/dist/umd/ns-base-module.min.js +1 -1
- package/dist/utils/language.d.ts +28 -1
- package/dist/utils/language.d.ts.map +1 -1
- package/dist/utils/language.js +29 -2
- package/dist/utils/utils.d.ts +6 -7
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +104 -103
- package/package.json +1 -1
- package/style/components/SubtotalsModal.scss +41 -12
- package/types/types.d.ts +1 -0
|
@@ -20,9 +20,9 @@ import React, { forwardRef, useImperativeHandle, useState } from "react";
|
|
|
20
20
|
// import List from '@/components/v2/Order/List';
|
|
21
21
|
// import type { ListConfigType } from '@/utils/type.d';
|
|
22
22
|
// import { queryConfig } from '@/services/global';
|
|
23
|
+
import FontIcon from "../Icon";
|
|
23
24
|
import { initLang } from "../utils/language";
|
|
24
25
|
import { handlePercentage } from "../utils/utils";
|
|
25
|
-
import FontIcon from "../Icon";
|
|
26
26
|
var Index = function Index(_ref, ref) {
|
|
27
27
|
var _params$config, _params$config2;
|
|
28
28
|
var children = _ref.children,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default index;
|
|
1
|
+
import type { TreeSelectProps } from "antd";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare const Index: (props: TreeSelectProps) => React.JSX.Element;
|
|
4
|
+
export default Index;
|
|
6
5
|
//# sourceMappingURL=TreeSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeSelect.d.ts","sourceRoot":"","sources":["TreeSelect.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TreeSelect.d.ts","sourceRoot":"","sources":["TreeSelect.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAG5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,KAAK,UAAW,eAAe,sBAYpC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -5,14 +5,22 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
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; }
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
7
|
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); }
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
/*
|
|
9
|
+
* @description:
|
|
10
|
+
* @author chenchangfu
|
|
11
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
12
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { TreeSelect } from "antd";
|
|
16
|
+
// import type { DefaultValueType } from "rc-tree-select/lib/interface";
|
|
17
|
+
import React from "react";
|
|
18
|
+
var Index = function Index(props) {
|
|
11
19
|
var _style = _objectSpread({
|
|
12
|
-
width:
|
|
20
|
+
width: "100%"
|
|
13
21
|
}, props.style);
|
|
14
22
|
return /*#__PURE__*/React.createElement(TreeSelect, _extends({}, props, {
|
|
15
23
|
style: _style
|
|
16
24
|
}));
|
|
17
25
|
};
|
|
18
|
-
export default
|
|
26
|
+
export default Index;
|
package/dist/Icon/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAQA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,QAAA,MAAM,QAAQ,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";AAQA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,QAAA,MAAM,QAAQ,+FAQZ,CAAC;AAEH,eAAe,QAAQ,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/Icon/index.js
CHANGED
|
@@ -12,10 +12,9 @@ var IconFont = createFromIconfontCN({
|
|
|
12
12
|
// iconfont项目名称:ant design 官方图标
|
|
13
13
|
"//at.alicdn.com/t/font_2450829_w05sq2z5ti.js", "//at.alicdn.com/t/c/font_2450829_8bvott1swoo.js",
|
|
14
14
|
// iconfont项目名称:NextStone RAMA
|
|
15
|
-
// '//at.alicdn.com/t/c/font_4504651_3ojm80uzjut.js',
|
|
16
15
|
"//at.alicdn.com/t/c/font_4504651_66m3qjrc6st.js",
|
|
17
|
-
//
|
|
18
|
-
"//at.alicdn.com/t/c/
|
|
16
|
+
// // 旧配置 ns- 开头
|
|
17
|
+
"//at.alicdn.com/t/c/font_4504651_ejgod5p1qt6.js" //// 新配置 icon- 开头 兼容菜单 组件弹框选择 使用这份
|
|
19
18
|
]
|
|
20
19
|
});
|
|
21
20
|
export default IconFont;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAwB,EACtB,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAK9D,aAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IAErC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC;CACtD,GAAG,mBAAmB,GACrB,mBAAmB,CAAC;AAEtB,QAAA,MAAM,KAAK,UAAW,aAAa,sBAuHlC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/dist/IconTools/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ColumnHeightOutlined, PicLeftOutlined, RedoOutlined, SwapOutlined } from "@ant-design/icons";
|
|
2
2
|
import { Dropdown, Tooltip } from "antd";
|
|
3
|
-
import { initLang } from "../utils/language";
|
|
4
3
|
import React, { useMemo } from "react";
|
|
5
4
|
import FilterClearIcon from "../FilterPopover/FilterClearIcon";
|
|
6
5
|
import SubtotalsModal from "../SubtotalsModal";
|
|
7
6
|
import TableHeaderConfigPopover from "../TableHeaderConfigPopover";
|
|
7
|
+
import { initLang } from "../utils/language";
|
|
8
8
|
import { adapterColumns } from "./utils";
|
|
9
9
|
var Index = function Index(props) {
|
|
10
10
|
var filterSearch = props.filterSearch,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addSubtotals.d.ts","sourceRoot":"","sources":["addSubtotals.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,MAAM,OAAO,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;CACrB;;AAsFD,wBAAiC"}
|
|
@@ -12,8 +12,8 @@ import { Button, Col, Input, Row, message } from "antd";
|
|
|
12
12
|
import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
13
13
|
|
|
14
14
|
// import { commonRequest } from '../../../../services/global';
|
|
15
|
-
import { initLang } from "../utils/language";
|
|
16
15
|
import "../../style/components/SubtotalsModal.scss";
|
|
16
|
+
import { initLang } from "../utils/language";
|
|
17
17
|
import { setFormTemplates } from "../utils/services/global";
|
|
18
18
|
import DndQuota from "./dndQuota";
|
|
19
19
|
var Index = function Index(props, ref) {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import "../../style/components/SubtotalsModal.scss";
|
|
2
3
|
interface IColumns {
|
|
3
4
|
label: string;
|
|
4
5
|
value: string;
|
|
5
|
-
entryType: string;
|
|
6
6
|
dataType: string;
|
|
7
|
+
entryType?: string;
|
|
7
8
|
sumType?: string;
|
|
9
|
+
bgColor?: string;
|
|
10
|
+
noDelete?: boolean;
|
|
8
11
|
}
|
|
9
12
|
interface Iprops {
|
|
10
13
|
columns: IColumns[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dndQuota.d.ts","sourceRoot":"","sources":["dndQuota.tsx"],"names":[],"mappings":"AAWA,OAAO,KAKN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dndQuota.d.ts","sourceRoot":"","sources":["dndQuota.tsx"],"names":[],"mappings":"AAWA,OAAO,KAKN,MAAM,OAAO,CAAC;AAEf,OAAO,4CAA4C,CAAC;AAYpD,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;CACpB;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;;AAweD,wBAAiC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
+
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."); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
2
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
8
|
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
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
10
|
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); }
|
|
11
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
13
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -17,10 +17,13 @@ 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
19
|
import { CalendarOutlined, DeleteOutlined, DownOutlined, FieldNumberOutlined, FieldStringOutlined } from "@ant-design/icons";
|
|
20
|
-
import { Dropdown, Radio, Space, Tooltip } from "antd";
|
|
20
|
+
import { Dropdown, 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";
|
|
24
|
+
import "../../style/components/SubtotalsModal.scss";
|
|
25
|
+
import IconFont from "../Icon";
|
|
26
|
+
import { initLang } from "../utils/language";
|
|
24
27
|
import { queryDictEnum } from "../utils/services/global";
|
|
25
28
|
var component = [{
|
|
26
29
|
compId: "1",
|
|
@@ -39,6 +42,28 @@ var component = [{
|
|
|
39
42
|
compName: "日期选择器",
|
|
40
43
|
compType: "date-picker"
|
|
41
44
|
}];
|
|
45
|
+
var sumEmnu = [{
|
|
46
|
+
label: "列总计",
|
|
47
|
+
value: "col",
|
|
48
|
+
datas: [{
|
|
49
|
+
label: initLang({
|
|
50
|
+
id: "prompt.sum.col.left"
|
|
51
|
+
}),
|
|
52
|
+
value: "left"
|
|
53
|
+
}, {
|
|
54
|
+
label: initLang({
|
|
55
|
+
id: "prompt.sum.col.right"
|
|
56
|
+
}),
|
|
57
|
+
value: "right"
|
|
58
|
+
}]
|
|
59
|
+
}, {
|
|
60
|
+
label: "行总计",
|
|
61
|
+
value: "row",
|
|
62
|
+
datas: [{
|
|
63
|
+
label: "显示行总计",
|
|
64
|
+
value: "sumRow"
|
|
65
|
+
}]
|
|
66
|
+
}];
|
|
42
67
|
var Index = function Index(props, ref) {
|
|
43
68
|
// const [components, setComponents] = useState<ItemType[]>(component);
|
|
44
69
|
var _useState = useState([]),
|
|
@@ -69,6 +94,14 @@ var Index = function Index(props, ref) {
|
|
|
69
94
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
70
95
|
valueRadio = _useState14[0],
|
|
71
96
|
setValueRadio = _useState14[1];
|
|
97
|
+
var _useState15 = useState(null),
|
|
98
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
99
|
+
sumColPosition = _useState16[0],
|
|
100
|
+
setSumColPosition = _useState16[1];
|
|
101
|
+
var _useState17 = useState(false),
|
|
102
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
103
|
+
sumRow = _useState18[0],
|
|
104
|
+
setSumRow = _useState18[1];
|
|
72
105
|
useImperativeHandle(ref, function () {
|
|
73
106
|
return {
|
|
74
107
|
getQuotaDataStr: function getQuotaDataStr() {
|
|
@@ -78,7 +111,9 @@ var Index = function Index(props, ref) {
|
|
|
78
111
|
dimensionList: dimensionList,
|
|
79
112
|
quotaList: quotaList,
|
|
80
113
|
chartColumns: chartColumns,
|
|
81
|
-
valueRadio: valueRadio
|
|
114
|
+
valueRadio: valueRadio,
|
|
115
|
+
sumColPosition: sumColPosition,
|
|
116
|
+
sumRow: sumRow
|
|
82
117
|
});
|
|
83
118
|
}
|
|
84
119
|
};
|
|
@@ -87,10 +122,8 @@ var Index = function Index(props, ref) {
|
|
|
87
122
|
// 汇总方式枚举
|
|
88
123
|
var getSummaryType = function getSummaryType() {
|
|
89
124
|
queryDictEnum("summaryType").then(function (res) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
var _res$data2;
|
|
93
|
-
setSummaryTypeArr((res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data) || []);
|
|
125
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
|
|
126
|
+
setSummaryTypeArr((res === null || res === void 0 ? void 0 : res.data) || []);
|
|
94
127
|
}
|
|
95
128
|
});
|
|
96
129
|
};
|
|
@@ -105,11 +138,48 @@ var Index = function Index(props, ref) {
|
|
|
105
138
|
var initquotaList = get(props.initConfig, "quotaList", []);
|
|
106
139
|
var initchartColumns = get(props.initConfig, "chartColumns", []);
|
|
107
140
|
var _valueRadio = get(props.initConfig, "valueRadio", "list");
|
|
141
|
+
var _sumColPosition = get(props.initConfig, "sumColPosition", null);
|
|
142
|
+
var _sumRow = get(props.initConfig, "sumRow", false);
|
|
108
143
|
var _dimensionList = [];
|
|
109
144
|
var _chartColumns = [];
|
|
110
145
|
var _quotaList = [];
|
|
111
146
|
var _numberList = [];
|
|
112
147
|
var _list = [];
|
|
148
|
+
initdimensionList.forEach(function (item) {
|
|
149
|
+
var findItem = find(props.columns, function (o) {
|
|
150
|
+
return o.value === item.value;
|
|
151
|
+
});
|
|
152
|
+
if (findItem) _dimensionList.push(_objectSpread(_objectSpread({}, item), findItem));
|
|
153
|
+
});
|
|
154
|
+
initquotaList.forEach(function (item) {
|
|
155
|
+
var findItem = find(props.columns, function (o) {
|
|
156
|
+
return o.value === item.value;
|
|
157
|
+
});
|
|
158
|
+
if (findItem) _quotaList.push(_objectSpread(_objectSpread({}, item), findItem));
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// 加指标列
|
|
162
|
+
var _hasQuotasCol = false;
|
|
163
|
+
var _colPosition = {
|
|
164
|
+
dataType: "string",
|
|
165
|
+
value: "quotasColPosition",
|
|
166
|
+
label: "指标列",
|
|
167
|
+
bgColor: "#b07f02",
|
|
168
|
+
noDelete: true
|
|
169
|
+
};
|
|
170
|
+
initchartColumns.forEach(function (item) {
|
|
171
|
+
var findItem = find(props.columns, function (o) {
|
|
172
|
+
return o.value === item.value;
|
|
173
|
+
});
|
|
174
|
+
if (item.value === "quotasColPosition") {
|
|
175
|
+
_hasQuotasCol = true;
|
|
176
|
+
findItem = _colPosition;
|
|
177
|
+
}
|
|
178
|
+
if (findItem) _chartColumns.push(findItem);
|
|
179
|
+
});
|
|
180
|
+
if (!_hasQuotasCol) {
|
|
181
|
+
_chartColumns.unshift(_colPosition);
|
|
182
|
+
}
|
|
113
183
|
(_props$columns = props.columns) === null || _props$columns === void 0 || _props$columns.forEach(function (item) {
|
|
114
184
|
// 默认值
|
|
115
185
|
var dimensionItem = find(initdimensionList, function (o) {
|
|
@@ -122,11 +192,11 @@ var Index = function Index(props, ref) {
|
|
|
122
192
|
return o.value === item.value;
|
|
123
193
|
});
|
|
124
194
|
if (dimensionItem) {
|
|
125
|
-
_dimensionList.push(dimensionItem);
|
|
195
|
+
// _dimensionList.push(dimensionItem);
|
|
126
196
|
} else if (chartItem) {
|
|
127
|
-
_chartColumns.push(chartItem);
|
|
197
|
+
// _chartColumns.push(chartItem);
|
|
128
198
|
} else if (quotaItem) {
|
|
129
|
-
_quotaList.push(quotaItem);
|
|
199
|
+
// _quotaList.push(quotaItem);
|
|
130
200
|
} else if (item.dataType === "number") {
|
|
131
201
|
_numberList.push(item);
|
|
132
202
|
} else {
|
|
@@ -139,6 +209,8 @@ var Index = function Index(props, ref) {
|
|
|
139
209
|
setQuotaList(_quotaList);
|
|
140
210
|
setChartColumns(_chartColumns);
|
|
141
211
|
setValueRadio(_valueRadio);
|
|
212
|
+
setSumColPosition(_sumColPosition);
|
|
213
|
+
setSumRow(_sumRow);
|
|
142
214
|
};
|
|
143
215
|
useEffect(function () {
|
|
144
216
|
initList();
|
|
@@ -193,12 +265,13 @@ var Index = function Index(props, ref) {
|
|
|
193
265
|
return /*#__PURE__*/React.createElement(React.Fragment, null, _list.map(function (item, index) {
|
|
194
266
|
return /*#__PURE__*/React.createElement("div", {
|
|
195
267
|
className: "dnd_quota__item",
|
|
196
|
-
key: item.value
|
|
197
|
-
|
|
198
|
-
|
|
268
|
+
key: item.value,
|
|
269
|
+
style: {
|
|
270
|
+
backgroundColor: item.bgColor ? item.bgColor : ""
|
|
271
|
+
}
|
|
199
272
|
}, /*#__PURE__*/React.createElement("span", {
|
|
200
273
|
className: "dnd_quota__item_label"
|
|
201
|
-
}, item.label)
|
|
274
|
+
}, item.label), /*#__PURE__*/React.createElement("div", null, code === "quota" && /*#__PURE__*/React.createElement(Dropdown, {
|
|
202
275
|
menu: {
|
|
203
276
|
items: summaryTypeArr.map(function (d) {
|
|
204
277
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
@@ -214,7 +287,7 @@ var Index = function Index(props, ref) {
|
|
|
214
287
|
className: "dnd_quota__item_txt"
|
|
215
288
|
}, /*#__PURE__*/React.createElement(Space, {
|
|
216
289
|
size: 2
|
|
217
|
-
}, showMenuLabel(item.sumType), /*#__PURE__*/React.createElement(DownOutlined, null)))), /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
290
|
+
}, showMenuLabel(item.sumType), /*#__PURE__*/React.createElement(DownOutlined, null)))), item.noDelete ? null : /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
218
291
|
style: {
|
|
219
292
|
marginLeft: 6
|
|
220
293
|
},
|
|
@@ -250,6 +323,19 @@ var Index = function Index(props, ref) {
|
|
|
250
323
|
var onChangeRadio = function onChangeRadio(e) {
|
|
251
324
|
setValueRadio(e.target.value);
|
|
252
325
|
};
|
|
326
|
+
var handleSumType = function handleSumType(key, code) {
|
|
327
|
+
if (key === "col") {
|
|
328
|
+
if (code === sumColPosition) {
|
|
329
|
+
setSumColPosition(null);
|
|
330
|
+
} else {
|
|
331
|
+
setSumColPosition(code);
|
|
332
|
+
}
|
|
333
|
+
} else {
|
|
334
|
+
setSumRow(function (flag) {
|
|
335
|
+
return !flag;
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
};
|
|
253
339
|
return /*#__PURE__*/React.createElement("div", {
|
|
254
340
|
className: "dnd_quota_main"
|
|
255
341
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -294,21 +380,66 @@ var Index = function Index(props, ref) {
|
|
|
294
380
|
className: "dnd-quota-spce"
|
|
295
381
|
}), /*#__PURE__*/React.createElement("div", {
|
|
296
382
|
className: "dnd_quota_right"
|
|
383
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
384
|
+
style: {
|
|
385
|
+
display: "flex",
|
|
386
|
+
justifyContent: "space-between",
|
|
387
|
+
alignItems: "center"
|
|
388
|
+
}
|
|
297
389
|
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
298
390
|
onChange: onChangeRadio,
|
|
299
391
|
value: valueRadio
|
|
300
392
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
301
393
|
value: "list"
|
|
302
|
-
},
|
|
394
|
+
}, initLang({
|
|
395
|
+
id: "prompt.template.list"
|
|
396
|
+
})), /*#__PURE__*/React.createElement(Radio, {
|
|
303
397
|
value: "cross"
|
|
304
|
-
},
|
|
398
|
+
}, initLang({
|
|
399
|
+
id: "prompt.template.cross"
|
|
400
|
+
}))), /*#__PURE__*/React.createElement(Popover, {
|
|
401
|
+
overlayClassName: "popover-sum-content",
|
|
402
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
403
|
+
className: "popover-sum-wrap"
|
|
404
|
+
}, sumEmnu.map(function (item) {
|
|
405
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
406
|
+
className: "popover-sum-list",
|
|
407
|
+
key: item.value
|
|
408
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
409
|
+
className: "popover-sum-title"
|
|
410
|
+
}, item.label), item.datas.map(function (d) {
|
|
411
|
+
return /*#__PURE__*/React.createElement("p", {
|
|
412
|
+
className: "popover-sum-li ".concat(sumColPosition === d.value || sumRow && d.value === "sumRow" ? "action" : ""),
|
|
413
|
+
key: d.value,
|
|
414
|
+
onClick: function onClick() {
|
|
415
|
+
handleSumType(item.value, d.value);
|
|
416
|
+
}
|
|
417
|
+
}, d.label);
|
|
418
|
+
}));
|
|
419
|
+
})),
|
|
420
|
+
trigger: "click",
|
|
421
|
+
placement: "bottom",
|
|
422
|
+
zIndex: 10000
|
|
423
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
424
|
+
title: initLang({
|
|
425
|
+
id: "list.column.summaryTitle"
|
|
426
|
+
})
|
|
427
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
428
|
+
type: "icon-huizong",
|
|
429
|
+
style: {
|
|
430
|
+
cursor: "pointer",
|
|
431
|
+
color: sumColPosition ? "#0273b0" : ""
|
|
432
|
+
}
|
|
433
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
305
434
|
className: "dnd_quota_block_top",
|
|
306
435
|
style: {
|
|
307
436
|
marginTop: 4
|
|
308
437
|
}
|
|
309
438
|
}, /*#__PURE__*/React.createElement("p", {
|
|
310
439
|
className: "dnd_quota_left-title"
|
|
311
|
-
},
|
|
440
|
+
}, initLang({
|
|
441
|
+
id: "page.dimension"
|
|
442
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
312
443
|
className: "dnd-quota-sortable-wrap dimension"
|
|
313
444
|
}, /*#__PURE__*/React.createElement(ReactSortable, {
|
|
314
445
|
tag: "div",
|
|
@@ -331,7 +462,9 @@ var Index = function Index(props, ref) {
|
|
|
331
462
|
className: "dnd_quota_block_bottom"
|
|
332
463
|
}, /*#__PURE__*/React.createElement("p", {
|
|
333
464
|
className: "dnd_quota_left-title"
|
|
334
|
-
},
|
|
465
|
+
}, initLang({
|
|
466
|
+
id: "brick.col"
|
|
467
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
335
468
|
className: "dnd-quota-sortable-wrap list"
|
|
336
469
|
}, /*#__PURE__*/React.createElement(ReactSortable, {
|
|
337
470
|
tag: "div",
|
|
@@ -354,7 +487,9 @@ var Index = function Index(props, ref) {
|
|
|
354
487
|
className: "dnd_quota_block_bottom"
|
|
355
488
|
}, /*#__PURE__*/React.createElement("p", {
|
|
356
489
|
className: "dnd_quota_left-title"
|
|
357
|
-
},
|
|
490
|
+
}, initLang({
|
|
491
|
+
id: "page.quota"
|
|
492
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
358
493
|
className: "dnd-quota-sortable-wrap quota"
|
|
359
494
|
}, /*#__PURE__*/React.createElement(ReactSortable, {
|
|
360
495
|
tag: "div",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAMA;;GAEG;
|
|
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;CACpC;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgKxC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -16,10 +16,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
|
|
17
17
|
import { PlusOutlined } from "@ant-design/icons";
|
|
18
18
|
import { Button, Popover, Tooltip } from "antd";
|
|
19
|
-
import { initLang } from "../utils/language";
|
|
20
19
|
import React, { useRef, useState } from "react";
|
|
21
20
|
import "../../style/components/SubtotalsModal.scss";
|
|
22
21
|
import ChooseModal from "../ChooseModal";
|
|
22
|
+
import { initLang } from "../utils/language";
|
|
23
23
|
import AddSubtotals from "./addSubtotals";
|
|
24
24
|
import SubtotalTemplate from "./subtotalTemplate";
|
|
25
25
|
import ViewSubtotals from "./viewSubtotals";
|
|
@@ -29,7 +29,8 @@ var Index = function Index(_ref) {
|
|
|
29
29
|
onOk = _ref.onOk,
|
|
30
30
|
menuCode = _ref.menuCode,
|
|
31
31
|
formTemplateCode = _ref.formTemplateCode,
|
|
32
|
-
commonRequest = _ref.commonRequest
|
|
32
|
+
commonRequest = _ref.commonRequest,
|
|
33
|
+
variablePara = _ref.variablePara;
|
|
33
34
|
var modalRef = useRef();
|
|
34
35
|
var addSubtotalsRef = useRef();
|
|
35
36
|
var _useState = useState({}),
|
|
@@ -48,6 +49,10 @@ var Index = function Index(_ref) {
|
|
|
48
49
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
49
50
|
jsons = _useState8[0],
|
|
50
51
|
setJsons = _useState8[1];
|
|
52
|
+
var _useState9 = useState(0),
|
|
53
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
54
|
+
updateTable = _useState10[0],
|
|
55
|
+
setUpdateTable = _useState10[1];
|
|
51
56
|
var handleAdd = function handleAdd() {
|
|
52
57
|
setInitConfig({});
|
|
53
58
|
setEditItem(null);
|
|
@@ -73,6 +78,9 @@ var Index = function Index(_ref) {
|
|
|
73
78
|
// 预览
|
|
74
79
|
var handleView = function handleView(str) {
|
|
75
80
|
setJsons(str);
|
|
81
|
+
setUpdateTable(function (num) {
|
|
82
|
+
return num + 1;
|
|
83
|
+
});
|
|
76
84
|
};
|
|
77
85
|
// 返回
|
|
78
86
|
var onCancel = function onCancel() {
|
|
@@ -88,6 +96,7 @@ var Index = function Index(_ref) {
|
|
|
88
96
|
var _addSubtotalsRef$curr, _addSubtotalsRef$curr2;
|
|
89
97
|
(_addSubtotalsRef$curr = addSubtotalsRef.current) === null || _addSubtotalsRef$curr === void 0 || (_addSubtotalsRef$curr2 = _addSubtotalsRef$curr.handleOk) === null || _addSubtotalsRef$curr2 === void 0 || _addSubtotalsRef$curr2.call(_addSubtotalsRef$curr);
|
|
90
98
|
};
|
|
99
|
+
var onReset = function onReset() {};
|
|
91
100
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popover, {
|
|
92
101
|
placement: "bottomRight",
|
|
93
102
|
trigger: "click",
|
|
@@ -146,6 +155,7 @@ var Index = function Index(_ref) {
|
|
|
146
155
|
initConfig: initConfig,
|
|
147
156
|
editItem: editItem,
|
|
148
157
|
handleView: handleView
|
|
158
|
+
// onReset={onReset}
|
|
149
159
|
})), /*#__PURE__*/React.createElement("div", {
|
|
150
160
|
className: "subtotals-modal-right"
|
|
151
161
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -169,10 +179,12 @@ var Index = function Index(_ref) {
|
|
|
169
179
|
}, initLang({
|
|
170
180
|
id: "button.save"
|
|
171
181
|
}))), /*#__PURE__*/React.createElement(ViewSubtotals, {
|
|
182
|
+
key: updateTable,
|
|
172
183
|
jsons: jsons,
|
|
173
184
|
columns: columns,
|
|
174
185
|
formTemplateCode: formTemplateCode,
|
|
175
|
-
menuCode: menuCode
|
|
186
|
+
menuCode: menuCode,
|
|
187
|
+
variablePara: variablePara
|
|
176
188
|
}))))), /*#__PURE__*/React.createElement(SubtotalTemplate, {
|
|
177
189
|
key: updateTemplate,
|
|
178
190
|
menuCode: menuCode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewSubtotals.d.ts","sourceRoot":"","sources":["viewSubtotals.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"viewSubtotals.d.ts","sourceRoot":"","sources":["viewSubtotals.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAO5D,OAAO,4CAA4C,CAAC;AAIpD,UAAU,MAAM;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA6L3B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -25,6 +25,7 @@ import React, { useEffect, useMemo, useState } from "react";
|
|
|
25
25
|
import { queryData } from "../utils/services/global";
|
|
26
26
|
// import { formatData } from '@/utils/utils';
|
|
27
27
|
import { find, get } from "lodash";
|
|
28
|
+
import "../../style/components/SubtotalsModal.scss";
|
|
28
29
|
import { formatData } from "../utils/utils";
|
|
29
30
|
import { getSummaryCol, loopColumns } from "./util";
|
|
30
31
|
var Index = function Index(props) {
|
|
@@ -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;
|
|
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;CACtB;AACD,UAAU,MAAO,SAAQ,QAAQ;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB;AA6+BD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAc3B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|