@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.
@@ -1,270 +1,271 @@
1
- .clearRule {
2
- height: 100%;
3
- padding: 24px;
4
- background: #fff;
5
- border-radius: 8px;
6
- border-radius: 8px;
7
- &-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
- &-modal {
15
- .ant-modal-body {
16
- height: 350px;
17
- }
18
- .ant-picker-dropdown {
19
- top: 133px !important;
20
- left: 13px !important;
21
- }
22
- }
23
- &-content {
24
- display: flex;
25
- align-items: center;
26
- justify-content: space-between;
27
- }
28
- &-importModal {
29
- &-content {
30
- }
31
- &-tip {
32
- margin: 0px 0px 10px;
33
- padding: 5px 0px 5px 15px;
34
- background-color: #e7f3fe;
35
- border: 1px solid #b8e4ff;
36
- border-radius: 4px;
37
- .icon {
38
- margin: 0px 10px;
39
- color: #165dff;
40
- }
41
- }
42
- &-list {
43
- height: 160px;
44
- padding: 10px;
45
- overflow-y: scroll;
46
- border: 1px solid #e5e5e5;
47
- border-radius: 4px;
48
- }
49
- }
50
- &-openRuleModal {
51
- &-list {
52
- height: 160px;
53
- padding: 10px;
54
- overflow-y: scroll;
55
- border: 1px solid #e5e5e5;
56
- border-radius: 4px;
57
- }
58
- &-closeTip {
59
- margin: 10px 0px;
60
- color: red;
61
- }
62
- }
63
- }
64
- .openRuleModal-icon {
65
- margin: 0px 10px 0px 0px;
66
- color: #faad14;
67
- }
68
-
69
- .addRuleForm {
70
- .selectVent {
71
- display: grid;
72
- grid-gap: 20px;
73
- grid-template-columns: 1fr 1fr;
74
- align-items: center;
75
- width: 100%;
76
- margin: 20px 0px;
77
- }
78
- .ant-checkbox-wrapper {
79
- position: relative;
80
- margin-right: 8px;
81
- padding: 4px 15px;
82
- color: #333;
83
- vertical-align: middle;
84
- background-color: #efefef;
85
- border: 1px solid #e5e5e5;
86
- border-radius: 4px;
87
- cursor: pointer;
88
- transition: all 0.2s ease;
89
- &::after {
90
- position: absolute;
91
- bottom: -1px;
92
- left: 6px;
93
- z-index: 10;
94
- width: 17px;
95
- font-size: 23px;
96
- content: '+';
97
- }
98
- }
99
- .ant-checkbox-wrapper-checked {
100
- position: relative;
101
- color: #165dff;
102
- background-color: transparent;
103
- border: 1px solid #165dff;
104
- &::after {
105
- position: absolute;
106
- bottom: -1px;
107
- left: 6px;
108
- z-index: 10;
109
- width: 17px;
110
- font-size: 23px;
111
- content: '+';
112
- }
113
- }
114
- .ant-checkbox-wrapper::after {
115
- display: inline;
116
- }
117
- .ant-checkbox,
118
- .ant-checkbox-inner {
119
- display: none;
120
- }
121
- .drawerCloseIcon {
122
- float: right;
123
- cursor: pointer;
124
- }
125
- .ant-drawer-close {
126
- display: none;
127
- }
128
- .ant-drawer-footer {
129
- display: flex;
130
- justify-content: end;
131
- }
132
- .attrValue {
133
- &-list {
134
- display: grid;
135
- grid-gap: 20px;
136
- grid-template-columns: 120px 1fr;
137
- align-items: center;
138
- justify-content: space-between;
139
- margin: 20px 0px;
140
- }
141
- position: relative;
142
- padding-left: 30px;
143
- &-styleLine {
144
- position: absolute;
145
- top: 50%;
146
- left: -1px;
147
- z-index: 10;
148
- width: 20px;
149
- color: white;
150
- text-align: center;
151
- background: #165dff;
152
- border-radius: 4px 4px 0px 0px;
153
- transform: translate(0, -50%);
154
- }
155
- &::after {
156
- position: absolute;
157
- top: 0;
158
- left: 8px;
159
- z-index: 1;
160
- width: 1px;
161
- height: 100%;
162
- background: #e8efff;
163
- content: '';
164
- }
165
- .attrValue-list-right {
166
- display: grid;
167
- grid-gap: 20px;
168
- grid-template-columns: 3px 80px 10px 80px 3px;
169
- align-items: center;
170
- justify-content: start;
171
- }
172
- }
173
- }
174
- .columnsActionClass {
175
- cursor: pointer;
176
- }
177
- .formulateDetail {
178
- &-title {
179
- display: flex;
180
- align-items: center;
181
- justify-content: space-between;
182
- }
183
- }
184
- .addRule-formulate-tip {
185
- margin: 10px 0px 0px;
186
- color: red;
187
- }
188
- .formulateDetailClass {
189
- margin: 10px 0px 0px;
190
- border: 1px solid #ecedf0;
191
- border-radius: 5px;
192
- &-time {
193
- color: #5f6085;
194
- }
195
- &-title {
196
- display: grid;
197
- grid-gap: 16px;
198
- grid-template-columns: 200px 1fr;
199
- align-items: center;
200
- justify-content: space-between;
201
- background-color: #f2f3f4;
202
- border-bottom: 1px solid #ecedf0;
203
- &-left {
204
- padding: 10px 0px 10px 10px;
205
- border-right: 1px solid #ecedf0;
206
- }
207
- &-right {
208
- display: flex;
209
- align-items: center;
210
- justify-content: space-between;
211
- padding: 10px 10px 10px 10px;
212
- }
213
- }
214
- &-content {
215
- display: grid;
216
- grid-gap: 16px;
217
- grid-template-columns: 200px 1fr;
218
- align-items: flex-start;
219
- justify-content: space-between;
220
- height: 300px;
221
- &-left {
222
- height: 100%;
223
- overflow: auto;
224
- border-right: 1px solid #ecedf0;
225
- &-tip {
226
- margin: 0px 5px 0px 0px;
227
- color: red;
228
- }
229
- &-item {
230
- padding: 10px;
231
- cursor: pointer;
232
- }
233
- &-itemContent {
234
- margin: 0px 0px 0px 5px;
235
- padding: 5px;
236
- border: 1px solid #5f6085;
237
- border-radius: 4px;
238
- }
239
- .active {
240
- position: relative;
241
- background-color: #e8efff;
242
- &::after {
243
- position: absolute;
244
- top: 0;
245
- left: 0;
246
- width: 2px;
247
- height: 100%;
248
- background-color: #6b8ffd;
249
- content: '';
250
- }
251
- }
252
- .activeTime {
253
- color: #2467fc;
254
- .formulateDetailClass-content-left-tip {
255
- color: #2467fc;
256
- }
257
- }
258
- }
259
- &-right {
260
- display: flex;
261
- align-items: center;
262
- justify-content: space-between;
263
- margin: 15px;
264
- line-height: 2;
265
- }
266
- }
267
- }
268
- .addRule-errorTip {
269
- color: red;
270
- }
1
+ .clearRule {
2
+ height: 100%;
3
+ padding: 24px;
4
+ background: #fff;
5
+ border-radius: 8px;
6
+ border-radius: 8px;
7
+ &-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
+ &-modal {
15
+ .ant-modal-body {
16
+ height: 350px;
17
+ }
18
+ .ant-picker-dropdown {
19
+ top: 133px !important;
20
+ left: 13px !important;
21
+ }
22
+ }
23
+ &-content {
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: space-between;
27
+ }
28
+ &-importModal {
29
+ &-content {
30
+ }
31
+ &-tip {
32
+ margin: 0px 0px 10px;
33
+ padding: 5px 0px 5px 15px;
34
+ background-color: #e7f3fe;
35
+ border: 1px solid #b8e4ff;
36
+ border-radius: 4px;
37
+ .icon {
38
+ margin: 0px 10px;
39
+ color: #165dff;
40
+ }
41
+ }
42
+ &-list {
43
+ height: 160px;
44
+ padding: 10px;
45
+ overflow-y: scroll;
46
+ border: 1px solid #e5e5e5;
47
+ border-radius: 4px;
48
+ }
49
+ }
50
+ &-openRuleModal {
51
+ &-list {
52
+ height: 160px;
53
+ padding: 10px;
54
+ overflow-y: scroll;
55
+ border: 1px solid #e5e5e5;
56
+ border-radius: 4px;
57
+ }
58
+ &-closeTip {
59
+ margin: 10px 0px;
60
+ color: red;
61
+ }
62
+ }
63
+ }
64
+ .openRuleModal-icon {
65
+ margin: 0px 10px 0px 0px;
66
+ color: #faad14;
67
+ }
68
+
69
+ .addRuleForm {
70
+ .selectVent {
71
+ display: grid;
72
+ grid-gap: 20px;
73
+ grid-template-columns: 1fr 1fr;
74
+ align-items: center;
75
+ width: 100%;
76
+ margin: 20px 0px;
77
+ }
78
+ .ant-checkbox-wrapper {
79
+ position: relative;
80
+ margin-right: 8px;
81
+ margin-bottom: 8px;
82
+ padding: 4px 15px;
83
+ color: #333;
84
+ vertical-align: middle;
85
+ background-color: #efefef;
86
+ border: 1px solid #e5e5e5;
87
+ border-radius: 4px;
88
+ cursor: pointer;
89
+ transition: all 0.2s ease;
90
+ &::after {
91
+ position: absolute;
92
+ bottom: -1px;
93
+ left: 6px;
94
+ z-index: 10;
95
+ width: 17px;
96
+ font-size: 23px;
97
+ content: '+';
98
+ }
99
+ }
100
+ .ant-checkbox-wrapper-checked {
101
+ position: relative;
102
+ color: #165dff;
103
+ background-color: transparent;
104
+ border: 1px solid #165dff;
105
+ &::after {
106
+ position: absolute;
107
+ bottom: -1px;
108
+ left: 6px;
109
+ z-index: 10;
110
+ width: 17px;
111
+ font-size: 23px;
112
+ content: '+';
113
+ }
114
+ }
115
+ .ant-checkbox-wrapper::after {
116
+ display: inline;
117
+ }
118
+ .ant-checkbox,
119
+ .ant-checkbox-inner {
120
+ display: none;
121
+ }
122
+ .drawerCloseIcon {
123
+ float: right;
124
+ cursor: pointer;
125
+ }
126
+ .ant-drawer-close {
127
+ display: none;
128
+ }
129
+ .ant-drawer-footer {
130
+ display: flex;
131
+ justify-content: end;
132
+ }
133
+ .attrValue {
134
+ &-list {
135
+ display: grid;
136
+ grid-gap: 20px;
137
+ grid-template-columns: 120px 1fr;
138
+ align-items: center;
139
+ justify-content: space-between;
140
+ margin: 20px 0px;
141
+ }
142
+ position: relative;
143
+ padding-left: 30px;
144
+ &-styleLine {
145
+ position: absolute;
146
+ top: 50%;
147
+ left: -1px;
148
+ z-index: 10;
149
+ width: 20px;
150
+ color: white;
151
+ text-align: center;
152
+ background: #165dff;
153
+ border-radius: 4px 4px 0px 0px;
154
+ transform: translate(0, -50%);
155
+ }
156
+ &::after {
157
+ position: absolute;
158
+ top: 0;
159
+ left: 8px;
160
+ z-index: 1;
161
+ width: 1px;
162
+ height: 100%;
163
+ background: #e8efff;
164
+ content: '';
165
+ }
166
+ .attrValue-list-right {
167
+ display: grid;
168
+ grid-gap: 20px;
169
+ grid-template-columns: 3px 80px 10px 80px 3px;
170
+ align-items: center;
171
+ justify-content: start;
172
+ }
173
+ }
174
+ }
175
+ .columnsActionClass {
176
+ cursor: pointer;
177
+ }
178
+ .formulateDetail {
179
+ &-title {
180
+ display: flex;
181
+ align-items: center;
182
+ justify-content: space-between;
183
+ }
184
+ }
185
+ .addRule-formulate-tip {
186
+ margin: 10px 0px 0px;
187
+ color: red;
188
+ }
189
+ .formulateDetailClass {
190
+ margin: 10px 0px 0px;
191
+ border: 1px solid #ecedf0;
192
+ border-radius: 5px;
193
+ &-time {
194
+ color: #5f6085;
195
+ }
196
+ &-title {
197
+ display: grid;
198
+ grid-gap: 16px;
199
+ grid-template-columns: 200px 1fr;
200
+ align-items: center;
201
+ justify-content: space-between;
202
+ background-color: #f2f3f4;
203
+ border-bottom: 1px solid #ecedf0;
204
+ &-left {
205
+ padding: 10px 0px 10px 10px;
206
+ border-right: 1px solid #ecedf0;
207
+ }
208
+ &-right {
209
+ display: flex;
210
+ align-items: center;
211
+ justify-content: space-between;
212
+ padding: 10px 10px 10px 10px;
213
+ }
214
+ }
215
+ &-content {
216
+ display: grid;
217
+ grid-gap: 16px;
218
+ grid-template-columns: 200px 1fr;
219
+ align-items: flex-start;
220
+ justify-content: space-between;
221
+ height: 300px;
222
+ &-left {
223
+ height: 100%;
224
+ overflow: auto;
225
+ border-right: 1px solid #ecedf0;
226
+ &-tip {
227
+ margin: 0px 5px 0px 0px;
228
+ color: red;
229
+ }
230
+ &-item {
231
+ padding: 10px;
232
+ cursor: pointer;
233
+ }
234
+ &-itemContent {
235
+ margin: 0px 0px 0px 5px;
236
+ padding: 5px;
237
+ border: 1px solid #5f6085;
238
+ border-radius: 4px;
239
+ }
240
+ .active {
241
+ position: relative;
242
+ background-color: #e8efff;
243
+ &::after {
244
+ position: absolute;
245
+ top: 0;
246
+ left: 0;
247
+ width: 2px;
248
+ height: 100%;
249
+ background-color: #6b8ffd;
250
+ content: '';
251
+ }
252
+ }
253
+ .activeTime {
254
+ color: #2467fc;
255
+ .formulateDetailClass-content-left-tip {
256
+ color: #2467fc;
257
+ }
258
+ }
259
+ }
260
+ &-right {
261
+ display: flex;
262
+ align-items: center;
263
+ justify-content: space-between;
264
+ margin: 15px;
265
+ line-height: 2;
266
+ }
267
+ }
268
+ }
269
+ .addRule-errorTip {
270
+ color: red;
271
+ }
@@ -227,17 +227,53 @@ var ClearRule = function ClearRule() {
227
227
  fileName: "\u89C4\u5219\u5217\u8868_".concat(moment().format('YYYYMMDD'))
228
228
  }).then(function (res) {});
