Commit e8a37d55 by cwq0219

总览等目录配置

1 parent 9aafd55a
......@@ -2,7 +2,7 @@
* @Author: limin
* @Date: 2019-08-27 19:16:26
* @Last Modified by: chenwq
* @Last Modified time: 2020-11-13 09:44:00
* @Last Modified time: 2020-12-18 12:56:39
*/
const permision = {}
/**
......
......@@ -19,23 +19,16 @@ const frameIn = [{
* icon:element-ui
*/
export const home = {
path: '/aa',
name: 'aa',
path: '/index',
name: 'index',
icon: 's-home',
// meta: {
// title: '预录客户',
// authId: '901',
// parentId: '1',
// cache: true
// },
// component: _import('customer/editCustomer')
meta: {
title: '流量管理',
authId: '902',
title: '总览',
authId: '907',
parentId: '1',
cache: true
}
// component: _import('customer/customerList')
},
component: _import('index')
}
export const sys = [
// 刷新页面 必须保留
......@@ -56,17 +49,28 @@ export const sys = [
/**
* 所有需动态过滤的资源点
* 101 - 工作台
* 102 - 流量管理
* 103 - 商品库
* 104 - 订单管理
* 105 - 财务管理
* 106 - 系统设置
* 907 - 总览
* 902 - 流量管理
* 903 - 商品库
* 904 - 订单管理
* 905 - 财务管理
* 906 - 系统设置
*/
export const resources = {
'902': {
path: '/flowManage',
name: 'flowManage',
icon: 's-goods',
meta: {
title: '流量管理',
authId: '902',
parentId: '1',
cache: true
}
},
'90201': {
path: '/index',
name: 'index',
path: '/customerList',
name: 'customerList',
icon: 'document',
meta: {
title: '客户列表',
......@@ -252,6 +256,102 @@ export const resources = {
},
component: _import('goods/editCommodity')
},
'904': {
path: '/orderManage',
name: 'orderManage',
icon: 's-goods',
meta: {
title: '订单管理',
authId: '904',
parentId: '1',
cache: true
}
},
'90401': {
path: '/orderList',
name: 'orderList',
icon: 's-goods',
meta: {
title: '订单列表',
authId: '90401',
parentId: '904',
cache: true
},
auth: [{
authId: '9040101',
parentId: '90401',
label: '导出',
category: 'Button',
type: 'primary',
handle: 'handleImport'
}, {
authId: '9040102',
parentId: '90401',
label: '查看订单',
handle: 'handleDetail'
}],
component: _import('orderManage/orderList')
},
'90402': {
path: '/orderDetail',
name: 'orderDetail',
icon: 's-goods',
meta: {
title: '订单详情',
authId: '90402',
parentId: '90401',
cache: true
},
component: _import('orderManage/orderDetail')
},
'905': {
path: '/financeManage',
name: 'financeManage',
icon: 's-goods',
meta: {
title: '财务管理',
authId: '905',
parentId: '1',
cache: true
}
},
'90501': {
path: '/financeList',
name: 'financeList',
icon: 's-goods',
meta: {
title: '财务列表',
authId: '90501',
parentId: '905',
cache: true
},
auth: [{
authId: '9050101',
parentId: '90501',
label: '导出',
category: 'Button',
type: 'primary',
handle: 'handleImport'
}, {
authId: '9050102',
parentId: '90501',
label: '查看明细',
handle: 'handleDetail'
}],
component: _import('financeManage/financeList')
},
'90502': {
path: '/financeDetail',
name: 'financeDetail',
icon: 's-goods',
meta: {
title: '对账详情',
authId: '90502',
parentId: '90501',
cache: true
},
component: _import('financeManage/financeDetail')
},
'906': {
path: '/systemConfig',
name: 'systemConfig',
......@@ -275,6 +375,37 @@ export const resources = {
},
component: _import('systemConfig/personalInfo')
},
'90603': {
path: '/merchantManage',
name: 'merchantManage',
icon: 'user-solid',
meta: {
title: '商户管理',
authId: '90603',
parentId: '906',
cache: true
},
auth: [{
authId: '9060301',
parentId: '90603',
label: '财务',
type: 'primary',
handle: 'handleDetail'
}],
component: _import('systemConfig/merchantManage')
},
'90604': {
path: '/merchantDetail',
name: 'merchantDetail',
icon: 'user-solid',
meta: {
title: '财务详情',
authId: '90604',
parentId: '90603',
cache: true
},
component: _import('systemConfig/merchantDetail')
},
'90602': {
path: '/serviceStore',
name: 'serviceStore',
......
......@@ -27,14 +27,10 @@ export default {
util.cookies.set('token', data.sessionId)
getAuths({}).then(async res => {
// console.log(res)
!res.map(i => i.authId).includes('902') && res.unshift({
authId: '902',
name: '客户列表',
!res.map(i => i.authId).includes('907') && res.unshift({
authId: '907',
name: '总览',
parentId: '1'
}, {
authId: '90201',
name: '客户列表',
parentId: '902'
})
// data.roleType = baseConfig.hasAuth ? data.roleType : SUPPER_ADMIN
// const authes = (+data.roleType === SUPPER_ADMIN)
......@@ -44,6 +40,9 @@ export default {
// var tempAuths = util.permision.flatten(Object.values(localRoutes))
// console.log(util.permision.flatten(Object.values(localRoutes)))
var routeAll = util.permision.flatten(Object.values(localRoutes))
var indexPage = routeAll.find(item => item.authId === '907')
routeAll.splice(routeAll.findIndex(item => item.authId === '907'), 1)
routeAll.unshift(indexPage)
var tempAuths = []
var targetRoutes = (res.beSuper) ? routeAll : res.map(i => i.authId)
routeAll.map(i => i.authId).forEach((item, index) => {
......
<!-- 对账详情 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'financeDetail',
data() {
return {
}
},
mounted() {},
methods: {}
}
</script>
<style scoped>
</style>
<!-- 财务列表 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'financeList',
data() {
return {
}
},
mounted() { },
methods: {
// 导出
handleImport() { },
// 查看明细
handleDetail(row) { }
}
}
</script>
<style scoped>
</style>
<!-- 首页 -->
<!-- 总览 -->
<template>
<d2-container class="indexPage">
<div class="echarts">
......@@ -12,8 +12,8 @@
</template>
<script>
import { reportApi } from '@api/systemMonitor'
import notice from '@/common/notice'
// import { reportApi } from '@api/systemMonitor'
// import notice from '@/common/notice'
export default {
name: 'index',
data() {
......@@ -66,14 +66,14 @@ export default {
methods: {
getPie(label = '') {
const params = {
subsystemTypeCode: label ? this.baseData.subsys.find(item => item.confValue === label).confCode : ''
}
reportApi(params).then(res => {
this.drawPie(res)
}).catch(() => {
notice.errorTips()
})
// const params = {
// subsystemTypeCode: label ? this.baseData.subsys.find(item => item.confValue === label).confCode : ''
// }
// reportApi(params).then(res => {
// this.drawPie(res)
// }).catch(() => {
// notice.errorTips()
// })
},
/* 接口请求-end */
// onlineNum 在网数量
......
<!-- 订单详情 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'orderDetail',
data() {
return {
}
},
mounted() {},
methods: {}
}
</script>
<style scoped>
</style>
<!-- 订单列表 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'orderList',
data() {
return {
}
},
mounted() { },
methods: {
// 导出
handleImport() { },
// 查看详情
handleDetail(row) { }
}
}
</script>
<style scoped>
</style>
<!-- 财务详情 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'merchantDetail',
data() {
return {
}
},
components: {},
computed: {},
mounted() {},
methods: {}
}
</script>
<style scoped>
</style>
<!-- 商户管理 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'merchantManage',
data() {
return {
}
},
mounted() { },
methods: {
// 财务
handleDetail(row) { }
}
}
</script>
<style scoped>
</style>
......@@ -81,7 +81,7 @@ export default {
const clone = util.deepClone(Object.values(localRoutes))
const { menus } = util.permision.packMenusBtns(clone)
const all = util.permision.flatten(clone)
menus.find(o => o.authId === '90201').disabled = true
menus.find(o => o.authId === '907').disabled = true
return { menus, all }
}
},
......
......@@ -50,7 +50,7 @@ export default {
handler(value) {
if (!value) return
const chk = []
const treeChk = ['90201']
const treeChk = ['907']
this.$nextTick(() => {
value.forEach(v => {
v.authId += ''
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!