Showing
6 changed files
with
19 additions
and
2 deletions
@@ -154,6 +154,7 @@ export const formSchema: QFormSchema[] = [ | @@ -154,6 +154,7 @@ export const formSchema: QFormSchema[] = [ | ||
154 | return values.accessMode === AccessMode.ManuallyEnter; | 154 | return values.accessMode === AccessMode.ManuallyEnter; |
155 | }, | 155 | }, |
156 | componentProps: { | 156 | componentProps: { |
157 | + maxLength: 36, | ||
157 | placeholder: '请输入视频厂家', | 158 | placeholder: '请输入视频厂家', |
158 | }, | 159 | }, |
159 | }, | 160 | }, |
@@ -167,6 +168,7 @@ export const formSchema: QFormSchema[] = [ | @@ -167,6 +168,7 @@ export const formSchema: QFormSchema[] = [ | ||
167 | return values.accessMode === AccessMode.ManuallyEnter; | 168 | return values.accessMode === AccessMode.ManuallyEnter; |
168 | }, | 169 | }, |
169 | componentProps: { | 170 | componentProps: { |
171 | + maxLength: 36, | ||
170 | placeholder: '请输入摄像头编号', | 172 | placeholder: '请输入摄像头编号', |
171 | }, | 173 | }, |
172 | }, | 174 | }, |
@@ -101,6 +101,7 @@ export const formDetailSchema: FormSchema[] = [ | @@ -101,6 +101,7 @@ export const formDetailSchema: FormSchema[] = [ | ||
101 | helpMessage: ['平台IP + 端口'], | 101 | helpMessage: ['平台IP + 端口'], |
102 | rules: [{ required: true, message: '平台地址为必填项' }], | 102 | rules: [{ required: true, message: '平台地址为必填项' }], |
103 | componentProps: { | 103 | componentProps: { |
104 | + maxLength: 36, | ||
104 | placeholder: '请输入平台地址', | 105 | placeholder: '请输入平台地址', |
105 | }, | 106 | }, |
106 | }, | 107 | }, |
@@ -110,6 +111,7 @@ export const formDetailSchema: FormSchema[] = [ | @@ -110,6 +111,7 @@ export const formDetailSchema: FormSchema[] = [ | ||
110 | component: 'Input', | 111 | component: 'Input', |
111 | rules: [{ required: true, message: '用户Key为必填项' }], | 112 | rules: [{ required: true, message: '用户Key为必填项' }], |
112 | componentProps: { | 113 | componentProps: { |
114 | + maxLength: 36, | ||
113 | placeholder: '请输入用户Key', | 115 | placeholder: '请输入用户Key', |
114 | }, | 116 | }, |
115 | }, | 117 | }, |
@@ -122,6 +124,7 @@ export const formDetailSchema: FormSchema[] = [ | @@ -122,6 +124,7 @@ export const formDetailSchema: FormSchema[] = [ | ||
122 | { required: true, min: 20, message: '用户密钥不能少于20位字符' }, | 124 | { required: true, min: 20, message: '用户密钥不能少于20位字符' }, |
123 | ], | 125 | ], |
124 | componentProps: { | 126 | componentProps: { |
127 | + maxLength: 36, | ||
125 | placeholder: '请输入用户密钥', | 128 | placeholder: '请输入用户密钥', |
126 | }, | 129 | }, |
127 | }, | 130 | }, |
@@ -59,6 +59,7 @@ export const formSchema: FormSchema[] = [ | @@ -59,6 +59,7 @@ export const formSchema: FormSchema[] = [ | ||
59 | const { setFieldsValue } = formActionType; | 59 | const { setFieldsValue } = formActionType; |
60 | return { | 60 | return { |
61 | placeholder: '请输入标题', | 61 | placeholder: '请输入标题', |
62 | + maxLength: 36, | ||
62 | onChange: (value: Event) => { | 63 | onChange: (value: Event) => { |
63 | setFieldsValue({ | 64 | setFieldsValue({ |
64 | [PackageField.VERSION_TAG]: getVersionTag( | 65 | [PackageField.VERSION_TAG]: getVersionTag( |
@@ -79,6 +80,7 @@ export const formSchema: FormSchema[] = [ | @@ -79,6 +80,7 @@ export const formSchema: FormSchema[] = [ | ||
79 | const { setFieldsValue } = formActionType; | 80 | const { setFieldsValue } = formActionType; |
80 | return { | 81 | return { |
81 | placeholder: '请输入版本', | 82 | placeholder: '请输入版本', |
83 | + maxLength: 36, | ||
82 | onChange: (value: Event) => { | 84 | onChange: (value: Event) => { |
83 | setFieldsValue({ | 85 | setFieldsValue({ |
84 | [PackageField.VERSION_TAG]: getVersionTag( | 86 | [PackageField.VERSION_TAG]: getVersionTag( |
@@ -97,6 +99,7 @@ export const formSchema: FormSchema[] = [ | @@ -97,6 +99,7 @@ export const formSchema: FormSchema[] = [ | ||
97 | helpMessage: ['自定义标签应与您设备报告的软件包版本相匹配'], | 99 | helpMessage: ['自定义标签应与您设备报告的软件包版本相匹配'], |
98 | componentProps: () => { | 100 | componentProps: () => { |
99 | return { | 101 | return { |
102 | + maxLength: 36, | ||
100 | placeholder: '请输入版本标签', | 103 | placeholder: '请输入版本标签', |
101 | }; | 104 | }; |
102 | }, | 105 | }, |
@@ -191,6 +194,7 @@ export const formSchema: FormSchema[] = [ | @@ -191,6 +194,7 @@ export const formSchema: FormSchema[] = [ | ||
191 | }, | 194 | }, |
192 | rules: [{ required: true, message: '外部URL为必填项' }], | 195 | rules: [{ required: true, message: '外部URL为必填项' }], |
193 | componentProps: { | 196 | componentProps: { |
197 | + maxLength: 36, | ||
194 | placeholder: '请输入外部URL', | 198 | placeholder: '请输入外部URL', |
195 | }, | 199 | }, |
196 | }, | 200 | }, |
@@ -238,6 +242,7 @@ export const formSchema: FormSchema[] = [ | @@ -238,6 +242,7 @@ export const formSchema: FormSchema[] = [ | ||
238 | }, | 242 | }, |
239 | helpMessage: ['如果校验和为空,会自动生成'], | 243 | helpMessage: ['如果校验和为空,会自动生成'], |
240 | componentProps: { | 244 | componentProps: { |
245 | + maxLength: 36, | ||
241 | placeholder: '请输入校验和', | 246 | placeholder: '请输入校验和', |
242 | }, | 247 | }, |
243 | }, | 248 | }, |
@@ -246,6 +251,7 @@ export const formSchema: FormSchema[] = [ | @@ -246,6 +251,7 @@ export const formSchema: FormSchema[] = [ | ||
246 | label: '描述', | 251 | label: '描述', |
247 | component: 'InputTextArea', | 252 | component: 'InputTextArea', |
248 | componentProps: { | 253 | componentProps: { |
254 | + maxLength: 255, | ||
249 | placeholder: '请输入描述', | 255 | placeholder: '请输入描述', |
250 | }, | 256 | }, |
251 | }, | 257 | }, |
@@ -147,7 +147,7 @@ export const formSchema: QFormSchema[] = [ | @@ -147,7 +147,7 @@ export const formSchema: QFormSchema[] = [ | ||
147 | required: true, | 147 | required: true, |
148 | component: 'Input', | 148 | component: 'Input', |
149 | componentProps: { | 149 | componentProps: { |
150 | - maxLength: 255, | 150 | + maxLength: 64, |
151 | placeholder: '请输入报表名称', | 151 | placeholder: '请输入报表名称', |
152 | }, | 152 | }, |
153 | }, | 153 | }, |
@@ -59,7 +59,7 @@ export const formSchema: FormSchema[] = [ | @@ -59,7 +59,7 @@ export const formSchema: FormSchema[] = [ | ||
59 | required: true, | 59 | required: true, |
60 | component: 'Input', | 60 | component: 'Input', |
61 | componentProps: { | 61 | componentProps: { |
62 | - maxLength: 36, | 62 | + maxLength: 32, |
63 | placeholder: '请输入名称', | 63 | placeholder: '请输入名称', |
64 | }, | 64 | }, |
65 | }, | 65 | }, |
@@ -65,12 +65,14 @@ | @@ -65,12 +65,14 @@ | ||
65 | v-if="ifAdd" | 65 | v-if="ifAdd" |
66 | v-model:value="scriptForm.description" | 66 | v-model:value="scriptForm.description" |
67 | placeholder="请输入备注" | 67 | placeholder="请输入备注" |
68 | + :maxlength="255" | ||
68 | /> | 69 | /> |
69 | <a-textarea | 70 | <a-textarea |
70 | :rows="3" | 71 | :rows="3" |
71 | v-else | 72 | v-else |
72 | v-model:value="scriptForm.output" | 73 | v-model:value="scriptForm.output" |
73 | placeholder="输出参数为服务端返回的内容" | 74 | placeholder="输出参数为服务端返回的内容" |
75 | + :maxlength="255" | ||
74 | /> | 76 | /> |
75 | </a-form-item> | 77 | </a-form-item> |
76 | </a-form> | 78 | </a-form> |
@@ -184,6 +186,10 @@ | @@ -184,6 +186,10 @@ | ||
184 | const trimParams = scriptForm.params.replace(/\s*/g, ''); | 186 | const trimParams = scriptForm.params.replace(/\s*/g, ''); |
185 | Reflect.set(value, 'params', trimParams); | 187 | Reflect.set(value, 'params', trimParams); |
186 | } | 188 | } |
189 | + if (scriptForm.convertJs.length > 1000) { | ||
190 | + createMessage.error('脚本内容长度不能大于1000'); | ||
191 | + throw '脚本内容长度不能大于1000'; | ||
192 | + } | ||
187 | return { | 193 | return { |
188 | ...value, | 194 | ...value, |
189 | ...{ convertJs: props.ifAdd ? scriptForm.convertJs : null }, | 195 | ...{ convertJs: props.ifAdd ? scriptForm.convertJs : null }, |