Commit daecaf21 authored by 华国豪's avatar 华国豪 🙄

优化地图, 优化积分商城商品订单列表

parent d98b2917
...@@ -12,7 +12,10 @@ ...@@ -12,7 +12,10 @@
} }
.color-info>span{ .color-info>span{
font-size: 14px; font-size: 14px;
padding-right: 15px; display: flex;
align-items: center;
justify-content: space-around;
width: 120px;
} }
.color-info .raius-color{ .color-info .raius-color{
height: 10px; height: 10px;
...@@ -29,8 +32,25 @@ ...@@ -29,8 +32,25 @@
<div class="customerMap"> <div class="customerMap">
<div :style="{height:'100%',width:'100%'}" ref="myEchart" id="centerMpBaidu"></div> <div :style="{height:'100%',width:'100%'}" ref="myEchart" id="centerMpBaidu"></div>
<div class="color-info"> <div class="color-info">
<span class="b">正式: <span class="raius-color"></span></span> <span class="b">&nbsp;&nbsp;&nbsp;正式:
<span class="g">非正式: <span class="raius-color"></span></span> <span class="raius-color"></span>
<el-switch
@change="changeSwitch"
size="mini"
v-model="value1">
</el-switch>
</span>
<br>
<span class="g">非正式:
<span class="raius-color"></span>
<el-switch
@change="changeSwitch"
size="mini"
style="display: block"
v-model="value2"
active-color="#13ce66">
</el-switch>
</span>
</div> </div>
</div> </div>
</template> </template>
...@@ -38,8 +58,11 @@ ...@@ -38,8 +58,11 @@
export default { export default {
data() { data() {
return { return {
map: {}, map: null,
value1: true,
value2: true,
baiduMapData: [], baiduMapData: [],
changebaiduMapData: [],
centerP: null, centerP: null,
options0: { options0: {
size: BMAP_POINT_SIZE_BIGGER, size: BMAP_POINT_SIZE_BIGGER,
...@@ -56,25 +79,47 @@ export default { ...@@ -56,25 +79,47 @@ export default {
}; };
}, },
methods: { methods: {
changeSwitch(e){
let list = [];
let data = JSON.parse(JSON.stringify(this.baiduMapData));
let value1 = this.value1;
let value2 = this.value2;
if (value1 && value2) {
this.creatMap(data)
} else {
data.forEach(item => {
if(value1 && !value2 && item.type == 0) {
list.push(item)
} else if (!value1 && value2 && item.type == 1){
list.push(item)
}
})
this.creatMap(list)
}
},
creatMap(arr, type){ creatMap(arr, type){
let _this = this let _this = this
//实例化,并设置最大最小缩放层级 //实例化,并设置最大最小缩放层级
this.map = new BMap.Map("centerMpBaidu", { if(this.map) {
minZoom: 3, this.map.clearOverlays()
maxZoom: 20,
});
//设置中心点、默认缩放层级
if (_this.centerP) {
this.map.centerAndZoom(new BMap.Point(_this.centerP.Lng, _this.centerP.Lat), 10);
} else { } else {
this.map.centerAndZoom(new BMap.Point(104.0727017791, 30.6643622306), 10); this.map = new BMap.Map("centerMpBaidu", {
minZoom: 3,
maxZoom: 20,
});
//设置中心点、默认缩放层级
if (_this.centerP) {
this.map.centerAndZoom(new BMap.Point(_this.centerP.Lng, _this.centerP.Lat), 10);
} else {
this.map.centerAndZoom(new BMap.Point(104.0727017791, 30.6643622306), 10);
}
this.map.setMapStyleV2({
styleId: '33046c341768c2774ab011cc7cf013d1'
});
this.map.enableScrollWheelZoom(true);
} }
this.map.setMapStyleV2({
styleId: '33046c341768c2774ab011cc7cf013d1'
});
//可以鼠标缩放 //可以鼠标缩放
this.map.enableScrollWheelZoom(true); const points = arr;
const points = this.baiduMapData;
let list0 = [], list1 = []; let list0 = [], list1 = [];
points.forEach(item => { points.forEach(item => {
let obj = new BMap.Point(item.Lng, item.Lat) let obj = new BMap.Point(item.Lng, item.Lat)
...@@ -144,7 +189,7 @@ export default { ...@@ -144,7 +189,7 @@ export default {
let baiduMapData = [...data.ActivateList, ...data.InActiveList, ...data.NotVisit]; let baiduMapData = [...data.ActivateList, ...data.InActiveList, ...data.NotVisit];
// let baiduMapData = [...data.NotVisit, ...data.ActivateList]; // let baiduMapData = [...data.NotVisit, ...data.ActivateList];
this.baiduMapData = baiduMapData this.baiduMapData = baiduMapData
this.creatMap() this.creatMap(this.baiduMapData)
} }
}) })
} }
......
...@@ -40,29 +40,29 @@ ...@@ -40,29 +40,29 @@
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading"> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr> <tr>
<th>商品信息编号</th> <th>商品信息编号</th>
<th>订单编号</th>
<th>商品名称</th> <th>商品名称</th>
<th>购买数量</th>
<th>订单生成时间</th>
<th>商品图片</th> <th>商品图片</th>
<th>商品单价</th> <th>商品单价</th>
<th>订单编号</th> <th>购买数量</th>
<th>购买人</th>
<th>订单状态</th> <th>订单状态</th>
<th>订单总价</th> <th>订单总价</th>
<th>订单生成时间</th>
<th>配送备注</th> <th>配送备注</th>
<th>关联销售</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
<tr v-for="item in dataList"> <tr v-for="item in dataList">
<td>{{item.goodsInfoId}}</td> <td>{{item.goodsInfoId}}</td>
<td>{{item.orderNum}}</td>
<td>{{item.goodsName}}</td> <td>{{item.goodsName}}</td>
<td>{{item.buyNum}}</td>
<td>
{{getDate(item.crateTime)}}
</td>
<td> <td>
<img class="OrderMgoodImg" :src="item.goodsImg" alt=""/> <img class="OrderMgoodImg" :src="item.goodsImg" alt=""/>
</td> </td>
<td>{{item.goodsPrice}}</td> <td>{{item.goodsPrice}}</td>
<td>{{item.orderNum}}</td> <td>{{item.buyNum}}</td>
<td>{{item.userName}}</td>
<td> <td>
<span v-if="item.orderStatus==1">待处理</span> <span v-if="item.orderStatus==1">待处理</span>
<span v-if="item.orderStatus==2">待配送</span> <span v-if="item.orderStatus==2">待配送</span>
...@@ -70,7 +70,11 @@ ...@@ -70,7 +70,11 @@
<span v-if="item.orderStatus==4">配送完成</span> <span v-if="item.orderStatus==4">配送完成</span>
</td> </td>
<td>{{item.orderTotalPrice}}</td> <td>{{item.orderTotalPrice}}</td>
<td>
{{getDate(item.crateTime)}}
</td>
<td>{{item.sendRemark}}</td> <td>{{item.sendRemark}}</td>
<td>{{item.saleName}}</td>
<td> <td>
<input v-if="item.orderStatus==1" @click="setOrderStatus(item.id)" type="button" class="normalBtn" value="领取"/> <input v-if="item.orderStatus==1" @click="setOrderStatus(item.id)" type="button" class="normalBtn" value="领取"/>
</td> </td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment