From 532c82afe68c21201c4671352660a2d6e8b81dc0 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Sat, 25 Mar 2023 15:56:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug#10905=E3=80=8110895=E3=80=8110912?= =?UTF-8?q?=E3=80=8110926=E3=80=8110927=E3=80=8110886?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/Apply/Save/components/EditForm.vue | 51 ++++++++++++------- src/views/system/Apply/Save/typing.d.ts | 2 +- src/views/system/Apply/index.vue | 4 +- 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/src/views/system/Apply/Save/components/EditForm.vue b/src/views/system/Apply/Save/components/EditForm.vue index b4b8054d..b07d7c33 100644 --- a/src/views/system/Apply/Save/components/EditForm.vue +++ b/src/views/system/Apply/Save/components/EditForm.vue @@ -103,15 +103,10 @@ - + @@ -440,7 +435,7 @@ :rules="[ { required: true, - message: '请选择认证方式', + message: '请选择请求方式', }, ]" > @@ -449,6 +444,7 @@ form.data.apiClient.authConfig.oauth2 .tokenRequestType " + placeholder="请选择请求方式" > 请求体 @@ -470,7 +466,7 @@ :rules="[ { required: true, - message: '该字段是必填字段', + message: '请输入client_id', }, { max: 64, @@ -504,7 +500,7 @@ :rules="[ { required: true, - message: '该字段是必填字段', + message: '请输入client_secret', }, { max: 64, @@ -864,7 +860,7 @@ :rules="[ { required: true, - message: '该字段是必填字段', + message: '请选择认证方式', }, ]" > @@ -991,7 +987,7 @@ :rules="[ { required: true, - message: '该字段是必填字段', + message: '请输入授权地址', }, ]" > @@ -1024,7 +1020,7 @@ :rules="[ { required: true, - message: '该字段是必填字段', + message: '请输入token地址', }, ]" > @@ -1045,7 +1041,7 @@ @@ -1117,7 +1114,7 @@ :rules="[ { required: true, - message: '请输入该字段是必填字段用户ID', + message: '请输入用户ID', }, ]" > @@ -1148,7 +1145,7 @@ :rules="[ { required: true, - message: '该字段是必填字段', + message: '请输入用户名', }, ]" > @@ -1353,7 +1350,7 @@ v-model:value="form.data.sso.roleIdList" mode="multiple" :options="form.roleIdList" - placeholder="请选中角色" + placeholder="请选择角色" > { if (!n.includes(key)) form.errorNumInfo[key].clear(); }); + + form.integrationModesISO = [...n]; }, ); } @@ -1839,6 +1838,20 @@ function getErrorNum( } else if (!set.has(key)) set.add(key); } } + +const imageTypes = ref(['image/jpg', 'image/png']); +const beforeLogoUpload = (file: any) => { + const isType: any = imageTypes.value.includes(file.type); + if (!isType) { + message.error(`请上传.jpg.png格式的图片`); + return false; + } + const isSize = file.size / 1024 / 1024 < 4; + if (!isSize) { + message.error(`图片大小必须小于${4}M`); + } + return isType && isSize; +}; function changeBackUpload(info: UploadChangeParam>) { if (info.file.status === 'uploading') { form.uploadLoading = true; diff --git a/src/views/system/Apply/Save/typing.d.ts b/src/views/system/Apply/Save/typing.d.ts index 4eba2e71..ec9644f4 100644 --- a/src/views/system/Apply/Save/typing.d.ts +++ b/src/views/system/Apply/Save/typing.d.ts @@ -45,7 +45,7 @@ export type formType = { clientSecret: string, // 客户端密钥 grantType: 'authorization_code' | 'client_credentials' | '', // 类型 accessTokenProperty: string, // token属性名 - tokenRequestType: 'POST_URI' | 'POST_BODY' | '' // token请求方式, 可选值:POST_URI,POST_BODY + tokenRequestType: 'POST_URI' | 'POST_BODY' | '' | undefined // token请求方式, 可选值:POST_URI,POST_BODY } } }, diff --git a/src/views/system/Apply/index.vue b/src/views/system/Apply/index.vue index a655c16c..9d745756 100644 --- a/src/views/system/Apply/index.vue +++ b/src/views/system/Apply/index.vue @@ -54,7 +54,9 @@