@zgfe/business-lib 1.2.58-ljy.0 → 1.2.66-hxd.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/config.js +41 -41
- package/es/AUMFormulaTarget/components/formula/index.less +86 -82
- package/es/AUMFormulaTarget/components/formulaItem/index.js +52 -13
- package/es/AUMFormulaTarget/components/panel/index.less +269 -269
- package/es/AUMFormulaTarget/components/symbol/index.less +49 -49
- package/es/AUMFormulaTarget/demo/index.js +1 -1
- package/es/AUMFormulaTarget/styles/index.less +74 -74
- package/es/addToPanel/styles/addPanel.less +25 -25
- package/es/addToPanel/styles/index.less +17 -17
- package/es/addToPanel/styles/style.less +66 -66
- package/es/addToScene/styles/index.less +30 -30
- package/es/assets/colorIcon/demo.css +539 -539
- package/es/assets/colorIcon/demo_index.html +1454 -1454
- package/es/assets/colorIcon/iconfont.css +236 -236
- package/es/assets/colorIcon/iconfont.json +394 -394
- package/es/assets/colorIcon/iconfont.svg +129 -129
- package/es/assets/iconfont/demo.css +539 -539
- package/es/assets/iconfont/demo_index.html +5363 -5363
- package/es/assets/iconfont/iconfont.css +915 -915
- package/es/assets/iconfont/iconfont.json +1584 -1584
- package/es/assets/images/attention.png +0 -0
- package/es/assets/styles/chunks.less +183 -183
- package/es/assets/styles/inner.less +3 -3
- package/es/assets/styles/resetAntd.less +551 -551
- package/es/assets/styles/variable.less +21 -21
- package/es/attrCondition/group.js +5 -2
- package/es/attrCondition/index.js +6 -2
- package/es/attrCondition/styles/index.less +101 -101
- package/es/attrConditions/components/stringList.d.ts +10 -0
- package/es/attrConditions/components/stringList.js +57 -27
- package/es/attrConditions/components/valuesList.d.ts +10 -0
- package/es/attrConditions/components/valuesList.js +6 -2
- package/es/attrConditions/styles/group.less +49 -49
- package/es/attrConditions/styles/index.less +151 -151
- package/es/attrConditions/types.d.ts +17 -0
- package/es/attributeSelector/index.js +6 -2
- package/es/attributeSelector/listPanel.js +6 -2
- package/es/attributeSelector/styles/index.less +141 -141
- package/es/attributeSelector/types.d.ts +2 -0
- package/es/chart/demo/index.js +2 -3
- package/es/chart/styles/index.less +113 -113
- package/es/chart/util/data/china.js +17 -17
- package/es/chart/util/formatOption.js +1 -1
- package/es/constants/apis.d.ts +3 -0
- package/es/constants/apis.js +4 -1
- package/es/cycleTime/styles/index.less +24 -24
- package/es/cycleTime/styles/month.less +95 -95
- package/es/dataSetGroup/styles/index.less +146 -146
- package/es/datePicker/styles/index.less +53 -53
- package/es/datePickerV2/styles/index.less +194 -194
- package/es/demoWrapper/index.less +3 -3
- package/es/dialog/styles/index.less +22 -22
- package/es/dnd/styles/index.less +19 -19
- package/es/empty/demo/index.d.ts +4 -0
- package/es/empty/demo/index.js +16 -0
- package/es/empty/index.d.ts +4 -0
- package/es/empty/index.js +19 -0
- package/es/empty/types.d.ts +7 -0
- package/es/empty/types.js +1 -0
- package/es/eventSelector/styles/index.less +123 -123
- package/es/formulaTarget/components/formula/index.less +76 -76
- package/es/formulaTarget/components/panel/index.less +139 -139
- package/es/formulaTarget/components/symbol/index.less +49 -49
- package/es/formulaTarget/styles/index.less +74 -74
- package/es/hooks/types/subject.d.ts +14 -14
- package/es/hooks/useBizStore.d.ts +4 -2
- package/es/hooks/useBizStore.js +16 -15
- package/es/icon/demo/list.less +32 -32
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/layout/analysisLayout/demo/index.less +12 -12
- package/es/layout/analysisLayout/index.less +118 -118
- package/es/layout/columnLayout/demo/index.less +15 -15
- package/es/layout/columnLayout/index.less +81 -81
- package/es/layout/detail/index.less +27 -27
- package/es/layout/optionTitle/components/changePanelModal/styles/index.less +92 -92
- package/es/layout/optionTitle/demo/index.less +12 -12
- package/es/loading/styles/index.less +20 -20
- package/es/loginForm/index.less +7 -7
- package/es/platformSelector/index.js +42 -9
- package/es/platformSelector/styles/index.less +26 -22
- package/es/platformSelector/util.d.ts +1 -1
- package/es/platformSelector/util.js +8 -1
- package/es/productCondition/conditions/styles/cdpCondition.less +31 -31
- package/es/productCondition/conditions/styles/cdpCshCondition.less +41 -41
- package/es/productCondition/conditions/styles/eventCondition.less +51 -51
- package/es/productCondition/conditions/styles/periodCondition.less +26 -26
- package/es/productCondition/conditions/styles/propCondition.less +43 -43
- package/es/productCondition/conditions/styles/runTimesCondition.less +19 -19
- package/es/productCondition/conditions/styles/tagsCondition.less +20 -20
- package/es/productCondition/conditions/styles/textDesc.less +17 -17
- package/es/productCondition/styles/conditionTypeList.less +30 -30
- package/es/productCondition/styles/conditionWrap.less +18 -18
- package/es/productCondition/styles/index.less +33 -33
- package/es/productCondition/styles/orConditions.less +34 -34
- package/es/productCondition/styles/relationLabel.less +19 -19
- package/es/quickDatePicker/styles/index.less +138 -138
- package/es/select/styles/handle.less +193 -193
- package/es/select/styles/index.less +129 -129
- package/es/socket/demo/index.less +27 -27
- package/es/table/styles/index.less +5 -5
- package/es/targetConditionGroup/demo/styles/index.less +29 -29
- package/es/targetConditionGroup/index.js +5 -4
- package/es/targetConditionGroup/styles/index.less +53 -53
- package/es/targetSelector/styles/index.less +110 -110
- package/es/userCondition/conditionTypeList.js +1 -10
- package/es/userCondition/conditions/businessCondition.js +3 -10
- package/es/userCondition/conditions/eventCondition.js +36 -4
- package/es/userCondition/conditions/styles/cdpCondition.less +37 -37
- package/es/userCondition/conditions/styles/cdpCshCondition.less +47 -47
- package/es/userCondition/conditions/styles/eventCondition.less +57 -51
- package/es/userCondition/conditions/styles/periodCondition.less +26 -26
- package/es/userCondition/conditions/styles/propCondition.less +43 -43
- package/es/userCondition/conditions/styles/runTimesCondition.less +19 -19
- package/es/userCondition/conditions/styles/tagsCondition.less +20 -20
- package/es/userCondition/conditions/styles/textDesc.less +17 -17
- package/es/userCondition/conditions/textDesc.js +1 -24
- package/es/userCondition/orConditions.js +0 -7
- package/es/userCondition/styles/conditionTypeList.less +30 -30
- package/es/userCondition/styles/conditionWrap.less +18 -18
- package/es/userCondition/styles/index.less +33 -33
- package/es/userCondition/styles/orConditions.less +34 -34
- package/es/userCondition/styles/relationLabel.less +19 -19
- package/es/userGroup/styles/index.less +145 -145
- package/es/userGroupHeader/styles/index.less +31 -31
- package/es/userTagsSelector/cascaderOverlay.js +13 -6
- package/es/userTagsSelector/components/search/index.less +6 -6
- package/es/userTagsSelector/components/tagList/index.less +13 -13
- package/es/userTagsSelector/demo/index.js +1 -0
- package/es/userTagsSelector/groups/styles/option.less +55 -55
- package/es/userTagsSelector/index.js +6 -3
- package/es/userTagsSelector/multipleCheckPanel/styles/option.less +40 -40
- package/es/userTagsSelector/styles/cascaderOverlay.less +34 -34
- package/es/userTagsSelector/styles/index.less +10 -10
- package/es/userTagsSelector/types.d.ts +2 -0
- package/package.json +62 -62
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
@import '~antd/es/style/themes/default.less';
|
|
2
|
-
|
|
3
|
-
@border-radius-sx: 2px;
|
|
4
|
-
@border-radius-small: 4px;
|
|
5
|
-
@border-radius-normal: 8px;
|
|
6
|
-
@border-radius-large: 20px;
|
|
7
|
-
@option-height: @height-base;
|
|
8
|
-
@background-color-gray: #f6f6f6;
|
|
9
|
-
@background-color-table: #f2f3f4;
|
|
10
|
-
|
|
11
|
-
@icon-width: 24px;
|
|
12
|
-
|
|
13
|
-
@shadow-color-light: rgba(0, 0, 0, 0.1);
|
|
14
|
-
@box-shadow-small: 0px 1px 2px @shadow-color-light;
|
|
15
|
-
@primary-color-hover: color(~`colorPalette('@{primary-color}', 0.1) `);
|
|
16
|
-
@box-shadow-form: 0 0 0 4px @primary-color-hover;
|
|
17
|
-
@text-color-middle: #9aa1a9;
|
|
18
|
-
@custom-background: #fafafb;
|
|
19
|
-
@custom-focus: #f0f7ff;
|
|
20
|
-
@primary-color: '#165dff';
|
|
21
|
-
@input-placeholder-color: #9797af;
|
|
1
|
+
@import '~antd/es/style/themes/default.less';
|
|
2
|
+
|
|
3
|
+
@border-radius-sx: 2px;
|
|
4
|
+
@border-radius-small: 4px;
|
|
5
|
+
@border-radius-normal: 8px;
|
|
6
|
+
@border-radius-large: 20px;
|
|
7
|
+
@option-height: @height-base;
|
|
8
|
+
@background-color-gray: #f6f6f6;
|
|
9
|
+
@background-color-table: #f2f3f4;
|
|
10
|
+
|
|
11
|
+
@icon-width: 24px;
|
|
12
|
+
|
|
13
|
+
@shadow-color-light: rgba(0, 0, 0, 0.1);
|
|
14
|
+
@box-shadow-small: 0px 1px 2px @shadow-color-light;
|
|
15
|
+
@primary-color-hover: color(~`colorPalette('@{primary-color}', 0.1) `);
|
|
16
|
+
@box-shadow-form: 0 0 0 4px @primary-color-hover;
|
|
17
|
+
@text-color-middle: #9aa1a9;
|
|
18
|
+
@custom-background: #fafafb;
|
|
19
|
+
@custom-focus: #f0f7ff;
|
|
20
|
+
@primary-color: '#165dff';
|
|
21
|
+
@input-placeholder-color: #9797af;
|
|
@@ -11,7 +11,8 @@ var BizAttrConditionGroup = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
11
11
|
enableEnvProp = props.enableEnvProp,
|
|
12
12
|
disableItemList = props.disableItemList,
|
|
13
13
|
overlayClassName = props.overlayClassName,
|
|
14
|
-
extra = props.extra
|
|
14
|
+
extra = props.extra,
|
|
15
|
+
relationConfig = props.relationConfig;
|
|
15
16
|
var _useConditionGroup = useConditionGroup(props, ref),
|
|
16
17
|
loading = _useConditionGroup.loading,
|
|
17
18
|
conditions = _useConditionGroup.conditions,
|
|
@@ -61,7 +62,9 @@ var BizAttrConditionGroup = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
61
62
|
},
|
|
62
63
|
onDelete: function onDelete() {
|
|
63
64
|
return _onDelete(index);
|
|
64
|
-
}
|
|
65
|
+
},
|
|
66
|
+
relationSup: index ? conditions[index - 1] : undefined,
|
|
67
|
+
relationConfig: relationConfig
|
|
65
68
|
}));
|
|
66
69
|
}))));
|
|
67
70
|
});
|
|
@@ -23,7 +23,9 @@ var BizAttrCondition = function BizAttrCondition(props) {
|
|
|
23
23
|
enableEnvProp = props.enableEnvProp,
|
|
24
24
|
disableItemList = props.disableItemList,
|
|
25
25
|
theme = props.theme,
|
|
26
|
-
overlayClassName = props.overlayClassName
|
|
26
|
+
overlayClassName = props.overlayClassName,
|
|
27
|
+
relationSup = props.relationSup,
|
|
28
|
+
relationConfig = props.relationConfig;
|
|
27
29
|
var _useAttrCondition = useAttrCondition(props),
|
|
28
30
|
loading = _useAttrCondition.loading,
|
|
29
31
|
attr = _useAttrCondition.attr,
|
|
@@ -85,7 +87,9 @@ var BizAttrCondition = function BizAttrCondition(props) {
|
|
|
85
87
|
defaultValue: values,
|
|
86
88
|
onChange: onChangeValues,
|
|
87
89
|
theme: theme,
|
|
88
|
-
status: isValueError ? 'error' : ''
|
|
90
|
+
status: isValueError ? 'error' : '',
|
|
91
|
+
relationSup: relationSup,
|
|
92
|
+
relationConfig: relationConfig
|
|
89
93
|
}), isValueError ? /*#__PURE__*/React.createElement("div", {
|
|
90
94
|
className: "".concat(classPrefix, "-error")
|
|
91
95
|
}, "\u5C5E\u6027\u503C\u4E0D\u53EF\u4E3A\u7A7A") : null), enableDelete && /*#__PURE__*/React.createElement(IconFont, {
|
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
@import '../../assets/styles/inner.less';
|
|
2
|
-
.biz-attr-condition {
|
|
3
|
-
gap: 16px !important;
|
|
4
|
-
align-items: flex-start !important;
|
|
5
|
-
width: 100%;
|
|
6
|
-
&-btn-del {
|
|
7
|
-
color: #9aa1a9;
|
|
8
|
-
font-size: 16px !important;
|
|
9
|
-
line-height: 32px;
|
|
10
|
-
&:hover {
|
|
11
|
-
color: @error-color;
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
.biz-attr-select-handle {
|
|
16
|
-
width: 184px;
|
|
17
|
-
padding: 0;
|
|
18
|
-
}
|
|
19
|
-
.ant-space-item:nth-of-type(3) {
|
|
20
|
-
min-width: 184px;
|
|
21
|
-
max-width: calc(100% - 320px);
|
|
22
|
-
}
|
|
23
|
-
&-group {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: row;
|
|
26
|
-
.ant-space-item:nth-of-type(3) {
|
|
27
|
-
min-width: 184px;
|
|
28
|
-
max-width: calc(100% - 380px);
|
|
29
|
-
}
|
|
30
|
-
&-container {
|
|
31
|
-
display: flex;
|
|
32
|
-
flex: 1;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
gap: 4px;
|
|
35
|
-
width: 100%;
|
|
36
|
-
max-width: calc(100% + 33px);
|
|
37
|
-
margin-left: -33px;
|
|
38
|
-
&-item {
|
|
39
|
-
padding: 4px 0 4px 48px;
|
|
40
|
-
&:hover {
|
|
41
|
-
background: #e8efff;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
&-handle {
|
|
46
|
-
position: relative;
|
|
47
|
-
width: 1px;
|
|
48
|
-
margin-right: 0;
|
|
49
|
-
margin-left: 32px;
|
|
50
|
-
background: @border-color-base;
|
|
51
|
-
}
|
|
52
|
-
&-operate {
|
|
53
|
-
position: absolute;
|
|
54
|
-
top: 50%;
|
|
55
|
-
left: 50%;
|
|
56
|
-
width: 16px;
|
|
57
|
-
transform: translate(-50%, -50%);
|
|
58
|
-
}
|
|
59
|
-
&-operate-text {
|
|
60
|
-
width: 16px;
|
|
61
|
-
height: 16px;
|
|
62
|
-
span {
|
|
63
|
-
display: flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: 100%;
|
|
68
|
-
font-size: 12px;
|
|
69
|
-
*font-size: 10px;
|
|
70
|
-
transform: scale(0.83, 0.83);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.__default-hover();
|
|
74
|
-
|
|
75
|
-
&:first-child {
|
|
76
|
-
border-top-left-radius: 3px;
|
|
77
|
-
border-top-right-radius: 3px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&:last-child {
|
|
81
|
-
border-bottom-right-radius: 3px;
|
|
82
|
-
border-bottom-left-radius: 3px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&.active {
|
|
86
|
-
color: #fff;
|
|
87
|
-
background: @primary-color;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&-column {
|
|
93
|
-
position: relative;
|
|
94
|
-
display: flex;
|
|
95
|
-
flex-direction: column;
|
|
96
|
-
}
|
|
97
|
-
&-error {
|
|
98
|
-
padding-left: 4px;
|
|
99
|
-
color: @error-color;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
1
|
+
@import '../../assets/styles/inner.less';
|
|
2
|
+
.biz-attr-condition {
|
|
3
|
+
gap: 16px !important;
|
|
4
|
+
align-items: flex-start !important;
|
|
5
|
+
width: 100%;
|
|
6
|
+
&-btn-del {
|
|
7
|
+
color: #9aa1a9;
|
|
8
|
+
font-size: 16px !important;
|
|
9
|
+
line-height: 32px;
|
|
10
|
+
&:hover {
|
|
11
|
+
color: @error-color;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.biz-attr-select-handle {
|
|
16
|
+
width: 184px;
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
|
+
.ant-space-item:nth-of-type(3) {
|
|
20
|
+
min-width: 184px;
|
|
21
|
+
max-width: calc(100% - 320px);
|
|
22
|
+
}
|
|
23
|
+
&-group {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
.ant-space-item:nth-of-type(3) {
|
|
27
|
+
min-width: 184px;
|
|
28
|
+
max-width: calc(100% - 380px);
|
|
29
|
+
}
|
|
30
|
+
&-container {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex: 1;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: 4px;
|
|
35
|
+
width: 100%;
|
|
36
|
+
max-width: calc(100% + 33px);
|
|
37
|
+
margin-left: -33px;
|
|
38
|
+
&-item {
|
|
39
|
+
padding: 4px 0 4px 48px;
|
|
40
|
+
&:hover {
|
|
41
|
+
background: #e8efff;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
&-handle {
|
|
46
|
+
position: relative;
|
|
47
|
+
width: 1px;
|
|
48
|
+
margin-right: 0;
|
|
49
|
+
margin-left: 32px;
|
|
50
|
+
background: @border-color-base;
|
|
51
|
+
}
|
|
52
|
+
&-operate {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 50%;
|
|
55
|
+
left: 50%;
|
|
56
|
+
width: 16px;
|
|
57
|
+
transform: translate(-50%, -50%);
|
|
58
|
+
}
|
|
59
|
+
&-operate-text {
|
|
60
|
+
width: 16px;
|
|
61
|
+
height: 16px;
|
|
62
|
+
span {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
font-size: 12px;
|
|
69
|
+
*font-size: 10px;
|
|
70
|
+
transform: scale(0.83, 0.83);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.__default-hover();
|
|
74
|
+
|
|
75
|
+
&:first-child {
|
|
76
|
+
border-top-left-radius: 3px;
|
|
77
|
+
border-top-right-radius: 3px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:last-child {
|
|
81
|
+
border-bottom-right-radius: 3px;
|
|
82
|
+
border-bottom-left-radius: 3px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.active {
|
|
86
|
+
color: #fff;
|
|
87
|
+
background: @primary-color;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&-column {
|
|
93
|
+
position: relative;
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
}
|
|
97
|
+
&-error {
|
|
98
|
+
padding-left: 4px;
|
|
99
|
+
color: @error-color;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AttributeSelect } from '../../attributeSelector/types';
|
|
3
|
+
import { AttrConditionTypes } from '../types';
|
|
3
4
|
import { BizSelectTypes } from '../../select/types';
|
|
4
5
|
declare const StringList: React.FC<{
|
|
5
6
|
attr: AttributeSelect.Value;
|
|
@@ -8,5 +9,14 @@ declare const StringList: React.FC<{
|
|
|
8
9
|
onChange?: (value: string[]) => void;
|
|
9
10
|
theme: BizSelectTypes.Props['theme'];
|
|
10
11
|
status?: string;
|
|
12
|
+
relationSup?: AttrConditionTypes.GroupAddKey;
|
|
13
|
+
relationConfig?: {
|
|
14
|
+
eventId: number;
|
|
15
|
+
eventName: string;
|
|
16
|
+
eventAttrIdSup: number;
|
|
17
|
+
eventAttrNameSup: string;
|
|
18
|
+
eventAttrIdSub: number;
|
|
19
|
+
eventAttrNameSub: string;
|
|
20
|
+
}[];
|
|
11
21
|
}>;
|
|
12
22
|
export default StringList;
|
|
@@ -86,34 +86,64 @@ var StringList = function StringList(props) {
|
|
|
86
86
|
case 0:
|
|
87
87
|
fetch = function fetch() {
|
|
88
88
|
var attrData = props.attr;
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
attr: (attrData === null || attrData === void 0 ? void 0 : attrData.id) || 0,
|
|
94
|
-
dimension_sub: attrData === null || attrData === void 0 ? void 0 : attrData.dimensionSub,
|
|
95
|
-
v: searchValue || ''
|
|
96
|
-
};
|
|
97
|
-
var formData = util.transformRequest(requestData);
|
|
98
|
-
request(Apis.esQuery, {
|
|
99
|
-
method: 'post',
|
|
100
|
-
data: formData,
|
|
101
|
-
headers: {
|
|
102
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
103
|
-
}
|
|
104
|
-
}).then(function (result) {
|
|
105
|
-
setOptions(function () {
|
|
106
|
-
return result && result.sources ? result.sources.map(function (item) {
|
|
107
|
-
return {
|
|
108
|
-
name: item,
|
|
109
|
-
value: item
|
|
110
|
-
};
|
|
111
|
-
}) : [];
|
|
112
|
-
});
|
|
113
|
-
}).catch(function (e) {
|
|
114
|
-
console.error(e);
|
|
115
|
-
setOptions([]);
|
|
89
|
+
var relationSup = props.relationSup;
|
|
90
|
+
var relationConfig = props.relationConfig || [];
|
|
91
|
+
var dealConfig = relationConfig.filter(function (item) {
|
|
92
|
+
return attrData && item.eventId === attrData.eventId && relationSup && relationSup.data && item.eventAttrIdSup === relationSup.data.attrId && item.eventAttrIdSub === (attrData === null || attrData === void 0 ? void 0 : attrData.id);
|
|
116
93
|
});
|
|
94
|
+
if (dealConfig && dealConfig.length && relationSup.data.values && relationSup.data.values.length) {
|
|
95
|
+
request(Apis.queryRelationResult, {
|
|
96
|
+
method: 'post',
|
|
97
|
+
data: {
|
|
98
|
+
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
99
|
+
eventId: attrData.eventId,
|
|
100
|
+
attrId: relationSup.data.attrId,
|
|
101
|
+
attrValues: relationSup.data.values,
|
|
102
|
+
subAttrId: attrData === null || attrData === void 0 ? void 0 : attrData.id
|
|
103
|
+
}
|
|
104
|
+
}).then(function (result) {
|
|
105
|
+
setOptions(function () {
|
|
106
|
+
return result && result.data ? result.data.map(function (item) {
|
|
107
|
+
return {
|
|
108
|
+
name: item,
|
|
109
|
+
value: item
|
|
110
|
+
};
|
|
111
|
+
}) : [];
|
|
112
|
+
});
|
|
113
|
+
}).catch(function (e) {
|
|
114
|
+
console.error(e);
|
|
115
|
+
setOptions([]);
|
|
116
|
+
});
|
|
117
|
+
} else {
|
|
118
|
+
var requestData = {
|
|
119
|
+
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
120
|
+
platform: 0,
|
|
121
|
+
limit: 20,
|
|
122
|
+
attr: (attrData === null || attrData === void 0 ? void 0 : attrData.id) || 0,
|
|
123
|
+
dimension_sub: attrData === null || attrData === void 0 ? void 0 : attrData.dimensionSub,
|
|
124
|
+
v: searchValue || ''
|
|
125
|
+
};
|
|
126
|
+
var formData = util.transformRequest(requestData);
|
|
127
|
+
request(Apis.esQuery, {
|
|
128
|
+
method: 'post',
|
|
129
|
+
data: formData,
|
|
130
|
+
headers: {
|
|
131
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
132
|
+
}
|
|
133
|
+
}).then(function (result) {
|
|
134
|
+
setOptions(function () {
|
|
135
|
+
return result && result.sources ? result.sources.map(function (item) {
|
|
136
|
+
return {
|
|
137
|
+
name: item,
|
|
138
|
+
value: item
|
|
139
|
+
};
|
|
140
|
+
}) : [];
|
|
141
|
+
});
|
|
142
|
+
}).catch(function (e) {
|
|
143
|
+
console.error(e);
|
|
144
|
+
setOptions([]);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
117
147
|
};
|
|
118
148
|
if (timer) clearTimeout(timer);
|
|
119
149
|
setTimer(setTimeout(function () {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AttributeSelect } from '../../attributeSelector/types';
|
|
3
|
+
import { AttrConditionTypes } from '../types';
|
|
3
4
|
import { BizSelectTypes } from '../../select/types';
|
|
4
5
|
declare const ValuesList: React.FC<{
|
|
5
6
|
attr?: AttributeSelect.Value;
|
|
@@ -8,5 +9,14 @@ declare const ValuesList: React.FC<{
|
|
|
8
9
|
onChange?: (value: string[]) => void;
|
|
9
10
|
theme: BizSelectTypes.Props['theme'];
|
|
10
11
|
status?: string;
|
|
12
|
+
relationSup?: AttrConditionTypes.GroupAddKey;
|
|
13
|
+
relationConfig?: {
|
|
14
|
+
eventId: number;
|
|
15
|
+
eventName: string;
|
|
16
|
+
eventAttrIdSup: number;
|
|
17
|
+
eventAttrNameSup: string;
|
|
18
|
+
eventAttrIdSub: number;
|
|
19
|
+
eventAttrNameSub: string;
|
|
20
|
+
}[];
|
|
11
21
|
}>;
|
|
12
22
|
export default ValuesList;
|
|
@@ -21,7 +21,9 @@ var ValuesList = function ValuesList(props) {
|
|
|
21
21
|
defaultValue = props.defaultValue,
|
|
22
22
|
operate = props.operate,
|
|
23
23
|
theme = props.theme,
|
|
24
|
-
status = props.status
|
|
24
|
+
status = props.status,
|
|
25
|
+
relationSup = props.relationSup,
|
|
26
|
+
relationConfig = props.relationConfig;
|
|
25
27
|
var initValue = [moment().subtract(1, 'weeks').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')];
|
|
26
28
|
var _useState = useState(),
|
|
27
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -116,7 +118,9 @@ var ValuesList = function ValuesList(props) {
|
|
|
116
118
|
operate: operate,
|
|
117
119
|
value: current,
|
|
118
120
|
status: status,
|
|
119
|
-
onChange: onChange
|
|
121
|
+
onChange: onChange,
|
|
122
|
+
relationSup: relationSup,
|
|
123
|
+
relationConfig: relationConfig
|
|
120
124
|
});
|
|
121
125
|
} else if (attr.type === PropType.NUMBER) {
|
|
122
126
|
var numberAfter = /*#__PURE__*/React.createElement(BizSelect, {
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
@import '../../assets/styles/inner.less';
|
|
2
|
-
|
|
3
|
-
.biz-condition {
|
|
4
|
-
display: flex;
|
|
5
|
-
|
|
6
|
-
/* 是筛选条件组 */
|
|
7
|
-
&-group-handle {
|
|
8
|
-
position: relative;
|
|
9
|
-
width: 1px;
|
|
10
|
-
margin-right: 16px;
|
|
11
|
-
margin-left: 8px;
|
|
12
|
-
background: @border-color-base;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&-group-operate {
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 50%;
|
|
18
|
-
left: 50%;
|
|
19
|
-
width: 16px;
|
|
20
|
-
transform: translate(-50%, -50%);
|
|
21
|
-
|
|
22
|
-
&-text {
|
|
23
|
-
width: 16px;
|
|
24
|
-
height: 16px;
|
|
25
|
-
font-size: 12px;
|
|
26
|
-
line-height: 16px;
|
|
27
|
-
text-align: center;
|
|
28
|
-
|
|
29
|
-
.__default-hover();
|
|
30
|
-
|
|
31
|
-
&:first-child {
|
|
32
|
-
border-radius: @border-radius-sx @border-radius-sx 0px 0px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&:last-child {
|
|
36
|
-
border-radius: 0px 0px @border-radius-sx @border-radius-sx;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&.active {
|
|
40
|
-
color: #fff;
|
|
41
|
-
background: @primary-color;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&-item-container {
|
|
47
|
-
flex: 1;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
@import '../../assets/styles/inner.less';
|
|
2
|
+
|
|
3
|
+
.biz-condition {
|
|
4
|
+
display: flex;
|
|
5
|
+
|
|
6
|
+
/* 是筛选条件组 */
|
|
7
|
+
&-group-handle {
|
|
8
|
+
position: relative;
|
|
9
|
+
width: 1px;
|
|
10
|
+
margin-right: 16px;
|
|
11
|
+
margin-left: 8px;
|
|
12
|
+
background: @border-color-base;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&-group-operate {
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: 50%;
|
|
18
|
+
left: 50%;
|
|
19
|
+
width: 16px;
|
|
20
|
+
transform: translate(-50%, -50%);
|
|
21
|
+
|
|
22
|
+
&-text {
|
|
23
|
+
width: 16px;
|
|
24
|
+
height: 16px;
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
line-height: 16px;
|
|
27
|
+
text-align: center;
|
|
28
|
+
|
|
29
|
+
.__default-hover();
|
|
30
|
+
|
|
31
|
+
&:first-child {
|
|
32
|
+
border-radius: @border-radius-sx @border-radius-sx 0px 0px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:last-child {
|
|
36
|
+
border-radius: 0px 0px @border-radius-sx @border-radius-sx;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.active {
|
|
40
|
+
color: #fff;
|
|
41
|
+
background: @primary-color;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-item-container {
|
|
47
|
+
flex: 1;
|
|
48
|
+
}
|
|
49
|
+
}
|