yoqw/web/cms/app/utils/nav-items.js
2020-07-01 15:22:07 +08:00

188 lines
4.2 KiB
JavaScript

export default (function() {
const navItems = [
{
perm: 'PERM_VIEW_PHONE_BAR',
route: 'phone-bar',
icon: 'fa-phone-square',
text: '电话条'
},
{
perm: 'PERM_VIEW_SEQUENCE_LIST',
route: 'sequence.list',
icon: 'fa-sort-numeric-asc',
text: '序号管理'
},
{
perm: 'PERM_VIEW_AREA_CODE_LIST',
route: 'area-code.list',
icon: 'fa-angle-double-right',
text: '区号管理'
},
{
perm: 'PERM_VIEW_TAG_LIST',
route: 'tag.list',
icon: 'fa-tags',
text: '标签管理'
},
{
perm: 'PERM_VIEW_TENANT_LIST',
route: 'tenant.list',
icon: 'fa-cubes purple',
text: '租户管理'
},
{
perm: 'PERM_VIEW_TELECOM_VENDOR_LIST',
route: 'telecom-vendor.list',
icon: 'icon-business-cards',
text: '语音运营商管理'
},
{
perm: 'PERM_VIEW_GATEWAY_LIST',
route: 'gateway.list',
icon: 'fa-window-close-o',
text: '网关管理'
},
{
perm: 'PERM_VIEW_TRUNK_LIST',
route: 'trunk.list',
icon: 'fa-random',
text: '中继管理'
},
{
perm: 'PERM_VIEW_TRUNK_STRATEGY_LIST',
route: 'trunk-strategy.list',
icon: 'fa-retweet',
text: '中继策略管理'
},
{
perm: 'PERM_VIEW_TRUNK_ATTR_LIST',
route: 'trunk-attr.list',
icon: 'fa-book',
text: '中继属性管理'
},
{
perm: 'PERM_VIEW_QUEUE_LIST',
route: 'queue.list',
icon: 'fa-tasks',
text: '队列管理'
},
{
perm: 'PERM_VIEW_AGENT_GROUP_LIST',
route: 'agent-group.list',
icon: 'fa-users',
text: '坐席组管理'
},
{
perm: 'PERM_VIEW_AGENT_LIST',
route: 'agent.list',
icon: 'fa-user',
text: '坐席管理'
},
{
perm: 'PERM_VIEW_ROBOT_AGENT_LIST',
route: 'robot-agent.list',
icon: 'fa-android',
text: '机器人分配管理'
},
{
perm: 'PERM_VIEW_CAMPAIGN_LIST',
route: 'campaign.list',
icon: 'fa-fax',
text: '外呼活动管理'
},
{
perm: 'PERM_VIEW_CAMPAIGN_LIST',
route: 'calling-list.list',
icon: 'fa fa-list-alt',
text: '拨打列表'
},
{
perm: 'PERM_VIEW_VOICE_ACTOR_LIST',
route: 'voice-actor.list',
icon: 'fa-user-circle-o',
text: '发音人管理'
},
{
perm: 'PERM_VIEW_TALK_GROUP_LIST',
route: 'talk-group.list',
icon: 'fa-volume-up grey',
text: '话术组管理'
},
{
perm: 'PERM_NLP_TERM_GROUP_LIST',
route: 'nlp-term-group.list',
icon: 'fa-file-o grey',
text: '分词组管理'
},
{
perm: 'PERM_NLP_TERM_LIST',
route: 'nlp-term.list',
icon: 'fa-file-word-o grey',
text: '分词管理'
},
{
perm: 'PERM_NLP_COMPONENT_GROUP_LIST',
route: 'nlp-component-group.list',
icon: 'fa-object-group grey',
text: '组件组管理'
},
{
perm: 'PERM_NLP_COMPONENT_LIST',
route: 'nlp-component.list',
icon: 'fa-object-ungroup grey',
text: '组件管理'
},
{
perm: 'PERM_NLP_COMPONENT_LIST',
route: 'nlp-knowledge.list',
icon: 'fa-book grey',
text: '知识库管理'
},
{
perm: 'PERM_NLP_STATE_MACHINE_LIST',
route: 'nlp-state-machine.list',
icon: 'fa-puzzle-piece grey',
text: '状态机管理'
},
{
perm: 'PERM_VIEW_AUTH_ROLE_LIST',
route: 'auth-role.list',
icon: 'fa-vcard',
text: '认证角色管理'
},
{
perm: 'PERM_VIEW_AUTH_PERMISSION_LIST',
route: 'auth-permission.list',
icon: 'fa-key',
text: '认证权限管理'
},
{
perm: 'PERM_VIEW_AUTH_USER_LIST',
route: 'auth-user.list',
icon: 'fa-address-book',
text: '认证用户管理'
},
{
perm: 'PERM_VIEW_CAMPAIGN_LIST',
route: 'call-detail-record.list',
icon: 'fa fa-list',
text: '拨打详单'
},
];
const menuMap = {};
navItems.forEach(m => {
menuMap[m.route] = m;
if (m.children) {
m.children.forEach(c => {
menuMap[c] = m;
});
}
});
return {
menu: navItems,
map: menuMap
};
})();