fix: bug#10909、10912

This commit is contained in:
JiangQiming 2023-03-27 15:44:48 +08:00
parent d58bef5897
commit 9594893a50
1 changed files with 19 additions and 31 deletions

View File

@ -540,7 +540,7 @@
:rules="[ :rules="[
{ {
required: true, required: true,
message: '该字段是必填字段', message: '请输入用户名',
}, },
{ {
max: 64, max: 64,
@ -567,7 +567,7 @@
:rules="[ :rules="[
{ {
required: true, required: true,
message: '该字段是必填字段', message: '请输入密码',
}, },
{ {
max: 64, max: 64,
@ -1197,12 +1197,7 @@
<j-form-item <j-form-item
v-if="form.data.provider !== 'dingtalk-ent-app'" v-if="form.data.provider !== 'dingtalk-ent-app'"
class="resetLabel" class="resetLabel"
:name="[ :name="['sso', 'configuration', 'appId']"
'sso',
'configuration',
'oauth2',
'clientId',
]"
:rules="[ :rules="[
{ {
required: true, required: true,
@ -1223,7 +1218,7 @@
</template> </template>
<j-input <j-input
v-model:value=" v-model:value="
form.data.sso.configuration.oauth2.clientId form.data.sso.configuration.appId
" "
placeholder="请输入appId" placeholder="请输入appId"
/> />
@ -1232,12 +1227,7 @@
<j-form-item <j-form-item
v-if="form.data.provider !== 'wechat-webapp'" v-if="form.data.provider !== 'wechat-webapp'"
class="resetLabel" class="resetLabel"
:name="[ :name="['sso', 'configuration', 'appKey']"
'sso',
'configuration',
'oauth2',
'clientSecret',
]"
:rules="[ :rules="[
{ {
required: true, required: true,
@ -1258,8 +1248,7 @@
</template> </template>
<j-input <j-input
v-model:value=" v-model:value="
form.data.sso.configuration.oauth2 form.data.sso.configuration.appKey
.clientSecret
" "
placeholder="请输入appKey" placeholder="请输入appKey"
/> />
@ -1701,18 +1690,19 @@ function init() {
function getInfo(id: string) { function getInfo(id: string) {
getAppInfo_api(id).then((resp: any) => { getAppInfo_api(id).then((resp: any) => {
// headersparameters, keylabel // headersparameters, keylabel
resp.result.apiClient.headers = resp.result.apiClient.headers.map( if (resp.result.apiClient) {
(m: any) => ({ resp.result.apiClient.headers = resp.result.apiClient.headers.map(
...m, (m: any) => ({
label: m.key, ...m,
}), label: m.key,
); }),
resp.result.apiClient.parameters = resp.result.apiClient.parameters.map( );
(m: any) => ({ resp.result.apiClient.parameters =
...m, resp.result.apiClient.parameters.map((m: any) => ({
label: m.key, ...m,
}), label: m.key,
); }));
}
form.data = { form.data = {
...initForm, // , . : bug#10892 ...initForm, // , . : bug#10892
...resp.result, ...resp.result,
@ -1754,7 +1744,6 @@ function clickAddItem(data: string[], target: string) {
} }
// //
function clickSave() { function clickSave() {
console.log('headers: ', form.data.apiClient.headers);
formRef.value?.validate().then(() => { formRef.value?.validate().then(() => {
const params = cloneDeep(form.data); const params = cloneDeep(form.data);
// //
@ -1868,7 +1857,6 @@ function changeBackUpload(info: UploadChangeParam<UploadFile<any>>) {
form.uploadLoading = false; form.uploadLoading = false;
form.data.sso.configuration.oauth2.logoUrl = info.file.response?.result; form.data.sso.configuration.oauth2.logoUrl = info.file.response?.result;
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
console.log(info.file);
form.uploadLoading = false; form.uploadLoading = false;
message.error('logo上传失败请稍后再试'); message.error('logo上传失败请稍后再试');
} }