@zgfe/modules-dm 1.0.57-zhongyuan.17 → 1.0.57-zhongyuan.19

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.
@@ -102,5 +102,11 @@ declare let apis: {
102
102
  exportFile: string;
103
103
  allOpenStatus: string;
104
104
  };
105
+ dict: {
106
+ dictList: string;
107
+ eventTag: string;
108
+ addLabelRelation: string;
109
+ delLabelRelation: string;
110
+ };
105
111
  };
106
112
  export default apis;
@@ -165,6 +165,12 @@ var apis = {
165
165
  deleteRule: '/zg/web/v2/rinseShiftRule/deleteRule',
166
166
  exportFile: '/zg/web/v2/rinseShiftRule/exportReport',
167
167
  allOpenStatus: '/zg/web/v2/rinseShiftRule/statusMain'
168
+ },
169
+ dict: {
170
+ dictList: '/zg/web/v2/systemSettings/attr/dict/list',
171
+ eventTag: '/zg/web/v2/eventLabel/list',
172
+ addLabelRelation: '/zg/web/v2/eventLabel/addLabelRelation',
173
+ delLabelRelation: '/zg/web/v2/eventLabel/delLabelRelation'
168
174
  }
169
175
  };
170
176
  export default apis;
@@ -145,3 +145,11 @@ export interface RuleDetailType {
145
145
  content: string;
146
146
  }[];
147
147
  }
148
+ export interface DictData {
149
+ dictName: string;
150
+ id: number;
151
+ }
152
+ export interface DictList {
153
+ label: string;
154
+ value: string;
155
+ }
@@ -65,6 +65,9 @@ var AddRule = function AddRule(_ref) {
65
65
  }, {
66
66
  ruleType: 5,
67
67
  content: undefined
68
+ }, {
69
+ ruleType: 6,
70
+ content: undefined
68
71
  }]);
69
72
  setBizAttributeSelectorValue(undefined); // 清空属性
70
73
  setEvent({
@@ -165,6 +168,9 @@ var AddRule = function AddRule(_ref) {
165
168
  }, {
166
169
  ruleType: 5,
167
170
  content: undefined
171
+ }, {
172
+ ruleType: 6,
173
+ content: undefined
168
174
  }]),
169
175
  _useState6 = _slicedToArray(_useState5, 2),
170
176
  optionsRule = _useState6[0],
@@ -184,6 +190,9 @@ var AddRule = function AddRule(_ref) {
184
190
  }, {
185
191
  label: '非空',
186
192
  value: 5
193
+ }, {
194
+ label: '字典校验',
195
+ value: 6
187
196
  }];
188
197
  var _useState7 = useState([]),
189
198
  _useState8 = _slicedToArray(_useState7, 2),
@@ -233,6 +242,9 @@ var AddRule = function AddRule(_ref) {
233
242
  }, {
234
243
  ruleType: 5,
235
244
  content: undefined
245
+ }, {
246
+ ruleType: 6,
247
+ content: undefined
236
248
  }]);
237
249
  setBizAttributeSelectorValue(undefined); // 清空属性
238
250
  };
