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