11 files modified
3 files added
| | |
| | | method: 'GET', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const getNearbyPlaceList = (params) => { |
| | | return http.request({ |
| | | url: '/blade-place/place/getNearbyPlaceList', |
| | | method: 'GET', |
| | | params |
| | | }) |
| | | } |
| | |
| | | url: '/pages/home/index' |
| | | }, |
| | | { |
| | | name: '圈子', |
| | | name: '周边', |
| | | iconPathSelected: '/static/img/tabbar-09-selected.png', |
| | | iconPath: '/static/img/tabbar-09.png', |
| | | url: '/pages/myMap/myMap' |
| | | }, |
| | | { |
| | | name: '邻里圈', |
| | | iconPathSelected: '/static/img/tabbar-02-selected.png', |
| | | iconPath: '/static/img/tabbar-02.png', |
| | | url: '/pages/circle/index' |
| | |
| | | url: '/pages/home/index' |
| | | }, |
| | | { |
| | | name: '圈子', |
| | | name: '周边', |
| | | iconPathSelected: '/static/img/tabbar-09-selected.png', |
| | | iconPath: '/static/img/tabbar-09.png', |
| | | url: '/pages/myMap/myMap' |
| | | }, |
| | | { |
| | | name: '协同圈', |
| | | iconPathSelected: '/static/img/tabbar-08-selected.png', |
| | | iconPath: '/static/img/tabbar-08.png', |
| | | url: '/pages/circle/index' |
| | |
| | | url: '/pages/home/index' |
| | | }, |
| | | { |
| | | name: '圈子', |
| | | name: '周边', |
| | | iconPathSelected: '/static/img/tabbar-09-selected.png', |
| | | iconPath: '/static/img/tabbar-09.png', |
| | | url: '/pages/myMap/myMap' |
| | | }, |
| | | { |
| | | name: '协同圈', |
| | | iconPathSelected: '/static/img/tabbar-02-selected.png', |
| | | iconPath: '/static/img/tabbar-02.png', |
| | | url: '/pages/circle/index' |
| | |
| | | url: '/pages/home/index' |
| | | }, |
| | | { |
| | | name: '周边', |
| | | iconPathSelected: '/static/img/tabbar-09-selected.png', |
| | | iconPath: '/static/img/tabbar-09.png', |
| | | url: '/pages/myMap/myMap' |
| | | }, |
| | | { |
| | | name: '圈子', |
| | | iconPathSelected: '/static/img/tabbar-02-selected.png', |
| | | iconPath: '/static/img/tabbar-02.png', |
| | |
| | | url: '/pages/home/index' |
| | | }, |
| | | { |
| | | name: '周边', |
| | | iconPathSelected: '/static/img/tabbar-09-selected.png', |
| | | iconPath: '/static/img/tabbar-09.png', |
| | | url: '/pages/myMap/myMap' |
| | | }, |
| | | { |
| | | name: '我的', |
| | | iconPathSelected: '/static/img/tabbar-03-selected.png', |
| | | iconPath: '/static/img/tabbar-03.png', |
| | |
| | | }, |
| | | "sdkConfigs" : { |
| | | "maps" : { |
| | | "amap" : { |
| | | "key" : "7fa69abe1defd5888bb85bc736cda874", |
| | | "securityJsCode" : "8ac9e5f522c62ed6e3a5800a87b0d140", |
| | | "serviceHost" : "" |
| | | "qqmap" : { |
| | | "key" : "EG5BZ-FTCKW-SEMRD-3CVLI-X6MNH-QKBLS" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/myMap/myMap", |
| | | "style": { |
| | | "navigationBarTitleText": "地图", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | } |
| | | ], |
| | | "subPackages": [ |
| | |
| | | "text": "首页" |
| | | }, |
| | | { |
| | | "pagePath": "pages/circle/index", |
| | | "pagePath": "pages/myMap/myMap", |
| | | "iconPath": "static/img/tabbar-02.png", |
| | | "selectedIconPath": "static/img/tabbar-02-selected.png", |
| | | "text": "周边" |
| | | }, |
| | | { |
| | | "pagePath": "pages/circle/index", |
| | | "iconPath": "static/img/tabbar-09.png", |
| | | "selectedIconPath": "static/img/tabbar-09-selected.png", |
| | | "text": "圈子" |
| | | }, |
| | | { |
| | |
| | | </view> |
| | | </z-paging> |
| | | |
| | | <tabBar :current="1" :list="tabList" /> |
| | | <tabBar :current="2" :list="tabList" /> |
| | | |
| | | </view> |
| | | |
| | |
| | | padding: 10rpx 0; |
| | | width: 200rpx; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | </view>
|
| | | </u-grid-item>
|
| | |
|
| | |
|
| | |
|
| | | </block>
|
| | | <u-grid-item v-if="roleName == 'xyzt'"
|
| | | @click="navigatorPage('/subPackage/school/troubleTaskList')">
|
| | |
| | | }
|
| | | ]
|
| | | },
|
| | |
|
| | | ],
|
| | |
|
| | |
|
| | |
| | | },
|
| | |
|
| | | changeTabs(e) {
|
| | | // console.log(item);
|
| | | console.log("******eeeee**********", e);
|
| | | this.tabIndex = e
|
| | | },
|
| | |
|
| | |
| | | this.liveList = this.setLiveMenu(this.hasMenu('生活'));
|
| | | this.jobList = this.hasMenu('工作台')
|
| | | this.sectionList = this.hasMenu('首页菜单')
|
| | | let taskMenuList = this.hasMenu('待办事项菜单')
|
| | | let taskMenuList = this.hasMenu('待办事项')
|
| | | if (this.menuList.length) {
|
| | | this.getContactMenu();
|
| | | this.getHouseMenu();
|
| | |
| | |
|
| | | <style lang="scss">
|
| | | @import "./index.scss";
|
| | | </style>
|
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="base_body"> |
| | | <map :markers="markers" @tap="regionchange" :circles="circles" :show-compass="true" :scale="scale" id="map1" |
| | | style="width: 100%; height: 100%;" :latitude="latitude" :longitude="longitude"> |
| | | <cover-view slot="callout"> |
| | | <block v-for="(item,index) in markers" :key="index"> |
| | | <cover-view class="customCallout" :marker-id="item.id" v-if="item.title"> |
| | | <cover-view class="content"> |
| | | <!-- <view>随意指定</view> --> |
| | | {{item.title}} |
| | | </cover-view> |
| | | </cover-view> |
| | | </block> |
| | | </cover-view> |
| | | |
| | | <view class="home-icon" @click="backMyLocation"> |
| | | <u-icon name="home" color="#000" size="28px"></u-icon> |
| | | <text style="font-size: 12px;">我的位置</text> |
| | | </view> |
| | | </map> |
| | | <tabBar :current="1" :list="tabbarList" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import tabBar from "@/components/tabBar/tabBar.vue" |
| | | import { |
| | | getTabbarList |
| | | } from "@/common/common.js" |
| | | import { |
| | | getNearbyPlaceList |
| | | } from '@/api/place/place.js' |
| | | export default { |
| | | components: { |
| | | tabBar |
| | | }, |
| | | data() { |
| | | return { |
| | | roleType: 1, |
| | | addressType: 1, |
| | | user_info: {}, |
| | | color: "#017BFC", |
| | | tabbarList: [], |
| | | map: '', |
| | | scale: 18, |
| | | latitude: '', // 地图默认显示的维度 |
| | | longitude: '', // 地图默认显示的纬度 |
| | | markers: [], |
| | | //在地图上显示圈 |
| | | circles: [{ |
| | | longitude: 116.2529, |
| | | latitude: 39.542, |
| | | color: '#DEDEF8', |
| | | fillColor: '#DEDEF8', // 填充颜色 |
| | | radius: 150, // 圆半径 |
| | | strokeWidth: 1 // 边 |
| | | }], |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | }, |
| | | |
| | | onReady() {}, |
| | | |
| | | onShow() { |
| | | let role = uni.getStorageSync('activeRole') |
| | | if (role.roleName == "居民" || role.roleName == '无诈') { |
| | | this.tabbarList = getTabbarList(1) |
| | | this.roleType = 1 |
| | | this.color = "#017BFC" |
| | | // this.tabbarIndex = 1; |
| | | this.tabbarIndex = 2 |
| | | } else if (role.roleName == "民警") { |
| | | this.tabbarList = getTabbarList(2) |
| | | this.roleType = 2; |
| | | this.color = "#003399" |
| | | // this.tabbarIndex = 2; |
| | | this.tabbarIndex = 3; |
| | | } else if (role.roleName == "系统管理员") { |
| | | this.tabbarList = getTabbarList(4) |
| | | this.roleType = 1 |
| | | this.color = "#017BFC"; |
| | | // this.tabbarIndex = 2; |
| | | this.tabbarIndex = 3; |
| | | } else if (role.roleName == "网格员") { |
| | | this.tabbarList = getTabbarList(3) |
| | | this.roleType = 1 |
| | | this.color = "#017BFC"; |
| | | // this.tabbarIndex = 2; |
| | | this.tabbarIndex = 3; |
| | | } else if (role.roleName == '校园主体' || role.roleName == '校园通用') { |
| | | this.tabbarList = getTabbarList(5); |
| | | this.roleType = 5 |
| | | } else { |
| | | this.tabbarList = getTabbarList(1) |
| | | this.roleType = 1 |
| | | this.color = "#017BFC" |
| | | // this.tabbarIndex = 1; |
| | | this.tabbarIndex = 2 |
| | | } |
| | | if (uni.getStorageSync("siteInfo")) { |
| | | this.addressType = uni.getStorageSync("siteInfo").addressType; |
| | | } |
| | | this.getLocations() |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | backMyLocation() { |
| | | this.getLocations() |
| | | }, |
| | | |
| | | async getLocations() { |
| | | let param |
| | | let that = this |
| | | await uni.getLocation({ |
| | | type: 'gcj02', |
| | | isHighAccuracy: true, |
| | | success: function(res) { |
| | | console.log('当前位置的经度:' + res.longitude); |
| | | console.log('当前位置的纬度:' + res.latitude); |
| | | that.latitude = res.latitude |
| | | that.longitude = res.longitude |
| | | that.getList() |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | regionchange(e) { |
| | | console.log("****************", e) |
| | | this.latitude = e.detail.latitude |
| | | this.longitude = e.detail.longitude |
| | | this.markers = [] |
| | | // if (this.latitude || this.longitude) { |
| | | // return |
| | | // } |
| | | this.getList() |
| | | }, |
| | | |
| | | getList() { |
| | | this.markers.push({ |
| | | id: 999, |
| | | latitude: this.latitude, |
| | | longitude: this.longitude, |
| | | title: '', |
| | | joinCluster: false, |
| | | width: '36px', //设置宽高 |
| | | height: '46px', |
| | | customCallout: { |
| | | anchorY: 0, // Y轴偏移量 |
| | | anchorX: 50, // X轴偏移量 |
| | | display: "ALWAYS" // 一直展示 |
| | | }, |
| | | label: { |
| | | content: '当前位置', |
| | | color: '#fff', |
| | | fontSize: 12, |
| | | borderRadius: 5, |
| | | padding: 5, |
| | | textAlign: 'center', |
| | | bgColor: '#2979ff', |
| | | } |
| | | }) |
| | | getNearbyPlaceList({ |
| | | lat: this.latitude, |
| | | lng: this.longitude |
| | | }).then(res => { |
| | | let data = res.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.markers.push({ |
| | | id: i, |
| | | latitude: data[i].lat, |
| | | longitude: data[i].lng, |
| | | title: data[i].placeName, |
| | | joinCluster: true, |
| | | width: '26px', //设置宽高 |
| | | height: '36px', |
| | | customCallout: { |
| | | anchorY: 0, // Y轴偏移量 |
| | | anchorX: 50, // X轴偏移量 |
| | | display: "ALWAYS" // 一直展示 |
| | | }, |
| | | |
| | | }) |
| | | } |
| | | console.log("*********", data) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .base_body { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | } |
| | | |
| | | /* 水平,垂直居中 */ |
| | | .base_all_center { |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | /* 垂直居中 */ |
| | | .base_center_vertical { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | /* 水平居中 */ |
| | | .base_center_horizontal { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | /* 垂直布局 */ |
| | | .base_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | /* 横向布局 */ |
| | | .base_row { |
| | | display: flex; |
| | | flex-direction: row; |
| | | } |
| | | |
| | | /* 基础dialog */ |
| | | .base_dialog { |
| | | width: 100%; |
| | | height: 80%; |
| | | position: absolute; |
| | | top: 0px; |
| | | background: rgba(0, 0, 0, 0.5); |
| | | } |
| | | |
| | | /* *************************************** */ |
| | | .customCallout { |
| | | box-sizing: border-box; |
| | | background-color: #fff; |
| | | border: 1px solid #ccc; |
| | | border-radius: 30px; |
| | | /* width: 150px; */ |
| | | /* height: 40px; */ |
| | | display: inline-flex; |
| | | padding: 5px 10px; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .content { |
| | | flex: 0 1 auto; |
| | | margin: 0 10px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .home-icon { |
| | | border-radius: 10px; |
| | | position: absolute; |
| | | bottom: 120px; |
| | | left: 83%; |
| | | color: black; |
| | | background-color: #fff; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | width: 55px; |
| | | height: 55px; |
| | | } |
| | | </style> |
| | |
| | | if (roleName == "网格员") { |
| | | this.tabList = getTabbarList(3); |
| | | // this.tabbarIndex = 1; |
| | | this.tabbarIndex = 2; |
| | | this.tabbarIndex = 3; |
| | | } |
| | | if (roleName == "民警") { |
| | | this.tabList = getTabbarList(2); |
| | | // this.tabbarIndex = 1; |
| | | this.tabbarIndex = 2; |
| | | this.tabbarIndex = 3; |
| | | } |
| | | if (roleName == "系统管理员") { |
| | | this.tabList = getTabbarList(4); |
| | | // this.tabbarIndex = 1; |
| | | this.tabbarIndex = 2; |
| | | this.tabbarIndex = 3; |
| | | } |
| | | this.refreshData(); |
| | | }, |
| | |
| | | user_info: {}, |
| | | color: "#017BFC", |
| | | tabbarList: [], |
| | | tabbarIndex: 2 |
| | | tabbarIndex: 3 |
| | | }; |
| | | }, |
| | | |
| | |
| | | this.roleType = 1 |
| | | this.color = "#017BFC" |
| | | // this.tabbarIndex = 1; |
| | | this.tabbarIndex = 2 |
| | | this.tabbarIndex = 3 |
| | | } else if (role.roleName == "民警") { |
| | | this.tabbarList = getTabbarList(2) |
| | | this.roleType = 2; |
| | | this.color = "#003399" |
| | | // this.tabbarIndex = 2; |
| | | this.tabbarIndex = 3; |
| | | this.tabbarIndex = 4; |
| | | } else if (role.roleName == "系统管理员") { |
| | | this.tabbarList = getTabbarList(4) |
| | | this.roleType = 1 |
| | | this.color = "#017BFC"; |
| | | // this.tabbarIndex = 2; |
| | | this.tabbarIndex = 3; |
| | | this.tabbarIndex = 4; |
| | | } else if (role.roleName == "网格员") { |
| | | this.tabbarList = getTabbarList(3) |
| | | this.roleType = 1 |
| | |
| | | this.tabbarIndex = 3; |
| | | } else if (role.roleName == '校园主体' || role.roleName == '校园通用') { |
| | | this.tabbarList = getTabbarList(5); |
| | | this.tabbarIndex = 2; |
| | | this.roleType = 5 |
| | | } else { |
| | | this.tabbarList = getTabbarList(1) |
| | |
| | | arr.push(i); |
| | | for (let k = 0, kk = data[i].children.length; k < kk; k++) { |
| | | // this.info.patrolRecordVOList.push(obj); |
| | | for (var j = 0; j < data[i].children.length; j++) { |
| | | data[i].children[j].state = 1 |
| | | } |
| | | |
| | | count += 1; |
| | | } |
| | | } |
| | |
| | | arr.push(i); |
| | | for (let k = 0, kk = data[i].children.length; k < kk; k++) { |
| | | // this.info.patrolRecordVOList.push(obj); |
| | | for (var j = 0; j < data[i].children.length; j++) { |
| | | data[i].children[j].state = 1 |
| | | } |
| | | count += 1; |
| | | } |
| | | } |
| | |
| | | arr.push(i); |
| | | for (let k = 0, kk = data[i].children.length; k < kk; k++) { |
| | | // this.info.patrolRecordVOList.push(obj); |
| | | for (var j = 0; j < data[i].children.length; j++) { |
| | | data[i].children[j].state = 1 |
| | | } |
| | | count += 1; |
| | | } |
| | | } |