@zgfe/modules-settings 2.1.0-zhongyuan.3 → 2.1.0-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/es/components/importMetaDialog/index.d.ts +2 -0
- package/es/components/importMetaDialog/index.js +18 -3
- package/es/constants/api.d.ts +2 -0
- package/es/constants/api.js +9 -7
- package/es/modules/pointMap/pageInfo.js +22 -7
- package/es/modules/pointMap/tree.js +50 -35
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.js +1 -1
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/create.js +7 -9
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/index.js +18 -10
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/type/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -29,7 +29,7 @@ var ImportModal = function ImportModal(props) {
|
|
|
29
29
|
errorLoc = _useState4[0],
|
|
30
30
|
setErrorLoc = _useState4[1];
|
|
31
31
|
var handleImportResultOk = function handleImportResultOk() {
|
|
32
|
-
|
|
32
|
+
props.onSuccess && props.onSuccess({});
|
|
33
33
|
setErrorLoc(undefined);
|
|
34
34
|
};
|
|
35
35
|
var _useState5 = useState(),
|
|
@@ -92,14 +92,29 @@ var ImportModal = function ImportModal(props) {
|
|
|
92
92
|
var formData = new FormData();
|
|
93
93
|
formData.append('appId', currentApp.appId);
|
|
94
94
|
formData.append('file', fileData);
|
|
95
|
+
if (props.params) {
|
|
96
|
+
for (var key in props.params) {
|
|
97
|
+
formData.append(key, props.params[key]);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
95
100
|
setLoading(true);
|
|
96
101
|
request(props.uploadFile, {
|
|
97
102
|
method: 'post',
|
|
98
103
|
data: formData
|
|
99
104
|
}).then(function (res) {
|
|
100
105
|
if (!res) return;
|
|
101
|
-
|
|
102
|
-
props.
|
|
106
|
+
//进入历史记录
|
|
107
|
+
if (props.showHistory && res.data) {
|
|
108
|
+
setOpenImportModalResult(true);
|
|
109
|
+
setErrorLoc({
|
|
110
|
+
successLocCount: res.data['导入成功条数'],
|
|
111
|
+
failedLocCount: res.data['导入失败条数'],
|
|
112
|
+
failedLocNames: res.data['导入失败标签名']
|
|
113
|
+
});
|
|
114
|
+
} else {
|
|
115
|
+
message.success('导入成功');
|
|
116
|
+
props.onSuccess && props.onSuccess(res.data);
|
|
117
|
+
}
|
|
103
118
|
}).catch(function (e) {
|
|
104
119
|
console.log(e);
|
|
105
120
|
}).finally(function () {
|
package/es/constants/api.d.ts
CHANGED
|
@@ -118,12 +118,14 @@ declare let apis: {
|
|
|
118
118
|
};
|
|
119
119
|
dict: {
|
|
120
120
|
getDictList: string;
|
|
121
|
+
getDictPage: string;
|
|
121
122
|
dictSave: string;
|
|
122
123
|
dictUpdate: string;
|
|
123
124
|
dictUpload: string;
|
|
124
125
|
dictDelete: string;
|
|
125
126
|
dictTemplate: string;
|
|
126
127
|
getTagList: string;
|
|
128
|
+
getTagPage: string;
|
|
127
129
|
tagSave: string;
|
|
128
130
|
tagUpdate: string;
|
|
129
131
|
tagUpload: string;
|
package/es/constants/api.js
CHANGED
|
@@ -145,20 +145,22 @@ var apis = {
|
|
|
145
145
|
dict: {
|
|
146
146
|
//字典管理
|
|
147
147
|
getDictList: '/zg/web/v2/systemSettings/attr/dict/list',
|
|
148
|
+
getDictPage: '/zg/web/v2/systemSettings/attr/dict/listByPage',
|
|
148
149
|
dictSave: '/zg/web/v2/systemSettings/attr/dict/save',
|
|
149
150
|
dictUpdate: '/zg/web/v2/systemSettings/attr/dict/update',
|
|
150
151
|
dictUpload: '/zg/web/v2/systemSettings/attr/dict/upload',
|
|
151
152
|
dictDelete: '/zg/web/v2/systemSettings/attr/dict/delete',
|
|
152
153
|
dictTemplate: '/zg/web/v2/systemSettings/attr/dict/template',
|
|
153
154
|
//位置标签管理
|
|
154
|
-
getTagList: '/zg/web/v2/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
getTagList: '/zg/web/v2/eventLabel/list',
|
|
156
|
+
getTagPage: '/zg/web/v2/eventLabel/listByPage',
|
|
157
|
+
tagSave: '/zg/web/v2/eventLabel/save',
|
|
158
|
+
tagUpdate: '/zg/web/v2/eventLabel/update',
|
|
159
|
+
tagUpload: '/zg/web/v2/eventLabel/upload',
|
|
160
|
+
tagDownload: '/zg/web/v2/eventLabel/download',
|
|
161
|
+
tagDelete: '/zg/web/v2/eventLabel/delete',
|
|
160
162
|
//标签模板
|
|
161
|
-
tagTemplate: '/zg/web/v2/
|
|
163
|
+
tagTemplate: '/zg/web/v2/eventLabel/template'
|
|
162
164
|
},
|
|
163
165
|
// 查询公司下所有用户
|
|
164
166
|
queryUserByCompanyId: '/zg/web/v2/user/queryUserByCompanyId',
|
|
@@ -518,15 +518,15 @@ var PageInfo = function PageInfo(props) {
|
|
|
518
518
|
className: "".concat(classPrefix, "-content-popoverTag-item")
|
|
519
519
|
}, /*#__PURE__*/React.createElement("span", {
|
|
520
520
|
className: "".concat(classPrefix, "-content-popoverTag-label")
|
|
521
|
-
}, "\u4E1A\u52A1\u6807\u7B7E:"), /*#__PURE__*/React.createElement(Tag, {
|
|
522
|
-
color: "
|
|
523
|
-
},
|
|
521
|
+
}, "\u4E1A\u52A1\u6807\u7B7E:"), record.businessLabel && /*#__PURE__*/React.createElement(Tag, {
|
|
522
|
+
color: "blud"
|
|
523
|
+
}, record.businessLabel.labelName)), /*#__PURE__*/React.createElement("div", {
|
|
524
524
|
className: "".concat(classPrefix, "-content-popoverTag-item")
|
|
525
525
|
}, /*#__PURE__*/React.createElement("span", {
|
|
526
526
|
className: "".concat(classPrefix, "-content-popoverTag-label")
|
|
527
|
-
}, "\u89E6\u53D1\u6807\u7B7E:"), /*#__PURE__*/React.createElement(Tag, {
|
|
528
|
-
color: "
|
|
529
|
-
},
|
|
527
|
+
}, "\u89E6\u53D1\u6807\u7B7E:"), record.triggerLabel && /*#__PURE__*/React.createElement(Tag, {
|
|
528
|
+
color: "blud"
|
|
529
|
+
}, record.triggerLabel.labelName)));
|
|
530
530
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
531
531
|
content: content,
|
|
532
532
|
title: eventName || ''
|
|
@@ -552,7 +552,7 @@ var PageInfo = function PageInfo(props) {
|
|
|
552
552
|
setMetaDataIndex(index);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
}, eventName ?
|
|
555
|
+
}, eventName ? sliceName(record) : '选择元事件', !eventName && /*#__PURE__*/React.createElement(IconFont, {
|
|
556
556
|
type: "zhuanfa",
|
|
557
557
|
style: {
|
|
558
558
|
marginLeft: 8
|
|
@@ -914,6 +914,21 @@ var PageInfo = function PageInfo(props) {
|
|
|
914
914
|
setRecordShow(true);
|
|
915
915
|
setEventData(row);
|
|
916
916
|
};
|
|
917
|
+
//拼接名称
|
|
918
|
+
var sliceName = function sliceName(record) {
|
|
919
|
+
var _record$businessLabel, _record$triggerLabel;
|
|
920
|
+
var point = record.labels && record.labels.filter(function (res) {
|
|
921
|
+
return res.labelType == 2;
|
|
922
|
+
}).map(function (res) {
|
|
923
|
+
return res.labelName;
|
|
924
|
+
}).join('_') || '';
|
|
925
|
+
var biz = record.businessLabel && ((_record$businessLabel = record.businessLabel) === null || _record$businessLabel === void 0 ? void 0 : _record$businessLabel.labelName) || '';
|
|
926
|
+
var trig = record.triggerLabel && ((_record$triggerLabel = record.triggerLabel) === null || _record$triggerLabel === void 0 ? void 0 : _record$triggerLabel.labelName) || '' || '';
|
|
927
|
+
var arr = [biz, point, trig, record.eventName].filter(function (res) {
|
|
928
|
+
return res;
|
|
929
|
+
}).join('-');
|
|
930
|
+
return arr;
|
|
931
|
+
};
|
|
917
932
|
return /*#__PURE__*/React.createElement("div", {
|
|
918
933
|
className: "".concat(classPrefix)
|
|
919
934
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -143,12 +143,17 @@ var pointMap = function pointMap(props) {
|
|
|
143
143
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
144
144
|
isShowDel = _useState32[0],
|
|
145
145
|
setIsShowDel = _useState32[1];
|
|
146
|
-
var _useState33 = useState(
|
|
146
|
+
var _useState33 = useState([]),
|
|
147
147
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
pointList = _useState34[0],
|
|
149
|
+
setPointList = _useState34[1];
|
|
150
|
+
var _useState35 = useState(!!props.pageStatusIsEdit),
|
|
151
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
|
152
|
+
pageStatusIsEdit = _useState36[0],
|
|
153
|
+
setPageStatusIsEdit = _useState36[1];
|
|
150
154
|
useEffect(function () {
|
|
151
155
|
pointGetVersion();
|
|
156
|
+
getPointList();
|
|
152
157
|
}, []);
|
|
153
158
|
useEffect(function () {
|
|
154
159
|
setPageStatusIsEdit(!!props.pageStatusIsEdit);
|
|
@@ -211,6 +216,22 @@ var pointMap = function pointMap(props) {
|
|
|
211
216
|
console.log(err);
|
|
212
217
|
});
|
|
213
218
|
};
|
|
219
|
+
//查询位置标签
|
|
220
|
+
var getPointList = function getPointList() {
|
|
221
|
+
request(apis.dict.getTagList, {
|
|
222
|
+
labelType: 1,
|
|
223
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
224
|
+
}).then(function (res) {
|
|
225
|
+
if (res.code == 100000) {
|
|
226
|
+
setPointList(res.data.map(function (res) {
|
|
227
|
+
return {
|
|
228
|
+
label: res.labelName,
|
|
229
|
+
value: res.id
|
|
230
|
+
};
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
};
|
|
214
235
|
var addPage = function addPage(operationType, parentId, targetPageId) {
|
|
215
236
|
request(apis.createPage, {
|
|
216
237
|
method: 'post',
|
|
@@ -471,23 +492,17 @@ var pointMap = function pointMap(props) {
|
|
|
471
492
|
label: '选择位置标签',
|
|
472
493
|
icon: /*#__PURE__*/React.createElement(EnvironmentOutlined, null),
|
|
473
494
|
key: '5',
|
|
474
|
-
children:
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
onChange: function onChange(e) {
|
|
486
|
-
onChangeTag(e, 'key');
|
|
487
|
-
}
|
|
488
|
-
}, "\u6807\u7B7E2")),
|
|
489
|
-
disabled: true
|
|
490
|
-
}]
|
|
495
|
+
children: pointList.map(function (res) {
|
|
496
|
+
return {
|
|
497
|
+
key: '3' + res.value,
|
|
498
|
+
label: (/*#__PURE__*/React.createElement(Checkbox, {
|
|
499
|
+
onChange: function onChange(e) {
|
|
500
|
+
onChangeTag(e, 'key');
|
|
501
|
+
}
|
|
502
|
+
}, res.label)),
|
|
503
|
+
disabled: true
|
|
504
|
+
};
|
|
505
|
+
})
|
|
491
506
|
}, {
|
|
492
507
|
type: 'divider'
|
|
493
508
|
}, {
|
|
@@ -521,28 +536,28 @@ var pointMap = function pointMap(props) {
|
|
|
521
536
|
var onChangeTag = function onChangeTag(e, key) {
|
|
522
537
|
console.log(e, key, 'onChangeTag');
|
|
523
538
|
};
|
|
524
|
-
var
|
|
525
|
-
|
|
526
|
-
isOpen =
|
|
527
|
-
setIsOpen =
|
|
539
|
+
var _useState37 = useState(false),
|
|
540
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
541
|
+
isOpen = _useState38[0],
|
|
542
|
+
setIsOpen = _useState38[1];
|
|
528
543
|
var downloadHelpFile = function downloadHelpFile() {
|
|
529
544
|
window.open("/\u63A8\u8350\u57CB\u70B9\u65B9\u6848.xlsx");
|
|
530
545
|
};
|
|
531
546
|
// 分享看板二维码
|
|
532
|
-
var
|
|
533
|
-
_useState38 = _slicedToArray(_useState37, 2),
|
|
534
|
-
qrCodeShare = _useState38[0],
|
|
535
|
-
setqrCodeShare = _useState38[1];
|
|
536
|
-
// 分享看板二维码-显示控制
|
|
537
|
-
var _useState39 = useState(false),
|
|
547
|
+
var _useState39 = useState(''),
|
|
538
548
|
_useState40 = _slicedToArray(_useState39, 2),
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
//
|
|
549
|
+
qrCodeShare = _useState40[0],
|
|
550
|
+
setqrCodeShare = _useState40[1];
|
|
551
|
+
// 分享看板二维码-显示控制
|
|
542
552
|
var _useState41 = useState(false),
|
|
543
553
|
_useState42 = _slicedToArray(_useState41, 2),
|
|
544
|
-
|
|
545
|
-
|
|
554
|
+
qrCodeShareShow = _useState42[0],
|
|
555
|
+
setqrCodeShareShow = _useState42[1];
|
|
556
|
+
// 二维码加载中
|
|
557
|
+
var _useState43 = useState(false),
|
|
558
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
559
|
+
qrCodeLoading = _useState44[0],
|
|
560
|
+
setQrCodeLoading = _useState44[1];
|
|
546
561
|
var onOpenChangeShare = function onOpenChangeShare(open) {
|
|
547
562
|
setqrCodeShareShow(open);
|
|
548
563
|
if (qrCodeShare === '') {
|
|
@@ -124,7 +124,7 @@ var DictionaryManagement = function DictionaryManagement() {
|
|
|
124
124
|
}, []);
|
|
125
125
|
//分页搜索
|
|
126
126
|
var getList = function getList() {
|
|
127
|
-
request(apis.dict.
|
|
127
|
+
request(apis.dict.getDictPage, {
|
|
128
128
|
method: 'post',
|
|
129
129
|
data: {
|
|
130
130
|
pageNo: tableParams.current,
|
|
@@ -33,10 +33,11 @@ var clear = function clear(_ref) {
|
|
|
33
33
|
request((currentDetail === null || currentDetail === void 0 ? void 0 : currentDetail.id) ? apis.dict.tagUpdate : apis.dict.tagSave, {
|
|
34
34
|
method: 'post',
|
|
35
35
|
data: {
|
|
36
|
+
id: currentDetail === null || currentDetail === void 0 ? void 0 : currentDetail.id,
|
|
36
37
|
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
37
|
-
|
|
38
|
+
labelName: values.labelName,
|
|
38
39
|
remark: values.remark,
|
|
39
|
-
|
|
40
|
+
labelType: type
|
|
40
41
|
}
|
|
41
42
|
}).then(function (res) {
|
|
42
43
|
if (!res) return;
|
|
@@ -58,7 +59,7 @@ var clear = function clear(_ref) {
|
|
|
58
59
|
useEffect(function () {
|
|
59
60
|
if (currentDetail) {
|
|
60
61
|
formRef.setFieldsValue({
|
|
61
|
-
|
|
62
|
+
labelName: currentDetail.labelName,
|
|
62
63
|
remark: currentDetail.remark
|
|
63
64
|
});
|
|
64
65
|
}
|
|
@@ -70,10 +71,7 @@ var clear = function clear(_ref) {
|
|
|
70
71
|
title: /*#__PURE__*/React.createElement("div", null, currentDetail ? '修改' : '创建', "\u6807\u7B7E", /*#__PURE__*/React.createElement("div", {
|
|
71
72
|
className: "clearLoc-drawerCloseIcon",
|
|
72
73
|
onClick: onClose
|
|
73
|
-
}, /*#__PURE__*/React.createElement(CloseOutlined,
|
|
74
|
-
onPointerEnterCapture: undefined,
|
|
75
|
-
onPointerLeaveCapture: undefined
|
|
76
|
-
}))),
|
|
74
|
+
}, /*#__PURE__*/React.createElement(CloseOutlined, null))),
|
|
77
75
|
onClose: onClose,
|
|
78
76
|
closeIcon: false,
|
|
79
77
|
open: open,
|
|
@@ -94,14 +92,14 @@ var clear = function clear(_ref) {
|
|
|
94
92
|
span: 20
|
|
95
93
|
},
|
|
96
94
|
initialValues: {
|
|
97
|
-
|
|
95
|
+
labelName: '',
|
|
98
96
|
desctiption: ''
|
|
99
97
|
},
|
|
100
98
|
onFinish: onFinish,
|
|
101
99
|
labelAlign: "right"
|
|
102
100
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
103
101
|
label: "\u6807\u7B7E\u540D",
|
|
104
|
-
name: "
|
|
102
|
+
name: "labelName",
|
|
105
103
|
rules: [{
|
|
106
104
|
required: true,
|
|
107
105
|
message: '请输入标签名'
|
|
@@ -40,8 +40,8 @@ var locationTagManagement = function locationTagManagement(_ref) {
|
|
|
40
40
|
width: 80
|
|
41
41
|
}, {
|
|
42
42
|
title: title + '名',
|
|
43
|
-
dataIndex: '
|
|
44
|
-
key: '
|
|
43
|
+
dataIndex: 'labelName',
|
|
44
|
+
key: 'labelName',
|
|
45
45
|
render: function render(text) {
|
|
46
46
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
47
47
|
title: text
|
|
@@ -56,8 +56,8 @@ var locationTagManagement = function locationTagManagement(_ref) {
|
|
|
56
56
|
}
|
|
57
57
|
}, {
|
|
58
58
|
title: '创建人',
|
|
59
|
-
dataIndex: '
|
|
60
|
-
key: '
|
|
59
|
+
dataIndex: 'creatorName',
|
|
60
|
+
key: 'creatorName',
|
|
61
61
|
width: 140
|
|
62
62
|
}, {
|
|
63
63
|
title: '备注',
|
|
@@ -124,12 +124,13 @@ var locationTagManagement = function locationTagManagement(_ref) {
|
|
|
124
124
|
exportLoading = _useState10[0],
|
|
125
125
|
setExportLoading = _useState10[1];
|
|
126
126
|
var onExport = function onExport() {
|
|
127
|
-
if (
|
|
127
|
+
if (exportLoading) return;
|
|
128
128
|
setExportLoading(true);
|
|
129
129
|
request(apis.dict.tagDownload, {
|
|
130
130
|
method: 'post',
|
|
131
131
|
data: {
|
|
132
|
-
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
132
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
133
|
+
labelType: type
|
|
133
134
|
},
|
|
134
135
|
responseType: 'blob'
|
|
135
136
|
}).then(function () {
|
|
@@ -151,18 +152,18 @@ var locationTagManagement = function locationTagManagement(_ref) {
|
|
|
151
152
|
}, []);
|
|
152
153
|
//分页搜索
|
|
153
154
|
var getList = function getList() {
|
|
154
|
-
request(apis.dict.
|
|
155
|
+
request(apis.dict.getTagPage, {
|
|
155
156
|
method: 'post',
|
|
156
157
|
data: {
|
|
157
158
|
pageNo: tableParams.current,
|
|
158
159
|
pageSize: tableParams.pageSize,
|
|
159
160
|
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
160
|
-
|
|
161
|
+
labelType: type
|
|
161
162
|
}
|
|
162
163
|
}).then(function (res) {
|
|
163
164
|
if (!res) return;
|
|
164
165
|
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
165
|
-
setLocList(res.data.
|
|
166
|
+
setLocList(res.data.labelList);
|
|
166
167
|
// 总页数
|
|
167
168
|
setTableParams(function (pre) {
|
|
168
169
|
return _objectSpread(_objectSpread({}, pre), {}, {
|
|
@@ -245,7 +246,14 @@ var locationTagManagement = function locationTagManagement(_ref) {
|
|
|
245
246
|
onCancel: function onCancel() {
|
|
246
247
|
setOpenImportModal(false);
|
|
247
248
|
},
|
|
248
|
-
|
|
249
|
+
showHistory: true,
|
|
250
|
+
params: {
|
|
251
|
+
labelType: type
|
|
252
|
+
},
|
|
253
|
+
onSuccess: function onSuccess(result) {
|
|
254
|
+
setOpenImportModal(false);
|
|
255
|
+
getList();
|
|
256
|
+
}
|
|
249
257
|
})));
|
|
250
258
|
};
|
|
251
259
|
export default locationTagManagement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "2.1.0-zhongyuan.
|
|
3
|
+
"version": "2.1.0-zhongyuan.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "15555af56920d4842b4bd5fc7c416585b975e9df",
|
|
71
71
|
"gitHooks": {
|
|
72
72
|
"pre-commit": "lint-staged"
|
|
73
73
|
}
|