@@ -254,20 +237,20 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
日志
diff --git a/src/views/customer/customer.vue b/src/views/customer/customer.vue
index a015ef4..59dea0b 100644
--- a/src/views/customer/customer.vue
+++ b/src/views/customer/customer.vue
@@ -141,6 +141,7 @@ import { getparameter } from "@/api/system/dictionary";
import { getList as getUnit } from "@/api/payUnit";
import { getList as getTypes } from "@/api/productType";
import { deepCopy } from "@/utils";
+import {getAuthAreas, getAuthTypes} from "@/utils/auth"
import addCustomer from "@/views/customer/component/addCustomer";
import addOrder from "./component/addOrder";
@@ -367,17 +368,12 @@ export default {
},
async getTypes() {
- const res = await getTypes(
- {
- page: 1,
- page_size: 9999,
- },
- false
- );
- this.types = res.data;
+ this.types = getAuthTypes(this);
+ this.select.product_type_id = this.types.map(item => item.id)
},
async getCity() {
+ let authAreaIds = getAuthAreas(this).map(item => item.id)
let city = await getparameter(
{
number: "city",
@@ -391,7 +387,13 @@ export default {
},
false
);
- city.detail[i].children = area.detail;
+ let resArea = []
+ area?.detail.forEach(item => {
+ if(authAreaIds.indexOf(item.id) !== -1){
+ resArea.push(item)
+ }
+ })
+ city.detail[i].children = resArea
for (let j = 0; j < area.detail.length; j++) {
let street = await getparameter(
diff --git a/src/views/customer/map.vue b/src/views/customer/map.vue
index 9f78e7c..a66140e 100644
--- a/src/views/customer/map.vue
+++ b/src/views/customer/map.vue
@@ -70,6 +70,7 @@ import { AMapManager,lazyAMapApiLoaderInstance } from 'vue-amap'
import { getList } from '@/api/customer'
import {getList as getTypes} from "@/api/productType";
import {deepCopy} from "@/utils";
+import { getAuthAreas } from "@/utils/auth";
const amapManager = new AMapManager()
export default {
@@ -112,6 +113,7 @@ export default {
},
async getAreas(){
+ let authAreaIds = getAuthAreas(this).map(item => item.id)
let city = await getparameter({
number: 'city'
}, false)
@@ -119,7 +121,14 @@ export default {
let area = await getparameter({
pid: city.detail[i].id
}, false)
- city.detail[i].children = area.detail
+
+ let resArea = []
+ area?.detail.forEach(item => {
+ if(authAreaIds.indexOf(item.id) !== -1){
+ resArea.push(item)
+ }
+ })
+ city.detail[i].children = resArea
}
this.areas = city.detail
diff --git a/src/views/schedule/schedule.vue b/src/views/schedule/schedule.vue
index 321cdcd..d50c5be 100644
--- a/src/views/schedule/schedule.vue
+++ b/src/views/schedule/schedule.vue
@@ -93,6 +93,7 @@ import {getList as nurseIndex} from '@/api/worker'
import {getparameter} from '@/api/system/dictionary'
import {getList as typeIndex} from '@/api/productType'
import {destroy} from '@/api/order'
+import { getAuthAreas,getAuthTypes } from "@/utils/auth"
import addSchedule from "@/views/schedule/component/addSchedule";
@@ -182,13 +183,13 @@ export default {
},
methods: {
async getAreas(){
- const res = await getparameter({number : 'changzhou'},false)
- this.areas = res.detail
+ this.areas = getAuthAreas(this)
+ this.select.area_id = this.areas[0]?.id
},
async getTypes(){
- const res = await typeIndex({page_size:9999,page:1},false)
- this.types = res.data
+ this.types = getAuthTypes(this)
+ this.select.product_type_id = this.types[0]?.id
},
async getProducts(){
diff --git a/src/views/schedule/scheduleList.vue b/src/views/schedule/scheduleList.vue
index a31c2c1..0491b51 100644
--- a/src/views/schedule/scheduleList.vue
+++ b/src/views/schedule/scheduleList.vue
@@ -108,6 +108,7 @@ import {parseTime} from '@/utils'
import {scheduleHome} from '@/api/schedule'
import {getList as typeList} from '@/api/productType'
import {getparameter} from '@/api/system/dictionary'
+import { getAuthAreas,getAuthTypes } from "@/utils/auth"
export default {
data() {
@@ -164,14 +165,12 @@ export default {
},
async getTypes(){
- const res = await typeList({page:1,page_size:999},false)
- this.types = res.data
- this.select.product_type_id = res.data[0].id
+ this.types = getAuthTypes(this)
+ this.select.product_type_id = this.types[0].id
},
async getAreas(){
- const res = await getparameter({number:'serveArea'})
- this.areas = res.detail
- this.select.area_id = res.detail[0].id
+ this.areas = getAuthAreas(this)
+ this.select.area_id = this.areas[0].id
}
},
computed: {
diff --git a/src/views/system/data.vue b/src/views/system/data.vue
new file mode 100644
index 0000000..2c1a6fe
--- /dev/null
+++ b/src/views/system/data.vue
@@ -0,0 +1,303 @@
+
+
+
+
+
+
+
+
+
+
+
+ 用户列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 权限列表
+
+
+
+
+
+
+
板块权限
+
+ 全选
+
+ {{ item.name }}
+
+
+
+
+
区域权限
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/permission.vue b/src/views/system/permission.vue
index e33395f..fc2422e 100644
--- a/src/views/system/permission.vue
+++ b/src/views/system/permission.vue
@@ -67,9 +67,6 @@
export default {
components: {
LxHeader
- },
- created() {
-
},
mounted() {},
data() {