Commit 8f060506 authored by 郭铭瑶's avatar 郭铭瑶 🤘

更新

parent 6fb5d5e7
<!DOCTYPE html><html id=html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=X-UA-Compatible content="IE=edge, chrome=1"><title>物业督查实时专题图</title><style>html { <!DOCTYPE html><html id=html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=X-UA-Compatible content="IE=edge, chrome=1"><title>物业督查实时专题图</title><style>html {
font-size: 1.6vh; font-size: 1.6vh;
}</style><script src=./static/jquery.min.js></script><script type=text/javascript src=http://192.168.104.33:8181/smimap/ShsmiGis.Bridge.js></script><link href=./static/css/app.328582472efdd30f1e87f2dfe3309e80.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.4ae339ed147562afff89.js></script><script type=text/javascript src=./static/js/vendor.dc1ed2d0549b6d6f959d.js></script><script type=text/javascript src=./static/js/app.47070a447eb567d2d706.js></script></body></html> }</style><script src=./static/jquery.min.js></script><script type=text/javascript src=http://192.168.104.33:8181/smimap192/mapdebug/ShsmiGis.Bridge.js></script><link href=./static/css/app.94c87921ac83df0a001bf13c0ce51e65.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.2ff3f75c5fa31b20e4e1.js></script><script type=text/javascript src=./static/js/vendor.dc1ed2d0549b6d6f959d.js></script><script type=text/javascript src=./static/js/app.bcd5887d93dbda6bb350.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
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 source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,i){for(var u,a,f,s=0,l=[];s<r.length;s++)a=r[s],t[a]&&l.push(t[a][0]),t[a]=0;for(u in c)Object.prototype.hasOwnProperty.call(c,u)&&(e[u]=c[u]);for(n&&n(r,c,i);l.length;)l.shift()();if(i)for(s=0;s<i.length;s++)f=o(o.s=i[s]);return f};var r={},t={3:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],i=document.createElement("script");i.type="text/javascript",i.charset="utf-8",i.async=!0,i.timeout=12e4,o.nc&&i.setAttribute("nonce",o.nc),i.src=o.p+"static/js/"+e+"."+{0:"6242496c6168188d415e"}[e]+".js";var u=setTimeout(a,12e4);function a(){i.onerror=i.onload=null,clearTimeout(u);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return i.onerror=i.onload=a,c.appendChild(i),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]); !function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={3:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"3c7fe924c8435399ea9b"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.4ae339ed147562afff89.js.map //# sourceMappingURL=manifest.2ff3f75c5fa31b20e4e1.js.map
\ No newline at end of file \ No newline at end of file
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
} }
</style> </style>
<script src="./static/jquery.min.js"></script> <script src="./static/jquery.min.js"></script>
<!-- <script type='text/javascript' src='http://168.168.112.76:8181/smimap/ShsmiGis.Bridge.js'></script> --> <!-- <script type='text/javascript' src='http://168.168.112.76:8181/smimap/mapdebug/ShsmiGis.Bridge.js'></script> -->
<script type='text/javascript' src='http://192.168.104.33:8181/smimap/ShsmiGis.Bridge.js'></script> <script type='text/javascript' src='http://192.168.104.33:8181/smimap192/mapdebug/ShsmiGis.Bridge.js'></script>
<!-- <script type='text/javascript' src='https://api.map.baidu.com/api?v=2.0&ak=MvCb6BWu4jHR9TD0svHfO4bWlx9pA9HG'></script> --> <!-- <script type='text/javascript' src='https://api.map.baidu.com/api?v=2.0&ak=MvCb6BWu4jHR9TD0svHfO4bWlx9pA9HG'></script> -->
</head> </head>
<body> <body>
......
...@@ -5,6 +5,7 @@ $color-map(opacity = 0.3) ...@@ -5,6 +5,7 @@ $color-map(opacity = 0.3)
rgba(91, 213, 255, opacity) rgba(91, 213, 255, opacity)
$color-green = #82DF12 $color-green = #82DF12
$color-blue = #47B3FF $color-blue = #47B3FF
$color-red = #D82B2B
$layout(gap = 0.6rem) $layout(gap = 0.6rem)
width 100% width 100%
height 100% height 100%
......
...@@ -12,8 +12,11 @@ default: ...@@ -12,8 +12,11 @@ default:
export default { export default {
BASE_URL, BASE_URL,
IMG_URL, IMG_URL,
// MAP_URL: 'http://168.168.112.76:8181', // MAP_URL: 'http://168.168.112.76:8181/smimap/index.html',
MAP_URL: 'http://192.168.104.33:8181', // MAP_ICON_BASE: 'http://168.168.112.76:8181/smimap/images/',
MAP_URL: 'http://192.168.104.33:8181/smimap192/index.html',
MAP_ICON_BASE: 'http://192.168.104.33:8181/smimap192/images/',
POST_THEME_LIST: '/sharingplatform/themeListForOneDay', POST_THEME_LIST: '/sharingplatform/themeListForOneDay',
POST_COMMUNITY_LIST: '/sharingplatform/sectListForOneDay', POST_COMMUNITY_LIST: '/sharingplatform/sectListForOneDay',
POST_COMMUNITY_DETAIL: '/sharingplatform/detailForOneDay', POST_COMMUNITY_DETAIL: '/sharingplatform/detailForOneDay',
......
...@@ -38,8 +38,11 @@ export default { ...@@ -38,8 +38,11 @@ export default {
* ------ 从数据中整理出地图撒点所需的参数 ------- * ------ 从数据中整理出地图撒点所需的参数 -------
* @param {Array} data [必填 - 获取的数据] * @param {Array} data [必填 - 获取的数据]
* @param {String} key [必填 - 根据哪个关键字区别撒点(一般是id)] * @param {String} key [必填 - 根据哪个关键字区别撒点(一般是id)]
* @param {String} labelKey [可选 - 传入则显示标签,取哪个值则传哪个值的key]
* @param {String} icon [可选 - icon名称]
* @param {Number} size [可选 - icon的大小(默认20)]
*/ */
getMapParams(data = [], key, icon='/propertybusinessmanage/tjcmv/images/marker/1.png', size=20) { getMapParams({data = [], key, labelKey = null, icon='test.png', size = 22}) {
const dataArray = [] const dataArray = []
const uniqueValueInfos = [] const uniqueValueInfos = []
const fieldJsonArray = [] const fieldJsonArray = []
...@@ -50,18 +53,29 @@ export default { ...@@ -50,18 +53,29 @@ export default {
type: 'string', type: 'string',
}) })
} }
if (labelKey) {
fieldJsonArray.push({
name: 'name',
alias: '标签',
type: 'string',
})
}
data.forEach(item => { data.forEach(item => {
dataArray.push({ const array = {
codX: item.X, codX: item.X,
codY: item.Y, codY: item.Y,
codZ: 100, codZ: 100,
attrs: { attrs: {
...item, ...item,
}, },
}) }
if (labelKey) {
array.attrs.name = item[labelKey]
}
dataArray.push(array)
uniqueValueInfos.push({ uniqueValueInfos.push({
value: item[key], value: item[key],
label: '?', // TODO label: item[labelKey] || item[key],
symbol: { symbol: {
type: 'point-3d', type: 'point-3d',
symbolLayers: [ symbolLayers: [
...@@ -69,7 +83,7 @@ export default { ...@@ -69,7 +83,7 @@ export default {
type: 'icon', type: 'icon',
size, size,
resource: { resource: {
href: api.MAP_URL + icon, href: api.MAP_ICON_BASE + icon,
// href: 'http://962121.net/hmfmstest/shanghaiwuye/web/dataV/static/person-bg.png', // href: 'http://962121.net/hmfmstest/shanghaiwuye/web/dataV/static/person-bg.png',
}, },
}, },
...@@ -86,14 +100,15 @@ export default { ...@@ -86,14 +100,15 @@ export default {
renderer: { renderer: {
type: 'unique-value', type: 'unique-value',
field: key, field: key,
defaultLabel: '无数据',
uniqueValueInfos, uniqueValueInfos,
}, },
labelSymbol: { labelsymbol: {
symbol: { symbol: {
type: 'text', type: 'text',
color: 'red', color: '#00f2ff',
haloSize: 2, haloSize: 0,
haloColor: '#fff', haloColor: 'white',
}, },
labelPlacement: 'center-right', labelPlacement: 'center-right',
} }
......
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
height 0.4rem height 0.4rem
border-radius 50% border-radius 50%
&.label1 &.label1
color red color $color-red
left 2.4% left 2.4%
top 22.5% top 22.5%
.dot .dot
...@@ -102,8 +102,8 @@ export default { ...@@ -102,8 +102,8 @@ export default {
&.default &.default
background $cardBg background $cardBg
&.red &.red
background red background $color-red
box-shadow 0 0 0.3rem 0.1rem red box-shadow 0 0 0.3rem 0.1rem $color-red
&.blue &.blue
background $color-blue background $color-blue
box-shadow 0 0 0.3rem 0.1rem $color-blue box-shadow 0 0 0.3rem 0.1rem $color-blue
......
...@@ -37,14 +37,17 @@ export default { ...@@ -37,14 +37,17 @@ export default {
.box .box
background rgba(0,0,0,0.5) background rgba(0,0,0,0.5)
padding 0.5rem 1rem padding 0.5rem 1rem
display flex
flex-direction column
justify-content space-around
&:nth-child(3) &:nth-child(3)
span span
color $color-blue color $color-blue
text-shadow 0 0 0.3rem $color-blue text-shadow 0 0 0.3rem $color-blue
&:nth-child(4) &:nth-child(4)
span span
color red color $color-red
text-shadow 0 0 0.3rem red text-shadow 0 0 0.3rem $color-red
b b
color #ccc color #ccc
img img
......
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
}, },
methods: { methods: {
initData(themeId = null, startDate = '20190101', endDate = '20200101') { initData(themeId = null, startDate = '20190101', endDate = '20200101') {
const today = this.$moment().format('YYYYMMDD') const today = this.$moment('20200113').format('YYYYMMDD')
const defaultDay = this.$moment().format('YYYYMMDD') // 检查人员列表默认开始、结束时间 const defaultDay = this.$moment().format('YYYYMMDD') // 检查人员列表默认开始、结束时间
const communityParams = {someday: today} const communityParams = {someday: today}
// const personParams = {startDate: defaultDay, endDate: defaultDay} // const personParams = {startDate: defaultDay, endDate: defaultDay}
...@@ -236,7 +236,7 @@ export default { ...@@ -236,7 +236,7 @@ export default {
const {ShsmiGis} = window const {ShsmiGis} = window
this.map = new ShsmiGis.Bridge({ this.map = new ShsmiGis.Bridge({
id: 'map', id: 'map',
url: this.$api.MAP_URL + '/smimap/index.html', url: this.$api.MAP_URL,
onReady: () => { onReady: () => {
console.log('地图创建完成') console.log('地图创建完成')
this.initData() this.initData()
...@@ -261,87 +261,9 @@ export default { ...@@ -261,87 +261,9 @@ export default {
} }
}, this) }, this)
}, },
addPoint(name, key, data, icon='/propertybusinessmanage/tjcmv/images/marker/1.png') { addPoint({name, key, data, labelKey = null, icon = 'test.png', size = 16}) {
// const params = { if(!this.map) return
// name: 'test-point', const params = this.$com.getMapParams({data, key, labelKey, icon, size})
// mode: 'add',
// dataArray: [
// {
// codX: -1000,
// codY: -1000,
// codZ: 100,
// attrs: {
// att1: '测试属性',
// attm: '第1类',
// name: 'test',
// },
// },
// ],
// popupEnabled: false, // 是否打开弹出框
// legendVisible: false, // 图例是否可见
// type: 'point',
// fieldJsonArray: [
// {
// name: 'att1',
// alias: '属性1',
// type: 'string',
// },
// {
// name: 'attm',
// alias: '属性m',
// type: 'string',
// },
// {
// name: 'name',
// alias: '名称',
// type: 'string',
// },
// ],
// renderer: {
// type: 'unique-value',
// field: 'attm',
// defaultLabel: '无数据',
// uniqueValueInfos: [
// {
// value: '第1类',
// label: '第I类',
// symbol: {
// type: 'point-3d',
// symbolLayers: [
// {
// type: 'icon',
// size: 20,
// resource: {
// // href: 'http://192.168.104.33:8181/propertybusinessmanage/tjcmv/images/marker/1.png'
// href: this.$api.MAP_URL + icon,
// // href: 'http://962121.net/hmfmstest/shanghaiwuye/web/dataV/static/person-bg.png',
// },
// },
// {
// type: 'text',
// value: '123',
// name: '123',
// color: 'black',
// haloSize: 2,
// haloColor: 'white',
// }
// ]
// }
// },
// ]
// },
// labelSymbol: {
// symbol: {
// type: 'text',
// color: 'black',
// haloSize: 2,
// haloColor: 'white',
// },
// labelPlacement: 'center-right',
// }
// }
if(!this.mao) return
const params = this.$com.getMapParams(data, key, icon)
params.name = name params.name = name
params.mode = 'add' params.mode = 'add'
this.map.Invoke({ this.map.Invoke({
...@@ -359,30 +281,21 @@ export default { ...@@ -359,30 +281,21 @@ export default {
}) })
}) })
}, },
gotoPosition(x, y) { gotoPosition(x, y, zoom = 6) {
if (!this.map || !x || !y ) return if (!this.map || !x || !y ) return
// const params = { const params = {
// heading: 0, codX: x,
// tilt: 49.71, codY: y,
// fov: 55, zoomlevel: zoom,
// position: { }
// x, this.map.Invoke({
// y, ActionName: 'goToPosition',
// z: 14568.34, Parameters: JSON.stringify(params),
// }, })
// spatialRefrence: {
// wkid: 3875,
// }
// }
// this.map.Invoke({
// ActionName: 'goToPosition',
// Parameters: JSON.stringify(params),
// })
}, },
handlePersonSelect(data) { handlePersonSelect(data) {
this.removePoint('selected-point') // this.removePoint('selected-point')
// TODO 图片应为选中人员的图片 // this.addPoint({name:'selected-point', key:'OPER_ID', labelKey: 'TE_NAME', data:[data], icon:'person-on.gif', size: 30})
this.addPoint('selected-point', 'OPER_ID', [data], '/propertybusinessmanage/tjcmv/images/marker/2.png')
const {OPER_ID, TASK_ID, X, Y} = data const {OPER_ID, TASK_ID, X, Y} = data
this.gotoPosition(X, Y) this.gotoPosition(X, Y)
this.$ajax.post({ this.$ajax.post({
...@@ -397,13 +310,13 @@ export default { ...@@ -397,13 +310,13 @@ export default {
}) })
}, },
closePersonModal() { closePersonModal() {
this.removePoint('selected-point')
this.$refs.person.reset() this.$refs.person.reset()
this.showPersonModal = false this.showPersonModal = false
}, },
handleCommunitySelect(data) { handleCommunitySelect(data) {
this.removePoint('selected-point') this.removePoint('selected-point')
// TODO 图片应为选中小区的图片 this.addPoint({name: 'selected-point', key: 'COMMUNITYID', labelKey: 'COMMUNITYNAME', data:[data], icon: 'red.png',})
this.addPoint('selected-point', 'COMMUNITYID', [data], '/propertybusinessmanage/tjcmv/images/marker/2.png')
const {COMMUNITYID, CHECKID, X, Y} = data const {COMMUNITYID, CHECKID, X, Y} = data
this.gotoPosition(X, Y) this.gotoPosition(X, Y)
this.$ajax.post({ this.$ajax.post({
...@@ -427,6 +340,7 @@ export default { ...@@ -427,6 +340,7 @@ export default {
}) })
}, },
closeCommunityModal() { closeCommunityModal() {
this.removePoint('selected-point')
this.$refs.community.reset() this.$refs.community.reset()
this.$refs.community2.reset() this.$refs.community2.reset()
this.showCommunityModal = false this.showCommunityModal = false
...@@ -434,6 +348,8 @@ export default { ...@@ -434,6 +348,8 @@ export default {
handleThemeSelect(TASK_ID, {START_DATE, END_DATE}) { handleThemeSelect(TASK_ID, {START_DATE, END_DATE}) {
this.removePoint('selected-point') this.removePoint('selected-point')
this.removePoint('checked-points') this.removePoint('checked-points')
this.showCommunityModal = false
this.showPersonModal = false
// TODO START_DATE, END_DATE看获取检查人列表是否需要用到 // TODO START_DATE, END_DATE看获取检查人列表是否需要用到
this.initData(TASK_ID) this.initData(TASK_ID)
}, },
...@@ -454,25 +370,26 @@ export default { ...@@ -454,25 +370,26 @@ export default {
this.$refs.theme.reset() this.$refs.theme.reset()
this.removePoint('selected-point') this.removePoint('selected-point')
this.removePoint('checked-points') this.removePoint('checked-points')
this.removePoint('person-points')
this.initData() this.initData()
}, },
}, },
watch: { watch: {
'$store.state.checkedCommunityList': { '$store.state.checkedCommunityList': {
handler(cur, past) { handler(cur, past) {
this.addPoint('checked-points', 'COMMUNITYID', cur) this.addPoint({name: 'checked-points', key: 'COMMUNITYID', data: cur, icon: 'blue.png'})
} }
}, },
// '$store.state.rectifyCommunityList': { // '$store.state.rectifyCommunityList': {
// handler(cur, past) { // handler(cur, past) {
// this.addPoint('rectify-points', 'COMMUNITYID', cur) // this.addPoint({name:'rectify-points', key: 'COMMUNITYID', data: cur, icon: 'red.png'})
// }
// },
// '$store.state.personList': {
// handler(cur, past) {
// this.addPoint('person-points', 'OPER_ID', cur)
// } // }
// }, // },
'$store.state.personList': {
handler(cur, past) {
this.addPoint({name:'person-points', key: 'OPER_ID', labelKey: 'TE_NAME', data: cur, icon: 'person-bg2.png', size: 28})
}
},
} }
} }
</script> </script>
......
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