This commit is contained in:
曹辉 2022-12-01 09:59:28 +08:00
parent 9b2e0c608a
commit 17241a4187
6 changed files with 324 additions and 234 deletions

View File

@ -1,12 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<title>
<%= webpackConfig.name %>
</title>
<script type="text/javascript" src="https://webapi.amap.com/maps?v=2.0&key=6b427d1f3e633c70e11ca6e304444a63"></script>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style>
html,
@ -16,6 +21,7 @@
margin: 0px;
padding: 0px;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
@ -85,7 +91,6 @@
animation: spin 1.5s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
@ -112,7 +117,6 @@
}
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
@ -133,7 +137,6 @@
right: 0;
}
.loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
@ -195,6 +198,7 @@
}
</style>
</head>
<body>
<div id="app">
<div id="loader-wrapper">
@ -205,4 +209,5 @@
</div>
</div>
</body>
</html>

View File

@ -56,6 +56,7 @@
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="OrderDetailsList"
@ -289,7 +290,21 @@
>
</el-table-column>
</el-table>
<el-form-item
label="预约服务位置"
v-if="
query.orderStatus == 'COMPLETE' || query.orderStatus == 'EVALUATED'
"
>
</el-form-item>
</el-form>
<div
id="container"
v-if="
this.query.orderStatus == 'COMPLETE' ||
this.query.orderStatus == 'EVALUATED'
"
></div>
</el-dialog>
<!-- 派单弹框 -->
<el-dialog
@ -600,5 +615,9 @@ export default indexjs;
width: 250px;
height: 250px;
}
#container {
width: 100%;
height: 600px;
}
</style>

View File

@ -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) {
@ -195,12 +239,22 @@ export default {
}
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;

View File

@ -54,6 +54,7 @@
/>
<div v-else></div>
</div>
<div class="title">请上传图片为800x800px的正方形</div>
</el-col>
</el-row>
<br />
@ -244,6 +245,12 @@ export default {
};
</script>
<style scoped lang="scss">
.title {
position: absolute;
bottom: 5%;
left: 50%;
transform: translate(-50%, 0%);
}
.avatar-upload-preview {
position: absolute;
top: 0%;

View File

@ -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/。