@zgfe/modules-dm 1.0.56-zhongyuan.9 → 1.0.57-alpha.0
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/constants/api.d.ts +29 -0
- package/es/constants/api.js +34 -1
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/modules/CutsModal.d.ts +81 -34
- package/es/modules/clear-rule/addRule.d.ts +10 -0
- package/es/modules/clear-rule/addRule.js +614 -0
- package/es/modules/clear-rule/css/index.css +256 -0
- package/es/modules/clear-rule/css/index.less +270 -0
- package/es/modules/clear-rule/demo/index.d.ts +3 -0
- package/es/modules/clear-rule/demo/index.js +6 -0
- package/es/modules/clear-rule/importMetaDialog/demo/index.d.ts +3 -0
- package/es/modules/clear-rule/importMetaDialog/demo/index.js +28 -0
- package/es/modules/clear-rule/importMetaDialog/index.d.ts +7 -0
- package/es/modules/clear-rule/importMetaDialog/index.js +165 -0
- package/es/modules/clear-rule/importMetaDialog/styles/index.less +91 -0
- package/es/modules/clear-rule/index.d.ts +4 -0
- package/es/modules/clear-rule/index.js +529 -0
- package/es/modules/dataManage/collectionAttributeList.js +424 -43
- package/es/modules/dataManage/collectionEventList.js +1 -1
- package/es/modules/dataManage/components/createMetaDrawer.js +5 -6
- package/es/modules/dataManage/components/eventGroupingDrawer.js +13 -4
- package/es/modules/dataManage/components/panelList.d.ts +6 -0
- package/es/modules/dataManage/components/panelList.js +172 -0
- package/es/modules/dataManage/components/tablePlus.d.ts +1 -0
- package/es/modules/dataManage/components/tablePlus.js +160 -46
- package/es/modules/dataManage/components/virtualTablePlus.js +4 -0
- package/es/modules/dataManage/demo/index.js +1 -2
- package/es/modules/dataManage/styles/index.less +10 -0
- package/es/modules/dataMap/component/drawerAdd.js +2 -0
- package/es/modules/dataMap/component/leftTree.js +4 -1
- package/es/modules/dataMap/component/rightDetail.js +42 -87
- package/es/modules/dataMap/component/selectAttr.d.ts +7 -0
- package/es/modules/dataMap/component/selectAttr.js +91 -0
- package/es/modules/dataMap/component/viewMapSetting.d.ts +24 -0
- package/es/modules/dataMap/component/viewMapSetting.js +161 -0
- package/es/modules/dataMap/css/index.css +196 -168
- package/es/modules/dataMap/css/index.less +213 -185
- package/es/modules/dataMap/mapSetting.js +21 -4
- package/es/modules/dataReal/css/index.css +50 -48
- package/es/modules/dataReal/css/index.less +53 -51
- package/es/modules/dataReal/index1.js +84 -57
- package/es/modules/dataReal/table.js +40 -7
- package/es/modules/formulate-rule/addFormulate.d.ts +20 -0
- package/es/modules/formulate-rule/addFormulate.js +328 -0
- package/es/modules/formulate-rule/addRule.d.ts +19 -0
- package/es/modules/formulate-rule/addRule.js +553 -0
- package/es/modules/formulate-rule/data.d.ts +16 -0
- package/es/modules/formulate-rule/data.js +46 -0
- package/es/modules/formulate-rule/demo/index.d.ts +3 -0
- package/es/modules/formulate-rule/demo/index.js +6 -0
- package/es/modules/formulate-rule/index.d.ts +4 -0
- package/es/modules/formulate-rule/index.js +448 -0
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
15
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
16
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
17
17
|
import { BizGlobalDataContext, IconFont, ajax } from '@zgfe/business-lib';
|
|
18
|
-
import { Input, Button, Select, Table, message, Modal, Upload, Popover, Checkbox } from 'antd';
|
|
18
|
+
import { Input, Button, Select, Table, message, Modal, Upload, Popover, Checkbox, notification } from 'antd';
|
|
19
19
|
import React, { useEffect, useState, useContext } from 'react';
|
|
20
20
|
import './styles/index.less';
|
|
21
21
|
import request from '../../utils/ajax';
|
|
@@ -25,8 +25,10 @@ import { getAppID, getTableScroll } from '../../utils';
|
|
|
25
25
|
import CreateAttrDrawer from './components/createAttrDrawer';
|
|
26
26
|
import ImportModal from './components/importAttrDialog';
|
|
27
27
|
import DelConfirm from './components/deleteUserAttrConfirm';
|
|
28
|
+
import BizEditText from './components/editTxt';
|
|
28
29
|
import _ from 'lodash';
|
|
29
30
|
import moment from 'moment';
|
|
31
|
+
import UseModal from '../CutsModal';
|
|
30
32
|
var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
31
33
|
var classPrefix = 'attr-list';
|
|
32
34
|
var _useContext = useContext(BizGlobalDataContext),
|
|
@@ -280,7 +282,15 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
280
282
|
return /*#__PURE__*/React.createElement(Input, {
|
|
281
283
|
className: "alias_name",
|
|
282
284
|
placeholder: "\u7F16\u8F91\u522B\u540D",
|
|
283
|
-
disabled
|
|
285
|
+
// disabled={
|
|
286
|
+
// isDemo ||
|
|
287
|
+
// !authority[1722838507] ||
|
|
288
|
+
// record.isIdMappingProp ||
|
|
289
|
+
// record.category === 'fixed'
|
|
290
|
+
// }
|
|
291
|
+
disabled: isDemo ||
|
|
292
|
+
// !authority[1000004] ||
|
|
293
|
+
record.category === 'fixed' || record.owner == 'zg_abp',
|
|
284
294
|
defaultValue: record.alias_name,
|
|
285
295
|
onFocus: aliasFocus,
|
|
286
296
|
onBlur: function onBlur(e) {
|
|
@@ -300,7 +310,15 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
300
310
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
301
311
|
className: "alias_name",
|
|
302
312
|
placeholder: "\u7F16\u8F91\u522B\u540D",
|
|
303
|
-
disabled
|
|
313
|
+
// disabled={
|
|
314
|
+
// isDemo ||
|
|
315
|
+
// !authority[1722838507] ||
|
|
316
|
+
// record.isIdMappingProp ||
|
|
317
|
+
// record.category === 'fixed'
|
|
318
|
+
// }
|
|
319
|
+
disabled: isDemo ||
|
|
320
|
+
// !authority[1000004] ||
|
|
321
|
+
record.category === 'fixed' || record.owner == 'zg_abp',
|
|
304
322
|
defaultValue: record.alias_name,
|
|
305
323
|
onFocus: aliasFocus,
|
|
306
324
|
onBlur: function onBlur(e) {
|
|
@@ -318,16 +336,34 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
318
336
|
className: "attr-name"
|
|
319
337
|
}, text ? '有' : '无');
|
|
320
338
|
}
|
|
339
|
+
}, {
|
|
340
|
+
title: '最后上报时间',
|
|
341
|
+
dataIndex: 'lastInsertTime',
|
|
342
|
+
width: 180,
|
|
343
|
+
render: function render(text, record, index) {
|
|
344
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
345
|
+
className: "attr-name"
|
|
346
|
+
}, text);
|
|
347
|
+
}
|
|
321
348
|
}].concat(_toConsumableArray(source == 'event' ? [{
|
|
322
349
|
title: '属性值别名',
|
|
323
350
|
width: 120,
|
|
324
351
|
render: function render(record) {
|
|
325
352
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement("span", {
|
|
326
|
-
className: "attr_alias_name ".concat(isDemo || record.
|
|
353
|
+
className: "attr_alias_name ".concat(isDemo || record.category === 'fixed' || !authority[1000004] ? 'disabled' : ''),
|
|
354
|
+
// className={`attr_alias_name ${
|
|
355
|
+
// isDemo || record.isIdMappingProp || record.category === 'fixed'
|
|
356
|
+
// ? 'disabled'
|
|
357
|
+
// : ''
|
|
358
|
+
// }`}
|
|
327
359
|
onClick: function onClick() {
|
|
360
|
+
if (!authority[1000004]) {
|
|
361
|
+
message.error('暂无权限,无法编辑');
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
328
364
|
if (record.isIdMappingProp || record.category === 'fixed') return;
|
|
329
365
|
if (isDemo) {
|
|
330
|
-
message.error('
|
|
366
|
+
message.error('Demo环境,无法编辑');
|
|
331
367
|
return;
|
|
332
368
|
}
|
|
333
369
|
setattrId(record.attr_id);
|
|
@@ -377,7 +413,8 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
377
413
|
style: {
|
|
378
414
|
width: 100
|
|
379
415
|
},
|
|
380
|
-
disabled
|
|
416
|
+
// disabled={isDemo || record.isIdMappingProp || record.category === 'fixed'}
|
|
417
|
+
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.owner == 'zg_abp',
|
|
381
418
|
onChange: function onChange(e) {
|
|
382
419
|
return attrChangeHandle(e, record, 'type');
|
|
383
420
|
},
|
|
@@ -433,7 +470,8 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
433
470
|
style: {
|
|
434
471
|
width: 100
|
|
435
472
|
},
|
|
436
|
-
disabled
|
|
473
|
+
// disabled={isDemo || record.isIdMappingProp || record.category === 'fixed'}
|
|
474
|
+
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.owner == 'zg_abp',
|
|
437
475
|
onChange: function onChange(e) {
|
|
438
476
|
return attrChangeHandle(e, record, 'hidden');
|
|
439
477
|
},
|
|
@@ -494,7 +532,8 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
494
532
|
style: {
|
|
495
533
|
width: 100
|
|
496
534
|
},
|
|
497
|
-
disabled
|
|
535
|
+
// disabled={isDemo || record.isIdMappingProp}
|
|
536
|
+
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.owner == 'zg_abp',
|
|
498
537
|
onChange: function onChange(e) {
|
|
499
538
|
return attrChangeHandle(e, record, 'encryption_type');
|
|
500
539
|
},
|
|
@@ -521,9 +560,14 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
521
560
|
width: 120,
|
|
522
561
|
render: function render(record) {
|
|
523
562
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && (/*#__PURE__*/React.createElement("span", {
|
|
524
|
-
className: "attr_alias_name ".concat(isDemo || record.
|
|
563
|
+
className: "attr_alias_name ".concat(isDemo || record.category === 'fixed' || !authority[1000004] ? 'disabled' : ''),
|
|
564
|
+
// className={`attr_alias_name ${
|
|
565
|
+
// isDemo || record.isIdMappingProp || record.category === 'fixed'
|
|
566
|
+
// ? 'disabled'
|
|
567
|
+
// : ''
|
|
568
|
+
// }`}
|
|
525
569
|
onClick: function onClick() {
|
|
526
|
-
if (!authority[
|
|
570
|
+
if (!authority[1000004]) {
|
|
527
571
|
message.error('无编辑权限');
|
|
528
572
|
return;
|
|
529
573
|
}
|
|
@@ -634,9 +678,9 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
634
678
|
style: {
|
|
635
679
|
padding: 0
|
|
636
680
|
},
|
|
637
|
-
disabled: record.category
|
|
681
|
+
disabled: source === 'event' ? record.owner == 'zg_abp' || !authority[1000004] : record.category == 'fixed' || isDemo || !authority[1000004],
|
|
638
682
|
onClick: function onClick() {
|
|
639
|
-
if (!authority[
|
|
683
|
+
if (isDemo || !authority[1000004]) {
|
|
640
684
|
message.error('无删除权限');
|
|
641
685
|
return;
|
|
642
686
|
}
|
|
@@ -645,12 +689,295 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
645
689
|
}, "\u5220\u9664");
|
|
646
690
|
}
|
|
647
691
|
}]);
|
|
648
|
-
//
|
|
649
|
-
var _useState29 = useState(),
|
|
692
|
+
// 新增属性
|
|
693
|
+
var _useState29 = useState(false),
|
|
650
694
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
651
|
-
|
|
652
|
-
|
|
695
|
+
addAttrNameShow = _useState30[0],
|
|
696
|
+
setAddAttrNameShow = _useState30[1];
|
|
697
|
+
// 事件内容
|
|
698
|
+
var _useState31 = useState([]),
|
|
699
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
700
|
+
eventAttrList = _useState32[0],
|
|
701
|
+
setEventAttrList = _useState32[1];
|
|
702
|
+
//新增表格属性
|
|
703
|
+
var addColumns = [{
|
|
704
|
+
title: '序号',
|
|
705
|
+
dataIndex: 'event_name',
|
|
706
|
+
key: 'event_name',
|
|
707
|
+
width: 64,
|
|
708
|
+
render: function render(text, record, index) {
|
|
709
|
+
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
710
|
+
}
|
|
711
|
+
}, {
|
|
712
|
+
title: (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
713
|
+
style: {
|
|
714
|
+
color: '#FB5547',
|
|
715
|
+
marginRight: 8
|
|
716
|
+
}
|
|
717
|
+
}, "*"), "\u4E8B\u4EF6\u5C5E\u6027\u540D\u79F0")),
|
|
718
|
+
dataIndex: 'name',
|
|
719
|
+
key: 'name',
|
|
720
|
+
width: 264,
|
|
721
|
+
render: function render(text, record, index) {
|
|
722
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
723
|
+
style: {
|
|
724
|
+
margin: '-10px 0'
|
|
725
|
+
}
|
|
726
|
+
}, /*#__PURE__*/React.createElement(BizEditText, {
|
|
727
|
+
value: text,
|
|
728
|
+
max: 128,
|
|
729
|
+
placeholder: '请输入事件属性名',
|
|
730
|
+
onChange: function onChange(e) {
|
|
731
|
+
// setIsChange(true);
|
|
732
|
+
changeItemInfo(index, 'name', e);
|
|
733
|
+
}
|
|
734
|
+
}));
|
|
735
|
+
}
|
|
736
|
+
}, {
|
|
737
|
+
title: '属性别名',
|
|
738
|
+
dataIndex: 'aliasName',
|
|
739
|
+
key: 'aliasName',
|
|
740
|
+
width: 264,
|
|
741
|
+
render: function render(aliasName, record, index) {
|
|
742
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
743
|
+
style: {
|
|
744
|
+
margin: '-10px 0'
|
|
745
|
+
}
|
|
746
|
+
}, /*#__PURE__*/React.createElement(BizEditText, {
|
|
747
|
+
value: aliasName,
|
|
748
|
+
max: 128,
|
|
749
|
+
placeholder: '请输入属性别名',
|
|
750
|
+
onChange: function onChange(e) {
|
|
751
|
+
// setIsChange(true);
|
|
752
|
+
changeItemInfo(index, 'aliasName', e);
|
|
753
|
+
}
|
|
754
|
+
}));
|
|
755
|
+
}
|
|
756
|
+
}, {
|
|
757
|
+
title: (/*#__PURE__*/React.createElement("div", {
|
|
758
|
+
className: "".concat(classPrefix, "-content-select")
|
|
759
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
760
|
+
style: {
|
|
761
|
+
color: '#FB5547',
|
|
762
|
+
marginRight: 8
|
|
763
|
+
}
|
|
764
|
+
}, "*"), /*#__PURE__*/React.createElement(Select, {
|
|
765
|
+
defaultValue: 0,
|
|
766
|
+
style: {
|
|
767
|
+
width: 120,
|
|
768
|
+
margin: '-10px 0'
|
|
769
|
+
},
|
|
770
|
+
onChange: function onChange(e) {
|
|
771
|
+
return setType(e);
|
|
772
|
+
},
|
|
773
|
+
bordered: false,
|
|
774
|
+
className: "select-style",
|
|
775
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
776
|
+
type: "xiangxia",
|
|
777
|
+
style: {
|
|
778
|
+
color: '#5f6085'
|
|
779
|
+
}
|
|
780
|
+
}),
|
|
781
|
+
// onChange={(e) => props.eventActiveFilter(e, 'event_hidden')}
|
|
782
|
+
options: [{
|
|
783
|
+
value: 0,
|
|
784
|
+
label: '属性类型'
|
|
785
|
+
}, {
|
|
786
|
+
value: 1,
|
|
787
|
+
label: '字符串'
|
|
788
|
+
}, {
|
|
789
|
+
value: 2,
|
|
790
|
+
label: '数值'
|
|
791
|
+
}, {
|
|
792
|
+
value: 3,
|
|
793
|
+
label: '日期'
|
|
794
|
+
}]
|
|
795
|
+
}))),
|
|
796
|
+
dataIndex: 'type',
|
|
797
|
+
key: 'type',
|
|
798
|
+
width: 148,
|
|
799
|
+
render: function render(type, record, index) {
|
|
800
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
801
|
+
className: "".concat(classPrefix, "-content-select")
|
|
802
|
+
}, /*#__PURE__*/React.createElement(Select
|
|
803
|
+
// defaultValue={record.event_hidden}
|
|
804
|
+
, {
|
|
805
|
+
// defaultValue={record.event_hidden}
|
|
806
|
+
style: {
|
|
807
|
+
width: 120,
|
|
808
|
+
margin: '-10px 0'
|
|
809
|
+
},
|
|
810
|
+
value: type,
|
|
811
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
812
|
+
type: "xiangxia",
|
|
813
|
+
style: {
|
|
814
|
+
color: '#5f6085'
|
|
815
|
+
}
|
|
816
|
+
}),
|
|
817
|
+
// disabled={rowClassNameHandle(record) == 'error-row' || isDemo ? true : false}
|
|
818
|
+
onChange: function onChange(e) {
|
|
819
|
+
// setIsChange(true);
|
|
820
|
+
changeItemInfo(index, 'type', e);
|
|
821
|
+
},
|
|
822
|
+
options: [{
|
|
823
|
+
value: 1,
|
|
824
|
+
label: '字符串'
|
|
825
|
+
}, {
|
|
826
|
+
value: 2,
|
|
827
|
+
label: '数值'
|
|
828
|
+
}, {
|
|
829
|
+
value: 3,
|
|
830
|
+
label: '日期'
|
|
831
|
+
}]
|
|
832
|
+
}));
|
|
833
|
+
}
|
|
834
|
+
}, {
|
|
835
|
+
title: (/*#__PURE__*/React.createElement("div", {
|
|
836
|
+
className: "".concat(classPrefix, "-content-select")
|
|
837
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
838
|
+
style: {
|
|
839
|
+
color: '#FB5547',
|
|
840
|
+
marginRight: 8
|
|
841
|
+
}
|
|
842
|
+
}, "*"), /*#__PURE__*/React.createElement(Select, {
|
|
843
|
+
defaultValue: -1,
|
|
844
|
+
bordered: false,
|
|
845
|
+
onChange: function onChange(e) {
|
|
846
|
+
return setEncryptionType(e);
|
|
847
|
+
},
|
|
848
|
+
style: {
|
|
849
|
+
width: 120,
|
|
850
|
+
margin: '-10px 0'
|
|
851
|
+
},
|
|
852
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
853
|
+
type: "xiangxia",
|
|
854
|
+
style: {
|
|
855
|
+
color: '#5f6085'
|
|
856
|
+
}
|
|
857
|
+
}),
|
|
858
|
+
// onChange={(e) => props.eventActiveFilter(e, 'is_stop')}
|
|
859
|
+
options: [{
|
|
860
|
+
value: -1,
|
|
861
|
+
label: '加密方式'
|
|
862
|
+
}, {
|
|
863
|
+
value: 0,
|
|
864
|
+
label: '不加密'
|
|
865
|
+
}, {
|
|
866
|
+
value: 1,
|
|
867
|
+
label: '半加密'
|
|
868
|
+
}, {
|
|
869
|
+
value: 2,
|
|
870
|
+
label: '全加密'
|
|
871
|
+
}]
|
|
872
|
+
}))),
|
|
873
|
+
dataIndex: 'encryptionType',
|
|
874
|
+
key: 'encryptionType',
|
|
875
|
+
width: 148,
|
|
876
|
+
render: function render(encryptionType, record, index) {
|
|
877
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
878
|
+
className: "".concat(classPrefix, "-content-select")
|
|
879
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
880
|
+
value: encryptionType,
|
|
881
|
+
style: {
|
|
882
|
+
width: 120,
|
|
883
|
+
margin: '-10px 0'
|
|
884
|
+
},
|
|
885
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
886
|
+
type: "xiangxia",
|
|
887
|
+
style: {
|
|
888
|
+
color: '#5f6085'
|
|
889
|
+
}
|
|
890
|
+
}),
|
|
891
|
+
// disabled={rowClassNameHandle(record) == 'error-row' || isDemo ? true : false}
|
|
892
|
+
onChange: function onChange(e) {
|
|
893
|
+
// setIsChange(true);
|
|
894
|
+
changeItemInfo(index, 'encryptionType', e);
|
|
895
|
+
},
|
|
896
|
+
options: [{
|
|
897
|
+
value: 0,
|
|
898
|
+
label: '不加密'
|
|
899
|
+
}, {
|
|
900
|
+
value: 1,
|
|
901
|
+
label: '半加密'
|
|
902
|
+
}, {
|
|
903
|
+
value: 2,
|
|
904
|
+
label: '全加密'
|
|
905
|
+
}]
|
|
906
|
+
}));
|
|
907
|
+
}
|
|
908
|
+
}, {
|
|
909
|
+
title: '操作',
|
|
910
|
+
dataIndex: 'set',
|
|
911
|
+
key: 'set',
|
|
912
|
+
width: 64,
|
|
913
|
+
render: function render(_, record, index) {
|
|
914
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
915
|
+
className: "set ".concat(record.owner == 'zg_abp' ? 'set-error' : ''),
|
|
916
|
+
onClick: function onClick() {
|
|
917
|
+
return dealEventAttr(index);
|
|
918
|
+
}
|
|
919
|
+
}, "\u5220\u9664");
|
|
920
|
+
}
|
|
921
|
+
}];
|
|
922
|
+
// 删除新增属性
|
|
923
|
+
var dealEventAttr = function dealEventAttr(index) {
|
|
924
|
+
var dealData = _.clone(eventAttrList);
|
|
925
|
+
dealData.splice(index, 1);
|
|
926
|
+
setEventAttrList(dealData);
|
|
927
|
+
};
|
|
928
|
+
var changeItemInfo = function changeItemInfo(i, key, v) {
|
|
929
|
+
var dealData = _.clone(eventAttrList);
|
|
930
|
+
dealData[i][key] = v;
|
|
931
|
+
setEventAttrList(dealData);
|
|
932
|
+
};
|
|
933
|
+
//新增事件属性
|
|
934
|
+
var addAttrNameEdit = function addAttrNameEdit() {
|
|
935
|
+
if (eventAttrList.filter(function (item) {
|
|
936
|
+
return !item.name;
|
|
937
|
+
}).length) {
|
|
938
|
+
notification.warning({
|
|
939
|
+
message: '请输入事件属性名称'
|
|
940
|
+
});
|
|
941
|
+
return;
|
|
942
|
+
}
|
|
943
|
+
request(apis.addEventAttr, {
|
|
944
|
+
method: 'POST',
|
|
945
|
+
data: {
|
|
946
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
947
|
+
eventId: eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_id,
|
|
948
|
+
eventAttrList: eventAttrList
|
|
949
|
+
}
|
|
950
|
+
}).then(function (res) {
|
|
951
|
+
if ((res === null || res === void 0 ? void 0 : res.code) === '100000') {
|
|
952
|
+
notification.success({
|
|
953
|
+
message: '添加成功'
|
|
954
|
+
});
|
|
955
|
+
props.Refresh();
|
|
956
|
+
setAddAttrNameShow(false);
|
|
957
|
+
} else {
|
|
958
|
+
notification.error({
|
|
959
|
+
message: '添加失败'
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
});
|
|
963
|
+
// setAddAttrNameShow(false);
|
|
964
|
+
};
|
|
965
|
+
// 删除属性
|
|
966
|
+
var _useState33 = useState(),
|
|
967
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
968
|
+
removeAttrData = _useState34[0],
|
|
969
|
+
setRemoveAttrData = _useState34[1];
|
|
653
970
|
var saveRemoveAttrData = function saveRemoveAttrData(record) {
|
|
971
|
+
// 新加逻辑--在数据清洗自定义规则中绑定有此原事件不可删除。canDel:false 不允许删除
|
|
972
|
+
if (!record.canDel) {
|
|
973
|
+
UseModal({
|
|
974
|
+
onOk: function onOk() {},
|
|
975
|
+
okText: '确定',
|
|
976
|
+
title: '警告',
|
|
977
|
+
content: "\u8BE5\u539F\u4E8B\u4EF6\u6216\u5C5E\u6027\u542F\u7528\u4E86\u81EA\u5B9A\u4E49\u6821\u9A8C\u89C4\u5219\uFF0C\u8BF7\u5173\u95ED\u81EA\u5B9A\u4E49\u6821\u9A8C\u89C4\u5219\u540E\u5728\u8FDB\u884C\u64CD\u4F5C"
|
|
978
|
+
});
|
|
979
|
+
return;
|
|
980
|
+
}
|
|
654
981
|
if (isDemo) {
|
|
655
982
|
message.error('demo环境,无法删除');
|
|
656
983
|
return;
|
|
@@ -686,26 +1013,26 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
686
1013
|
title: '属性值别名',
|
|
687
1014
|
dataIndex: 'mapping_value'
|
|
688
1015
|
}];
|
|
689
|
-
var
|
|
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),
|
|
1016
|
+
var _useState35 = useState([]),
|
|
698
1017
|
_useState36 = _slicedToArray(_useState35, 2),
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
var _useState37 = useState(
|
|
1018
|
+
attrExcelData = _useState36[0],
|
|
1019
|
+
setAttrExcelData = _useState36[1];
|
|
1020
|
+
var _useState37 = useState(false),
|
|
702
1021
|
_useState38 = _slicedToArray(_useState37, 2),
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
var _useState39 = useState(
|
|
1022
|
+
attrAliasNameShow = _useState38[0],
|
|
1023
|
+
setAttrAliasNameShow = _useState38[1];
|
|
1024
|
+
var _useState39 = useState(0),
|
|
706
1025
|
_useState40 = _slicedToArray(_useState39, 2),
|
|
707
|
-
|
|
708
|
-
|
|
1026
|
+
attrId = _useState40[0],
|
|
1027
|
+
setattrId = _useState40[1];
|
|
1028
|
+
var _useState41 = useState(0),
|
|
1029
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
1030
|
+
batchId = _useState42[0],
|
|
1031
|
+
setBatchId = _useState42[1];
|
|
1032
|
+
var _useState43 = useState(false),
|
|
1033
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
1034
|
+
exportAliasTmp = _useState44[0],
|
|
1035
|
+
setExportAliasTmp = _useState44[1];
|
|
709
1036
|
var uploadProps = {
|
|
710
1037
|
maxCount: 1,
|
|
711
1038
|
showUploadList: false,
|
|
@@ -735,10 +1062,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
735
1062
|
}
|
|
736
1063
|
};
|
|
737
1064
|
// 清空属性值别名excel数据
|
|
738
|
-
var
|
|
739
|
-
|
|
740
|
-
clearFlag =
|
|
741
|
-
setClearFlag =
|
|
1065
|
+
var _useState45 = useState(false),
|
|
1066
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
|
1067
|
+
clearFlag = _useState46[0],
|
|
1068
|
+
setClearFlag = _useState46[1];
|
|
742
1069
|
var clearData = function clearData() {
|
|
743
1070
|
setAttrExcelData([]);
|
|
744
1071
|
setClearFlag(true);
|
|
@@ -795,12 +1122,13 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
795
1122
|
setAttrAliasNameShow(false);
|
|
796
1123
|
setClearFlag(false);
|
|
797
1124
|
setValueLoading(false);
|
|
1125
|
+
setAddAttrNameShow(false);
|
|
798
1126
|
setAttrExcelData([]);
|
|
799
1127
|
};
|
|
800
|
-
var
|
|
801
|
-
|
|
802
|
-
scrollY =
|
|
803
|
-
setScrollY =
|
|
1128
|
+
var _useState47 = useState(''),
|
|
1129
|
+
_useState48 = _slicedToArray(_useState47, 2),
|
|
1130
|
+
scrollY = _useState48[0],
|
|
1131
|
+
setScrollY = _useState48[1];
|
|
804
1132
|
//页面加载完成后才能获取到对应的元素及其位置
|
|
805
1133
|
useEffect(function () {
|
|
806
1134
|
var _Y = getTableScroll(60, 'dataManageAttrTable');
|
|
@@ -876,7 +1204,60 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
876
1204
|
return owner == '' || item.owner === owner;
|
|
877
1205
|
}),
|
|
878
1206
|
pagination: false
|
|
879
|
-
}), /*#__PURE__*/React.createElement(
|
|
1207
|
+
}), source == 'event' && (/*#__PURE__*/React.createElement(Button, {
|
|
1208
|
+
className: "button-add",
|
|
1209
|
+
type: "primary",
|
|
1210
|
+
onClick: function onClick() {
|
|
1211
|
+
setAddAttrNameShow(true);
|
|
1212
|
+
setEventAttrList([]); // 清空新增事件属性
|
|
1213
|
+
}
|
|
1214
|
+
}, "\u65B0\u589E\u4E8B\u4EF6\u5C5E\u6027")), /*#__PURE__*/React.createElement(Modal, {
|
|
1215
|
+
width: "80%",
|
|
1216
|
+
title: "\u65B0\u589E\u4E8B\u4EF6\u5C5E\u6027",
|
|
1217
|
+
getContainer: false,
|
|
1218
|
+
open: addAttrNameShow,
|
|
1219
|
+
onOk: addAttrNameEdit,
|
|
1220
|
+
onCancel: closeHandle
|
|
1221
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1222
|
+
className: "".concat(classPrefix, "-info"),
|
|
1223
|
+
style: {
|
|
1224
|
+
marginBottom: 15
|
|
1225
|
+
}
|
|
1226
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1227
|
+
className: "".concat(classPrefix, "-info-input")
|
|
1228
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
1229
|
+
shape: "round",
|
|
1230
|
+
className: "button",
|
|
1231
|
+
onClick: function onClick() {
|
|
1232
|
+
setEventAttrList([].concat(_toConsumableArray(eventAttrList), [{
|
|
1233
|
+
name: '',
|
|
1234
|
+
aliasName: '',
|
|
1235
|
+
type: 1,
|
|
1236
|
+
encryptionType: 0
|
|
1237
|
+
}]));
|
|
1238
|
+
}
|
|
1239
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
1240
|
+
type: "tianjia1",
|
|
1241
|
+
style: {
|
|
1242
|
+
marginRight: 8,
|
|
1243
|
+
marginBottom: 15
|
|
1244
|
+
}
|
|
1245
|
+
}), "\u6DFB\u52A0\u4E8B\u4EF6\u5C5E\u6027"))), /*#__PURE__*/React.createElement(Table, {
|
|
1246
|
+
className: "".concat(classPrefix, "-table"),
|
|
1247
|
+
id: "dataManageCreateMetaTable",
|
|
1248
|
+
columns: addColumns,
|
|
1249
|
+
rowKey: "key",
|
|
1250
|
+
dataSource: eventAttrList.filter(function (item) {
|
|
1251
|
+
return type < 1 || item.type === type;
|
|
1252
|
+
}).filter(function (item) {
|
|
1253
|
+
return encryption_type < 0 || item.encryption_type === encryption_type;
|
|
1254
|
+
}),
|
|
1255
|
+
scroll: {
|
|
1256
|
+
y: 'calc(100vh - 400px)'
|
|
1257
|
+
},
|
|
1258
|
+
pagination: false,
|
|
1259
|
+
sticky: true
|
|
1260
|
+
})), /*#__PURE__*/React.createElement(Modal, {
|
|
880
1261
|
title: "\u5C5E\u6027\u503C\u522B\u540D",
|
|
881
1262
|
getContainer: false,
|
|
882
1263
|
open: attrAliasNameShow,
|
|
@@ -909,7 +1290,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
909
1290
|
setExportAliasTmp(false);
|
|
910
1291
|
});
|
|
911
1292
|
}
|
|
912
|
-
}, "\u6A21\u677F\u4E0B\u8F7D")), attrExcelData.length > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
1293
|
+
}, "\u6A21\u677F\u4E0B\u8F7D")), (attrExcelData === null || attrExcelData === void 0 ? void 0 : attrExcelData.length) > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
913
1294
|
className: "clearData",
|
|
914
1295
|
onClick: clearData
|
|
915
1296
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
@@ -687,7 +687,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
687
687
|
}, /*#__PURE__*/React.createElement(Typography.Link, null, /*#__PURE__*/React.createElement(Button, {
|
|
688
688
|
shape: "round",
|
|
689
689
|
className: "button ".concat(!authority[1700636282] ? 'disabled' : '')
|
|
690
|
-
}, "\u66F4\u591A\u64CD\u4F5C",
|
|
690
|
+
}, "\u66F4\u591A\u64CD\u4F5C", /*#__PURE__*/React.createElement(DownOutlined, {
|
|
691
691
|
onPointerEnterCapture: undefined,
|
|
692
692
|
onPointerLeaveCapture: undefined
|
|
693
693
|
})))), route && route.query && route.query.type == 1 && (/*#__PURE__*/React.createElement("div", {
|
|
@@ -365,6 +365,9 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
365
365
|
}, "\u5220\u9664");
|
|
366
366
|
}
|
|
367
367
|
}];
|
|
368
|
+
var onChangeEvent = function onChangeEvent(event) {
|
|
369
|
+
console.log(event, 'event');
|
|
370
|
+
};
|
|
368
371
|
var _useState15 = useState(''),
|
|
369
372
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
370
373
|
scrollY = _useState16[0],
|
|
@@ -452,7 +455,7 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
452
455
|
validateStatus: validateContainsUnderscore(inputText) ? '' : 'error',
|
|
453
456
|
help: validateContainsUnderscore(inputText) ? '' : inputText == '' ? '请输入事件名称' : "\u8BF7\u6839\u636E\u9875\u9762\u5C42\u7EA7\u547D\u540D\uFF0C\u5982\uFF1A".concat(props.selectTreeName)
|
|
454
457
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
455
|
-
placeholder: "\u8BF7\
|
|
458
|
+
placeholder: "".concat(props.selectTreeName ? "\u8BF7\u6839\u636E\u9875\u9762\u5C42\u7EA7\u547D\u540D\uFF0C\u5982\uFF1A".concat(props.selectTreeName) : '请输入事件名称'),
|
|
456
459
|
showCount: true,
|
|
457
460
|
maxLength: 128,
|
|
458
461
|
onChange: function onChange(e) {
|
|
@@ -471,11 +474,7 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
471
474
|
}
|
|
472
475
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
473
476
|
name: "demandId",
|
|
474
|
-
label: "\u9700\u6C42ID"
|
|
475
|
-
rules: [{
|
|
476
|
-
required: true,
|
|
477
|
-
message: "\u8BF7\u8F93\u5165\u9700\u6C42ID"
|
|
478
|
-
}]
|
|
477
|
+
label: "\u9700\u6C42ID"
|
|
479
478
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
480
479
|
placeholder: "\u8BF7\u8F93\u5165\u9700\u6C42ID",
|
|
481
480
|
showCount: true,
|