Commit e8a37d55 by cwq0219

总览等目录配置

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