|
|
|
@ -1,16 +1,14 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="enterprise-list">
|
|
|
|
|
<div class="title-gr">
|
|
|
|
|
<div class="icon-circle">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="build-name">金星富民置业工业园 1栋</div>
|
|
|
|
|
<div class="icon-circle"> </div>
|
|
|
|
|
<div class="build-name">{{ parkName }} {{ buildingName }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="serch-input">
|
|
|
|
|
<div class="input-box">
|
|
|
|
|
<input type="text" v-model="querParams.name" placeholder="请输入搜索关键词" />
|
|
|
|
|
<div class="input-close" v-show="querParams.name">
|
|
|
|
|
<van-icon name="clear" @click="querParams.name = undefined" />
|
|
|
|
|
<input type="text" v-model="querParams.enterpriseName" placeholder="请输入搜索关键词" />
|
|
|
|
|
<div class="input-close" v-show="querParams.enterpriseName">
|
|
|
|
|
<van-icon name="clear" @click="querParams.enterpriseName = undefined" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="serch-btn" @click="onSearch"></div>
|
|
|
|
@ -18,7 +16,7 @@
|
|
|
|
|
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
|
|
|
|
<div class="list-box">
|
|
|
|
|
<div class="list-item" v-for="item in enterpriseList" :key="item.id" @click="onInfoClcik(item)">
|
|
|
|
|
<div class="item-name">{{ item.name }}</div>
|
|
|
|
|
<div class="item-name">{{ item.enterpriseName }}</div>
|
|
|
|
|
<div class="item-icon"><van-icon name="arrow" color="#CCCCCC" /></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -28,6 +26,8 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import xApi from '@/api/xApi'
|
|
|
|
|
import { listEnterpriseBuildPark } from '@/api/mudu/park.js'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
parkProfileId: {
|
|
|
|
@ -38,20 +38,21 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
total: 0,
|
|
|
|
|
querParams: {
|
|
|
|
|
ParkID: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
name: undefined,
|
|
|
|
|
buildingId: null,
|
|
|
|
|
parkId: null,
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
enterpriseName: null
|
|
|
|
|
},
|
|
|
|
|
enterpriseList: [],
|
|
|
|
|
loading: false,
|
|
|
|
|
finished: false,
|
|
|
|
|
parkName:null,
|
|
|
|
|
buildingName:null,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.querParams.ParkID = this.parkProfileId
|
|
|
|
|
|
|
|
|
|
console.log(this.querParams)
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onLoad() {
|
|
|
|
@ -60,31 +61,36 @@ export default {
|
|
|
|
|
}, 500)
|
|
|
|
|
},
|
|
|
|
|
getList() {
|
|
|
|
|
xApi.allenterpriselist(this.querParams).then((res) => {
|
|
|
|
|
this.enterpriseList.push(...res.data)
|
|
|
|
|
this.total = res.count
|
|
|
|
|
this.querParams.buildingId = this.$route.query.buildingId
|
|
|
|
|
this.querParams.parkId = this.$route.query.parkId
|
|
|
|
|
|
|
|
|
|
listEnterpriseBuildPark(this.querParams).then((res) => {
|
|
|
|
|
this.enterpriseList = this.enterpriseList.concat(res.rows)
|
|
|
|
|
this.parkName = this.enterpriseList[0].parkName
|
|
|
|
|
this.buildingName = this.enterpriseList[0].buildingName
|
|
|
|
|
this.total = res.total
|
|
|
|
|
this.loading = false
|
|
|
|
|
// 数据全部加载完成
|
|
|
|
|
if (this.enterpriseList.length >= this.total) {
|
|
|
|
|
this.finished = true
|
|
|
|
|
} else {
|
|
|
|
|
this.querParams.pageNum++
|
|
|
|
|
}
|
|
|
|
|
this.querParams.page++
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onSearch() {
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.finished = false
|
|
|
|
|
this.querParams.page = 1
|
|
|
|
|
this.querParams.limit = 10
|
|
|
|
|
this.querParams.pageNum = 1
|
|
|
|
|
this.querParams.pageSize = 10
|
|
|
|
|
this.total = 0
|
|
|
|
|
this.enterpriseList = []
|
|
|
|
|
this.getList()
|
|
|
|
|
// this.getList()
|
|
|
|
|
},
|
|
|
|
|
onInfoClcik(item) {
|
|
|
|
|
this.$router.replace({
|
|
|
|
|
path: '/enterpriseData',
|
|
|
|
|
path: '/enterpriseData2/info',
|
|
|
|
|
query: {
|
|
|
|
|
id: item.id,
|
|
|
|
|
id: item.enterpriseId,
|
|
|
|
|
isShow: true,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
@ -104,7 +110,7 @@ export default {
|
|
|
|
|
height: 0.35rem;
|
|
|
|
|
background-image: url("../../../../assets/image/vxEwm/big-circle2.png");
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
margin-top: 0.1rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|