Showing
25 changed files
with
341 additions
and
15 deletions
| 1 | 1 | import { FormSchema } from '/@/components/Table'; | 
| 2 | +import { phoneRule, emailRule } from '/@/utils/rules'; | |
| 2 | 3 | |
| 3 | 4 | export const formSchema: FormSchema[] = [ | 
| 4 | 5 | { | 
| ... | ... | @@ -20,6 +21,7 @@ export const formSchema: FormSchema[] = [ | 
| 20 | 21 | componentProps: { | 
| 21 | 22 | placeholder: '请输入手机号码', | 
| 22 | 23 | }, | 
| 24 | + rules: phoneRule, | |
| 23 | 25 | }, | 
| 24 | 26 | { | 
| 25 | 27 | field: 'email', | 
| ... | ... | @@ -30,5 +32,6 @@ export const formSchema: FormSchema[] = [ | 
| 30 | 32 | componentProps: { | 
| 31 | 33 | placeholder: '请输入邮箱', | 
| 32 | 34 | }, | 
| 35 | + rules: emailRule, | |
| 33 | 36 | }, | 
| 34 | 37 | ]; | ... | ... | 
| ... | ... | @@ -231,8 +231,8 @@ export const DeviceProfileQueryUserNameMaxLength: Rule[] = [ | 
| 231 | 231 | { | 
| 232 | 232 | required: true, | 
| 233 | 233 | validator: (_, value: string) => { | 
| 234 | - if (String(value).length > 50) { | |
| 235 | - return Promise.reject('配置名称长度不超过50字'); | |
| 234 | + if (String(value).length > 255) { | |
| 235 | + return Promise.reject('配置名称长度不超过255字'); | |
| 236 | 236 | } | 
| 237 | 237 | return Promise.resolve(); | 
| 238 | 238 | }, | ... | ... | 
| ... | ... | @@ -70,6 +70,7 @@ export const formSchema: FormSchema[] = [ | 
| 70 | 70 | component: 'Input', | 
| 71 | 71 | componentProps: { | 
| 72 | 72 | placeholder: '请输入联系人姓名', | 
| 73 | + maxLength: 255, | |
| 73 | 74 | }, | 
| 74 | 75 | }, | 
| 75 | 76 | { | 
| ... | ... | @@ -108,6 +109,7 @@ export const formSchema: FormSchema[] = [ | 
| 108 | 109 | component: 'Input', | 
| 109 | 110 | componentProps: { | 
| 110 | 111 | placeholder: '请输入微信号', | 
| 112 | + maxLength: 255, | |
| 111 | 113 | }, | 
| 112 | 114 | }, | 
| 113 | 115 | { | 
| ... | ... | @@ -115,7 +117,8 @@ export const formSchema: FormSchema[] = [ | 
| 115 | 117 | label: '备注', | 
| 116 | 118 | component: 'InputTextArea', | 
| 117 | 119 | componentProps: { | 
| 118 | - placeholder: '', | |
| 120 | + placeholder: '请输入备注', | |
| 121 | + maxLength: 255, | |
| 119 | 122 | }, | 
| 120 | 123 | }, | 
| 121 | 124 | { | 
| ... | ... | @@ -123,5 +126,8 @@ export const formSchema: FormSchema[] = [ | 
| 123 | 126 | label: '', | 
| 124 | 127 | component: 'Input', | 
| 125 | 128 | show: false, | 
| 129 | + componentProps: { | |
| 130 | + maxLength: 36, | |
| 131 | + }, | |
| 126 | 132 | }, | 
| 127 | 133 | ]; | ... | ... | 
| ... | ... | @@ -8,11 +8,6 @@ import { | 
| 8 | 8 | DeviceUserNameMaxLength, | 
| 9 | 9 | DeviceProfileIdMaxLength, | 
| 10 | 10 | DeviceOrgIdMaxLength, | 
| 11 | - DeviceLabelMaxLength, | |
| 12 | - DeviceDescriptionlMaxLength, | |
| 13 | - DeviceIdMaxLength, | |
| 14 | - DeviceTenantIdMaxLength, | |
| 15 | - DeviceTbDeviceIdMaxLength, | |
| 16 | 11 | } from '/@/utils/rules'; | 
| 17 | 12 | |
| 18 | 13 | // 第一步的表单 | 
| ... | ... | @@ -81,7 +76,6 @@ export const step1Schemas: FormSchema[] = [ | 
| 81 | 76 | componentProps: { | 
| 82 | 77 | maxLength: 255, | 
| 83 | 78 | }, | 
| 84 | - rules: DeviceLabelMaxLength, | |
| 85 | 79 | }, | 
| 86 | 80 | { | 
| 87 | 81 | field: 'deviceAddress', | 
| ... | ... | @@ -93,28 +87,36 @@ export const step1Schemas: FormSchema[] = [ | 
| 93 | 87 | field: 'description', | 
| 94 | 88 | label: '备注', | 
| 95 | 89 | component: 'InputTextArea', | 
| 96 | - rules: DeviceDescriptionlMaxLength, | |
| 90 | + componentProps: { | |
| 91 | + maxLength: 500, | |
| 92 | + }, | |
| 97 | 93 | }, | 
| 98 | 94 | { | 
| 99 | 95 | field: 'id', | 
| 100 | 96 | label: 'id', | 
| 101 | 97 | component: 'Input', | 
| 102 | 98 | show: false, | 
| 103 | - rules: DeviceIdMaxLength, | |
| 99 | + componentProps: { | |
| 100 | + maxLength: 36, | |
| 101 | + }, | |
| 104 | 102 | }, | 
| 105 | 103 | { | 
| 106 | 104 | field: 'tenantId', | 
| 107 | 105 | label: '租户Code', | 
| 108 | 106 | component: 'Input', | 
| 109 | 107 | show: false, | 
| 110 | - rules: DeviceTenantIdMaxLength, | |
| 108 | + componentProps: { | |
| 109 | + maxLength: 36, | |
| 110 | + }, | |
| 111 | 111 | }, | 
| 112 | 112 | { | 
| 113 | 113 | field: 'tbDeviceId', | 
| 114 | 114 | label: 'tbDeviceId', | 
| 115 | 115 | component: 'Input', | 
| 116 | 116 | show: false, | 
| 117 | - rules: DeviceTbDeviceIdMaxLength, | |
| 117 | + componentProps: { | |
| 118 | + maxLength: 36, | |
| 119 | + }, | |
| 118 | 120 | }, | 
| 119 | 121 | ]; | 
| 120 | 122 | |
| ... | ... | @@ -265,6 +267,9 @@ export const step2Schemas: FormSchema[] = [ | 
| 265 | 267 | field: 'credentialsId', | 
| 266 | 268 | required: true, | 
| 267 | 269 | ifShow: false, | 
| 270 | + componentProps: { | |
| 271 | + maxLength: 64, | |
| 272 | + }, | |
| 268 | 273 | }, | 
| 269 | 274 | { | 
| 270 | 275 | label: 'RSA公钥', | 
| ... | ... | @@ -272,6 +277,9 @@ export const step2Schemas: FormSchema[] = [ | 
| 272 | 277 | field: 'publicKey', | 
| 273 | 278 | required: true, | 
| 274 | 279 | ifShow: false, | 
| 280 | + componentProps: { | |
| 281 | + maxLength: 36, | |
| 282 | + }, | |
| 275 | 283 | }, | 
| 276 | 284 | { | 
| 277 | 285 | label: '客户端ID', | 
| ... | ... | @@ -279,6 +287,9 @@ export const step2Schemas: FormSchema[] = [ | 
| 279 | 287 | field: 'clientId', | 
| 280 | 288 | required: true, | 
| 281 | 289 | ifShow: false, | 
| 290 | + componentProps: { | |
| 291 | + maxLength: 36, | |
| 292 | + }, | |
| 282 | 293 | }, | 
| 283 | 294 | { | 
| 284 | 295 | label: '用户名', | 
| ... | ... | @@ -292,6 +303,9 @@ export const step2Schemas: FormSchema[] = [ | 
| 292 | 303 | label: '密码', | 
| 293 | 304 | component: 'InputPassword', | 
| 294 | 305 | field: 'password', | 
| 306 | + componentProps: { | |
| 307 | + maxLength: 36, | |
| 308 | + }, | |
| 295 | 309 | ifShow: false, | 
| 296 | 310 | }, | 
| 297 | 311 | ]; | 
| ... | ... | @@ -431,6 +445,9 @@ export const TokenSchemas: FormSchema[] = [ | 
| 431 | 445 | field: 'credentialsId', | 
| 432 | 446 | required: true, | 
| 433 | 447 | ifShow: false, | 
| 448 | + componentProps: { | |
| 449 | + maxLength: 64, | |
| 450 | + }, | |
| 434 | 451 | }, | 
| 435 | 452 | { | 
| 436 | 453 | label: 'RSA公钥', | 
| ... | ... | @@ -438,6 +455,9 @@ export const TokenSchemas: FormSchema[] = [ | 
| 438 | 455 | field: 'publicKey', | 
| 439 | 456 | required: true, | 
| 440 | 457 | ifShow: false, | 
| 458 | + componentProps: { | |
| 459 | + maxLength: 36, | |
| 460 | + }, | |
| 441 | 461 | }, | 
| 442 | 462 | { | 
| 443 | 463 | label: '客户端ID', | 
| ... | ... | @@ -445,6 +465,9 @@ export const TokenSchemas: FormSchema[] = [ | 
| 445 | 465 | field: 'clientId', | 
| 446 | 466 | required: true, | 
| 447 | 467 | ifShow: false, | 
| 468 | + componentProps: { | |
| 469 | + maxLength: 36, | |
| 470 | + }, | |
| 448 | 471 | }, | 
| 449 | 472 | { | 
| 450 | 473 | label: '用户名', | 
| ... | ... | @@ -459,17 +482,26 @@ export const TokenSchemas: FormSchema[] = [ | 
| 459 | 482 | component: 'InputPassword', | 
| 460 | 483 | field: 'password', | 
| 461 | 484 | ifShow: false, | 
| 485 | + componentProps: { | |
| 486 | + maxLength: 36, | |
| 487 | + }, | |
| 462 | 488 | }, | 
| 463 | 489 | { | 
| 464 | 490 | label: 'id', | 
| 465 | 491 | component: 'Input', | 
| 466 | 492 | field: 'id', | 
| 467 | 493 | show: false, | 
| 494 | + componentProps: { | |
| 495 | + maxLength: 36, | |
| 496 | + }, | |
| 468 | 497 | }, | 
| 469 | 498 | { | 
| 470 | 499 | label: 'tbDeviceId', | 
| 471 | 500 | component: 'Input', | 
| 472 | 501 | field: 'tbDeviceId', | 
| 473 | 502 | show: false, | 
| 503 | + componentProps: { | |
| 504 | + maxLength: 36, | |
| 505 | + }, | |
| 474 | 506 | }, | 
| 475 | 507 | ]; | ... | ... | 
| ... | ... | @@ -180,8 +180,25 @@ export const formSchema: FormSchema[] = [ | 
| 180 | 180 | colProps: { span: 13 }, | 
| 181 | 181 | component: 'Input', | 
| 182 | 182 | componentProps: { | 
| 183 | + maxLength: 16, | |
| 183 | 184 | placeholder: '请输入持续时间值(请输入数字)', | 
| 184 | 185 | }, | 
| 186 | + dynamicRules: () => { | |
| 187 | + return [ | |
| 188 | + { | |
| 189 | + validator: (_, value) => { | |
| 190 | + if (!value) { | |
| 191 | + return Promise.reject('持续时间值不能为空'); | |
| 192 | + } | |
| 193 | + const pwdRegex = new RegExp(/-?\d+/); | |
| 194 | + if (!pwdRegex.test(value)) { | |
| 195 | + return Promise.reject('只能为数字,且最长不超过16位'); | |
| 196 | + } | |
| 197 | + return Promise.resolve(); | |
| 198 | + }, | |
| 199 | + }, | |
| 200 | + ]; | |
| 201 | + }, | |
| 185 | 202 | ifShow: ({ values }) => isWenDu(Reflect.get(values, 'conditionType')), | 
| 186 | 203 | show: ({ values }) => { | 
| 187 | 204 | return !values.field5; | 
| ... | ... | @@ -229,9 +246,25 @@ export const formSchema: FormSchema[] = [ | 
| 229 | 246 | colProps: { span: 13 }, | 
| 230 | 247 | component: 'Input', | 
| 231 | 248 | componentProps: { | 
| 249 | + maxLength: 2147483637, | |
| 232 | 250 | placeholder: '请输入事件计数值(应在1到2147483637之间)', | 
| 233 | 251 | }, | 
| 234 | - rules: [{ message: '事件计数应在1到2147483637之间', trigger: 'blur' }], | |
| 252 | + dynamicRules: () => { | |
| 253 | + return [ | |
| 254 | + { | |
| 255 | + validator: (_, value) => { | |
| 256 | + if (!value) { | |
| 257 | + return Promise.reject('事件计数不能为空'); | |
| 258 | + } | |
| 259 | + const pwdRegex = new RegExp(/-?\d+/); | |
| 260 | + if (!pwdRegex.test(value)) { | |
| 261 | + return Promise.reject('只能为数字,且最长不超过16位'); | |
| 262 | + } | |
| 263 | + return Promise.resolve(); | |
| 264 | + }, | |
| 265 | + }, | |
| 266 | + ]; | |
| 267 | + }, | |
| 235 | 268 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'conditionType')), | 
| 236 | 269 | show: ({ values }) => { | 
| 237 | 270 | return !values.field6; | ... | ... | 
| ... | ... | @@ -66,6 +66,7 @@ export const formSchema: FormSchema[] = [ | 
| 66 | 66 | component: 'Input', | 
| 67 | 67 | componentProps: { | 
| 68 | 68 | placeholder: '请输入键名', | 
| 69 | + maxLength: 255, | |
| 69 | 70 | // options: [ | 
| 70 | 71 | // { label: 'active', value: 'active' }, | 
| 71 | 72 | // { label: 'inactivityAlarmTime', value: 'inactivityAlarmTime' }, | 
| ... | ... | @@ -82,6 +83,8 @@ export const formSchema: FormSchema[] = [ | 
| 82 | 83 | colProps: { span: 13 }, | 
| 83 | 84 | component: 'Input', | 
| 84 | 85 | componentProps: { | 
| 86 | + maxLength: 255, | |
| 87 | + | |
| 85 | 88 | placeholder: '请输入键名', | 
| 86 | 89 | // options: [ | 
| 87 | 90 | // { label: 'CO2', value: 'CO2' }, | 
| ... | ... | @@ -97,6 +100,8 @@ export const formSchema: FormSchema[] = [ | 
| 97 | 100 | colProps: { span: 13 }, | 
| 98 | 101 | component: 'Input', | 
| 99 | 102 | componentProps: { | 
| 103 | + maxLength: 255, | |
| 104 | + | |
| 100 | 105 | placeholder: '请输入键名', | 
| 101 | 106 | }, | 
| 102 | 107 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'type')), | 
| ... | ... | @@ -183,8 +188,25 @@ export const formSchema: FormSchema[] = [ | 
| 183 | 188 | colProps: { span: 13 }, | 
| 184 | 189 | component: 'Input', | 
| 185 | 190 | componentProps: { | 
| 191 | + maxLength: 16, | |
| 186 | 192 | placeholder: '请输入默认值(数字)', | 
| 187 | 193 | }, | 
| 194 | + dynamicRules: () => { | |
| 195 | + return [ | |
| 196 | + { | |
| 197 | + validator: (_, value) => { | |
| 198 | + if (!value) { | |
| 199 | + return Promise.reject('默认值不能为空'); | |
| 200 | + } | |
| 201 | + const pwdRegex = new RegExp(/-?\d+/); | |
| 202 | + if (!pwdRegex.test(value)) { | |
| 203 | + return Promise.reject('只能为数字,且最长不超过16位'); | |
| 204 | + } | |
| 205 | + return Promise.resolve(); | |
| 206 | + }, | |
| 207 | + }, | |
| 208 | + ]; | |
| 209 | + }, | |
| 188 | 210 | ifShow: ({ values }) => isString(Reflect.get(values, 'type1')), | 
| 189 | 211 | show: ({ values }) => { | 
| 190 | 212 | return !values.field5; | 
| ... | ... | @@ -259,6 +281,22 @@ export const formSchema: FormSchema[] = [ | 
| 259 | 281 | componentProps: { | 
| 260 | 282 | placeholder: '请输入值(数字)', | 
| 261 | 283 | }, | 
| 284 | + dynamicRules: () => { | |
| 285 | + return [ | |
| 286 | + { | |
| 287 | + validator: (_, value) => { | |
| 288 | + if (!value) { | |
| 289 | + return Promise.reject('值'); | |
| 290 | + } | |
| 291 | + const pwdRegex = new RegExp(/-?\d+/); | |
| 292 | + if (!pwdRegex.test(value)) { | |
| 293 | + return Promise.reject('只能为数字,且最长不超过16位'); | |
| 294 | + } | |
| 295 | + return Promise.resolve(); | |
| 296 | + }, | |
| 297 | + }, | |
| 298 | + ]; | |
| 299 | + }, | |
| 262 | 300 | ifShow: ({ values }) => isNumeric(Reflect.get(values, 'type1')), | 
| 263 | 301 | show: ({ values }) => { | 
| 264 | 302 | return !values.field6; | ... | ... | 
| ... | ... | @@ -14,6 +14,7 @@ export const step1Schemas: FormSchema[] = [ | 
| 14 | 14 | required: true, | 
| 15 | 15 | component: 'Input', | 
| 16 | 16 | componentProps: { | 
| 17 | + maxLength: 255, | |
| 17 | 18 | placeholder: '请输入配置名称', | 
| 18 | 19 | }, | 
| 19 | 20 | rules: DeviceProfileQueryUserNameMaxLength, | 
| ... | ... | @@ -67,6 +68,10 @@ export const step1Schemas: FormSchema[] = [ | 
| 67 | 68 | label: '描述', | 
| 68 | 69 | field: 'description', | 
| 69 | 70 | component: 'InputTextArea', | 
| 71 | + componentProps: { | |
| 72 | + maxLength: 0, | |
| 73 | + placeholder: '请输入描述', | |
| 74 | + }, | |
| 70 | 75 | }, | 
| 71 | 76 | ]; | 
| 72 | 77 | |
| ... | ... | @@ -98,6 +103,7 @@ export const step3Schemas: FormSchema[] = [ | 
| 98 | 103 | span: 12, | 
| 99 | 104 | }, | 
| 100 | 105 | componentProps: { | 
| 106 | + maxLength: 255, | |
| 101 | 107 | placeholder: '请输入报警类型', | 
| 102 | 108 | }, | 
| 103 | 109 | }, | 
| ... | ... | @@ -118,6 +124,7 @@ export const step3ViewHighSetting: FormSchema[] = [ | 
| 118 | 124 | span: 11, | 
| 119 | 125 | }, | 
| 120 | 126 | componentProps: { | 
| 127 | + maxLength: 255, | |
| 121 | 128 | placeholder: '要传递的关联类型', | 
| 122 | 129 | }, | 
| 123 | 130 | }, | 
| ... | ... | @@ -138,6 +145,7 @@ export const step3HighSetting: FormSchema[] = [ | 
| 138 | 145 | span: 11, | 
| 139 | 146 | }, | 
| 140 | 147 | componentProps: { | 
| 148 | + maxLength: 255, | |
| 141 | 149 | placeholder: '要传递的关联类型', | 
| 142 | 150 | }, | 
| 143 | 151 | ifShow: ({ values }) => !!values.propagate, | ... | ... | 
| ... | ... | @@ -115,6 +115,9 @@ export const formSchema: FormSchema[] = [ | 
| 115 | 115 | label: '配置名称', | 
| 116 | 116 | required: true, | 
| 117 | 117 | component: 'Input', | 
| 118 | + componentProps: { | |
| 119 | + maxLength: 30, | |
| 120 | + }, | |
| 118 | 121 | }, | 
| 119 | 122 | { | 
| 120 | 123 | field: 'messageType', | 
| ... | ... | @@ -150,12 +153,18 @@ export const formSchema: FormSchema[] = [ | 
| 150 | 153 | label: 'accessKeyId', | 
| 151 | 154 | required: true, | 
| 152 | 155 | component: 'Input', | 
| 156 | + componentProps: { | |
| 157 | + maxLength: 36, | |
| 158 | + }, | |
| 153 | 159 | ifShow: ({ values }) => isMessage(Reflect.get(values, 'messageType')), | 
| 154 | 160 | }, | 
| 155 | 161 | { | 
| 156 | 162 | field: 'accessKeySecret', | 
| 157 | 163 | label: 'accessKeySecret', | 
| 158 | 164 | required: true, | 
| 165 | + componentProps: { | |
| 166 | + maxLength: 36, | |
| 167 | + }, | |
| 159 | 168 | component: 'Input', | 
| 160 | 169 | ifShow: ({ values }) => isMessage(Reflect.get(values, 'messageType')), | 
| 161 | 170 | }, | 
| ... | ... | @@ -165,6 +174,9 @@ export const formSchema: FormSchema[] = [ | 
| 165 | 174 | defaultValue: 'smtp.163.com', | 
| 166 | 175 | required: true, | 
| 167 | 176 | component: 'Input', | 
| 177 | + componentProps: { | |
| 178 | + maxLength: 36, | |
| 179 | + }, | |
| 168 | 180 | ifShow: ({ values }) => isEmail(Reflect.get(values, 'messageType')), | 
| 169 | 181 | }, | 
| 170 | 182 | { | 
| ... | ... | @@ -172,6 +184,9 @@ export const formSchema: FormSchema[] = [ | 
| 172 | 184 | label: '端口', | 
| 173 | 185 | defaultValue: 25, | 
| 174 | 186 | required: true, | 
| 187 | + componentProps: { | |
| 188 | + maxLength: 36, | |
| 189 | + }, | |
| 175 | 190 | component: 'InputNumber', | 
| 176 | 191 | ifShow: ({ values }) => isEmail(Reflect.get(values, 'messageType')), | 
| 177 | 192 | }, | 
| ... | ... | @@ -179,6 +194,9 @@ export const formSchema: FormSchema[] = [ | 
| 179 | 194 | field: 'username', | 
| 180 | 195 | label: '用户名', | 
| 181 | 196 | required: true, | 
| 197 | + componentProps: { | |
| 198 | + maxLength: 255, | |
| 199 | + }, | |
| 182 | 200 | component: 'Input', | 
| 183 | 201 | ifShow: ({ values }) => isEmail(Reflect.get(values, 'messageType')), | 
| 184 | 202 | }, | 
| ... | ... | @@ -186,6 +204,7 @@ export const formSchema: FormSchema[] = [ | 
| 186 | 204 | field: 'password', | 
| 187 | 205 | label: '密码', | 
| 188 | 206 | required: true, | 
| 207 | + | |
| 189 | 208 | component: 'InputPassword', | 
| 190 | 209 | ifShow: ({ values }) => isEmail(Reflect.get(values, 'messageType')), | 
| 191 | 210 | }, | 
| ... | ... | @@ -194,12 +213,18 @@ export const formSchema: FormSchema[] = [ | 
| 194 | 213 | label: '消息配置', | 
| 195 | 214 | component: 'Input', | 
| 196 | 215 | show: false, | 
| 216 | + componentProps: { | |
| 217 | + maxLength: 255, | |
| 218 | + }, | |
| 197 | 219 | }, | 
| 198 | 220 | { | 
| 199 | 221 | field: 'id', | 
| 200 | 222 | label: '主键', | 
| 201 | 223 | component: 'Input', | 
| 202 | 224 | show: false, | 
| 225 | + componentProps: { | |
| 226 | + maxLength: 36, | |
| 227 | + }, | |
| 203 | 228 | }, | 
| 204 | 229 | { | 
| 205 | 230 | field: 'status', | 
| ... | ... | @@ -216,6 +241,9 @@ export const formSchema: FormSchema[] = [ | 
| 216 | 241 | { | 
| 217 | 242 | label: '备注', | 
| 218 | 243 | field: 'remark', | 
| 244 | + componentProps: { | |
| 245 | + maxLength: 255, | |
| 246 | + }, | |
| 219 | 247 | component: 'InputTextArea', | 
| 220 | 248 | }, | 
| 221 | 249 | { | 
| ... | ... | @@ -223,5 +251,8 @@ export const formSchema: FormSchema[] = [ | 
| 223 | 251 | field: 'tenantId', | 
| 224 | 252 | component: 'Input', | 
| 225 | 253 | show: false, | 
| 254 | + componentProps: { | |
| 255 | + maxLength: 36, | |
| 256 | + }, | |
| 226 | 257 | }, | 
| 227 | 258 | ]; | ... | ... | 
| ... | ... | @@ -110,6 +110,9 @@ export const formSchema: FormSchema[] = [ | 
| 110 | 110 | label: '主键', | 
| 111 | 111 | component: 'Input', | 
| 112 | 112 | show: false, | 
| 113 | + componentProps: { | |
| 114 | + maxLength: 36, | |
| 115 | + }, | |
| 113 | 116 | }, | 
| 114 | 117 | { | 
| 115 | 118 | field: 'messageType', | 
| ... | ... | @@ -145,12 +148,18 @@ export const formSchema: FormSchema[] = [ | 
| 145 | 148 | label: '模板名称', | 
| 146 | 149 | required: true, | 
| 147 | 150 | component: 'Input', | 
| 151 | + componentProps: { | |
| 152 | + maxLength: 32, | |
| 153 | + }, | |
| 148 | 154 | }, | 
| 149 | 155 | { | 
| 150 | 156 | field: 'templateCode', | 
| 151 | 157 | label: '模板编号', | 
| 152 | 158 | required: true, | 
| 153 | 159 | component: 'Input', | 
| 160 | + componentProps: { | |
| 161 | + maxLength: 20, | |
| 162 | + }, | |
| 154 | 163 | ifShow: ({ values }) => isMessage(Reflect.get(values, 'messageType')), | 
| 155 | 164 | }, | 
| 156 | 165 | { | 
| ... | ... | @@ -158,6 +167,9 @@ export const formSchema: FormSchema[] = [ | 
| 158 | 167 | label: '签名', | 
| 159 | 168 | required: true, | 
| 160 | 169 | component: 'Input', | 
| 170 | + componentProps: { | |
| 171 | + maxLength: 32, | |
| 172 | + }, | |
| 161 | 173 | ifShow: ({ values }) => isMessage(Reflect.get(values, 'messageType')), | 
| 162 | 174 | }, | 
| 163 | 175 | { | 
| ... | ... | @@ -180,5 +192,8 @@ export const formSchema: FormSchema[] = [ | 
| 180 | 192 | label: '租户ID', | 
| 181 | 193 | component: 'Input', | 
| 182 | 194 | show: false, | 
| 195 | + componentProps: { | |
| 196 | + maxLength: 36, | |
| 197 | + }, | |
| 183 | 198 | }, | 
| 184 | 199 | ]; | ... | ... | 
| ... | ... | @@ -147,6 +147,7 @@ export const formSchema: FormSchema[] = [ | 
| 147 | 147 | required: true, | 
| 148 | 148 | component: 'Input', | 
| 149 | 149 | componentProps: { | 
| 150 | + maxLength: 36, | |
| 150 | 151 | placeholder: '请输入场景联动名称', | 
| 151 | 152 | }, | 
| 152 | 153 | }, | 
| ... | ... | @@ -200,6 +201,7 @@ export const formSchema: FormSchema[] = [ | 
| 200 | 201 | colProps: { span: 24 }, | 
| 201 | 202 | component: 'InputTextArea', | 
| 202 | 203 | componentProps: { | 
| 204 | + maxLength: 255, | |
| 203 | 205 | placeholder: '请输入描述', | 
| 204 | 206 | }, | 
| 205 | 207 | }, | 
| ... | ... | @@ -225,6 +227,7 @@ export const searchFormSchema: FormSchema[] = [ | 
| 225 | 227 | component: 'Input', | 
| 226 | 228 | colProps: { span: 8 }, | 
| 227 | 229 | componentProps: { | 
| 230 | + maxLength: 36, | |
| 228 | 231 | placeholder: '请输入场景联动状态', | 
| 229 | 232 | }, | 
| 230 | 233 | }, | 
| ... | ... | @@ -279,6 +282,8 @@ export const useTriggerDrawerSchema: FormSchema[] = [ | 
| 279 | 282 | component: 'Input', | 
| 280 | 283 | label: '', | 
| 281 | 284 | componentProps: { | 
| 285 | + maxLength: 255, | |
| 286 | + | |
| 282 | 287 | placeholder: '请输入Cron表达式', | 
| 283 | 288 | }, | 
| 284 | 289 | colProps: { | 
| ... | ... | @@ -367,6 +372,8 @@ export const useTriggerDrawerSchema: FormSchema[] = [ | 
| 367 | 372 | component: 'Input', | 
| 368 | 373 | label: '', | 
| 369 | 374 | componentProps: { | 
| 375 | + maxLength: 16, | |
| 376 | + | |
| 370 | 377 | placeholder: '请输入比较值', | 
| 371 | 378 | }, | 
| 372 | 379 | ifShow: ({ values }) => | 
| ... | ... | @@ -518,6 +525,7 @@ export const useConditionDrawerSchema: FormSchema[] = [ | 
| 518 | 525 | component: 'Input', | 
| 519 | 526 | label: '', | 
| 520 | 527 | componentProps: { | 
| 528 | + maxLength: 16, | |
| 521 | 529 | placeholder: '请输入比较值', | 
| 522 | 530 | }, | 
| 523 | 531 | ifShow: ({ values }) => | 
| ... | ... | @@ -550,6 +558,8 @@ export const useConditionDrawerSchema: FormSchema[] = [ | 
| 550 | 558 | component: 'Input', | 
| 551 | 559 | label: '', | 
| 552 | 560 | componentProps: { | 
| 561 | + maxLength: 16, | |
| 562 | + | |
| 553 | 563 | placeholder: '请输入比较值', | 
| 554 | 564 | }, | 
| 555 | 565 | ifShow: ({ values }) => | 
| ... | ... | @@ -602,6 +612,8 @@ export const useActionDrawerSchema: FormSchema[] = [ | 
| 602 | 612 | component: 'Input', | 
| 603 | 613 | label: '', | 
| 604 | 614 | componentProps: { | 
| 615 | + maxLength: 255, | |
| 616 | + | |
| 605 | 617 | placeholder: '请输入下发指定', | 
| 606 | 618 | }, | 
| 607 | 619 | ifShow: ({ values }) => | ... | ... | 
| ... | ... | @@ -58,6 +58,9 @@ export const accountFormSchema: FormSchema[] = [ | 
| 58 | 58 | label: 'id', | 
| 59 | 59 | component: 'Input', | 
| 60 | 60 | show: false, | 
| 61 | + componentProps: { | |
| 62 | + maxLength: 36, | |
| 63 | + }, | |
| 61 | 64 | }, | 
| 62 | 65 | { | 
| 63 | 66 | field: 'username', | 
| ... | ... | @@ -108,6 +111,9 @@ export const accountFormSchema: FormSchema[] = [ | 
| 108 | 111 | component: 'Input', | 
| 109 | 112 | colProps: { span: 12 }, | 
| 110 | 113 | required: true, | 
| 114 | + componentProps: { | |
| 115 | + maxLength: 255, | |
| 116 | + }, | |
| 111 | 117 | }, | 
| 112 | 118 | { | 
| 113 | 119 | label: '角色', | ... | ... | 
| ... | ... | @@ -35,12 +35,18 @@ export const searchFormSchema: FormSchema[] = [ | 
| 35 | 35 | label: '字典名称', | 
| 36 | 36 | component: 'Input', | 
| 37 | 37 | colProps: { span: 6 }, | 
| 38 | + componentProps: { | |
| 39 | + maxLength: 32, | |
| 40 | + }, | |
| 38 | 41 | }, | 
| 39 | 42 | { | 
| 40 | 43 | field: 'dictCode', | 
| 41 | 44 | label: '字典编码', | 
| 42 | 45 | component: 'Input', | 
| 43 | 46 | colProps: { span: 6 }, | 
| 47 | + componentProps: { | |
| 48 | + maxLength: 32, | |
| 49 | + }, | |
| 44 | 50 | }, | 
| 45 | 51 | ]; | 
| 46 | 52 | |
| ... | ... | @@ -50,16 +56,25 @@ export const formSchema: FormSchema[] = [ | 
| 50 | 56 | label: '字典名称', | 
| 51 | 57 | required: true, | 
| 52 | 58 | component: 'Input', | 
| 59 | + componentProps: { | |
| 60 | + maxLength: 32, | |
| 61 | + }, | |
| 53 | 62 | }, | 
| 54 | 63 | { | 
| 55 | 64 | field: 'dictCode', | 
| 56 | 65 | label: '字典编码', | 
| 57 | 66 | required: true, | 
| 58 | 67 | component: 'Input', | 
| 68 | + componentProps: { | |
| 69 | + maxLength: 32, | |
| 70 | + }, | |
| 59 | 71 | }, | 
| 60 | 72 | { | 
| 61 | 73 | label: '备注', | 
| 62 | 74 | field: 'description', | 
| 63 | 75 | component: 'InputTextArea', | 
| 76 | + componentProps: { | |
| 77 | + maxLength: 255, | |
| 78 | + }, | |
| 64 | 79 | }, | 
| 65 | 80 | ]; | ... | ... | 
| ... | ... | @@ -67,12 +67,18 @@ export const searchFormSchema: FormSchema[] = [ | 
| 67 | 67 | label: '文本值', | 
| 68 | 68 | component: 'Input', | 
| 69 | 69 | colProps: { span: 6 }, | 
| 70 | + componentProps: { | |
| 71 | + maxLength: 32, | |
| 72 | + }, | |
| 70 | 73 | }, | 
| 71 | 74 | { | 
| 72 | 75 | field: 'dictId', | 
| 73 | 76 | label: '文本值', | 
| 74 | 77 | component: 'Input', | 
| 75 | 78 | show: false, | 
| 79 | + componentProps: { | |
| 80 | + maxLength: 36, | |
| 81 | + }, | |
| 76 | 82 | }, | 
| 77 | 83 | ]; | 
| 78 | 84 | |
| ... | ... | @@ -82,18 +88,27 @@ export const formSchema: FormSchema[] = [ | 
| 82 | 88 | label: '文本值', | 
| 83 | 89 | required: true, | 
| 84 | 90 | component: 'Input', | 
| 91 | + componentProps: { | |
| 92 | + maxLength: 32, | |
| 93 | + }, | |
| 85 | 94 | }, | 
| 86 | 95 | { | 
| 87 | 96 | field: 'itemValue', | 
| 88 | 97 | label: '字典值', | 
| 89 | 98 | required: true, | 
| 90 | 99 | component: 'Input', | 
| 100 | + componentProps: { | |
| 101 | + maxLength: 32, | |
| 102 | + }, | |
| 91 | 103 | }, | 
| 92 | 104 | { | 
| 93 | 105 | field: 'sort', | 
| 94 | 106 | label: '排序', | 
| 95 | 107 | component: 'InputNumber', | 
| 96 | 108 | defaultValue: 1, | 
| 109 | + componentProps: { | |
| 110 | + maxLength: 32, | |
| 111 | + }, | |
| 97 | 112 | }, | 
| 98 | 113 | { | 
| 99 | 114 | field: 'status', | 
| ... | ... | @@ -111,5 +126,8 @@ export const formSchema: FormSchema[] = [ | 
| 111 | 126 | label: '备注', | 
| 112 | 127 | field: 'description', | 
| 113 | 128 | component: 'InputTextArea', | 
| 129 | + componentProps: { | |
| 130 | + maxLength: 255, | |
| 131 | + }, | |
| 114 | 132 | }, | 
| 115 | 133 | ]; | ... | ... | 
| ... | ... | @@ -123,6 +123,9 @@ export const formSchema: FormSchema[] = [ | 
| 123 | 123 | label: t('routes.common.system.tableTitleSystemMenuName'), //菜单名称 | 
| 124 | 124 | component: 'Input', | 
| 125 | 125 | required: true, | 
| 126 | + componentProps: { | |
| 127 | + maxLength: 255, | |
| 128 | + }, | |
| 126 | 129 | }, | 
| 127 | 130 | |
| 128 | 131 | { | 
| ... | ... | @@ -144,6 +147,9 @@ export const formSchema: FormSchema[] = [ | 
| 144 | 147 | label: t('routes.common.system.tableTitleSystemSort'), //排序 | 
| 145 | 148 | component: 'InputNumber', | 
| 146 | 149 | required: true, | 
| 150 | + componentProps: { | |
| 151 | + maxLength: 32, | |
| 152 | + }, | |
| 147 | 153 | }, | 
| 148 | 154 | { | 
| 149 | 155 | field: 'icon', | 
| ... | ... | @@ -159,18 +165,27 @@ export const formSchema: FormSchema[] = [ | 
| 159 | 165 | component: 'Input', | 
| 160 | 166 | required: true, | 
| 161 | 167 | ifShow: ({ values }) => !isButton(Reflect.get(values, 'menuType')), | 
| 168 | + componentProps: { | |
| 169 | + maxLength: 255, | |
| 170 | + }, | |
| 162 | 171 | }, | 
| 163 | 172 | { | 
| 164 | 173 | field: 'component', | 
| 165 | 174 | label: t('routes.common.system.menuEditPagesComponentsPath'), //组件路径 | 
| 166 | 175 | component: 'Input', | 
| 167 | 176 | ifShow: ({ values }) => isMenu(Reflect.get(values, 'menuType')), | 
| 177 | + componentProps: { | |
| 178 | + maxLength: 100, | |
| 179 | + }, | |
| 168 | 180 | }, | 
| 169 | 181 | { | 
| 170 | 182 | field: 'permission', | 
| 171 | 183 | label: t('routes.common.system.tableTitleSystemPermissionTag'), //权限标识 | 
| 172 | 184 | component: 'Input', | 
| 173 | 185 | ifShow: ({ values }) => !isDir(Reflect.get(values, 'menuType')), | 
| 186 | + componentProps: { | |
| 187 | + maxLength: 100, | |
| 188 | + }, | |
| 174 | 189 | }, | 
| 175 | 190 | { | 
| 176 | 191 | field: 'status', | ... | ... | 
| ... | ... | @@ -45,22 +45,34 @@ export const formSchema: FormSchema[] = [ | 
| 45 | 45 | label: t('routes.common.organization.queryOrganizationName'), | 
| 46 | 46 | component: 'Input', | 
| 47 | 47 | required: true, | 
| 48 | + componentProps: { | |
| 49 | + maxLength: 255, | |
| 50 | + }, | |
| 48 | 51 | }, | 
| 49 | 52 | { | 
| 50 | 53 | field: 'sort', | 
| 51 | 54 | label: t('routes.common.common.sort'), //排序 | 
| 52 | 55 | component: 'InputNumber', | 
| 53 | 56 | required: true, | 
| 57 | + componentProps: { | |
| 58 | + maxLength: 32, | |
| 59 | + }, | |
| 54 | 60 | }, | 
| 55 | 61 | { | 
| 56 | 62 | label: t('routes.common.common.remark'), //备注 | 
| 57 | 63 | field: 'remark', | 
| 58 | 64 | component: 'InputTextArea', | 
| 65 | + componentProps: { | |
| 66 | + maxLength: 255, | |
| 67 | + }, | |
| 59 | 68 | }, | 
| 60 | 69 | { | 
| 61 | 70 | label: '租户ID', | 
| 62 | 71 | field: 'tenantId', | 
| 63 | 72 | component: 'Input', | 
| 64 | 73 | show: false, | 
| 74 | + componentProps: { | |
| 75 | + maxLength: 36, | |
| 76 | + }, | |
| 65 | 77 | }, | 
| 66 | 78 | ]; | ... | ... | 
| ... | ... | @@ -88,6 +88,9 @@ export const formSchema: FormSchema[] = [ | 
| 88 | 88 | label: '角色名称', | 
| 89 | 89 | required: true, | 
| 90 | 90 | component: 'Input', | 
| 91 | + componentProps: { | |
| 92 | + maxLength: 255, | |
| 93 | + }, | |
| 91 | 94 | }, | 
| 92 | 95 | { | 
| 93 | 96 | field: 'status', | 
| ... | ... | @@ -105,11 +108,17 @@ export const formSchema: FormSchema[] = [ | 
| 105 | 108 | label: '备注', | 
| 106 | 109 | field: 'remark', | 
| 107 | 110 | component: 'InputTextArea', | 
| 111 | + componentProps: { | |
| 112 | + maxLength: 255, | |
| 113 | + }, | |
| 108 | 114 | }, | 
| 109 | 115 | { | 
| 110 | 116 | label: ' ', | 
| 111 | 117 | field: 'menu', | 
| 112 | 118 | slot: 'menu', | 
| 113 | 119 | component: 'Input', | 
| 120 | + componentProps: { | |
| 121 | + maxLength: 255, | |
| 122 | + }, | |
| 114 | 123 | }, | 
| 115 | 124 | ]; | ... | ... | 
| ... | ... | @@ -35,6 +35,9 @@ | 
| 35 | 35 | label: 'id:', | 
| 36 | 36 | show: false, | 
| 37 | 37 | component: 'Input', | 
| 38 | + componentProps: { | |
| 39 | + maxLength: 36, | |
| 40 | + }, | |
| 38 | 41 | }, | 
| 39 | 42 | { | 
| 40 | 43 | field: 'username', | 
| ... | ... | @@ -76,6 +79,9 @@ | 
| 76 | 79 | label: '真实名字', | 
| 77 | 80 | required: true, | 
| 78 | 81 | component: 'Input', | 
| 82 | + componentProps: { | |
| 83 | + maxLength: 255, | |
| 84 | + }, | |
| 79 | 85 | }, | 
| 80 | 86 | { | 
| 81 | 87 | field: 'phoneNumber', | ... | ... | 
| ... | ... | @@ -46,12 +46,18 @@ export const tenantFormSchema: FormSchema[] = [ | 
| 46 | 46 | label: 'id', | 
| 47 | 47 | slot: 'iconSelect', | 
| 48 | 48 | component: 'Input', | 
| 49 | + componentProps: { | |
| 50 | + maxLength: 36, | |
| 51 | + }, | |
| 49 | 52 | show: false, | 
| 50 | 53 | }, | 
| 51 | 54 | { | 
| 52 | 55 | field: 'tenantId', | 
| 53 | 56 | label: 'tenantId', | 
| 54 | 57 | component: 'Input', | 
| 58 | + componentProps: { | |
| 59 | + maxLength: 36, | |
| 60 | + }, | |
| 55 | 61 | show: false, | 
| 56 | 62 | }, | 
| 57 | 63 | { | 
| ... | ... | @@ -59,12 +65,18 @@ export const tenantFormSchema: FormSchema[] = [ | 
| 59 | 65 | label: '租户图标: ', | 
| 60 | 66 | slot: 'iconSelect', | 
| 61 | 67 | component: 'Input', | 
| 68 | + componentProps: { | |
| 69 | + maxLength: 255, | |
| 70 | + }, | |
| 62 | 71 | }, | 
| 63 | 72 | { | 
| 64 | 73 | field: 'name', | 
| 65 | 74 | label: '租户名称:', | 
| 66 | 75 | required: true, | 
| 67 | 76 | component: 'Input', | 
| 77 | + componentProps: { | |
| 78 | + maxLength: 255, | |
| 79 | + }, | |
| 68 | 80 | }, | 
| 69 | 81 | { | 
| 70 | 82 | field: 'roleIds', | 
| ... | ... | @@ -106,5 +118,8 @@ export const tenantFormSchema: FormSchema[] = [ | 
| 106 | 118 | label: '备注: ', | 
| 107 | 119 | field: 'description', | 
| 108 | 120 | component: 'InputTextArea', | 
| 121 | + componentProps: { | |
| 122 | + maxLength: 500, | |
| 123 | + }, | |
| 109 | 124 | }, | 
| 110 | 125 | ]; | ... | ... | 
| ... | ... | @@ -9,6 +9,7 @@ export const schemas: FormSchema[] = [ | 
| 9 | 9 | span: 24, | 
| 10 | 10 | }, | 
| 11 | 11 | componentProps: { | 
| 12 | + maxLength: 50, | |
| 12 | 13 | placeholder: '请输入平台名称', | 
| 13 | 14 | }, | 
| 14 | 15 | }, | 
| ... | ... | @@ -55,6 +56,9 @@ export const schemas: FormSchema[] = [ | 
| 55 | 56 | colProps: { | 
| 56 | 57 | span: 24, | 
| 57 | 58 | }, | 
| 59 | + componentProps: { | |
| 60 | + maxLength: 100, | |
| 61 | + }, | |
| 58 | 62 | }, | 
| 59 | 63 | { | 
| 60 | 64 | field: 'presentedOurselves', | 
| ... | ... | @@ -63,6 +67,9 @@ export const schemas: FormSchema[] = [ | 
| 63 | 67 | colProps: { | 
| 64 | 68 | span: 24, | 
| 65 | 69 | }, | 
| 70 | + componentProps: { | |
| 71 | + maxLength: 50, | |
| 72 | + }, | |
| 66 | 73 | }, | 
| 67 | 74 | { | 
| 68 | 75 | field: 'domain', | 
| ... | ... | @@ -71,5 +78,8 @@ export const schemas: FormSchema[] = [ | 
| 71 | 78 | colProps: { | 
| 72 | 79 | span: 24, | 
| 73 | 80 | }, | 
| 81 | + componentProps: { | |
| 82 | + maxLength: 100, | |
| 83 | + }, | |
| 74 | 84 | }, | 
| 75 | 85 | ]; | ... | ... | 
| ... | ... | @@ -11,6 +11,7 @@ export const schemas: FormSchema[] = [ | 
| 11 | 11 | span: 24, | 
| 12 | 12 | }, | 
| 13 | 13 | componentProps: { | 
| 14 | + maxLength: 100, | |
| 14 | 15 | placeholder: '请输入公司名称', | 
| 15 | 16 | }, | 
| 16 | 17 | }, | 
| ... | ... | @@ -22,6 +23,8 @@ export const schemas: FormSchema[] = [ | 
| 22 | 23 | span: 24, | 
| 23 | 24 | }, | 
| 24 | 25 | componentProps: { | 
| 26 | + maxLength: 100, | |
| 27 | + | |
| 25 | 28 | placeholder: '请输入公司简称', | 
| 26 | 29 | }, | 
| 27 | 30 | }, | 
| ... | ... | @@ -33,6 +36,7 @@ export const schemas: FormSchema[] = [ | 
| 33 | 36 | span: 24, | 
| 34 | 37 | }, | 
| 35 | 38 | componentProps: { | 
| 39 | + maxLength: 255, | |
| 36 | 40 | placeholder: '请输入公司官网', | 
| 37 | 41 | }, | 
| 38 | 42 | }, | 
| ... | ... | @@ -57,6 +61,7 @@ export const schemas: FormSchema[] = [ | 
| 57 | 61 | span: 24, | 
| 58 | 62 | }, | 
| 59 | 63 | componentProps: { | 
| 64 | + maxLength: 500, | |
| 60 | 65 | placeholder: '请输入公司简介', | 
| 61 | 66 | autoSize: { minRows: 8, maxRows: 12 }, | 
| 62 | 67 | showCount: true, | 
| ... | ... | @@ -244,6 +249,7 @@ export const schemas: FormSchema[] = [ | 
| 244 | 249 | span: 24, | 
| 245 | 250 | }, | 
| 246 | 251 | componentProps: { | 
| 252 | + maxLength: 100, | |
| 247 | 253 | placeholder: '请输入详细地址', | 
| 248 | 254 | }, | 
| 249 | 255 | }, | 
| ... | ... | @@ -256,6 +262,7 @@ export const schemas: FormSchema[] = [ | 
| 256 | 262 | span: 24, | 
| 257 | 263 | }, | 
| 258 | 264 | componentProps: { | 
| 265 | + maxLength: 25, | |
| 259 | 266 | placeholder: '请输入联系人', | 
| 260 | 267 | }, | 
| 261 | 268 | }, | 
| ... | ... | @@ -275,6 +282,9 @@ export const schemas: FormSchema[] = [ | 
| 275 | 282 | field: 'qrcode', | 
| 276 | 283 | label: '二维码', | 
| 277 | 284 | component: 'Input', | 
| 285 | + componentProps: { | |
| 286 | + maxLength: 255, | |
| 287 | + }, | |
| 278 | 288 | colProps: { | 
| 279 | 289 | span: 24, | 
| 280 | 290 | }, | 
| ... | ... | @@ -285,5 +295,8 @@ export const schemas: FormSchema[] = [ | 
| 285 | 295 | label: '唯一id', | 
| 286 | 296 | component: 'Input', | 
| 287 | 297 | show: false, | 
| 298 | + componentProps: { | |
| 299 | + maxLength: 36, | |
| 300 | + }, | |
| 288 | 301 | }, | 
| 289 | 302 | ]; | ... | ... | 
| ... | ... | @@ -67,6 +67,9 @@ export const searchFormSchema: FormSchema[] = [ | 
| 67 | 67 | label: '角色名称', | 
| 68 | 68 | component: 'Input', | 
| 69 | 69 | colProps: { span: 8 }, | 
| 70 | + componentProps: { | |
| 71 | + maxLength: 255, | |
| 72 | + }, | |
| 70 | 73 | }, | 
| 71 | 74 | { | 
| 72 | 75 | field: 'roleType', | 
| ... | ... | @@ -75,6 +78,9 @@ export const searchFormSchema: FormSchema[] = [ | 
| 75 | 78 | colProps: { span: 8 }, | 
| 76 | 79 | defaultValue: RoleEnum.TENANT_ADMIN, | 
| 77 | 80 | ifShow: false, | 
| 81 | + componentProps: { | |
| 82 | + maxLength: 20, | |
| 83 | + }, | |
| 78 | 84 | }, | 
| 79 | 85 | { | 
| 80 | 86 | field: 'status', | 
| ... | ... | @@ -96,6 +102,9 @@ export const formSchema: FormSchema[] = [ | 
| 96 | 102 | label: '角色名称', | 
| 97 | 103 | required: true, | 
| 98 | 104 | component: 'Input', | 
| 105 | + componentProps: { | |
| 106 | + maxLength: 255, | |
| 107 | + }, | |
| 99 | 108 | }, | 
| 100 | 109 | { | 
| 101 | 110 | field: 'status', | 
| ... | ... | @@ -113,11 +122,17 @@ export const formSchema: FormSchema[] = [ | 
| 113 | 122 | label: '备注', | 
| 114 | 123 | field: 'remark', | 
| 115 | 124 | component: 'InputTextArea', | 
| 125 | + componentProps: { | |
| 126 | + maxLength: 255, | |
| 127 | + }, | |
| 116 | 128 | }, | 
| 117 | 129 | { | 
| 118 | 130 | label: ' ', | 
| 119 | 131 | field: 'menu', | 
| 120 | 132 | slot: 'menu', | 
| 121 | 133 | component: 'Input', | 
| 134 | + componentProps: { | |
| 135 | + maxLength: 255, | |
| 136 | + }, | |
| 122 | 137 | }, | 
| 123 | 138 | ]; | ... | ... | 
| ... | ... | @@ -49,6 +49,7 @@ export const formSchema: FormSchema[] = [ | 
| 49 | 49 | required: true, | 
| 50 | 50 | component: 'Input', | 
| 51 | 51 | componentProps: { | 
| 52 | + maxLength: 255, | |
| 52 | 53 | placeholder: '名称', | 
| 53 | 54 | }, | 
| 54 | 55 | }, | 
| ... | ... | @@ -70,6 +71,7 @@ export const formSchema: FormSchema[] = [ | 
| 70 | 71 | colProps: { span: 24 }, | 
| 71 | 72 | component: 'InputTextArea', | 
| 72 | 73 | componentProps: { | 
| 74 | + maxLength: 0, | |
| 73 | 75 | placeholder: '请输入说明', | 
| 74 | 76 | }, | 
| 75 | 77 | }, | ... | ... | 
| 1 | 1 | import { FormSchema } from '/@/components/Table'; | 
| 2 | -// import { numberRule } from '/@/utils/rules'; | |
| 2 | +import { numberRule } from '/@/utils/rules'; | |
| 3 | 3 | |
| 4 | 4 | export const formSchema: FormSchema[] = [ | 
| 5 | 5 | { | 
| ... | ... | @@ -23,6 +23,7 @@ export const formSchema: FormSchema[] = [ | 
| 23 | 23 | componentProps: { | 
| 24 | 24 | placeholder: '请输入最大设备数(请输入数字)', | 
| 25 | 25 | }, | 
| 26 | + rules: numberRule, | |
| 26 | 27 | }, | 
| 27 | 28 | { | 
| 28 | 29 | field: 'maxAssets', | 
| ... | ... | @@ -34,6 +35,7 @@ export const formSchema: FormSchema[] = [ | 
| 34 | 35 | componentProps: { | 
| 35 | 36 | placeholder: '请输入最大资产(请输入数字)', | 
| 36 | 37 | }, | 
| 38 | + rules: numberRule, | |
| 37 | 39 | }, | 
| 38 | 40 | { | 
| 39 | 41 | field: 'maxCustomers', | 
| ... | ... | @@ -45,6 +47,7 @@ export const formSchema: FormSchema[] = [ | 
| 45 | 47 | componentProps: { | 
| 46 | 48 | placeholder: '请输入最大客户数(请输入数字)', | 
| 47 | 49 | }, | 
| 50 | + rules: numberRule, | |
| 48 | 51 | }, | 
| 49 | 52 | { | 
| 50 | 53 | field: 'maxUsers', | 
| ... | ... | @@ -56,6 +59,7 @@ export const formSchema: FormSchema[] = [ | 
| 56 | 59 | componentProps: { | 
| 57 | 60 | placeholder: '请输入最大用户数(请输入数字)', | 
| 58 | 61 | }, | 
| 62 | + rules: numberRule, | |
| 59 | 63 | }, | 
| 60 | 64 | { | 
| 61 | 65 | field: 'maxDashboards', | 
| ... | ... | @@ -67,6 +71,7 @@ export const formSchema: FormSchema[] = [ | 
| 67 | 71 | componentProps: { | 
| 68 | 72 | placeholder: '请输入仪表板的最大数量(请输入数字)', | 
| 69 | 73 | }, | 
| 74 | + rules: numberRule, | |
| 70 | 75 | }, | 
| 71 | 76 | { | 
| 72 | 77 | field: 'maxRuleChains', | 
| ... | ... | @@ -78,6 +83,7 @@ export const formSchema: FormSchema[] = [ | 
| 78 | 83 | componentProps: { | 
| 79 | 84 | placeholder: '请输入最大规则链数(请输入数字)', | 
| 80 | 85 | }, | 
| 86 | + rules: numberRule, | |
| 81 | 87 | }, | 
| 82 | 88 | { | 
| 83 | 89 | field: 'maxResourcesInBytes', | 
| ... | ... | @@ -89,6 +95,7 @@ export const formSchema: FormSchema[] = [ | 
| 89 | 95 | componentProps: { | 
| 90 | 96 | placeholder: '请输入(请输入数字)', | 
| 91 | 97 | }, | 
| 98 | + rules: numberRule, | |
| 92 | 99 | }, | 
| 93 | 100 | { | 
| 94 | 101 | field: 'maxOtaPackagesInBytes', | 
| ... | ... | @@ -100,6 +107,7 @@ export const formSchema: FormSchema[] = [ | 
| 100 | 107 | componentProps: { | 
| 101 | 108 | placeholder: '请输入(请输入数字)', | 
| 102 | 109 | }, | 
| 110 | + rules: numberRule, | |
| 103 | 111 | }, | 
| 104 | 112 | { | 
| 105 | 113 | field: 'maxTransportMessages', | 
| ... | ... | @@ -111,6 +119,7 @@ export const formSchema: FormSchema[] = [ | 
| 111 | 119 | componentProps: { | 
| 112 | 120 | placeholder: '请输入最大传输消息数(请输入数字)', | 
| 113 | 121 | }, | 
| 122 | + rules: numberRule, | |
| 114 | 123 | }, | 
| 115 | 124 | { | 
| 116 | 125 | field: 'maxTransportDataPoints', | 
| ... | ... | @@ -122,6 +131,7 @@ export const formSchema: FormSchema[] = [ | 
| 122 | 131 | componentProps: { | 
| 123 | 132 | placeholder: '请输入传输数据点的最大数量(请输入数字)', | 
| 124 | 133 | }, | 
| 134 | + rules: numberRule, | |
| 125 | 135 | }, | 
| 126 | 136 | { | 
| 127 | 137 | field: 'maxREExecutions', | ... | ... |