diff --git a/src/layout/components/aside.vue b/src/layout/components/aside.vue
index bdaed0d..4241185 100644
--- a/src/layout/components/aside.vue
+++ b/src/layout/components/aside.vue
@@ -17,7 +17,7 @@
>
-
+
{{ item.meta.title }}
@@ -40,8 +40,9 @@
-
+
+
{{ item.meta.title }}
@@ -56,12 +57,17 @@ import { routes } from '@/router/index'
import { useUserStore } from '@/stores/user'
const isAdmin =
+ useUserStore().userInfo?.jurisdictions &&
useUserStore().userInfo?.jurisdictions?.findIndex((item) => item.code === 'superadmin') !== -1
+console.log(useUserStore().userInfo)
+console.log(isAdmin)
+
const filterRoute = (arr) => {
+ const arr1 = JSON.parse(JSON.stringify(arr))
let tempArr = []
- tempArr = arr.filter((item) => !item.meta?.needAdmin)
- arr.forEach((item) => {
+ tempArr = arr1.filter((item) => !item.meta?.needAdmin)
+ arr1.forEach((item) => {
if (item.children && item.children.length > 0) {
item.children = filterRoute(item.children)
}
@@ -70,6 +76,9 @@ const filterRoute = (arr) => {
}
const asideRouter = isAdmin ? routes : filterRoute(routes)
+console.log('asideRouter', asideRouter)
+console.log('routes', routes)
+console.log(filterRoute(routes))
const route = useRoute()
diff --git a/src/router/index.js b/src/router/index.js
index 60130f7..ea134ae 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -10,18 +10,18 @@ export const routes = [
{
path: '/',
component: Layout,
- redirect: '/WorkbenchPage',
+ redirect: '/BusinessManage/StoreManage',
children: [
- {
- path: 'WorkbenchPage',
- name: 'WorkbenchPage',
- component: () => import('@/views/WorkbenchPage/index.vue'),
- meta: { title: '工作台' },
- },
+ // {
+ // path: 'WorkbenchPage',
+ // name: 'WorkbenchPage',
+ // component: () => import('@/views/WorkbenchPage/index.vue'),
+ // meta: { title: '工作台' },
+ // },
{
path: 'BusinessManage',
name: 'BusinessManage',
- redirect: '/BusinessManage/EnterpriseManage',
+ redirect: '/BusinessManage/StoreManage',
meta: { title: '门店管理' },
children: [
{
@@ -48,7 +48,7 @@ export const routes = [
path: 'CustomerManage',
name: 'CustomerManage',
component: () => import('@/views/CustomerManage/index.vue'),
- meta: { title: 'C端管理' },
+ meta: { title: 'C端管理', needAdmin: true },
},
{
path: 'StoreReview',
diff --git a/src/views/BusinessManage/DataManageDialog.vue b/src/views/BusinessManage/DataManageDialog.vue
index 602ece8..94737ff 100644
--- a/src/views/BusinessManage/DataManageDialog.vue
+++ b/src/views/BusinessManage/DataManageDialog.vue
@@ -118,7 +118,7 @@ const delImage = (item) => {
style="width: 100%; height: 100%"
:src="item"
show-progress
- :preview-src-list="images"
+ :preview-src-list="[item]"
fit="cover"
/>
diff --git a/src/views/BusinessManage/HandleDialog.vue b/src/views/BusinessManage/HandleDialog.vue
index 790ec54..e9c8aec 100644
--- a/src/views/BusinessManage/HandleDialog.vue
+++ b/src/views/BusinessManage/HandleDialog.vue
@@ -133,12 +133,20 @@ const set_main_image = (val) => {
-
+
@@ -183,5 +191,16 @@ const set_main_image = (val) => {
.main_image_box {
width: 370px;
height: 130px;
+ position: relative;
+ img {
+ width: 100%;
+ height: 100%;
+ }
+ .closeBox {
+ position: absolute;
+ right: 0;
+ top: 0;
+ cursor: pointer;
+ }
}
diff --git a/src/views/BusinessManage/index.vue b/src/views/BusinessManage/index.vue
index cf43521..bd6ea65 100644
--- a/src/views/BusinessManage/index.vue
+++ b/src/views/BusinessManage/index.vue
@@ -66,9 +66,13 @@
- 编辑
+
+ 编辑
+
- 删除
+
+ 删除
+
diff --git a/src/views/CustomerManage/index.vue b/src/views/CustomerManage/index.vue
index 959c938..010d70d 100644
--- a/src/views/CustomerManage/index.vue
+++ b/src/views/CustomerManage/index.vue
@@ -1,43 +1,54 @@
-
-
- C端管理
-
-
-
-
-
+
+
C端管理
+
+
+
+
-
-
- 搜索
-
-
- 重置
-
-
-
+
+ 搜索
+ 重置
+
+
-
-
- 新建
-
-
-
-
-
-
-
-
-
-
-
-
- {{ row.updateTime && dayjs(row.updateTime).format('YYYY-MM-DD HH:mm:ss') }}
-
-
-
-
+
+ 新建
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ row.appointment_time &&
+ dayjs(row.appointment_time * 1000).format('YYYY-MM-DD HH:mm:ss')
+ }}
+
+
+
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 选择坐标
-
-
-
+
+
基本信息
+
+
+
门店名称
+
{{ store.store_name }}
+
+
+
地址详情
+
{{ store.address }}
+
+
+
地区
+
{{ store.location }}
+
+
+
工作时间
+
{{ store.business_hours }}
+
+
+
联系电话
+
{{ store.contact_phone }}
+
+
+
分类标签
+
{{ store.tags }}
+
+
+
+
经度
+
{{ store.longitude }}
+
+
+
纬度
+
{{ store.latitude }}
+
+
+
分类信息
+
+
-
-
-