From 17241a41872fe409154e045fe7516999f2184262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Thu, 1 Dec 2022 09:59:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 361 ++++++++++++----------- src/permission.js | 74 ++--- src/views/system/order/index.vue | 19 ++ src/views/system/order/indexjs.js | 90 ++++-- src/views/system/stationAvatar/index.vue | 9 +- vue.config.js | 5 + 6 files changed, 324 insertions(+), 234 deletions(-) diff --git a/public/index.html b/public/index.html index 925455c..796ec40 100644 --- a/public/index.html +++ b/public/index.html @@ -1,208 +1,213 @@ - + + - <%= webpackConfig.name %> + + <%= webpackConfig.name %> + + + - + - #loader-wrapper .load_title { - font-family: 'Open Sans'; - color: #FFF; - font-size: 19px; - width: 100%; - text-align: center; - z-index: 9999999999999; - position: absolute; - top: 60%; - opacity: 1; - line-height: 30px; - } - - #loader-wrapper .load_title span { - font-weight: normal; - font-style: italic; - font-size: 13px; - color: #FFF; - opacity: 0.5; - } - - - +
-
-
-
-
-
正在加载系统资源,请耐心等待
+
+
+
+
+
正在加载系统资源,请耐心等待
-
- +
+ + diff --git a/src/permission.js b/src/permission.js index 6bb0a1f..4bf365b 100644 --- a/src/permission.js +++ b/src/permission.js @@ -11,46 +11,46 @@ NProgress.configure({ showSpinner: false }) const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] router.beforeEach((to, from, next) => { - NProgress.start() - if (getToken()) { - to.meta.title && store.dispatch('settings/setTitle', to.meta.title) - /* has token*/ - if (to.path === '/login') { - next({ path: '/' }) - NProgress.done() + NProgress.start() + if (getToken()) { + to.meta.title && store.dispatch('settings/setTitle', to.meta.title) + /* has token*/ + if (to.path === '/login') { + next({ path: '/' }) + NProgress.done() + } else { + if (store.getters.roles.length === 0) { + isRelogin.show = true + // 判断当前用户是否已拉取完user_info信息 + store.dispatch('GetInfo').then(() => { + isRelogin.show = false + store.dispatch('GenerateRoutes').then(accessRoutes => { + // 根据roles权限生成可访问的路由表 + router.addRoutes(accessRoutes) // 动态添加可访问路由表 + next({...to, replace: true }) // hack方法 确保addRoutes已完成 + }) + }).catch(err => { + store.dispatch('LogOut').then(() => { + Message.error(err) + next({ path: '/' }) + }) + }) + } else { + next() + } + } } else { - if (store.getters.roles.length === 0) { - isRelogin.show = true - // 判断当前用户是否已拉取完user_info信息 - store.dispatch('GetInfo').then(() => { - isRelogin.show = false - store.dispatch('GenerateRoutes').then(accessRoutes => { - // 根据roles权限生成可访问的路由表 - router.addRoutes(accessRoutes) // 动态添加可访问路由表 - next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 - }) - }).catch(err => { - store.dispatch('LogOut').then(() => { - Message.error(err) - next({ path: '/' }) - }) - }) - } else { - next() - } + // 没有token + if (whiteList.indexOf(to.path) !== -1) { + // 在免登录白名单,直接进入 + next() + } else { + next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 + NProgress.done() + } } - } else { - // 没有token - if (whiteList.indexOf(to.path) !== -1) { - // 在免登录白名单,直接进入 - next() - } else { - next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 - NProgress.done() - } - } }) router.afterEach(() => { - NProgress.done() + NProgress.done() }) diff --git a/src/views/system/order/index.vue b/src/views/system/order/index.vue index 8174583..12e10da 100644 --- a/src/views/system/order/index.vue +++ b/src/views/system/order/index.vue @@ -56,6 +56,7 @@ > + + + +
diff --git a/src/views/system/order/indexjs.js b/src/views/system/order/indexjs.js index bf81437..fde8da8 100644 --- a/src/views/system/order/indexjs.js +++ b/src/views/system/order/indexjs.js @@ -7,15 +7,13 @@ import { xylWeChatRefundNotify, appointmentOrderDetails, } from "@/api/system/order"; -import { - selectOrderEvaluate -} from "@/api/system/goodsOrder"; import { getListByUser } from "@/api/system/userlist.js"; import baseurl from '@/api/baseurl.js' export default { name: "order", data() { return { + map: null, baseurl: null, orderStatuslist: [{ value: "WAIT_PAY", @@ -127,7 +125,52 @@ export default { this.getList(); this.baseurl = baseurl }, + mounted() {}, methods: { + init(query) { + this.map = new AMap.Map("container", { + resizeEnable: true, //设置地图可缩放 + zoom: 18, //设置地图的层级 + center: [query.serveLocationLongitude, query.serveLocationLatitude], //设置地图中心点 更多配置项参照高德官网的配置 + }); + var layer = new AMap.LabelsLayer({ + zooms: [3, 20], + zIndex: 1000, + // 开启标注避让,默认为开启,v1.4.15 新增属性 + collision: true, + // 开启标注淡入动画,默认为开启,v1.4.15 新增属性 + animation: true, + }); + this.map.add(layer); + var labelMarker = new AMap.LabelMarker({ + name: "", + position: [query.serveLocationLongitude, query.serveLocationLatitude], + icon: { + type: "image", + image: "https://a.amap.com/jsapi_demos/static/images/poi-marker.png", + clipOrigin: [280, 8], + clipSize: [50, 68], + size: [25, 34], + anchor: "bottom-center", + angel: 0, + retina: true, + }, + text: { + content: "", + direction: "top", + offset: [0, 0], + style: { + fontSize: 13, + fontWeight: "normal", + fillColor: "#fff", + padding: "2, 5", + backgroundColor: "#22884f", + }, + }, + }); + + layer.add(labelMarker); + }, //取消预约确定按钮 ordercacenl() { var obj = { @@ -176,6 +219,7 @@ export default { seeLook(row) { this.loading = true const id = row.orderNo; + this.map = null appointmentOrderDetails(id).then((res) => { res.data.forEach((e) => { if (e.serviceDate) { @@ -185,22 +229,32 @@ export default { }); this.query = res.data[0]; if (row.orderStatus == 'EVALUATED') { - if (res.data) { - if (res.data[0].evaluateSatisfaction == 'COMMONLY') { - this.query.evaluateSatisfaction = '一般' - } else if (res.data[0].evaluateSatisfaction == 'SATISFIED') { - this.query.evaluateSatisfaction = '满意' - } else if (res.data[0].evaluateSatisfaction == 'DISSATISFIED') { - this.query.evaluateSatisfaction = '不满意' - } - this.loading = false - this.innerVisible4 = true; - - } else { - this.loading = false - this.innerVisible4 = true; + if (res.data) { + if (res.data[0].evaluateSatisfaction == 'COMMONLY') { + this.query.evaluateSatisfaction = '一般' + } else if (res.data[0].evaluateSatisfaction == 'SATISFIED') { + this.query.evaluateSatisfaction = '满意' + } else if (res.data[0].evaluateSatisfaction == 'DISSATISFIED') { + this.query.evaluateSatisfaction = '不满意' } - + this.loading = false + this.innerVisible4 = true; + setTimeout(() => { + this.init(this.query) + }, 500); + } else { + this.loading = false + this.innerVisible4 = true; + setTimeout(() => { + this.init(this.query) + }, 500); + } + } else if (row.orderStatus == 'COMPLETE') { + this.loading = false + this.innerVisible4 = true; + setTimeout(() => { + this.init(this.query) + }, 500); } else { this.loading = false this.innerVisible4 = true; diff --git a/src/views/system/stationAvatar/index.vue b/src/views/system/stationAvatar/index.vue index 74f8da9..19235f7 100644 --- a/src/views/system/stationAvatar/index.vue +++ b/src/views/system/stationAvatar/index.vue @@ -54,6 +54,7 @@ />
+
请上传图片为800x800px的正方形

@@ -244,6 +245,12 @@ export default { }; \ No newline at end of file + diff --git a/vue.config.js b/vue.config.js index 7b0f952..ca5c4cc 100644 --- a/vue.config.js +++ b/vue.config.js @@ -15,6 +15,11 @@ const port = process.env.port || process.env.npm_config_port || 82 // 端口 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions // 这里只列一部分,具体配置参考文档 module.exports = { + configureWebpack: { + externals: { + 'AMap': 'AMap' + }, + }, // 部署生产环境和开发环境下的URL。 // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.xinyilu.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.xinyilu.vip/admin/,则设置 baseUrl 为 /admin/。