linwe
2024-12-26 56905bc776e6c105cd19e11199380cc701988d42
地址搜索页面
4 files modified
74 ■■■■ changed files
src/api/company/company.js 26 ●●●●● patch | view | raw | blame | history
src/views/comprehensiveSearch/components/basicTopics.vue 29 ●●●● patch | view | raw | blame | history
src/views/comprehensiveSearch/components/buildingTable.vue 1 ●●●● patch | view | raw | blame | history
src/views/comprehensiveSearch/components/enterpriseList.vue 18 ●●●● patch | view | raw | blame | history
src/api/company/company.js
@@ -24,9 +24,9 @@
        }
    })
}
// &current=1&size=12
export const getPlacePractitioner = (placeId,searchKey,current,size) => {
export const getPlacePractitioner = (placeId, searchKey, current, size) => {
    return request({
        url: '/api/blade-placePractitioner/placePractitioner/page',
        method: 'get',
@@ -37,4 +37,26 @@
            size
        }
    })
}
export const getPlaceList = (aoiId, buildId) => {
    return request({
        url: '/api/blade-place/place/getPlaceList',
        method: 'get',
        params: {
            aoiId,
            buildId,
        }
    })
}
export const getStaticPlaceAndEmpNum = (aoiId, buildId) => {
    return request({
        url: '/api/blade-place/place/staticPlaceAndEmpNum',
        method: 'get',
        params: {
            aoiId,
            buildId,
        }
    })
}
src/views/comprehensiveSearch/components/basicTopics.vue
@@ -17,9 +17,9 @@
            <div class="basicTopics-info-item">
                <img src="../../../../public/img/icon/business.png" alt="" srcset="">
                <div>
                    <span>专题信息</span>
                    <span>楼栋数</span>
                    <div class="basicTopics-info-item-num">
                        908
                        {{ staticInfo.empNum }}
                    </div>
                </div>
            </div>
@@ -27,14 +27,14 @@
            <div class="basicTopics-info-item">
                <img src="../../../../public/img/icon/business.png" alt="" srcset="">
                <div>
                    <span>专题信息</span>
                    <span>单元数</span>
                    <div class="basicTopics-info-item-num">
                        908
                        {{ staticInfo.unitNum }}
                    </div>
                </div>
            </div>
            <div class="basicTopics-info-item">
            <!-- <div class="basicTopics-info-item">
                <img src="../../../../public/img/icon/business.png" alt="" srcset="">
                <div>
                    <span>专题信息</span>
@@ -42,7 +42,7 @@
                        908
                    </div>
                </div>
            </div>
            </div> -->
        </div>
        <enterpriseList v-if="basicTopics"> </enterpriseList>
    </div>
@@ -50,6 +50,10 @@
<script>
import enterpriseList from './enterpriseList'
import {
    getStaticPlaceAndEmpNum
} from '@/api/company/company'
export default {
    //import引入的组件需要注入到对象中才能使用
@@ -59,7 +63,10 @@
    data() {
        //这里存放数据
        return {
            basicTopics: false
            basicTopics: false,
            aoiId: '111',
            buildId: '',
            staticInfo: {},
        };
    },
@@ -71,6 +78,12 @@
    methods: {
        openClick() {
            this.basicTopics = !this.basicTopics
        },
        getStatic() {
            getStaticPlaceAndEmpNum(this.aoiId, this.buildId).then(res => {
                this.staticInfo = res.data.data
            })
        }
    },
@@ -80,7 +93,7 @@
    },
    //生命周期 - 挂载完成(可以访问DOM元素)
    mounted() {
        this.getStatic()
    },
    beforeCreate() { }, //生命周期 - 创建之前
    beforeMount() { }, //生命周期 - 挂载之前
src/views/comprehensiveSearch/components/buildingTable.vue
@@ -65,6 +65,7 @@
//@import url(); 引入公共css类
.buildingTable {
    margin-top: 10px;
    overflow: hidden;
    overflow-y: auto;
}
src/views/comprehensiveSearch/components/enterpriseList.vue
@@ -18,7 +18,7 @@
                style="width: 100%">
                <el-table-column align="center" type="index" label="序号" width="50">
                </el-table-column>
                <el-table-column align="center" prop="name" label="企业名称">
                <el-table-column align="center" prop="placeName" label="企业名称">
                </el-table-column>
            </el-table>
@@ -28,7 +28,9 @@
</template>
  
<script>
import {
    getPlaceList
} from '@/api/company/company'
export default {
    //import引入的组件需要注入到对象中才能使用
    components: {},
@@ -39,7 +41,9 @@
        return {
            show: false,
            tableData: [],
            currentRow: null
            currentRow: null,
            aoiId: '111',
            buildId: ''
        }
    },
    //监听属性 类似于data概念
@@ -53,7 +57,12 @@
        },
        handleCurrentChange(val) {
            this.currentRow = val
        }
        },
        getPlace() {
            getPlaceList(this.aoiId, this.buildId).then(res => {
                this.tableData = res.data.data.records
            })
        },
    },
    //生命周期 - 创建完成(可以访问当前this实例)
    created() {
@@ -61,6 +70,7 @@
    },
    //生命周期 - 挂载完成(可以访问DOM元素)
    mounted() {
        this.getPlace()
    },
    beforeCreate() { }, //生命周期 - 创建之前
    beforeMount() { }, //生命周期 - 挂载之前