229
229
  };
230
+ // 总状态
231
+ var antIcon = /*#__PURE__*/React.createElement(LoadingOutlined, {
232
+ style: {
233
+ fontSize: 24
234
+ },
235
+ spin: true,
236
+ onPointerEnterCapture: undefined,
237
+ onPointerLeaveCapture: undefined
238
+ });
239
+ var _useState21 = useState(false),
240
+ _useState22 = _slicedToArray(_useState21, 2),
241
+ allOpenRule = _useState22[0],
242
+ setAllOpenRule = _useState22[1];
243
+ var _useState23 = useState(false),
244
+ _useState24 = _slicedToArray(_useState23, 2),
245
+ statusLoading = _useState24[0],
246
+ setStatusLoading = _useState24[1];
247
+ var handleAllOpenStatus = function handleAllOpenStatus(value) {
248
+ setStatusLoading(true);
249
+ request(apis.rule.allOpenStatus, {
250
+ method: 'post',
251
+ data: {
252
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
253
+ status: value ? 1 : 0
254
+ }
255
+ }).then(function (res) {
256
+ if (!res) return;
257
+ if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
258
+ message.success("".concat(value ? '开启' : '关闭', "\u6210\u529F\uFF01"));
259
+ setAllOpenRule(value);
260
+ _getList(ruleSearchName);
261
+ }
262
+ }).finally(function () {
263
+ setStatusLoading(false);
264
+ });
265
+ };
230
266
  /**
231
267
  * 规则列表, 搜索名称, 规则列表状态开启/关闭, 删除规则
232
268
  */
