Commit 00d942eb by xinla

扩展百度地图组件,替换会话存档高德地图

1 parent 1a102063
......@@ -14,7 +14,7 @@ export default {
default: () => ({}),
},
},
components: { Voice },
components: { Voice, BaiduMap: defineAsyncComponent(() => import('@/components/common/BaiduMap')) },
data() {
return {}
},
......@@ -108,17 +108,13 @@ export default {
</video>
</template>
<div v-else-if="message.msgType === 'location'" class="msgtypecard">
<div class="card-content" style="height: 100%; width: 100%">
<el-amap
ref="map"
vid="amapDemo"
:center="[JSON.parse(message.contact).longitude, JSON.parse(message.contact).latitude]"
:zoom="14"
class="amap-demo"
style="height: 120px; width: 250px; pointer-events: none">
<el-amap-marker
:position="[JSON.parse(message.contact).longitude, JSON.parse(message.contact).latitude]"></el-amap-marker>
</el-amap>
<div class="card-content">
<BaiduMap
isDetail
isOnlyShowMap
mapWidth="300px"
mapHeight="120px"
:initData="JSON.parse(message.contact)"></BaiduMap>
</div>
<div class="card-foot">{{ content }}</div>
</div>
......@@ -234,6 +230,7 @@ export default {
line-height: 1.5;
// text-indent: 10px;
color: #333;
z-index: -1;
.card--link-title {
font-size: 15px;
font-weight: 500;
......
<template>
<div>
<el-form-item label="详细地址" prop="address">
<el-form-item label="详细地址" prop="address" v-if="!isOnlyShowMap">
<el-autocomplete
:disabled="isDetail"
@change="setChange"
......@@ -21,8 +21,8 @@
</template>
</el-autocomplete>
</el-form-item>
<el-form-item label="">
<div id="map-container" style="width: 500px; height: 300px" />
<el-form-item label="" :label-width="isOnlyShowMap ? 0 : ''" :style="isOnlyShowMap && 'margin-bottom: 0'">
<div id="map-container" :style="{ width: mapWidth, height: mapHeight }" />
</el-form-item>
</div>
</template>
......@@ -52,12 +52,30 @@ export default {
props: {
initData: {
type: Object,
default: () => {},
default: () => ({
// area: '', // 省市区
// address: '', // 详细地址
// longitude: '', // 经度
// latitude: '', // 纬度
}),
},
mapWidth: {
type: String,
default: '500px',
},
mapHeight: {
type: String,
default: '300px',
},
isDetail: {
type: Boolean,
default: false,
},
// 是否只显示地图
isOnlyShowMap: {
type: Boolean,
default: false,
},
},
watch: {
initData: {
......
......@@ -209,7 +209,7 @@ export default {
<style lang="scss" scoped>
.list {
height: calc(100vh - 420px);
height: calc(100vh - 370px);
margin-top: 10px;
background: white;
overflow-y: scroll;
......
<template>
<div class="content">
<div class="content" style="margin-top: -13px">
<el-tabs v-model="activeName">
<el-tab-pane label="员工检索" name="1">
<employee></employee>
......@@ -14,21 +14,21 @@
</div>
</template>
<script>
import employee from './employee.vue'
import user from './customer.vue'
import global from './global.vue'
export default {
import employee from './employee.vue'
import user from './customer.vue'
import global from './global.vue'
export default {
components: { employee, user, global },
data() {
return {
activeName: '1'
activeName: '1',
}
},
methods: {}
}
methods: {},
}
</script>
<style lang="scss" scoped>
::v-deep.pd15 {
::v-deep.pd15 {
padding: 15px;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!