fix(个人信息): 三方平台信息校验

--user=郭雨琦 修复三方平台信息为输入也能校验成功
This commit is contained in:
guoyuqi 2021-11-30 16:45:34 +08:00 committed by xiaomeinvG
parent c0f2e68cfb
commit a4e3f6bdc8
1 changed files with 24 additions and 2 deletions

View File

@ -89,6 +89,30 @@
},
handleAuth(type) {
let param = {...this.currentPlatformInfo};
debugger
if(type==='Jira'){
if(!param.jiraAccount){
this.$error(this.$t('organization.integration.input_api_account'));
return
}else if(!param.jiraPassword){
this.$error(this.$t('organization.integration.input_api_password'));
return
}
}else if(type==='Zentao'){
if(!param.zentaoUserName){
this.$error(this.$t('organization.integration.input_api_account'));
return
}else if(!param.zentaoPassword){
this.$error(this.$t('organization.integration.input_api_password'));
return
}
}else if(type==='AzureDevops'){
if(!param.azureDevopsPat){
this.$error(this.$t('organization.integration.input_azure_pat'));
return
}
}
param.workspaceId = getCurrentWorkspaceId();
param.platform = type;
this.$parent.result = this.$post("issues/user/auth", param, () => {
@ -134,8 +158,6 @@
console.log(this.$refs.personFrom)
//this.form.id = this.$refs.personFrom.form.id
}
console.log("this.form")
console.log(this.form)
Object.assign(param, this.form);
param.platformInfo = JSON.stringify(this.form.platformInfo);
this.result = this.$post(this.updatePath, param, response => {