更新页面
This commit is contained in:
@ -5,16 +5,10 @@ import theme from './modules/theme';
|
||||
import sysDict from './modules/sysDict';
|
||||
import permission from './modules/permission';
|
||||
import display from './modules/display';
|
||||
|
||||
import useGlobalStore from './modules/global/index';
|
||||
import getters from './getters';
|
||||
|
||||
export default createStore({
|
||||
// state: {
|
||||
// },
|
||||
// mutations: {
|
||||
// },
|
||||
// actions: {
|
||||
// },
|
||||
getters,
|
||||
modules: {
|
||||
user,
|
||||
@ -22,6 +16,7 @@ export default createStore({
|
||||
theme,
|
||||
sysDict,
|
||||
permission,
|
||||
display
|
||||
display,
|
||||
useGlobalStore
|
||||
}
|
||||
});
|
||||
|
||||
50
src/store/modules/global/index.js
Normal file
50
src/store/modules/global/index.js
Normal file
@ -0,0 +1,50 @@
|
||||
import { CONFERENCE_ROLE_NORMAL } from '@/views/consultation/sdk/conferenceControl';
|
||||
export default {
|
||||
id: 'global',
|
||||
state: () => ({
|
||||
showConfencePanel: false, // 是否展示会议面板
|
||||
IS_GLOBAL_LOADING: false,
|
||||
activeMeetingConfig: null, // 当前进行中会议配置信息
|
||||
layoutTypeOptions: [],
|
||||
}),
|
||||
getters: {
|
||||
GET_IS_GLOBAL_LOADING() {
|
||||
return this.IS_GLOBAL_LOADING;
|
||||
},
|
||||
IS_CURRENT_MEETING_OWNER() {
|
||||
const members = this.activeMeetingConfig.members;
|
||||
|
||||
if (!this.activeMeetingConfig || !members) return false;
|
||||
|
||||
// 当前登录人是会议【创建者】或【主席】
|
||||
return members
|
||||
.filter((v) => v.role !== CONFERENCE_ROLE_NORMAL)
|
||||
.map((v) => v.basedata_id)
|
||||
.includes(sessionStorage.getItem('user_basedata_id'));
|
||||
},
|
||||
},
|
||||
mutations:{
|
||||
setMeetting(state, val) {
|
||||
state.activeMeetingConfig = val;
|
||||
},
|
||||
},
|
||||
|
||||
actions: {
|
||||
ACT_IS_GLOBAL_LOADING(isLoading) {
|
||||
this.IS_GLOBAL_LOADING = isLoading;
|
||||
},
|
||||
setLayoutTypeOptions(layoutTypeOptions) {
|
||||
this.layoutTypeOptions = layoutTypeOptions;
|
||||
},
|
||||
setActiveConfig(context, config) {
|
||||
this.activeMeetingConfig = config;
|
||||
context.commit("setMeetting", config);
|
||||
},
|
||||
setShowConfencePanel(show) {
|
||||
this.showConfencePanel = show;
|
||||
},
|
||||
},
|
||||
persist: {
|
||||
enabled: true,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user