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/components/Editor/index.vue b/src/components/Editor/index.vue index 6bb5a18..8aa4a6c 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -60,7 +60,7 @@ export default { }, data() { return { - uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址 + uploadUrl: process.env.VUE_APP_BASE_API + "/common/richTextPictureUrl", // 上传的图片服务器地址 headers: { Authorization: "Bearer " + getToken() }, @@ -82,7 +82,7 @@ export default { [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 [{ align: [] }], // 对齐方式 ["clean"], // 清除文本格式 - ["link", "image", "video"] // 链接、图片、视频 + ["link", "image"] // 链接、图片、视频 ], }, placeholder: "请输入内容", @@ -177,6 +177,9 @@ export default { let length = quill.getSelection().index; // 插入图片 res.url为服务器返回的图片地址 quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName); + + this.$emit("imgs", res.fileName); + // 调整光标到最后 quill.setSelection(length + 1); } else { 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/OperateGoodsInfo/index.vue b/src/views/system/OperateGoodsInfo/index.vue index 9565c4e..999364b 100644 --- a/src/views/system/OperateGoodsInfo/index.vue +++ b/src/views/system/OperateGoodsInfo/index.vue @@ -356,6 +356,7 @@ style="margin-top: 20px" > 0) { + updatePicture(this.imgsurl).then((res) => {}); + } + this.imgsurl={pictureUrlList:[]}; this.open = false; this.reset(); this.StationName = "请选择所属护理站"; diff --git a/src/views/system/goodsOrder/index.vue b/src/views/system/goodsOrder/index.vue index ed5727e..10d6c0b 100644 --- a/src/views/system/goodsOrder/index.vue +++ b/src/views/system/goodsOrder/index.vue @@ -298,23 +298,24 @@ - + +
- + - +
{ this.orderList = res.data; this.innerorder = true; + this.ratelist = {} if (row.orderStatus == 'EVALUATED') { - this.ratelist = {} - selectOrderEvaluate(id).then(res => { - if (res.data) { - this.ratelist = res.data - } - }) - } else { - this.ratelist = {} - } + this.ratelist = res.data.orderEvaluatePictureInfoList + } else {} }); }, // 查看录入物流单号弹框 diff --git a/src/views/system/order/index.vue b/src/views/system/order/index.vue index 8174583..4a6bf5f 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 d6b2f7d..0fed66e 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: query.serviceLocationName, + 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: query.serviceLocationName, + direction: "top", + offset: [0, 0], + style: { + fontSize: 13, + fontWeight: "normal", + fillColor: "black", + padding: "2, 5", + backgroundColor: "", + }, + }, + }); + + 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) { @@ -184,25 +228,33 @@ export default { } }); this.query = res.data[0]; - this.query.evaluateSatisfaction = null if (row.orderStatus == 'EVALUATED') { - selectOrderEvaluate(id).then(res => { - if (res.data) { - if (res.data.evaluateSatisfaction == 'COMMONLY') { - this.query.evaluateSatisfaction = '一般' - } else if (res.data.evaluateSatisfaction == 'SATISFIED') { - this.query.evaluateSatisfaction = '满意' - } else if (res.data.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; @@ -363,4 +415,4 @@ export default { ); }, }, -}; \ No newline at end of file +}; diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue index ee48763..68ed092 100644 --- a/src/views/system/station/index.vue +++ b/src/views/system/station/index.vue @@ -298,6 +298,7 @@ 0) { updatePicture(obj).then((res) => {}); } + if (this.imgsurl.pictureUrlList.length > 0) { + updatePicture(this.imgsurl).then((res) => {}); + } + this.imgsurl={pictureUrlList:[]}; this.open = false; this.reset(); }, 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/src/views/system/stationItem/index.vue b/src/views/system/stationItem/index.vue index b90c795..e13dd38 100644 --- a/src/views/system/stationItem/index.vue +++ b/src/views/system/stationItem/index.vue @@ -144,11 +144,11 @@ align="center" prop="nurseItemName" /> - + /> -->
- @@ -271,6 +271,14 @@ type="number" min="0" /> + --> + + - - - - - + --> + 0) { updatePicture(obj).then((res) => { }); } + if (this.imgsurl.pictureUrlList.length > 0) { + updatePicture(this.imgsurl).then((res) => {}); + } + this.imgsurl={pictureUrlList:[]}; this.open = false; this.reset(); @@ -467,6 +476,7 @@ export default { this.form.nurseStationItemPrices.forEach(e => { e.price = Number(e.price) }) + this.form.nurseStationItem.advanceAppointDuration=0 updateNurseItem(this.form).then((response) => { this.$modal.msgSuccess("修改成功"); this.open = false; @@ -476,6 +486,7 @@ export default { this.form.nurseStationItemPrices.forEach(e => { e.price = Number(e.price) }) + this.form.nurseStationItem.advanceAppointDuration=0 addNurseItem(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); this.$forceUpdate(); diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index e816e11..214bdc4 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -797,19 +797,23 @@ export default { const userId = row.userId || this.ids; getUser(userId).then((response) => { this.form = response.data; - this.form.nurseStationIds = Number(this.form.nurseStationIds); + if (!this.form.nurseStationIds) { + this.form.nurseStationIds = '' + } else { + this.form.nurseStationIds = Number(this.form.nurseStationIds); + + } // if ( // !this.form.nurseStationIds || // this.form.nurseStationIds == null || // this.form.nurseStationIds.length == 0 - // ) { + // ) {getList // } else { // this.form.nurseStationIds = this.form.nurseStationIds.split(","); // this.form.nurseStationIds = this.form.nurseStationIds.map((e) => { // return (e = Number(e)); // }); // } - console.log(this.form); this.postOptions = response.posts; this.roleOptions = response.roles; @@ -835,7 +839,7 @@ export default { this.$modal.msgSuccess("修改成功,新密码是:" + value); }); }) - .catch(() => {}); + .catch(() => { }); }, /** 分配角色操作 */ handleAuthRole: function (row) { @@ -844,7 +848,6 @@ export default { }, /** 提交按钮 */ submitForm: function () { - console.log(this.form); this.$refs["form"].validate((valid) => { if (valid) { // this.form.nurseStationIds = this.form.nurseStationIds.join(","); @@ -853,13 +856,28 @@ export default { // obj.push(this.form.nurseStationIds); // console.log(obj) // this.form.nurseStationIds = obj; - console.log(this.form); + if (this.form.userId != undefined) { - updateUser(this.form).then((response) => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); - }); + if (!this.form.nurseStationIds) { + this.form.nurseStationIds = null + updateUser(this.form).then((response) => { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + // console.log('bbb',this.form) + }); + } else { + this.form.nurseStationIds = Number(this.form.nurseStationIds); + + updateUser(this.form).then((response) => { + + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + // console.log('bbb',this.form) + }); + } + } else { addUser(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); @@ -882,7 +900,7 @@ export default { this.getList(); this.$modal.msgSuccess("删除成功"); }) - .catch(() => {}); + .catch(() => { }); }, /** 导出按钮操作 */ handleExport() { @@ -918,8 +936,8 @@ export default { this.$refs.upload.clearFiles(); this.$alert( "
" + - response.msg + - "
", + response.msg + + "", "导入结果", { dangerouslyUseHTMLString: true } ); diff --git a/vue.config.js b/vue.config.js index 7b0f952..249ed1c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -52,6 +52,9 @@ module.exports = { } }, configureWebpack: { + externals: { + 'AMap': 'AMap' + }, name: name, resolve: { alias: { @@ -132,4 +135,4 @@ module.exports = { } ) } -} +} \ No newline at end of file