fix(系统设置): 修复缺陷管理平台页面保存数据后密码显示明文的问题

Closes #347
This commit is contained in:
shiziyuan9527 2021-02-18 15:52:31 +08:00
parent c7046993e5
commit 9f74130dc8
4 changed files with 31 additions and 3 deletions

View File

@ -51,6 +51,7 @@ export default {
this.showCancel = false; this.showCancel = false;
this.showSave = false; this.showSave = false;
this.$emit("update:show", true); this.$emit("update:show", true);
this.$emit("reloadPassInput");
this.init(); this.init();
}, },
init() { init() {

View File

@ -7,7 +7,7 @@
<el-input v-model="form.account" :placeholder="$t('organization.integration.input_api_account')"/> <el-input v-model="form.account" :placeholder="$t('organization.integration.input_api_account')"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('organization.integration.password')" prop="password"> <el-form-item :label="$t('organization.integration.password')" prop="password">
<el-input v-model="form.password" auto-complete="new-password" <el-input v-model="form.password" auto-complete="new-password" v-if="showInput"
:placeholder="$t('organization.integration.input_api_password')" show-password/> :placeholder="$t('organization.integration.input_api_password')" show-password/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('organization.integration.jira_url')" prop="url"> <el-form-item :label="$t('organization.integration.jira_url')" prop="url">
@ -23,6 +23,7 @@
@init="init" @init="init"
@testConnection="testConnection" @testConnection="testConnection"
@cancelIntegration="cancelIntegration" @cancelIntegration="cancelIntegration"
@reloadPassInput="reloadPassInput"
:form="form" :form="form"
:show.sync="show" :show.sync="show"
ref="bugBtn"/> ref="bugBtn"/>
@ -56,6 +57,7 @@ export default {
data() { data() {
return { return {
show: true, show: true,
showInput: true,
form: {}, form: {},
rules: { rules: {
account: { account: {
@ -123,6 +125,7 @@ export default {
this.$refs.bugBtn.showEdit = true; this.$refs.bugBtn.showEdit = true;
this.$refs.bugBtn.showSave = false; this.$refs.bugBtn.showSave = false;
this.$refs.bugBtn.showCancel = false; this.$refs.bugBtn.showCancel = false;
this.reloadPassInput();
this.init(); this.init();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });
@ -170,6 +173,12 @@ export default {
} else { } else {
this.$warning(this.$t('organization.integration.not_integrated')); this.$warning(this.$t('organization.integration.not_integrated'));
} }
},
reloadPassInput() {
this.showInput = false;
this.$nextTick(function () {
this.showInput = true;
});
} }
} }
} }

View File

@ -7,7 +7,7 @@
<el-input v-model="form.account" :placeholder="$t('organization.integration.input_api_account')"/> <el-input v-model="form.account" :placeholder="$t('organization.integration.input_api_account')"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('organization.integration.api_password')" prop="password"> <el-form-item :label="$t('organization.integration.api_password')" prop="password">
<el-input v-model="form.password" auto-complete="new-password" <el-input v-model="form.password" auto-complete="new-password" v-if="showInput"
:placeholder="$t('organization.integration.input_api_password')" show-password/> :placeholder="$t('organization.integration.input_api_password')" show-password/>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -17,6 +17,7 @@
@init="init" @init="init"
@testConnection="testConnection" @testConnection="testConnection"
@cancelIntegration="cancelIntegration" @cancelIntegration="cancelIntegration"
@reloadPassInput="reloadPassInput"
:form="form" :form="form"
:show.sync="show" :show.sync="show"
ref="bugBtn"/> ref="bugBtn"/>
@ -52,6 +53,7 @@ export default {
data() { data() {
return { return {
show: true, show: true,
showInput: true,
form: {}, form: {},
rules: { rules: {
account: { account: {
@ -103,6 +105,7 @@ export default {
this.$refs.bugBtn.showEdit = true; this.$refs.bugBtn.showEdit = true;
this.$refs.bugBtn.showSave = false; this.$refs.bugBtn.showSave = false;
this.$refs.bugBtn.showCancel = false; this.$refs.bugBtn.showCancel = false;
this.reloadPassInput();
this.init(); this.init();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });
@ -148,6 +151,12 @@ export default {
} else { } else {
this.$warning(this.$t('organization.integration.not_integrated')); this.$warning(this.$t('organization.integration.not_integrated'));
} }
},
reloadPassInput() {
this.showInput = false;
this.$nextTick(function () {
this.showInput = true;
});
} }
} }
} }

View File

@ -7,7 +7,7 @@
<el-input v-model="form.account" :placeholder="$t('organization.integration.input_api_account')"/> <el-input v-model="form.account" :placeholder="$t('organization.integration.input_api_account')"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('organization.integration.password')" prop="password"> <el-form-item :label="$t('organization.integration.password')" prop="password">
<el-input v-model="form.password" auto-complete="new-password" <el-input v-model="form.password" auto-complete="new-password" v-if="showInput"
:placeholder="$t('organization.integration.input_api_password')" show-password/> :placeholder="$t('organization.integration.input_api_password')" show-password/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('organization.integration.zentao_url')" prop="url"> <el-form-item :label="$t('organization.integration.zentao_url')" prop="url">
@ -20,6 +20,7 @@
@init="init" @init="init"
@testConnection="testConnection" @testConnection="testConnection"
@cancelIntegration="cancelIntegration" @cancelIntegration="cancelIntegration"
@reloadPassInput="reloadPassInput"
:form="form" :form="form"
:show.sync="show" :show.sync="show"
ref="bugBtn"/> ref="bugBtn"/>
@ -55,6 +56,7 @@ export default {
data() { data() {
return { return {
show: true, show: true,
showInput: true,
form: {}, form: {},
rules: { rules: {
account: { account: {
@ -99,6 +101,7 @@ export default {
this.$refs.bugBtn.showEdit = true; this.$refs.bugBtn.showEdit = true;
this.$refs.bugBtn.showSave = false; this.$refs.bugBtn.showSave = false;
this.$refs.bugBtn.showCancel = false; this.$refs.bugBtn.showCancel = false;
this.reloadPassInput();
this.init(); this.init();
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
}); });
@ -168,6 +171,12 @@ export default {
} else { } else {
this.$warning(this.$t('organization.integration.not_integrated')); this.$warning(this.$t('organization.integration.not_integrated'));
} }
},
reloadPassInput() {
this.showInput = false;
this.$nextTick(function () {
this.showInput = true;
});
} }
} }
} }