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> <!DOCTYPE html>
<html> <html>
<head>
<head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <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]--> <!--[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> <style>
html, html,
body, body,
@ -16,6 +20,7 @@
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
} }
.chromeframe { .chromeframe {
margin: 0.2em 0; margin: 0.2em 0;
background: #ccc; background: #ccc;
@ -85,7 +90,6 @@
animation: spin 1.5s linear infinite; animation: spin 1.5s linear infinite;
} }
@-webkit-keyframes spin { @-webkit-keyframes spin {
0% { 0% {
-webkit-transform: rotate(0deg); -webkit-transform: rotate(0deg);
@ -112,7 +116,6 @@
} }
} }
#loader-wrapper .loader-section { #loader-wrapper .loader-section {
position: fixed; position: fixed;
top: 0; top: 0;
@ -133,7 +136,6 @@
right: 0; right: 0;
} }
.loaded #loader-wrapper .loader-section.section-left { .loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%); -webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%); -ms-transform: translateX(-100%);
@ -194,8 +196,9 @@
opacity: 0.5; opacity: 0.5;
} }
</style> </style>
</head> </head>
<body>
<body>
<div id="app"> <div id="app">
<div id="loader-wrapper"> <div id="loader-wrapper">
<div id="loader"></div> <div id="loader"></div>
@ -204,5 +207,6 @@
<div class="load_title">正在加载系统资源,请耐心等待</div> <div class="load_title">正在加载系统资源,请耐心等待</div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -297,7 +297,21 @@
> >
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-form-item
label="预约服务位置"
v-if="
query.orderStatus == 'COMPLETE' || query.orderStatus == 'EVALUATED'
"
>
</el-form-item>
</el-form> </el-form>
<div
id="container"
v-if="
this.query.orderStatus == 'COMPLETE' ||
this.query.orderStatus == 'EVALUATED'
"
></div>
</el-dialog> </el-dialog>
<!-- 派单弹框 --> <!-- 派单弹框 -->
<el-dialog <el-dialog
@ -514,6 +528,7 @@ export default {
name: "order", name: "order",
data() { data() {
return { return {
map: null,
baseurl: null, baseurl: null,
orderStatuslist: [ orderStatuslist: [
{ {
@ -622,6 +637,50 @@ export default {
this.infos(); this.infos();
}, },
methods: { 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() { ordercacenl() {
var obj = { var obj = {
@ -670,6 +729,7 @@ export default {
seeLook(row) { seeLook(row) {
this.loading = true; this.loading = true;
const id = row.orderNo; const id = row.orderNo;
this.map = null;
appointmentOrderDetails(id).then((res) => { appointmentOrderDetails(id).then((res) => {
res.data.forEach((e) => { res.data.forEach((e) => {
if (e.serviceDate) { if (e.serviceDate) {
@ -678,9 +738,7 @@ export default {
} }
}); });
this.query = res.data[0]; this.query = res.data[0];
this.innerVisible4 = true;
if (row.orderStatus == "EVALUATED") { if (row.orderStatus == "EVALUATED") {
console.log(res.data)
if (res.data) { if (res.data) {
if (res.data[0].evaluateSatisfaction == "COMMONLY") { if (res.data[0].evaluateSatisfaction == "COMMONLY") {
this.query.evaluateSatisfaction = "一般"; this.query.evaluateSatisfaction = "一般";
@ -691,10 +749,22 @@ export default {
} }
this.loading = false; this.loading = false;
this.innerVisible4 = true; this.innerVisible4 = true;
setTimeout(() => {
this.init(this.query);
}, 500);
} else { } else {
this.loading = false; this.loading = false;
this.innerVisible4 = true; 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 { } else {
this.loading = false; this.loading = false;
this.innerVisible4 = true; this.innerVisible4 = true;
@ -866,5 +936,9 @@ export default {
width: 250px; width: 250px;
height: 250px; height: 250px;
} }
#container {
width: 100%;
height: 600px;
}
</style> </style>

View File

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