233
- var _useState21 = useState([]),
234
- _useState22 = _slicedToArray(_useState21, 2),
235
- ruleList = _useState22[0],
236
- setRuleList = _useState22[1];
237
- var _useState23 = useState(''),
238
- _useState24 = _slicedToArray(_useState23, 2),
239
- ruleSearchName = _useState24[0],
240
- setRuleSearchName = _useState24[1];
269
+ var _useState25 = useState([]),
270
+ _useState26 = _slicedToArray(_useState25, 2),
271
+ ruleList = _useState26[0],
272
+ setRuleList = _useState26[1];
273
+ var _useState27 = useState(''),
274
+ _useState28 = _slicedToArray(_useState27, 2),
275
+ ruleSearchName = _useState28[0],
276
+ setRuleSearchName = _useState28[1];
241
277
  var searchChange = function searchChange(e) {
242
278
  var _value = e.currentTarget.value;
243
279
  setRuleSearchName(_value);
@@ -250,14 +286,14 @@ var ClearRule = function ClearRule() {
250
286
  setTableParams(pagination);
251
287
  _getList(ruleSearchName, pagination);
252
288
  };
253
- var _useState25 = useState({
289
+ var _useState29 = useState({
254
290
  current: 1,
255
291
  pageSize: 10,
256
292
  total: 0
257
293
  }),
258
- _useState26 = _slicedToArray(_useState25, 2),
259
- tableParams = _useState26[0],
260
- setTableParams = _useState26[1];
294
+ _useState30 = _slicedToArray(_useState29, 2),
295
+ tableParams = _useState30[0],
296
+ setTableParams = _useState30[1];
261
297
  useEffect(function () {
262
298
  _getList();
263
299
  }, []);
@@ -282,6 +318,7 @@ var ClearRule = function ClearRule() {
282
318
  total: res.data.total
283
319
  });
284
320
  });
