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