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