| | |
| | | residentIdSave: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | residentDetailsType: { |
| | | type: Number, |
| | | default: 1 |
| | | }, |
| | | }, |
| | | //import引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | data() { |
| | | data () { |
| | | //这里存放数据 |
| | | return { |
| | | row: {}, |
| | |
| | | watch: {}, |
| | | //方法集合 |
| | | methods: { |
| | | handleSizeChange(val) { |
| | | handleSizeChange (val) { |
| | | console.log(`每页 ${val} 条`) |
| | | this.pageparm.pageSize = val |
| | | this.init() |
| | | }, |
| | | handleCurrentChange(val) { |
| | | handleCurrentChange (val) { |
| | | console.log(`当前页: ${val}`) |
| | | this.pageparm.current = val |
| | | this.init() |
| | | |
| | | }, |
| | | init() { |
| | | init () { |
| | | this.residentLoading = true |
| | | getPoliceAlarmRecordsPage(this.residentIdSave, this.pageparm.pageSize, this.pageparm.current).then((res) => { |
| | | getPoliceAlarmRecordsPage(this.residentDetailsType, this.residentIdSave, this.pageparm.pageSize, this.pageparm.current).then((res) => { |
| | | this.dataList.total = res.data.data.total |
| | | this.dataList.records = res.data.data.records |
| | | this.residentLoading = false |
| | |
| | | this.residentLoading = false |
| | | }) |
| | | }, |
| | | cellClick(row, column, cell, event) { |
| | | cellClick (row, column, cell, event) { |
| | | row.employerImg = this.getImgUrls(row.employerImg) |
| | | this.row = row |
| | | this.detailBox = !this.detailBox |
| | | console.log('cellClick', row, column, cell, event) |
| | | }, |
| | | // // 图片转换 |
| | | getImgUrls(imageUrls) { |
| | | getImgUrls (imageUrls) { |
| | | if (imageUrls && imageUrls != '' && imageUrls.length > 0) { |
| | | imageUrls = imageUrls.split(',').filter(ele => ele != '').map(ele => { |
| | | return 'http://10.141.11.11/jczzMedia/' + ele |
| | |
| | | |
| | | }, |
| | | //生命周期 - 创建完成(可以访问当前this实例) |
| | | created() { |
| | | created () { |
| | | console.log('tableFromPop mounted', this.hushiPeoTy) |
| | | |
| | | }, |
| | | //生命周期 - 挂载完成(可以访问DOM元素) |
| | | mounted() { |
| | | mounted () { |
| | | console.log('tableFromPop mounted', this.hushiPeoTy) |
| | | this.init() |
| | | |
| | | }, |
| | | beforeCreate() { }, //生命周期 - 创建之前 |
| | | beforeMount() { }, //生命周期 - 挂载之前 |
| | | beforeUpdate() { }, //生命周期 - 更新之前 |
| | | updated() { }, //生命周期 - 更新之后 |
| | | beforeDestroy() { }, //生命周期 - 销毁之前 |
| | | destroyed() { }, //生命周期 - 销毁完成 |
| | | activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发 |
| | | beforeCreate () { }, //生命周期 - 创建之前 |
| | | beforeMount () { }, //生命周期 - 挂载之前 |
| | | beforeUpdate () { }, //生命周期 - 更新之前 |
| | | updated () { }, //生命周期 - 更新之后 |
| | | beforeDestroy () { }, //生命周期 - 销毁之前 |
| | | destroyed () { }, //生命周期 - 销毁完成 |
| | | activated () { }, //如果页面有keep-alive缓存功能,这个函数会触发 |
| | | } |
| | | </script> |
| | | |