Commit 85368aab by 王志慧

fixed

1 parent 3258adf1
......@@ -19,7 +19,7 @@
</div>
<div slot="bindingStatus" slot-scope="scope">
<span class="status-class" :style="{ 'background-color': bindingStatusEnum[scope.scope.bindingStatus] }"></span>
<span>{{ bindingStatusList[scope.scope.bindingStatus] }}</span>
<span>{{ scope.scope.bindingStatusStr}}</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
......@@ -206,7 +206,6 @@ export default {
]
},
deviceStatusEnum: ['#999999', '#2CCA74', '#EB4E4E'],
bindingStatusList:['未绑定','已绑定'],
bindingStatusEnum: ['#999999', '#2CCA74']
}
},
......
......@@ -5,7 +5,7 @@
<el-option v-for="item in adrList" :key="item.id" :label="item.address" :value="item.id"></el-option>
</el-select>
<div class="icon-card">
<div :class="['icon-item',ctr.checked?'active':'']" v-for="(ctr, index) in controlList" @click="controlHandle(index, ctr.icon)" :key="index">
<div :class="['icon-item', ctr.checked ? 'active' : '']" v-for="(ctr, index) in controlList" @click="controlHandle(index, ctr.icon)" :key="index">
<img class="control-icon" :src="require(`@/assets/${ctr.icon}.png`)" />
{{ ctr.name }}
</div>
......@@ -34,27 +34,27 @@ export default {
{
icon: 'moon',
name: '卫星',
checked:false
checked: false
},
{
icon: 'ranging',
name: '测距',
checked:false
checked: false
},
{
icon: 'location',
name: '定位',
checked:false
checked: false
},
{
icon: 'magnify',
name: '放大',
checked:false
checked: false
},
{
icon: 'reduce',
name: '缩小',
checked:false
checked: false
}
],
activeIndex: ''
......@@ -145,13 +145,13 @@ export default {
style: { width: '48px', height: '48px' }
})
marker.setMap(map)
this.initMarket(marker, delFlag)
}
}
})
},
//是否有删除功能 1=》可以
//是否有删除功能 1=》可以
initMarket(marker, delFlag) {
let { map, AMap } = this,
that = this,
......@@ -212,13 +212,13 @@ export default {
},
// isOpen:1=>打开,2=>关闭,manipulator:操作物
getContextMenu(manipulator, isOpen) {
let that = this
isOpen = isOpen || !this.queryData.parkingAddressFlag
let that = this,
isOk = isOpen ? (isOpen == 1 ? true : false) : !this.queryData.parkingAddressFlag
this.initContent()
//地图绑定鼠标右击事件——弹出右键菜单
manipulator.on('rightclick', function (e) {
contextMenu.close()
if (isOpen==1||isOpen) {
if (isOk) {
contextMenu.open(that.map, e.lnglat)
}
......@@ -303,14 +303,15 @@ export default {
merchantId,
contextMenuPositon: { lng, lat }
} = this,
marker, params = {
id: queryData.id,
parkingAddressLng: lng,
parkingAddressLat: lat,
merchantId
}
marker,
params = {
id: queryData.id,
parkingAddressLng: lng,
parkingAddressLat: lat,
merchantId
}
this.$apis.parkingSpace.addFlagparkingSpace(params).then(res => {
if (res.code==0) {
if (res.code == 0) {
marker = new AMap.Marker({
icon: require('@/assets/select.png'),
position: [lng, lat],
......@@ -325,10 +326,10 @@ export default {
this.initMarket(marker, 1)
infoWindow.close()
this.$message.success('车位标记成功')
}else{
this.$message.error(res.message)
} else {
this.$message.error(res.message)
}
this.getContextMenu(this.map, 2)
this.getContextMenu(map, 2)
})
},
cancel(infoWindow) {
......@@ -359,7 +360,7 @@ export default {
_this.placeSearch.search(query, function (status, result) {
if (status === 'complete' && result.poiList.pois.length) {
_this.adrList = result.poiList.pois
// console.log(_this.adrList)
// console.log(_this.adrList)
}
})
},
......@@ -409,7 +410,7 @@ export default {
controlHandle(index, event) {
this[event + 'Handle'](index)
this.activeIndex = index
// this.controlList[index].checked=! this.controlList[index].checked
// this.controlList[index].checked=! this.controlList[index].checked
},
//卫星
moonHandle(index) {
......@@ -508,7 +509,7 @@ export default {
padding: 0 10px;
box-sizing: border-box;
cursor: pointer;
.icon-item {
font-size: 14px;
color: #666666;
......@@ -529,8 +530,8 @@ export default {
margin: 0 6px 0 10px;
}
}
.active{
color:#5f5efb;
.active {
color: #5f5efb;
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!