<!--
|
* @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>
|