From c79392fd51600783e5c5443c0f5a20f7826bfca5 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Fri, 25 Feb 2022 18:13:45 +0800
Subject: [PATCH] +
---
static/map/img/img/dingwei.png | 0
store/positions.js | 16 +
static/img/dinw/dinw6.png | 0
static/map/img/img/dinw/dinw3.png | 0
static/map/img/img/dinw/dinw5.png | 0
static/img/dingwei.png | 0
store/websocket.js | 27 +++-
static/map/img/img/dinw/dinw2.png | 0
pages/grabOrders/grabOrdersZAFFPX/map.vue | 13 +
static/img/dinw/dinw3.png | 0
static/img/dinw/dinw1.png | 0
static/img/dinw/dinw5.png | 0
static/map/img/img/dinw/dinw4.png | 0
pages/grabOrders/grabOrdersZAXC/map.vue | 156 ++++++++++++++++++-------
static/map/img/img/dinw/dinw6.png | 0
static/map/img/img/dinw/dinw1.png | 0
pages/grabOrders/grabOrdersZAYWXC/map.vue | 126 ++++++++++++++------
static/img/dinw/dinw4.png | 0
static/img/dinw/dinw2.png | 0
19 files changed, 239 insertions(+), 99 deletions(-)
diff --git a/pages/grabOrders/grabOrdersZAFFPX/map.vue b/pages/grabOrders/grabOrdersZAFFPX/map.vue
index d235521..bab408d 100644
--- a/pages/grabOrders/grabOrdersZAFFPX/map.vue
+++ b/pages/grabOrders/grabOrdersZAFFPX/map.vue
@@ -1,6 +1,6 @@
<template>
<view class="content">
- <!-- <u-top-tips ref="uTips"></u-top-tips> -->
+ <u-top-tips ref="uTips"></u-top-tips>
<!-- <u-button type="info" @click="acc">测试</u-button> -->
<!-- <web-view :src="urls" @message="message"></web-view> -->
<!-- <map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markersCom"
@@ -40,6 +40,14 @@
</span>
<span class="once-right">
<span>{{ourData.fname}}</span>
+ </span>
+ </view>
+ <view class="once">
+ <span class="once-left">
+ 联系方式
+ </span>
+ <span class="once-right">
+ <span>{{ourData.phone}}</span>
</span>
</view>
<view class="once">
@@ -256,7 +264,7 @@
});
setTimeout(function() {
uni.redirectTo({
- url: "/pages/grabOrders/grabOrders?in=true"
+ url: "/pages/grabOrders/grabOrdersZAFFPX/grabOrders?in=true"
})
}, 2200)
}
@@ -327,6 +335,7 @@
serid: serid,
type: type,
// data: JSON.stringify(item),
+ goto: "grabOrdersZAFFPX",
that: that,
fn: () => {
// that.getGrabOrders(that.current); //重获取数据
diff --git a/pages/grabOrders/grabOrdersZAXC/map.vue b/pages/grabOrders/grabOrdersZAXC/map.vue
index b687a50..278097d 100644
--- a/pages/grabOrders/grabOrdersZAXC/map.vue
+++ b/pages/grabOrders/grabOrdersZAXC/map.vue
@@ -1,11 +1,10 @@
<template>
<view class="content">
- <!-- <u-top-tips ref="uTips"></u-top-tips> -->
+ <u-top-tips ref="uTips"></u-top-tips>
<!-- <u-button type="info" @click="acc">测试</u-button> -->
<!-- <web-view :src="urls" @message="message"></web-view> -->
- <map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markersCom"
- :longitude="longitude" :latitude="latitude" :circles="circlesCom" :polyline="mypolylines"
- show-location="true">
+ <map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markers"
+ :longitude="longitude" :latitude="latitude" :circles="circles" :polyline="mypolylines" show-location="true">
<cover-view class="dingwBut" @click="mapControlsBack">
<cover-image src="./map/img/dingwei.png" @click="mapControlsBack">
</cover-image>
@@ -40,6 +39,14 @@
</span>
<span class="once-right">
<span>{{ourData.fname}}</span>
+ </span>
+ </view>
+ <view class="once">
+ <span class="once-left">
+ 联系方式
+ </span>
+ <span class="once-right">
+ <span>{{ourData.phone}}</span>
</span>
</view>
<view class="once">
@@ -122,8 +129,36 @@
mapHeight: 0,
latitude: 28.687205773173343,
longitude: 115.8995839881188,
- circles: [], //圆
- markers: [], //标记点
+ circles: [{
+ latitude: '',
+ longitude: '',
+ fillColor: "#D9E6EF", //填充颜色
+ color: "#A7B6CB", //描边的颜色
+ radius: 50, //半径
+ strokeWidth: 2, //描边的宽度
+ }, {
+ latitude: '',
+ longitude: '',
+ fillColor: "#D9E6EF", //填充颜色
+ color: "#A7B6CB", //描边的颜色
+ radius: 10, //半径
+ strokeWidth: 2, //描边的宽度
+ }], //圆
+ markers: [{
+ width: 40,
+ height: 40,
+ id: 1,
+ latitude: '',
+ longitude: '',
+ iconPath: 'http://223.82.109.183:2081/zhba/upload/20220225/f0aecffbaf0a2ce80f7938569da20de7.png',
+ }, {
+ width: 40,
+ height: 40,
+ id: 2,
+ latitude: '',
+ longitude: '',
+ iconPath: 'http://223.82.109.183:2081/zhba/upload/20220225/7b486f647a15e708aca662dbd496dcd3.png',
+ }], //标记点
jihecircles: [], //集合点
jihemarkers: [], //集合点
mypolylines: [{ //指定一系列坐标点,从数组第一项连线至最后一项
@@ -166,6 +201,7 @@
iconPath: "/static/tabbar/addSelectedIcon.png",
clickable: true,
}], //地图控件
+ inThere: true,
}
},
methods: {
@@ -325,6 +361,7 @@
serid: serid,
type: type,
// data: JSON.stringify(item),
+ goto: "grabOrdersZAXC",
that: that,
fn: () => {
// that.getGrabOrders(that.current); //重获取数据
@@ -442,27 +479,34 @@
that.longitude = res.longitude
// console.log(that.latitude)
// console.log(that.longitude)
- that.map.moveToLocation({
- latitude: res.latitude,
- longitude: res.longitude
- });
+ if (that.inThere) {
+ that.inThere = false;
+ that.map.moveToLocation({
+ latitude: res.latitude,
+ longitude: res.longitude
+ });
+ }
// that.mover(res.longitude, res.latitude); //移动
// that.$store.commit("setMsg",d)
//标记点
- that.markers = [{
- id: 1,
- latitude: res.latitude,
- longitude: res.longitude,
- iconPath: './map/img/dinw/dinw1.png',
- }]
- that.circles = [{ //在地图上显示圆
- latitude: res.latitude,
- longitude: res.longitude,
- fillColor: "#D9E6EF", //填充颜色
- color: "#A7B6CB", //描边的颜色
- radius: 10, //半径
- strokeWidth: 2 //描边的宽度
- }]
+ that.markers[1].latitude = res.latitude;
+ that.markers[1].longitude = res.longitude;
+ that.circles[1].latitude = res.latitude;
+ that.circles[1].longitude = res.longitude;
+ // that.markers = [{
+ // id: 1,
+ // latitude: res.latitude,
+ // longitude: res.longitude,
+ // iconPath: './map/img/dinw/dinw1.png',
+ // }]
+ // that.circles = [{ //在地图上显示圆
+ // latitude: res.latitude,
+ // longitude: res.longitude,
+ // fillColor: "#D9E6EF", //填充颜色
+ // color: "#A7B6CB", //描边的颜色
+ // radius: 10, //半径
+ // strokeWidth: 2 //描边的宽度
+ // }]
if (val != "notSet") {
let d = {
id: that.ourData.id,
@@ -557,12 +601,27 @@
return this.$store.state.isOnTaskValue;
}
},
- circlesCom() {
- return [...this.circles.slice(0), ...this.jihecircles.slice(0)];
- },
- markersCom() {
- return [...this.markers.slice(0), ...this.jihemarkers.slice(0)];
- },
+ // circlesCom() {
+ // // let d = [...this.circles, ...this.jihecircles];
+ // let d = [{
+ // id: 1,
+ // latitude: +data.latlong[0],
+ // longitude: +data.latlong[1],
+ // iconPath: './map/img/dinw/dinw6.png',
+ // }, {
+ // id: 2,
+ // latitude: +data.latlong[0],
+ // longitude: +data.latlong[1],
+ // iconPath: './map/img/dinw/dinw6.png',
+ // }];
+
+ // return d;
+ // },
+ // markersCom() {
+ // let d = [...this.markers, ...this.jihemarkers];
+ // console.log(d, 6666)
+ // return d;
+ // },
// mypolylinesCom() {
// // console.log(this.mypolylines,"333333333333333333333")
// return this.mypolylines.slice(0);
@@ -754,24 +813,27 @@
data["latlong"] = data.gather.split(",");
}
that.ourData = data;
- this.latitude = data.latlong[0];
- this.longitude = data.latlong[1];
-
+ this.latitude = +data.latlong[0];
+ this.longitude = +data.latlong[1];
+ that.markers[0].latitude = data.latlong[0];
+ that.markers[0].longitude = data.latlong[1];
+ that.circles[0].latitude = data.latlong[0];
+ that.circles[0].longitude = data.latlong[1];
//集合标记点
- that.markers = [{
- id: 1,
- latitude: data.latlong[0],
- longitude: data.latlong[1],
- iconPath: './map/img/dinw/dinw6.png',
- }]
- that.circles = [{ //在地图上显示圆
- latitude: data.latlong[0],
- longitude: data.latlong[1],
- fillColor: "#D9E6EF", //填充颜色
- color: "#A7B6CB", //描边的颜色
- radius: 20, //半径
- strokeWidth: 2 //描边的宽度
- }]
+ // that.jihecircles = [{
+ // id: 444,
+ // latitude: +data.latlong[0],
+ // longitude: +data.latlong[1],
+ // iconPath: './map/img/dinw/dinw6.png',
+ // }]
+ // that.jihemarkers = [{ //在地图上显示圆
+ // latitude: +data.latlong[0],
+ // longitude: +data.latlong[1],
+ // fillColor: "#D9E6EF", //填充颜色
+ // color: "#A7B6CB", //描边的颜色
+ // radius: 20, //半径
+ // strokeWidth: 2 //描边的宽度
+ // }]
uni.getSystemInfo({ //初始化地图高度
success(res) {
diff --git a/pages/grabOrders/grabOrdersZAYWXC/map.vue b/pages/grabOrders/grabOrdersZAYWXC/map.vue
index 77b6379..2841142 100644
--- a/pages/grabOrders/grabOrdersZAYWXC/map.vue
+++ b/pages/grabOrders/grabOrdersZAYWXC/map.vue
@@ -1,11 +1,10 @@
<template>
<view class="content">
- <!-- <u-top-tips ref="uTips"></u-top-tips> -->
+ <u-top-tips ref="uTips"></u-top-tips>
<!-- <u-button type="info" @click="acc">测试</u-button> -->
<!-- <web-view :src="urls" @message="message"></web-view> -->
- <map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markersCom"
- :longitude="longitude" :latitude="latitude" :circles="circlesCom" :polyline="mypolylines"
- show-location="true">
+ <map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markers"
+ :longitude="longitude" :latitude="latitude" :circles="circles" :polyline="mypolylines" show-location="true">
<cover-view class="dingwBut" @click="mapControlsBack">
<cover-image src="./map/img/dingwei.png" @click="mapControlsBack">
</cover-image>
@@ -40,6 +39,14 @@
</span>
<span class="once-right">
<span>{{ourData.fname}}</span>
+ </span>
+ </view>
+ <view class="once">
+ <span class="once-left">
+ 联系方式
+ </span>
+ <span class="once-right">
+ <span>{{ourData.phone}}</span>
</span>
</view>
<view class="once">
@@ -122,8 +129,36 @@
mapHeight: 0,
latitude: 28.687205773173343,
longitude: 115.8995839881188,
- circles: [], //圆
- markers: [], //标记点
+ circles: [{
+ latitude: '',
+ longitude: '',
+ fillColor: "#D9E6EF", //填充颜色
+ color: "#A7B6CB", //描边的颜色
+ radius: 50, //半径
+ strokeWidth: 2, //描边的宽度
+ }, {
+ latitude: '',
+ longitude: '',
+ fillColor: "#D9E6EF", //填充颜色
+ color: "#A7B6CB", //描边的颜色
+ radius: 10, //半径
+ strokeWidth: 2, //描边的宽度
+ }], //圆
+ markers: [{
+ width: 40,
+ height: 40,
+ id: 1,
+ latitude: '',
+ longitude: '',
+ iconPath: 'http://223.82.109.183:2081/zhba/upload/20220225/f0aecffbaf0a2ce80f7938569da20de7.png',
+ }, {
+ width: 40,
+ height: 40,
+ id: 2,
+ latitude: '',
+ longitude: '',
+ iconPath: 'http://223.82.109.183:2081/zhba/upload/20220225/7b486f647a15e708aca662dbd496dcd3.png',
+ }], //标记点
jihecircles: [], //集合点
jihemarkers: [], //集合点
mypolylines: [{ //指定一系列坐标点,从数组第一项连线至最后一项
@@ -166,6 +201,7 @@
iconPath: "/static/tabbar/addSelectedIcon.png",
clickable: true,
}], //地图控件
+ inThere: true,
}
},
methods: {
@@ -279,7 +315,7 @@
this.bye = true;
uni.redirectTo({
url: '/pages/grabOrders/grabOrdersZAYWXC/feedback?data=' + JSON.stringify(this
- .ourData) +
+ .ourData) +
'&other="11111"'
});
} else if (that.ourData.butCT == "begin") {
@@ -325,6 +361,7 @@
rid: rid,
serid: serid,
type: type,
+ goto: "grabOrdersZAYWXC",
// data: JSON.stringify(item),
that: that,
fn: () => {
@@ -443,27 +480,34 @@
that.longitude = res.longitude
// console.log(that.latitude)
// console.log(that.longitude)
- that.map.moveToLocation({
- latitude: res.latitude,
- longitude: res.longitude
- });
+ if (that.inThere) {
+ that.inThere = false;
+ that.map.moveToLocation({
+ latitude: res.latitude,
+ longitude: res.longitude
+ });
+ }
// that.mover(res.longitude, res.latitude); //移动
// that.$store.commit("setMsg",d)
//标记点
- that.markers = [{
- id: 1,
- latitude: res.latitude,
- longitude: res.longitude,
- iconPath: './map/img/dinw/dinw1.png',
- }]
- that.circles = [{ //在地图上显示圆
- latitude: res.latitude,
- longitude: res.longitude,
- fillColor: "#D9E6EF", //填充颜色
- color: "#A7B6CB", //描边的颜色
- radius: 10, //半径
- strokeWidth: 2 //描边的宽度
- }]
+ that.markers[1].latitude = res.latitude;
+ that.markers[1].longitude = res.longitude;
+ that.circles[1].latitude = res.latitude;
+ that.circles[1].longitude = res.longitude;
+ // that.markers = [{
+ // id: 1,
+ // latitude: res.latitude,
+ // longitude: res.longitude,
+ // iconPath: './map/img/dinw/dinw1.png',
+ // }]
+ // that.circles = [{ //在地图上显示圆
+ // latitude: res.latitude,
+ // longitude: res.longitude,
+ // fillColor: "#D9E6EF", //填充颜色
+ // color: "#A7B6CB", //描边的颜色
+ // radius: 10, //半径
+ // strokeWidth: 2 //描边的宽度
+ // }]
if (val != "notSet") {
let d = {
id: that.ourData.id,
@@ -759,20 +803,24 @@
this.longitude = data.latlong[1];
//集合标记点
- that.markers = [{
- id: 1,
- latitude: data.latlong[0],
- longitude: data.latlong[1],
- iconPath: './map/img/dinw/dinw6.png',
- }]
- that.circles = [{ //在地图上显示圆
- latitude: data.latlong[0],
- longitude: data.latlong[1],
- fillColor: "#D9E6EF", //填充颜色
- color: "#A7B6CB", //描边的颜色
- radius: 20, //半径
- strokeWidth: 2 //描边的宽度
- }]
+ that.markers[0].latitude = data.latlong[0];
+ that.markers[0].longitude = data.latlong[1];
+ that.circles[0].latitude = data.latlong[0];
+ that.circles[0].longitude = data.latlong[1];
+ // that.jihecircles = [{
+ // id: 444,
+ // latitude: data.latlong[0],
+ // longitude: data.latlong[1],
+ // iconPath: './map/img/dinw/dinw6.png',
+ // }]
+ // that.jihemarkers = [{ //在地图上显示圆
+ // latitude: data.latlong[0],
+ // longitude: data.latlong[1],
+ // fillColor: "#D9E6EF", //填充颜色
+ // color: "#A7B6CB", //描边的颜色
+ // radius: 20, //半径
+ // strokeWidth: 2 //描边的宽度
+ // }]
uni.getSystemInfo({ //初始化地图高度
success(res) {
diff --git a/static/img/dingwei.png b/static/img/dingwei.png
new file mode 100644
index 0000000..58a917e
--- /dev/null
+++ b/static/img/dingwei.png
Binary files differ
diff --git a/static/img/dinw/dinw1.png b/static/img/dinw/dinw1.png
new file mode 100644
index 0000000..080b720
--- /dev/null
+++ b/static/img/dinw/dinw1.png
Binary files differ
diff --git a/static/img/dinw/dinw2.png b/static/img/dinw/dinw2.png
new file mode 100644
index 0000000..a51e5d0
--- /dev/null
+++ b/static/img/dinw/dinw2.png
Binary files differ
diff --git a/static/img/dinw/dinw3.png b/static/img/dinw/dinw3.png
new file mode 100644
index 0000000..76b6f88
--- /dev/null
+++ b/static/img/dinw/dinw3.png
Binary files differ
diff --git a/static/img/dinw/dinw4.png b/static/img/dinw/dinw4.png
new file mode 100644
index 0000000..cd5de4d
--- /dev/null
+++ b/static/img/dinw/dinw4.png
Binary files differ
diff --git a/static/img/dinw/dinw5.png b/static/img/dinw/dinw5.png
new file mode 100644
index 0000000..79a421a
--- /dev/null
+++ b/static/img/dinw/dinw5.png
Binary files differ
diff --git a/static/img/dinw/dinw6.png b/static/img/dinw/dinw6.png
new file mode 100644
index 0000000..772af08
--- /dev/null
+++ b/static/img/dinw/dinw6.png
Binary files differ
diff --git a/static/map/img/img/dingwei.png b/static/map/img/img/dingwei.png
new file mode 100644
index 0000000..58a917e
--- /dev/null
+++ b/static/map/img/img/dingwei.png
Binary files differ
diff --git a/static/map/img/img/dinw/dinw1.png b/static/map/img/img/dinw/dinw1.png
new file mode 100644
index 0000000..080b720
--- /dev/null
+++ b/static/map/img/img/dinw/dinw1.png
Binary files differ
diff --git a/static/map/img/img/dinw/dinw2.png b/static/map/img/img/dinw/dinw2.png
new file mode 100644
index 0000000..a51e5d0
--- /dev/null
+++ b/static/map/img/img/dinw/dinw2.png
Binary files differ
diff --git a/static/map/img/img/dinw/dinw3.png b/static/map/img/img/dinw/dinw3.png
new file mode 100644
index 0000000..76b6f88
--- /dev/null
+++ b/static/map/img/img/dinw/dinw3.png
Binary files differ
diff --git a/static/map/img/img/dinw/dinw4.png b/static/map/img/img/dinw/dinw4.png
new file mode 100644
index 0000000..cd5de4d
--- /dev/null
+++ b/static/map/img/img/dinw/dinw4.png
Binary files differ
diff --git a/static/map/img/img/dinw/dinw5.png b/static/map/img/img/dinw/dinw5.png
new file mode 100644
index 0000000..79a421a
--- /dev/null
+++ b/static/map/img/img/dinw/dinw5.png
Binary files differ
diff --git a/static/map/img/img/dinw/dinw6.png b/static/map/img/img/dinw/dinw6.png
new file mode 100644
index 0000000..772af08
--- /dev/null
+++ b/static/map/img/img/dinw/dinw6.png
Binary files differ
diff --git a/store/positions.js b/store/positions.js
index 8142ed7..af5163b 100644
--- a/store/positions.js
+++ b/store/positions.js
@@ -89,15 +89,21 @@
serid = val.serid,
type = val.type,
that = val.that,
+ goto1 = val.goto,
// data = val.data,
tips = (type, title) => {
- that.$refs.uTips.show({
- title: title,
- type: type,
- duration: '2300'
- })
+ if (that.$refs.uTips) {
+ that.$refs.uTips.show({
+ title: title,
+ type: type,
+ duration: '2300'
+ })
+ }
// that.getGrabOrders(that.current); //重获取数据
}
+ if (type == "start") {
+ type = goto1 + ',' + type
+ }
uni.request({
url: $store.state.piAPI + "taskqd/startTask?" +
`rid=${rid}&serid=${serid}&type=${type}`,
diff --git a/store/websocket.js b/store/websocket.js
index 0be862c..37a2c84 100644
--- a/store/websocket.js
+++ b/store/websocket.js
@@ -60,7 +60,7 @@
state.socket = value;
},
setSocketValue(state, value) {
- // console.log(value)
+ console.log(value, 222222222222)
// if (value.router) { //正常数据返回
// //去除心跳数据
// if (value.router == 'share/heartbeat') {
@@ -72,12 +72,24 @@
// } else { //异常数据返回
// console.log(value, '异常')
// }
- if (state.socketValue.type === "start") {
+ let route;
+ let type;
+ let types111 = state.socketValue.type.split(",");
+ if (types111.length > 1) {
+ route = types111[0];
+ type = types111[1];
+
+ } else {
+ type = types111[0];
+ }
+ console.log()
+ if (type === "start") {
let types = uni.getSystemInfoSync().platform;
let
d = {
serid: uni.getStorageSync("ids") || $store.state.puserID,
type: 0,
+ tasktype: route == "grabOrdersZAXC" ? 0 : (route == "grabOrdersZAYWXC" ? 1 : 2)
};
let routes = getCurrentPages(); //获取当前页面栈
let curRoute = routes[routes.length - 1].route; //获取当前页面的路由
@@ -106,17 +118,20 @@
isOn: true
});
console.log(val)
-
+ let url = "/pages/grabOrders/map?data=" + JSON.stringify(val);
+ if (route) {
+ url = "/pages/grabOrders/" + route + "/map?data=" + JSON.stringify(val);
+ }
+ console.log(url)
// if (types == "android", curRoute != "pages/grabOrders/map") {
if (curRoute != "pages/grabOrders/map") {
uni.navigateTo({
- url: "/pages/grabOrders/map?data=" + JSON.stringify(
- val),
+ url: url,
});
return
}
uni.redirectTo({
- url: "/pages/grabOrders/map?data=" + JSON.stringify(val),
+ url: url,
});
} else {
continue;
--
Gitblit v1.9.3