@zgfe/modules-settings 2.1.0-zhongyuan.1 → 2.1.0-zhongyuan.10
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/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/constants/api.d.ts +19 -0
- package/es/constants/api.js +23 -0
- package/es/modules/companySetting/application/index.js +5 -6
- package/es/modules/createDemand/demo/selectPoint.js +0 -1
- package/es/modules/createDemand_bf/demo/index.js +0 -1
- package/es/modules/createDemand_bf/index.js +0 -1
- package/es/modules/dealDemand/demo/index.js +0 -1
- package/es/modules/dealDemand/index.js +0 -2
- package/es/modules/demandManage/index.js +2 -2
- package/es/modules/pointMap/createMetaDrawer.js +102 -34
- package/es/modules/pointMap/pageInfo.js +43 -15
- package/es/modules/pointMap/styles/index.less +13 -0
- package/es/modules/pointMap/styles/pageInfo.less +439 -426
- package/es/modules/pointMap/styles/tree.less +14 -7
- package/es/modules/pointMap/tree.js +142 -37
- package/es/modules/systemSetting/Dictionary.d.ts +5 -2
- package/es/modules/systemSetting/Dictionary.js +54 -370
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/create.d.ts +9 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/create.js +244 -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 +263 -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 +1 -1
- package/es/modules/systemSetting/index.js +3 -1
- package/package.json +2 -2
|
@@ -32,9 +32,12 @@
|
|
|
32
32
|
position: relative;
|
|
33
33
|
display: grid;
|
|
34
34
|
grid-gap: 16px;
|
|
35
|
-
grid-template-columns: 1fr 20px;
|
|
35
|
+
grid-template-columns: 88px 1fr 20px;
|
|
36
36
|
align-items: center;
|
|
37
37
|
margin-top: 16px;
|
|
38
|
+
&-selectType {
|
|
39
|
+
width: 100px;
|
|
40
|
+
}
|
|
38
41
|
.qrcode-img {
|
|
39
42
|
display: inline-flex;
|
|
40
43
|
flex-direction: column;
|
|
@@ -63,12 +66,12 @@
|
|
|
63
66
|
padding-top: 138px;
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
|
-
.ant-select-selector {
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
.ant-select-selection-search-input {
|
|
70
|
-
|
|
71
|
-
}
|
|
69
|
+
// .ant-select-selector {
|
|
70
|
+
// padding-left: 40px !important;
|
|
71
|
+
// }
|
|
72
|
+
// .ant-select-selection-search-input {
|
|
73
|
+
// padding-left: 30px !important;
|
|
74
|
+
// }
|
|
72
75
|
&-popup {
|
|
73
76
|
.ant-select-item {
|
|
74
77
|
height: 32px !important;
|
|
@@ -79,6 +82,7 @@
|
|
|
79
82
|
position: absolute;
|
|
80
83
|
top: 6px;
|
|
81
84
|
left: 16px;
|
|
85
|
+
display: none;
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
&-tree {
|
|
@@ -127,6 +131,9 @@
|
|
|
127
131
|
overflow: hidden;
|
|
128
132
|
white-space: nowrap;
|
|
129
133
|
text-overflow: ellipsis;
|
|
134
|
+
&-name {
|
|
135
|
+
margin-right: 10px;
|
|
136
|
+
}
|
|
130
137
|
}
|
|
131
138
|
}
|
|
132
139
|
.ant-tree-title {
|
|
@@ -15,8 +15,8 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
15
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
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
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
|
-
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
18
|
+
import { Button, Dropdown, Empty, Input, message, Modal, Select, Tree, Popover, Spin, Tag, Checkbox } from 'antd';
|
|
19
|
+
import { QuestionCircleOutlined, EnvironmentOutlined } from '@ant-design/icons';
|
|
20
20
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
21
21
|
import './styles/tree.less';
|
|
22
22
|
import { BizDialog, BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
@@ -57,7 +57,10 @@ var formatTreeArr = function formatTreeArr(list, arrTemp, parentName) {
|
|
|
57
57
|
item.key = item.id;
|
|
58
58
|
arrTemp.push({
|
|
59
59
|
id: item.id,
|
|
60
|
-
name: parentName ? parentName + ' / ' + item.name : item.name
|
|
60
|
+
name: parentName ? parentName + ' / ' + item.name : item.name,
|
|
61
|
+
tagJson: item.labels.map(function (res) {
|
|
62
|
+
return res.labelName;
|
|
63
|
+
}).join('')
|
|
61
64
|
});
|
|
62
65
|
if (item.children.length > 0) {
|
|
63
66
|
formatTreeArr(item.children, arrTemp, item.name);
|
|
@@ -130,20 +133,29 @@ var pointMap = function pointMap(props) {
|
|
|
130
133
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
131
134
|
value = _useState26[0],
|
|
132
135
|
setValue = _useState26[1];
|
|
133
|
-
var _useState27 = useState(
|
|
136
|
+
var _useState27 = useState('name'),
|
|
134
137
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
var _useState29 = useState(
|
|
138
|
+
searchType = _useState28[0],
|
|
139
|
+
setSearchType = _useState28[1];
|
|
140
|
+
var _useState29 = useState(true),
|
|
138
141
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
var _useState31 = useState(
|
|
142
|
+
isInit = _useState30[0],
|
|
143
|
+
setIsInit = _useState30[1];
|
|
144
|
+
var _useState31 = useState(false),
|
|
142
145
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
143
|
-
|
|
144
|
-
|
|
146
|
+
isShowDel = _useState32[0],
|
|
147
|
+
setIsShowDel = _useState32[1];
|
|
148
|
+
var _useState33 = useState([]),
|
|
149
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
150
|
+
pointList = _useState34[0],
|
|
151
|
+
setPointList = _useState34[1];
|
|
152
|
+
var _useState35 = useState(!!props.pageStatusIsEdit),
|
|
153
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
|
154
|
+
pageStatusIsEdit = _useState36[0],
|
|
155
|
+
setPageStatusIsEdit = _useState36[1];
|
|
145
156
|
useEffect(function () {
|
|
146
157
|
pointGetVersion();
|
|
158
|
+
getPointList();
|
|
147
159
|
}, []);
|
|
148
160
|
useEffect(function () {
|
|
149
161
|
setPageStatusIsEdit(!!props.pageStatusIsEdit);
|
|
@@ -189,9 +201,9 @@ var pointMap = function pointMap(props) {
|
|
|
189
201
|
}
|
|
190
202
|
}).then(function (res) {
|
|
191
203
|
if (res && res.code === '100000') {
|
|
204
|
+
pageNum = ((res === null || res === void 0 ? void 0 : res.data.length) || 0) + 1;
|
|
192
205
|
setTreeData(formatTreeData((res === null || res === void 0 ? void 0 : res.data) || []));
|
|
193
206
|
setTreeArr(formatTreeArr((res === null || res === void 0 ? void 0 : res.data) || [], [], '') || []);
|
|
194
|
-
console.log('selectedKeys', selectedKeys);
|
|
195
207
|
if (!selectedKeys) {
|
|
196
208
|
setSelectedKeys((res === null || res === void 0 ? void 0 : res.data) ? [res === null || res === void 0 ? void 0 : res.data[0].id] : undefined);
|
|
197
209
|
props.onChangePage((res === null || res === void 0 ? void 0 : res.data) ? _objectSpread(_objectSpread({}, res === null || res === void 0 ? void 0 : res.data[0]), {}, {
|
|
@@ -206,6 +218,25 @@ var pointMap = function pointMap(props) {
|
|
|
206
218
|
console.log(err);
|
|
207
219
|
});
|
|
208
220
|
};
|
|
221
|
+
//查询位置标签
|
|
222
|
+
var getPointList = function getPointList() {
|
|
223
|
+
request(apis.dict.getTagList, {
|
|
224
|
+
method: 'post',
|
|
225
|
+
data: {
|
|
226
|
+
labelType: 1,
|
|
227
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
228
|
+
}
|
|
229
|
+
}).then(function (res) {
|
|
230
|
+
if (res.code == 100000) {
|
|
231
|
+
setPointList(res.data.map(function (res) {
|
|
232
|
+
return {
|
|
233
|
+
label: res.labelName,
|
|
234
|
+
value: res.id
|
|
235
|
+
};
|
|
236
|
+
}));
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
};
|
|
209
240
|
var addPage = function addPage(operationType, parentId, targetPageId) {
|
|
210
241
|
request(apis.createPage, {
|
|
211
242
|
method: 'post',
|
|
@@ -311,7 +342,6 @@ var pointMap = function pointMap(props) {
|
|
|
311
342
|
setAutoExpandParent(false);
|
|
312
343
|
};
|
|
313
344
|
var onDrop = function onDrop(info) {
|
|
314
|
-
// console.log('onDrop', info, selectedKeys);
|
|
315
345
|
moveNode({
|
|
316
346
|
oldParentId: info.dragNode.parentId,
|
|
317
347
|
newParentId: info.dropToGap ? info.node.parentId : info.node.id,
|
|
@@ -337,10 +367,8 @@ var pointMap = function pointMap(props) {
|
|
|
337
367
|
}
|
|
338
368
|
};
|
|
339
369
|
var titleRender = function titleRender(nodeData) {
|
|
340
|
-
// console.log('nodeData', nodeData);
|
|
341
370
|
var onItemClick = function onItemClick(_ref) {
|
|
342
371
|
var key = _ref.key;
|
|
343
|
-
console.log('key', key);
|
|
344
372
|
switch (key) {
|
|
345
373
|
case '0':
|
|
346
374
|
if (nodeData.storey >= 20) {
|
|
@@ -371,6 +399,17 @@ var pointMap = function pointMap(props) {
|
|
|
371
399
|
}
|
|
372
400
|
// message.info(`Click on item ${key}`);
|
|
373
401
|
};
|
|
402
|
+
//位置标签list
|
|
403
|
+
var color = ['magenta', 'red', 'volcano', 'orange', 'gold', 'lime', 'green', 'cyan', 'blue', 'geekblue', 'purple'];
|
|
404
|
+
var pointContent = /*#__PURE__*/React.createElement(React.Fragment, null, nodeData.labels.map(function (res, index) {
|
|
405
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
406
|
+
key: index,
|
|
407
|
+
color: color[index]
|
|
408
|
+
}, res.labelName);
|
|
409
|
+
}));
|
|
410
|
+
var pointIds = nodeData.labels.map(function (res) {
|
|
411
|
+
return res.id;
|
|
412
|
+
});
|
|
374
413
|
return /*#__PURE__*/React.createElement("div", {
|
|
375
414
|
className: "".concat(classPrefix, "-tree-item")
|
|
376
415
|
}, changeNameId === nodeData.id ? (/*#__PURE__*/React.createElement(Input, {
|
|
@@ -415,7 +454,13 @@ var pointMap = function pointMap(props) {
|
|
|
415
454
|
setChangeNameId(nodeData.id);
|
|
416
455
|
setChangeNameString(nodeData.name);
|
|
417
456
|
}
|
|
418
|
-
},
|
|
457
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
458
|
+
className: "".concat(classPrefix, "-tree-item-title-name")
|
|
459
|
+
}, nodeData.name, " (", nodeData.pointSum || 0, ")"), /*#__PURE__*/React.createElement(Popover, {
|
|
460
|
+
placement: "topLeft",
|
|
461
|
+
title: "\u4F4D\u7F6E\u6807\u7B7E",
|
|
462
|
+
content: pointContent
|
|
463
|
+
}, pointContent)))), /*#__PURE__*/React.createElement(Dropdown, {
|
|
419
464
|
disabled: !authority[1724922805],
|
|
420
465
|
placement: 'bottomRight',
|
|
421
466
|
menu: {
|
|
@@ -437,6 +482,22 @@ var pointMap = function pointMap(props) {
|
|
|
437
482
|
type: "xiafangtianjia"
|
|
438
483
|
}),
|
|
439
484
|
key: '2'
|
|
485
|
+
}, {
|
|
486
|
+
label: '选择位置标签',
|
|
487
|
+
icon: /*#__PURE__*/React.createElement(EnvironmentOutlined, null),
|
|
488
|
+
key: '5',
|
|
489
|
+
children: pointList.map(function (res) {
|
|
490
|
+
return {
|
|
491
|
+
key: '5' + res.value,
|
|
492
|
+
label: (/*#__PURE__*/React.createElement(Checkbox, {
|
|
493
|
+
defaultChecked: pointIds.indexOf(res.value) != -1,
|
|
494
|
+
onChange: function onChange(e) {
|
|
495
|
+
onChangeTag(e, nodeData, res);
|
|
496
|
+
}
|
|
497
|
+
}, res.label)),
|
|
498
|
+
disabled: true
|
|
499
|
+
};
|
|
500
|
+
})
|
|
440
501
|
}, {
|
|
441
502
|
type: 'divider'
|
|
442
503
|
}, {
|
|
@@ -467,28 +528,59 @@ var pointMap = function pointMap(props) {
|
|
|
467
528
|
type: "gengduocaozuo1"
|
|
468
529
|
})));
|
|
469
530
|
};
|
|
470
|
-
var
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
531
|
+
var onChangeTag = function onChangeTag(e, node, option) {
|
|
532
|
+
labelRelation(e.target.checked, node, option);
|
|
533
|
+
};
|
|
534
|
+
//绑定和解绑标签
|
|
535
|
+
var labelRelation = function labelRelation(checked, node, option) {
|
|
536
|
+
request(checked ? apis.dict.addLabelRelation : apis.dict.delLabelRelation, {
|
|
537
|
+
method: 'post',
|
|
538
|
+
data: {
|
|
539
|
+
id: option.value,
|
|
540
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
541
|
+
labelType: 1,
|
|
542
|
+
eventId: node.id
|
|
543
|
+
}
|
|
544
|
+
}).then(function (res) {
|
|
545
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
546
|
+
getPointTree();
|
|
547
|
+
setTimeout(function () {
|
|
548
|
+
var labels = [];
|
|
549
|
+
if (checked) {
|
|
550
|
+
labels = node.labels.push(option);
|
|
551
|
+
} else {
|
|
552
|
+
labels = node.labels.filter(function (res) {
|
|
553
|
+
return res.id != option.value;
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
node.labels = labels;
|
|
557
|
+
props.onChangePage(node);
|
|
558
|
+
}, 500);
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
};
|
|
562
|
+
var _useState37 = useState(false),
|
|
563
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
564
|
+
isOpen = _useState38[0],
|
|
565
|
+
setIsOpen = _useState38[1];
|
|
474
566
|
var downloadHelpFile = function downloadHelpFile() {
|
|
475
567
|
window.open("/\u63A8\u8350\u57CB\u70B9\u65B9\u6848.xlsx");
|
|
476
568
|
};
|
|
477
569
|
// 分享看板二维码
|
|
478
|
-
var
|
|
479
|
-
|
|
480
|
-
qrCodeShare =
|
|
481
|
-
setqrCodeShare =
|
|
570
|
+
var _useState39 = useState(''),
|
|
571
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
572
|
+
qrCodeShare = _useState40[0],
|
|
573
|
+
setqrCodeShare = _useState40[1];
|
|
482
574
|
// 分享看板二维码-显示控制
|
|
483
|
-
var
|
|
484
|
-
|
|
485
|
-
qrCodeShareShow =
|
|
486
|
-
setqrCodeShareShow =
|
|
575
|
+
var _useState41 = useState(false),
|
|
576
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
577
|
+
qrCodeShareShow = _useState42[0],
|
|
578
|
+
setqrCodeShareShow = _useState42[1];
|
|
487
579
|
// 二维码加载中
|
|
488
|
-
var
|
|
489
|
-
|
|
490
|
-
qrCodeLoading =
|
|
491
|
-
setQrCodeLoading =
|
|
580
|
+
var _useState43 = useState(false),
|
|
581
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
582
|
+
qrCodeLoading = _useState44[0],
|
|
583
|
+
setQrCodeLoading = _useState44[1];
|
|
492
584
|
var onOpenChangeShare = function onOpenChangeShare(open) {
|
|
493
585
|
setqrCodeShareShow(open);
|
|
494
586
|
if (qrCodeShare === '') {
|
|
@@ -580,10 +672,24 @@ var pointMap = function pointMap(props) {
|
|
|
580
672
|
}), "\u5BFC\u5165\u9875\u9762")), /*#__PURE__*/React.createElement("div", {
|
|
581
673
|
className: "".concat(classPrefix, "-search")
|
|
582
674
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
675
|
+
className: "".concat(classPrefix, "-search-selectType"),
|
|
676
|
+
value: searchType,
|
|
677
|
+
options: [{
|
|
678
|
+
label: '页面名',
|
|
679
|
+
value: 'name'
|
|
680
|
+
}, {
|
|
681
|
+
label: '位置标签',
|
|
682
|
+
value: 'tagJson'
|
|
683
|
+
}],
|
|
684
|
+
onChange: function onChange(value) {
|
|
685
|
+
setSearchType(value);
|
|
686
|
+
setValue(undefined);
|
|
687
|
+
}
|
|
688
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
583
689
|
value: value,
|
|
584
|
-
placeholder:
|
|
690
|
+
placeholder: searchType == 'name' ? '请输入页面名称搜索' : '请输入位置标签名',
|
|
585
691
|
// searchValue={value}
|
|
586
|
-
optionFilterProp:
|
|
692
|
+
optionFilterProp: searchType,
|
|
587
693
|
showArrow: false,
|
|
588
694
|
showSearch: true,
|
|
589
695
|
onChange: onTreeSelectChange,
|
|
@@ -594,10 +700,9 @@ var pointMap = function pointMap(props) {
|
|
|
594
700
|
value: 'id',
|
|
595
701
|
label: 'name'
|
|
596
702
|
},
|
|
703
|
+
allowClear: true,
|
|
597
704
|
options: treeArr,
|
|
598
705
|
popupClassName: "".concat(classPrefix, "-search-popup")
|
|
599
|
-
}), /*#__PURE__*/React.createElement(IconFont, {
|
|
600
|
-
type: "sousuo"
|
|
601
706
|
})), /*#__PURE__*/React.createElement("div", {
|
|
602
707
|
className: "".concat(classPrefix, "-search-pop")
|
|
603
708
|
}, /*#__PURE__*/React.createElement(Popover, {
|