@zgfe/modules-settings 2.0.0-zhongyuan.8 → 2.1.0-zhongyuan-set.1
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/README.md +33 -33
- package/es/components/card/index.less +87 -87
- package/es/components/importMetaDialog/index.d.ts +13 -0
- package/es/components/importMetaDialog/index.js +217 -0
- package/es/components/importMetaDialog/styles/index.less +115 -0
- package/es/components/pageLoading/index.less +7 -7
- package/es/components/picCircleSelect/bak/index copy 2.tsx.bak +92 -92
- package/es/components/picCircleSelect/bak/index copy 3.tsx.bak +58 -58
- package/es/components/picCircleSelect/bak/index copy 4.tsx.bak +66 -66
- package/es/components/picCircleSelect/bak/index copy 5.tsx.bak +116 -116
- package/es/components/picCircleSelect/bak/index copy 6.tsx.bak +116 -116
- package/es/components/picCircleSelect/bak/index copy.tsx.bak +41 -41
- package/es/components/picCircleSelect/bak/index.tsx.bak +48 -48
- package/es/components/picCircleSelect/bak/index1.tsx.bak +46 -46
- package/es/components/picCircleSelect/bak/index2.tsx.bak +104 -104
- package/es/components/picCircleSelect/index.less +37 -37
- package/es/components/processCanvas/styles/customNode.less +149 -149
- package/es/components/processCanvas/styles/index.less +34 -34
- package/es/components/settingTabs/index.less +51 -51
- package/es/constants/api.d.ts +30 -0
- package/es/constants/api.js +43 -1
- package/es/constants/icons/demo.css +539 -539
- package/es/constants/icons/demo_index.html +9871 -9871
- package/es/constants/icons/iconfont.css +1699 -1699
- package/es/constants/icons/iconfont.json +2956 -2956
- package/es/global.d.ts +4 -4
- package/es/modules/appSettings/dataAccessFilter/index.js +2 -1
- package/es/modules/appSettings/dataAccessFilter/index.less +5 -5
- package/es/modules/appSettings/virtualSource/styles/index.less +28 -28
- package/es/modules/appSettings/virtualSource/styles/table.less +51 -51
- package/es/modules/companySetting/appList/index.less +126 -126
- package/es/modules/companySetting/application/applicationForm.d.ts +1 -0
- package/es/modules/companySetting/application/applicationForm.js +34 -4
- package/es/modules/companySetting/application/index.d.ts +13 -0
- package/es/modules/companySetting/application/index.js +276 -104
- package/es/modules/companySetting/application/index.less +144 -126
- package/es/modules/companySetting/business/index.less +92 -92
- package/es/modules/companySetting/cost/index.less +38 -38
- package/es/modules/companySetting/department/index.less +157 -157
- package/es/modules/companySetting/edit/styles/authConfig.less +3 -3
- package/es/modules/companySetting/edit/styles/authGroup.less +10 -10
- package/es/modules/companySetting/edit/styles/authModule.less +82 -82
- package/es/modules/companySetting/edit/styles/user.less +54 -54
- package/es/modules/companySetting/edit/styles/userGroup.less +44 -44
- package/es/modules/companySetting/index.js +37 -33
- package/es/modules/companySetting/index.less +90 -90
- package/es/modules/companySetting/info/index.less +42 -42
- package/es/modules/companySetting/mainPart/images/img2.svg +12 -12
- package/es/modules/companySetting/mainPart/index.less +239 -239
- package/es/modules/companySetting/operationLog/index.js +22 -5
- package/es/modules/companySetting/operationLog/index.less +33 -33
- package/es/modules/companySetting/role/index.less +296 -296
- package/es/modules/companySetting/role/setDataRangeDialog/index.less +37 -37
- package/es/modules/companySetting/style/common.less +79 -79
- package/es/modules/companySetting/style/reset.less +117 -117
- package/es/modules/companySetting/user/index.js +36 -24
- package/es/modules/companySetting/user/invite.js +47 -100
- package/es/modules/companySetting/virtualApp/styles/config.less +37 -37
- package/es/modules/companySetting/virtualApp/styles/index.less +21 -21
- package/es/modules/companySetting/virtualApp/styles/list.less +28 -28
- package/es/modules/companySetting/virtualApp/styles/sourceItem.less +33 -33
- package/es/modules/companySetting/virtualApp/styles/table.less +44 -44
- package/es/modules/companySetting/wechatBinding/index.less +58 -58
- package/es/modules/createDemand/constants.d.ts +15 -2
- package/es/modules/createDemand/constants.js +57 -4
- package/es/modules/createDemand/demo/selectPoint.js +1 -2
- package/es/modules/createDemand/index.d.ts +0 -1
- package/es/modules/createDemand/index.js +793 -179
- package/es/modules/createDemand/styles/index.less +403 -277
- package/es/modules/createDemand_bf/demo/index.js +0 -1
- package/es/modules/createDemand_bf/index.js +0 -1
- package/es/modules/createDemand_bf/styles/index.less +222 -222
- package/es/modules/createProcess/components/index.less +52 -52
- package/es/modules/createProcess/index.less +114 -114
- package/es/modules/createProcess/title/index.less +53 -53
- package/es/modules/dealDemand/demo/index.js +0 -1
- package/es/modules/dealDemand/demo/selectPoint.js +1 -1
- package/es/modules/dealDemand/index.js +0 -2
- package/es/modules/dealDemand/styles/index.less +265 -265
- package/es/modules/demandManage/index.js +174 -163
- package/es/modules/demandManage/styles/index.less +155 -210
- package/es/modules/getPassword/index.less +122 -122
- package/es/modules/messageList/index.d.ts +1 -1
- package/es/modules/messageList/index.js +6 -6
- package/es/modules/messageList/index.less +81 -81
- package/es/modules/personalSetting/demo/index.d.ts +3 -0
- package/es/modules/personalSetting/demo/index.js +12 -0
- package/es/modules/personalSetting/index.js +11 -1
- package/es/modules/personalSetting/info/index.js +23 -5
- package/es/modules/personalSetting/securityLog/index.less +11 -11
- package/es/modules/personalSetting/styles/unbinding.less +73 -73
- package/es/modules/pointMap/ImportModal/styles/index.less +91 -91
- package/es/modules/pointMap/createMetaDrawer.d.ts +5 -0
- package/es/modules/pointMap/createMetaDrawer.js +825 -0
- package/es/modules/pointMap/editTxt/index.less +55 -55
- package/es/modules/pointMap/pageInfo.js +401 -179
- package/es/modules/pointMap/record.d.ts +7 -0
- package/es/modules/pointMap/record.js +521 -0
- package/es/modules/pointMap/styles/index.less +165 -38
- package/es/modules/pointMap/styles/pageInfo.less +439 -244
- package/es/modules/pointMap/styles/tree.css +28 -9
- package/es/modules/pointMap/styles/tree.less +33 -8
- package/es/modules/pointMap/tree.js +232 -88
- package/es/modules/pointMap/types.d.ts +88 -0
- package/es/modules/pointMap/types.js +1 -0
- package/es/modules/systemSetting/Dictionary.d.ts +5 -2
- package/es/modules/systemSetting/Dictionary.js +54 -370
- package/es/modules/systemSetting/approvalmanage/approvalStrategy/index.less +14 -14
- package/es/modules/systemSetting/approvalmanage/index.less +5 -5
- package/es/modules/systemSetting/approvalmanage/processManage/index.less +39 -39
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/create.d.ts +9 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/create.js +245 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/css/index.less +48 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.d.ts +4 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.js +207 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/type/index.d.ts +10 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/type/index.js +1 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/create.d.ts +10 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/create.js +124 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/css/index.less +32 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/index.d.ts +7 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/index.js +264 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/type/index.d.ts +9 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/type/index.js +1 -0
- package/es/modules/systemSetting/document-setting/index.js +7 -6
- package/es/modules/systemSetting/index.js +16 -16
- package/es/modules/systemSetting/notice/configItem/index.less +21 -21
- package/es/modules/systemSetting/notice/edit/index.less +26 -26
- package/es/types/personal.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
.system-setting-approval-process-content {
|
|
2
|
-
position: relative;
|
|
3
|
-
padding: 0 24px 16px;
|
|
4
|
-
}
|
|
5
|
-
.system-setting-approval-process-content-top {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: row;
|
|
8
|
-
justify-content: space-between;
|
|
9
|
-
margin-bottom: 16px;
|
|
10
|
-
}
|
|
11
|
-
.system-setting-approval-process-content-top-left {
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: row;
|
|
14
|
-
gap: 16px;
|
|
15
|
-
align-items: center;
|
|
16
|
-
}
|
|
17
|
-
.system-setting-approval-process-disable-tip {
|
|
18
|
-
color: var(----1, #021429);
|
|
19
|
-
font-weight: 400;
|
|
20
|
-
font-size: 14px;
|
|
21
|
-
font-family: 'PingFang SC';
|
|
22
|
-
font-style: normal;
|
|
23
|
-
line-height: normal;
|
|
24
|
-
}
|
|
25
|
-
.system-setting-approval-process-disable-tip-warn {
|
|
26
|
-
margin-top: 8px;
|
|
27
|
-
color: var(---, #fd9f41);
|
|
28
|
-
font-weight: 400;
|
|
29
|
-
font-size: 14px;
|
|
30
|
-
font-family: 'PingFang SC';
|
|
31
|
-
font-style: normal;
|
|
32
|
-
line-height: normal;
|
|
33
|
-
}
|
|
34
|
-
.system-setting-approval-process-txt {
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
white-space: nowrap;
|
|
37
|
-
text-overflow: ellipsis;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
}
|
|
1
|
+
.system-setting-approval-process-content {
|
|
2
|
+
position: relative;
|
|
3
|
+
padding: 0 24px 16px;
|
|
4
|
+
}
|
|
5
|
+
.system-setting-approval-process-content-top {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
margin-bottom: 16px;
|
|
10
|
+
}
|
|
11
|
+
.system-setting-approval-process-content-top-left {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
gap: 16px;
|
|
15
|
+
align-items: center;
|
|
16
|
+
}
|
|
17
|
+
.system-setting-approval-process-disable-tip {
|
|
18
|
+
color: var(----1, #021429);
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
font-family: 'PingFang SC';
|
|
22
|
+
font-style: normal;
|
|
23
|
+
line-height: normal;
|
|
24
|
+
}
|
|
25
|
+
.system-setting-approval-process-disable-tip-warn {
|
|
26
|
+
margin-top: 8px;
|
|
27
|
+
color: var(---, #fd9f41);
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
font-family: 'PingFang SC';
|
|
31
|
+
font-style: normal;
|
|
32
|
+
line-height: normal;
|
|
33
|
+
}
|
|
34
|
+
.system-setting-approval-process-txt {
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
text-overflow: ellipsis;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DictDetailType } from './type';
|
|
3
|
+
import './css/index.less';
|
|
4
|
+
declare const clearDict: React.FC<{
|
|
5
|
+
addDictShow: boolean;
|
|
6
|
+
onSetclose: Function;
|
|
7
|
+
currentDictDetail: DictDetailType | undefined | null;
|
|
8
|
+
}>;
|
|
9
|
+
export default clearDict;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
2
|
+
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."); }
|
|
3
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
4
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
5
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
8
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
11
|
+
import { Drawer, Input, Button, Space, Form, Table, message } from 'antd';
|
|
12
|
+
import { CloseOutlined, PlusOutlined } from '@ant-design/icons';
|
|
13
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
14
|
+
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
15
|
+
import ImportMetaDialog from '../../../../components/importMetaDialog/index';
|
|
16
|
+
import './css/index.less';
|
|
17
|
+
import request from '../../../../utils/ajax';
|
|
18
|
+
import apis from '../../../../constants/api';
|
|
19
|
+
var TextArea = Input.TextArea;
|
|
20
|
+
var clearDict = function clearDict(_ref) {
|
|
21
|
+
var addDictShow = _ref.addDictShow,
|
|
22
|
+
onSetclose = _ref.onSetclose,
|
|
23
|
+
currentDictDetail = _ref.currentDictDetail;
|
|
24
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
25
|
+
currentApp = _useContext.currentApp,
|
|
26
|
+
showProdDownload = _useContext.showProdDownload;
|
|
27
|
+
var _useState = useState(addDictShow),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
open = _useState2[0],
|
|
30
|
+
setOpen = _useState2[1];
|
|
31
|
+
var _useState3 = useState([]),
|
|
32
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
33
|
+
dictList = _useState4[0],
|
|
34
|
+
setDictList = _useState4[1];
|
|
35
|
+
var _useState5 = useState(false),
|
|
36
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
37
|
+
openImportModal = _useState6[0],
|
|
38
|
+
setOpenImportModal = _useState6[1];
|
|
39
|
+
var columns = [{
|
|
40
|
+
title: '属性值',
|
|
41
|
+
dataIndex: 'name',
|
|
42
|
+
key: 'name',
|
|
43
|
+
render: function render(text, record, index) {
|
|
44
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
45
|
+
showCount: true,
|
|
46
|
+
maxLength: 50,
|
|
47
|
+
defaultValue: text,
|
|
48
|
+
placeholder: "\u8BF7\u8F93\u5165\u5C5E\u6027\u503C",
|
|
49
|
+
onChange: function onChange(e) {
|
|
50
|
+
onChangeName(index, e.target.value);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
title: '操作',
|
|
56
|
+
key: 'action',
|
|
57
|
+
width: 80,
|
|
58
|
+
render: function render(_, record, index) {
|
|
59
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
60
|
+
size: "middle"
|
|
61
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
62
|
+
onClick: function onClick() {
|
|
63
|
+
return handleDeleteDict(index);
|
|
64
|
+
}
|
|
65
|
+
}, "\u5220\u9664"));
|
|
66
|
+
}
|
|
67
|
+
}];
|
|
68
|
+
var _Form$useForm = Form.useForm(),
|
|
69
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
70
|
+
dictForm = _Form$useForm2[0];
|
|
71
|
+
//确定按钮
|
|
72
|
+
var handleSave = function handleSave() {
|
|
73
|
+
dictForm.submit();
|
|
74
|
+
};
|
|
75
|
+
//表单请求
|
|
76
|
+
var onFinish = function onFinish(values) {
|
|
77
|
+
if (!dictList.length) {
|
|
78
|
+
message.error('字典属性值不能为空!');
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
request((currentDictDetail === null || currentDictDetail === void 0 ? void 0 : currentDictDetail.id) ? apis.dict.dictUpdate : apis.dict.dictSave, {
|
|
82
|
+
method: 'post',
|
|
83
|
+
data: {
|
|
84
|
+
id: (currentDictDetail === null || currentDictDetail === void 0 ? void 0 : currentDictDetail.id) || undefined,
|
|
85
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
86
|
+
dictName: values.dictName,
|
|
87
|
+
remark: values.remark,
|
|
88
|
+
dictValue: _toConsumableArray(new Set(dictList.map(function (res) {
|
|
89
|
+
return res.name;
|
|
90
|
+
})))
|
|
91
|
+
}
|
|
92
|
+
}).then(function (res) {
|
|
93
|
+
if (!res) return;
|
|
94
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
95
|
+
message.success((currentDictDetail === null || currentDictDetail === void 0 ? void 0 : currentDictDetail.id) ? '字典修改成功' : '字典创建成功!');
|
|
96
|
+
onClose();
|
|
97
|
+
} else {
|
|
98
|
+
message.error(res.msg);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
//取消退出
|
|
103
|
+
var onClose = function onClose() {
|
|
104
|
+
setOpen(false);
|
|
105
|
+
dictForm.resetFields(); // 表单重置
|
|
106
|
+
setTimeout(function () {
|
|
107
|
+
onSetclose();
|
|
108
|
+
}, 300);
|
|
109
|
+
};
|
|
110
|
+
//删除表单属性
|
|
111
|
+
var handleDeleteDict = function handleDeleteDict(index) {
|
|
112
|
+
setDictList(dictList.filter(function (res, filterIndex) {
|
|
113
|
+
return index != filterIndex;
|
|
114
|
+
}));
|
|
115
|
+
};
|
|
116
|
+
//修改属性名称
|
|
117
|
+
var onChangeName = function onChangeName(index, value) {
|
|
118
|
+
dictList[index]['name'] = value;
|
|
119
|
+
setDictList(dictList);
|
|
120
|
+
};
|
|
121
|
+
//属性添加
|
|
122
|
+
var onHandlePush = function onHandlePush() {
|
|
123
|
+
setDictList([].concat(_toConsumableArray(dictList), [{
|
|
124
|
+
name: '',
|
|
125
|
+
key: Math.random() * 10000
|
|
126
|
+
}]));
|
|
127
|
+
var tableBody = document.querySelector('.ant-table-body');
|
|
128
|
+
if (tableBody) {
|
|
129
|
+
setTimeout(function () {
|
|
130
|
+
tableBody === null || tableBody === void 0 ? void 0 : tableBody.scrollTo(0, tableBody.scrollHeight);
|
|
131
|
+
}, 0);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
//属性添加文件上传
|
|
135
|
+
var onHandleUploading = function onHandleUploading() {
|
|
136
|
+
setOpenImportModal(true);
|
|
137
|
+
};
|
|
138
|
+
//初始请求初始化
|
|
139
|
+
useEffect(function () {
|
|
140
|
+
if (currentDictDetail) {
|
|
141
|
+
var _currentDictDetail$di;
|
|
142
|
+
dictForm.setFieldsValue({
|
|
143
|
+
dictName: currentDictDetail.dictName,
|
|
144
|
+
remark: currentDictDetail.remark
|
|
145
|
+
});
|
|
146
|
+
setDictList((_currentDictDetail$di = currentDictDetail.dictValue) === null || _currentDictDetail$di === void 0 ? void 0 : _currentDictDetail$di.split(',').map(function (res) {
|
|
147
|
+
return {
|
|
148
|
+
name: res,
|
|
149
|
+
key: Math.random() * 10000
|
|
150
|
+
};
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
}, []);
|
|
154
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
155
|
+
className: "clearDict"
|
|
156
|
+
}, /*#__PURE__*/React.createElement(Drawer, {
|
|
157
|
+
className: "clearDictForm",
|
|
158
|
+
title: /*#__PURE__*/React.createElement("div", null, currentDictDetail ? '修改' : '创建', "\u5C5E\u6027\u5B57\u5178", /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
className: "clearDict-drawerCloseIcon",
|
|
160
|
+
onClick: onClose
|
|
161
|
+
}, /*#__PURE__*/React.createElement(CloseOutlined, null))),
|
|
162
|
+
onClose: onClose,
|
|
163
|
+
closeIcon: false,
|
|
164
|
+
open: open,
|
|
165
|
+
placement: "right",
|
|
166
|
+
width: "700px",
|
|
167
|
+
footer: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
168
|
+
onClick: onClose
|
|
169
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
170
|
+
type: "primary",
|
|
171
|
+
onClick: handleSave
|
|
172
|
+
}, "\u786E\u5B9A")))
|
|
173
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
174
|
+
form: dictForm,
|
|
175
|
+
labelCol: {
|
|
176
|
+
span: 4
|
|
177
|
+
},
|
|
178
|
+
wrapperCol: {
|
|
179
|
+
span: 20
|
|
180
|
+
},
|
|
181
|
+
initialValues: {
|
|
182
|
+
dictName: '',
|
|
183
|
+
desctiption: ''
|
|
184
|
+
},
|
|
185
|
+
onFinish: onFinish,
|
|
186
|
+
labelAlign: "right"
|
|
187
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
188
|
+
label: "\u5C5E\u6027\u5B57\u5178\u540D",
|
|
189
|
+
name: "dictName",
|
|
190
|
+
rules: [{
|
|
191
|
+
required: true,
|
|
192
|
+
message: '请输入属性字典名'
|
|
193
|
+
}]
|
|
194
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
195
|
+
showCount: true,
|
|
196
|
+
maxLength: 50,
|
|
197
|
+
placeholder: "\u8BF7\u8F93\u5165\u5C5E\u6027\u5B57\u5178\u540D"
|
|
198
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
199
|
+
label: "\u5907\u6CE8",
|
|
200
|
+
name: "remark"
|
|
201
|
+
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
202
|
+
showCount: true,
|
|
203
|
+
maxLength: 100,
|
|
204
|
+
autoSize: {
|
|
205
|
+
minRows: 3,
|
|
206
|
+
maxRows: 6
|
|
207
|
+
},
|
|
208
|
+
placeholder: "\u8BF7\u8F93\u5165\u5907\u6CE8"
|
|
209
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
210
|
+
className: "clearDict-tableContainer"
|
|
211
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
212
|
+
rowKey: "key",
|
|
213
|
+
dataSource: dictList,
|
|
214
|
+
columns: columns,
|
|
215
|
+
pagination: false,
|
|
216
|
+
scroll: {
|
|
217
|
+
y: 'calc(100vh - 430px)'
|
|
218
|
+
}
|
|
219
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
220
|
+
className: "clearDict-addListBtn"
|
|
221
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
222
|
+
type: "primary",
|
|
223
|
+
onClick: onHandlePush
|
|
224
|
+
}, /*#__PURE__*/React.createElement(PlusOutlined, null), "\u6DFB\u52A0\u503C"), showProdDownload && (/*#__PURE__*/React.createElement(Button, {
|
|
225
|
+
type: "primary",
|
|
226
|
+
onClick: onHandleUploading
|
|
227
|
+
}, /*#__PURE__*/React.createElement(PlusOutlined, null), "\u4ECE\u6587\u4EF6\u6DFB\u52A0")))), openImportModal && (/*#__PURE__*/React.createElement(ImportMetaDialog, {
|
|
228
|
+
uploadFile: apis.dict.dictUpload,
|
|
229
|
+
downloadTempleUrl: apis.dict.dictTemplate,
|
|
230
|
+
fileName: "\u5C5E\u6027\u503C\u5BFC\u5165\u6A21\u677F",
|
|
231
|
+
onCancel: function onCancel() {
|
|
232
|
+
setOpenImportModal(false);
|
|
233
|
+
},
|
|
234
|
+
onSuccess: function onSuccess(result) {
|
|
235
|
+
setDictList([].concat(_toConsumableArray(dictList), _toConsumableArray(result.map(function (res) {
|
|
236
|
+
return {
|
|
237
|
+
name: res,
|
|
238
|
+
key: Math.random() * 10000
|
|
239
|
+
};
|
|
240
|
+
}))));
|
|
241
|
+
setOpenImportModal(false);
|
|
242
|
+
}
|
|
243
|
+
})));
|
|
244
|
+
};
|
|
245
|
+
export default clearDict;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.clearDict {
|
|
2
|
+
height: 100%;
|
|
3
|
+
padding: 24px;
|
|
4
|
+
background: #fff;
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
&-searchTop {
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: 1fr;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-items: self-end;
|
|
12
|
+
margin-bottom: 20px;
|
|
13
|
+
}
|
|
14
|
+
&-modal {
|
|
15
|
+
.ant-modal-body {
|
|
16
|
+
height: 350px;
|
|
17
|
+
}
|
|
18
|
+
.ant-picker-dropdown {
|
|
19
|
+
top: 133px !important;
|
|
20
|
+
left: 13px !important;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
&-content {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
}
|
|
28
|
+
&-drawerCloseIcon {
|
|
29
|
+
float: right;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
&-addListBtn {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
margin-top: 20px;
|
|
37
|
+
}
|
|
38
|
+
&-tableContainer {
|
|
39
|
+
margin-top: 10px;
|
|
40
|
+
.ant-table {
|
|
41
|
+
height: calc(100vh - 380px);
|
|
42
|
+
min-height: 410px !important; /* 设置表格最小高度 */
|
|
43
|
+
}
|
|
44
|
+
.ant-empty-normal {
|
|
45
|
+
height: 260px; /* 设置表格最小高度 */
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
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 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
|
+
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
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import { Table, Button, Space, Modal, message, Tooltip, Typography } from 'antd';
|
|
14
|
+
import { PlusOutlined } from '@ant-design/icons';
|
|
15
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
16
|
+
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
17
|
+
import CreateDict from './create';
|
|
18
|
+
import request from '../../../../utils/ajax';
|
|
19
|
+
import apis from '../../../../constants/api';
|
|
20
|
+
import './css/index.less';
|
|
21
|
+
import moment from 'moment';
|
|
22
|
+
var Text = Typography.Text;
|
|
23
|
+
var className = 'clearDict';
|
|
24
|
+
var DictionaryManagement = function DictionaryManagement() {
|
|
25
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
26
|
+
currentApp = _useContext.currentApp;
|
|
27
|
+
var columns = [{
|
|
28
|
+
title: '序号',
|
|
29
|
+
dataIndex: 'index',
|
|
30
|
+
key: 'index',
|
|
31
|
+
render: function render() {
|
|
32
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
33
|
+
args[_key] = arguments[_key];
|
|
34
|
+
}
|
|
35
|
+
return "".concat(args.pop() + 1);
|
|
36
|
+
},
|
|
37
|
+
width: 80
|
|
38
|
+
}, {
|
|
39
|
+
title: '属性字典名',
|
|
40
|
+
dataIndex: 'dictName',
|
|
41
|
+
key: 'dictName',
|
|
42
|
+
render: function render(text) {
|
|
43
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
44
|
+
title: text
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Text, null, text));
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
title: '创建时间',
|
|
49
|
+
width: 220,
|
|
50
|
+
dataIndex: 'createTime',
|
|
51
|
+
render: function render(text) {
|
|
52
|
+
return moment(text).format('YYYY-MM-DD HH:mm:ss');
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
title: '创建人',
|
|
56
|
+
dataIndex: 'creatorName',
|
|
57
|
+
key: 'creatorName',
|
|
58
|
+
width: 140
|
|
59
|
+
}, {
|
|
60
|
+
title: '备注',
|
|
61
|
+
dataIndex: 'remark',
|
|
62
|
+
render: function render(text) {
|
|
63
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
64
|
+
title: text
|
|
65
|
+
}, /*#__PURE__*/React.createElement(Text, null, text));
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
title: '操作',
|
|
69
|
+
key: 'action',
|
|
70
|
+
width: 160,
|
|
71
|
+
render: function render(_, record) {
|
|
72
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
73
|
+
size: "middle"
|
|
74
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
75
|
+
onClick: function onClick() {
|
|
76
|
+
return getDetail(record);
|
|
77
|
+
}
|
|
78
|
+
}, "\u7F16\u8F91"), /*#__PURE__*/React.createElement("a", {
|
|
79
|
+
onClick: function onClick() {
|
|
80
|
+
return handleDeletet(record === null || record === void 0 ? void 0 : record.id);
|
|
81
|
+
}
|
|
82
|
+
}, "\u5220\u9664"));
|
|
83
|
+
}
|
|
84
|
+
}];
|
|
85
|
+
// 编辑字典
|
|
86
|
+
var _useState = useState(),
|
|
87
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
88
|
+
dictDetail = _useState2[0],
|
|
89
|
+
setDictDetail = _useState2[1];
|
|
90
|
+
var getDetail = function getDetail(record) {
|
|
91
|
+
setDictDetail(record);
|
|
92
|
+
setAddDictShow(true);
|
|
93
|
+
};
|
|
94
|
+
// 新建字典显示
|
|
95
|
+
var _useState3 = useState(false),
|
|
96
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
97
|
+
addDictShow = _useState4[0],
|
|
98
|
+
setAddDictShow = _useState4[1];
|
|
99
|
+
var handleAddDict = function handleAddDict() {
|
|
100
|
+
setAddDictShow(true);
|
|
101
|
+
setDictDetail(undefined);
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* 字典列表, 搜索名称 删除字典
|
|
105
|
+
*/
|
|
106
|
+
var _useState5 = useState([]),
|
|
107
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
108
|
+
dictList = _useState6[0],
|
|
109
|
+
setDictList = _useState6[1];
|
|
110
|
+
var handlePage = function handlePage(pagination) {
|
|
111
|
+
setTableParams(pagination);
|
|
112
|
+
getList();
|
|
113
|
+
};
|
|
114
|
+
var _useState7 = useState({
|
|
115
|
+
current: 1,
|
|
116
|
+
pageSize: 10,
|
|
117
|
+
total: 0
|
|
118
|
+
}),
|
|
119
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
120
|
+
tableParams = _useState8[0],
|
|
121
|
+
setTableParams = _useState8[1];
|
|
122
|
+
useEffect(function () {
|
|
123
|
+
getList();
|
|
124
|
+
}, []);
|
|
125
|
+
//分页搜索
|
|
126
|
+
var getList = function getList() {
|
|
127
|
+
request(apis.dict.getDictPage, {
|
|
128
|
+
method: 'post',
|
|
129
|
+
data: {
|
|
130
|
+
pageNo: tableParams.current,
|
|
131
|
+
pageSize: tableParams.pageSize,
|
|
132
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
133
|
+
}
|
|
134
|
+
}).then(function (res) {
|
|
135
|
+
if (!res) return;
|
|
136
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
137
|
+
setDictList(res.data.dictList);
|
|
138
|
+
// 总页数
|
|
139
|
+
setTableParams(function (pre) {
|
|
140
|
+
return _objectSpread(_objectSpread({}, pre), {}, {
|
|
141
|
+
total: res.data.total
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
} else {
|
|
145
|
+
message.error('查询列表失败!');
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
//删除
|
|
150
|
+
var handleDeletet = function handleDeletet(id) {
|
|
151
|
+
Modal.confirm({
|
|
152
|
+
// wrapClassName: `${classPrefix}-confirm`,
|
|
153
|
+
title: '提示',
|
|
154
|
+
icon: null,
|
|
155
|
+
closable: true,
|
|
156
|
+
content: '您确定要删除当前字典?',
|
|
157
|
+
okText: '确定',
|
|
158
|
+
cancelText: '取消',
|
|
159
|
+
onOk: function onOk() {
|
|
160
|
+
handleDeleteMap(id);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
var handleDeleteMap = function handleDeleteMap(id) {
|
|
165
|
+
request(apis.dict.dictDelete, {
|
|
166
|
+
method: 'post',
|
|
167
|
+
data: {
|
|
168
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
169
|
+
id: id
|
|
170
|
+
}
|
|
171
|
+
}).then(function (res) {
|
|
172
|
+
if (!res) return;
|
|
173
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
174
|
+
message.success("\u5220\u9664\u5B57\u5178\u6210\u529F\uFF01");
|
|
175
|
+
getList();
|
|
176
|
+
} else {
|
|
177
|
+
message.error('删除字典失败!');
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
182
|
+
className: "".concat(className)
|
|
183
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
184
|
+
className: "".concat(className, "-searchTop")
|
|
185
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
186
|
+
type: "primary",
|
|
187
|
+
onClick: handleAddDict
|
|
188
|
+
}, /*#__PURE__*/React.createElement(PlusOutlined, null), "\u521B\u5EFA\u5B57\u5178"))), /*#__PURE__*/React.createElement(Table, {
|
|
189
|
+
rowKey: "id",
|
|
190
|
+
dataSource: dictList,
|
|
191
|
+
pagination: tableParams,
|
|
192
|
+
columns: columns,
|
|
193
|
+
onChange: handlePage,
|
|
194
|
+
scroll: {
|
|
195
|
+
x: 992,
|
|
196
|
+
y: 390
|
|
197
|
+
}
|
|
198
|
+
}), addDictShow && (/*#__PURE__*/React.createElement(CreateDict, {
|
|
199
|
+
addDictShow: addDictShow,
|
|
200
|
+
currentDictDetail: dictDetail || null,
|
|
201
|
+
onSetclose: function onSetclose() {
|
|
202
|
+
setAddDictShow(false);
|
|
203
|
+
getList();
|
|
204
|
+
}
|
|
205
|
+
})));
|
|
206
|
+
};
|
|
207
|
+
export default DictionaryManagement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DetailType } from './type';
|
|
3
|
+
import './css/index.less';
|
|
4
|
+
declare const clear: React.FC<{
|
|
5
|
+
addLocShow: boolean;
|
|
6
|
+
onSetclose: Function;
|
|
7
|
+
currentDetail: DetailType | undefined | null;
|
|
8
|
+
type: number;
|
|
9
|
+
}>;
|
|
10
|
+
export default clear;
|