Commit 5fa3f577ecdb7a0ee197f47a69596f16a3242232
Merge branch 'fix/tenant-config-limts' into 'main_dev'
fix: 修改租户配置没填写传参问题 See merge request yunteng/thingskit-front!1448
Showing
3 changed files
with
24 additions
and
16 deletions
... | ... | @@ -13,7 +13,13 @@ |
13 | 13 | <BasicForm @register="registerForm"> |
14 | 14 | <template #importType="{ model }"> |
15 | 15 | <RadioGroup v-model:value="model.importType"> |
16 | - <Authority :value="['api:yt:things_model:category:import', 'api:yt:things_model:import']"> | |
16 | + <Authority | |
17 | + :value=" | |
18 | + record?.ifShowClass | |
19 | + ? ['api:yt:things_model:category:import'] | |
20 | + : ['api:yt:things_model:import'] | |
21 | + " | |
22 | + > | |
17 | 23 | <Radio value="2">JSON导入</Radio> |
18 | 24 | </Authority> |
19 | 25 | <Authority :value="['api:yt:things_model:excel_import']"> |
... | ... | @@ -80,10 +86,11 @@ |
80 | 86 | label: '导入类型', |
81 | 87 | component: 'RadioGroup', |
82 | 88 | slot: 'importType', |
83 | - defaultValue: hasPermission([ | |
84 | - 'api:yt:things_model:category:import', | |
85 | - 'api:yt:things_model:import', | |
86 | - ]) | |
89 | + defaultValue: ( | |
90 | + props.record?.ifShowClass | |
91 | + ? hasPermission(['api:yt:things_model:category:import']) | |
92 | + : hasPermission(['api:yt:things_model:import']) | |
93 | + ) | |
87 | 94 | ? '2' |
88 | 95 | : '1', |
89 | 96 | helpMessage: | ... | ... |
... | ... | @@ -423,7 +423,7 @@ export const speedSchema: FormSchema[] = [ |
423 | 423 | label: '传输租户信息', |
424 | 424 | colProps: { span: 12 }, |
425 | 425 | component: 'CreateSpeed', |
426 | - defaultValue: '0', | |
426 | + // defaultValue: '0', | |
427 | 427 | changeEvent: 'update:value', |
428 | 428 | componentProps: { |
429 | 429 | placeholder: '请输入(请输入数字)', |
... | ... | @@ -432,7 +432,6 @@ export const speedSchema: FormSchema[] = [ |
432 | 432 | }, |
433 | 433 | { |
434 | 434 | field: 'transportDeviceMsgRateLimit', |
435 | - defaultValue: '0', | |
436 | 435 | label: '传输设备信息', |
437 | 436 | colProps: { span: 12 }, |
438 | 437 | component: 'CreateSpeed', |
... | ... | @@ -443,7 +442,6 @@ export const speedSchema: FormSchema[] = [ |
443 | 442 | }, |
444 | 443 | { |
445 | 444 | field: 'transportTenantTelemetryMsgRateLimit', |
446 | - defaultValue: '0', | |
447 | 445 | label: '传输租户遥测消息', |
448 | 446 | colProps: { span: 12 }, |
449 | 447 | component: 'CreateSpeed', |
... | ... | @@ -454,7 +452,6 @@ export const speedSchema: FormSchema[] = [ |
454 | 452 | }, |
455 | 453 | { |
456 | 454 | field: 'transportDeviceTelemetryMsgRateLimit', |
457 | - defaultValue: '0', | |
458 | 455 | label: '传输设备遥测消息', |
459 | 456 | colProps: { span: 12 }, |
460 | 457 | component: 'CreateSpeed', |
... | ... | @@ -492,6 +489,7 @@ export const speedSchema: FormSchema[] = [ |
492 | 489 | placeholder: '请输入(请输入数字)', |
493 | 490 | title: '租户REST请求', |
494 | 491 | }, |
492 | + defaultValue: '', | |
495 | 493 | }, |
496 | 494 | { |
497 | 495 | field: 'customerServerRestLimitsConfiguration', |
... | ... | @@ -502,6 +500,7 @@ export const speedSchema: FormSchema[] = [ |
502 | 500 | placeholder: '请输入(请输入数字)', |
503 | 501 | title: '客户REST请求', |
504 | 502 | }, |
503 | + defaultValue: '', | |
505 | 504 | }, |
506 | 505 | { |
507 | 506 | field: 'tenantEntityExportRateLimit', |
... | ... | @@ -532,6 +531,7 @@ export const speedSchema: FormSchema[] = [ |
532 | 531 | placeholder: '请输入(请输入数字)', |
533 | 532 | title: '会话WS更新', |
534 | 533 | }, |
534 | + defaultValue: '', | |
535 | 535 | }, |
536 | 536 | { |
537 | 537 | field: 'cassandraQueryTenantRateLimitsConfiguration', |
... | ... | @@ -542,6 +542,7 @@ export const speedSchema: FormSchema[] = [ |
542 | 542 | placeholder: '请输入(请输入数字)', |
543 | 543 | title: '租户Cassandra查询', |
544 | 544 | }, |
545 | + defaultValue: '', | |
545 | 546 | }, |
546 | 547 | { |
547 | 548 | field: 'tenantNotificationRequestsRateLimit', | ... | ... |
... | ... | @@ -182,9 +182,9 @@ |
182 | 182 | createdTime: isUpdate ? unref(createTime) : Date.now(), |
183 | 183 | }; |
184 | 184 | |
185 | - const defaultInfo = { | |
186 | - default: unref(isUpdate) ? isDefault.value : false, | |
187 | - }; | |
185 | + // const defaultInfo = { | |
186 | + // default: unref(isUpdate) ? isDefault.value : false, | |
187 | + // }; | |
188 | 188 | Object.assign( |
189 | 189 | postAllData, |
190 | 190 | { |
... | ... | @@ -192,8 +192,8 @@ |
192 | 192 | }, |
193 | 193 | getValuesFormData, |
194 | 194 | id, |
195 | - createTime1, | |
196 | - defaultInfo | |
195 | + createTime1 | |
196 | + // defaultInfo | |
197 | 197 | ); |
198 | 198 | if (!unref(isUpdate)) { |
199 | 199 | delete postAllData.id; |
... | ... | @@ -206,14 +206,14 @@ |
206 | 206 | if (!unref(isUpdate)) { |
207 | 207 | await getAllFieldsFunc(); |
208 | 208 | // return; |
209 | - await saveTenantProfileApi(postAllData); | |
209 | + await saveTenantProfileApi({ ...postAllData, isolatedTbRuleEngine: null }); | |
210 | 210 | createMessage.success('租户配置新增成功'); |
211 | 211 | closeDrawer(); |
212 | 212 | emit('success'); |
213 | 213 | resetFields(); |
214 | 214 | } else { |
215 | 215 | await getAllFieldsFunc(true); |
216 | - await saveTenantProfileApi(postAllData); | |
216 | + await saveTenantProfileApi({ ...postAllData, isolatedTbRuleEngine: null }); | |
217 | 217 | createMessage.success('租户配置编辑成功'); |
218 | 218 | closeDrawer(); |
219 | 219 | emit('success'); | ... | ... |