setting.js
4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import * as types from '../constants/ActionTypes';
const initialState = {
basicInfo:[],
roles:[],
role:{},
sysperms:[],
actionPerms:[],
admins:[],
adminOptions:[],
adminCount:0,
simpleAdmins:[],
simpleAdminCount:0,
adminInfo:{},
legalList:{},
maskShow:false,
height: 0,
width: 0,
maskShowTitle:'此操作可能耗费较长时间,请等待......',
handOverData: {},
pcFormDefind: [],
wxFormDefind: [],
canExport: '',
resumsExportList: {},
data_range_setting:{},
view_perm:''
};
export default function environment(state = initialState,action) {
switch(action.type) {
case types.BASIC_INFO:
return Object.assign({}, state, {
basicInfo: action.basicInfo
});
case types.CHANGE_WIDTH_AND_HEIGHT:
return Object.assign({}, state, {
height: action.height,
width: action.width
});
case types.MASK_SHOW:
return Object.assign({}, state, {
maskShow: action.maskShow,
maskShowTitle: action.title
});
case types.LOAD_ROLES:
return Object.assign({}, state, {
roles: action.roles
});
case types.SELECT_ROLE:
return Object.assign({}, state, {
role: action.role
});
case types.LOAD_SYS_PERMS:
return Object.assign({}, state, {
sysperms: action.sysperms
});
case types.LOAD_SYS_ACTION_PERMS:
return Object.assign({}, state, {
actionPerms: action.actionPerms,
view_perm: action.view_perm
});
case types.LOAD_ADMINS:
return Object.assign({}, state, {
admins: action.admins,
adminCount:action.adminCount
});
case types.LOAD_ADMINS_OPTIONS:
return Object.assign({}, state, {
adminOptions: action.adminOptions
});
case types.LOAD_SIMPLE_ADMINS:
return Object.assign({}, state, {
simpleAdmins: action.simpleAdmins,
simpleAdminCount:action.simpleAdminCount
});
case types.LOAD_ADMIN_INFO:
return Object.assign({}, state, {
adminInfo: action.adminInfo
});
case types.LEGAL_LIST:
return Object.assign({}, state, {
legalList: action.legalList
});
case types.LOAD_ADMINS:
return Object.assign({}, state, {
addInterview: action.addInterview,
});
case types.LOAD_CUSTOMER_ADMINS:
return Object.assign({}, state, {
customerAdmins: action.customerAdmins
});
case types.ADD_INTERVIEW_CUSTOMER:
return Object.assign({}, state, {
addInterviewItem: action.addInterviewItem
});
case types.GET_HAND_OVER_DATA:
return Object.assign({}, state, {
handOverData: action.handOverData
});
case types.LOAD_QUESTION_BANK_LIST:
return Object.assign({}, state, {
questionBankList: action.questionBankList
});
case types.LOAD_PCRESUME_DEFIND:
return Object.assign({}, state, {
pcFormDefind: action.pcFormDefind
});
case types.LOAD_WXRESUME_DEFIND:
return Object.assign({}, state, {
wxFormDefind: action.wxFormDefind
});
case types.CAN_EXPORT:
return Object.assign({}, state, {
canExport: action.canExport
});
case types.LOAD_RESUMES_EXPORT_LIST:
return Object.assign({}, state, {
resumsExportList: action.resumsExportList
})
case types.DATA_RANGE_SETTING:
return Object.assign({}, state, {
data_range_setting: action.data_range_setting
})
default:
return state;
}
}