shuishen
2026-02-10 abd285e6d013128aa57c9e30e851b2aa76d60ec5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-12-20 18:04:37
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-12-21 16:59:07
 * @FilePath: \srs-police-affairs\src\views\comprehensiveSearch\components\enterpriseList.vue
 * @Description: 
 * 
 * Copyright (c) 2024 by shuishen, All Rights Reserved. 
-->
<!--  -->
<template>
    <div class='enterprise-list-box'>
 
        <div class="list">
            <!-- 企业列表 -->
            <el-table ref="singleTable" :data="tableData" highlight-current-row @current-change="handleCurrentChange"
                style="width: 100%">
                <el-table-column align="center" type="index" label="序号" width="50">
                </el-table-column>
                <el-table-column align="center" prop="placeName" label="企业名称">
                </el-table-column>
            </el-table>
 
            <!-- <el-pagination :page-size="20" :pager-count="11" layout="prev, pager, next" :total="100"> </el-pagination> -->
        </div>
    </div>
</template>
  
<script>
import {
    getPlaceList
} from '@/api/company/company'
export default {
    //import引入的组件需要注入到对象中才能使用
    components: {},
    // 父组件给子组件传过来的参数
    props: {},
    data() {
        //这里存放数据
        return {
            show: false,
            tableData: [],
            currentRow: null,
            aoiId: '111',
            buildId: ''
        }
    },
    //监听属性 类似于data概念
    computed: {},
    //监控data中的数据变化
    watch: {},
    //方法集合
    methods: {
        setCurrent(row) {
            this.$refs.singleTable.setCurrentRow(row)
        },
        handleCurrentChange(val) {
            this.currentRow = val
        },
        getPlace() {
            getPlaceList(this.aoiId, this.buildId).then(res => {
                this.tableData = res.data.data.records
            })
        },
    },
    //生命周期 - 创建完成(可以访问当前this实例)
    created() {
 
    },
    //生命周期 - 挂载完成(可以访问DOM元素)
    mounted() {
        this.getPlace()
    },
    beforeCreate() { }, //生命周期 - 创建之前
    beforeMount() { }, //生命周期 - 挂载之前
    beforeUpdate() { }, //生命周期 - 更新之前
    updated() { }, //生命周期 - 更新之后
    beforeDestroy() { }, //生命周期 - 销毁之前
    destroyed() { }, //生命周期 - 销毁完成
    activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
}
</script>
<style lang='scss' scoped>
//@import url(); 引入公共css类
 
.enterprise-list-box {
    height: 100%;
    display: flex;
    flex-direction: column;
 
    .list {
        height: 0;
        flex: 1;
    }
}
</style>