@zgfe/modules-dm 1.0.42-alpha.9 → 1.0.56-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/demo.js +1 -1
- package/es/constants/api.d.ts +37 -0
- package/es/constants/api.js +62 -1
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/modules/CutsModal.d.ts +66 -0
- package/es/modules/CutsModal.js +52 -0
- package/es/modules/dataManage/collectionAttributeList.d.ts +3 -0
- package/es/modules/dataManage/collectionAttributeList.js +524 -80
- package/es/modules/dataManage/collectionEventList.d.ts +6 -0
- package/es/modules/dataManage/collectionEventList.js +482 -62
- package/es/modules/dataManage/components/createAttrDrawer.d.ts +4 -0
- package/es/modules/dataManage/components/createAttrDrawer.js +264 -0
- package/es/modules/dataManage/components/createMetaDrawer.d.ts +4 -0
- package/es/modules/dataManage/components/createMetaDrawer.js +618 -0
- package/es/modules/dataManage/components/createVirtualDrawer.js +19 -19
- package/es/modules/dataManage/components/creditPop/imgs/link.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png01.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png02.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png03.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png04.png +0 -0
- package/es/modules/dataManage/components/creditPop/index.d.ts +6 -0
- package/es/modules/dataManage/components/creditPop/index.js +89 -0
- package/es/modules/dataManage/components/creditPop/index.less +121 -0
- package/es/modules/dataManage/components/deleteConfirm.d.ts +9 -0
- package/es/modules/dataManage/components/deleteConfirm.js +36 -0
- package/es/modules/dataManage/components/deleteUserAttrConfirm.d.ts +9 -0
- package/es/modules/dataManage/components/deleteUserAttrConfirm.js +57 -0
- package/es/modules/dataManage/components/depositPop/imgs/link.png +0 -0
- package/es/modules/dataManage/components/depositPop/imgs/png01.png +0 -0
- package/es/modules/dataManage/components/depositPop/imgs/png02.png +0 -0
- package/es/modules/dataManage/components/depositPop/index.d.ts +6 -0
- package/es/modules/dataManage/components/depositPop/index.js +89 -0
- package/es/modules/dataManage/components/depositPop/index.less +115 -0
- package/es/modules/dataManage/components/developModal/index.css +36 -0
- package/es/modules/dataManage/components/developModal/index.d.ts +6 -0
- package/es/modules/dataManage/components/developModal/index.js +224 -0
- package/es/modules/dataManage/components/developModal/index.less +36 -0
- package/es/modules/dataManage/components/editTxt/index.d.ts +3 -0
- package/es/modules/dataManage/components/editTxt/index.js +123 -0
- package/es/modules/dataManage/components/editTxt/index.less +44 -0
- package/es/modules/dataManage/components/editTxt/types.d.ts +48 -0
- package/es/modules/dataManage/components/editTxt/types.js +1 -0
- package/es/modules/dataManage/components/eventFilter/index.js +13 -13
- package/es/modules/dataManage/components/eventFilter/styles/index.less +72 -72
- package/es/modules/dataManage/components/eventGroupingDrawer.js +41 -44
- package/es/modules/dataManage/components/importAttrDialog/demo/index.d.ts +3 -0
- package/es/modules/dataManage/components/importAttrDialog/demo/index.js +28 -0
- package/es/modules/dataManage/components/importAttrDialog/index.d.ts +7 -0
- package/es/modules/dataManage/components/importAttrDialog/index.js +159 -0
- package/es/modules/dataManage/components/importAttrDialog/styles/index.less +90 -0
- package/es/modules/dataManage/components/importMetaDialog/demo/index.d.ts +3 -0
- package/es/modules/dataManage/components/importMetaDialog/demo/index.js +28 -0
- package/es/modules/dataManage/components/importMetaDialog/index.d.ts +7 -0
- package/es/modules/dataManage/components/importMetaDialog/index.js +159 -0
- package/es/modules/dataManage/components/importMetaDialog/styles/index.less +91 -0
- package/es/modules/dataManage/components/selectAttributes.js +10 -10
- package/es/modules/dataManage/components/tablePlus.d.ts +4 -0
- package/es/modules/dataManage/components/tablePlus.js +625 -94
- package/es/modules/dataManage/components/virtualTablePlus.js +7 -7
- package/es/modules/dataManage/demo/index.d.ts +2 -1
- package/es/modules/dataManage/demo/index.js +79 -16
- package/es/modules/dataManage/detailedData/DetailedDataForm.d.ts +5 -0
- package/es/modules/dataManage/detailedData/DetailedDataForm.js +216 -0
- package/es/modules/dataManage/detailedData/index.d.ts +24 -0
- package/es/modules/dataManage/detailedData/index.js +403 -0
- package/es/modules/dataManage/detailedData/useColumns.d.ts +34 -0
- package/es/modules/dataManage/detailedData/useColumns.js +135 -0
- package/es/modules/dataManage/index.d.ts +9 -4
- package/es/modules/dataManage/index.js +142 -50
- package/es/modules/dataManage/styles/detailed.less +74 -0
- package/es/modules/dataManage/styles/index.less +1195 -841
- package/es/modules/dataManage/types.d.ts +8 -0
- package/es/modules/dataManage/virtualEventList.js +13 -13
- package/es/modules/dataMap/component/data.d.ts +7 -0
- package/es/modules/dataMap/component/data.js +257 -0
- package/es/modules/dataMap/component/drawerAdd.d.ts +6 -0
- package/es/modules/dataMap/component/drawerAdd.js +379 -0
- package/es/modules/dataMap/component/leftTree.d.ts +6 -0
- package/es/modules/dataMap/component/leftTree.js +232 -0
- package/es/modules/dataMap/component/rightDetail.d.ts +7 -0
- package/es/modules/dataMap/component/rightDetail.js +694 -0
- package/es/modules/dataMap/component/selectAttr.d.ts +7 -0
- package/es/modules/dataMap/component/selectAttr.js +92 -0
- package/es/modules/dataMap/css/index.css +163 -0
- package/es/modules/dataMap/css/index.less +177 -0
- package/es/modules/dataMap/demo/index.d.ts +3 -0
- package/es/modules/dataMap/demo/index.js +6 -0
- package/es/modules/dataMap/img/empty-data.png +0 -0
- package/es/modules/dataMap/index.d.ts +3 -0
- package/es/modules/dataMap/index.js +80 -0
- package/es/modules/dataMap/mapDetail.d.ts +3 -0
- package/es/modules/dataMap/mapDetail.js +44 -0
- package/es/modules/dataMap/mapSetting.d.ts +6 -0
- package/es/modules/dataMap/mapSetting.js +156 -0
- package/es/modules/dataPlan/addEventOrUser.js +31 -30
- package/es/modules/dataPlan/addPlan.js +29 -27
- package/es/modules/dataPlan/eventList.js +2 -2
- package/es/modules/dataPlan/index.js +10 -10
- package/es/modules/dataPlan/search.js +6 -5
- package/es/modules/dataPlan/styles/index.less +316 -316
- package/es/modules/dataPlan/tablePlus.js +3 -3
- package/es/modules/dataPlan/userAttributeList.js +5 -5
- package/es/modules/dataReal/css/index.css +48 -0
- package/es/modules/dataReal/css/index.less +51 -0
- package/es/modules/dataReal/demo/index.d.ts +3 -0
- package/es/modules/dataReal/demo/index.js +6 -0
- package/es/modules/dataReal/index1.d.ts +28 -0
- package/es/modules/dataReal/index1.js +247 -0
- package/es/modules/dataReal/table.d.ts +5 -0
- package/es/modules/dataReal/table.js +260 -0
- package/es/store/index.js +11 -11
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +9 -1
- package/package.json +64 -58
|
@@ -1,28 +1,38 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
function
|
|
5
|
-
function
|
|
6
|
-
function
|
|
7
|
-
function
|
|
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 _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
5
|
+
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."); }
|
|
6
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
7
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
|
+
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); }
|
|
11
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
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."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
11
|
-
function _iterableToArrayLimit(
|
|
12
|
-
function _arrayWithHoles(
|
|
13
|
+
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; } }
|
|
14
|
+
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; }
|
|
15
|
+
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; } }
|
|
16
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
17
|
import { BizGlobalDataContext, IconFont, ajax } from '@zgfe/business-lib';
|
|
14
|
-
import { Input, Button, Select, Table, message, Modal, Upload, Popover } from 'antd';
|
|
18
|
+
import { Input, Button, Select, Table, message, Modal, Upload, Popover, Checkbox } from 'antd';
|
|
15
19
|
import React, { useEffect, useState, useContext } from 'react';
|
|
16
20
|
import './styles/index.less';
|
|
17
21
|
import request from '../../utils/ajax';
|
|
18
22
|
import apis from '../../constants/api';
|
|
19
23
|
import { DmContext } from '../../store';
|
|
20
|
-
import { getAppID } from '../../utils';
|
|
24
|
+
import { getAppID, getTableScroll } from '../../utils';
|
|
25
|
+
import CreateAttrDrawer from './components/createAttrDrawer';
|
|
26
|
+
import ImportModal from './components/importAttrDialog';
|
|
27
|
+
import DelConfirm from './components/deleteUserAttrConfirm';
|
|
28
|
+
import _ from 'lodash';
|
|
29
|
+
import moment from 'moment';
|
|
21
30
|
var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
22
31
|
var classPrefix = 'attr-list';
|
|
23
32
|
var _useContext = useContext(BizGlobalDataContext),
|
|
24
33
|
currentApp = _useContext.currentApp,
|
|
25
|
-
isDemo = _useContext.isDemo
|
|
34
|
+
isDemo = _useContext.isDemo,
|
|
35
|
+
authority = _useContext.authority;
|
|
26
36
|
var isOpen = props.isOpen,
|
|
27
37
|
queryPlanData = props.queryPlanData,
|
|
28
38
|
source = props.source,
|
|
@@ -39,6 +49,21 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
39
49
|
setValueLoading = _useState4[1];
|
|
40
50
|
var _useContext2 = useContext(DmContext),
|
|
41
51
|
state = _useContext2.state;
|
|
52
|
+
// 创建元事件
|
|
53
|
+
var _useState5 = useState(false),
|
|
54
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
55
|
+
createAttrShow = _useState6[0],
|
|
56
|
+
setCreateAttrShow = _useState6[1];
|
|
57
|
+
// 导入事件弹窗
|
|
58
|
+
var _useState7 = useState(false),
|
|
59
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
60
|
+
openImportModal = _useState8[0],
|
|
61
|
+
setOpenImportModal = _useState8[1];
|
|
62
|
+
// 确认删除弹窗
|
|
63
|
+
var _useState9 = useState(false),
|
|
64
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
65
|
+
isShowDel = _useState10[0],
|
|
66
|
+
setIsShowDel = _useState10[1];
|
|
42
67
|
// 内置属性(名称, 用户id)可编辑加密状态
|
|
43
68
|
var uniqueAttrs = ['name', 'app_user_id'];
|
|
44
69
|
// 判断是否在方案中: 处理表格class添加异常样式 | 处理表格行异常信息展示, true异常
|
|
@@ -64,10 +89,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
64
89
|
}
|
|
65
90
|
};
|
|
66
91
|
// 用户属性列表
|
|
67
|
-
var
|
|
68
|
-
|
|
69
|
-
userAttrData =
|
|
70
|
-
setUserAttrData =
|
|
92
|
+
var _useState11 = useState([]),
|
|
93
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
94
|
+
userAttrData = _useState12[0],
|
|
95
|
+
setUserAttrData = _useState12[1];
|
|
71
96
|
var queryUserPropMeta = function queryUserPropMeta() {
|
|
72
97
|
request(apis.getUserPropMeta, {
|
|
73
98
|
method: 'post',
|
|
@@ -81,6 +106,9 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
81
106
|
if (item.dimension_sub == 'user_attr' || uniqueAttrs.includes(item.dimension_sub)) {
|
|
82
107
|
return item;
|
|
83
108
|
}
|
|
109
|
+
}) // 业务不展示
|
|
110
|
+
.filter(function (item) {
|
|
111
|
+
return item.attr_id != 31415926;
|
|
84
112
|
});
|
|
85
113
|
setUserAttrData(afterData);
|
|
86
114
|
setLoading(false);
|
|
@@ -94,6 +122,9 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
94
122
|
item.name = item.attr_name;
|
|
95
123
|
item.type = item.prop_type;
|
|
96
124
|
return item;
|
|
125
|
+
}) // 业务不展示
|
|
126
|
+
.filter(function (item) {
|
|
127
|
+
return item.attr_id != 31415926;
|
|
97
128
|
});
|
|
98
129
|
setUserAttrData(_temp);
|
|
99
130
|
setLoading(false);
|
|
@@ -116,10 +147,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
116
147
|
}
|
|
117
148
|
};
|
|
118
149
|
// 别名foucs
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
aliasFocusData =
|
|
122
|
-
setAliasFocusData =
|
|
150
|
+
var _useState13 = useState(''),
|
|
151
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
152
|
+
aliasFocusData = _useState14[0],
|
|
153
|
+
setAliasFocusData = _useState14[1];
|
|
123
154
|
var aliasFocus = function aliasFocus(e) {
|
|
124
155
|
setAliasFocusData(e.currentTarget.value);
|
|
125
156
|
};
|
|
@@ -158,15 +189,70 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
158
189
|
});
|
|
159
190
|
}
|
|
160
191
|
};
|
|
192
|
+
// 勾选数据
|
|
193
|
+
var _useState15 = useState([]),
|
|
194
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
195
|
+
checkedData = _useState16[0],
|
|
196
|
+
setCheckedData = _useState16[1];
|
|
197
|
+
useEffect(function () {
|
|
198
|
+
props.selectAttrList && setCheckedData(props.selectAttrList.map(function (item) {
|
|
199
|
+
return item.id;
|
|
200
|
+
}));
|
|
201
|
+
}, [props.selectAttrList]);
|
|
202
|
+
var attrItemCheckbox = function attrItemCheckbox(e, data) {
|
|
203
|
+
var _checkedData = _.cloneDeep(checkedData);
|
|
204
|
+
if (e.target.checked) {
|
|
205
|
+
_checkedData.push(data.id);
|
|
206
|
+
} else {
|
|
207
|
+
_.remove(_checkedData, function (x) {
|
|
208
|
+
return x === data.id;
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
setCheckedData(_checkedData);
|
|
212
|
+
props.setSelectEventList && props.setSelectEventList(userAttrData.filter(function (item) {
|
|
213
|
+
return _checkedData.includes(item.id);
|
|
214
|
+
}));
|
|
215
|
+
};
|
|
216
|
+
// 表格列表筛选项
|
|
217
|
+
var _useState17 = useState(''),
|
|
218
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
219
|
+
name = _useState18[0],
|
|
220
|
+
setName = _useState18[1];
|
|
221
|
+
var _useState19 = useState(0),
|
|
222
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
223
|
+
type = _useState20[0],
|
|
224
|
+
setType = _useState20[1];
|
|
225
|
+
var _useState21 = useState(-1),
|
|
226
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
227
|
+
hidden = _useState22[0],
|
|
228
|
+
setHidden = _useState22[1];
|
|
229
|
+
var _useState23 = useState(-1),
|
|
230
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
231
|
+
encryption_type = _useState24[0],
|
|
232
|
+
setEncryptionType = _useState24[1];
|
|
233
|
+
var _useState25 = useState(''),
|
|
234
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
235
|
+
category = _useState26[0],
|
|
236
|
+
setCategory = _useState26[1];
|
|
237
|
+
var _useState27 = useState(''),
|
|
238
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
239
|
+
owner = _useState28[0],
|
|
240
|
+
setOwner = _useState28[1];
|
|
161
241
|
// 表格列
|
|
162
242
|
var columns = [{
|
|
163
243
|
title: '属性名称',
|
|
164
244
|
dataIndex: 'name',
|
|
245
|
+
fixed: 'left',
|
|
165
246
|
width: 200,
|
|
166
247
|
render: function render(text, record, index) {
|
|
167
248
|
return /*#__PURE__*/React.createElement("div", {
|
|
168
249
|
className: "attr-name"
|
|
169
|
-
},
|
|
250
|
+
}, props.isSelect && (/*#__PURE__*/React.createElement(Checkbox, {
|
|
251
|
+
checked: checkedData.includes(record.id),
|
|
252
|
+
onChange: function onChange(e) {
|
|
253
|
+
return attrItemCheckbox(e, record);
|
|
254
|
+
}
|
|
255
|
+
})), rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement(Popover, {
|
|
170
256
|
content: /*#__PURE__*/React.createElement("div", {
|
|
171
257
|
style: {
|
|
172
258
|
color: 'red'
|
|
@@ -174,7 +260,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
174
260
|
}, "\u4E0D\u5728\u65B9\u6848\u4E2D")
|
|
175
261
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
176
262
|
type: "tishiicon"
|
|
177
|
-
})), /*#__PURE__*/React.createElement(Popover, {
|
|
263
|
+
}))), /*#__PURE__*/React.createElement(Popover, {
|
|
178
264
|
content: text
|
|
179
265
|
}, /*#__PURE__*/React.createElement("span", {
|
|
180
266
|
className: "attr-name-text"
|
|
@@ -194,7 +280,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
194
280
|
return /*#__PURE__*/React.createElement(Input, {
|
|
195
281
|
className: "alias_name",
|
|
196
282
|
placeholder: "\u7F16\u8F91\u522B\u540D",
|
|
197
|
-
disabled: isDemo || record.isIdMappingProp || record.category === 'fixed',
|
|
283
|
+
disabled: isDemo || !authority[1722838507] || record.isIdMappingProp || record.category === 'fixed',
|
|
198
284
|
defaultValue: record.alias_name,
|
|
199
285
|
onFocus: aliasFocus,
|
|
200
286
|
onBlur: function onBlur(e) {
|
|
@@ -214,7 +300,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
214
300
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
215
301
|
className: "alias_name",
|
|
216
302
|
placeholder: "\u7F16\u8F91\u522B\u540D",
|
|
217
|
-
disabled: isDemo || record.isIdMappingProp || record.category === 'fixed',
|
|
303
|
+
disabled: isDemo || !authority[1722838507] || record.isIdMappingProp || record.category === 'fixed',
|
|
218
304
|
defaultValue: record.alias_name,
|
|
219
305
|
onFocus: aliasFocus,
|
|
220
306
|
onBlur: function onBlur(e) {
|
|
@@ -224,11 +310,19 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
224
310
|
}
|
|
225
311
|
}
|
|
226
312
|
}, {
|
|
313
|
+
title: '数据上报',
|
|
314
|
+
dataIndex: 'lastInsertTime',
|
|
315
|
+
width: 100,
|
|
316
|
+
render: function render(text, record, index) {
|
|
317
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
318
|
+
className: "attr-name"
|
|
319
|
+
}, text ? '有' : '无');
|
|
320
|
+
}
|
|
321
|
+
}].concat(_toConsumableArray(source == 'event' ? [{
|
|
227
322
|
title: '属性值别名',
|
|
228
|
-
dataIndex: 'attr_alias_name',
|
|
229
323
|
width: 120,
|
|
230
|
-
render: function render(
|
|
231
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement("span", {
|
|
324
|
+
render: function render(record) {
|
|
325
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement("span", {
|
|
232
326
|
className: "attr_alias_name ".concat(isDemo || record.isIdMappingProp || record.category === 'fixed' ? 'disabled' : ''),
|
|
233
327
|
onClick: function onClick() {
|
|
234
328
|
if (record.isIdMappingProp || record.category === 'fixed') return;
|
|
@@ -236,13 +330,40 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
236
330
|
message.error('demo环境,无法编辑');
|
|
237
331
|
return;
|
|
238
332
|
}
|
|
239
|
-
setattrId(
|
|
333
|
+
setattrId(record.attr_id);
|
|
240
334
|
setAttrAliasNameShow(true);
|
|
241
335
|
}
|
|
242
|
-
},
|
|
336
|
+
}, record.value_dict ? '已编辑' : '编辑')));
|
|
243
337
|
}
|
|
244
|
-
}, {
|
|
245
|
-
title:
|
|
338
|
+
}] : []), [{
|
|
339
|
+
title: (/*#__PURE__*/React.createElement(Select, {
|
|
340
|
+
defaultValue: 0,
|
|
341
|
+
style: {
|
|
342
|
+
width: 100
|
|
343
|
+
},
|
|
344
|
+
onChange: function onChange(e) {
|
|
345
|
+
return setType(e);
|
|
346
|
+
},
|
|
347
|
+
options: [{
|
|
348
|
+
value: 0,
|
|
349
|
+
label: '属性类型'
|
|
350
|
+
}, {
|
|
351
|
+
value: 1,
|
|
352
|
+
label: '字符串'
|
|
353
|
+
}, {
|
|
354
|
+
value: 2,
|
|
355
|
+
label: '数值'
|
|
356
|
+
}, {
|
|
357
|
+
value: 3,
|
|
358
|
+
label: '日期'
|
|
359
|
+
}],
|
|
360
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
361
|
+
type: "xiangxia",
|
|
362
|
+
style: {
|
|
363
|
+
color: '#021429'
|
|
364
|
+
}
|
|
365
|
+
})
|
|
366
|
+
})),
|
|
246
367
|
dataIndex: 'type',
|
|
247
368
|
width: 120,
|
|
248
369
|
render: function render(text, record, index) {
|
|
@@ -251,10 +372,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
251
372
|
2: '数值',
|
|
252
373
|
3: '日期'
|
|
253
374
|
};
|
|
254
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement(Select, {
|
|
375
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement(Select, {
|
|
255
376
|
defaultValue: record.type,
|
|
256
377
|
style: {
|
|
257
|
-
width:
|
|
378
|
+
width: 100
|
|
258
379
|
},
|
|
259
380
|
disabled: isDemo || record.isIdMappingProp || record.category === 'fixed',
|
|
260
381
|
onChange: function onChange(e) {
|
|
@@ -269,18 +390,48 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
269
390
|
}, {
|
|
270
391
|
value: 3,
|
|
271
392
|
label: '日期'
|
|
272
|
-
}]
|
|
273
|
-
|
|
393
|
+
}],
|
|
394
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
395
|
+
type: "xiangxia",
|
|
396
|
+
style: {
|
|
397
|
+
color: '#021429'
|
|
398
|
+
}
|
|
399
|
+
})
|
|
400
|
+
})), rowRenderHandle(record.name) && /*#__PURE__*/React.createElement("div", null, json[record.type]));
|
|
274
401
|
}
|
|
275
402
|
}, {
|
|
276
|
-
title:
|
|
403
|
+
title: (/*#__PURE__*/React.createElement(Select, {
|
|
404
|
+
defaultValue: -1,
|
|
405
|
+
style: {
|
|
406
|
+
width: 100
|
|
407
|
+
},
|
|
408
|
+
onChange: function onChange(e) {
|
|
409
|
+
return setHidden(e);
|
|
410
|
+
},
|
|
411
|
+
options: [{
|
|
412
|
+
value: -1,
|
|
413
|
+
label: '显示状态'
|
|
414
|
+
}, {
|
|
415
|
+
value: 1,
|
|
416
|
+
label: '隐藏'
|
|
417
|
+
}, {
|
|
418
|
+
value: 0,
|
|
419
|
+
label: '显示'
|
|
420
|
+
}],
|
|
421
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
422
|
+
type: "xiangxia",
|
|
423
|
+
style: {
|
|
424
|
+
color: '#021429'
|
|
425
|
+
}
|
|
426
|
+
})
|
|
427
|
+
})),
|
|
277
428
|
dataIndex: 'hidden',
|
|
278
429
|
width: 120,
|
|
279
430
|
render: function render(text, record, index) {
|
|
280
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement(Select, {
|
|
431
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement(Select, {
|
|
281
432
|
defaultValue: record.hidden || 0,
|
|
282
433
|
style: {
|
|
283
|
-
width:
|
|
434
|
+
width: 100
|
|
284
435
|
},
|
|
285
436
|
disabled: isDemo || record.isIdMappingProp || record.category === 'fixed',
|
|
286
437
|
onChange: function onChange(e) {
|
|
@@ -292,11 +443,44 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
292
443
|
}, {
|
|
293
444
|
value: 0,
|
|
294
445
|
label: '显示'
|
|
295
|
-
}]
|
|
296
|
-
|
|
446
|
+
}],
|
|
447
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
448
|
+
type: "xiangxia",
|
|
449
|
+
style: {
|
|
450
|
+
color: '#021429'
|
|
451
|
+
}
|
|
452
|
+
})
|
|
453
|
+
})), rowRenderHandle(record.name) && /*#__PURE__*/React.createElement("div", null, record.hidden == 1 ? '隐藏' : '显示'));
|
|
297
454
|
}
|
|
298
455
|
}, {
|
|
299
|
-
title:
|
|
456
|
+
title: (/*#__PURE__*/React.createElement(Select, {
|
|
457
|
+
defaultValue: -1,
|
|
458
|
+
style: {
|
|
459
|
+
width: 100
|
|
460
|
+
},
|
|
461
|
+
onChange: function onChange(e) {
|
|
462
|
+
return setEncryptionType(e);
|
|
463
|
+
},
|
|
464
|
+
options: [{
|
|
465
|
+
value: -1,
|
|
466
|
+
label: '加密方式'
|
|
467
|
+
}, {
|
|
468
|
+
value: 0,
|
|
469
|
+
label: '不加密'
|
|
470
|
+
}, {
|
|
471
|
+
value: 1,
|
|
472
|
+
label: '半加密'
|
|
473
|
+
}, {
|
|
474
|
+
value: 2,
|
|
475
|
+
label: '全加密'
|
|
476
|
+
}],
|
|
477
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
478
|
+
type: "xiangxia",
|
|
479
|
+
style: {
|
|
480
|
+
color: '#021429'
|
|
481
|
+
}
|
|
482
|
+
})
|
|
483
|
+
})),
|
|
300
484
|
dataIndex: 'encryption_type',
|
|
301
485
|
width: 120,
|
|
302
486
|
render: function render(text, record, index) {
|
|
@@ -305,10 +489,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
305
489
|
1: '半加密',
|
|
306
490
|
2: '全加密'
|
|
307
491
|
};
|
|
308
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement(Select, {
|
|
492
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement(Select, {
|
|
309
493
|
defaultValue: record.encryption_type,
|
|
310
494
|
style: {
|
|
311
|
-
width:
|
|
495
|
+
width: 100
|
|
312
496
|
},
|
|
313
497
|
disabled: isDemo || record.isIdMappingProp,
|
|
314
498
|
onChange: function onChange(e) {
|
|
@@ -323,10 +507,177 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
323
507
|
}, {
|
|
324
508
|
value: 2,
|
|
325
509
|
label: '全加密'
|
|
326
|
-
}]
|
|
327
|
-
|
|
510
|
+
}],
|
|
511
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
512
|
+
type: "xiangxia",
|
|
513
|
+
style: {
|
|
514
|
+
color: '#021429'
|
|
515
|
+
}
|
|
516
|
+
})
|
|
517
|
+
})), rowRenderHandle(record.name) && /*#__PURE__*/React.createElement("div", null, json[record.encryption_type]));
|
|
328
518
|
}
|
|
329
|
-
}]
|
|
519
|
+
}], _toConsumableArray(source === 'user' ? [{
|
|
520
|
+
title: '属性值别名',
|
|
521
|
+
width: 120,
|
|
522
|
+
render: function render(record) {
|
|
523
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement("span", {
|
|
524
|
+
className: "attr_alias_name ".concat(isDemo || record.isIdMappingProp || record.category === 'fixed' ? 'disabled' : ''),
|
|
525
|
+
onClick: function onClick() {
|
|
526
|
+
if (!authority[1722838507]) {
|
|
527
|
+
message.error('无编辑权限');
|
|
528
|
+
return;
|
|
529
|
+
}
|
|
530
|
+
if (record.isIdMappingProp || record.category === 'fixed') return;
|
|
531
|
+
if (isDemo) {
|
|
532
|
+
message.error('demo环境,无法编辑');
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
setattrId(record.id);
|
|
536
|
+
setAttrAliasNameShow(true);
|
|
537
|
+
}
|
|
538
|
+
}, record.value_dict ? '已编辑' : '编辑')));
|
|
539
|
+
}
|
|
540
|
+
}] : []), _toConsumableArray(source === 'user' ? [{
|
|
541
|
+
title: (/*#__PURE__*/React.createElement(Select, {
|
|
542
|
+
defaultValue: '',
|
|
543
|
+
style: {
|
|
544
|
+
width: 100
|
|
545
|
+
},
|
|
546
|
+
onChange: function onChange(e) {
|
|
547
|
+
return setCategory(e);
|
|
548
|
+
},
|
|
549
|
+
options: [{
|
|
550
|
+
value: '',
|
|
551
|
+
label: '来源'
|
|
552
|
+
}, {
|
|
553
|
+
value: 'fixed',
|
|
554
|
+
label: '内置'
|
|
555
|
+
}, {
|
|
556
|
+
value: 'custom',
|
|
557
|
+
label: '自定义'
|
|
558
|
+
}],
|
|
559
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
560
|
+
type: "xiangxia",
|
|
561
|
+
style: {
|
|
562
|
+
color: '#021429'
|
|
563
|
+
}
|
|
564
|
+
})
|
|
565
|
+
})),
|
|
566
|
+
dataIndex: 'category',
|
|
567
|
+
width: 120,
|
|
568
|
+
render: function render(category) {
|
|
569
|
+
var json = {
|
|
570
|
+
fixed: '内置',
|
|
571
|
+
custom: '自定义'
|
|
572
|
+
};
|
|
573
|
+
return /*#__PURE__*/React.createElement("div", null, json[category]);
|
|
574
|
+
}
|
|
575
|
+
}, {
|
|
576
|
+
title: '创建人',
|
|
577
|
+
dataIndex: 'creatorName',
|
|
578
|
+
width: 100,
|
|
579
|
+
render: function render(creatorName) {
|
|
580
|
+
return /*#__PURE__*/React.createElement("div", null, creatorName || '-');
|
|
581
|
+
}
|
|
582
|
+
}, {
|
|
583
|
+
title: '创建时间',
|
|
584
|
+
dataIndex: 'createdTime',
|
|
585
|
+
sorter: function sorter(a, b) {
|
|
586
|
+
return (a.createdTime || 0) - (b.createdTime || 0);
|
|
587
|
+
},
|
|
588
|
+
width: 221,
|
|
589
|
+
render: function render(createdTime) {
|
|
590
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, createdTime ? moment(createdTime).format('YYYY-MM-DD HH:mm:ss') : '-');
|
|
591
|
+
}
|
|
592
|
+
}] : [{
|
|
593
|
+
title: (/*#__PURE__*/React.createElement(Select, {
|
|
594
|
+
defaultValue: '',
|
|
595
|
+
style: {
|
|
596
|
+
width: 100
|
|
597
|
+
},
|
|
598
|
+
onChange: function onChange(e) {
|
|
599
|
+
return setOwner(e);
|
|
600
|
+
},
|
|
601
|
+
options: [{
|
|
602
|
+
value: '',
|
|
603
|
+
label: '来源'
|
|
604
|
+
}, {
|
|
605
|
+
value: 'zg_abp',
|
|
606
|
+
label: '内置'
|
|
607
|
+
}, {
|
|
608
|
+
value: 'zg',
|
|
609
|
+
label: '自定义'
|
|
610
|
+
}],
|
|
611
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
612
|
+
type: "xiangxia",
|
|
613
|
+
style: {
|
|
614
|
+
color: '#021429'
|
|
615
|
+
}
|
|
616
|
+
})
|
|
617
|
+
})),
|
|
618
|
+
dataIndex: 'owner',
|
|
619
|
+
width: 120,
|
|
620
|
+
render: function render(owner) {
|
|
621
|
+
var json = {
|
|
622
|
+
zg_abp: '内置',
|
|
623
|
+
zg: '自定义'
|
|
624
|
+
};
|
|
625
|
+
return /*#__PURE__*/React.createElement("div", null, json[owner]);
|
|
626
|
+
}
|
|
627
|
+
}]), [{
|
|
628
|
+
title: '操作',
|
|
629
|
+
width: 72,
|
|
630
|
+
fixed: 'right',
|
|
631
|
+
render: function render(record) {
|
|
632
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
633
|
+
type: "link",
|
|
634
|
+
style: {
|
|
635
|
+
padding: 0
|
|
636
|
+
},
|
|
637
|
+
disabled: record.category === 'fixed' || !authority[1722838563],
|
|
638
|
+
onClick: function onClick() {
|
|
639
|
+
if (!authority[1722838563]) {
|
|
640
|
+
message.error('无删除权限');
|
|
641
|
+
return;
|
|
642
|
+
}
|
|
643
|
+
saveRemoveAttrData(record);
|
|
644
|
+
}
|
|
645
|
+
}, "\u5220\u9664");
|
|
646
|
+
}
|
|
647
|
+
}]);
|
|
648
|
+
// 删除属性
|
|
649
|
+
var _useState29 = useState(),
|
|
650
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
|
651
|
+
removeAttrData = _useState30[0],
|
|
652
|
+
setRemoveAttrData = _useState30[1];
|
|
653
|
+
var saveRemoveAttrData = function saveRemoveAttrData(record) {
|
|
654
|
+
if (isDemo) {
|
|
655
|
+
message.error('demo环境,无法删除');
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
setRemoveAttrData(record);
|
|
659
|
+
setIsShowDel(true);
|
|
660
|
+
};
|
|
661
|
+
var removeAttr = function removeAttr(callback) {
|
|
662
|
+
request(source === 'event' ? apis.delEventAttr : apis.deleteUserPropMeta, {
|
|
663
|
+
method: 'post',
|
|
664
|
+
data: {
|
|
665
|
+
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
666
|
+
id: source === 'event' ? removeAttrData === null || removeAttrData === void 0 ? void 0 : removeAttrData.attr_id : removeAttrData === null || removeAttrData === void 0 ? void 0 : removeAttrData.id
|
|
667
|
+
}
|
|
668
|
+
}).then(function (res) {
|
|
669
|
+
if ((res === null || res === void 0 ? void 0 : res.code) === '100000' || (res === null || res === void 0 ? void 0 : res.code) === '108000') {
|
|
670
|
+
message.success('修改成功');
|
|
671
|
+
if (source == 'user') {
|
|
672
|
+
queryUserPropMeta();
|
|
673
|
+
} else {
|
|
674
|
+
props.Refresh();
|
|
675
|
+
}
|
|
676
|
+
callback();
|
|
677
|
+
setIsShowDel(false);
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
};
|
|
330
681
|
// 属性值别名 - 表格列
|
|
331
682
|
var attrColumns = [{
|
|
332
683
|
title: '属性值',
|
|
@@ -335,26 +686,26 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
335
686
|
title: '属性值别名',
|
|
336
687
|
dataIndex: 'mapping_value'
|
|
337
688
|
}];
|
|
338
|
-
var
|
|
339
|
-
|
|
340
|
-
attrExcelData =
|
|
341
|
-
setAttrExcelData =
|
|
342
|
-
var
|
|
343
|
-
|
|
344
|
-
attrAliasNameShow =
|
|
345
|
-
setAttrAliasNameShow =
|
|
346
|
-
var
|
|
347
|
-
|
|
348
|
-
attrId =
|
|
349
|
-
setattrId =
|
|
350
|
-
var
|
|
351
|
-
|
|
352
|
-
batchId =
|
|
353
|
-
setBatchId =
|
|
354
|
-
var
|
|
355
|
-
|
|
356
|
-
exportAliasTmp =
|
|
357
|
-
setExportAliasTmp =
|
|
689
|
+
var _useState31 = useState([]),
|
|
690
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
691
|
+
attrExcelData = _useState32[0],
|
|
692
|
+
setAttrExcelData = _useState32[1];
|
|
693
|
+
var _useState33 = useState(false),
|
|
694
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
695
|
+
attrAliasNameShow = _useState34[0],
|
|
696
|
+
setAttrAliasNameShow = _useState34[1];
|
|
697
|
+
var _useState35 = useState(0),
|
|
698
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
|
699
|
+
attrId = _useState36[0],
|
|
700
|
+
setattrId = _useState36[1];
|
|
701
|
+
var _useState37 = useState(0),
|
|
702
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
703
|
+
batchId = _useState38[0],
|
|
704
|
+
setBatchId = _useState38[1];
|
|
705
|
+
var _useState39 = useState(false),
|
|
706
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
707
|
+
exportAliasTmp = _useState40[0],
|
|
708
|
+
setExportAliasTmp = _useState40[1];
|
|
358
709
|
var uploadProps = {
|
|
359
710
|
maxCount: 1,
|
|
360
711
|
showUploadList: false,
|
|
@@ -384,10 +735,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
384
735
|
}
|
|
385
736
|
};
|
|
386
737
|
// 清空属性值别名excel数据
|
|
387
|
-
var
|
|
388
|
-
|
|
389
|
-
clearFlag =
|
|
390
|
-
setClearFlag =
|
|
738
|
+
var _useState41 = useState(false),
|
|
739
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
740
|
+
clearFlag = _useState42[0],
|
|
741
|
+
setClearFlag = _useState42[1];
|
|
391
742
|
var clearData = function clearData() {
|
|
392
743
|
setAttrExcelData([]);
|
|
393
744
|
setClearFlag(true);
|
|
@@ -409,6 +760,11 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
409
760
|
if (res) {
|
|
410
761
|
message.success('操作成功');
|
|
411
762
|
closeHandle();
|
|
763
|
+
if (source == 'user') {
|
|
764
|
+
queryUserPropMeta();
|
|
765
|
+
} else {
|
|
766
|
+
props.Refresh();
|
|
767
|
+
}
|
|
412
768
|
}
|
|
413
769
|
});
|
|
414
770
|
};
|
|
@@ -441,20 +797,84 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
441
797
|
setValueLoading(false);
|
|
442
798
|
setAttrExcelData([]);
|
|
443
799
|
};
|
|
800
|
+
var _useState43 = useState(''),
|
|
801
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
802
|
+
scrollY = _useState44[0],
|
|
803
|
+
setScrollY = _useState44[1];
|
|
804
|
+
//页面加载完成后才能获取到对应的元素及其位置
|
|
805
|
+
useEffect(function () {
|
|
806
|
+
var _Y = getTableScroll(60, 'dataManageAttrTable');
|
|
807
|
+
// console.log('_Y', _Y);
|
|
808
|
+
setScrollY(_Y);
|
|
809
|
+
}, []);
|
|
444
810
|
return /*#__PURE__*/React.createElement("div", {
|
|
445
811
|
className: classPrefix
|
|
446
|
-
}, /*#__PURE__*/React.createElement(
|
|
812
|
+
}, source == 'user' && (/*#__PURE__*/React.createElement("div", {
|
|
813
|
+
className: "".concat(classPrefix, "-top-box")
|
|
814
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
815
|
+
className: "top-input",
|
|
816
|
+
value: name,
|
|
817
|
+
onChange: function onChange(e) {
|
|
818
|
+
setName(e.target.value);
|
|
819
|
+
},
|
|
820
|
+
placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u540D\u79F0\u6216\u522B\u540D",
|
|
821
|
+
prefix: /*#__PURE__*/React.createElement(IconFont, {
|
|
822
|
+
type: "sousuo"
|
|
823
|
+
})
|
|
824
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
825
|
+
className: "top-total"
|
|
826
|
+
}, "\u5171", /*#__PURE__*/React.createElement("span", null, userAttrData.filter(function (item) {
|
|
827
|
+
return new RegExp(_.escapeRegExp(name), 'i').test((item.name || '') + (item.alias_name || ''));
|
|
828
|
+
}).filter(function (item) {
|
|
829
|
+
return type < 1 || item.type === type;
|
|
830
|
+
}).filter(function (item) {
|
|
831
|
+
return hidden < 0 || item.hidden === hidden;
|
|
832
|
+
}).filter(function (item) {
|
|
833
|
+
return encryption_type < 0 || item.encryption_type === encryption_type;
|
|
834
|
+
}).filter(function (item) {
|
|
835
|
+
return category == '' || item.category === category;
|
|
836
|
+
}).length), "\u6761"), /*#__PURE__*/React.createElement("div", {
|
|
837
|
+
className: "top-button"
|
|
838
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
839
|
+
shape: "round",
|
|
840
|
+
type: 'primary',
|
|
841
|
+
disabled: !authority[1722838073],
|
|
842
|
+
className: "button",
|
|
843
|
+
onClick: function onClick() {
|
|
844
|
+
return setCreateAttrShow(true);
|
|
845
|
+
}
|
|
846
|
+
}, "\u521B\u5EFA\u5C5E\u6027"), /*#__PURE__*/React.createElement(Button, {
|
|
847
|
+
shape: "round",
|
|
848
|
+
className: "button",
|
|
849
|
+
disabled: isDemo || !authority[1722838544],
|
|
850
|
+
onClick: function onClick() {
|
|
851
|
+
return setOpenImportModal(true);
|
|
852
|
+
}
|
|
853
|
+
}, "\u5BFC\u5165\u5C5E\u6027")))), /*#__PURE__*/React.createElement(Table, {
|
|
447
854
|
className: "".concat(classPrefix, "-table"),
|
|
448
855
|
columns: columns,
|
|
856
|
+
id: 'dataManageAttrTable',
|
|
449
857
|
rowKey: "name",
|
|
450
858
|
loading: loading,
|
|
451
859
|
scroll: {
|
|
452
|
-
y:
|
|
860
|
+
y: scrollY
|
|
453
861
|
},
|
|
454
862
|
rowClassName: function rowClassName(record, index) {
|
|
455
863
|
return rowRenderHandle(record.name) ? 'error-row' : '';
|
|
456
864
|
},
|
|
457
|
-
dataSource: userAttrData
|
|
865
|
+
dataSource: userAttrData.filter(function (item) {
|
|
866
|
+
return new RegExp(_.escapeRegExp(name), 'i').test((item.name || '') + (item.alias_name || ''));
|
|
867
|
+
}).filter(function (item) {
|
|
868
|
+
return type < 1 || item.type === type;
|
|
869
|
+
}).filter(function (item) {
|
|
870
|
+
return hidden < 0 || item.hidden === hidden;
|
|
871
|
+
}).filter(function (item) {
|
|
872
|
+
return encryption_type < 0 || item.encryption_type === encryption_type;
|
|
873
|
+
}).filter(function (item) {
|
|
874
|
+
return category == '' || item.category === category;
|
|
875
|
+
}).filter(function (item) {
|
|
876
|
+
return owner == '' || item.owner === owner;
|
|
877
|
+
}),
|
|
458
878
|
pagination: false
|
|
459
879
|
}), /*#__PURE__*/React.createElement(Modal, {
|
|
460
880
|
title: "\u5C5E\u6027\u503C\u522B\u540D",
|
|
@@ -480,21 +900,21 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
480
900
|
ajax(apis.exportAliasTmp, {
|
|
481
901
|
method: 'get',
|
|
482
902
|
responseType: 'blob',
|
|
483
|
-
fileName: "".concat(source == 'user' ? '用户' : '事件', "\u5C5E\u6027\u503C\u6A21\u677F"),
|
|
903
|
+
fileName: "".concat(source == 'user' ? (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体' : '用户' : '事件', "\u5C5E\u6027\u503C\u6A21\u677F"),
|
|
484
904
|
getResponse: true,
|
|
485
905
|
params: {
|
|
486
|
-
fileName: '
|
|
906
|
+
fileName: "".concat(source == 'user' ? (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体' : '用户' : '事件', "\u5C5E\u6027\u503C\u6A21\u677F.xlsx")
|
|
487
907
|
}
|
|
488
908
|
}).finally(function () {
|
|
489
909
|
setExportAliasTmp(false);
|
|
490
910
|
});
|
|
491
911
|
}
|
|
492
|
-
}, "\u6A21\u677F\u4E0B\u8F7D")), attrExcelData.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
912
|
+
}, "\u6A21\u677F\u4E0B\u8F7D")), attrExcelData.length > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
493
913
|
className: "clearData",
|
|
494
914
|
onClick: clearData
|
|
495
915
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
496
916
|
type: "qingchu"
|
|
497
|
-
}), "\u6E05\u7A7A\u6570\u636E"), /*#__PURE__*/React.createElement(Table, {
|
|
917
|
+
}), "\u6E05\u7A7A\u6570\u636E")), /*#__PURE__*/React.createElement(Table, {
|
|
498
918
|
scroll: {
|
|
499
919
|
y: 200
|
|
500
920
|
},
|
|
@@ -503,6 +923,30 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
503
923
|
rowKey: "mapping_value",
|
|
504
924
|
dataSource: attrExcelData,
|
|
505
925
|
pagination: false
|
|
506
|
-
}))
|
|
926
|
+
})), /*#__PURE__*/React.createElement(CreateAttrDrawer, {
|
|
927
|
+
isShow: createAttrShow,
|
|
928
|
+
onClose: function onClose() {
|
|
929
|
+
return setCreateAttrShow(false);
|
|
930
|
+
},
|
|
931
|
+
onSubmit: function onSubmit() {
|
|
932
|
+
queryUserPropMeta();
|
|
933
|
+
setCreateAttrShow(false);
|
|
934
|
+
}
|
|
935
|
+
}), openImportModal ? (/*#__PURE__*/React.createElement(ImportModal, {
|
|
936
|
+
onCancel: function onCancel() {
|
|
937
|
+
setOpenImportModal(false);
|
|
938
|
+
},
|
|
939
|
+
onSuccess: function onSuccess() {
|
|
940
|
+
queryUserPropMeta();
|
|
941
|
+
setOpenImportModal(false);
|
|
942
|
+
}
|
|
943
|
+
})) : null, isShowDel ? (/*#__PURE__*/React.createElement(DelConfirm, {
|
|
944
|
+
onOk: function onOk(callback) {
|
|
945
|
+
removeAttr(callback);
|
|
946
|
+
},
|
|
947
|
+
onCancel: function onCancel() {
|
|
948
|
+
setIsShowDel(false);
|
|
949
|
+
}
|
|
950
|
+
})) : null);
|
|
507
951
|
};
|
|
508
952
|
export default CollectionAttributeList;
|