@zgfe/modules-settings 1.2.51-zhongyuan.1 → 1.2.51-zhongyuan.5
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/demo/index.js +6 -6
- package/es/components/card/index.js +6 -6
- package/es/components/card/index.less +87 -87
- 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/demo/index.js +5 -5
- package/es/components/picCircleSelect/index.js +7 -8
- package/es/components/picCircleSelect/index.less +37 -37
- package/es/components/processCanvas/customNode/node_point.js +4 -4
- package/es/components/processCanvas/demo/index.js +5 -6
- package/es/components/processCanvas/index.js +11 -11
- package/es/components/processCanvas/styles/customNode.less +149 -149
- package/es/components/processCanvas/styles/index.less +34 -34
- package/es/components/processCanvas/toolbar.js +5 -5
- package/es/components/selectAppWrapper/index.js +14 -15
- package/es/components/settingTabs/index.js +5 -5
- package/es/components/settingTabs/index.less +51 -51
- package/es/constants/api.d.ts +13 -0
- package/es/constants/api.js +18 -2
- 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/appInfo/index.js +7 -7
- package/es/modules/appSettings/dataAccessFilter/index.js +5 -5
- package/es/modules/appSettings/dataAccessFilter/index.less +5 -5
- package/es/modules/appSettings/virtualSource/index.js +7 -7
- 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.js +12 -12
- package/es/modules/companySetting/appList/index.less +126 -126
- package/es/modules/companySetting/application/applicationForm.js +9 -9
- package/es/modules/companySetting/application/applicationSetting.js +5 -5
- package/es/modules/companySetting/application/index.js +28 -28
- package/es/modules/companySetting/application/index.less +126 -126
- package/es/modules/companySetting/business/businessForm.js +7 -7
- package/es/modules/companySetting/business/index.js +27 -27
- package/es/modules/companySetting/business/index.less +92 -92
- package/es/modules/companySetting/cost/index.js +20 -20
- package/es/modules/companySetting/cost/index.less +38 -38
- package/es/modules/companySetting/department/index.js +16 -16
- package/es/modules/companySetting/department/index.less +157 -157
- package/es/modules/companySetting/edit/authConfig.js +5 -5
- package/es/modules/companySetting/edit/authConfigCEP.js +11 -11
- package/es/modules/companySetting/edit/authGroup.js +13 -13
- package/es/modules/companySetting/edit/authModule.js +18 -18
- package/es/modules/companySetting/edit/multiAuthModule.js +13 -13
- 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/edit/user.js +14 -14
- package/es/modules/companySetting/edit/userGroup.js +16 -16
- package/es/modules/companySetting/index.js +29 -29
- package/es/modules/companySetting/index.less +90 -90
- package/es/modules/companySetting/info/index.js +7 -7
- 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.js +28 -28
- package/es/modules/companySetting/mainPart/index.less +239 -239
- package/es/modules/companySetting/mainPart/mainPartForm.js +13 -13
- package/es/modules/companySetting/mainPart/mainPartSetting.js +5 -5
- package/es/modules/companySetting/mainPart/useColumns.js +16 -16
- package/es/modules/companySetting/operationLog/index.js +13 -13
- package/es/modules/companySetting/operationLog/index.less +33 -33
- package/es/modules/companySetting/role/index.js +23 -23
- package/es/modules/companySetting/role/index.less +296 -296
- package/es/modules/companySetting/role/setDataRangeDialog/index.js +2 -2
- 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 +193 -24
- package/es/modules/companySetting/user/index.less +11 -0
- package/es/modules/companySetting/user/invite.js +14 -14
- package/es/modules/companySetting/virtualApp/config.js +8 -8
- package/es/modules/companySetting/virtualApp/index.js +12 -12
- package/es/modules/companySetting/virtualApp/panels/list.js +8 -9
- package/es/modules/companySetting/virtualApp/panels/sourceItem.js +7 -7
- 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.js +7 -7
- package/es/modules/companySetting/wechatBinding/index.less +58 -58
- package/es/modules/createDemand/collectionAttributeList.js +9 -9
- package/es/modules/createDemand/constants.js +17 -17
- package/es/modules/createDemand/demo/index.js +7 -7
- package/es/modules/createDemand/demo/selectPoint.js +13 -13
- package/es/modules/createDemand/index.js +39 -41
- package/es/modules/createDemand/styles/index.less +277 -277
- package/es/modules/createDemand_bf/collectionAttributeList.js +9 -9
- package/es/modules/createDemand_bf/constants.js +4 -4
- package/es/modules/createDemand_bf/index.js +35 -35
- package/es/modules/createDemand_bf/styles/index.less +222 -222
- package/es/modules/createProcess/components/index.less +52 -52
- package/es/modules/createProcess/components/processNode.js +11 -11
- package/es/modules/createProcess/index.js +17 -17
- package/es/modules/createProcess/index.less +114 -114
- package/es/modules/createProcess/title/index.js +11 -11
- package/es/modules/createProcess/title/index.less +53 -53
- package/es/modules/dealDemand/collectionAttributeList.js +9 -9
- package/es/modules/dealDemand/constants.js +7 -7
- package/es/modules/dealDemand/demo/index.js +7 -7
- package/es/modules/dealDemand/demo/selectPoint.js +13 -13
- package/es/modules/dealDemand/index.js +22 -24
- package/es/modules/dealDemand/styles/index.less +265 -265
- package/es/modules/demandManage/index.js +14 -15
- package/es/modules/demandManage/styles/index.less +210 -210
- package/es/modules/getPassword/index.js +10 -10
- package/es/modules/getPassword/index.less +122 -122
- package/es/modules/messageList/index.js +7 -8
- package/es/modules/messageList/index.less +81 -81
- package/es/modules/personalSetting/index.js +5 -5
- package/es/modules/personalSetting/info/index.js +5 -5
- package/es/modules/personalSetting/reset/index.js +5 -5
- package/es/modules/personalSetting/securityLog/index.js +14 -14
- package/es/modules/personalSetting/securityLog/index.less +11 -11
- package/es/modules/personalSetting/styles/unbinding.less +73 -73
- package/es/modules/personalSetting/unbinding/index.js +5 -5
- package/es/modules/pointMap/ImportModal/demo/index.js +5 -5
- package/es/modules/pointMap/ImportModal/index.js +14 -14
- package/es/modules/pointMap/ImportModal/styles/index.less +91 -91
- package/es/modules/pointMap/demo/index.js +7 -7
- package/es/modules/pointMap/editTxt/index.js +11 -11
- package/es/modules/pointMap/editTxt/index.less +55 -55
- package/es/modules/pointMap/index.js +11 -11
- package/es/modules/pointMap/pageInfo.js +44 -46
- package/es/modules/pointMap/styles/index.less +38 -38
- package/es/modules/pointMap/styles/pageInfo.less +244 -244
- package/es/modules/pointMap/styles/tree.css +142 -0
- package/es/modules/pointMap/styles/tree.less +29 -0
- package/es/modules/pointMap/tree.js +75 -27
- package/es/modules/systemSetting/Dictionary.d.ts +3 -0
- package/es/modules/systemSetting/Dictionary.js +387 -0
- package/es/modules/systemSetting/DictionaryType.d.ts +14 -0
- package/es/modules/systemSetting/DictionaryType.js +203 -0
- package/es/modules/systemSetting/approvalmanage/approvalStrategy/index.js +14 -14
- package/es/modules/systemSetting/approvalmanage/approvalStrategy/index.less +14 -14
- package/es/modules/systemSetting/approvalmanage/index.js +5 -5
- package/es/modules/systemSetting/approvalmanage/index.less +5 -5
- package/es/modules/systemSetting/approvalmanage/processManage/index.js +13 -13
- package/es/modules/systemSetting/approvalmanage/processManage/index.less +39 -39
- package/es/modules/systemSetting/authUrl.js +15 -15
- package/es/modules/systemSetting/document-setting/index.d.ts +3 -0
- package/es/modules/systemSetting/document-setting/index.js +467 -0
- package/es/modules/systemSetting/img/empty-data.png +0 -0
- package/es/modules/systemSetting/index.css +111 -0
- package/es/modules/systemSetting/index.js +19 -8
- package/es/modules/systemSetting/index.less +117 -0
- package/es/modules/systemSetting/notice/configItem/index.less +21 -21
- package/es/modules/systemSetting/notice/edit/index.js +5 -5
- package/es/modules/systemSetting/notice/edit/index.less +26 -26
- package/es/modules/systemSetting/notice/index.js +11 -11
- package/es/requests/department.js +6 -6
- package/es/requests/role.js +6 -6
- package/es/types/companySetting.d.ts +1 -0
- package/es/utils/base64.js +0 -1
- package/es/utils/constants.js +0 -4
- package/es/utils/functionalPermissions.js +6 -8
- package/es/utils/util.js +16 -16
- package/package.json +5 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
7
|
-
function _toConsumableArray(
|
|
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 _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _iterableToArray(
|
|
10
|
-
function _arrayWithoutHoles(
|
|
11
|
-
function _slicedToArray(
|
|
9
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
10
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
11
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
12
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _iterableToArrayLimit(
|
|
14
|
-
function _arrayWithHoles(
|
|
15
|
-
function _createForOfIteratorHelper(
|
|
16
|
-
function _unsupportedIterableToArray(
|
|
17
|
-
function _arrayLikeToArray(
|
|
18
|
-
import { Button, Dropdown, Empty, Input, message, Modal, Select, Tree } from 'antd';
|
|
13
|
+
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; } }
|
|
14
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
15
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
16
|
+
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; } }
|
|
17
|
+
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; }
|
|
18
|
+
import { Button, Dropdown, Empty, Input, message, Modal, Select, Tree, Popover, Spin } from 'antd';
|
|
19
19
|
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
20
20
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
21
21
|
import './styles/tree.less';
|
|
@@ -23,7 +23,6 @@ import { BizDialog, BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
|
23
23
|
import request from '../../utils/ajax';
|
|
24
24
|
import apis from '../../constants/api';
|
|
25
25
|
import ImportModel from './ImportModal';
|
|
26
|
-
var Search = Input.Search;
|
|
27
26
|
var classPrefix = 'setting-point-map-tree';
|
|
28
27
|
var formatTreeData = function formatTreeData(list, storey) {
|
|
29
28
|
var listTemp = JSON.parse(JSON.stringify(list));
|
|
@@ -369,10 +368,9 @@ var pointMap = function pointMap(props) {
|
|
|
369
368
|
}
|
|
370
369
|
// message.info(`Click on item ${key}`);
|
|
371
370
|
};
|
|
372
|
-
|
|
373
371
|
return /*#__PURE__*/React.createElement("div", {
|
|
374
372
|
className: "".concat(classPrefix, "-tree-item")
|
|
375
|
-
}, changeNameId === nodeData.id ? /*#__PURE__*/React.createElement(Input, {
|
|
373
|
+
}, changeNameId === nodeData.id ? (/*#__PURE__*/React.createElement(Input, {
|
|
376
374
|
style: {
|
|
377
375
|
padding: '1px 11px',
|
|
378
376
|
marginTop: 1
|
|
@@ -407,14 +405,14 @@ var pointMap = function pointMap(props) {
|
|
|
407
405
|
setChangeNameId(undefined);
|
|
408
406
|
}
|
|
409
407
|
}
|
|
410
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
408
|
+
})) : (/*#__PURE__*/React.createElement("div", {
|
|
411
409
|
className: "".concat(classPrefix, "-tree-item-title")
|
|
412
410
|
}, /*#__PURE__*/React.createElement("span", {
|
|
413
411
|
onDoubleClick: function onDoubleClick() {
|
|
414
412
|
setChangeNameId(nodeData.id);
|
|
415
413
|
setChangeNameString(nodeData.name);
|
|
416
414
|
}
|
|
417
|
-
}, nodeData.name)), /*#__PURE__*/React.createElement(Dropdown, {
|
|
415
|
+
}, nodeData.name))), /*#__PURE__*/React.createElement(Dropdown, {
|
|
418
416
|
disabled: !authority[1724922805],
|
|
419
417
|
placement: 'bottomRight',
|
|
420
418
|
menu: {
|
|
@@ -473,6 +471,37 @@ var pointMap = function pointMap(props) {
|
|
|
473
471
|
var downloadHelpFile = function downloadHelpFile() {
|
|
474
472
|
window.open("/\u63A8\u8350\u57CB\u70B9\u65B9\u6848.xlsx");
|
|
475
473
|
};
|
|
474
|
+
// 分享看板二维码
|
|
475
|
+
var _useState35 = useState(''),
|
|
476
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
|
477
|
+
qrCodeShare = _useState36[0],
|
|
478
|
+
setqrCodeShare = _useState36[1];
|
|
479
|
+
// 分享看板二维码-显示控制
|
|
480
|
+
var _useState37 = useState(false),
|
|
481
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
482
|
+
qrCodeShareShow = _useState38[0],
|
|
483
|
+
setqrCodeShareShow = _useState38[1];
|
|
484
|
+
// 二维码加载中
|
|
485
|
+
var _useState39 = useState(false),
|
|
486
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
487
|
+
qrCodeLoading = _useState40[0],
|
|
488
|
+
setQrCodeLoading = _useState40[1];
|
|
489
|
+
var onOpenChangeShare = function onOpenChangeShare(open) {
|
|
490
|
+
setqrCodeShareShow(open);
|
|
491
|
+
if (qrCodeShare === '') {
|
|
492
|
+
setQrCodeLoading(true);
|
|
493
|
+
request(apis.sharePanel, {
|
|
494
|
+
method: 'post',
|
|
495
|
+
data: {
|
|
496
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
497
|
+
platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
|
|
498
|
+
}
|
|
499
|
+
}).then(function (res) {
|
|
500
|
+
setqrCodeShare("data:image/png;base64,".concat(res.data));
|
|
501
|
+
setQrCodeLoading(false);
|
|
502
|
+
}).catch(function () {});
|
|
503
|
+
}
|
|
504
|
+
};
|
|
476
505
|
return /*#__PURE__*/React.createElement("div", {
|
|
477
506
|
className: classPrefix
|
|
478
507
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -546,7 +575,7 @@ var pointMap = function pointMap(props) {
|
|
|
546
575
|
type: "xiazai1"
|
|
547
576
|
}), "\u5BFC\u5165\u9875\u9762")), /*#__PURE__*/React.createElement("div", {
|
|
548
577
|
className: "".concat(classPrefix, "-search")
|
|
549
|
-
}, /*#__PURE__*/React.createElement(Select, {
|
|
578
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
550
579
|
value: value,
|
|
551
580
|
placeholder: "\u8BF7\u8F93\u5165\u9875\u9762\u540D\u79F0\u641C\u7D22",
|
|
552
581
|
// searchValue={value}
|
|
@@ -565,9 +594,28 @@ var pointMap = function pointMap(props) {
|
|
|
565
594
|
popupClassName: "".concat(classPrefix, "-search-popup")
|
|
566
595
|
}), /*#__PURE__*/React.createElement(IconFont, {
|
|
567
596
|
type: "sousuo"
|
|
568
|
-
})), /*#__PURE__*/React.createElement(
|
|
597
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
598
|
+
open: qrCodeShareShow,
|
|
599
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
600
|
+
className: "".concat(qrCodeLoading ? 'loading' : '', " qrcode-img")
|
|
601
|
+
}, /*#__PURE__*/React.createElement("div", null, "\u624B\u673A\u626B\u7801\u5206\u4EAB\u5F53\u524D\u770B\u677F"), /*#__PURE__*/React.createElement(Spin, {
|
|
602
|
+
spinning: qrCodeLoading
|
|
603
|
+
}, qrCodeShare && /*#__PURE__*/React.createElement("img", {
|
|
604
|
+
src: qrCodeShare
|
|
605
|
+
}))),
|
|
606
|
+
trigger: "hover",
|
|
607
|
+
placement: "bottom",
|
|
608
|
+
onOpenChange: onOpenChangeShare,
|
|
609
|
+
getPopupContainer: function getPopupContainer() {
|
|
610
|
+
return document.getElementById('share-qrcode-box');
|
|
611
|
+
}
|
|
612
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
613
|
+
id: "share-qrcode-box"
|
|
614
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
615
|
+
type: "daochu"
|
|
616
|
+
}), "\u5206\u4EAB\u770B\u677F"))), /*#__PURE__*/React.createElement("div", {
|
|
569
617
|
className: "".concat(classPrefix, "-tree")
|
|
570
|
-
}, treeData && treeData.length ? /*#__PURE__*/React.createElement(Tree, {
|
|
618
|
+
}, treeData && treeData.length ? (/*#__PURE__*/React.createElement(Tree, {
|
|
571
619
|
ref: treeRef,
|
|
572
620
|
onExpand: onExpand,
|
|
573
621
|
expandedKeys: expandedKeys,
|
|
@@ -597,7 +645,7 @@ var pointMap = function pointMap(props) {
|
|
|
597
645
|
}));
|
|
598
646
|
});
|
|
599
647
|
}
|
|
600
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
648
|
+
})) : (/*#__PURE__*/React.createElement("div", {
|
|
601
649
|
className: "".concat(classPrefix, "-empty")
|
|
602
650
|
}, /*#__PURE__*/React.createElement(Empty, {
|
|
603
651
|
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
@@ -613,7 +661,7 @@ var pointMap = function pointMap(props) {
|
|
|
613
661
|
onClick: function onClick() {
|
|
614
662
|
return addPage(1, 0);
|
|
615
663
|
}
|
|
616
|
-
}, "\u6DFB\u52A0\u9875\u9762"))), isShowImport && /*#__PURE__*/React.createElement(ImportModel, {
|
|
664
|
+
}, "\u6DFB\u52A0\u9875\u9762")))), isShowImport && (/*#__PURE__*/React.createElement(ImportModel, {
|
|
617
665
|
onCancel: function onCancel() {
|
|
618
666
|
setIsShowImport(false);
|
|
619
667
|
},
|
|
@@ -621,7 +669,7 @@ var pointMap = function pointMap(props) {
|
|
|
621
669
|
getPointTree();
|
|
622
670
|
setIsShowImport(false);
|
|
623
671
|
}
|
|
624
|
-
}), /*#__PURE__*/React.createElement(BizDialog, {
|
|
672
|
+
})), /*#__PURE__*/React.createElement(BizDialog, {
|
|
625
673
|
closable: true,
|
|
626
674
|
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconFont, {
|
|
627
675
|
style: {
|
|
@@ -0,0 +1,387 @@
|
|
|
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
9
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
10
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
11
|
+
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."); }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
16
|
+
import React, { useEffect, useState } from 'react';
|
|
17
|
+
import { Tabs, Empty, Button, Modal, Space, Table, Input, message, Form, Spin } from 'antd';
|
|
18
|
+
import { SettingOutlined, SearchOutlined } from '@ant-design/icons';
|
|
19
|
+
import apis from '../../constants/api';
|
|
20
|
+
import request from '../../utils/ajax';
|
|
21
|
+
import DictionaryType from './DictionaryType';
|
|
22
|
+
import moment from 'moment';
|
|
23
|
+
var pageName = 'DictionaryPage';
|
|
24
|
+
var Dictionary = function Dictionary() {
|
|
25
|
+
var _useState = useState(false),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
isTypeModalOpen = _useState2[0],
|
|
28
|
+
setIsTypeModalOpen = _useState2[1];
|
|
29
|
+
var _useState3 = useState(false),
|
|
30
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
|
+
loadingStatus = _useState4[0],
|
|
32
|
+
setLoadingStatus = _useState4[1];
|
|
33
|
+
var _useState5 = useState([]),
|
|
34
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
+
dictionaryList = _useState6[0],
|
|
36
|
+
setDictionaryList = _useState6[1];
|
|
37
|
+
var _useState7 = useState(),
|
|
38
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
39
|
+
currentTypeId = _useState8[0],
|
|
40
|
+
setCurrentTypeId = _useState8[1];
|
|
41
|
+
var handleChangeTab = function handleChangeTab(id) {
|
|
42
|
+
setCurrentTypeId(id);
|
|
43
|
+
getDictionaryContentList(id, searchValue);
|
|
44
|
+
};
|
|
45
|
+
var handleCancel = function handleCancel() {
|
|
46
|
+
setIsTypeModalOpen(false);
|
|
47
|
+
getList();
|
|
48
|
+
};
|
|
49
|
+
useEffect(function () {
|
|
50
|
+
setLoadingStatus(true);
|
|
51
|
+
getList();
|
|
52
|
+
}, []);
|
|
53
|
+
var getList = function getList() {
|
|
54
|
+
request(apis.setting.getDictionaryList, {
|
|
55
|
+
method: 'get',
|
|
56
|
+
params: {
|
|
57
|
+
// typeName: searchValue,
|
|
58
|
+
}
|
|
59
|
+
}).then(/*#__PURE__*/function () {
|
|
60
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
|
|
61
|
+
var newArr;
|
|
62
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
63
|
+
while (1) switch (_context.prev = _context.next) {
|
|
64
|
+
case 0:
|
|
65
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
66
|
+
newArr = (res === null || res === void 0 ? void 0 : res.data) && (res === null || res === void 0 ? void 0 : res.data).map(function (o) {
|
|
67
|
+
return _objectSpread({
|
|
68
|
+
label: o.name,
|
|
69
|
+
key: o.id,
|
|
70
|
+
isEdit: false
|
|
71
|
+
}, o);
|
|
72
|
+
});
|
|
73
|
+
setDictionaryList(newArr);
|
|
74
|
+
setCurrentTypeId(function () {
|
|
75
|
+
getDictionaryContentList(newArr[0].key, searchValue);
|
|
76
|
+
return newArr[0].key;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
case 1:
|
|
80
|
+
case "end":
|
|
81
|
+
return _context.stop();
|
|
82
|
+
}
|
|
83
|
+
}, _callee);
|
|
84
|
+
}));
|
|
85
|
+
return function (_x) {
|
|
86
|
+
return _ref.apply(this, arguments);
|
|
87
|
+
};
|
|
88
|
+
}()).finally(function () {
|
|
89
|
+
setLoadingStatus(false);
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
var _useState9 = useState(''),
|
|
93
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
94
|
+
searchValue = _useState10[0],
|
|
95
|
+
setSearchValue = _useState10[1];
|
|
96
|
+
var onSearch = function onSearch(e) {
|
|
97
|
+
setSearchValue(function () {
|
|
98
|
+
var _e$target, _e$target2;
|
|
99
|
+
getDictionaryContentList(currentTypeId, e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
100
|
+
return e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value;
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
var _useState11 = useState([]),
|
|
104
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
105
|
+
dictionaryContentList = _useState12[0],
|
|
106
|
+
setDictionaryContentList = _useState12[1];
|
|
107
|
+
var _useState13 = useState(false),
|
|
108
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
109
|
+
tableLoading = _useState14[0],
|
|
110
|
+
setTableLoading = _useState14[1];
|
|
111
|
+
var getDictionaryContentList = function getDictionaryContentList(id) {
|
|
112
|
+
var searchContent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
113
|
+
setTableLoading(true);
|
|
114
|
+
request(apis.setting.getDictionaryContentList, {
|
|
115
|
+
method: 'get',
|
|
116
|
+
params: {
|
|
117
|
+
dictionaryId: id,
|
|
118
|
+
content: searchContent
|
|
119
|
+
}
|
|
120
|
+
}).then(function (res) {
|
|
121
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
122
|
+
(res === null || res === void 0 ? void 0 : res.data) && setDictionaryContentList(res.data);
|
|
123
|
+
}
|
|
124
|
+
}).finally(function () {
|
|
125
|
+
setTableLoading(false);
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
var _Form$useForm = Form.useForm(),
|
|
129
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
130
|
+
form = _Form$useForm2[0];
|
|
131
|
+
var saveContent = /*#__PURE__*/function () {
|
|
132
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
133
|
+
var validateResult, resultApi;
|
|
134
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
135
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
136
|
+
case 0:
|
|
137
|
+
_context2.next = 2;
|
|
138
|
+
return form.validateFields();
|
|
139
|
+
case 2:
|
|
140
|
+
validateResult = _context2.sent;
|
|
141
|
+
resultApi = isValueEdit ? apis.setting.updateDictionaryContent : apis.setting.saveDictionaryContent;
|
|
142
|
+
request(resultApi, {
|
|
143
|
+
method: 'post',
|
|
144
|
+
data: {
|
|
145
|
+
dictionaryId: currentTypeId,
|
|
146
|
+
content: validateResult.value,
|
|
147
|
+
remarks: validateResult.valueRemark,
|
|
148
|
+
id: isValueEdit && (currentRowData === null || currentRowData === void 0 ? void 0 : currentRowData.id)
|
|
149
|
+
}
|
|
150
|
+
}).then(function (res) {
|
|
151
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
152
|
+
message.success('保存成功');
|
|
153
|
+
form.resetFields();
|
|
154
|
+
setIsModalOpen(false);
|
|
155
|
+
getDictionaryContentList(currentTypeId, searchValue);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
case 5:
|
|
159
|
+
case "end":
|
|
160
|
+
return _context2.stop();
|
|
161
|
+
}
|
|
162
|
+
}, _callee2);
|
|
163
|
+
}));
|
|
164
|
+
return function saveContent() {
|
|
165
|
+
return _ref2.apply(this, arguments);
|
|
166
|
+
};
|
|
167
|
+
}();
|
|
168
|
+
var _useState15 = useState([]),
|
|
169
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
170
|
+
selectedRowKeys = _useState16[0],
|
|
171
|
+
setSelectedRowKeys = _useState16[1];
|
|
172
|
+
var _useState17 = useState(),
|
|
173
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
174
|
+
currentRowData = _useState18[0],
|
|
175
|
+
setCurrentRowData = _useState18[1];
|
|
176
|
+
var _useState19 = useState(false),
|
|
177
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
178
|
+
isValueEdit = _useState20[0],
|
|
179
|
+
setIsValueEdit = _useState20[1];
|
|
180
|
+
var columns = [{
|
|
181
|
+
title: '值',
|
|
182
|
+
dataIndex: 'content'
|
|
183
|
+
}, {
|
|
184
|
+
title: '值说明',
|
|
185
|
+
dataIndex: 'remarks'
|
|
186
|
+
}, {
|
|
187
|
+
title: '创建时间',
|
|
188
|
+
dataIndex: 'createdTime',
|
|
189
|
+
width: 170,
|
|
190
|
+
sorter: function sorter(a, b) {
|
|
191
|
+
return moment(b.createdTime).valueOf() - moment(a.createdTime).valueOf();
|
|
192
|
+
},
|
|
193
|
+
render: function render(createdTime) {
|
|
194
|
+
return moment(createdTime).format('YYYY-MM-DD HH:mm:ss');
|
|
195
|
+
}
|
|
196
|
+
}, {
|
|
197
|
+
title: '修改时间',
|
|
198
|
+
width: 170,
|
|
199
|
+
dataIndex: 'updatedTime',
|
|
200
|
+
sorter: function sorter(a, b) {
|
|
201
|
+
return moment(b.updatedTime).valueOf() - moment(a.updatedTime).valueOf();
|
|
202
|
+
},
|
|
203
|
+
render: function render(updatedTime) {
|
|
204
|
+
return moment(updatedTime).format('YYYY-MM-DD HH:mm:ss');
|
|
205
|
+
}
|
|
206
|
+
}, {
|
|
207
|
+
title: '操作',
|
|
208
|
+
width: 100,
|
|
209
|
+
key: 'operation',
|
|
210
|
+
render: function render(_, row) {
|
|
211
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
212
|
+
size: "middle"
|
|
213
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
214
|
+
onClick: function onClick() {
|
|
215
|
+
setIsModalOpen(true);
|
|
216
|
+
setCurrentRowData(row);
|
|
217
|
+
setIsValueEdit(true);
|
|
218
|
+
form.setFieldsValue({
|
|
219
|
+
value: row.content,
|
|
220
|
+
valueRemark: row.remarks
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}, "\u7F16\u8F91"));
|
|
224
|
+
}
|
|
225
|
+
}];
|
|
226
|
+
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
227
|
+
setSelectedRowKeys(newSelectedRowKeys);
|
|
228
|
+
};
|
|
229
|
+
var rowSelection = {
|
|
230
|
+
selectedRowKeys: selectedRowKeys,
|
|
231
|
+
onChange: onSelectChange
|
|
232
|
+
};
|
|
233
|
+
var handleDelete = function handleDelete() {
|
|
234
|
+
if (selectedRowKeys.length < 1) {
|
|
235
|
+
message.warning('请选择要删除的数据');
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
Modal.confirm({
|
|
239
|
+
title: '删除提示',
|
|
240
|
+
onOk: onOkDelete,
|
|
241
|
+
width: 450,
|
|
242
|
+
cancelText: '取消',
|
|
243
|
+
okText: '确定',
|
|
244
|
+
centered: true,
|
|
245
|
+
content: '是否确认删除?'
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
var onOkDelete = function onOkDelete() {
|
|
249
|
+
request(apis.setting.deleteDictionaryContentList, {
|
|
250
|
+
method: 'post',
|
|
251
|
+
data: {
|
|
252
|
+
ids: selectedRowKeys.join()
|
|
253
|
+
}
|
|
254
|
+
}).then(function (res) {
|
|
255
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
256
|
+
message.success('删除成功');
|
|
257
|
+
getDictionaryContentList(currentTypeId, searchValue);
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
var _useState21 = useState(false),
|
|
262
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
263
|
+
isModalOpen = _useState22[0],
|
|
264
|
+
setIsModalOpen = _useState22[1];
|
|
265
|
+
var handleValueCancel = function handleValueCancel() {
|
|
266
|
+
setIsModalOpen(false);
|
|
267
|
+
setIsValueEdit(false);
|
|
268
|
+
form.resetFields();
|
|
269
|
+
};
|
|
270
|
+
var renderTabBar = function renderTabBar(props, DefaultTabBar) {
|
|
271
|
+
var getButton = function getButton() {
|
|
272
|
+
return /*#__PURE__*/React.createElement(DefaultTabBar, _objectSpread(_objectSpread({}, props), {}, {
|
|
273
|
+
className: "site-custom-tab-bar"
|
|
274
|
+
}));
|
|
275
|
+
};
|
|
276
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, getButton());
|
|
277
|
+
};
|
|
278
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
279
|
+
className: "".concat(pageName),
|
|
280
|
+
style: {
|
|
281
|
+
padding: '16px'
|
|
282
|
+
}
|
|
283
|
+
}, dictionaryList.length < 1 && !loadingStatus && (/*#__PURE__*/React.createElement(Empty, {
|
|
284
|
+
image: "./img/empty-data.png",
|
|
285
|
+
imageStyle: {
|
|
286
|
+
height: 120
|
|
287
|
+
},
|
|
288
|
+
description: /*#__PURE__*/React.createElement("span", {
|
|
289
|
+
style: {
|
|
290
|
+
color: '#999'
|
|
291
|
+
}
|
|
292
|
+
}, "\u8BF7\u5148\u6DFB\u52A0\u5B57\u5178\u7C7B\u578B")
|
|
293
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
294
|
+
type: "primary",
|
|
295
|
+
onClick: function onClick() {
|
|
296
|
+
return setIsTypeModalOpen(true);
|
|
297
|
+
}
|
|
298
|
+
}, "\u6DFB\u52A0\u5B57\u5178\u7C7B\u578B"))), loadingStatus && /*#__PURE__*/React.createElement(Spin, {
|
|
299
|
+
tip: "\u52A0\u8F7D\u4E2D"
|
|
300
|
+
}), dictionaryList.length > 0 && (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
301
|
+
className: "".concat(pageName, "-header")
|
|
302
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
303
|
+
items: dictionaryList,
|
|
304
|
+
renderTabBar: renderTabBar,
|
|
305
|
+
activeKey: currentTypeId,
|
|
306
|
+
onTabClick: handleChangeTab
|
|
307
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
308
|
+
className: "".concat(pageName, "-tabsRight-text"),
|
|
309
|
+
onClick: function onClick() {
|
|
310
|
+
return setIsTypeModalOpen(true);
|
|
311
|
+
}
|
|
312
|
+
}, /*#__PURE__*/React.createElement(SettingOutlined, {
|
|
313
|
+
style: {
|
|
314
|
+
marginRight: '8px'
|
|
315
|
+
}
|
|
316
|
+
}), "\u7C7B\u578B\u7BA1\u7406")), /*#__PURE__*/React.createElement("div", {
|
|
317
|
+
className: "".concat(pageName, "-header-search")
|
|
318
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
319
|
+
bordered: false,
|
|
320
|
+
prefix: /*#__PURE__*/React.createElement(SearchOutlined, null),
|
|
321
|
+
placeholder: "\u641C\u7D22\u503C/\u503C\u8BF4\u660E",
|
|
322
|
+
onChange: onSearch,
|
|
323
|
+
style: {
|
|
324
|
+
width: 200
|
|
325
|
+
}
|
|
326
|
+
}), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
327
|
+
onClick: function onClick() {
|
|
328
|
+
return setIsModalOpen(true);
|
|
329
|
+
}
|
|
330
|
+
}, "\u6DFB\u52A0"), /*#__PURE__*/React.createElement(Button, {
|
|
331
|
+
onClick: handleDelete
|
|
332
|
+
}, "\u6279\u91CF\u5220\u9664"))), /*#__PURE__*/React.createElement(Table, {
|
|
333
|
+
rowKey: 'id',
|
|
334
|
+
rowSelection: rowSelection,
|
|
335
|
+
dataSource: dictionaryContentList,
|
|
336
|
+
columns: columns,
|
|
337
|
+
pagination: false,
|
|
338
|
+
loading: tableLoading
|
|
339
|
+
}))), /*#__PURE__*/React.createElement(Modal, {
|
|
340
|
+
title: "\u5B57\u5178\u7C7B\u578B\u7BA1\u7406",
|
|
341
|
+
open: isTypeModalOpen,
|
|
342
|
+
footer: null,
|
|
343
|
+
onCancel: handleCancel
|
|
344
|
+
}, /*#__PURE__*/React.createElement(DictionaryType, {
|
|
345
|
+
dictionaryListArr: dictionaryList
|
|
346
|
+
})), /*#__PURE__*/React.createElement(Modal, {
|
|
347
|
+
title: "".concat(isValueEdit ? '修改值,值说明' : '添加值,值说明'),
|
|
348
|
+
okText: "\u786E\u5B9A",
|
|
349
|
+
cancelText: "\u53D6\u6D88",
|
|
350
|
+
open: isModalOpen,
|
|
351
|
+
onCancel: handleValueCancel,
|
|
352
|
+
onOk: saveContent
|
|
353
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
354
|
+
name: "basic",
|
|
355
|
+
labelCol: {
|
|
356
|
+
span: 3
|
|
357
|
+
},
|
|
358
|
+
form: form,
|
|
359
|
+
wrapperCol: {
|
|
360
|
+
span: 21
|
|
361
|
+
},
|
|
362
|
+
initialValues: {
|
|
363
|
+
value: '',
|
|
364
|
+
valueRemark: ''
|
|
365
|
+
},
|
|
366
|
+
labelAlign: "left"
|
|
367
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
368
|
+
label: "\u503C",
|
|
369
|
+
name: "value",
|
|
370
|
+
rules: [{
|
|
371
|
+
required: true,
|
|
372
|
+
message: '值不可为空'
|
|
373
|
+
}]
|
|
374
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
375
|
+
showCount: true,
|
|
376
|
+
maxLength: 20,
|
|
377
|
+
placeholder: "\u8BF7\u8F93\u5165\u503C"
|
|
378
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
379
|
+
label: "\u503C\u8BF4\u660E",
|
|
380
|
+
name: "valueRemark"
|
|
381
|
+
}, /*#__PURE__*/React.createElement(Input.TextArea, {
|
|
382
|
+
showCount: true,
|
|
383
|
+
maxLength: 50,
|
|
384
|
+
placeholder: "\u8BF7\u8F93\u5165\u503C\u8BF4\u660E"
|
|
385
|
+
})))));
|
|
386
|
+
};
|
|
387
|
+
export default Dictionary;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface dictionaryType {
|
|
3
|
+
createdTime?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
key?: number;
|
|
6
|
+
label?: string;
|
|
7
|
+
id: number;
|
|
8
|
+
updatedTime?: string;
|
|
9
|
+
isEdit: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Dictionary: React.FC<{
|
|
12
|
+
dictionaryListArr: dictionaryType[];
|
|
13
|
+
}>;
|
|
14
|
+
export default Dictionary;
|