Commit 4e14c2ead2a3d11971d051d2505eb67c7be563ba
Merge branch 'ft' into 'main'
feat:新增ssl为默认和clean session为true和mqtt编辑回显用户名和密码 See merge request huang/yun-teng-iot-front!165
Showing
3 changed files
with
31 additions
and
22 deletions
| @@ -23,27 +23,29 @@ | @@ -23,27 +23,29 @@ | ||
| 23 | > | 23 | > |
| 24 | <div class="change-avatar" style="text-align: center"> | 24 | <div class="change-avatar" style="text-align: center"> |
| 25 | <div class="mb-2" style="font-weight: 700">个人头像</div> | 25 | <div class="mb-2" style="font-weight: 700">个人头像</div> |
| 26 | - <Upload | ||
| 27 | - style="width: 20vw" | ||
| 28 | - name="avatar" | ||
| 29 | - list-type="picture-card" | ||
| 30 | - class="avatar-uploader" | ||
| 31 | - :show-upload-list="false" | ||
| 32 | - :customRequest="customUploadqrcodePic" | ||
| 33 | - :before-upload="beforeUploadqrcodePic" | ||
| 34 | - > | ||
| 35 | - <img | ||
| 36 | - style="text-align: center; border-radius: 50%; width: 8.5vw; height: 15.2vh" | ||
| 37 | - v-if="peresonalPic" | ||
| 38 | - :src="peresonalPic" | ||
| 39 | - alt="avatar" | ||
| 40 | - /> | ||
| 41 | - <div v-else> | ||
| 42 | - <div style="margin-top: 5.2vh; margin-left: 3.35vw"> | ||
| 43 | - <PlusOutlined style="font-size: 30px" /> | 26 | + <div style="text-align: center; width: 100%"> |
| 27 | + <Upload | ||
| 28 | + style="width: 20vw" | ||
| 29 | + name="avatar" | ||
| 30 | + list-type="picture-card" | ||
| 31 | + class="avatar-uploader" | ||
| 32 | + :show-upload-list="false" | ||
| 33 | + :customRequest="customUploadqrcodePic" | ||
| 34 | + :before-upload="beforeUploadqrcodePic" | ||
| 35 | + > | ||
| 36 | + <img | ||
| 37 | + style="text-align: center; border-radius: 50%; width: 8.5vw; height: 15.2vh" | ||
| 38 | + v-if="peresonalPic" | ||
| 39 | + :src="peresonalPic" | ||
| 40 | + alt="avatar" | ||
| 41 | + /> | ||
| 42 | + <div v-else> | ||
| 43 | + <div style="margin-top: 5.2vh; margin-left: 3.35vw"> | ||
| 44 | + <PlusOutlined style="font-size: 30px" /> | ||
| 45 | + </div> | ||
| 44 | </div> | 46 | </div> |
| 45 | - </div> | ||
| 46 | - </Upload> | 47 | + </Upload> |
| 48 | + </div> | ||
| 47 | </div> | 49 | </div> |
| 48 | <Description | 50 | <Description |
| 49 | class="mt-8" | 51 | class="mt-8" |
| @@ -246,8 +248,8 @@ | @@ -246,8 +248,8 @@ | ||
| 246 | float: none; | 248 | float: none; |
| 247 | width: 8.6vw; | 249 | width: 8.6vw; |
| 248 | height: 17vh; | 250 | height: 17vh; |
| 249 | - margin-right: 8px; | ||
| 250 | - margin-bottom: 8px; | 251 | + margin-right: 0.2vw; |
| 252 | + margin-bottom: 0.2vw; | ||
| 251 | text-align: center; | 253 | text-align: center; |
| 252 | vertical-align: top; | 254 | vertical-align: top; |
| 253 | background-color: #fafafa; | 255 | background-color: #fafafa; |
| @@ -363,6 +363,7 @@ export const modeMqttForm: FormSchema[] = [ | @@ -363,6 +363,7 @@ export const modeMqttForm: FormSchema[] = [ | ||
| 363 | field: 'cleanSession', | 363 | field: 'cleanSession', |
| 364 | label: 'Clean', | 364 | label: 'Clean', |
| 365 | colProps: { span: 12 }, | 365 | colProps: { span: 12 }, |
| 366 | + defaultValue: true, | ||
| 366 | component: 'Checkbox', | 367 | component: 'Checkbox', |
| 367 | renderComponentContent: 'Clean session', | 368 | renderComponentContent: 'Clean session', |
| 368 | }, | 369 | }, |
| @@ -370,6 +371,7 @@ export const modeMqttForm: FormSchema[] = [ | @@ -370,6 +371,7 @@ export const modeMqttForm: FormSchema[] = [ | ||
| 370 | field: 'ssl', | 371 | field: 'ssl', |
| 371 | label: 'Enable', | 372 | label: 'Enable', |
| 372 | colProps: { span: 12 }, | 373 | colProps: { span: 12 }, |
| 374 | + defaultValue: false, | ||
| 373 | component: 'Checkbox', | 375 | component: 'Checkbox', |
| 374 | renderComponentContent: 'Enable SSL', | 376 | renderComponentContent: 'Enable SSL', |
| 375 | }, | 377 | }, |
| @@ -108,6 +108,11 @@ | @@ -108,6 +108,11 @@ | ||
| 108 | setFieldsValue({ | 108 | setFieldsValue({ |
| 109 | name: v1, | 109 | name: v1, |
| 110 | }); | 110 | }); |
| 111 | + setFieldsValue({ | ||
| 112 | + password: v.credentials.password, | ||
| 113 | + type: v.credentials.type, | ||
| 114 | + username: v.credentials.username, | ||
| 115 | + }); | ||
| 111 | }; | 116 | }; |
| 112 | const customClearStepTwoValueFunc = async () => { | 117 | const customClearStepTwoValueFunc = async () => { |
| 113 | defineClearFunc(); | 118 | defineClearFunc(); |