mirror of
https://github.com/shawncai/ERP.git
synced 2025-03-02 10:23:15 +08:00
修改
This commit is contained in:
parent
b494cbd29a
commit
562e4c8a6f
6 changed files with 44 additions and 20 deletions
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<script src=<%= BASE_URL %>/tinymce4.7.5/tinymce.min.js></script>
|
||||
<!--<script type="text/javascript" src="http://maps.google.com/maps/api/js?key=AIzaSyCGoNyENiHEPc3QStdJyeeadB6XjLgYJCA"></script>-->
|
||||
<script type="text/javascript" src="http://ditu.google.cn/maps/api/js?&key=AIzaSyCcpq4V2NmldO9DdD0LHkYdyMYDQt-7Miw"></script>
|
||||
<script src=<%= BASE_URL %>/tinymce4.7.5/markerwithlabel.js></script>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
|
|
|
@ -9,6 +9,7 @@ export default {
|
|||
nwow: 'NWOW后台管理',
|
||||
CheckSet: '质检明细设置',
|
||||
home: '首页',
|
||||
map: '地图',
|
||||
AddSupplierAdjust: '新建供应商调价单',
|
||||
SupplierAdjustList: '供应商调价单列表',
|
||||
WorkDesk: '工作台',
|
||||
|
|
|
@ -88,6 +88,23 @@ export default new Router({
|
|||
})
|
||||
|
||||
export const asyncRouterMap = [
|
||||
// {
|
||||
// path: '/map',
|
||||
// component: Layout,
|
||||
// redirect: 'noredirect',
|
||||
// meta: {
|
||||
// icon: 'caigouxuqiu',
|
||||
// type: 1
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'map',
|
||||
// component: () => import('@/views/home/index'),
|
||||
// name: 'map',
|
||||
// meta: { title: 'map', noCache: true }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/home',
|
||||
component: Layout,
|
||||
|
|
|
@ -18,6 +18,7 @@ const getters = {
|
|||
userId: state => state.user.userId,
|
||||
useCountry: state => state.user.useCountry,
|
||||
regionId: state => state.user.regionId,
|
||||
regionIds: state => state.user.regionIds,
|
||||
repositoryId: state => state.user.repositoryId,
|
||||
yin: state => state.app.yin,
|
||||
countryId: state => state.user.countryId,
|
||||
|
|
|
@ -17,6 +17,7 @@ const user = {
|
|||
userId: '',
|
||||
useCountry: getToken2(),
|
||||
regionId: '',
|
||||
regionIds: '',
|
||||
repositoryId: '',
|
||||
countryId: '',
|
||||
deptId: '',
|
||||
|
@ -58,6 +59,9 @@ const user = {
|
|||
SET_REGIONID: (state, regionId) => {
|
||||
state.regionId = regionId
|
||||
},
|
||||
SET_REGIONIDS: (state, regionIds) => {
|
||||
state.regionId = regionIds
|
||||
},
|
||||
SET_REPOSITORYID: (state, repositoryId) => {
|
||||
state.repositoryId = repositoryId
|
||||
},
|
||||
|
@ -119,6 +123,7 @@ const user = {
|
|||
commit('SET_INTRODUCTION', data.introduction)
|
||||
commit('SET_USERID', data.userId)
|
||||
commit('SET_REGIONID', data.regionId)
|
||||
commit('SET_REGIONIDS', data.regionIds)
|
||||
commit('SET_REPOSITORYID', data.repositoryId)
|
||||
commit('SET_COUNTTRYID', data.countryId)
|
||||
commit('SET_DEPTID', data.deptId)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</template>
|
||||
<script>
|
||||
|
||||
// import { getrepositorybyreid } from '@/api/map'
|
||||
import { getrepositorybyreid } from '@/api/map'
|
||||
|
||||
export default {
|
||||
name: 'GGMap',
|
||||
|
@ -28,23 +28,23 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getmapdata() {
|
||||
// getrepositorybyreid().then(res => {
|
||||
// const arr = res.data.data.content
|
||||
// const arrb = []
|
||||
// arr.map(item => {
|
||||
// const newobj = {}
|
||||
// const position = {}
|
||||
// position.lng = item.longitude
|
||||
// position.lat = item.latitude
|
||||
// newobj.position = position
|
||||
// newobj.name = item.name
|
||||
// newobj.address = item.address
|
||||
// newobj.phone = item.phone
|
||||
// arrb.push(newobj)
|
||||
// })
|
||||
// this.markers = arrb
|
||||
// this.mapBuild()
|
||||
// })
|
||||
getrepositorybyreid().then(res => {
|
||||
const arr = res.data.data.content
|
||||
const arrb = []
|
||||
arr.map(item => {
|
||||
const newobj = {}
|
||||
const position = {}
|
||||
position.lng = item.longitude
|
||||
position.lat = item.latitude
|
||||
newobj.position = position
|
||||
newobj.name = item.name
|
||||
newobj.address = item.address
|
||||
newobj.phone = item.phone
|
||||
arrb.push(newobj)
|
||||
})
|
||||
this.markers = arrb
|
||||
this.mapBuild()
|
||||
})
|
||||
},
|
||||
// 地图实例
|
||||
mapBuild() {
|
||||
|
@ -67,7 +67,7 @@ export default {
|
|||
// labelStyle: { background: '#fff', padding: '5px' }
|
||||
// })
|
||||
// 自定义信息窗口
|
||||
var marker = new google.maps.Marker({
|
||||
const marker = new google.maps.Marker({
|
||||
map: map,
|
||||
position: item.position
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue