parent
c6a8e58700
commit
8b1bfc2d27
|
@ -1,25 +1,24 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-tabs v-model="activeIndex" >
|
||||
<el-tab-pane name="commons.personal_setting" :label="$t('commons.personal_setting')" class="setting-item"></el-tab-pane>
|
||||
<el-tab-pane name="commons.api_keys" :label="$t('commons.api_keys')" 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-tab-pane v-if="hasPermission('PERSONAL_INFORMATION:READ+EDIT')" name="commons.personal_setting" :label="$t('commons.personal_setting')" class="setting-item" ></el-tab-pane>
|
||||
<el-tab-pane v-if="hasPermission('PERSONAL_INFORMATION:READ+API_KEYS')" name="commons.api_keys" :label="$t('commons.api_keys')" class="setting-item" ></el-tab-pane>
|
||||
<el-tab-pane v-if="hasPermission('PERSONAL_INFORMATION:READ+EDIT_PASSWORD')" name="change_password" :label="$t('member.edit_password')" class="setting-item" ></el-tab-pane>
|
||||
<el-tab-pane v-if="hasPermission('PERSONAL_INFORMATION:READ+THIRD_ACCOUNT')&&(hasJira||hasTapd||hasZentao||hasAzure)" 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'" :form = form @getPlatformInfo = "getPlatformInfo" @cancel = "cancel" />
|
||||
<ms-api-keys v-if="activeIndex==='commons.api_keys'" />
|
||||
<password-info v-if="activeIndex==='change_password'" :rule-form = "ruleForm" @cancel="cancel" ></password-info>
|
||||
<el-form v-if="activeIndex==='third_account'" >
|
||||
<jira-user-info @auth="handleAuth" v-if="hasJira" :data="currentPlatformInfo" v-permission="['PERSONAL_INFORMATION:READ+THIRD_ACCOUNT']"/>
|
||||
<tapd-user-info @auth="handleAuth" v-if="hasTapd" :data="currentPlatformInfo" v-permission="['PERSONAL_INFORMATION:READ+THIRD_ACCOUNT']"/>
|
||||
<zentao-user-info @auth="handleAuth" v-if="hasZentao" :data="currentPlatformInfo" v-permission="['PERSONAL_INFORMATION:READ+THIRD_ACCOUNT']"/>
|
||||
<azure-devops-user-info @auth="handleAuth" v-if="hasAzure" :data="currentPlatformInfo" v-permission="['PERSONAL_INFORMATION:READ+THIRD_ACCOUNT']"/>
|
||||
<el-form-item v-permission="['PERSONAL_INFORMATION:READ+THIRD_ACCOUNT']" v-if="hasJira||hasTapd||hasZentao||hasAzure">
|
||||
<jira-user-info @auth="handleAuth" v-if="hasJira" :data="currentPlatformInfo" />
|
||||
<tapd-user-info @auth="handleAuth" v-if="hasTapd" :data="currentPlatformInfo" />
|
||||
<zentao-user-info @auth="handleAuth" v-if="hasZentao" :data="currentPlatformInfo" />
|
||||
<azure-devops-user-info @auth="handleAuth" v-if="hasAzure" :data="currentPlatformInfo" />
|
||||
<el-form-item >
|
||||
<el-button @click="cancel">{{$t('commons.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="updateUser('updateUserForm')" @keydown.enter.native.prevent>{{$t('commons.confirm')}}</el-button>
|
||||
</el-form-item>
|
||||
<div v-if="!isShowText||(!hasJira&&!hasTapd&&!hasZentao&&!hasAzure)" style="width: 6%;margin: auto">{{$t('commons.no_permission')}}</div>
|
||||
</el-form>
|
||||
</ms-main-container>
|
||||
|
||||
|
@ -87,6 +86,7 @@
|
|||
}
|
||||
},
|
||||
methods:{
|
||||
hasPermission,
|
||||
currentUser: () => {
|
||||
return getCurrentUser();
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div v-loading="result.loading">
|
||||
<el-card class="table-card" v-permission="['PERSONAL_INFORMATION:READ+API_KEYS']">
|
||||
<el-card class="table-card">
|
||||
<template v-slot:header>
|
||||
<div>
|
||||
<el-row class="table-title" type="flex" justify="space-between" align="middle">
|
||||
|
@ -66,14 +66,12 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div v-if="!isShowText" style="width: 6%;margin: auto">{{$t('commons.no_permission')}}</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
||||
import {getCurrentUser, hasPermission} from "../../../../common/js/utils";
|
||||
import {getCurrentUser} from "@/common/js/utils";
|
||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
|
||||
|
@ -83,7 +81,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
result: {},
|
||||
isShowText:false,
|
||||
updateVisible: false,
|
||||
editPasswordVisible: false,
|
||||
apiKeysVisible: false,
|
||||
|
@ -94,7 +91,6 @@ export default {
|
|||
},
|
||||
|
||||
created() {
|
||||
this.isShowText = hasPermission('PERSONAL_INFORMATION:READ+API_KEYS');
|
||||
this.search();
|
||||
},
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="editPasswordForm" label-width="120px" class="demo-ruleForm" v-permission="['PERSONAL_INFORMATION:READ+EDIT_PASSWORD']">
|
||||
<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>
|
||||
|
@ -15,19 +15,17 @@
|
|||
<el-button type="primary" @click="updatePassword('editPasswordForm')" @keydown.enter.native.prevent>{{$t('commons.confirm')}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div v-if="!isShowText" style="width: 6%;margin: auto">{{$t('commons.no_permission')}}</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import {logout} from "@/network/user";
|
||||
import {hasPermission} from "@/common/js/utils";
|
||||
|
||||
export default {
|
||||
name:'PasswordInfo',
|
||||
data(){
|
||||
return{
|
||||
result:{},
|
||||
isShowText:false,
|
||||
updatePasswordPath: '/user/update/password',
|
||||
rules: {
|
||||
password: [
|
||||
|
@ -84,11 +82,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.isShowText = hasPermission('PERSONAL_INFORMATION:READ+EDIT_PASSWORD');
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div v-loading="result.loading">
|
||||
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
|
||||
ref="updateUserForm" v-permission="['PERSONAL_INFORMATION:READ+EDIT']">
|
||||
ref="updateUserForm">
|
||||
<el-form-item label="ID" prop="id">
|
||||
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
|
@ -19,7 +19,6 @@
|
|||
<el-button type="primary" @click="updateUser('updateUserForm')" @keydown.enter.native.prevent>{{$t('commons.confirm')}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div v-if="!isShowText" style="width: 6%;margin: auto">{{$t('commons.no_permission')}}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -29,18 +28,15 @@ import MsDialogFooter from "../../common/components/MsDialogFooter";
|
|||
import {
|
||||
fullScreenLoading, getCurrentProjectID,
|
||||
getCurrentUser,
|
||||
getCurrentWorkspaceId, hasPermission,
|
||||
listenGoBack,
|
||||
getCurrentWorkspaceId,
|
||||
removeGoBackListener, saveLocalStorage, stopFullScreenLoading
|
||||
} from "@/common/js/utils";
|
||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||
import {EMAIL_REGEX, PHONE_REGEX} from "@/common/js/regex";
|
||||
import JiraUserInfo from "@/business/components/settings/personal/JiraUserInfo";
|
||||
import TapdUserInfo from "@/business/components/settings/personal/TapdUserInfo";
|
||||
import {getIntegrationService} from "@/network/organization";
|
||||
import ZentaoUserInfo from "@/business/components/settings/personal/ZentaoUserInfo";
|
||||
import AzureDevopsUserInfo from "@/business/components/settings/personal/AzureDevopsUserInfo";
|
||||
import {logout} from "@/network/user";
|
||||
|
||||
export default {
|
||||
name: "MsPersonFromSetting",
|
||||
|
@ -58,7 +54,6 @@ export default {
|
|||
return {
|
||||
result: {},
|
||||
isLocalUser: false,
|
||||
isShowText:false,
|
||||
updatePath: '/user/update/current',
|
||||
ruleForm: {},
|
||||
rule: {
|
||||
|
@ -91,10 +86,6 @@ export default {
|
|||
},
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.isShowText = hasPermission('PERSONAL_INFORMATION:READ+EDIT');
|
||||
},
|
||||
methods: {
|
||||
currentUser: () => {
|
||||
return getCurrentUser();
|
||||
|
|
Loading…
Reference in New Issue