| | |
| | | }) |
| | | } |
| | | // 获取社区信息 |
| | | export const getHouseList = (type, name) => { |
| | | export const getHouseList = (param) => { |
| | | return http.request({ |
| | | url: 'blade-doorplateAddress/doorplateAddress/getHousesList', |
| | | method: 'GET', |
| | | params: { |
| | | type, |
| | | name |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 获取当前楼栋信息 |
| | | export const getHouseInfoList = (type, code) => { |
| | | return http.request({ |
| | | url: 'blade-doorplateAddress/doorplateAddress/getHousesList', |
| | | method: 'GET', |
| | | params: { |
| | | type, |
| | | code |
| | | } |
| | | params: param |
| | | }) |
| | | } |
| | | |
| | |
| | | </view>
|
| | | <view class="" v-if="roleType != 1">
|
| | | <u-grid :border="false" col="4">
|
| | | <u-grid-item v-for="(i,k) in cellList" :key="k">
|
| | | <u-grid-item v-for="(i,k) in cellList" :key="k" @click.native="toPage(i)">
|
| | | <u-icon :name="i.icon" :size="45"></u-icon>
|
| | | <text class="f-26 mt-20">{{i.text}}</text>
|
| | | </u-grid-item>
|
| | |
| | | <u-grid :border="false" col="4">
|
| | | <u-grid-item v-for="(item, index) in jobList" :index="index" :key="index"
|
| | | :customStyle="{paddingTop:20+'rpx'}">
|
| | | <view class="grid-item flex f-d-c a-i-c" :style="{background:item.style.background}">
|
| | | <view class="grid-item flex f-d-c a-i-c" :style="{background:item.background}">
|
| | | <u-icon :name="item.imgUrl" width="60rpx" height="60rpx"></u-icon>
|
| | | <text class="grid-text f-24">{{item.title}}</text>
|
| | | </view>
|
| | |
| | | ],
|
| | | cellList: [{
|
| | | icon: "/static/icon/nav-01.png",
|
| | | text: "扫一扫"
|
| | | text: "扫一扫",
|
| | | path:''
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/nav-02.png",
|
| | | text: "报事报修"
|
| | | text: "报事报修",
|
| | | path:''
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/nav-03.png",
|
| | | text: "便民热线"
|
| | | text: "便民热线",
|
| | | path:''
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/nav-04.png",
|
| | | text: "租客上报"
|
| | | text: "租客上报",
|
| | | path:'/subPackage/bs/views/zhsb'
|
| | | }
|
| | | ],
|
| | | navList: [{
|
| | |
| | |
|
| | |
|
| | | // 获取楼盘
|
| | | async getHouseDataList(name) {
|
| | | const res = await getHouseList(1, name)
|
| | | console.log(res);
|
| | | async getHouseDataList(code) {
|
| | | const param = {
|
| | | type: 1,
|
| | | code:code
|
| | | }
|
| | | const res = await getHouseList(param)
|
| | | res.data.forEach(item => {
|
| | | item.title = item.name
|
| | | item.useSlot = true
|
| | |
| | | console.log('confirm', e)
|
| | | this.curSelectSite = e.value[e.value.length - 1]
|
| | | this.selectBoxShow = false
|
| | | this.getHouseDataList(e.value[1].name)
|
| | | this.getHouseDataList(e.value[1].id)
|
| | | },
|
| | | getMenu(menuName, menuList, resultArr) {
|
| | | // console.log(menuList, menuName)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | return resultArr
|
| | | |
| | | },
|
| | | |
| | | //获取首页菜单
|
| | | getMenuList() {
|
| | | console.log("当前角色菜单", this.menuList)
|
| | |
| | | let url = `/subPackage/house/list/index?id=${id}&title=${title}`
|
| | | this.$u.func.globalNavigator(url, "navTo")
|
| | | }
|
| | | },
|
| | | |
| | | // 页面跳转
|
| | | toPage({id, title, path }) {
|
| | | let url = `${path}`
|
| | | this.$u.func.globalNavigator(url, "navTo")
|
| | | if (id !== void 0) {
|
| | | |
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | | </script>
|
| | |
| | | </view>
|
| | | <view class="h0 flex-1 build-list-box">
|
| | | <u-collapse :border="false">
|
| | | <u-collapse-item style="border: none;" :title="item.unitName" :name="index"
|
| | | <u-collapse-item v-show="isShowBuild" style="border: none;" :title="item.unitName" :name="index"
|
| | | v-for="(item, index) in buildingList" :key="index">
|
| | | <view class="flex floor-content" v-for="(cItem, cIndex) in item.children"
|
| | | :key="cIndex">
|
| | |
| | | </view>
|
| | | </view>
|
| | | </u-collapse-item>
|
| | | <u-collapse-item v-show="isShowShop" style="border: none;" title="商铺" |
| | | >
|
| | | <view class="house-list-box" v-for="(item, index) in shopList" :name="index" :key="index" @click.native="pushShopPage(item)">
|
| | | <view class="l">
|
| | | <u-icon name="home" color="#fff"></u-icon>
|
| | | </view>
|
| | | <view class="r">
|
| | | {{item.floor}}
|
| | | </view>
|
| | | </view>
|
| | | </u-collapse-item>
|
| | | </u-collapse>
|
| | |
|
| | | <u-divider text="已经到底了"></u-divider>
|
| | |
| | |
|
| | | <script> |
| | | import { |
| | | getHouseInfoList |
| | | getHouseList |
| | | } from "@/api/doorplateAddress/doorplateAddress";
|
| | | export default {
|
| | | components: {},
|
| | |
|
| | | data() {
|
| | | return { |
| | | return {
|
| | | isShowBuild:false,
|
| | | isShowShop:false, |
| | | currentId: '',
|
| | | housingName: '',
|
| | | buildingName: 0,
|
| | | buildingList: []
|
| | | addressType: 1,
|
| | | // 社区编号
|
| | | neiCode: "",
|
| | | buildingList: [],
|
| | | shopList:[]
|
| | | }
|
| | | },
|
| | | onLoad(e) { |
| | | const { id, housingName, buildingName } = e |
| | | const { id, housingName, buildingName,addressType, neiCode} = e |
| | | this.currentId = id |
| | | this.housingName = housingName |
| | | this.buildingName = buildingName |
| | | this.addressType = addressType |
| | | this.neiCode = neiCode |
| | | |
| | | },
|
| | | onShow() { |
| | | this.getBuildingList() |
| | | },
|
| | | methods: {
|
| | | async getBuildingList() { |
| | | const res = await getHouseInfoList(3, this.currentId) |
| | | res.data.forEach(item => { |
| | | item.children && item.children.sort((a, b) => a.floor - b.floor) |
| | | }) |
| | | console.log(res.data) |
| | | this.buildingList = res.data || [] |
| | | async getBuildingList() {
|
| | | const param = {
|
| | | type:3,
|
| | | code:this.currentId,
|
| | | name: this.addressType==1?"":this.neiCode,
|
| | | addressType :this.addressType
|
| | | } |
| | | const res = await getHouseList(param)
|
| | | const aoiList = res.data.aoiList
|
| | | const shopList = res.data.shopList
|
| | | if(aoiList.length>0){
|
| | | this.isShowBuild = true
|
| | | // 正常展示户室数据
|
| | | aoiList.forEach(item => {
|
| | | item.children && item.children.sort((a, b) => a.floor - b.floor)
|
| | | })
|
| | | this.buildingList = aoiList || []
|
| | | }
|
| | | if(shopList.length>0){
|
| | | this.isShowShop = true
|
| | | this.shopList = shopList || []
|
| | | } |
| | | }, |
| | | pushPage(value) { |
| | | const { addressCode } = value |
| | | let url = `/subPackage/house/roomDetails/index?id=${addressCode}` |
| | | this.$u.func.globalNavigator(url, "navTo") |
| | | },
|
| | | // 跳转到商铺页面
|
| | | pushShopPage(e){
|
| | | const { addressCode } = value
|
| | | // let url = `?id=${addressCode}`
|
| | | // this.$u.func.globalNavigator(url, "navTo")
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | .house-list-box {
|
| | | margin: 16rpx;
|
| | | padding: 0 16rpx;
|
| | | display: flex;
|
| | | justify-content: space-between;
|
| | | align-items: center;
|
| | | width: calc((100% - 96rpx) / 3);
|
| | | height: 68rpx;
|
| | | border-radius: 34rpx;
|
| | | color: #fff;
|
| | | background: linear-gradient(to right, #417BE9, #6D9FFB);
|
| | | box-sizing: border-box;
|
| | | }
|
| | | }
|
| | | }
|
| | | </style> |
| | |
| | | <view class="container">
|
| | | <view class="flex f-d-c main">
|
| | | <view class="flex house-container">
|
| | | <view class="house-list-box" v-for="(item, index) in houseList" @click="pushPage(item)">
|
| | | <view class="house-list-box" v-if="isShowAoi" v-for="(item, index) in houseList" @click="pushPage(item)">
|
| | | <view class="l">
|
| | | <u-icon name="home" color="#fff"></u-icon>
|
| | | </view>
|
| | | <view class="r">
|
| | | {{item.title}}栋
|
| | | </view>
|
| | | </view>
|
| | | <!-- 商铺 -->
|
| | | <view class="house-list-box" v-if="isShowShop" v-for="(item, index) in shopList" @click="pushPage(item)">
|
| | | <view class="l">
|
| | | <u-icon name="home" color="#fff"></u-icon>
|
| | | </view>
|
| | | <view class="r">
|
| | | {{item.title}}
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
| | |
|
| | | <script>
|
| | | import {
|
| | | getHouseInfoList
|
| | | getHouseList
|
| | | } from "@/api/doorplateAddress/doorplateAddress";
|
| | | export default {
|
| | | components: {},
|
| | |
|
| | | data() {
|
| | | return {
|
| | | isShowAoi:false,
|
| | | isShowShop:false,
|
| | | currentId: '', |
| | | curHouseTitle: '',
|
| | | houseList: [{
|
| | | title: '-'
|
| | | }]
|
| | | }],
|
| | | shopList:[
|
| | | {
|
| | | title: '-'
|
| | | }
|
| | | ]
|
| | | }
|
| | | },
|
| | | onLoad(e) {
|
| | |
| | |
|
| | | methods: {
|
| | | async getHouseInfo() {
|
| | | const res = await getHouseInfoList(2, this.currentId)
|
| | | // 删除栋字
|
| | | const reg = new RegExp('栋', 'g')
|
| | | res.data.forEach(item => {
|
| | | item.title = item['name'].replace(reg, '')
|
| | | delete item.name
|
| | | })
|
| | | this.houseList = res.data || [{
|
| | | title: '-'
|
| | | }]
|
| | | const param = {
|
| | | type: 2,
|
| | | code:this.currentId
|
| | | }
|
| | | const res = await getHouseList(param)
|
| | | const aoiList = res.data.aoiList
|
| | | const shopList = res.data.shopList
|
| | | if(aoiList.length>0){
|
| | | this.isShowAoi =true
|
| | | // 删除栋字
|
| | | const reg = new RegExp('栋', 'g')
|
| | | aoiList.forEach(item => {
|
| | | item.title = item['name'].replace(reg, '')
|
| | | delete item.name
|
| | | })
|
| | | this.houseList = aoiList || [{
|
| | | title: '-'
|
| | | }]
|
| | | }
|
| | | if(shopList.length>0){
|
| | | this.isShowShop =true
|
| | | shopList.forEach(item => {
|
| | | item.title = item.name
|
| | | delete item.name
|
| | | })
|
| | | this.shopList = shopList
|
| | | }
|
| | | |
| | | },
|
| | | pushPage(value) {
|
| | | const { id, title } = value
|
| | | if (id !== void 0) {
|
| | | let url = `/subPackage/house/family/index?id=${id}&housingName=${this.curHouseTitle}&buildingName=${title}`
|
| | | this.$u.func.globalNavigator(url, "navTo")
|
| | | const { id, title,addressType } = value
|
| | | if(addressType == 1){
|
| | | if (id !== void 0) {
|
| | | let url = `/subPackage/house/family/index?id=${id}&housingName=${this.curHouseTitle}
|
| | | &buildingName=${title}&addressType=${addressType}&neiCode=${this.currentId}`
|
| | | this.$u.func.globalNavigator(url, "navTo")
|
| | | }
|
| | | }else{
|
| | | // 跳转场所页面
|
| | | }
|
| | | }
|
| | | }
|