Commit e06e1f02 authored by 郭铭瑶's avatar 郭铭瑶 🤘

接入小区撒点

parent 2afc8eac
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
<link rel="icon" href="./favicon.ico" /> <link rel="icon" href="./favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>静安智慧房管</title> <title>静安智慧房管</title>
<script type="module" crossorigin src="./assets/index.b4772bee.js"></script> <script type="module" crossorigin src="./assets/index.77c34ec7.js"></script>
<link rel="modulepreload" href="./assets/vendor.630e6fa8.js"> <link rel="modulepreload" href="./assets/vendor.76a9fd99.js">
<link rel="stylesheet" href="./assets/vendor.db35e2cd.css"> <link rel="stylesheet" href="./assets/vendor.db35e2cd.css">
<link rel="stylesheet" href="./assets/index.9ef128c6.css"> <link rel="stylesheet" href="./assets/index.37160914.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script src="./shanghaiwuye_gis_map_api_3.2.210421/SMap.min.js"></script> <script src="./shanghaiwuye_gis_map_api_3.2.210914/SMap.min.js"></script>
<script src="./shanghaiwuye_gis_map_api_3.2.210421/Plugins.min.js"></script> <script src="./Plugins.min.js"></script>
</body> </body>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
new SMap.Network().setNet(网络参数);
网络参数包括以下几个值:
'internet':表示互联网2D;
'affairs':表示政务网2D;
'local3D':表示局域网3D;
'affairs3D':表示政务网3D;
'njdl':表示南京东路政务网3D;
\ No newline at end of file
...@@ -227,6 +227,7 @@ const map = new SMap.Map('container', { ...@@ -227,6 +227,7 @@ const map = new SMap.Map('container', {
//"wg_gis_xq_point"为小区点, //"wg_gis_xq_point"为小区点,
//"wg_gis_xq_poly"为小区面, //"wg_gis_xq_poly"为小区面,
//"wg_gis_zb_jkd"为小区健康度 //"wg_gis_zb_jkd"为小区健康度
//"wg_gis_fwzl"为物业服务质量
//"wg_gis_mpz"为门牌幢点, //"wg_gis_mpz"为门牌幢点,
//"wg_gis_elevator"为电梯点, //"wg_gis_elevator"为电梯点,
//"wg_gis_sensor"为传感器 //"wg_gis_sensor"为传感器
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -11,4 +11,5 @@ export default { ...@@ -11,4 +11,5 @@ export default {
BASE_URL, BASE_URL,
CONFIGS: '/service-bigscreen/public/bigscreenConfigs', // 配置 CONFIGS: '/service-bigscreen/public/bigscreenConfigs', // 配置
COMMUNITYS: '/service-basicdatasync-ddd/public/communities', // 小区 COMMUNITYS: '/service-basicdatasync-ddd/public/communities', // 小区
COMMUNITY: '/service-basicdatasync-ddd/public/community/', // 根据小区id查档案
} }
...@@ -30,7 +30,7 @@ export default defineComponent({ ...@@ -30,7 +30,7 @@ export default defineComponent({
/** 动画执行时间 */ /** 动画执行时间 */
duration: { duration: {
type: Number as PropType<number>, type: Number as PropType<number>,
default: 500, default: 300,
}, },
}, },
}) })
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<p><slot /></p> <p><slot /></p>
<div v-if="addition" class="addition"> <div v-if="addition" class="addition">
<MyCount <MyCount
v-if="addition.value" v-if="addition.value || addition.value === 0"
class="count orange-count" class="count orange-count"
:value="addition.value" :value="addition.value"
/> />
......
...@@ -2,15 +2,15 @@ import { LayerOption, PointsData } from '../types' ...@@ -2,15 +2,15 @@ import { LayerOption, PointsData } from '../types'
/** 转化点状覆盖物 */ /** 转化点状覆盖物 */
export function toPoints(options: LayerOption) { export function toPoints(options: LayerOption) {
const { data, size = 20, icon, labelKey, labelOptions } = options const { data, size = 16, icon, labelKey, labelOptions } = options
const transData = (item: PointsData) => { const transData = (item: PointsData) => {
const iconSize = Array.isArray(size) const iconSize = Array.isArray(size)
? new SMap.Size(...size) ? new SMap.Size(...size)
: new SMap.Size(size, size) : new SMap.Size(size, size)
const x = item.X || item.x || item.gpsx const x = item.minx || item.maxx || item.X || item.x || item.gpsx
const y = item.Y || item.y || item.gpsy const y = item.miny || item.maxy || item.Y || item.y || item.gpsy
if ((x !== 0 && !x) || (y !== 0 && !y)) { if ((x !== 0 && !x) || (y !== 0 && !y)) {
console.error(`add point: 非法的坐标[${x}, ${y}] 存在于数据: ${item}`) console.info(`add point: 非法的坐标[${x}, ${y}] 存在于数据: ${item}`)
} }
const z = item.Z || item.z || item.gpsz || 0 const z = item.Z || item.z || item.gpsz || 0
const result: any = { const result: any = {
......
...@@ -7,4 +7,7 @@ export default { ...@@ -7,4 +7,7 @@ export default {
SET_COM(state: GlobalStateProps, e: any) { SET_COM(state: GlobalStateProps, e: any) {
state.com = e state.com = e
}, },
SET_COMMUNITY_LIST(state: GlobalStateProps, data: any[]) {
state.communityList = data
},
} }
export default { export default {
showLoading: false, showLoading: false,
com: null, com: null,
communityList: [] as any[],
} }
This diff is collapsed.
<template>
<div class="community-info">
<m-sub>小区基本信息</m-sub>
<m-form
:template="[
'stNameFrst:小区名称|stNameScnd:小区别名|addrFrst:小区地址',
'finishDate:竣工日期|stCnstArea:总建筑面积(㎡)|isOpen:小区封闭与否',
'hoName:房管办|streetName:街道|loopLineName:环线',
'stCspEast:小区四至范围东|getStCspWest:小区四至范围西|stCspSouth:小区四至范围南',
'stCspNorth:小区四至范围北|stNotcsparea:四至不包括|stKindName:小区性质',
'sectTypeName:小区类型|cspServiceTypeName:物业服务类型|totOngParks:地面停车位数量',
'totUngParks:地下停车位数量|landArea:占地面积|totUnits:总门牌数',
'totHous:总户数||',
]"
:data="info"
/>
<m-sub>小区管理处信息</m-sub>
<m-form
:template="[
'csName:管理处名称|csAddress:办公地址|csContacter:管理处联系人',
'csTel:联系人联系电话|csDayTel:日间报修电话|nightTel:夜间报修电话',
'complaintTel:物业投诉电话|csFax:管理处传真|csPostCode:管理处邮编',
]"
:data="info"
/>
<m-sub>物业企业信息</m-sub>
<m-form
:template="[
'cspName:物业企业名称|cspContractStartDate:合同开始日期|cspContractEndDate:合同结束日期',
'legalRepName:企业法人代表|cspTel:企业联系电话|cspContacter:企业联系人',
'cspAddr:办公地址||',
]"
:data="info"
/>
<m-sub>小区经理信息</m-sub>
<m-form
:template="[
'csmName:姓名|csmJobCode:上岗证号|certType:证件类型',
'csmJobQualification:资格证书名称|csmJobLog:资格证书编号|csmTel:固定电话',
'credentialsNo:证件号码||',
]"
:data="info"
/>
<m-sub>业主大会信息</m-sub>
<m-form
:template="[
'hocCode:业主大会代码|hocName:名称|hocAddr:地址',
'electionDate:选举时间|directorName:主任|deputyDirectorName:副主任',
'commValidDate:任期|hocTerm:第几届|recordDate:业主大会备案日期',
'onwersTypeoperName:业主大会运作情况类别|onwersTransitionName:换届情况类别|conStartDate:业委会任期起始时间',
'conEndDate:业委会任期结束时间||',
]"
:data="info"
/>
<m-sub>居委会信息</m-sub>
<m-form
:template="[
'cmtName:居委会名称|cmtAddr:居委会地址|cmtDirectorName:居委主任姓名',
'cmtSecretaryName:居委书记姓名||',
]"
:data="info"
/>
</div>
</template>
<script lang="ts" setup>
import { PropType } from 'vue'
defineProps({
info: {
type: Object as PropType<{ [key: string]: unknown }>,
default: () => ({}),
},
})
</script>
<style lang="stylus" scoped>
.community-info
>.my-sub
margin-top .1rem
font-size .12rem
padding-left .1rem
background-clip text
-webkit-background-clip text
-webkit-text-fill-color transparent
background-image linear-gradient(to bottom, #FFD1B2, #FF8635)
</style>
...@@ -49,7 +49,7 @@ const btns = computed(() => [ ...@@ -49,7 +49,7 @@ const btns = computed(() => [
{ {
key: 'list', key: 'list',
icon: btn5, icon: btn5,
hidden: !props.isDefaultScreen || props.onlyOneView, hidden: props.onlyOneView,
}, },
{ key: 'btn6', icon: btn6 }, { key: 'btn6', icon: btn6 },
]) ])
...@@ -61,7 +61,7 @@ const onClick = (key: string) => { ...@@ -61,7 +61,7 @@ const onClick = (key: string) => {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.map-btns .map-btns
position fixed position fixed
z-index 9999 z-index 99
right 29% right 29%
bottom .05rem bottom .05rem
transition right .25s ease-in-out transition right .25s ease-in-out
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import icon1 from '@/assets/images/search.png' import icon1 from '@/assets/images/search.png'
import { MyMap } from '@/components/my-map' import { MyMap } from '@/components/my-map'
import { Location, FocusOptions } from '@/components/my-map/types'
import { nextTick, onMounted } from 'vue' import { nextTick, onMounted } from 'vue'
import jinganPath from '@/utils/jingan-path.js' import jinganPath from '@/utils/jingan-path.js'
import { ajax, api } from '@/ajax' import { ajax, api } from '@/ajax'
...@@ -15,8 +16,8 @@ let linesLayer: any ...@@ -15,8 +16,8 @@ let linesLayer: any
let polygonLayer: any let polygonLayer: any
let boundary: any let boundary: any
defineExpose({ zoomIn, zoomOut, zoomTo, addPoints, remove }) defineExpose({ zoomIn, zoomOut, zoomTo, focus, addPoints, remove })
const emit = defineEmits(['event']) const emit = defineEmits(['event', 'complete'])
onMounted(async () => { onMounted(async () => {
await nextTick() await nextTick()
...@@ -30,7 +31,7 @@ onMounted(async () => { ...@@ -30,7 +31,7 @@ onMounted(async () => {
netType: 'internet', netType: 'internet',
}) })
map.on('load', onComplete).on('click', (data) => emit('event', data)) map.on('load', onComplete).on('click', (_, data) => emit('event', data))
// .on('zoom', (e) => console.log('zoom: ', e)) // .on('zoom', (e) => console.log('zoom: ', e))
// .on('move', (e) => console.log('move: ', e)) // .on('move', (e) => console.log('move: ', e))
// .on('blur', (e) => console.log('blur: ', e)) // .on('blur', (e) => console.log('blur: ', e))
...@@ -55,6 +56,7 @@ function onComplete() { ...@@ -55,6 +56,7 @@ function onComplete() {
map.instance.setFilter('wg_gis_mpz', "HPB_NAME = '静安区'") map.instance.setFilter('wg_gis_mpz', "HPB_NAME = '静安区'")
// eslint-disable-next-line // eslint-disable-next-line
map.instance.setFilter('wg_gis_xq_poly', "HPB_NAME = '静安区'") map.instance.setFilter('wg_gis_xq_poly', "HPB_NAME = '静安区'")
emit('complete')
} }
function zoomIn() { function zoomIn() {
...@@ -66,8 +68,12 @@ function zoomOut() { ...@@ -66,8 +68,12 @@ function zoomOut() {
function zoomTo(level: number) { function zoomTo(level: number) {
map.zoomTo(level) map.zoomTo(level)
} }
function focus(location: Location, options?: FocusOptions) {
map.focus(location, options)
}
function addPoints(options) { function addPoints(options) {
console.log('撒点', options)
return map.add('point', options) return map.add('point', options)
// map.add('point', { // map.add('point', {
// data: [ // data: [
......
...@@ -7,12 +7,7 @@ ...@@ -7,12 +7,7 @@
:options="selectOptions" :options="selectOptions"
size="small" size="small"
/> />
<n-input <n-input v-model:value="searchKey" size="small" clearable />
v-model:value="searchKey"
size="small"
clearable
:loading="loading"
/>
<n-button type="primary" ghost size="small" @click="onSearch"> <n-button type="primary" ghost size="small" @click="onSearch">
搜索 搜索
</n-button> </n-button>
...@@ -61,10 +56,8 @@ const selectOptions = [ ...@@ -61,10 +56,8 @@ const selectOptions = [
] ]
const searchType = ref('name') const searchType = ref('name')
const searchKey = ref('') const searchKey = ref('')
const loading = ref(false) const list = ref<any[]>([])
const list = ref([])
const onSearch = async () => { const onSearch = async () => {
loading.value = true
let query: any = { stNameFrst_l: searchKey.value } let query: any = { stNameFrst_l: searchKey.value }
if (searchType.value === 'address') { if (searchType.value === 'address') {
query = { addrFrst_l: searchKey.value } query = { addrFrst_l: searchKey.value }
...@@ -77,7 +70,6 @@ const onSearch = async () => { ...@@ -77,7 +70,6 @@ const onSearch = async () => {
showLoading: false, showLoading: false,
}) })
)?.data?.content || [] )?.data?.content || []
loading.value = false
} }
const onSelect = (data) => { const onSelect = (data) => {
emit('select', data) emit('select', data)
......
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
> >
<TrashBin /> <TrashBin />
</n-icon> </n-icon>
<!-- <n-icon <n-icon
v-show="!!components[index]" v-show="!!components[index]"
class="btn config" class="btn config"
size=".16rem" size=".16rem"
@click="onSetComponent(componentList[components[index]])" @click="onSetComponent(componentList[components[index]])"
> >
<Settings /> <Settings />
</n-icon> --> </n-icon>
</div> </div>
</m-grid> </m-grid>
</div> </div>
......
This diff is collapsed.
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