diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 5747c33..bcff7de 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -154,6 +154,7 @@ export default { const routes = res.permissionMenu[0].children addRoutes(routes) this.initMenu() + this.$store.commit('setDataPer', res.dataPermissionList) }).catch(err => { if (err.status === 500) { localStorage.removeItem('ms_username'); diff --git a/src/store/index.js b/src/store/index.js index 5b67a2b..1fa371b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -25,7 +25,8 @@ const store = new Vuex.Store({ matchPage: 1, platformSource: 0, columnId: '', - tabId: '1' + tabId: '1', + dataPer: [] }, actions: { setSystemId({ state,commit },systemId) { @@ -84,6 +85,9 @@ const store = new Vuex.Store({ addRoutes(state,routes) { state.routes = routes }, + setDataPer(state, dataPer) { + state.dataPer = dataPer + }, SET_C_PAGE: (state, page) => { state.customerPage = page }, diff --git a/src/views/course/Curriculum.vue b/src/views/course/Curriculum.vue index 28fe98b..ca8822a 100644 --- a/src/views/course/Curriculum.vue +++ b/src/views/course/Curriculum.vue @@ -164,10 +164,12 @@ export default { }, // 获取列表数据 getData() { + const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理') let data = { ...this.form, pageNum: this.pageNo, - pageSize: this.pageSize + pageSize: this.pageSize, + supplierId: sid ? sid.supplierId : '' }; this.$post(this.api.curriculumList, data).then(res => { this.courseData = res.page.records; diff --git a/src/views/customer/customer.vue b/src/views/customer/customer.vue index ff5e951..1932405 100644 --- a/src/views/customer/customer.vue +++ b/src/views/customer/customer.vue @@ -134,6 +134,7 @@ export default { }, methods: { getData() { + const sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理') this.loading = true this.$post(this.api.queryCustomer,{ countries: this.form.countries, @@ -141,7 +142,8 @@ export default { cityId: this.form.city, searchContent: this.form.keyword, page: this.page, - size: this.pageSize + size: this.pageSize, + supplierId: sid ? sid.supplierId : '' }).then(res => { this.listData = res.message.list this.total = res.message.totalCount diff --git a/src/views/order/Order.vue b/src/views/order/Order.vue index fb34720..145c256 100644 --- a/src/views/order/Order.vue +++ b/src/views/order/Order.vue @@ -181,6 +181,7 @@ export default { } }, getData() { + const sid = this.$store.state.dataPer.find(e => e.permissionName === '订单管理') let data = { cityId: this.form.city, customerName: this.keyword, @@ -188,7 +189,8 @@ export default { orderType: this.form.orderType, pageNo: this.pageNo, pageSize: this.pageSize, - provinceId: this.form.provinces + provinceId: this.form.provinces, + supplierId: sid ? sid.supplierId : '' }; this.$post(this.api.orderList, data).then(res => { res.orderPage.orders.forEach(e => { diff --git a/src/views/serve/Configure.vue b/src/views/serve/Configure.vue index d93318e..a105982 100644 --- a/src/views/serve/Configure.vue +++ b/src/views/serve/Configure.vue @@ -54,7 +54,7 @@ {{ systemTypeKeys[scope.row.type] }} - +