Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
d908de6d7c
@ -10,7 +10,7 @@
|
||||
<el-dropdown-item>
|
||||
<span style="display:block;" @click="handleDetail">{{ $t('global.personalDetails') }}</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="companyAdmin">
|
||||
<el-dropdown-item v-if="companyAdmin && isSameProject">
|
||||
<span style="display:block;" @click="handleOrganization">教学管理</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
@ -24,6 +24,7 @@
|
||||
<script>
|
||||
import userInfo from './userInfo';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'Logout',
|
||||
@ -40,6 +41,9 @@ export default {
|
||||
},
|
||||
companyAdmin() {
|
||||
return this.$store.state.user.companyAdmin;
|
||||
},
|
||||
isSameProject() {
|
||||
return this.$store.state.user.companyProject === getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -21,7 +21,8 @@ const user = {
|
||||
projectDevice: '',
|
||||
companyId: '',
|
||||
companyAdmin: false,
|
||||
companyName: ''
|
||||
companyName: '',
|
||||
companyProject: ''
|
||||
},
|
||||
|
||||
mutations: {
|
||||
@ -61,6 +62,9 @@ const user = {
|
||||
SET_COMPANYNAME: (state, companyName) => {
|
||||
state.companyName = companyName;
|
||||
},
|
||||
SET_COMPANYPROJECT: (state, companyProject) => {
|
||||
state.companyProject = companyProject;
|
||||
},
|
||||
CLEAR_AUTO_PARAMS: () => {
|
||||
Cookies.remove('UserDesignName');
|
||||
Cookies.remove('UserDesignToken');
|
||||
@ -138,6 +142,7 @@ const user = {
|
||||
commit('SET_COMPANYID', user.companyId);
|
||||
commit('SET_COMPANYADMIN', user.companyAdmin);
|
||||
commit('SET_COMPANYNAME', user.companyName);
|
||||
commit('SET_COMPANYPROJECT', user.projectCode);
|
||||
resolve(user);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
|
@ -87,7 +87,7 @@ export default {
|
||||
this.dialogVisible = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(e => {
|
||||
this.$message.error('更新单位信息失败!');
|
||||
this.$message.error('更新单位信息失败:' + e.message);
|
||||
});
|
||||
} else {
|
||||
addCompany(this.formModel).then(resp => {
|
||||
@ -95,7 +95,7 @@ export default {
|
||||
this.dialogVisible = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(e => {
|
||||
this.$message.error('添加单位信息失败!');
|
||||
this.$message.error('添加单位信息失败:' + e.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user