This commit is contained in:
曹辉 2022-12-01 11:06:09 +08:00
parent 4bfe8d7a1f
commit 2553e9692f
3 changed files with 391 additions and 311 deletions

View File

@ -1,13 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<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>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<script type="text/javascript" src="https://webapi.amap.com/maps?v=2.0&key=6b427d1f3e633c70e11ca6e304444a63"></script>
<style>
html,
body,
@ -16,6 +20,7 @@
margin: 0px;
padding: 0px;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
@ -85,7 +90,6 @@
animation: spin 1.5s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
@ -112,7 +116,6 @@
}
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
@ -133,7 +136,6 @@
right: 0;
}
.loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
@ -194,8 +196,9 @@
opacity: 0.5;
}
</style>
</head>
<body>
</head>
<body>
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>
@ -204,5 +207,6 @@
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
</body>
</body>
</html>

View File

@ -297,7 +297,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
@ -514,6 +528,7 @@ export default {
name: "order",
data() {
return {
map: null,
baseurl: null,
orderStatuslist: [
{
@ -622,6 +637,50 @@ export default {
this.infos();
},
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 = {
@ -670,6 +729,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) {
@ -678,9 +738,7 @@ export default {
}
});
this.query = res.data[0];
this.innerVisible4 = true;
if (row.orderStatus == "EVALUATED") {
console.log(res.data)
if (res.data) {
if (res.data[0].evaluateSatisfaction == "COMMONLY") {
this.query.evaluateSatisfaction = "一般";
@ -691,10 +749,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;
@ -866,5 +936,9 @@ export default {
width: 250px;
height: 250px;
}
#container {
width: 100%;
height: 600px;
}
</style>

View File

@ -52,6 +52,9 @@ module.exports = {
}
},
configureWebpack: {
externals: {
'AMap': 'AMap'
},
name: name,
resolve: {
alias: {
@ -125,8 +128,7 @@ module.exports = {
}
}
})
config.optimization.runtimeChunk('single'),
{
config.optimization.runtimeChunk('single'), {
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
to: './' //到根目录下
}