321
+ setAllOpenRule(res.data.status == 1 ? true : false);
285
322
  } else {
286
323
  message.error('查询列表失败!');
287
324
  }
@@ -374,42 +411,6 @@ var ClearRule = function ClearRule() {
374
411
  }
375
412
  });
376
413
  };
377
- // 总状态
378
- var antIcon = /*#__PURE__*/React.createElement(LoadingOutlined, {
379
- style: {
380
- fontSize: 24
381
- },
382
- spin: true,
383
- onPointerEnterCapture: undefined,
384
- onPointerLeaveCapture: undefined
385
- });
386
- var _useState27 = useState(false),
387
- _useState28 = _slicedToArray(_useState27, 2),
388
- allOpenRule = _useState28[0],
389
- setAllOpenRule = _useState28[1];
390
- var _useState29 = useState(false),
391
- _useState30 = _slicedToArray(_useState29, 2),
392
- statusLoading = _useState30[0],
393
- setStatusLoading = _useState30[1];
394
- var handleAllOpenStatus = function handleAllOpenStatus(value) {
395
- setStatusLoading(true);
396
- request(apis.rule.allOpenStatus, {
397
- method: 'post',
398
- data: {
399
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
400
- status: value ? 1 : 0
401
- }
402
- }).then(function (res) {
403
- if (!res) return;
404
- if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
405
- message.success("".concat(value ? '开启' : '关闭', "\u6210\u529F\uFF01"));
406
- setAllOpenRule(value);
407
- _getList(ruleSearchName);
408
- }
409
- }).finally(function () {
410
- setStatusLoading(false);
411
- });
412
- };
413
414
  return /*#__PURE__*/React.createElement("div", {
414
415
  className: "".concat(className)
415
416
  }, /*#__PURE__*/React.createElement("div", {