@zgfe/modules-dm 1.0.42-alpha.9 → 1.0.56-zhongyuan.1
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 +516 -81
- package/es/modules/dataManage/collectionEventList.d.ts +6 -0
- package/es/modules/dataManage/collectionEventList.js +479 -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 +5 -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 +5 -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 +5 -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 +5 -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/eventGroupingDrawer.js +41 -44
- package/es/modules/dataManage/components/importAttrDialog/demo/index.d.ts +2 -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 +157 -0
- package/es/modules/dataManage/components/importAttrDialog/styles/index.less +90 -0
- package/es/modules/dataManage/components/importMetaDialog/demo/index.d.ts +2 -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 +157 -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.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 +364 -10
- 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 +376 -0
- package/es/modules/dataMap/component/leftTree.d.ts +6 -0
- package/es/modules/dataMap/component/leftTree.js +227 -0
- package/es/modules/dataMap/component/rightDetail.d.ts +7 -0
- package/es/modules/dataMap/component/rightDetail.js +680 -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 +2 -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 +2 -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 +148 -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/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 +2 -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 +215 -0
- package/es/modules/dataReal/table.d.ts +5 -0
- package/es/modules/dataReal/table.js +258 -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 +8 -4
|
@@ -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) {
|
|
@@ -223,12 +309,11 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
223
309
|
}));
|
|
224
310
|
}
|
|
225
311
|
}
|
|
226
|
-
}
|
|
312
|
+
}].concat(_toConsumableArray(source == 'event' ? [{
|
|
227
313
|
title: '属性值别名',
|
|
228
|
-
dataIndex: 'attr_alias_name',
|
|
229
314
|
width: 120,
|
|
230
|
-
render: function render(
|
|
231
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement("span", {
|
|
315
|
+
render: function render(record) {
|
|
316
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement("span", {
|
|
232
317
|
className: "attr_alias_name ".concat(isDemo || record.isIdMappingProp || record.category === 'fixed' ? 'disabled' : ''),
|
|
233
318
|
onClick: function onClick() {
|
|
234
319
|
if (record.isIdMappingProp || record.category === 'fixed') return;
|
|
@@ -236,13 +321,40 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
236
321
|
message.error('demo环境,无法编辑');
|
|
237
322
|
return;
|
|
238
323
|
}
|
|
239
|
-
setattrId(
|
|
324
|
+
setattrId(record.attr_id);
|
|
240
325
|
setAttrAliasNameShow(true);
|
|
241
326
|
}
|
|
242
|
-
},
|
|
327
|
+
}, record.value_dict ? '已编辑' : '编辑')));
|
|
243
328
|
}
|
|
244
|
-
}, {
|
|
245
|
-
title:
|
|
329
|
+
}] : []), [{
|
|
330
|
+
title: (/*#__PURE__*/React.createElement(Select, {
|
|
331
|
+
defaultValue: 0,
|
|
332
|
+
style: {
|
|
333
|
+
width: 100
|
|
334
|
+
},
|
|
335
|
+
onChange: function onChange(e) {
|
|
336
|
+
return setType(e);
|
|
337
|
+
},
|
|
338
|
+
options: [{
|
|
339
|
+
value: 0,
|
|
340
|
+
label: '属性类型'
|
|
341
|
+
}, {
|
|
342
|
+
value: 1,
|
|
343
|
+
label: '字符串'
|
|
344
|
+
}, {
|
|
345
|
+
value: 2,
|
|
346
|
+
label: '数值'
|
|
347
|
+
}, {
|
|
348
|
+
value: 3,
|
|
349
|
+
label: '日期'
|
|
350
|
+
}],
|
|
351
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
352
|
+
type: "xiangxia",
|
|
353
|
+
style: {
|
|
354
|
+
color: '#021429'
|
|
355
|
+
}
|
|
356
|
+
})
|
|
357
|
+
})),
|
|
246
358
|
dataIndex: 'type',
|
|
247
359
|
width: 120,
|
|
248
360
|
render: function render(text, record, index) {
|
|
@@ -251,10 +363,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
251
363
|
2: '数值',
|
|
252
364
|
3: '日期'
|
|
253
365
|
};
|
|
254
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement(Select, {
|
|
366
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement(Select, {
|
|
255
367
|
defaultValue: record.type,
|
|
256
368
|
style: {
|
|
257
|
-
width:
|
|
369
|
+
width: 100
|
|
258
370
|
},
|
|
259
371
|
disabled: isDemo || record.isIdMappingProp || record.category === 'fixed',
|
|
260
372
|
onChange: function onChange(e) {
|
|
@@ -269,18 +381,48 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
269
381
|
}, {
|
|
270
382
|
value: 3,
|
|
271
383
|
label: '日期'
|
|
272
|
-
}]
|
|
273
|
-
|
|
384
|
+
}],
|
|
385
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
386
|
+
type: "xiangxia",
|
|
387
|
+
style: {
|
|
388
|
+
color: '#021429'
|
|
389
|
+
}
|
|
390
|
+
})
|
|
391
|
+
})), rowRenderHandle(record.name) && /*#__PURE__*/React.createElement("div", null, json[record.type]));
|
|
274
392
|
}
|
|
275
393
|
}, {
|
|
276
|
-
title:
|
|
394
|
+
title: (/*#__PURE__*/React.createElement(Select, {
|
|
395
|
+
defaultValue: -1,
|
|
396
|
+
style: {
|
|
397
|
+
width: 100
|
|
398
|
+
},
|
|
399
|
+
onChange: function onChange(e) {
|
|
400
|
+
return setHidden(e);
|
|
401
|
+
},
|
|
402
|
+
options: [{
|
|
403
|
+
value: -1,
|
|
404
|
+
label: '显示状态'
|
|
405
|
+
}, {
|
|
406
|
+
value: 1,
|
|
407
|
+
label: '隐藏'
|
|
408
|
+
}, {
|
|
409
|
+
value: 0,
|
|
410
|
+
label: '显示'
|
|
411
|
+
}],
|
|
412
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
413
|
+
type: "xiangxia",
|
|
414
|
+
style: {
|
|
415
|
+
color: '#021429'
|
|
416
|
+
}
|
|
417
|
+
})
|
|
418
|
+
})),
|
|
277
419
|
dataIndex: 'hidden',
|
|
278
420
|
width: 120,
|
|
279
421
|
render: function render(text, record, index) {
|
|
280
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement(Select, {
|
|
422
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement(Select, {
|
|
281
423
|
defaultValue: record.hidden || 0,
|
|
282
424
|
style: {
|
|
283
|
-
width:
|
|
425
|
+
width: 100
|
|
284
426
|
},
|
|
285
427
|
disabled: isDemo || record.isIdMappingProp || record.category === 'fixed',
|
|
286
428
|
onChange: function onChange(e) {
|
|
@@ -292,11 +434,44 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
292
434
|
}, {
|
|
293
435
|
value: 0,
|
|
294
436
|
label: '显示'
|
|
295
|
-
}]
|
|
296
|
-
|
|
437
|
+
}],
|
|
438
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
439
|
+
type: "xiangxia",
|
|
440
|
+
style: {
|
|
441
|
+
color: '#021429'
|
|
442
|
+
}
|
|
443
|
+
})
|
|
444
|
+
})), rowRenderHandle(record.name) && /*#__PURE__*/React.createElement("div", null, record.hidden == 1 ? '隐藏' : '显示'));
|
|
297
445
|
}
|
|
298
446
|
}, {
|
|
299
|
-
title:
|
|
447
|
+
title: (/*#__PURE__*/React.createElement(Select, {
|
|
448
|
+
defaultValue: -1,
|
|
449
|
+
style: {
|
|
450
|
+
width: 100
|
|
451
|
+
},
|
|
452
|
+
onChange: function onChange(e) {
|
|
453
|
+
return setEncryptionType(e);
|
|
454
|
+
},
|
|
455
|
+
options: [{
|
|
456
|
+
value: -1,
|
|
457
|
+
label: '加密方式'
|
|
458
|
+
}, {
|
|
459
|
+
value: 0,
|
|
460
|
+
label: '不加密'
|
|
461
|
+
}, {
|
|
462
|
+
value: 1,
|
|
463
|
+
label: '半加密'
|
|
464
|
+
}, {
|
|
465
|
+
value: 2,
|
|
466
|
+
label: '全加密'
|
|
467
|
+
}],
|
|
468
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
469
|
+
type: "xiangxia",
|
|
470
|
+
style: {
|
|
471
|
+
color: '#021429'
|
|
472
|
+
}
|
|
473
|
+
})
|
|
474
|
+
})),
|
|
300
475
|
dataIndex: 'encryption_type',
|
|
301
476
|
width: 120,
|
|
302
477
|
render: function render(text, record, index) {
|
|
@@ -305,10 +480,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
305
480
|
1: '半加密',
|
|
306
481
|
2: '全加密'
|
|
307
482
|
};
|
|
308
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement(Select, {
|
|
483
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement(Select, {
|
|
309
484
|
defaultValue: record.encryption_type,
|
|
310
485
|
style: {
|
|
311
|
-
width:
|
|
486
|
+
width: 100
|
|
312
487
|
},
|
|
313
488
|
disabled: isDemo || record.isIdMappingProp,
|
|
314
489
|
onChange: function onChange(e) {
|
|
@@ -323,10 +498,177 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
323
498
|
}, {
|
|
324
499
|
value: 2,
|
|
325
500
|
label: '全加密'
|
|
326
|
-
}]
|
|
327
|
-
|
|
501
|
+
}],
|
|
502
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
503
|
+
type: "xiangxia",
|
|
504
|
+
style: {
|
|
505
|
+
color: '#021429'
|
|
506
|
+
}
|
|
507
|
+
})
|
|
508
|
+
})), rowRenderHandle(record.name) && /*#__PURE__*/React.createElement("div", null, json[record.encryption_type]));
|
|
328
509
|
}
|
|
329
|
-
}]
|
|
510
|
+
}], _toConsumableArray(source === 'user' ? [{
|
|
511
|
+
title: '属性值别名',
|
|
512
|
+
width: 120,
|
|
513
|
+
render: function render(record) {
|
|
514
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement("span", {
|
|
515
|
+
className: "attr_alias_name ".concat(isDemo || record.isIdMappingProp || record.category === 'fixed' ? 'disabled' : ''),
|
|
516
|
+
onClick: function onClick() {
|
|
517
|
+
if (!authority[1722838507]) {
|
|
518
|
+
message.error('无编辑权限');
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
if (record.isIdMappingProp || record.category === 'fixed') return;
|
|
522
|
+
if (isDemo) {
|
|
523
|
+
message.error('demo环境,无法编辑');
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
setattrId(record.id);
|
|
527
|
+
setAttrAliasNameShow(true);
|
|
528
|
+
}
|
|
529
|
+
}, record.value_dict ? '已编辑' : '编辑')));
|
|
530
|
+
}
|
|
531
|
+
}] : []), _toConsumableArray(source === 'user' ? [{
|
|
532
|
+
title: (/*#__PURE__*/React.createElement(Select, {
|
|
533
|
+
defaultValue: '',
|
|
534
|
+
style: {
|
|
535
|
+
width: 100
|
|
536
|
+
},
|
|
537
|
+
onChange: function onChange(e) {
|
|
538
|
+
return setCategory(e);
|
|
539
|
+
},
|
|
540
|
+
options: [{
|
|
541
|
+
value: '',
|
|
542
|
+
label: '来源'
|
|
543
|
+
}, {
|
|
544
|
+
value: 'fixed',
|
|
545
|
+
label: '内置'
|
|
546
|
+
}, {
|
|
547
|
+
value: 'custom',
|
|
548
|
+
label: '自定义'
|
|
549
|
+
}],
|
|
550
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
551
|
+
type: "xiangxia",
|
|
552
|
+
style: {
|
|
553
|
+
color: '#021429'
|
|
554
|
+
}
|
|
555
|
+
})
|
|
556
|
+
})),
|
|
557
|
+
dataIndex: 'category',
|
|
558
|
+
width: 120,
|
|
559
|
+
render: function render(category) {
|
|
560
|
+
var json = {
|
|
561
|
+
fixed: '内置',
|
|
562
|
+
custom: '自定义'
|
|
563
|
+
};
|
|
564
|
+
return /*#__PURE__*/React.createElement("div", null, json[category]);
|
|
565
|
+
}
|
|
566
|
+
}, {
|
|
567
|
+
title: '创建人',
|
|
568
|
+
dataIndex: 'creatorName',
|
|
569
|
+
width: 100,
|
|
570
|
+
render: function render(creatorName) {
|
|
571
|
+
return /*#__PURE__*/React.createElement("div", null, creatorName || '-');
|
|
572
|
+
}
|
|
573
|
+
}, {
|
|
574
|
+
title: '创建时间',
|
|
575
|
+
dataIndex: 'createdTime',
|
|
576
|
+
sorter: function sorter(a, b) {
|
|
577
|
+
return (a.createdTime || 0) - (b.createdTime || 0);
|
|
578
|
+
},
|
|
579
|
+
width: 221,
|
|
580
|
+
render: function render(createdTime) {
|
|
581
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, createdTime ? moment(createdTime).format('YYYY-MM-DD HH:mm:ss') : '-');
|
|
582
|
+
}
|
|
583
|
+
}] : [{
|
|
584
|
+
title: (/*#__PURE__*/React.createElement(Select, {
|
|
585
|
+
defaultValue: '',
|
|
586
|
+
style: {
|
|
587
|
+
width: 100
|
|
588
|
+
},
|
|
589
|
+
onChange: function onChange(e) {
|
|
590
|
+
return setOwner(e);
|
|
591
|
+
},
|
|
592
|
+
options: [{
|
|
593
|
+
value: '',
|
|
594
|
+
label: '来源'
|
|
595
|
+
}, {
|
|
596
|
+
value: 'zg_abp',
|
|
597
|
+
label: '内置'
|
|
598
|
+
}, {
|
|
599
|
+
value: 'zg',
|
|
600
|
+
label: '自定义'
|
|
601
|
+
}],
|
|
602
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
603
|
+
type: "xiangxia",
|
|
604
|
+
style: {
|
|
605
|
+
color: '#021429'
|
|
606
|
+
}
|
|
607
|
+
})
|
|
608
|
+
})),
|
|
609
|
+
dataIndex: 'owner',
|
|
610
|
+
width: 120,
|
|
611
|
+
render: function render(owner) {
|
|
612
|
+
var json = {
|
|
613
|
+
zg_abp: '内置',
|
|
614
|
+
zg: '自定义'
|
|
615
|
+
};
|
|
616
|
+
return /*#__PURE__*/React.createElement("div", null, json[owner]);
|
|
617
|
+
}
|
|
618
|
+
}]), [{
|
|
619
|
+
title: '操作',
|
|
620
|
+
width: 72,
|
|
621
|
+
fixed: 'right',
|
|
622
|
+
render: function render(record) {
|
|
623
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
624
|
+
type: "link",
|
|
625
|
+
style: {
|
|
626
|
+
padding: 0
|
|
627
|
+
},
|
|
628
|
+
disabled: record.category === 'fixed' || !authority[1722838563],
|
|
629
|
+
onClick: function onClick() {
|
|
630
|
+
if (!authority[1722838563]) {
|
|
631
|
+
message.error('无删除权限');
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
saveRemoveAttrData(record);
|
|
635
|
+
}
|
|
636
|
+
}, "\u5220\u9664");
|
|
637
|
+
}
|
|
638
|
+
}]);
|
|
639
|
+
// 删除属性
|
|
640
|
+
var _useState29 = useState(),
|
|
641
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
|
642
|
+
removeAttrData = _useState30[0],
|
|
643
|
+
setRemoveAttrData = _useState30[1];
|
|
644
|
+
var saveRemoveAttrData = function saveRemoveAttrData(record) {
|
|
645
|
+
if (isDemo) {
|
|
646
|
+
message.error('demo环境,无法删除');
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
setRemoveAttrData(record);
|
|
650
|
+
setIsShowDel(true);
|
|
651
|
+
};
|
|
652
|
+
var removeAttr = function removeAttr(callback) {
|
|
653
|
+
request(source === 'event' ? apis.delEventAttr : apis.deleteUserPropMeta, {
|
|
654
|
+
method: 'post',
|
|
655
|
+
data: {
|
|
656
|
+
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
657
|
+
id: source === 'event' ? removeAttrData === null || removeAttrData === void 0 ? void 0 : removeAttrData.attr_id : removeAttrData === null || removeAttrData === void 0 ? void 0 : removeAttrData.id
|
|
658
|
+
}
|
|
659
|
+
}).then(function (res) {
|
|
660
|
+
if ((res === null || res === void 0 ? void 0 : res.code) === '100000' || (res === null || res === void 0 ? void 0 : res.code) === '108000') {
|
|
661
|
+
message.success('修改成功');
|
|
662
|
+
if (source == 'user') {
|
|
663
|
+
queryUserPropMeta();
|
|
664
|
+
} else {
|
|
665
|
+
props.Refresh();
|
|
666
|
+
}
|
|
667
|
+
callback();
|
|
668
|
+
setIsShowDel(false);
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
};
|
|
330
672
|
// 属性值别名 - 表格列
|
|
331
673
|
var attrColumns = [{
|
|
332
674
|
title: '属性值',
|
|
@@ -335,26 +677,26 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
335
677
|
title: '属性值别名',
|
|
336
678
|
dataIndex: 'mapping_value'
|
|
337
679
|
}];
|
|
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 =
|
|
680
|
+
var _useState31 = useState([]),
|
|
681
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
682
|
+
attrExcelData = _useState32[0],
|
|
683
|
+
setAttrExcelData = _useState32[1];
|
|
684
|
+
var _useState33 = useState(false),
|
|
685
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
686
|
+
attrAliasNameShow = _useState34[0],
|
|
687
|
+
setAttrAliasNameShow = _useState34[1];
|
|
688
|
+
var _useState35 = useState(0),
|
|
689
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
|
690
|
+
attrId = _useState36[0],
|
|
691
|
+
setattrId = _useState36[1];
|
|
692
|
+
var _useState37 = useState(0),
|
|
693
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
694
|
+
batchId = _useState38[0],
|
|
695
|
+
setBatchId = _useState38[1];
|
|
696
|
+
var _useState39 = useState(false),
|
|
697
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
698
|
+
exportAliasTmp = _useState40[0],
|
|
699
|
+
setExportAliasTmp = _useState40[1];
|
|
358
700
|
var uploadProps = {
|
|
359
701
|
maxCount: 1,
|
|
360
702
|
showUploadList: false,
|
|
@@ -384,10 +726,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
384
726
|
}
|
|
385
727
|
};
|
|
386
728
|
// 清空属性值别名excel数据
|
|
387
|
-
var
|
|
388
|
-
|
|
389
|
-
clearFlag =
|
|
390
|
-
setClearFlag =
|
|
729
|
+
var _useState41 = useState(false),
|
|
730
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
731
|
+
clearFlag = _useState42[0],
|
|
732
|
+
setClearFlag = _useState42[1];
|
|
391
733
|
var clearData = function clearData() {
|
|
392
734
|
setAttrExcelData([]);
|
|
393
735
|
setClearFlag(true);
|
|
@@ -409,6 +751,11 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
409
751
|
if (res) {
|
|
410
752
|
message.success('操作成功');
|
|
411
753
|
closeHandle();
|
|
754
|
+
if (source == 'user') {
|
|
755
|
+
queryUserPropMeta();
|
|
756
|
+
} else {
|
|
757
|
+
props.Refresh();
|
|
758
|
+
}
|
|
412
759
|
}
|
|
413
760
|
});
|
|
414
761
|
};
|
|
@@ -441,20 +788,84 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
441
788
|
setValueLoading(false);
|
|
442
789
|
setAttrExcelData([]);
|
|
443
790
|
};
|
|
791
|
+
var _useState43 = useState(''),
|
|
792
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
793
|
+
scrollY = _useState44[0],
|
|
794
|
+
setScrollY = _useState44[1];
|
|
795
|
+
//页面加载完成后才能获取到对应的元素及其位置
|
|
796
|
+
useEffect(function () {
|
|
797
|
+
var _Y = getTableScroll(60, 'dataManageAttrTable');
|
|
798
|
+
// console.log('_Y', _Y);
|
|
799
|
+
setScrollY(_Y);
|
|
800
|
+
}, []);
|
|
444
801
|
return /*#__PURE__*/React.createElement("div", {
|
|
445
802
|
className: classPrefix
|
|
446
|
-
}, /*#__PURE__*/React.createElement(
|
|
803
|
+
}, source == 'user' && (/*#__PURE__*/React.createElement("div", {
|
|
804
|
+
className: "".concat(classPrefix, "-top-box")
|
|
805
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
806
|
+
className: "top-input",
|
|
807
|
+
value: name,
|
|
808
|
+
onChange: function onChange(e) {
|
|
809
|
+
setName(e.target.value);
|
|
810
|
+
},
|
|
811
|
+
placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u540D\u79F0\u6216\u522B\u540D",
|
|
812
|
+
prefix: /*#__PURE__*/React.createElement(IconFont, {
|
|
813
|
+
type: "sousuo"
|
|
814
|
+
})
|
|
815
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
816
|
+
className: "top-total"
|
|
817
|
+
}, "\u5171", /*#__PURE__*/React.createElement("span", null, userAttrData.filter(function (item) {
|
|
818
|
+
return new RegExp(_.escapeRegExp(name), 'i').test((item.name || '') + (item.alias_name || ''));
|
|
819
|
+
}).filter(function (item) {
|
|
820
|
+
return type < 1 || item.type === type;
|
|
821
|
+
}).filter(function (item) {
|
|
822
|
+
return hidden < 0 || item.hidden === hidden;
|
|
823
|
+
}).filter(function (item) {
|
|
824
|
+
return encryption_type < 0 || item.encryption_type === encryption_type;
|
|
825
|
+
}).filter(function (item) {
|
|
826
|
+
return category == '' || item.category === category;
|
|
827
|
+
}).length), "\u6761"), /*#__PURE__*/React.createElement("div", {
|
|
828
|
+
className: "top-button"
|
|
829
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
830
|
+
shape: "round",
|
|
831
|
+
type: 'primary',
|
|
832
|
+
disabled: !authority[1722838073],
|
|
833
|
+
className: "button",
|
|
834
|
+
onClick: function onClick() {
|
|
835
|
+
return setCreateAttrShow(true);
|
|
836
|
+
}
|
|
837
|
+
}, "\u521B\u5EFA\u5C5E\u6027"), /*#__PURE__*/React.createElement(Button, {
|
|
838
|
+
shape: "round",
|
|
839
|
+
className: "button",
|
|
840
|
+
disabled: isDemo || !authority[1722838544],
|
|
841
|
+
onClick: function onClick() {
|
|
842
|
+
return setOpenImportModal(true);
|
|
843
|
+
}
|
|
844
|
+
}, "\u5BFC\u5165\u5C5E\u6027")))), /*#__PURE__*/React.createElement(Table, {
|
|
447
845
|
className: "".concat(classPrefix, "-table"),
|
|
448
846
|
columns: columns,
|
|
847
|
+
id: 'dataManageAttrTable',
|
|
449
848
|
rowKey: "name",
|
|
450
849
|
loading: loading,
|
|
451
850
|
scroll: {
|
|
452
|
-
y:
|
|
851
|
+
y: scrollY
|
|
453
852
|
},
|
|
454
853
|
rowClassName: function rowClassName(record, index) {
|
|
455
854
|
return rowRenderHandle(record.name) ? 'error-row' : '';
|
|
456
855
|
},
|
|
457
|
-
dataSource: userAttrData
|
|
856
|
+
dataSource: userAttrData.filter(function (item) {
|
|
857
|
+
return new RegExp(_.escapeRegExp(name), 'i').test((item.name || '') + (item.alias_name || ''));
|
|
858
|
+
}).filter(function (item) {
|
|
859
|
+
return type < 1 || item.type === type;
|
|
860
|
+
}).filter(function (item) {
|
|
861
|
+
return hidden < 0 || item.hidden === hidden;
|
|
862
|
+
}).filter(function (item) {
|
|
863
|
+
return encryption_type < 0 || item.encryption_type === encryption_type;
|
|
864
|
+
}).filter(function (item) {
|
|
865
|
+
return category == '' || item.category === category;
|
|
866
|
+
}).filter(function (item) {
|
|
867
|
+
return owner == '' || item.owner === owner;
|
|
868
|
+
}),
|
|
458
869
|
pagination: false
|
|
459
870
|
}), /*#__PURE__*/React.createElement(Modal, {
|
|
460
871
|
title: "\u5C5E\u6027\u503C\u522B\u540D",
|
|
@@ -480,21 +891,21 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
480
891
|
ajax(apis.exportAliasTmp, {
|
|
481
892
|
method: 'get',
|
|
482
893
|
responseType: 'blob',
|
|
483
|
-
fileName: "".concat(source == 'user' ? '用户' : '事件', "\u5C5E\u6027\u503C\u6A21\u677F"),
|
|
894
|
+
fileName: "".concat(source == 'user' ? (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体' : '用户' : '事件', "\u5C5E\u6027\u503C\u6A21\u677F"),
|
|
484
895
|
getResponse: true,
|
|
485
896
|
params: {
|
|
486
|
-
fileName: '
|
|
897
|
+
fileName: "".concat(source == 'user' ? (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体' : '用户' : '事件', "\u5C5E\u6027\u503C\u6A21\u677F.xlsx")
|
|
487
898
|
}
|
|
488
899
|
}).finally(function () {
|
|
489
900
|
setExportAliasTmp(false);
|
|
490
901
|
});
|
|
491
902
|
}
|
|
492
|
-
}, "\u6A21\u677F\u4E0B\u8F7D")), attrExcelData.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
903
|
+
}, "\u6A21\u677F\u4E0B\u8F7D")), attrExcelData.length > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
493
904
|
className: "clearData",
|
|
494
905
|
onClick: clearData
|
|
495
906
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
496
907
|
type: "qingchu"
|
|
497
|
-
}), "\u6E05\u7A7A\u6570\u636E"), /*#__PURE__*/React.createElement(Table, {
|
|
908
|
+
}), "\u6E05\u7A7A\u6570\u636E")), /*#__PURE__*/React.createElement(Table, {
|
|
498
909
|
scroll: {
|
|
499
910
|
y: 200
|
|
500
911
|
},
|
|
@@ -503,6 +914,30 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
503
914
|
rowKey: "mapping_value",
|
|
504
915
|
dataSource: attrExcelData,
|
|
505
916
|
pagination: false
|
|
506
|
-
}))
|
|
917
|
+
})), /*#__PURE__*/React.createElement(CreateAttrDrawer, {
|
|
918
|
+
isShow: createAttrShow,
|
|
919
|
+
onClose: function onClose() {
|
|
920
|
+
return setCreateAttrShow(false);
|
|
921
|
+
},
|
|
922
|
+
onSubmit: function onSubmit() {
|
|
923
|
+
queryUserPropMeta();
|
|
924
|
+
setCreateAttrShow(false);
|
|
925
|
+
}
|
|
926
|
+
}), openImportModal ? (/*#__PURE__*/React.createElement(ImportModal, {
|
|
927
|
+
onCancel: function onCancel() {
|
|
928
|
+
setOpenImportModal(false);
|
|
929
|
+
},
|
|
930
|
+
onSuccess: function onSuccess() {
|
|
931
|
+
queryUserPropMeta();
|
|
932
|
+
setOpenImportModal(false);
|
|
933
|
+
}
|
|
934
|
+
})) : null, isShowDel ? (/*#__PURE__*/React.createElement(DelConfirm, {
|
|
935
|
+
onOk: function onOk(callback) {
|
|
936
|
+
removeAttr(callback);
|
|
937
|
+
},
|
|
938
|
+
onCancel: function onCancel() {
|
|
939
|
+
setIsShowDel(false);
|
|
940
|
+
}
|
|
941
|
+
})) : null);
|
|
507
942
|
};
|
|
508
943
|
export default CollectionAttributeList;
|