ls-pro-common 1.0.42 → 1.0.45
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/common.css +59 -0
- package/dist/common.js +1 -1
- package/dist/common.min.css +59 -0
- package/dist/common.min.js +1 -1
- package/es/components/AreaCascader.d.ts +4 -0
- package/es/components/AreaCascader.js +89 -0
- package/es/components/InputMultiLine.js +1 -2
- package/es/components/InputTable.js +2 -5
- package/es/components/common.less +61 -2
- package/es/hooks/useDtl/index.js +2 -2
- package/es/hooks/useSingle/index.js +2 -2
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/lib/components/AreaCascader.d.ts +4 -0
- package/lib/components/AreaCascader.js +111 -0
- package/lib/components/InputMultiLine.js +1 -2
- package/lib/components/InputTable.js +2 -5
- package/lib/components/common.less +61 -2
- package/lib/hooks/useDtl/index.js +1 -1
- package/lib/hooks/useSingle/index.js +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +8 -0
- package/package.json +2 -2
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import "antd/es/cascader/style";
|
|
2
|
+
import _Cascader from "antd/es/cascader";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
6
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
|
+
import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
8
|
+
import { httpGet } from '../http';
|
|
9
|
+
import { getCache, setCache, treeEach } from '../utils';
|
|
10
|
+
var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
11
|
+
var _useState = useState([]),
|
|
12
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13
|
+
options = _useState2[0],
|
|
14
|
+
setOptions = _useState2[1];
|
|
15
|
+
|
|
16
|
+
var areaRef = useRef();
|
|
17
|
+
useImperativeHandle(ref, function () {
|
|
18
|
+
return areaRef.current;
|
|
19
|
+
});
|
|
20
|
+
useEffect(function () {
|
|
21
|
+
initOptions();
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
var initOptions = /*#__PURE__*/function () {
|
|
25
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
26
|
+
var cacheItems, api, result, opts;
|
|
27
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
28
|
+
while (1) {
|
|
29
|
+
switch (_context.prev = _context.next) {
|
|
30
|
+
case 0:
|
|
31
|
+
cacheItems = getCache("areaOptions", true);
|
|
32
|
+
|
|
33
|
+
if (!(cacheItems && Array.isArray(cacheItems))) {
|
|
34
|
+
_context.next = 4;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
setOptions(cacheItems);
|
|
39
|
+
return _context.abrupt("return");
|
|
40
|
+
|
|
41
|
+
case 4:
|
|
42
|
+
api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
|
|
43
|
+
_context.next = 7;
|
|
44
|
+
return httpGet(api, {}, false);
|
|
45
|
+
|
|
46
|
+
case 7:
|
|
47
|
+
result = _context.sent;
|
|
48
|
+
opts = result.rows || [];
|
|
49
|
+
treeEach(opts, function (item) {
|
|
50
|
+
item.label = item.name;
|
|
51
|
+
item.value = item.id;
|
|
52
|
+
|
|
53
|
+
if (item.level === 'district') {
|
|
54
|
+
delete item.children;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
delete item.name;
|
|
58
|
+
delete item.id;
|
|
59
|
+
delete item.level;
|
|
60
|
+
delete item.parentId;
|
|
61
|
+
});
|
|
62
|
+
setCache('areaOptions', opts, true);
|
|
63
|
+
setOptions(opts);
|
|
64
|
+
|
|
65
|
+
case 12:
|
|
66
|
+
case "end":
|
|
67
|
+
return _context.stop();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, _callee);
|
|
71
|
+
}));
|
|
72
|
+
|
|
73
|
+
return function initOptions() {
|
|
74
|
+
return _ref.apply(this, arguments);
|
|
75
|
+
};
|
|
76
|
+
}();
|
|
77
|
+
|
|
78
|
+
return /*#__PURE__*/React.createElement(_Cascader, _extends({
|
|
79
|
+
options: options,
|
|
80
|
+
style: {
|
|
81
|
+
width: '100%'
|
|
82
|
+
},
|
|
83
|
+
changeOnSelect: true,
|
|
84
|
+
placeholder: "\u8BF7\u9009\u62E9"
|
|
85
|
+
}, props, {
|
|
86
|
+
ref: areaRef
|
|
87
|
+
}));
|
|
88
|
+
});
|
|
89
|
+
export default AreaCascader;
|
|
@@ -111,11 +111,10 @@ var InputMultiLine = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
111
111
|
}
|
|
112
112
|
})),
|
|
113
113
|
trigger: "click",
|
|
114
|
-
visible: visible,
|
|
114
|
+
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
115
115
|
onVisibleChange: setVisible
|
|
116
116
|
}, /*#__PURE__*/React.createElement(UnorderedListOutlined, {
|
|
117
117
|
onClick: function onClick(e) {
|
|
118
|
-
if (rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled)) return;
|
|
119
118
|
setVisible(true);
|
|
120
119
|
}
|
|
121
120
|
}));
|
|
@@ -345,13 +345,11 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
345
345
|
}
|
|
346
346
|
}, tableDom),
|
|
347
347
|
trigger: "click",
|
|
348
|
-
visible: visible,
|
|
348
|
+
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
349
349
|
onVisibleChange: setVisible
|
|
350
350
|
}, /*#__PURE__*/React.createElement(MoreOutlined, {
|
|
351
351
|
onClick: function onClick(e) {
|
|
352
|
-
if (rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled)) return;
|
|
353
352
|
setVisible(true);
|
|
354
|
-
e.stopPropagation && e.stopPropagation();
|
|
355
353
|
}
|
|
356
354
|
})),
|
|
357
355
|
onClick: function onClick() {
|
|
@@ -384,11 +382,10 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
384
382
|
}
|
|
385
383
|
}, tableDom),
|
|
386
384
|
trigger: "click",
|
|
387
|
-
visible: visible,
|
|
385
|
+
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
388
386
|
onVisibleChange: setVisible
|
|
389
387
|
}, /*#__PURE__*/React.createElement(MoreOutlined, {
|
|
390
388
|
onClick: function onClick(e) {
|
|
391
|
-
if (rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled)) return;
|
|
392
389
|
setVisible(true);
|
|
393
390
|
}
|
|
394
391
|
})),
|
|
@@ -1,3 +1,46 @@
|
|
|
1
|
+
body {
|
|
2
|
+
--ant-primary-color: #4997E6;
|
|
3
|
+
--ant-primary-color-hover: #74b7f2;
|
|
4
|
+
--ant-primary-color-active: #3475bf;
|
|
5
|
+
--ant-primary-color-outline: rgba(73, 151, 230, 0.2);
|
|
6
|
+
--ant-primary-1: #f0faff;
|
|
7
|
+
--ant-primary-2: #f0f9ff;
|
|
8
|
+
--ant-primary-3: #ccebff;
|
|
9
|
+
--ant-primary-4: #a3d7ff;
|
|
10
|
+
--ant-primary-5: #74b7f2;
|
|
11
|
+
--ant-primary-6: #4997E6;
|
|
12
|
+
--ant-primary-7: #3475bf;
|
|
13
|
+
--ant-primary-color-deprecated-pure: #e6f1fc;
|
|
14
|
+
--ant-primary-color-deprecated-l-35: #e6f1fc;
|
|
15
|
+
--ant-primary-color-deprecated-l-20: #a3caf2;
|
|
16
|
+
--ant-primary-color-deprecated-t-20: #6daceb;
|
|
17
|
+
--ant-primary-color-deprecated-t-50: #a4cbf3;
|
|
18
|
+
--ant-primary-color-deprecated-f-12: rgba(73, 151, 230, 0.12);
|
|
19
|
+
--ant-primary-color-active-deprecated-f-30: rgba(240, 250, 255, 0.3);
|
|
20
|
+
--ant-primary-color-active-deprecated-d-02: #e6f7ff;
|
|
21
|
+
--ant-success-color: #52c41a;
|
|
22
|
+
--ant-success-color-hover: #73d13d;
|
|
23
|
+
--ant-success-color-active: #389e0d;
|
|
24
|
+
--ant-success-color-outline: rgba(82, 196, 26, 0.2);
|
|
25
|
+
--ant-success-color-deprecated-bg: #f6ffed;
|
|
26
|
+
--ant-success-color-deprecated-border: #b7eb8f;
|
|
27
|
+
--ant-error-color: #ff4d4f;
|
|
28
|
+
--ant-error-color-hover: #ff7875;
|
|
29
|
+
--ant-error-color-active: #d9363e;
|
|
30
|
+
--ant-error-color-outline: rgba(255, 77, 79, 0.2);
|
|
31
|
+
--ant-error-color-deprecated-bg: #fff2f0;
|
|
32
|
+
--ant-error-color-deprecated-border: #ffccc7;
|
|
33
|
+
--ant-warning-color: #faad14;
|
|
34
|
+
--ant-warning-color-hover: #ffc53d;
|
|
35
|
+
--ant-warning-color-active: #d48806;
|
|
36
|
+
--ant-warning-color-outline: rgba(250, 173, 20, 0.2);
|
|
37
|
+
--ant-warning-color-deprecated-bg: #fffbe6;
|
|
38
|
+
--ant-warning-color-deprecated-border: #ffe58f;
|
|
39
|
+
--ant-info-color: #4997E6;
|
|
40
|
+
--ant-info-color-deprecated-bg: #f0faff;
|
|
41
|
+
--ant-info-color-deprecated-border: #ccebff;
|
|
42
|
+
}
|
|
43
|
+
|
|
1
44
|
.dtl-layout {
|
|
2
45
|
position : absolute;
|
|
3
46
|
top : 0;
|
|
@@ -7,6 +50,7 @@
|
|
|
7
50
|
background : white;
|
|
8
51
|
display : flex;
|
|
9
52
|
flex-direction: column;
|
|
53
|
+
z-index : 50;
|
|
10
54
|
|
|
11
55
|
.dtl-header {
|
|
12
56
|
display : flex;
|
|
@@ -67,7 +111,7 @@
|
|
|
67
111
|
width : 100%;
|
|
68
112
|
height : 100%;
|
|
69
113
|
text-align : center;
|
|
70
|
-
padding-top : 10%;
|
|
114
|
+
padding-top : 10%;
|
|
71
115
|
font-size : 15px;
|
|
72
116
|
font-weight : 600;
|
|
73
117
|
color : gray;
|
|
@@ -85,4 +129,19 @@
|
|
|
85
129
|
text-align : center;
|
|
86
130
|
padding-top: 20%;
|
|
87
131
|
background : #fff;
|
|
88
|
-
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ant-btn {
|
|
135
|
+
border-radius: 4px;
|
|
136
|
+
border-color : var(--ant-primary-color);
|
|
137
|
+
color : var(--ant-primary-color);
|
|
138
|
+
|
|
139
|
+
&:active {
|
|
140
|
+
border-color: var(--ant-primary-color-hover);
|
|
141
|
+
color : var(--ant-primary-color-hover);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ant-btn-primary {
|
|
146
|
+
color: #fff;
|
|
147
|
+
}
|
package/es/hooks/useDtl/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
8
8
|
var _excluded = ["current", "pageSize"];
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { useState, useRef, useCallback, useMemo } from 'react';
|
|
11
|
-
import {
|
|
11
|
+
import { PlusCircleOutlined, EditOutlined, DeleteOutlined, ImportOutlined, ExportOutlined } from '@ant-design/icons';
|
|
12
12
|
import { showConfirm, showWarn, showError, showSuccess } from '../../utils';
|
|
13
13
|
import { httpPost } from '../../http';
|
|
14
14
|
|
|
@@ -968,7 +968,7 @@ function useDtl(dtlParam) {
|
|
|
968
968
|
return onAddDtl();
|
|
969
969
|
},
|
|
970
970
|
disabled: btnDisabled('add'),
|
|
971
|
-
icon: /*#__PURE__*/React.createElement(
|
|
971
|
+
icon: /*#__PURE__*/React.createElement(PlusCircleOutlined, null)
|
|
972
972
|
}, "\u65B0\u589E") : false, (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.edit) && !isAudit() ? /*#__PURE__*/React.createElement(_Button, {
|
|
973
973
|
key: "edit",
|
|
974
974
|
disabled: btnDisabled('edit'),
|
|
@@ -8,7 +8,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
8
8
|
var _excluded = ["current", "pageSize"];
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { useState, useRef, useMemo, useCallback } from 'react';
|
|
11
|
-
import {
|
|
11
|
+
import { PlusCircleOutlined, EditOutlined, DeleteOutlined, ImportOutlined, ExportOutlined, CheckOutlined } from '@ant-design/icons';
|
|
12
12
|
import { showConfirm, showWarn, showSuccess, showError } from '../../utils';
|
|
13
13
|
import { httpPost } from '../../http';
|
|
14
14
|
import usePermission from '../usePermission';
|
|
@@ -718,7 +718,7 @@ function useSingle(inParam) {
|
|
|
718
718
|
return onAdd(null);
|
|
719
719
|
},
|
|
720
720
|
disabled: btnDisabled('add'),
|
|
721
|
-
icon: /*#__PURE__*/React.createElement(
|
|
721
|
+
icon: /*#__PURE__*/React.createElement(PlusCircleOutlined, null)
|
|
722
722
|
}, "\u65B0\u589E") : false, (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.edit) && checkRight(4) ? /*#__PURE__*/React.createElement(_Button, {
|
|
723
723
|
key: "edit",
|
|
724
724
|
disabled: btnDisabled('edit'),
|
package/es/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import Page404 from './components/404';
|
|
|
4
4
|
import Loading from './components/Loading';
|
|
5
5
|
import IconSelector from './components/IconSelector';
|
|
6
6
|
import InputMultiLine from './components/InputMultiLine';
|
|
7
|
+
import AreaCascader from './components/AreaCascader';
|
|
7
8
|
import BaseService from './service/BaseService';
|
|
8
9
|
import request, { httpGet, httpPut, httpPost, httpDelete, getDict, fetchOptions } from './http';
|
|
9
10
|
import * as utils from './utils';
|
|
@@ -15,4 +16,4 @@ import usePermission from './hooks/usePermission';
|
|
|
15
16
|
import type { ApiResponse, TableToolbar, BaseApiType, MethodType } from './typing';
|
|
16
17
|
import type { DtlLyaoutProps } from './components/DtlLayout';
|
|
17
18
|
export type { ApiResponse, TableToolbar, BaseApiType, MethodType, DtlLyaoutProps };
|
|
18
|
-
export { DtlLayout, InputTable, Page404, Loading, IconSelector, InputMultiLine, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
|
19
|
+
export { DtlLayout, InputTable, Page404, Loading, IconSelector, InputMultiLine, AreaCascader, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
package/es/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import Page404 from './components/404';
|
|
|
4
4
|
import Loading from './components/Loading';
|
|
5
5
|
import IconSelector from './components/IconSelector';
|
|
6
6
|
import InputMultiLine from './components/InputMultiLine';
|
|
7
|
+
import AreaCascader from './components/AreaCascader';
|
|
7
8
|
import BaseService from './service/BaseService';
|
|
8
9
|
import request, { httpGet, httpPut, httpPost, httpDelete, getDict, fetchOptions } from './http';
|
|
9
10
|
import * as utils from './utils';
|
|
@@ -12,4 +13,4 @@ import * as utils from './utils';
|
|
|
12
13
|
import useSingle from './hooks/useSingle';
|
|
13
14
|
import useDtl from './hooks/useDtl';
|
|
14
15
|
import usePermission from './hooks/usePermission';
|
|
15
|
-
export { DtlLayout, InputTable, Page404, Loading, IconSelector, InputMultiLine, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
|
16
|
+
export { DtlLayout, InputTable, Page404, Loading, IconSelector, InputMultiLine, AreaCascader, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
require("antd/es/cascader/style");
|
|
13
|
+
|
|
14
|
+
var _cascader = _interopRequireDefault(require("antd/es/cascader"));
|
|
15
|
+
|
|
16
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
17
|
+
|
|
18
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
19
|
+
|
|
20
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
21
|
+
|
|
22
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
23
|
+
|
|
24
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
25
|
+
|
|
26
|
+
var _http = require("../http");
|
|
27
|
+
|
|
28
|
+
var _utils = require("../utils");
|
|
29
|
+
|
|
30
|
+
var AreaCascader = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
31
|
+
var _useState = (0, _react.useState)([]),
|
|
32
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
33
|
+
options = _useState2[0],
|
|
34
|
+
setOptions = _useState2[1];
|
|
35
|
+
|
|
36
|
+
var areaRef = (0, _react.useRef)();
|
|
37
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
38
|
+
return areaRef.current;
|
|
39
|
+
});
|
|
40
|
+
(0, _react.useEffect)(function () {
|
|
41
|
+
initOptions();
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
44
|
+
var initOptions = /*#__PURE__*/function () {
|
|
45
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
46
|
+
var cacheItems, api, result, opts;
|
|
47
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
48
|
+
while (1) {
|
|
49
|
+
switch (_context.prev = _context.next) {
|
|
50
|
+
case 0:
|
|
51
|
+
cacheItems = (0, _utils.getCache)("areaOptions", true);
|
|
52
|
+
|
|
53
|
+
if (!(cacheItems && Array.isArray(cacheItems))) {
|
|
54
|
+
_context.next = 4;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
setOptions(cacheItems);
|
|
59
|
+
return _context.abrupt("return");
|
|
60
|
+
|
|
61
|
+
case 4:
|
|
62
|
+
api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
|
|
63
|
+
_context.next = 7;
|
|
64
|
+
return (0, _http.httpGet)(api, {}, false);
|
|
65
|
+
|
|
66
|
+
case 7:
|
|
67
|
+
result = _context.sent;
|
|
68
|
+
opts = result.rows || [];
|
|
69
|
+
(0, _utils.treeEach)(opts, function (item) {
|
|
70
|
+
item.label = item.name;
|
|
71
|
+
item.value = item.id;
|
|
72
|
+
|
|
73
|
+
if (item.level === 'district') {
|
|
74
|
+
delete item.children;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
delete item.name;
|
|
78
|
+
delete item.id;
|
|
79
|
+
delete item.level;
|
|
80
|
+
delete item.parentId;
|
|
81
|
+
});
|
|
82
|
+
(0, _utils.setCache)('areaOptions', opts, true);
|
|
83
|
+
setOptions(opts);
|
|
84
|
+
|
|
85
|
+
case 12:
|
|
86
|
+
case "end":
|
|
87
|
+
return _context.stop();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, _callee);
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
return function initOptions() {
|
|
94
|
+
return _ref.apply(this, arguments);
|
|
95
|
+
};
|
|
96
|
+
}();
|
|
97
|
+
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_cascader.default, (0, _extends2.default)({
|
|
99
|
+
options: options,
|
|
100
|
+
style: {
|
|
101
|
+
width: '100%'
|
|
102
|
+
},
|
|
103
|
+
changeOnSelect: true,
|
|
104
|
+
placeholder: "\u8BF7\u9009\u62E9"
|
|
105
|
+
}, props, {
|
|
106
|
+
ref: areaRef
|
|
107
|
+
}));
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
var _default = AreaCascader;
|
|
111
|
+
exports.default = _default;
|
|
@@ -132,11 +132,10 @@ var InputMultiLine = /*#__PURE__*/_react.default.forwardRef(function (prop, ref)
|
|
|
132
132
|
}
|
|
133
133
|
})),
|
|
134
134
|
trigger: "click",
|
|
135
|
-
visible: visible,
|
|
135
|
+
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
136
136
|
onVisibleChange: setVisible
|
|
137
137
|
}, /*#__PURE__*/_react.default.createElement(_icons.UnorderedListOutlined, {
|
|
138
138
|
onClick: function onClick(e) {
|
|
139
|
-
if (rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled)) return;
|
|
140
139
|
setVisible(true);
|
|
141
140
|
}
|
|
142
141
|
}));
|
|
@@ -374,13 +374,11 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
374
374
|
}
|
|
375
375
|
}, tableDom),
|
|
376
376
|
trigger: "click",
|
|
377
|
-
visible: visible,
|
|
377
|
+
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
378
378
|
onVisibleChange: setVisible
|
|
379
379
|
}, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined, {
|
|
380
380
|
onClick: function onClick(e) {
|
|
381
|
-
if (rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled)) return;
|
|
382
381
|
setVisible(true);
|
|
383
|
-
e.stopPropagation && e.stopPropagation();
|
|
384
382
|
}
|
|
385
383
|
})),
|
|
386
384
|
onClick: function onClick() {
|
|
@@ -413,11 +411,10 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
413
411
|
}
|
|
414
412
|
}, tableDom),
|
|
415
413
|
trigger: "click",
|
|
416
|
-
visible: visible,
|
|
414
|
+
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
417
415
|
onVisibleChange: setVisible
|
|
418
416
|
}, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined, {
|
|
419
417
|
onClick: function onClick(e) {
|
|
420
|
-
if (rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled)) return;
|
|
421
418
|
setVisible(true);
|
|
422
419
|
}
|
|
423
420
|
})),
|
|
@@ -1,3 +1,46 @@
|
|
|
1
|
+
body {
|
|
2
|
+
--ant-primary-color: #4997E6;
|
|
3
|
+
--ant-primary-color-hover: #74b7f2;
|
|
4
|
+
--ant-primary-color-active: #3475bf;
|
|
5
|
+
--ant-primary-color-outline: rgba(73, 151, 230, 0.2);
|
|
6
|
+
--ant-primary-1: #f0faff;
|
|
7
|
+
--ant-primary-2: #f0f9ff;
|
|
8
|
+
--ant-primary-3: #ccebff;
|
|
9
|
+
--ant-primary-4: #a3d7ff;
|
|
10
|
+
--ant-primary-5: #74b7f2;
|
|
11
|
+
--ant-primary-6: #4997E6;
|
|
12
|
+
--ant-primary-7: #3475bf;
|
|
13
|
+
--ant-primary-color-deprecated-pure: #e6f1fc;
|
|
14
|
+
--ant-primary-color-deprecated-l-35: #e6f1fc;
|
|
15
|
+
--ant-primary-color-deprecated-l-20: #a3caf2;
|
|
16
|
+
--ant-primary-color-deprecated-t-20: #6daceb;
|
|
17
|
+
--ant-primary-color-deprecated-t-50: #a4cbf3;
|
|
18
|
+
--ant-primary-color-deprecated-f-12: rgba(73, 151, 230, 0.12);
|
|
19
|
+
--ant-primary-color-active-deprecated-f-30: rgba(240, 250, 255, 0.3);
|
|
20
|
+
--ant-primary-color-active-deprecated-d-02: #e6f7ff;
|
|
21
|
+
--ant-success-color: #52c41a;
|
|
22
|
+
--ant-success-color-hover: #73d13d;
|
|
23
|
+
--ant-success-color-active: #389e0d;
|
|
24
|
+
--ant-success-color-outline: rgba(82, 196, 26, 0.2);
|
|
25
|
+
--ant-success-color-deprecated-bg: #f6ffed;
|
|
26
|
+
--ant-success-color-deprecated-border: #b7eb8f;
|
|
27
|
+
--ant-error-color: #ff4d4f;
|
|
28
|
+
--ant-error-color-hover: #ff7875;
|
|
29
|
+
--ant-error-color-active: #d9363e;
|
|
30
|
+
--ant-error-color-outline: rgba(255, 77, 79, 0.2);
|
|
31
|
+
--ant-error-color-deprecated-bg: #fff2f0;
|
|
32
|
+
--ant-error-color-deprecated-border: #ffccc7;
|
|
33
|
+
--ant-warning-color: #faad14;
|
|
34
|
+
--ant-warning-color-hover: #ffc53d;
|
|
35
|
+
--ant-warning-color-active: #d48806;
|
|
36
|
+
--ant-warning-color-outline: rgba(250, 173, 20, 0.2);
|
|
37
|
+
--ant-warning-color-deprecated-bg: #fffbe6;
|
|
38
|
+
--ant-warning-color-deprecated-border: #ffe58f;
|
|
39
|
+
--ant-info-color: #4997E6;
|
|
40
|
+
--ant-info-color-deprecated-bg: #f0faff;
|
|
41
|
+
--ant-info-color-deprecated-border: #ccebff;
|
|
42
|
+
}
|
|
43
|
+
|
|
1
44
|
.dtl-layout {
|
|
2
45
|
position : absolute;
|
|
3
46
|
top : 0;
|
|
@@ -7,6 +50,7 @@
|
|
|
7
50
|
background : white;
|
|
8
51
|
display : flex;
|
|
9
52
|
flex-direction: column;
|
|
53
|
+
z-index : 50;
|
|
10
54
|
|
|
11
55
|
.dtl-header {
|
|
12
56
|
display : flex;
|
|
@@ -67,7 +111,7 @@
|
|
|
67
111
|
width : 100%;
|
|
68
112
|
height : 100%;
|
|
69
113
|
text-align : center;
|
|
70
|
-
padding-top : 10%;
|
|
114
|
+
padding-top : 10%;
|
|
71
115
|
font-size : 15px;
|
|
72
116
|
font-weight : 600;
|
|
73
117
|
color : gray;
|
|
@@ -85,4 +129,19 @@
|
|
|
85
129
|
text-align : center;
|
|
86
130
|
padding-top: 20%;
|
|
87
131
|
background : #fff;
|
|
88
|
-
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ant-btn {
|
|
135
|
+
border-radius: 4px;
|
|
136
|
+
border-color : var(--ant-primary-color);
|
|
137
|
+
color : var(--ant-primary-color);
|
|
138
|
+
|
|
139
|
+
&:active {
|
|
140
|
+
border-color: var(--ant-primary-color-hover);
|
|
141
|
+
color : var(--ant-primary-color-hover);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ant-btn-primary {
|
|
146
|
+
color: #fff;
|
|
147
|
+
}
|
|
@@ -989,7 +989,7 @@ function useDtl(dtlParam) {
|
|
|
989
989
|
return onAddDtl();
|
|
990
990
|
},
|
|
991
991
|
disabled: btnDisabled('add'),
|
|
992
|
-
icon: /*#__PURE__*/_react.default.createElement(_icons.
|
|
992
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.PlusCircleOutlined, null)
|
|
993
993
|
}, "\u65B0\u589E") : false, (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.edit) && !isAudit() ? /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
994
994
|
key: "edit",
|
|
995
995
|
disabled: btnDisabled('edit'),
|
|
@@ -739,7 +739,7 @@ function useSingle(inParam) {
|
|
|
739
739
|
return onAdd(null);
|
|
740
740
|
},
|
|
741
741
|
disabled: btnDisabled('add'),
|
|
742
|
-
icon: /*#__PURE__*/_react.default.createElement(_icons.
|
|
742
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.PlusCircleOutlined, null)
|
|
743
743
|
}, "\u65B0\u589E") : false, (toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.edit) && checkRight(4) ? /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
744
744
|
key: "edit",
|
|
745
745
|
disabled: btnDisabled('edit'),
|
package/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import Page404 from './components/404';
|
|
|
4
4
|
import Loading from './components/Loading';
|
|
5
5
|
import IconSelector from './components/IconSelector';
|
|
6
6
|
import InputMultiLine from './components/InputMultiLine';
|
|
7
|
+
import AreaCascader from './components/AreaCascader';
|
|
7
8
|
import BaseService from './service/BaseService';
|
|
8
9
|
import request, { httpGet, httpPut, httpPost, httpDelete, getDict, fetchOptions } from './http';
|
|
9
10
|
import * as utils from './utils';
|
|
@@ -15,4 +16,4 @@ import usePermission from './hooks/usePermission';
|
|
|
15
16
|
import type { ApiResponse, TableToolbar, BaseApiType, MethodType } from './typing';
|
|
16
17
|
import type { DtlLyaoutProps } from './components/DtlLayout';
|
|
17
18
|
export type { ApiResponse, TableToolbar, BaseApiType, MethodType, DtlLyaoutProps };
|
|
18
|
-
export { DtlLayout, InputTable, Page404, Loading, IconSelector, InputMultiLine, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
|
19
|
+
export { DtlLayout, InputTable, Page404, Loading, IconSelector, InputMultiLine, AreaCascader, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
package/lib/index.js
CHANGED
|
@@ -7,6 +7,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
+
Object.defineProperty(exports, "AreaCascader", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _AreaCascader.default;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
10
16
|
Object.defineProperty(exports, "BaseService", {
|
|
11
17
|
enumerable: true,
|
|
12
18
|
get: function get() {
|
|
@@ -123,6 +129,8 @@ var _IconSelector = _interopRequireDefault(require("./components/IconSelector"))
|
|
|
123
129
|
|
|
124
130
|
var _InputMultiLine = _interopRequireDefault(require("./components/InputMultiLine"));
|
|
125
131
|
|
|
132
|
+
var _AreaCascader = _interopRequireDefault(require("./components/AreaCascader"));
|
|
133
|
+
|
|
126
134
|
var _BaseService = _interopRequireDefault(require("./service/BaseService"));
|
|
127
135
|
|
|
128
136
|
var _http = _interopRequireWildcard(require("./http"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
4
4
|
"description": "ls-pro-common",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@ant-design/icons": "^4.3.0",
|
|
31
|
-
"ls-pro-table": "2.62.
|
|
31
|
+
"ls-pro-table": "2.62.35",
|
|
32
32
|
"ls-pro-form": "1.52.27",
|
|
33
33
|
"@babel/runtime": "^7.16.3",
|
|
34
34
|
"classnames": "^2.2.6",
|