@@ -452,6 +464,8 @@ var TypeComponent = function TypeComponent(_ref2) {
452
464
  editStatus = _ref2.editStatus;
453
465
  // type:1 string 2:正则 3:数字区间 4:枚举
454
466
  var Component = null;
467
+ var _useContext2 = useContext(BizGlobalDataContext),
468
+ currentApp = _useContext2.currentApp;
455
469
  // 枚举
456
470
  var _useState15 = useState([]),
457
471
  _useState16 = _slicedToArray(_useState15, 2),
@@ -480,6 +494,27 @@ var TypeComponent = function TypeComponent(_ref2) {
480
494
  _useState24 = _slicedToArray(_useState23, 2),
481
495
  includedMaxState = _useState24[0],
482
496
  setIncludedMaxState = _useState24[1];
497
+ //字典
498
+ var _useState25 = useState([]),
499
+ _useState26 = _slicedToArray(_useState25, 2),
500
+ dictList = _useState26[0],
501
+ setDictList = _useState26[1];
502
+ var getDictList = function getDictList() {
503
+ request(apis.dict.dictList, {
504
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
505
+ }).then(function (res) {
506
+ if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
507
+ var _res$data;
508
+ setDictList((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.map(function (item) {
509
+ return {
510
+ label: item.dictName,
511
+ value: item.id,
512
+ id: item.id
513
+ };
514
+ }));
515
+ }
516
+ });
517
+ };
483
518
  // 只会执行一次 区间回显
484
519
  useEffect(function () {
485
520
  if (editStatus) {
@@ -496,6 +531,7 @@ var TypeComponent = function TypeComponent(_ref2) {
496
531
  setIncludedMaxState(val.rightSymbol == ')' ? false : true);
497
532
  }
498
533
  }
534
+ getDictList();
499
535
  }, []);
500
536
  switch (type) {
501
537
  case 1:
@@ -601,6 +637,23 @@ var TypeComponent = function TypeComponent(_ref2) {
601
637
  options: optionsEnum
602
638
  });
603
639
  break;
640
+ case 6:
641
+ Component = /*#__PURE__*/React.createElement(Select
642
+ // defaultValue={Number(optionsValue.filter((r) => r.ruleType == type)[0].content)}
643
+ , {
644
+ // defaultValue={Number(optionsValue.filter((r) => r.ruleType == type)[0].content)}
645
+ value: Number(optionsValue.filter(function (r) {
646
+ return r.ruleType == type;
647
+ })[0].content),
648
+ placeholder: "\u9009\u62E9\u5B57\u5178\u89C4\u5219",
649
+ options: dictList,
650
+ onChange: function onChange(value) {
651
+ optionsValue.filter(function (r) {
652
+ return r.ruleType == type;
653
+ })[0].content = value;
654
+ }
655
+ });
656
+ break;
604
657
  default:
605
658
  Component = /*#__PURE__*/React.createElement("div", null, "\u5FC5\u586B");
606
659
  break;
@@ -1,256 +1,256 @@
1
- .clearRule {
2
- height: 100%;
3
- padding: 24px;
4
- background: #fff;
5
- border-radius: 8px;
6
- }
7
- .clearRule-searchTop {
8
- display: grid;
9
- grid-template-columns: 320px 1fr;
10
- align-items: center;
11
- justify-items: self-end;
12
- margin-bottom: 20px;
13
- }
14
- .clearRule-modal .ant-modal-body {
15
- height: 350px;
16
- }
17
- .clearRule-modal .ant-picker-dropdown {
18
- top: 133px !important;
19
- left: 13px !important;
20
- }
21
- .clearRule-content {
22
- display: flex;
23
- align-items: center;
24
- justify-content: space-between;
25
- }
26
- .clearRule-importModal-tip {
27
- margin: 0px 0px 10px;
28
- padding: 5px 0px 5px 15px;
29
- background-color: #e7f3fe;
30
- border: 1px solid #b8e4ff;
31
- border-radius: 4px;
32
- }
33
- .clearRule-importModal-tip .icon {
34
- margin: 0px 10px;
35
- color: #165dff;
36
- }
37
- .clearRule-importModal-list {
38
- height: 160px;
39
- padding: 10px;
40
- overflow-y: scroll;
41
- border: 1px solid #e5e5e5;
42
- border-radius: 4px;
43
- }
44
- .clearRule-openRuleModal-list {
45
- height: 160px;
46
- padding: 10px;
47
- overflow-y: scroll;
48
- border: 1px solid #e5e5e5;
49
- border-radius: 4px;
50
- }
51
- .clearRule-openRuleModal-closeTip {
52
- margin: 10px 0px;
53
- color: red;
54
- }
55
- .openRuleModal-icon {
56
- margin: 0px 10px 0px 0px;
57
- color: #faad14;
58
- }
59
- .addRuleForm .selectVent {
60
- display: grid;
61
- grid-gap: 20px;
62
- grid-template-columns: 1fr 1fr;
63
- align-items: center;
64
- width: 100%;
65
- margin: 20px 0px;
66
- }
67
- .addRuleForm .ant-checkbox-wrapper {
68
- position: relative;
69
- margin-right: 8px;
70
- padding: 4px 15px;
71
- color: #333;
72
- vertical-align: middle;
73
- background-color: #efefef;
74
- border: 1px solid #e5e5e5;
75
- border-radius: 4px;
76
- cursor: pointer;
77
- transition: all 0.2s ease;
78
- }
79
- .addRuleForm .ant-checkbox-wrapper::after {
80
- position: absolute;
81
- bottom: -1px;
82
- left: 6px;
83
- z-index: 10;
84
- width: 17px;
85
- font-size: 23px;
86
- content: '+';
87
- }
88
- .addRuleForm .ant-checkbox-wrapper-checked {
89
- position: relative;
90
- color: #165dff;
91
- background-color: transparent;
92
- border: 1px solid #165dff;
93
- }
94
- .addRuleForm .ant-checkbox-wrapper-checked::after {
95
- position: absolute;
96
- bottom: -1px;
97
- left: 6px;
98
- z-index: 10;
99
- width: 17px;
100
- font-size: 23px;
101
- content: '+';
102
- }
103
- .addRuleForm .ant-checkbox-wrapper::after {
104
- display: inline;
105
- }
106
- .addRuleForm .ant-checkbox,
107
- .addRuleForm .ant-checkbox-inner {
108
- display: none;
109
- }
110
- .addRuleForm .drawerCloseIcon {
111
- float: right;
112
- cursor: pointer;
113
- }
114
- .addRuleForm .ant-drawer-close {
115
- display: none;
116
- }
117
- .addRuleForm .ant-drawer-footer {
118
- display: flex;
119
- justify-content: end;
120
- }
121
- .addRuleForm .attrValue {
122
- position: relative;
123
- padding-left: 30px;
124
- }
125
- .addRuleForm .attrValue-list {
126
- display: grid;
127
- grid-gap: 20px;
128
- grid-template-columns: 120px 1fr;
129
- align-items: center;
130
- justify-content: space-between;
131
- margin: 20px 0px;
132
- }
133
- .addRuleForm .attrValue-styleLine {
134
- position: absolute;
135
- top: 50%;
136
- left: -1px;
137
- z-index: 10;
138
- width: 20px;
139
- color: white;
140
- text-align: center;
141
- background: #165dff;
142
- border-radius: 4px 4px 0px 0px;
143
- transform: translate(0, -50%);
144
- }
145
- .addRuleForm .attrValue::after {
146
- position: absolute;
147
- top: 0;
148
- left: 8px;
149
- z-index: 1;
150
- width: 1px;
151
- height: 100%;
152
- background: #e8efff;
153
- content: '';
154
- }
155
- .addRuleForm .attrValue .attrValue-list-right {
156
- display: grid;
157
- grid-gap: 20px;
158
- grid-template-columns: 3px 80px 10px 80px 3px;
159
- align-items: center;
160
- justify-content: start;
161
- }
162
- .columnsActionClass {
163
- cursor: pointer;
164
- }
165
- .formulateDetail-title {
166
- display: flex;
167
- align-items: center;
168
- justify-content: space-between;
169
- }
170
- .addRule-formulate-tip {
171
- margin: 10px 0px 0px;
172
- color: red;
173
- }
174
- .formulateDetailClass {
175
- margin: 10px 0px 0px;
176
- border: 1px solid #ecedf0;
177
- border-radius: 5px;
178
- }
179
- .formulateDetailClass-time {
180
- color: #5f6085;
181
- }
182
- .formulateDetailClass-title {
183
- display: grid;
184
- grid-gap: 16px;
185
- grid-template-columns: 200px 1fr;
186
- align-items: center;
187
- justify-content: space-between;
188
- background-color: #f2f3f4;
189
- border-bottom: 1px solid #ecedf0;
190
- }
191
- .formulateDetailClass-title-left {
192
- padding: 10px 0px 10px 10px;
193
- border-right: 1px solid #ecedf0;
194
- }
195
- .formulateDetailClass-title-right {
196
- display: flex;
197
- align-items: center;
198
- justify-content: space-between;
199
- padding: 10px 10px 10px 10px;
200
- }
201
- .formulateDetailClass-content {
202
- display: grid;
203
- grid-gap: 16px;
204
- grid-template-columns: 200px 1fr;
205
- align-items: flex-start;
206
- justify-content: space-between;
207
- height: 300px;
208
- }
209
- .formulateDetailClass-content-left {
210
- height: 100%;
211
- overflow: auto;
212
- border-right: 1px solid #ecedf0;
213
- }
214
- .formulateDetailClass-content-left-tip {
215
- margin: 0px 5px 0px 0px;
216
- color: red;
217
- }
218
- .formulateDetailClass-content-left-item {
219
- padding: 10px;
220
- cursor: pointer;
221
- }
222
- .formulateDetailClass-content-left-itemContent {
223
- margin: 0px 0px 0px 5px;
224
- padding: 5px;
225
- border: 1px solid #5f6085;
226
- border-radius: 4px;
227
- }
228
- .formulateDetailClass-content-left .active {
229
- position: relative;
230
- background-color: #e8efff;
231
- }
232
- .formulateDetailClass-content-left .active::after {
233
- position: absolute;
234
- top: 0;
235
- left: 0;
236
- width: 2px;
237
- height: 100%;
238
- background-color: #6b8ffd;
239
- content: '';
240
- }
241
- .formulateDetailClass-content-left .activeTime {
242
- color: #2467fc;
243
- }
244
- .formulateDetailClass-content-left .activeTime .formulateDetailClass-content-left-tip {
245
- color: #2467fc;
246
- }
247
- .formulateDetailClass-content-right {
248
- display: flex;
249
- align-items: center;
250
- justify-content: space-between;
251
- margin: 15px;
252
- line-height: 2;
253
- }
254
- .addRule-errorTip {
255
- color: red;
256
- }
1
+ .clearRule {
2
+ height: 100%;
3
+ padding: 24px;
4
+ background: #fff;
5
+ border-radius: 8px;
6
+ }
7
+ .clearRule-searchTop {
8
+ display: grid;
9
+ grid-template-columns: 320px 1fr;
10
+ align-items: center;
11
+ justify-items: self-end;
12
+ margin-bottom: 20px;
13
+ }
14
+ .clearRule-modal .ant-modal-body {
15
+ height: 350px;
16
+ }
17
+ .clearRule-modal .ant-picker-dropdown {
18
+ top: 133px !important;
19
+ left: 13px !important;
20
+ }
21
+ .clearRule-content {
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: space-between;
25
+ }
26
+ .clearRule-importModal-tip {
27
+ margin: 0px 0px 10px;
28
+ padding: 5px 0px 5px 15px;
29
+ background-color: #e7f3fe;
30
+ border: 1px solid #b8e4ff;
31
+ border-radius: 4px;
32
+ }
33
+ .clearRule-importModal-tip .icon {
34
+ margin: 0px 10px;
35
+ color: #165dff;
36
+ }
37
+ .clearRule-importModal-list {
38
+ height: 160px;
39
+ padding: 10px;
40
+ overflow-y: scroll;
41
+ border: 1px solid #e5e5e5;
42
+ border-radius: 4px;
43
+ }
44
+ .clearRule-openRuleModal-list {
45
+ height: 160px;
46
+ padding: 10px;
47
+ overflow-y: scroll;
48
+ border: 1px solid #e5e5e5;
49
+ border-radius: 4px;
50
+ }
51
+ .clearRule-openRuleModal-closeTip {
52
+ margin: 10px 0px;
53
+ color: red;
54
+ }
55
+ .openRuleModal-icon {
56
+ margin: 0px 10px 0px 0px;
57
+ color: #faad14;
58
+ }
59
+ .addRuleForm .selectVent {
60
+ display: grid;
61
+ grid-gap: 20px;
62
+ grid-template-columns: 1fr 1fr;
63
+ align-items: center;
64
+ width: 100%;
65
+ margin: 20px 0px;
66
+ }
67
+ .addRuleForm .ant-checkbox-wrapper {
68
+ position: relative;
69
+ margin-right: 8px;
70
+ padding: 4px 15px;
71
+ color: #333;
72
+ vertical-align: middle;
73
+ background-color: #efefef;
74
+ border: 1px solid #e5e5e5;
75
+ border-radius: 4px;
76
+ cursor: pointer;
77
+ transition: all 0.2s ease;
78
+ }
79
+ .addRuleForm .ant-checkbox-wrapper::after {
80
+ position: absolute;
81
+ bottom: -1px;
82
+ left: 6px;
83
+ z-index: 10;
84
+ width: 17px;
85
+ font-size: 23px;
86
+ content: '+';
87
+ }
88
+ .addRuleForm .ant-checkbox-wrapper-checked {
89
+ position: relative;
90
+ color: #165dff;
91
+ background-color: transparent;
92
+ border: 1px solid #165dff;
93
+ }
94
+ .addRuleForm .ant-checkbox-wrapper-checked::after {
95
+ position: absolute;
96
+ bottom: -1px;
97
+ left: 6px;
98
+ z-index: 10;
99
+ width: 17px;
100
+ font-size: 23px;
101
+ content: '+';
102
+ }
103
+ .addRuleForm .ant-checkbox-wrapper::after {
104
+ display: inline;
105
+ }
106
+ .addRuleForm .ant-checkbox,
107
+ .addRuleForm .ant-checkbox-inner {
108
+ display: none;
109
+ }
110
+ .addRuleForm .drawerCloseIcon {
111
+ float: right;
112
+ cursor: pointer;
113
+ }
114
+ .addRuleForm .ant-drawer-close {
115
+ display: none;
116
+ }
117
+ .addRuleForm .ant-drawer-footer {
118
+ display: flex;
119
+ justify-content: end;
120
+ }
121
+ .addRuleForm .attrValue {
122
+ position: relative;
123
+ padding-left: 30px;
124
+ }
125
+ .addRuleForm .attrValue-list {
126
+ display: grid;
127
+ grid-gap: 20px;
128
+ grid-template-columns: 120px 1fr;
129
+ align-items: center;
130
+ justify-content: space-between;
131
+ margin: 20px 0px;
132
+ }
133
+ .addRuleForm .attrValue-styleLine {
134
+ position: absolute;
135
+ top: 50%;
136
+ left: -1px;
137
+ z-index: 10;
138
+ width: 20px;
139
+ color: white;
140
+ text-align: center;
141
+ background: #165dff;
142
+ border-radius: 4px 4px 0px 0px;
143
+ transform: translate(0, -50%);
144
+ }
145
+ .addRuleForm .attrValue::after {
146
+ position: absolute;
147
+ top: 0;
148
+ left: 8px;
149
+ z-index: 1;
150
+ width: 1px;
151
+ height: 100%;
152
+ background: #e8efff;
153
+ content: '';
154
+ }
155
+ .addRuleForm .attrValue .attrValue-list-right {
156
+ display: grid;
157
+ grid-gap: 20px;
158
+ grid-template-columns: 3px 80px 10px 80px 3px;
159
+ align-items: center;
160
+ justify-content: start;
161
+ }
162
+ .columnsActionClass {
163
+ cursor: pointer;
164
+ }
165
+ .formulateDetail-title {
166
+ display: flex;
167
+ align-items: center;
168
+ justify-content: space-between;
169
+ }
170
+ .addRule-formulate-tip {
171
+ margin: 10px 0px 0px;
172
+ color: red;
173
+ }
174
+ .formulateDetailClass {
175
+ margin: 10px 0px 0px;
176
+ border: 1px solid #ecedf0;
177
+ border-radius: 5px;
178
+ }
179
+ .formulateDetailClass-time {
180
+ color: #5f6085;
181
+ }
182
+ .formulateDetailClass-title {
183
+ display: grid;
184
+ grid-gap: 16px;
185
+ grid-template-columns: 200px 1fr;
186
+ align-items: center;
187
+ justify-content: space-between;
188
+ background-color: #f2f3f4;
189
+ border-bottom: 1px solid #ecedf0;
190
+ }
191
+ .formulateDetailClass-title-left {
192
+ padding: 10px 0px 10px 10px;
193
+ border-right: 1px solid #ecedf0;
194
+ }
195
+ .formulateDetailClass-title-right {
196
+ display: flex;
197
+ align-items: center;
198
+ justify-content: space-between;
199
+ padding: 10px 10px 10px 10px;
200
+ }
201
+ .formulateDetailClass-content {
202
+ display: grid;
203
+ grid-gap: 16px;
204
+ grid-template-columns: 200px 1fr;
205
+ align-items: flex-start;
206
+ justify-content: space-between;
207
+ height: 300px;
208
+ }
209
+ .formulateDetailClass-content-left {
210
+ height: 100%;
211
+ overflow: auto;
212
+ border-right: 1px solid #ecedf0;
213
+ }
214
+ .formulateDetailClass-content-left-tip {
215
+ margin: 0px 5px 0px 0px;
216
+ color: red;
217
+ }
218
+ .formulateDetailClass-content-left-item {
219
+ padding: 10px;
220
+ cursor: pointer;
221
+ }
222
+ .formulateDetailClass-content-left-itemContent {
223
+ margin: 0px 0px 0px 5px;
224
+ padding: 5px;
225
+ border: 1px solid #5f6085;
226
+ border-radius: 4px;
227
+ }
228
+ .formulateDetailClass-content-left .active {
229
+ position: relative;
230
+ background-color: #e8efff;
231
+ }
232
+ .formulateDetailClass-content-left .active::after {
233
+ position: absolute;
234
+ top: 0;
235
+ left: 0;
236
+ width: 2px;
237
+ height: 100%;
238
+ background-color: #6b8ffd;
239
+ content: '';
240
+ }
241
+ .formulateDetailClass-content-left .activeTime {
242
+ color: #2467fc;
243
+ }
244
+ .formulateDetailClass-content-left .activeTime .formulateDetailClass-content-left-tip {
245
+ color: #2467fc;
246
+ }
247
+ .formulateDetailClass-content-right {
248
+ display: flex;
249
+ align-items: center;
250
+ justify-content: space-between;
251
+ margin: 15px;
252
+ line-height: 2;
253
+ }
254
+ .addRule-errorTip {
255
+ color: red;
256
+ }