@zgfe/modules-settings 2.1.0-zhongyuan.1 → 2.1.0-zhongyuan.2
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 +11 -0
- package/es/components/importMetaDialog/index.js +202 -0
- package/es/components/importMetaDialog/styles/index.less +115 -0
- package/es/constants/api.d.ts +15 -0
- package/es/constants/api.js +18 -0
- package/es/modules/demandManage/index.js +2 -2
- package/es/modules/pointMap/createMetaDrawer.js +40 -3
- package/es/modules/pointMap/pageInfo.js +20 -5
- package/es/modules/pointMap/styles/index.less +157 -152
- package/es/modules/pointMap/styles/pageInfo.less +439 -426
- package/es/modules/pointMap/styles/tree.less +14 -7
- package/es/modules/pointMap/tree.js +101 -36
- 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 +239 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/css/index.less +47 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.d.ts +4 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.js +205 -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 +126 -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 +251 -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/index.js +3 -1
- package/package.json +2 -2
|
@@ -0,0 +1,251 @@
|
|
|
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 { ToTopOutlined, PlusOutlined } from '@ant-design/icons';
|
|
15
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
16
|
+
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
17
|
+
import ImportMetaDialog from '../../../../components/importMetaDialog';
|
|
18
|
+
import CreateLoc from './create';
|
|
19
|
+
import request from '../../../../utils/ajax';
|
|
20
|
+
import apis from '../../../../constants/api';
|
|
21
|
+
import './css/index.less';
|
|
22
|
+
import moment from 'moment';
|
|
23
|
+
var Text = Typography.Text;
|
|
24
|
+
var className = 'clearLoc';
|
|
25
|
+
var locationTagManagement = function locationTagManagement(_ref) {
|
|
26
|
+
var title = _ref.title,
|
|
27
|
+
type = _ref.type;
|
|
28
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
29
|
+
currentApp = _useContext.currentApp;
|
|
30
|
+
var columns = [{
|
|
31
|
+
title: '序号',
|
|
32
|
+
dataIndex: 'index',
|
|
33
|
+
key: 'index',
|
|
34
|
+
render: function render() {
|
|
35
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
36
|
+
args[_key] = arguments[_key];
|
|
37
|
+
}
|
|
38
|
+
return "".concat(args.pop() + 1);
|
|
39
|
+
},
|
|
40
|
+
width: 80
|
|
41
|
+
}, {
|
|
42
|
+
title: title + '名',
|
|
43
|
+
dataIndex: 'name',
|
|
44
|
+
key: 'name',
|
|
45
|
+
render: function render(text) {
|
|
46
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
47
|
+
title: text
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Text, null, text));
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
title: '创建时间',
|
|
52
|
+
width: 220,
|
|
53
|
+
dataIndex: 'createTime',
|
|
54
|
+
render: function render(text) {
|
|
55
|
+
return moment(text).format('YYYY-MM-DD HH:mm:ss');
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
title: '创建人',
|
|
59
|
+
dataIndex: 'createUser',
|
|
60
|
+
key: 'createUser',
|
|
61
|
+
width: 140
|
|
62
|
+
}, {
|
|
63
|
+
title: '备注',
|
|
64
|
+
dataIndex: 'remark',
|
|
65
|
+
render: function render(text) {
|
|
66
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
67
|
+
title: text
|
|
68
|
+
}, /*#__PURE__*/React.createElement(Text, null, text));
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
title: '操作',
|
|
72
|
+
key: 'action',
|
|
73
|
+
width: 160,
|
|
74
|
+
render: function render(_, record) {
|
|
75
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
76
|
+
size: "middle"
|
|
77
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
78
|
+
onClick: function onClick() {
|
|
79
|
+
return getDetail(record);
|
|
80
|
+
}
|
|
81
|
+
}, "\u7F16\u8F91"), /*#__PURE__*/React.createElement("a", {
|
|
82
|
+
onClick: function onClick() {
|
|
83
|
+
return handleDeleteLoc(record === null || record === void 0 ? void 0 : record.id);
|
|
84
|
+
}
|
|
85
|
+
}, "\u5220\u9664"));
|
|
86
|
+
}
|
|
87
|
+
}];
|
|
88
|
+
// 编辑标签
|
|
89
|
+
var _useState = useState(),
|
|
90
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
91
|
+
detail = _useState2[0],
|
|
92
|
+
setDetail = _useState2[1];
|
|
93
|
+
var getDetail = function getDetail(record) {
|
|
94
|
+
setDetail(record);
|
|
95
|
+
setAddlocShow(true);
|
|
96
|
+
};
|
|
97
|
+
// 新建标签显示
|
|
98
|
+
var _useState3 = useState(false),
|
|
99
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
100
|
+
addLocShow = _useState4[0],
|
|
101
|
+
setAddlocShow = _useState4[1];
|
|
102
|
+
var handleAddLoc = function handleAddLoc() {
|
|
103
|
+
setAddlocShow(true);
|
|
104
|
+
};
|
|
105
|
+
// 导入标签
|
|
106
|
+
var _useState5 = useState(false),
|
|
107
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
108
|
+
openImportModal = _useState6[0],
|
|
109
|
+
setOpenImportModal = _useState6[1];
|
|
110
|
+
/**
|
|
111
|
+
* 标签列表, 搜索名称 删除标签
|
|
112
|
+
*/
|
|
113
|
+
var _useState7 = useState([]),
|
|
114
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
115
|
+
locList = _useState8[0],
|
|
116
|
+
setLocList = _useState8[1];
|
|
117
|
+
var handlePage = function handlePage(pagination) {
|
|
118
|
+
setTableParams(pagination);
|
|
119
|
+
getList();
|
|
120
|
+
};
|
|
121
|
+
//标签导出
|
|
122
|
+
var _useState9 = useState(false),
|
|
123
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
124
|
+
exportLoading = _useState10[0],
|
|
125
|
+
setExportLoading = _useState10[1];
|
|
126
|
+
var onExport = function onExport() {
|
|
127
|
+
if (!exportLoading) return;
|
|
128
|
+
setExportLoading(true);
|
|
129
|
+
request(apis.dict.tagDownload, {
|
|
130
|
+
method: 'post',
|
|
131
|
+
data: {
|
|
132
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
133
|
+
},
|
|
134
|
+
responseType: 'blob'
|
|
135
|
+
}).then(function () {
|
|
136
|
+
setExportLoading(false);
|
|
137
|
+
}).catch(function () {
|
|
138
|
+
setExportLoading(false);
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
var _useState11 = useState({
|
|
142
|
+
current: 1,
|
|
143
|
+
pageSize: 10,
|
|
144
|
+
total: 0
|
|
145
|
+
}),
|
|
146
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
147
|
+
tableParams = _useState12[0],
|
|
148
|
+
setTableParams = _useState12[1];
|
|
149
|
+
useEffect(function () {
|
|
150
|
+
getList();
|
|
151
|
+
}, []);
|
|
152
|
+
//分页搜索
|
|
153
|
+
var getList = function getList() {
|
|
154
|
+
request(apis.dict.getTagList, {
|
|
155
|
+
method: 'post',
|
|
156
|
+
data: {
|
|
157
|
+
pageNo: tableParams.current,
|
|
158
|
+
pageSize: tableParams.pageSize,
|
|
159
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
160
|
+
type: type
|
|
161
|
+
}
|
|
162
|
+
}).then(function (res) {
|
|
163
|
+
if (!res) return;
|
|
164
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
165
|
+
setLocList(res.data.data);
|
|
166
|
+
// 总页数
|
|
167
|
+
setTableParams(function (pre) {
|
|
168
|
+
return _objectSpread(_objectSpread({}, pre), {}, {
|
|
169
|
+
total: res.data.total
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
} else {
|
|
173
|
+
message.error('查询列表失败!');
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
//删除
|
|
178
|
+
var handleDeleteLoc = function handleDeleteLoc(id) {
|
|
179
|
+
Modal.confirm({
|
|
180
|
+
// wrapClassName: `${classPrefix}-confirm`,
|
|
181
|
+
title: '提示',
|
|
182
|
+
icon: null,
|
|
183
|
+
closable: true,
|
|
184
|
+
content: '您确定要删除当前标签?',
|
|
185
|
+
okText: '确定',
|
|
186
|
+
cancelText: '取消',
|
|
187
|
+
onOk: function onOk() {
|
|
188
|
+
handleDeleteMap(id);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
var handleDeleteMap = function handleDeleteMap(id) {
|
|
193
|
+
request(apis.dict.tagDelete, {
|
|
194
|
+
method: 'post',
|
|
195
|
+
data: {
|
|
196
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
197
|
+
id: id
|
|
198
|
+
}
|
|
199
|
+
}).then(function (res) {
|
|
200
|
+
if (!res) return;
|
|
201
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
202
|
+
message.success("\u6807\u7B7E\u5220\u9664\u6210\u529F\uFF01");
|
|
203
|
+
getList();
|
|
204
|
+
} else {
|
|
205
|
+
message.error('标签删除失败!');
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
210
|
+
className: "".concat(className)
|
|
211
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
212
|
+
className: "".concat(className, "-searchTop")
|
|
213
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
214
|
+
onClick: onExport,
|
|
215
|
+
loading: exportLoading
|
|
216
|
+
}, /*#__PURE__*/React.createElement(ToTopOutlined, null), "\u5BFC\u51FA"), /*#__PURE__*/React.createElement(Button, {
|
|
217
|
+
type: "primary",
|
|
218
|
+
onClick: function onClick() {
|
|
219
|
+
return setOpenImportModal(true);
|
|
220
|
+
}
|
|
221
|
+
}, /*#__PURE__*/React.createElement(PlusOutlined, null), "\u5BFC\u5165", title), /*#__PURE__*/React.createElement(Button, {
|
|
222
|
+
type: "primary",
|
|
223
|
+
onClick: handleAddLoc
|
|
224
|
+
}, /*#__PURE__*/React.createElement(PlusOutlined, null), "\u521B\u5EFA", title))), /*#__PURE__*/React.createElement(Table, {
|
|
225
|
+
rowKey: "locId",
|
|
226
|
+
dataSource: locList,
|
|
227
|
+
pagination: tableParams,
|
|
228
|
+
columns: columns,
|
|
229
|
+
onChange: handlePage,
|
|
230
|
+
scroll: {
|
|
231
|
+
x: 992
|
|
232
|
+
}
|
|
233
|
+
}), addLocShow && (/*#__PURE__*/React.createElement(CreateLoc, {
|
|
234
|
+
type: type,
|
|
235
|
+
addLocShow: addLocShow,
|
|
236
|
+
currentDetail: detail || null,
|
|
237
|
+
onSetclose: function onSetclose() {
|
|
238
|
+
setAddlocShow(false);
|
|
239
|
+
getList();
|
|
240
|
+
}
|
|
241
|
+
})), openImportModal && (/*#__PURE__*/React.createElement(ImportMetaDialog, {
|
|
242
|
+
uploadFile: apis.dict.tagUpload,
|
|
243
|
+
downloadTempleUrl: apis.dict.tagTemplate,
|
|
244
|
+
fileName: "\u5BFC\u5165\u6A21\u677F",
|
|
245
|
+
onCancel: function onCancel() {
|
|
246
|
+
setOpenImportModal(false);
|
|
247
|
+
},
|
|
248
|
+
onSuccess: function onSuccess(result) {}
|
|
249
|
+
})));
|
|
250
|
+
};
|
|
251
|
+
export default locationTagManagement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -76,7 +76,9 @@ var SystemSetting = function SystemSetting(_ref) {
|
|
|
76
76
|
}, {
|
|
77
77
|
key: '6',
|
|
78
78
|
label: '字典管理',
|
|
79
|
-
content: /*#__PURE__*/React.createElement(Dictionary,
|
|
79
|
+
content: /*#__PURE__*/React.createElement(Dictionary, {
|
|
80
|
+
onShowProcess: onShowProcess
|
|
81
|
+
})
|
|
80
82
|
}, {
|
|
81
83
|
key: '7',
|
|
82
84
|
label: '文档库',
|
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.2",
|
|
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": "d567e909df16d3e8b1fdea55cb831c0085e779fe",
|
|
71
71
|
"gitHooks": {
|
|
72
72
|
"pre-commit": "lint-staged"
|
|
73
73
|
}
|