fix: 个人信息修改

This commit is contained in:
guoyuqi 2021-11-11 17:50:47 +08:00 committed by xiaomeinvG
parent 18fe04d67e
commit 8224963b7f
12 changed files with 76 additions and 25 deletions

View File

@ -2,8 +2,8 @@
<div>
<el-tabs v-model="activeIndex" >
<el-tab-pane v-for="menu in persons" :key = "menu.title" :name="menu.title" :label="$t(menu.title)" class="setting-item"></el-tab-pane>
<el-tab-pane name="change_password" label="修改密码" class="setting-item"></el-tab-pane>
<el-tab-pane name="third_account" label="第三方平台账号" class="setting-item"></el-tab-pane>
<el-tab-pane name="change_password" :label="$t('member.edit_password')" class="setting-item"></el-tab-pane>
<el-tab-pane name="third_account" :label="$t('commons.third_account')" class="setting-item"></el-tab-pane>
</el-tabs>
<ms-main-container>
<ms-person-from-setting v-if="activeIndex==='commons.personal_setting'" @getPlatformInfo = "getPlatformInfo" @cancel = "cancel"/>

View File

@ -15,7 +15,7 @@
</div>
</template>
<el-table border class="adjust-table" :data="tableData" style="width: 100%">
<el-table border class="adjust-table" :data="tableData" :key = "certinfoKey" style="width: 100%">
<el-table-column prop="accessKey" label="Access Key">
<template v-slot:default="scope">
<div class="variable-combine">
@ -31,8 +31,8 @@
</el-table-column>
<el-table-column prop="secretKey" label="Secret Key">
<template v-slot:default="scope">
<el-link type="primary" @click="showSecretKey(scope.row)" v-if="!apiKeysVisible">{{ $t('commons.show') }}</el-link>
<div v-if="apiKeysVisible" class="variable-combine">
<el-link type="primary" @click="showSecretKey(scope)" v-if="!scope.row.apiKeysVisible">{{ $t('commons.show') }}</el-link>
<div v-if="scope.row.apiKeysVisible" class="variable-combine">
<div class="variable">{{scope.row.secretKey}}</div>
<el-tooltip :content="$t('api_test.copied')" manual v-model="scope.row.visible2" placement="top"
:visible-arrow="false">
@ -96,6 +96,7 @@ export default {
condition: {},
tableData: [],
currentRow: {},
certinfoKey:false,
}
},
@ -110,7 +111,10 @@ export default {
search() {
this.result = this.$get("/user/key/info", response => {
this.tableData = response.data;
this.tableData.forEach(d => d.show = false);
this.tableData.forEach((d) => {
d.show = false;
d.apiKeysVisible = false;
})
}
)
},
@ -150,10 +154,16 @@ export default {
}
},
showSecretKey(row) {
this.apiKeysVisible = true;
setTimeout(() => {
this.apiKeysVisible = false;
}, 5000);
this.$nextTick(function () {
this.$set(this.tableData[row.$index], "apiKeysVisible", true) // => ''
})
this.certinfoKey = !this.certinfoKey;
setTimeout(() => {
this.$set(this.tableData[row.$index], "apiKeysVisible", false);
this.certinfoKey = !this.certinfoKey;
}, 5000);
},
copy(row, key, visible) {
let input = document.createElement("input");

View File

@ -1,5 +1,5 @@
<template>
<el-form label-position="right" label-width="100px" size="small">
<el-form label-position="right" label-width="110px" size="small">
<el-form-item :label="'Jira 信息'">
<ms-instructions-icon size="10" :content="'该信息为通过Jira提交缺陷的用户认证信息若未填写则使用工作空间中配置的默认信息'"/>
</el-form-item>

View File

@ -1,5 +1,5 @@
<template>
<el-form :model="ruleForm" :rules="rules" ref="editPasswordForm" label-width="100px" class="demo-ruleForm">
<el-form :model="ruleForm" :rules="rules" ref="editPasswordForm" label-width="120px" class="demo-ruleForm">
<el-form-item :label="$t('member.old_password')" prop="password" style="margin-bottom: 29px">
<el-input v-model="ruleForm.password" autocomplete="off" show-password/>
</el-form-item>

View File

@ -1,5 +1,5 @@
<template>
<el-form label-position="right" label-width="100px" size="small">
<el-form label-position="right" label-width="110px" size="small">
<el-form-item :label="'禅道信息'">
<ms-instructions-icon size="10" :content="'该信息为通过禅道提交缺陷的的用户名、密码,若未填写,则使用工作空间中配置的默认信息'"/>
</el-form-item>

View File

@ -56,9 +56,13 @@
</div>
<div>
3. {{ $t('organization.integration.use_tip_three') }}
<router-link :to="{name: 'PersonSetting', params: { open: true }}" style="margin-left: 5px">
<span style="margin-left: 5px;color: #551A8B; text-decoration: underline; cursor: pointer" @click="resVisible = true">
{{ $t('organization.integration.link_the_info_now') }}
</router-link>
</span>
<el-dialog :close-on-click-modal="false" width="80%"
:visible.sync="resVisible" destroy-on-close @close="closeDialog">
<ms-person-router @closeDialog = "closeDialog"/>
</el-dialog>
</div>
</div>
</div>
@ -69,10 +73,11 @@ import BugManageBtn from "@/business/components/settings/workspace/components/Bu
import {getCurrentUser, getCurrentWorkspaceId} from "@/common/js/utils";
import {AZURE_DEVOPS} from "@/common/js/constants";
import MsInstructionsIcon from "@/business/components/common/components/MsInstructionsIcon";
import MsPersonRouter from "@/business/components/settings/components/PersonRouter";
export default {
name: "AzureDevopsSetting",
components: {MsInstructionsIcon, BugManageBtn},
components: {MsInstructionsIcon, BugManageBtn,MsPersonRouter},
created() {
this.init();
},
@ -80,6 +85,7 @@ export default {
return {
show: true,
showInput: true,
resVisible:false,
form: {},
rules: {
pat: {
@ -211,6 +217,9 @@ export default {
this.$nextTick(function () {
this.showInput = true;
});
},
closeDialog(){
this.resVisible = false;
}
}
};

View File

@ -55,9 +55,13 @@
</div>
<div>
3. {{ $t('organization.integration.use_tip_three') }}
<router-link :to="{name: 'PersonSetting', params: { open: true }}" style="margin-left: 5px">
<span style="margin-left: 5px;color: #551A8B; text-decoration: underline; cursor: pointer" @click="resVisible = true">
{{ $t('organization.integration.link_the_info_now') }}
</router-link>
</span>
<el-dialog :close-on-click-modal="false" width="80%"
:visible.sync="resVisible" destroy-on-close @close="closeDialog">
<ms-person-router @closeDialog = "closeDialog"/>
</el-dialog>
</div>
</div>
</div>
@ -68,10 +72,11 @@ import BugManageBtn from "@/business/components/settings/workspace/components/Bu
import {getCurrentUser, getCurrentWorkspaceId} from "@/common/js/utils";
import {JIRA} from "@/common/js/constants";
import MsInstructionsIcon from "@/business/components/common/components/MsInstructionsIcon";
import MsPersonRouter from "@/business/components/settings/components/PersonRouter";
export default {
name: "JiraSetting",
components: {MsInstructionsIcon, BugManageBtn},
components: {MsInstructionsIcon, BugManageBtn,MsPersonRouter},
created() {
this.init();
},
@ -79,6 +84,7 @@ export default {
return {
show: true,
showInput: true,
resVisible:false,
form: {},
rules: {
account: {
@ -210,6 +216,9 @@ export default {
this.$nextTick(function () {
this.showInput = true;
});
},
closeDialog(){
this.resVisible = false;
}
}
};

View File

@ -36,9 +36,13 @@
</div>
<div>
3. {{ $t('organization.integration.use_tip_three') }}
<router-link :to="{name: 'PersonSetting', params: { open: true }}" style="margin-left: 5px">
<span style="margin-left: 5px;color: #551A8B; text-decoration: underline; cursor: pointer" @click="resVisible = true">
{{ $t('organization.integration.link_the_info_now') }}
</router-link>
</span>
<el-dialog :close-on-click-modal="false" width="80%"
:visible.sync="resVisible" destroy-on-close @close="closeDialog">
<ms-person-router @closeDialog = "closeDialog"/>
</el-dialog>
</div>
</div>
</div>
@ -48,11 +52,13 @@
import BugManageBtn from "@/business/components/settings/workspace/components/BugManageBtn";
import {getCurrentUser, getCurrentWorkspaceId} from "@/common/js/utils";
import {TAPD} from "@/common/js/constants";
import MsPersonRouter from "@/business/components/settings/components/PersonRouter";
export default {
name: "TapdSetting.vue",
components: {
BugManageBtn
BugManageBtn,
MsPersonRouter
},
created() {
this.init();
@ -61,6 +67,7 @@ export default {
return {
show: true,
showInput: true,
resVisible:false,
form: {},
rules: {
account: {
@ -166,6 +173,9 @@ export default {
this.$nextTick(function () {
this.showInput = true;
});
},
closeDialog(){
this.resVisible = false;
}
}
};

View File

@ -47,9 +47,13 @@
</div>
<div>
3. {{ $t('organization.integration.use_tip_three') }}
<router-link :to="{name: 'PersonSetting', params: { open: true }}" style="margin-left: 5px">
<span style="margin-left: 5px;color: #551A8B; text-decoration: underline; cursor: pointer" @click="resVisible = true">
{{ $t('organization.integration.link_the_info_now') }}
</router-link>
</span>
<el-dialog :close-on-click-modal="false" width="80%"
:visible.sync="resVisible" destroy-on-close @close="closeDialog">
<ms-person-router @closeDialog = "closeDialog"/>
</el-dialog>
</div>
</div>
</div>
@ -60,12 +64,14 @@ import BugManageBtn from "@/business/components/settings/workspace/components/Bu
import {getCurrentUser, getCurrentWorkspaceId} from "@/common/js/utils";
import {ZEN_TAO} from "@/common/js/constants";
import MsInstructionsIcon from "@/business/components/common/components/MsInstructionsIcon";
import MsPersonRouter from "@/business/components/settings/components/PersonRouter";
export default {
name: "ZentaoSetting",
components: {
MsInstructionsIcon,
BugManageBtn
BugManageBtn,
MsPersonRouter
},
created() {
this.init();
@ -74,6 +80,7 @@ export default {
return {
show: true,
showInput: true,
resVisible:false,
form: {},
rules: {
account: {
@ -204,6 +211,9 @@ export default {
this.$nextTick(function () {
this.showInput = true;
});
},
closeDialog(){
this.resVisible = false;
}
}
};

View File

@ -83,6 +83,7 @@ export default {
system: 'System',
personal_setting: 'Personal Setting',
api_keys: 'API Keys',
third_account:'Third Account',
quota: 'Quota',
test_resource_pool: 'Resource Pool',
system_setting: 'Settings',

View File

@ -77,6 +77,7 @@ export default {
group: '用户组',
personal_info: '个人信息',
api_keys: 'API Keys',
third_account:'第三方平台账号',
quota: '配额管理',
status: '状态',
show_all: '显示全部',

View File

@ -77,6 +77,7 @@ export default {
group: '用戶組',
personal_info: '個人信息',
api_keys: 'API Keys',
third_account:'第三方平台賬號',
quota: '配額管理',
status: '狀態',
show_all: '顯示全部',