linkmore-design 1.0.3
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/LICENSE +21 -0
- package/README.md +81 -0
- package/dist/40b22ad7b4ea2a7e.jpg +0 -0
- package/dist/566891e3103ae07a.png +0 -0
- package/dist/9f788f660abc173c.png +0 -0
- package/dist/f8940d62d6a40f71.png +0 -0
- package/dist/index.umd.css +2167 -0
- package/dist/index.umd.js +69587 -0
- package/dist/index.umd.min.css +1 -0
- package/dist/index.umd.min.js +31 -0
- package/es/ButtonTags/ButtonTags.js +59 -0
- package/es/ButtonTags/index.js +13 -0
- package/es/ButtonTags/style/index.js +3 -0
- package/es/ButtonTags/style/style.css +221 -0
- package/es/CkFilter/baseFilter/filterMenu.js +177 -0
- package/es/CkFilter/baseFilter/index.js +91 -0
- package/es/CkFilter/baseFilter/moreFilters.js +198 -0
- package/es/CkFilter/complexFilter/drawer.js +337 -0
- package/es/CkFilter/complexFilter/index.js +69 -0
- package/es/CkFilter/components/filterTypes.js +530 -0
- package/es/CkFilter/components/modal.js +275 -0
- package/es/CkFilter/context.js +152 -0
- package/es/CkFilter/customFilter/drawer.js +364 -0
- package/es/CkFilter/customFilter/index.js +130 -0
- package/es/CkFilter/customFilter/radioGroup.js +65 -0
- package/es/CkFilter/filter.js +115 -0
- package/es/CkFilter/index.js +13 -0
- package/es/CkFilter/style/index.js +3 -0
- package/es/CkFilter/style/style.css +586 -0
- package/es/CkFilter/utils.js +65 -0
- package/es/CustomerService/assets/question01.png +0 -0
- package/es/CustomerService/assets/send.png +0 -0
- package/es/CustomerService/assets/service.png +0 -0
- package/es/CustomerService/assets/shuoming01.png +0 -0
- package/es/CustomerService/assets/shuoming02.png +0 -0
- package/es/CustomerService/components/question.js +120 -0
- package/es/CustomerService/index.js +291 -0
- package/es/CustomerService/style/index.js +3 -0
- package/es/CustomerService/style/style.css +402 -0
- package/es/EditTable/EditTable.js +489 -0
- package/es/EditTable/index.js +13 -0
- package/es/EditTable/style/index.js +3 -0
- package/es/EditTable/style/style.css +165 -0
- package/es/EnlargeImg/index.js +109 -0
- package/es/EnlargeImg/style/index.js +3 -0
- package/es/EnlargeImg/style/style.css +4 -0
- package/es/Filter/Popover.js +199 -0
- package/es/Filter/baseFilter/Popover.js +214 -0
- package/es/Filter/baseFilter/ToggleFilter.js +112 -0
- package/es/Filter/baseFilter/index.js +100 -0
- package/es/Filter/complex/ComplexFilter.js +149 -0
- package/es/Filter/complex/ComplexItem.js +157 -0
- package/es/Filter/components/Checkbox.js +94 -0
- package/es/Filter/components/Date.js +87 -0
- package/es/Filter/components/Input.js +63 -0
- package/es/Filter/components/Select.js +89 -0
- package/es/Filter/components/Tree.js +64 -0
- package/es/Filter/components/header.js +60 -0
- package/es/Filter/components/index.js +47 -0
- package/es/Filter/context.js +15 -0
- package/es/Filter/edit/editFilter.js +277 -0
- package/es/Filter/index.js +174 -0
- package/es/Filter/popContext.js +15 -0
- package/es/Filter/remember.js +137 -0
- package/es/Filter/style/index.js +3 -0
- package/es/Filter/style/style.css +420 -0
- package/es/Icon/index.js +20 -0
- package/es/Icon/style/index.js +1 -0
- package/es/Icon/style/style.css +0 -0
- package/es/IconFont/index.js +15 -0
- package/es/IconFont/style/index.js +1 -0
- package/es/IconFont/style/style.css +0 -0
- package/es/LeftTable/assets/imgTest.jpg +0 -0
- package/es/LeftTable/index.js +116 -0
- package/es/LeftTable/style/index.js +3 -0
- package/es/LeftTable/style/style.css +231 -0
- package/es/LoadingPage/index.js +33 -0
- package/es/LoadingPage/style/index.js +1 -0
- package/es/LoadingPage/style/style.css +0 -0
- package/es/Modal/add.js +68 -0
- package/es/Modal/confirm.js +88 -0
- package/es/Modal/edit.js +44 -0
- package/es/Modal/exportModal.js +300 -0
- package/es/Modal/index.js +24 -0
- package/es/Modal/style/index.js +3 -0
- package/es/Modal/style/style.css +119 -0
- package/es/PopTable/BseTable.js +113 -0
- package/es/PopTable/index.js +151 -0
- package/es/PopTable/style/index.js +3 -0
- package/es/PopTable/style/style.css +363 -0
- package/es/ProTable/ImgList/body.js +111 -0
- package/es/ProTable/ImgList/cardCell.js +179 -0
- package/es/ProTable/ImgList/context.js +12 -0
- package/es/ProTable/ImgList/empty.js +24 -0
- package/es/ProTable/ImgList/footer.js +59 -0
- package/es/ProTable/ImgList/imgCell.js +181 -0
- package/es/ProTable/ImgList/imgTable.js +110 -0
- package/es/ProTable/ImgList/index.js +13 -0
- package/es/ProTable/Table.js +321 -0
- package/es/ProTable/VList.js +594 -0
- package/es/ProTable/context.js +12 -0
- package/es/ProTable/index.js +16 -0
- package/es/ProTable/resetConfig.js +39 -0
- package/es/ProTable/style/index.js +3 -0
- package/es/ProTable/style/style.css +693 -0
- package/es/TableRender/index.js +15 -0
- package/es/TableRender/state.js +72 -0
- package/es/TableRender/style/index.js +3 -0
- package/es/TableRender/style/style.css +0 -0
- package/es/UploadOss/index.js +18 -0
- package/es/UploadOss/style/index.js +3 -0
- package/es/UploadOss/style/style.css +121 -0
- package/es/UploadOss/uploadBtn.js +141 -0
- package/es/UploadOss/uploadImg.js +282 -0
- package/es/VirtualList/index.js +84 -0
- package/es/VirtualList/style/index.js +3 -0
- package/es/VirtualList/style/style.css +0 -0
- package/es/index.js +135 -0
- package/es/services/newRequest.js +201 -0
- package/es/services/utils.js +72 -0
- package/es/styles/icon.css +15 -0
- package/es/styles/main.css +149 -0
- package/es/styles/resetAntd.css +62 -0
- package/es/styles/them.css +0 -0
- package/lib/ButtonTags/ButtonTags.js +59 -0
- package/lib/ButtonTags/index.js +13 -0
- package/lib/ButtonTags/style/index.js +3 -0
- package/lib/ButtonTags/style/style.css +221 -0
- package/lib/CkFilter/baseFilter/filterMenu.js +177 -0
- package/lib/CkFilter/baseFilter/index.js +91 -0
- package/lib/CkFilter/baseFilter/moreFilters.js +198 -0
- package/lib/CkFilter/complexFilter/drawer.js +337 -0
- package/lib/CkFilter/complexFilter/index.js +69 -0
- package/lib/CkFilter/components/filterTypes.js +530 -0
- package/lib/CkFilter/components/modal.js +275 -0
- package/lib/CkFilter/context.js +152 -0
- package/lib/CkFilter/customFilter/drawer.js +364 -0
- package/lib/CkFilter/customFilter/index.js +130 -0
- package/lib/CkFilter/customFilter/radioGroup.js +65 -0
- package/lib/CkFilter/filter.js +115 -0
- package/lib/CkFilter/index.js +13 -0
- package/lib/CkFilter/style/index.js +3 -0
- package/lib/CkFilter/style/style.css +586 -0
- package/lib/CkFilter/utils.js +65 -0
- package/lib/CustomerService/assets/question01.png +0 -0
- package/lib/CustomerService/assets/send.png +0 -0
- package/lib/CustomerService/assets/service.png +0 -0
- package/lib/CustomerService/assets/shuoming01.png +0 -0
- package/lib/CustomerService/assets/shuoming02.png +0 -0
- package/lib/CustomerService/components/question.js +120 -0
- package/lib/CustomerService/index.js +291 -0
- package/lib/CustomerService/style/index.js +3 -0
- package/lib/CustomerService/style/style.css +402 -0
- package/lib/EditTable/EditTable.js +489 -0
- package/lib/EditTable/index.js +13 -0
- package/lib/EditTable/style/index.js +3 -0
- package/lib/EditTable/style/style.css +165 -0
- package/lib/EnlargeImg/index.js +109 -0
- package/lib/EnlargeImg/style/index.js +3 -0
- package/lib/EnlargeImg/style/style.css +4 -0
- package/lib/Filter/Popover.js +199 -0
- package/lib/Filter/baseFilter/Popover.js +214 -0
- package/lib/Filter/baseFilter/ToggleFilter.js +112 -0
- package/lib/Filter/baseFilter/index.js +100 -0
- package/lib/Filter/complex/ComplexFilter.js +149 -0
- package/lib/Filter/complex/ComplexItem.js +157 -0
- package/lib/Filter/components/Checkbox.js +94 -0
- package/lib/Filter/components/Date.js +87 -0
- package/lib/Filter/components/Input.js +63 -0
- package/lib/Filter/components/Select.js +89 -0
- package/lib/Filter/components/Tree.js +64 -0
- package/lib/Filter/components/header.js +60 -0
- package/lib/Filter/components/index.js +47 -0
- package/lib/Filter/context.js +15 -0
- package/lib/Filter/edit/editFilter.js +277 -0
- package/lib/Filter/index.js +174 -0
- package/lib/Filter/popContext.js +15 -0
- package/lib/Filter/remember.js +137 -0
- package/lib/Filter/style/index.js +3 -0
- package/lib/Filter/style/style.css +420 -0
- package/lib/Icon/index.js +20 -0
- package/lib/Icon/style/index.js +1 -0
- package/lib/Icon/style/style.css +0 -0
- package/lib/IconFont/index.js +15 -0
- package/lib/IconFont/style/index.js +1 -0
- package/lib/IconFont/style/style.css +0 -0
- package/lib/LeftTable/assets/imgTest.jpg +0 -0
- package/lib/LeftTable/index.js +116 -0
- package/lib/LeftTable/style/index.js +3 -0
- package/lib/LeftTable/style/style.css +231 -0
- package/lib/LoadingPage/index.js +33 -0
- package/lib/LoadingPage/style/index.js +1 -0
- package/lib/LoadingPage/style/style.css +0 -0
- package/lib/Modal/add.js +68 -0
- package/lib/Modal/confirm.js +88 -0
- package/lib/Modal/edit.js +44 -0
- package/lib/Modal/exportModal.js +300 -0
- package/lib/Modal/index.js +24 -0
- package/lib/Modal/style/index.js +3 -0
- package/lib/Modal/style/style.css +119 -0
- package/lib/PopTable/BseTable.js +113 -0
- package/lib/PopTable/index.js +151 -0
- package/lib/PopTable/style/index.js +3 -0
- package/lib/PopTable/style/style.css +363 -0
- package/lib/ProTable/ImgList/body.js +111 -0
- package/lib/ProTable/ImgList/cardCell.js +179 -0
- package/lib/ProTable/ImgList/context.js +12 -0
- package/lib/ProTable/ImgList/empty.js +24 -0
- package/lib/ProTable/ImgList/footer.js +59 -0
- package/lib/ProTable/ImgList/imgCell.js +181 -0
- package/lib/ProTable/ImgList/imgTable.js +110 -0
- package/lib/ProTable/ImgList/index.js +13 -0
- package/lib/ProTable/Table.js +321 -0
- package/lib/ProTable/VList.js +594 -0
- package/lib/ProTable/context.js +12 -0
- package/lib/ProTable/index.js +16 -0
- package/lib/ProTable/resetConfig.js +39 -0
- package/lib/ProTable/style/index.js +3 -0
- package/lib/ProTable/style/style.css +693 -0
- package/lib/TableRender/index.js +15 -0
- package/lib/TableRender/state.js +72 -0
- package/lib/TableRender/style/index.js +3 -0
- package/lib/TableRender/style/style.css +0 -0
- package/lib/UploadOss/index.js +18 -0
- package/lib/UploadOss/style/index.js +3 -0
- package/lib/UploadOss/style/style.css +121 -0
- package/lib/UploadOss/uploadBtn.js +141 -0
- package/lib/UploadOss/uploadImg.js +282 -0
- package/lib/VirtualList/index.js +84 -0
- package/lib/VirtualList/style/index.js +3 -0
- package/lib/VirtualList/style/style.css +0 -0
- package/lib/index.js +135 -0
- package/lib/services/newRequest.js +201 -0
- package/lib/services/utils.js +72 -0
- package/lib/styles/icon.css +15 -0
- package/lib/styles/main.css +149 -0
- package/lib/styles/resetAntd.css +62 -0
- package/lib/styles/them.css +0 -0
- package/package.json +102 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _reactVirtual = require("react-virtual");
|
|
13
|
+
|
|
14
|
+
var VirList = function VirList(_ref) {
|
|
15
|
+
var _ref$options = _ref.options,
|
|
16
|
+
options = _ref$options === void 0 ? [] : _ref$options,
|
|
17
|
+
children = _ref.children,
|
|
18
|
+
_ref$size = _ref.size,
|
|
19
|
+
size = _ref$size === void 0 ? 32 : _ref$size,
|
|
20
|
+
parentRef = _ref.parentRef,
|
|
21
|
+
className = _ref.className,
|
|
22
|
+
_ref$maxHeight = _ref.maxHeight,
|
|
23
|
+
maxHeight = _ref$maxHeight === void 0 ? 224 : _ref$maxHeight;
|
|
24
|
+
var bodyRef = (0, _react.useRef)(null);
|
|
25
|
+
|
|
26
|
+
var _useVirtual = (0, _reactVirtual.useVirtual)({
|
|
27
|
+
size: options.length,
|
|
28
|
+
parentRef: parentRef || bodyRef,
|
|
29
|
+
estimateSize: _react.default.useCallback(function () {
|
|
30
|
+
return size;
|
|
31
|
+
}, [size]),
|
|
32
|
+
overscan: 2
|
|
33
|
+
}),
|
|
34
|
+
totalSize = _useVirtual.totalSize,
|
|
35
|
+
virtualItems = _useVirtual.virtualItems;
|
|
36
|
+
|
|
37
|
+
var virScrollStyles = (0, _react.useMemo)(function () {
|
|
38
|
+
return {
|
|
39
|
+
height: "".concat(totalSize, "px"),
|
|
40
|
+
width: '100%',
|
|
41
|
+
position: 'relative'
|
|
42
|
+
};
|
|
43
|
+
}, [totalSize]);
|
|
44
|
+
|
|
45
|
+
if ((options === null || options === void 0 ? void 0 : options.length) < 50) {
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
className: "virtual_list ".concat(className)
|
|
48
|
+
}, options === null || options === void 0 ? void 0 : options.map(function (item, i) {
|
|
49
|
+
return children({
|
|
50
|
+
key: i,
|
|
51
|
+
item: item
|
|
52
|
+
});
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
57
|
+
ref: bodyRef,
|
|
58
|
+
className: "virtual_list ".concat(className),
|
|
59
|
+
style: {
|
|
60
|
+
overflow: 'auto',
|
|
61
|
+
minWidth: 160,
|
|
62
|
+
maxHeight: maxHeight
|
|
63
|
+
}
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
+
style: virScrollStyles
|
|
66
|
+
}, virtualItems.map(function (virtualRow) {
|
|
67
|
+
var style = {
|
|
68
|
+
position: 'absolute',
|
|
69
|
+
top: 0,
|
|
70
|
+
left: 0,
|
|
71
|
+
minWidth: '100%',
|
|
72
|
+
height: "".concat(virtualRow.size, "px"),
|
|
73
|
+
transform: "translateY(".concat(virtualRow.start, "px)")
|
|
74
|
+
};
|
|
75
|
+
return children({
|
|
76
|
+
key: virtualRow.index,
|
|
77
|
+
item: options[virtualRow.index],
|
|
78
|
+
style: style
|
|
79
|
+
});
|
|
80
|
+
}))));
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
var _default = VirList;
|
|
84
|
+
exports.default = _default;
|
|
File without changes
|
package/es/index.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "ButtonTags", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _ButtonTags.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "CkFilter", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _CkFilter.default;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "CustomerService", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _CustomerService.default;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "EditTable", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _EditTable.default;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "EnlargeImg", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _EnlargeImg.default;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "Filter", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _Filter.default;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "Icon", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function get() {
|
|
47
|
+
return _Icon.default;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "IconFont", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _IconFont.default;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "LeftTable", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function get() {
|
|
59
|
+
return _LeftTable.default;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "LoadingPage", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function get() {
|
|
65
|
+
return _LoadingPage.default;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "Modal", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function get() {
|
|
71
|
+
return _Modal.default;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "PopTable", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function get() {
|
|
77
|
+
return _PopTable.default;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "ProTable", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function get() {
|
|
83
|
+
return _ProTable.default;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "TableRender", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function get() {
|
|
89
|
+
return _TableRender.default;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "UploadOss", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function get() {
|
|
95
|
+
return _UploadOss.default;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "VirtualList", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function get() {
|
|
101
|
+
return _VirtualList.default;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
var _EditTable = _interopRequireDefault(require("./EditTable"));
|
|
106
|
+
|
|
107
|
+
var _ButtonTags = _interopRequireDefault(require("./ButtonTags"));
|
|
108
|
+
|
|
109
|
+
var _CustomerService = _interopRequireDefault(require("./CustomerService"));
|
|
110
|
+
|
|
111
|
+
var _EnlargeImg = _interopRequireDefault(require("./EnlargeImg"));
|
|
112
|
+
|
|
113
|
+
var _Filter = _interopRequireDefault(require("./Filter"));
|
|
114
|
+
|
|
115
|
+
var _CkFilter = _interopRequireDefault(require("./CkFilter"));
|
|
116
|
+
|
|
117
|
+
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
118
|
+
|
|
119
|
+
var _LeftTable = _interopRequireDefault(require("./LeftTable"));
|
|
120
|
+
|
|
121
|
+
var _LoadingPage = _interopRequireDefault(require("./LoadingPage"));
|
|
122
|
+
|
|
123
|
+
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
124
|
+
|
|
125
|
+
var _PopTable = _interopRequireDefault(require("./PopTable"));
|
|
126
|
+
|
|
127
|
+
var _ProTable = _interopRequireDefault(require("./ProTable"));
|
|
128
|
+
|
|
129
|
+
var _TableRender = _interopRequireDefault(require("./TableRender"));
|
|
130
|
+
|
|
131
|
+
var _UploadOss = _interopRequireDefault(require("./UploadOss"));
|
|
132
|
+
|
|
133
|
+
var _IconFont = _interopRequireDefault(require("./IconFont"));
|
|
134
|
+
|
|
135
|
+
var _VirtualList = _interopRequireDefault(require("./VirtualList"));
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
13
|
+
|
|
14
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
15
|
+
|
|
16
|
+
require("antd/es/message/style");
|
|
17
|
+
|
|
18
|
+
var _message2 = _interopRequireDefault(require("antd/es/message"));
|
|
19
|
+
|
|
20
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
21
|
+
|
|
22
|
+
var _qs = _interopRequireDefault(require("qs"));
|
|
23
|
+
|
|
24
|
+
var _reactCookies = _interopRequireDefault(require("react-cookies"));
|
|
25
|
+
|
|
26
|
+
var _utils = require("./utils");
|
|
27
|
+
|
|
28
|
+
var _cookie$load;
|
|
29
|
+
|
|
30
|
+
// 附近处理函数
|
|
31
|
+
// cookie.save('UFXSCM_TokenId', 'Sfbw1SY/Rb2YNEGnoYlB7jiKG6mSznuGUXY5B6GNkHoHmU0IcH/d/A==');
|
|
32
|
+
// cookie.save('saas_gpid', '41mzTRAtm/XBGt2X4wrn+67+XGXNr10r6CJAsvv2iEHPwRa4hOXzCw==');
|
|
33
|
+
var inError = false; // 创建axios实例
|
|
34
|
+
|
|
35
|
+
var instance = _axios.default.create({
|
|
36
|
+
baseURL: process.env.BASE_API,
|
|
37
|
+
timeout: 15000,
|
|
38
|
+
// 请求超时时间
|
|
39
|
+
// `transformRequest` 允许在向服务器发送前,修改请求数据
|
|
40
|
+
transformRequest: [function (data) {
|
|
41
|
+
// 对 data 进行任意转换处理
|
|
42
|
+
return data;
|
|
43
|
+
}],
|
|
44
|
+
// `transformResponse` 在传递给 then/catch 前,允许修改响应数据
|
|
45
|
+
transformResponse: [function (data) {
|
|
46
|
+
// console.log(data);
|
|
47
|
+
// 对 data 进行任意转换处理
|
|
48
|
+
if (data && (data.type === 'application/octet-stream' || data.type === 'application/json')) {
|
|
49
|
+
return data;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return JSON.parse(data);
|
|
53
|
+
}],
|
|
54
|
+
headers: {
|
|
55
|
+
'Cache-Control': 'no-cache',
|
|
56
|
+
Authorization: (_reactCookies.default === null || _reactCookies.default === void 0 ? void 0 : _reactCookies.default.load('UFXSCM_TokenId')) ? "Basic ".concat(_reactCookies.default.load('UFXSCM_TokenId')) : '',
|
|
57
|
+
TenantId: _reactCookies.default === null || _reactCookies.default === void 0 ? void 0 : _reactCookies.default.load('saas_gpid'),
|
|
58
|
+
SystemId: (_cookie$load = _reactCookies.default === null || _reactCookies.default === void 0 ? void 0 : _reactCookies.default.load('saas_sysid')) !== null && _cookie$load !== void 0 ? _cookie$load : ''
|
|
59
|
+
}
|
|
60
|
+
}); // 实例添加请求拦截器
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
instance.interceptors.request.use(function (config) {
|
|
64
|
+
// 在发送请求之前做处理...
|
|
65
|
+
config.headers = Object.assign(config.method === 'get' ? (config.data = true, {
|
|
66
|
+
Accept: 'application/json',
|
|
67
|
+
'Content-Type': 'application/json; charset=UTF-8'
|
|
68
|
+
}) : config.data ? '' : config.data = true, {
|
|
69
|
+
'Content-Type': 'application/json; charset=UTF-8' // 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
|
70
|
+
|
|
71
|
+
}, config.headers); // config.headers.token = sessionStorage.getItem(`${projectPrefix}_token_`);
|
|
72
|
+
|
|
73
|
+
if (!config.headers.Authorization) {
|
|
74
|
+
delete config.headers.Authorization;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!config.headers.TenantId) {
|
|
78
|
+
delete config.headers.TenantId;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (['post', 'put'].includes(config.method)) {
|
|
82
|
+
var contentType = config.headers['Content-Type']; // 根据Content-Type转换data格式
|
|
83
|
+
|
|
84
|
+
if (contentType) {
|
|
85
|
+
if (contentType.includes('multipart')) {// 类型 'multipart/form-data;'
|
|
86
|
+
// config.data = data;
|
|
87
|
+
} else if (contentType.includes('json')) {
|
|
88
|
+
// 类型 'application/json;'
|
|
89
|
+
// 服务器收到的raw body(原始数据) "{name:"nowThen",age:"18"}"(普通字符串)
|
|
90
|
+
config.data = JSON.stringify(config.data);
|
|
91
|
+
} else {
|
|
92
|
+
// 类型 'application/x-www-form-urlencoded;'
|
|
93
|
+
// 服务器收到的raw body(原始数据) name=nowThen&age=18
|
|
94
|
+
config.data = _qs.default.stringify(config.data);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return Promise.resolve(config);
|
|
100
|
+
}, function (error) {
|
|
101
|
+
return (// 对请求错误做处理...
|
|
102
|
+
Promise.reject(error)
|
|
103
|
+
);
|
|
104
|
+
}); // 实例添加响应拦截器
|
|
105
|
+
|
|
106
|
+
instance.interceptors.response.use(function (response) {
|
|
107
|
+
// 对响应数据做处理,以下根据实际数据结构改动!!...
|
|
108
|
+
var _ref = response.data || {},
|
|
109
|
+
code = _ref.code;
|
|
110
|
+
|
|
111
|
+
if (code === 109 || code === 108) {
|
|
112
|
+
// 请求超时,跳转登录页
|
|
113
|
+
if (!inError) {
|
|
114
|
+
_message2.default.warning('登录超时,即将跳转到登录页面...');
|
|
115
|
+
|
|
116
|
+
inError = true;
|
|
117
|
+
setTimeout(function () {
|
|
118
|
+
_message2.default.destroy();
|
|
119
|
+
|
|
120
|
+
window.location.href = '/login';
|
|
121
|
+
inError = false;
|
|
122
|
+
}, 2000);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return Promise.resolve({});
|
|
126
|
+
} else if (response) {
|
|
127
|
+
return Promise.resolve((0, _utils.checkStatus)(response));
|
|
128
|
+
}
|
|
129
|
+
}, function (error) {
|
|
130
|
+
// 对响应错误做处理...
|
|
131
|
+
// console.log(error);
|
|
132
|
+
if (error.response) {
|
|
133
|
+
return Promise.reject((0, _utils.checkStatus)(error.response));
|
|
134
|
+
} else if (error.code === 'ECONNABORTED' && error.message.indexOf('timeout') !== -1) {
|
|
135
|
+
return Promise.reject({
|
|
136
|
+
msg: '请求超时'
|
|
137
|
+
});
|
|
138
|
+
} else {
|
|
139
|
+
return Promise.reject({});
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
var request = /*#__PURE__*/function () {
|
|
144
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(opt) {
|
|
145
|
+
var options, res;
|
|
146
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
147
|
+
while (1) {
|
|
148
|
+
switch (_context.prev = _context.next) {
|
|
149
|
+
case 0:
|
|
150
|
+
options = (0, _objectSpread2.default)({
|
|
151
|
+
method: 'get',
|
|
152
|
+
ifHandleError: true
|
|
153
|
+
}, opt); // 匹配接口前缀 开发环境则通过proxy配置转发请求; 生产环境根据实际配置
|
|
154
|
+
// options.baseURL = autoMatch(options.prefix);
|
|
155
|
+
|
|
156
|
+
_context.prev = 1;
|
|
157
|
+
_context.next = 4;
|
|
158
|
+
return instance(options);
|
|
159
|
+
|
|
160
|
+
case 4:
|
|
161
|
+
res = _context.sent;
|
|
162
|
+
|
|
163
|
+
if (!(res.code !== 200 && options.ifHandleError)) {
|
|
164
|
+
_context.next = 8;
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// 自定义参数,是否允许全局提示错误信息
|
|
169
|
+
_message2.default.error(res.message || '请求处理失败!');
|
|
170
|
+
|
|
171
|
+
return _context.abrupt("return", Promise.reject(options));
|
|
172
|
+
|
|
173
|
+
case 8:
|
|
174
|
+
return _context.abrupt("return", res);
|
|
175
|
+
|
|
176
|
+
case 11:
|
|
177
|
+
_context.prev = 11;
|
|
178
|
+
_context.t0 = _context["catch"](1);
|
|
179
|
+
|
|
180
|
+
if (options.ifHandleError) {
|
|
181
|
+
// 自定义参数,是否允许全局提示错误信息
|
|
182
|
+
_message2.default.error(_context.t0.message || _context.t0.msg || '请求处理失败!');
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return _context.abrupt("return", Promise.reject(options));
|
|
186
|
+
|
|
187
|
+
case 15:
|
|
188
|
+
case "end":
|
|
189
|
+
return _context.stop();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}, _callee, null, [[1, 11]]);
|
|
193
|
+
}));
|
|
194
|
+
|
|
195
|
+
return function request(_x) {
|
|
196
|
+
return _ref2.apply(this, arguments);
|
|
197
|
+
};
|
|
198
|
+
}();
|
|
199
|
+
|
|
200
|
+
var _default = request;
|
|
201
|
+
exports.default = _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.checkStatus = checkStatus;
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
9
|
+
function checkStatus(response) {
|
|
10
|
+
var status = response.status || -1000; // -1000 自己定义,连接错误的status
|
|
11
|
+
|
|
12
|
+
if (status >= 200 && status < 300 || status === 304) {
|
|
13
|
+
// 如果http状态码正常,则直接返回数据
|
|
14
|
+
return response.data;
|
|
15
|
+
} else {
|
|
16
|
+
var errorInfo = '';
|
|
17
|
+
|
|
18
|
+
switch (status) {
|
|
19
|
+
case -1:
|
|
20
|
+
errorInfo = '远程服务响应失败,请稍后重试';
|
|
21
|
+
break;
|
|
22
|
+
|
|
23
|
+
case 400:
|
|
24
|
+
errorInfo = '400:错误请求';
|
|
25
|
+
break;
|
|
26
|
+
|
|
27
|
+
case 401:
|
|
28
|
+
errorInfo = '401:访问令牌无效或已过期';
|
|
29
|
+
break;
|
|
30
|
+
|
|
31
|
+
case 403:
|
|
32
|
+
errorInfo = '403:拒绝访问';
|
|
33
|
+
break;
|
|
34
|
+
|
|
35
|
+
case 404:
|
|
36
|
+
errorInfo = '404:资源不存在';
|
|
37
|
+
break;
|
|
38
|
+
|
|
39
|
+
case 405:
|
|
40
|
+
errorInfo = '405:请求方法未允许';
|
|
41
|
+
break;
|
|
42
|
+
|
|
43
|
+
case 408:
|
|
44
|
+
errorInfo = '408:请求超时';
|
|
45
|
+
break;
|
|
46
|
+
|
|
47
|
+
case 500:
|
|
48
|
+
errorInfo = '500:访问服务失败';
|
|
49
|
+
break;
|
|
50
|
+
|
|
51
|
+
case 501:
|
|
52
|
+
errorInfo = '501:未实现';
|
|
53
|
+
break;
|
|
54
|
+
|
|
55
|
+
case 502:
|
|
56
|
+
errorInfo = '502:无效网关';
|
|
57
|
+
break;
|
|
58
|
+
|
|
59
|
+
case 503:
|
|
60
|
+
errorInfo = '503:服务不可用';
|
|
61
|
+
break;
|
|
62
|
+
|
|
63
|
+
default:
|
|
64
|
+
errorInfo = "\u8FDE\u63A5\u9519\u8BEF";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
status: status,
|
|
69
|
+
msg: errorInfo
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'iconfont';
|
|
3
|
+
/* Project id 2966019 */
|
|
4
|
+
src: url('//at.alicdn.com/t/font_2966019_i3eb1wwkoo.woff2?t=1641546077924') format('woff2'), url('//at.alicdn.com/t/font_2966019_i3eb1wwkoo.woff?t=1641546077924') format('woff'), url('//at.alicdn.com/t/font_2966019_i3eb1wwkoo.ttf?t=1641546077924') format('truetype');
|
|
5
|
+
}
|
|
6
|
+
.icon_ {
|
|
7
|
+
font-family: 'iconfont';
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
}
|
|
10
|
+
.iconfont {
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
}
|
|
13
|
+
.icon_home::before {
|
|
14
|
+
content: '\e7fc';
|
|
15
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
.ant-layout-sider {
|
|
2
|
+
min-height: 100vh;
|
|
3
|
+
background-color: #022766;
|
|
4
|
+
}
|
|
5
|
+
.ant-menu-dark .ant-menu-inline.ant-menu-sub {
|
|
6
|
+
box-shadow: none;
|
|
7
|
+
}
|
|
8
|
+
.ant-menu-submenu-placement-rightTop {
|
|
9
|
+
display: none;
|
|
10
|
+
}
|
|
11
|
+
.ant-table .row-active .ant-table-cell {
|
|
12
|
+
background-color: #FEFFD3 !important;
|
|
13
|
+
}
|
|
14
|
+
.ant-dropdown-menu-item {
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
height: 32px;
|
|
17
|
+
}
|
|
18
|
+
.ant-tabs .ant-tabs-nav .ant-tabs-tab {
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
}
|
|
21
|
+
.ant-tabs.auto_tabs {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-flow: column;
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
26
|
+
.ant-tabs.auto_tabs .ant-tabs-nav {
|
|
27
|
+
height: 48px;
|
|
28
|
+
}
|
|
29
|
+
.ant-tabs.auto_tabs .ant-tabs-content-holder {
|
|
30
|
+
flex: 1;
|
|
31
|
+
overflow: auto;
|
|
32
|
+
}
|
|
33
|
+
.ant-drawer.drawer_wrapper .ant-drawer-header {
|
|
34
|
+
padding: 0 24px;
|
|
35
|
+
}
|
|
36
|
+
.ant-drawer.drawer_wrapper .ant-drawer-body {
|
|
37
|
+
position: relative;
|
|
38
|
+
flex: 1;
|
|
39
|
+
padding: 0 24px;
|
|
40
|
+
}
|
|
41
|
+
.ant-modal-wrap.plugin_modal {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-flow: column;
|
|
44
|
+
justify-content: flex-end;
|
|
45
|
+
}
|
|
46
|
+
.ant-modal-wrap.plugin_modal .ant-modal {
|
|
47
|
+
left: 56px;
|
|
48
|
+
top: 0;
|
|
49
|
+
margin: 0 0 8px 8px;
|
|
50
|
+
padding: 0;
|
|
51
|
+
}
|
|
52
|
+
.ant-modal-wrap.lm_modal_confirm .anticon {
|
|
53
|
+
margin-top: -1px;
|
|
54
|
+
margin-right: 8px;
|
|
55
|
+
}
|
|
56
|
+
.ant-modal-wrap.lm_modal_confirm .ant-modal-body {
|
|
57
|
+
padding: 16px 24px;
|
|
58
|
+
}
|
|
59
|
+
.ant-popover.pop_img .ant-popover-inner-content {
|
|
60
|
+
line-height: 1;
|
|
61
|
+
padding: var(--gap);
|
|
62
|
+
}
|
|
63
|
+
@font-face {
|
|
64
|
+
font-family: 'iconfont';
|
|
65
|
+
/* Project id 2966019 */
|
|
66
|
+
src: url('//at.alicdn.com/t/font_2966019_i3eb1wwkoo.woff2?t=1641546077924') format('woff2'), url('//at.alicdn.com/t/font_2966019_i3eb1wwkoo.woff?t=1641546077924') format('woff'), url('//at.alicdn.com/t/font_2966019_i3eb1wwkoo.ttf?t=1641546077924') format('truetype');
|
|
67
|
+
}
|
|
68
|
+
.icon_ {
|
|
69
|
+
font-family: 'iconfont';
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
}
|
|
72
|
+
.iconfont {
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
}
|
|
75
|
+
.icon_home::before {
|
|
76
|
+
content: '\e7fc';
|
|
77
|
+
}
|
|
78
|
+
:root {
|
|
79
|
+
--them-color: #1890fc;
|
|
80
|
+
--main-color: #1890fc;
|
|
81
|
+
--primary-color: #1890fc;
|
|
82
|
+
--primary2-color: rgba(24, 144, 252, 0.08);
|
|
83
|
+
--success-color: #56C22D;
|
|
84
|
+
--warning-color: #FD9727;
|
|
85
|
+
--error-color: #FA4F53;
|
|
86
|
+
--aside-bg-color: #022766;
|
|
87
|
+
--font-color: rgba(0, 0, 0, 0.85);
|
|
88
|
+
--font2-color: rgba(0, 0, 0, 0.65);
|
|
89
|
+
--text-color: rgba(0, 0, 0, 0.45);
|
|
90
|
+
--box-shadow-color: rgba(0, 0, 0, 0.15);
|
|
91
|
+
--background-color: rgba(0, 0, 0, 0.04);
|
|
92
|
+
--background-color-hover: rgba(0, 0, 0, 0.08);
|
|
93
|
+
--border-color: #f0f0f0;
|
|
94
|
+
--stripe-color: #f5f5f5;
|
|
95
|
+
--border-hover-color: #f2f5f7;
|
|
96
|
+
--gap: 8px;
|
|
97
|
+
--basic-height: 24px;
|
|
98
|
+
}
|
|
99
|
+
.ant-input,
|
|
100
|
+
.ant-select {
|
|
101
|
+
font-size: 12px;
|
|
102
|
+
}
|
|
103
|
+
.ant-select-dropdown .ant-select-item {
|
|
104
|
+
font-size: 12px;
|
|
105
|
+
align-items: center;
|
|
106
|
+
}
|
|
107
|
+
.react-resizable {
|
|
108
|
+
position: relative;
|
|
109
|
+
background-clip: padding-box;
|
|
110
|
+
}
|
|
111
|
+
.react-resizable-handle {
|
|
112
|
+
position: absolute;
|
|
113
|
+
right: 0;
|
|
114
|
+
top: 0;
|
|
115
|
+
z-index: 1;
|
|
116
|
+
width: 3px;
|
|
117
|
+
height: 40px;
|
|
118
|
+
cursor: col-resize;
|
|
119
|
+
}
|
|
120
|
+
.react-resizable-handle:hover {
|
|
121
|
+
background-color: var(--primary-color);
|
|
122
|
+
}
|
|
123
|
+
.react-resizable-handle:active {
|
|
124
|
+
background-color: var(--primary-color);
|
|
125
|
+
}
|
|
126
|
+
.yf_resizable_bar {
|
|
127
|
+
position: absolute;
|
|
128
|
+
left: 0;
|
|
129
|
+
top: 0;
|
|
130
|
+
z-index: 2;
|
|
131
|
+
height: 0;
|
|
132
|
+
}
|
|
133
|
+
.resizable_line {
|
|
134
|
+
position: absolute;
|
|
135
|
+
left: 0;
|
|
136
|
+
top: 0;
|
|
137
|
+
height: 100%;
|
|
138
|
+
width: 1px;
|
|
139
|
+
background-color: var(--primary-color);
|
|
140
|
+
z-index: 1;
|
|
141
|
+
}
|
|
142
|
+
.handle_resizable {
|
|
143
|
+
position: absolute;
|
|
144
|
+
right: 0;
|
|
145
|
+
top: 0;
|
|
146
|
+
height: 100%;
|
|
147
|
+
width: 5px;
|
|
148
|
+
z-index: 2;
|
|
149
|
+
}
|