Commit 24befe38 authored by 郭铭瑶's avatar 郭铭瑶 🤘

Merge branch 'master' of http://git.omniview.pro/yaominguo/east-nanjing-new into dist

parents 7a57ba19 48531bfb
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -33,7 +33,7 @@ export default defineComponent({ ...@@ -33,7 +33,7 @@ export default defineComponent({
src url(./assets/font/zcool.ttf) src url(./assets/font/zcool.ttf)
html, body html, body
background rgba(0,0,0,0.5) background #001220
font-family DIN, Avenir, Helvetica, Arial, sans-serif font-family DIN, Avenir, Helvetica, Arial, sans-serif
-webkit-font-smoothing antialiased -webkit-font-smoothing antialiased
-moz-osx-font-smoothing grayscale -moz-osx-font-smoothing grayscale
......
src/assets/images/weihailu.png

664 KB | W: | H:

src/assets/images/weihailu.png

258 KB | W: | H:

src/assets/images/weihailu.png
src/assets/images/weihailu.png
src/assets/images/weihailu.png
src/assets/images/weihailu.png
  • 2-up
  • Swipe
  • Onion skin
<template> <template>
<div id="MapContainer" /> <div id="MapContainer" :style="`width:${width}`" />
</template> </template>
<script lang="ts"> <script lang="ts">
...@@ -25,6 +25,10 @@ export default defineComponent({ ...@@ -25,6 +25,10 @@ export default defineComponent({
type: Object as PropType<{ [key: string]: unknown }>, type: Object as PropType<{ [key: string]: unknown }>,
default: null, default: null,
}, },
width: {
type: String as PropType<string>,
default: '67vw',
},
}, },
emits: ['complete', 'event'], emits: ['complete', 'event'],
setup(props, ctx) { setup(props, ctx) {
...@@ -39,21 +43,24 @@ export default defineComponent({ ...@@ -39,21 +43,24 @@ export default defineComponent({
viewMode: '3D', viewMode: '3D',
center: [1019.614669, 54.167243], center: [1019.614669, 54.167243],
// center: [-135.98002789627407, -722.1597065437004], // center: [-135.98002789627407, -722.1597065437004],
zooms: [5, 10], zooms: [8, 12],
zoom: 7, zoom: 8,
pitch: 45, pitch: 45,
mapStyle: 'smap://styles/dark', mapStyle: 'smap://styles/dark',
showBuildingBlock: true, showBuildingBlock: true,
...config, ...config,
...props.config, ...props.config,
}).on(SMap.MapEvent.maploaded, () => { }).on(SMap.MapEvent.maploaded, () => {
map.enableMouseEvent(false) setMouseEvent(false)
// setBuildingBlock() // setBuildingBlock()
ctx.emit('complete', map) ctx.emit('complete', map)
addListener() addListener()
hideCommunity() hideCommunity()
}) })
} }
function setMouseEvent(val: boolean) {
map.enableMouseEvent(val)
}
function layer(name: string) { function layer(name: string) {
return map.getLayer(name) return map.getLayer(name)
} }
...@@ -109,13 +116,16 @@ export default defineComponent({ ...@@ -109,13 +116,16 @@ export default defineComponent({
console.error('传入的坐标点不能为空') console.error('传入的坐标点不能为空')
return return
} }
console.log('focus', x, y)
curMapType.value === '3D' curMapType.value === '3D'
? map.setZoomAndCenter(zoom, [+x, +y, 0]) ? map.setZoomAndCenter(zoom, [+x, +y, 0])
: map.setZoomAndCenter(zoom, [+x, +y]) : map.setZoomAndCenter(zoom, [+x, +y])
} }
function zoom(type: string) {
if (type === 'in') map.zoomIn()
else map.zoomOut()
}
// 添加边界 // 添加边界
function addBoundary({ function addBoundary({
name = '', name = '',
...@@ -247,6 +257,8 @@ export default defineComponent({ ...@@ -247,6 +257,8 @@ export default defineComponent({
return { return {
initMap, initMap,
focus, focus,
zoom,
setMouseEvent,
layer, layer,
setBuildingBlock, setBuildingBlock,
hideCommunity, hideCommunity,
...@@ -266,7 +278,6 @@ export default defineComponent({ ...@@ -266,7 +278,6 @@ export default defineComponent({
<style lang="stylus" scoped> <style lang="stylus" scoped>
#MapContainer #MapContainer
position fixed position fixed
width 100%
height 100vh height 100vh
top 0 top 0
left 0 left 0
......
...@@ -532,6 +532,7 @@ export default { ...@@ -532,6 +532,7 @@ export default {
).data ).data
// console.log(content, '有求必应 - 工作站分类') // console.log(content, '有求必应 - 工作站分类')
commit('SET_WORKSTATION', content) commit('SET_WORKSTATION', content)
commit('SET_WORKSTATION_PIEDATA', content[0].statistical)
}, },
async GET_TRACKEVENT( async GET_TRACKEVENT(
{ {
......
...@@ -65,6 +65,7 @@ export interface GlobalStateProps { ...@@ -65,6 +65,7 @@ export interface GlobalStateProps {
curView: ViewType curView: ViewType
curMapType: string curMapType: string
showCommunityPoints: boolean showCommunityPoints: boolean
mapDragable: boolean
readonly zhenxing: any readonly zhenxing: any
readonly weihai: any readonly weihai: any
readonly workArea1: any readonly workArea1: any
...@@ -114,7 +115,8 @@ export interface GlobalStateProps { ...@@ -114,7 +115,8 @@ export interface GlobalStateProps {
urgentCase: any[] urgentCase: any[]
todayCase: { [key: string]: number } todayCase: { [key: string]: number }
stageCase: { [key: string]: number } stageCase: { [key: string]: number }
workstationKind: { [key: string]: number } workstationKind: any[]
workstationKindPiEData: { [key: string]: number }
trackEvent: any[] trackEvent: any[]
analysisRank: Partial<DutyDataProp> analysisRank: Partial<DutyDataProp>
moreHappenAddr: Partial<DutyDataProp> moreHappenAddr: Partial<DutyDataProp>
......
...@@ -26,6 +26,9 @@ export default { ...@@ -26,6 +26,9 @@ export default {
SET_SHOW_COMMUNITY_POINTS(state: GlobalStateProps, val: boolean): void { SET_SHOW_COMMUNITY_POINTS(state: GlobalStateProps, val: boolean): void {
state.showCommunityPoints = val state.showCommunityPoints = val
}, },
SET_MAP_DRAGABLE(state: GlobalStateProps, val: boolean): void {
state.mapDragable = val
},
SET_PROPERTY_SUMMARY( SET_PROPERTY_SUMMARY(
state: GlobalStateProps, state: GlobalStateProps,
val: { [key: string]: number } val: { [key: string]: number }
...@@ -222,11 +225,14 @@ export default { ...@@ -222,11 +225,14 @@ export default {
state.stageCase = data state.stageCase = data
}, },
// 有求必应-工作站分类 // 有求必应-工作站分类
SET_WORKSTATION( SET_WORKSTATION(state: GlobalStateProps, data: any[]): void {
state.workstationKind = data
},
SET_WORKSTATION_PIEDATA(
state: GlobalStateProps, state: GlobalStateProps,
data: { [key: string]: number } data: { [key: string]: number }
): void { ): void {
state.workstationKind = data state.workstationKindPiEData = data
}, },
// 有求必应-事件跟踪 // 有求必应-事件跟踪
SET_TRACKEVENT(state: GlobalStateProps, data: unknown[]): void { SET_TRACKEVENT(state: GlobalStateProps, data: unknown[]): void {
......
...@@ -5,6 +5,7 @@ export default { ...@@ -5,6 +5,7 @@ export default {
curMapType: '2D', curMapType: '2D',
curView: { name: '南京东路街道', type: 'street' }, curView: { name: '南京东路街道', type: 'street' },
showCommunityPoints: false, showCommunityPoints: false,
mapDragable: false,
viewOptions: [ viewOptions: [
{ name: '南京东路街道', type: 'street' }, { name: '南京东路街道', type: 'street' },
{ name: '第一工作站', type: 'work1', id: '01001' }, { name: '第一工作站', type: 'work1', id: '01001' },
...@@ -60,7 +61,7 @@ export default { ...@@ -60,7 +61,7 @@ export default {
y: -660.07, y: -660.07,
}, },
id: '01001', id: '01001',
center: [361.095476, -559.449126], center: [57.65912693980181, -545.9925561181099],
paths: [ paths: [
[-448.329953822261, -293.460812442785], [-448.329953822261, -293.460812442785],
[-431.7521211874291, -671.2658974800385], [-431.7521211874291, -671.2658974800385],
...@@ -105,7 +106,7 @@ export default { ...@@ -105,7 +106,7 @@ export default {
y: 678.9654976442117, y: 678.9654976442117,
}, },
id: '01002', id: '01002',
center: [1291.532466, 175.263969], center: [494.2089963530598, 170.15832727829968],
paths: [ paths: [
[62.564369398678764, 740.5887328698475], [62.564369398678764, 740.5887328698475],
[137.63177213765096, 581.9293660719472], [137.63177213765096, 581.9293660719472],
...@@ -140,7 +141,7 @@ export default { ...@@ -140,7 +141,7 @@ export default {
x: -57.84609277641425, x: -57.84609277641425,
y: 261.561716873108, y: 261.561716873108,
}, },
center: [609.931363, 342.166777], center: [59.44810057514178, 386.009149840996],
id: '01003', id: '01003',
paths: [ paths: [
[-827.6197677404292, 863.6615701613555], [-827.6197677404292, 863.6615701613555],
...@@ -214,7 +215,8 @@ export default { ...@@ -214,7 +215,8 @@ export default {
urgentCase: [], urgentCase: [],
todayCase: {}, todayCase: {},
stageCase: {}, stageCase: {},
workstationKind: {}, workstationKind: [],
workstationKindPiEData: {},
trackEvent: [], trackEvent: [],
analysisRank: { day: [], week: [], month: [] }, analysisRank: { day: [], week: [], month: [] },
moreHappenAddr: { day: [], week: [], month: [] }, moreHappenAddr: { day: [], week: [], month: [] },
......
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
<m-map <m-map
ref="map" ref="map"
:config="{ :config="{
center: [-75.5563452697323, -718.3061904627932], zoom: 10,
zoom: 8,
}" }"
@complete="handleComplete" @complete="handleComplete"
@event="handleMapClick" @event="handleMapClick"
...@@ -37,19 +36,55 @@ ...@@ -37,19 +36,55 @@
<SiteSelector /> <SiteSelector />
<div class="operates"> <div class="operates">
<a-tooltip placement="left"> <a-tooltip placement="left">
<img src="@/assets/images/map-btn5.png" @click="rotateAngle" /> <img
draggable="false"
src="@/assets/images/map-btn5.png"
@click="rotateAngle"
/>
<template #title>旋转90度</template> <template #title>旋转90度</template>
</a-tooltip> </a-tooltip>
<a-tooltip placement="left"> <a-tooltip placement="left">
<img src="@/assets/images/map-btn4.png" @click="showMonitor = true" /> <img
draggable="false"
src="@/assets/images/map-btn4.png"
@click="showMonitor = true"
/>
<template #title>电瓶车入梯报警</template> <template #title>电瓶车入梯报警</template>
</a-tooltip> </a-tooltip>
<a-tooltip placement="left"> <a-tooltip placement="left">
<img src="@/assets/images/map-btn6.png" @click="showCommunityPoints" /> <img
draggable="false"
src="@/assets/images/map-btn6.png"
@click="showCommunityPoints"
/>
<template #title> <template #title>
{{ isCommunityPointsShowNow ? '隐藏' : '显示' }}小区点 {{ isCommunityPointsShowNow ? '隐藏' : '显示' }}小区点
</template> </template>
</a-tooltip> </a-tooltip>
<a-tooltip placement="left">
<img
draggable="false"
src="@/assets/images/zoom-in.png"
@click="zoomMap('in')"
/>
<template #title> 放大地图 </template>
</a-tooltip>
<a-tooltip placement="left">
<img
draggable="false"
src="@/assets/images/zoom-out.png"
@click="zoomMap('out')"
/>
<template #title> 缩小地图 </template>
</a-tooltip>
<a-tooltip placement="left">
<img
draggable="false"
src="@/assets/images/map-btn8.png"
@click="setMapDrag"
/>
<template #title> 开启/关闭地图拖拽 </template>
</a-tooltip>
</div> </div>
<m-modal <m-modal
v-model="showMonitor" v-model="showMonitor"
...@@ -68,11 +103,27 @@ ...@@ -68,11 +103,27 @@
<p class="title">[ {{ drawerInfo.relationName }} ]</p> <p class="title">[ {{ drawerInfo.relationName }} ]</p>
<div v-if="drawerInfo.afterPhoto"> <div v-if="drawerInfo.afterPhoto">
<p>整改后</p> <p>整改后</p>
<img :src="drawerInfo.afterPhoto" /> <img
:src="
drawerInfo.afterPhoto.replace(
'http://zhongbang.omniview.pro/' ||
'https://zhongbang.omniview.pro/',
prefix
)
"
/>
</div> </div>
<div v-if="drawerInfo.beforPhoto"> <div v-if="drawerInfo.beforPhoto">
<p>整改前</p> <p>整改前</p>
<img :src="drawerInfo.beforPhoto" /> <img
:src="
drawerInfo.beforPhoto.replace(
'http://zhongbang.omniview.pro/' ||
'https://zhongbang.omniview.pro/',
prefix
)
"
/>
</div> </div>
</div> </div>
</m-card> </m-card>
...@@ -104,6 +155,7 @@ export default defineComponent({ ...@@ -104,6 +155,7 @@ export default defineComponent({
name: 'Main', name: 'Main',
components: { LeftSection, RightSection, SiteSelector, VideoComponent }, components: { LeftSection, RightSection, SiteSelector, VideoComponent },
setup() { setup() {
const prefix = computed(() => api.SOURCE_URL)
const rotation = ref(0) const rotation = ref(0)
const rotateAngle = () => { const rotateAngle = () => {
rotation.value += 90 rotation.value += 90
...@@ -168,25 +220,19 @@ export default defineComponent({ ...@@ -168,25 +220,19 @@ export default defineComponent({
if (!curId.value) return if (!curId.value) return
const result: any = { const result: any = {
'527635870583459840': { '527635870583459840': {
zoom: 9.7608, zoom: 11,
layer: () => layer: () =>
(map.value.layer('model_white_zhenxing2').visible = true), (map.value.layer('model_white_zhenxing2').visible = true),
'0': [-135.98002789627407, -722.1597065437004], center: [-275.8968464073082, -748.2824253933684],
'90': [-261.131359, -858.028878],
'180': [-404.248674, -746.05425],
'270': [-276.2336, -653.842881],
}, },
'527635870583459841': { '527635870583459841': {
zoom: 10, zoom: 11,
layer: () => (map.value.layer('model_white_WEIHAI33').visible = true), layer: () => (map.value.layer('model_white_WEIHAI33').visible = true),
'0': [-38.73075358777865, -569.7527629458657], center: [-177.8293302195628, -588.2622422909122],
'90': [-136.813679, -682.12363],
'180': [-275.05377, -587.065673],
'270': [-187.394221, -483.549497],
}, },
} }
const cur = result[curId.value as string] const cur = result[curId.value as string]
map.value.focus(...cur[rotation.value], cur.zoom) map.value.focus(...cur.center, cur.zoom)
return cur return cur
} }
const showDrawer = ref(false) const showDrawer = ref(false)
...@@ -315,7 +361,16 @@ export default defineComponent({ ...@@ -315,7 +361,16 @@ export default defineComponent({
message.success('短信发送成功!') message.success('短信发送成功!')
} }
} }
const zoomMap = (type: string) => {
map.value.zoom(type)
}
const dragAble = ref(false)
const setMapDrag = () => {
dragAble.value = !dragAble.value
map.value.setMouseEvent(dragAble.value)
}
return { return {
prefix,
rotation, rotation,
rotateAngle, rotateAngle,
loading, loading,
...@@ -333,6 +388,8 @@ export default defineComponent({ ...@@ -333,6 +388,8 @@ export default defineComponent({
handleAlarm, handleAlarm,
isCommunityPointsShowNow, isCommunityPointsShowNow,
showCommunityPoints, showCommunityPoints,
zoomMap,
setMapDrag,
} }
}, },
}) })
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
:key="item.name" :key="item.name"
:style="`background:url(${ :style="`background:url(${
item.photo && item.photo &&
item.photo.replace('http://zhongbang.omniview.pro/', prefix) item.photo.replace(
'http://zhongbang.omniview.pro/' || 'https://zhongbang.omniview.pro/',
prefix
)
}) 100% / 100% 100% no-repeat`" }) 100% / 100% 100% no-repeat`"
@click="handleClick(item.video)" @click="handleClick(item.video)"
> >
...@@ -58,26 +61,26 @@ export default defineComponent({ ...@@ -58,26 +61,26 @@ export default defineComponent({
if (curId.value === '527635870583459840') { if (curId.value === '527635870583459840') {
// 振兴小区 // 振兴小区
return [ return [
{
name: '重庆北路177弄64号',
photo:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AQCAEc3pAASC2UqtXWs052.jpg',
video:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AVyAanZkApsdVDHEGc0527.mp4',
},
{ {
name: '重庆北路后门', name: '重庆北路后门',
photo: photo:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AXyAIUKZAAIFC2qNmKI384.jpg', 'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AXyAIUKZAAIFC2qNmKI384.jpg',
video: video:
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB9AaCAPxQuAJBKkDzXu6A359.mp4', 'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB9PlmAH8-oAEmHxWhriqw954.mov',
}, },
{ {
name: '大沽路大门', name: '大沽路大门',
photo: photo:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AYmAT-A1AAMElShNriM149.jpg', 'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AYmAT-A1AAMElShNriM149.jpg',
video: video:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AbiAQSm8AFcZgGM-DsE721.mp4', 'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB9QE6AckoPAEM3swvgmFQ182.mov',
},
{
name: '重庆北路177弄64号',
photo:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AQCAEc3pAASC2UqtXWs052.jpg',
video:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9AVyAanZkApsdVDHEGc0527.mp4',
}, },
] ]
} }
...@@ -87,21 +90,21 @@ export default defineComponent({ ...@@ -87,21 +90,21 @@ export default defineComponent({
photo: photo:
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB5GdOAW6qQAAvNhxSqO-g179.jpg', 'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB5GdOAW6qQAAvNhxSqO-g179.jpg',
video: video:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB8_neAFTSLAfLx1EXkWbg945.mp4', 'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9OkmAFxVMAS7MAmRH2Xc004.mp4',
}, },
{ {
name: '62弄朝东', name: '62弄朝东',
photo: photo:
'https://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB5Kj-AX3OMAAwPqHZi_Kg064.jpg', 'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB5Kj-AX3OMAAwPqHZi_Kg064.jpg',
video: video:
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB9AKeAStEUAYtR_B1xies646.mp4', 'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB9QIiAaz9fAS3gvWsrxYQ927.mp4',
}, },
{ {
name: '62弄朝南', name: '62弄朝南',
photo: photo:
'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB5KrOAVcluAAnbZjB7fNA165.jpg', 'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB5KrOAVcluAAnbZjB7fNA165.jpg',
video: video:
'http://zhongbang.omniview.pro/file/group1/M00/00/30/CgAG5WB5KrSAB6piAV39_CAFs0Y956.mp4', 'http://zhongbang.omniview.pro/file/group1/M00/00/1A/CgAG5GB9P1mALYigATKoQQw6Y8k841.mp4',
}, },
] ]
}) })
......
...@@ -232,14 +232,14 @@ export default defineComponent({ ...@@ -232,14 +232,14 @@ export default defineComponent({
.info .info
display flex display flex
height .8rem height .9rem
margin .05rem 0 margin .05rem 0
>div >div
flex 1 flex 1
color #ccc color #ccc
text-align justify text-align justify
&:first-child &:first-child
flex .56 flex 0.8
$center() $center()
background url('@/assets/images/border3.png') 50% 50% / 100% 100% no-repeat background url('@/assets/images/border3.png') 50% 50% / 100% 100% no-repeat
margin-right .1rem margin-right .1rem
......
...@@ -14,13 +14,10 @@ ...@@ -14,13 +14,10 @@
</div> </div>
</template> </template>
</a-tooltip> </a-tooltip>
<img <a-tooltip v-else :key="btn.key" placement="right">
v-else <img :src="btn.icon" draggable="false" @click="handleClick(btn.key)" />
:key="btn.key" <template #title>{{ btn.title }}</template>
:src="btn.icon" </a-tooltip>
draggable="false"
@click="handleClick(btn.key)"
/>
</template> </template>
</div> </div>
<m-modal v-model="searchModal" title="搜索" width="30%" offset="-70%"> <m-modal v-model="searchModal" title="搜索" width="30%" offset="-70%">
...@@ -68,24 +65,30 @@ import btn4 from '@/assets/images/map-btn4.png' ...@@ -68,24 +65,30 @@ import btn4 from '@/assets/images/map-btn4.png'
import btn5 from '@/assets/images/map-btn5.png' import btn5 from '@/assets/images/map-btn5.png'
import btn6 from '@/assets/images/map-btn6.png' import btn6 from '@/assets/images/map-btn6.png'
import btn7 from '@/assets/images/map-btn7.png' import btn7 from '@/assets/images/map-btn7.png'
import btn8 from '@/assets/images/map-btn8.png'
import d2 from '@/assets/images/2d.png' import d2 from '@/assets/images/2d.png'
import d3 from '@/assets/images/3d.png' import d3 from '@/assets/images/3d.png'
import zoomIn from '@/assets/images/zoom-in.png'
import zoomOut from '@/assets/images/zoom-out.png'
import store from '@/store' import store from '@/store'
export default defineComponent({ export default defineComponent({
name: 'MapBtns', name: 'MapBtns',
emits: ['full', 'change'], emits: ['full', 'change', 'zoom'],
setup(_, ctx) { setup(_, ctx) {
const btns = computed(() => { const btns = computed(() => {
const mapType = const mapType =
store.state.curMapType === '2D' store.state.curMapType === '2D'
? { key: '3D', icon: d3 } ? { key: '3D', icon: d3, title: '开启3D地图' }
: { key: '2D', icon: d2 } : { key: '2D', icon: d2, title: '开启2D地图' }
const list = [ const list = [
// { key: 'search', icon: btn1 }, // { key: 'search', icon: btn1 },
{ key: 'full', icon: btn2 }, { key: 'in', icon: zoomIn, title: '放大地图' },
{ key: 'points', icon: btn6 }, { key: 'out', icon: zoomOut, title: '缩小地图' },
{ key: 'full', icon: btn2, title: '全屏' },
{ key: 'points', icon: btn6, title: '显示/隐藏小区点' },
{ key: 'polyline', icon: btn7 }, { key: 'polyline', icon: btn7 },
{ key: 'dragable', icon: btn8, title: '开启/关闭拖拽功能' },
// { key: '', icon: btn4 }, // { key: '', icon: btn4 },
// { key: '', icon: btn5 }, // { key: '', icon: btn5 },
// { key: '', icon: btn6 }, // { key: '', icon: btn6 },
...@@ -109,12 +112,18 @@ export default defineComponent({ ...@@ -109,12 +112,18 @@ export default defineComponent({
case 'search': case 'search':
searchModal.value = true searchModal.value = true
break break
case 'in':
case 'out':
ctx.emit('zoom', key)
break
case 'points': case 'points':
store.commit( store.commit(
'SET_SHOW_COMMUNITY_POINTS', 'SET_SHOW_COMMUNITY_POINTS',
!store.state.showCommunityPoints !store.state.showCommunityPoints
) )
break break
case 'dragable':
store.commit('SET_MAP_DRAGABLE', !store.state.mapDragable)
default: default:
break break
} }
...@@ -294,7 +303,7 @@ $bg = rgba(6,34,67,.4) ...@@ -294,7 +303,7 @@ $bg = rgba(6,34,67,.4)
transition left .3s ease transition left .3s ease
&.full &.full
left .05rem left .05rem
>img img
display block display block
width .2rem width .2rem
height @width height @width
......
...@@ -41,7 +41,10 @@ export default defineComponent({ ...@@ -41,7 +41,10 @@ export default defineComponent({
() => props.videoSrc && props.videoSrc.indexOf('m3u8') >= 0 () => props.videoSrc && props.videoSrc.indexOf('m3u8') >= 0
) )
const isMP4 = computed( const isMP4 = computed(
() => props.videoSrc && props.videoSrc.indexOf('mp4') >= 0 () =>
props.videoSrc &&
(props.videoSrc.indexOf('mp4') >= 0 ||
props.videoSrc.indexOf('mov') >= 0)
) )
const init = () => { const init = () => {
if (!videoRef.value) return if (!videoRef.value) return
......
...@@ -13,6 +13,12 @@ export default function useSwitchMap(map: any) { ...@@ -13,6 +13,12 @@ export default function useSwitchMap(map: any) {
}, },
{ immediate: true } { immediate: true }
) )
watch(
() => store.state.mapDragable,
(val) => {
map.value.setMouseEvent(val)
}
)
watch( watch(
() => store.state.showCommunityPoints, () => store.state.showCommunityPoints,
(val) => { (val) => {
...@@ -38,20 +44,19 @@ export default function useSwitchMap(map: any) { ...@@ -38,20 +44,19 @@ export default function useSwitchMap(map: any) {
switch (type) { switch (type) {
case 'work1': case 'work1':
show && showPoints({ gridId: store.state.workArea1.id }) show && showPoints({ gridId: store.state.workArea1.id })
map.value.focus(...store.state.workArea1.center, 7.660867453405492) map.value.focus(...store.state.workArea1.center, 8)
break break
case 'work2': case 'work2':
show && showPoints({ gridId: store.state.workArea2.id }) show && showPoints({ gridId: store.state.workArea2.id })
map.value.focus(...store.state.workArea2.center, 7) map.value.focus(...store.state.workArea2.center, 8)
break break
case 'work3': case 'work3':
show && showPoints({ gridId: store.state.workArea3.id }) show && showPoints({ gridId: store.state.workArea3.id })
map.value.focus(...store.state.workArea3.center, 7) map.value.focus(...store.state.workArea3.center, 8)
break break
case 'street': case 'street':
show && showPoints() show && showPoints()
map.value.focus(990.973466, 10.295931, 7) map.value.focus(207.9006154792994, 71.67111885454233, 8)
// map.value.focus(1019.614669, 54.167243, 6.5)
break break
default: default:
break break
...@@ -105,8 +110,12 @@ export default function useSwitchMap(map: any) { ...@@ -105,8 +110,12 @@ export default function useSwitchMap(map: any) {
} }
) )
} }
const handleZoom = (type: string) => {
map.value.zoom(type)
}
return { return {
handleMapComplete, handleMapComplete,
selectArea, selectArea,
handleZoom,
} }
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
gap="0.05rem" gap="0.05rem"
> >
<m-title area="title">南东城运</m-title> <m-title area="title">南东城运</m-title>
<m-map ref="map" @complete="handleMapComplete" /> <m-map ref="map" width="71vw" @complete="handleMapComplete" />
<m-animate enter="fadeInLeft" leave="fadeOutLeft"> <m-animate enter="fadeInLeft" leave="fadeOutLeft">
<Command v-show="'street' === curViewType && !fullScreen" area="left" /> <Command v-show="'street' === curViewType && !fullScreen" area="left" />
</m-animate> </m-animate>
...@@ -38,7 +38,11 @@ ...@@ -38,7 +38,11 @@
/> />
</m-animate> </m-animate>
<ViewSelector /> <ViewSelector />
<MapBtns @change="selectArea" @full="fullScreen = $event" /> <MapBtns
@change="selectArea"
@full="fullScreen = $event"
@zoom="handleZoom"
/>
<m-drawer v-model="showDrawer"> <m-drawer v-model="showDrawer">
<CaseDrawer /> <CaseDrawer />
<!-- <PopulationDrawer /> --> <!-- <PopulationDrawer /> -->
...@@ -100,7 +104,7 @@ export default defineComponent({ ...@@ -100,7 +104,7 @@ export default defineComponent({
await nextTick() await nextTick()
map.value.initMap({ viewMode: '2D' }) map.value.initMap({ viewMode: '2D' })
}) })
const { handleMapComplete, selectArea } = useSwitchMap(map) const { handleMapComplete, selectArea, handleZoom } = useSwitchMap(map)
return { return {
map, map,
curViewType, curViewType,
...@@ -110,6 +114,7 @@ export default defineComponent({ ...@@ -110,6 +114,7 @@ export default defineComponent({
showDrawer, showDrawer,
handleMapComplete, handleMapComplete,
selectArea, selectArea,
handleZoom,
} }
}, },
}) })
......
<template> <template>
<m-card title="案件分析"> <m-card title="案件分析" class="box">
<div class="nav"> <div class="nav">
<div> <div>
<Tabs :list="tabs" horizontal @select="curTab = $event" /> <Tabs :list="tabs" horizontal @select="curTab = $event" />
...@@ -111,38 +111,42 @@ export default defineComponent({ ...@@ -111,38 +111,42 @@ export default defineComponent({
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '../../components/MyComponent/main.styl' @import '../../components/MyComponent/main.styl'
.nav .box
width 100%
display flex
align-items center
justify-content space-between
margin 0.05rem 0
>div
width 75%
&:last-child
width 20%
display flex
>span
$center()
width 0.22rem
height @width
color $primary-border
border 0.01rem solid @color
cursor pointer
&:hover, &.on
color $secondary-color
border-color @color
background rgba(50, 197, 255, 0.2)
.rank
overflow hidden overflow hidden
.content .nav
height 1rem width 100%
overflow hidden overflow hidden
.place
margin 0.05rem 0
.content
display flex display flex
align-items center
justify-content space-between justify-content space-between
margin-top 0.05rem
>div >div
width 32% width 75%
&:last-child
width 20%
display flex
>span
$center()
width 0.22rem
height @width
color $primary-border
border 0.01rem solid @color
cursor pointer
&:hover, &.on
color $secondary-color
border-color @color
background rgba(50, 197, 255, 0.2)
.rank
overflow hidden
// height 1rem
.content
height 1.2rem
overflow hidden
.place
overflow hidden
.content
display flex
justify-content space-between
>div
width 32%
</style> </style>
...@@ -254,87 +254,87 @@ export default defineComponent({ ...@@ -254,87 +254,87 @@ export default defineComponent({
.box .box
flex-direction column flex-direction column
display flex display flex
height 97% height 95%
.summary overflow hidden
height 5% .summary
display flex height 5%
justify-content space-between
align-items center
margin-top 0.1rem
margin-bottom 0.1rem
>div
display flex display flex
justify-content space-between
align-items center align-items center
margin-top 0.1rem
margin-bottom 0.1rem
>div >div
margin-left 0.05rem display flex
.count align-items center
font-size 0.12rem >div
font-weight bold margin-left 0.05rem
p .count
color #ccc font-size 0.12rem
.manage font-weight bold
flex 1 p
display flex color #ccc
// height 60% .manage
// margin-bottom .05rem
.content
flex 1
padding-left 0.1rem
.chart
width 100%
height 44%
&.wrapper
display flex
>div
width 50%
height 100%
&:last-child
$center()
flex-direction column
p
display flex
align-items center
width 100%
i
display inline-block
width 0.06rem
height @width
border-radius 50%
margin-right 0.1rem
background #826AFA
&:nth-of-type(2) > i
background #E02020
&:nth-of-type(3) > i
background #F7B500
&:nth-of-type(4) > i
background #6DD400
&:nth-of-type(5) > i
background #32C5FF
span
flex 4
&:last-child
flex 1
.emergency
height 1.2rem
overflow hidden
// overflow hidden
.detail
display flex display flex
flex-direction column height 70%
padding 0.1rem // margin-bottom .05rem
background url('@/assets/images/border2.png') 100% / 100% 100% no-repeat .content
margin-bottom 0.05rem
height 0.95rem
box-sizing border-box
>div
flex 1 flex 1
&:first-child padding-left 0.1rem
border-bottom 0.01rem solid $primary-border .chart
padding-bottom 0.05rem width 100%
margin-bottom @padding-bottom height 44%
span &.wrapper
color #ccc display flex
p >div
font-size 0.12rem width 50%
font-weight bold height 100%
&:last-child
$center()
flex-direction column
p
display flex
align-items center
width 100%
i
display inline-block
width 0.06rem
height @width
border-radius 50%
margin-right 0.1rem
background #826AFA
&:nth-of-type(2) > i
background #E02020
&:nth-of-type(3) > i
background #F7B500
&:nth-of-type(4) > i
background #6DD400
&:nth-of-type(5) > i
background #32C5FF
span
flex 4
&:last-child
flex 1
.emergency
height 1.2rem
overflow hidden
// overflow hidden
.detail
display flex
flex-direction column
padding 0.1rem
background url('@/assets/images/border2.png') 100% / 100% 100% no-repeat
margin-bottom 0.05rem
height 0.95rem
box-sizing border-box
>div
flex 1
&:first-child
border-bottom 0.01rem solid $primary-border
padding-bottom 0.05rem
margin-bottom @padding-bottom
span
color #ccc
p
font-size 0.12rem
font-weight bold
</style> </style>
...@@ -25,12 +25,14 @@ ...@@ -25,12 +25,14 @@
</div> </div>
<div class="chart wrapper"> <div class="chart wrapper">
<div v-if="showChart"> <div v-if="showChart">
<m-pie :option="pieOption" /> <m-pie :option="pieOption" :dataset="pieData" />
</div> </div>
<div> <div>
<p v-for="item in pieData" :key="item.name"> <p v-for="item in pieData" :key="item.name">
<span :style="{ background: item.color }" /> <span :style="{ background: item.color }" />
{{ item.name }}{{ item.value }}% &nbsp;&nbsp;{{ item.num }} {{ item.name }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
item.value
}}% &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.num }}
</p> </p>
</div> </div>
</div> </div>
...@@ -56,7 +58,7 @@ ...@@ -56,7 +58,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { computed, defineComponent, ref } from 'vue' import { computed, defineComponent, watch, ref } from 'vue'
import Brief, { BriefProp } from '../components/brief.vue' import Brief, { BriefProp } from '../components/brief.vue'
import store from '@/store' import store from '@/store'
import icon6 from '@/assets/images/icon6.png' import icon6 from '@/assets/images/icon6.png'
...@@ -81,10 +83,8 @@ export default defineComponent({ ...@@ -81,10 +83,8 @@ export default defineComponent({
const todayCase = computed(() => store.state.todayCase) const todayCase = computed(() => store.state.todayCase)
const stageCase = computed(() => store.state.stageCase) const stageCase = computed(() => store.state.stageCase)
const workstationKind = computed(() => store.state.workstationKind) const workstationKind = computed(() => store.state.workstationKind)
const pieDatamodel = computed(() => store.state.workstationKindPiEData)
const trackEvent = computed(() => store.state.trackEvent) const trackEvent = computed(() => store.state.trackEvent)
// console.log(moment(new Date()).format('YYYY-MM-DD'))
const fontSize = computed(() => Math.floor((screen.height * 1.6) / 100)) const fontSize = computed(() => Math.floor((screen.height * 1.6) / 100))
const showChart = computed(() => store.state.curTheme === 'manage') const showChart = computed(() => store.state.curTheme === 'manage')
const summary = computed(() => { const summary = computed(() => {
...@@ -203,109 +203,88 @@ export default defineComponent({ ...@@ -203,109 +203,88 @@ export default defineComponent({
})), })),
}) })
const pieData = computed(() => { const pieData = computed(() => {
if (workstationKind.value[0]) { return [
return [ {
{ name: '第一工作站',
name: '第一工作站', value:
value: parseInt(
( (pieDatamodel.value.oneDisposalNum / pieDatamodel.value.oneNum) *
(workstationKind.value[0].statistical.oneDisposalNum /
workstationKind.value[0].statistical.oneNum) *
100 100
).toFixed(0) || 0, ) || 0,
num: workstationKind.value[0].statistical.oneDisposalNum || 0, num: pieDatamodel.value.oneNum,
color: '#47B3FF', color: '#47B3FF',
}, },
{ {
name: '第二工作站', name: '第二工作站',
value: value:
( parseInt(
(workstationKind.value[0].statistical.twoDisposalNum / (pieDatamodel.value.twoDisposalNum / pieDatamodel.value.twoNum) *
workstationKind.value[0].statistical.twoNum) *
100 100
).toFixed(0) || 0, ) || 0,
num: workstationKind.value[0].statistical.twoDisposalNum || 0, num: pieDatamodel.value.twoNum,
color: '#FF9D27', color: '#FF9D27',
}, },
{ {
name: '第三工作站', name: '第三工作站',
value: value:
( parseInt(
(workstationKind.value[0].statistical.threeDisposalNum / (pieDatamodel.value.threeDisposalNum /
workstationKind.value[0].statistical.threeNum) * pieDatamodel.value.threeNum) *
100 100
).toFixed(0) || 0, ) || 0,
num: workstationKind.value[0].statistical.threeDisposalNum || 0, num: pieDatamodel.value.threeNum,
color: '#6EB629', color: '#6EB629',
}, },
] ]
} else { })
return [ const pieSeries = computed(() => {
{ return pieData.value.map((item, i) => {
name: '第一工作站', const rate =
value: 0, Math.round((pieData.value.length - i) * fontSize.value) + 10
num: 0, const borderWidth = fontSize.value * 0.6
color: '#47B3FF', return {
}, type: 'pie',
{ name: item.name,
name: '第二工作站', clockwise: false, //顺时加载
value: 0, radius: [rate, rate],
num: 0, label: {
color: '#FF9D27', show: false,
}, },
{ itemStyle: {
name: '第三工作站', borderWidth,
value: 0, borderColor: item.color,
num: 0,
color: '#6EB629',
}, },
] data: [
} item,
}) {
const pieSeries = pieData.value.map((item, i) => { value: 100 - item.value,
const rate = Math.round((pieData.value.length - i) * fontSize.value) + 10 name: '',
const borderWidth = fontSize.value * 0.6 tooltip: { show: false },
return { label: {
type: 'pie', show: false,
name: item.name, },
clockwise: false, //顺时加载 itemStyle: {
radius: [rate, rate], color: 'transparent',
label: { borderColor: item.color,
show: false, opacity: 0.1,
}, },
itemStyle: {
borderWidth,
borderColor: item.color,
},
data: [
item,
{
value: 100 - item.value,
name: '',
tooltip: { show: false },
label: {
show: false,
}, },
itemStyle: { ],
color: 'transparent', }
borderColor: item.color, })
opacity: 0.1,
},
},
],
}
}) })
const pieOption = ref({ const pieOption = computed(() => ({
legend: { legend: {
show: false, show: false,
}, },
series: pieSeries, series: pieSeries.value,
}) }))
const steps = ref(['发现', '立案', '派遣', '处置', '核查', '结案']) const steps = ref(['发现', '立案', '派遣', '处置', '核查', '结案'])
const searchCase = (key: string) => { const searchCase = (key: string) => {
console.log('searck key: ', key) console.log('searck key: ', key)
} }
return { return {
summary, summary,
showChart, showChart,
...@@ -319,6 +298,7 @@ export default defineComponent({ ...@@ -319,6 +298,7 @@ export default defineComponent({
searchCase, searchCase,
todayCase, todayCase,
trackEvent, trackEvent,
workstationKind,
} }
}, },
}) })
...@@ -338,65 +318,69 @@ $arrow-style() ...@@ -338,65 +318,69 @@ $arrow-style()
bottom 0 bottom 0
margin auto margin auto
transform translate(-90%, 0) transform translate(-90%, 0)
.process .today-case
margin-top 0.1rem .process
position relative margin-top 0.1rem
>img position relative
position absolute >img
width 0.2rem position absolute
height @width width 0.2rem
right 13.3% height @width
top 0 right 13.3%
bottom 0 top 0
margin auto bottom 0
transform rotate(90deg) margin auto
>div transform rotate(90deg)
display flex
align-items center
justify-content space-around
margin-bottom 0.15rem
&:nth-of-type(1)
div+div
&::before
$arrow-style()
&:nth-of-type(2)
div+div
&::before
$arrow-style()
transform translate(-90%, 0) rotate(180deg)
>div
background url('@/assets/images/num-card.png') 100% / 100% 100% no-repeat
width 28%
padding 0.05rem 0
text-align center
font-weight bold
position relative
.count
font-size 0.12rem
p
color #ccc
.chart
width 100%
height 1.1rem
&.wrapper
display flex
>div >div
width 50% display flex
height 100% align-items center
font-weight bold justify-content space-around
&:last-child margin-bottom 0.15rem
$center() &:nth-of-type(1)
flex-direction column div+div
&::before
$arrow-style()
&:nth-of-type(2)
div+div
&::before
$arrow-style()
transform translate(-90%, 0) rotate(180deg)
>div
background url('@/assets/images/num-card.png') 100% / 100% 100% no-repeat
width 28%
padding 0.05rem 0
text-align center
font-weight bold
position relative
.count
font-size 0.12rem
p p
display flex color #ccc
align-items center .chart
margin-bottom 0.05rem width 100%
span height 1.1rem
display inline-block &.wrapper
width 0.06rem display flex
height @width >div
border-radius 50% width 50%
margin-right 0.1rem height 100%
font-weight bold
// border 1px solid red
&:last-child
$center()
flex-direction column
p
display flex
width 100%
align-items center
// border 1px solid red
margin-bottom 0.05rem
span
display inline-block
width 0.06rem
height @width
border-radius 50%
margin-right 0.1rem
.case-follow .case-follow
height 1.2rem height 1.2rem
overflow hidden overflow hidden
......
<template> <template>
<m-card title="重点工作"> <m-card title="重点工作" class="box">
<div v-if="showChart" id="cloud" class="box"></div> <div v-if="showChart" id="cloud" class=""></div>
</m-card> </m-card>
</template> </template>
...@@ -76,7 +76,7 @@ export default defineComponent({ ...@@ -76,7 +76,7 @@ export default defineComponent({
const maskImage = new Image() const maskImage = new Image()
maskImage.src = symbolUrl maskImage.src = symbolUrl
const option = { const option = {
backgroundColor: 'rgba(0,0,0,0.1)', backgroundColor: '#000',
tooltip: { tooltip: {
show: true, show: true,
}, },
...@@ -101,14 +101,13 @@ export default defineComponent({ ...@@ -101,14 +101,13 @@ export default defineComponent({
name: 'pictorial', name: 'pictorial',
silent: true, silent: true,
symbol: 'image://' + symbolUrl, //按背景渲染云词 symbol: 'image://' + symbolUrl, //按背景渲染云词
symbolSize: ['165%', '180%'], symbolSize: ['100%', '100%'],
symbolPosition: 'center', symbolPosition: 'center',
barWidth: '100%', barWidth: '100%',
barMaxWidth: '100%', barMaxWidth: '100%',
itemStyle: { itemStyle: {
normal: { opacity: 0.2, //自己项目中这里可以设置0全透明,然后可以写一个div背景加载一个美化过的云图片,重合放在这个图表下面。
opacity: 0.2, //自己项目中这里可以设置0全透明,然后可以写一个div背景加载一个美化过的云图片,重合放在这个图表下面。 border: '1px solid red',
},
}, },
data: [ data: [
{ {
...@@ -118,30 +117,28 @@ export default defineComponent({ ...@@ -118,30 +117,28 @@ export default defineComponent({
}, },
{ {
type: 'wordCloud', type: 'wordCloud',
sizeRange: [19, 23], sizeRange: [20, 22],
rotationRange: [0, 10], rotationRange: [0, 0],
maskImage: maskImage, maskImage: maskImage,
textPadding: 30, textPadding: 0,
gridSize: 20, //用于标记画布可用性的网格大小(以像素为单位)//字距越大,字距越大。 gridSize: 39, //用于标记画布可用性的网格大小(以像素为单位)//字距越大,字距越大。
width: '90%', width: '100%',
height: '90%', height: '100%',
left: 'center', left: '0',
top: 'center', top: '0',
drawOutOfBound: false, drawOutOfBound: false,
textStyle: { textStyle: {
normal: { // fontFamily: 'sans-serif',
fontFamily: 'sans-serif', fontWeight: 600,
color: function () { color: function () {
const index = Math.floor(Math.random() * colorList.length) const index = Math.floor(Math.random() * colorList.length)
return colorList[index] return colorList[index]
},
}, },
}, },
data: data, data: data,
}, },
], ],
} }
cloudCharts.setOption(option) cloudCharts.setOption(option)
} }
...@@ -151,7 +148,7 @@ export default defineComponent({ ...@@ -151,7 +148,7 @@ export default defineComponent({
if (!type) return if (!type) return
setTimeout(() => { setTimeout(() => {
init() init()
}, 1000) }, 1900)
}, },
{ immediate: true } { immediate: true }
) )
...@@ -164,9 +161,11 @@ export default defineComponent({ ...@@ -164,9 +161,11 @@ export default defineComponent({
<style lang="stylus" scoped> <style lang="stylus" scoped>
.box .box
height 95% height 2rem
width 100% width 100%
box-sizing border-box box-sizing border-box
overflow hidden overflow hidden
// background #000 #cloud
height 2rem
width 100%
</style> </style>
...@@ -39,8 +39,10 @@ export default defineComponent({ ...@@ -39,8 +39,10 @@ export default defineComponent({
width 33% width 33%
.first-child .first-child
flex 1 flex 1
// height 50%
.second-child .second-child
height 2rem height 2rem
// height 32%
.third-child .third-child
height 0.8rem height 0.8rem
</style> </style>
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