shuishen
2025-01-08 fcfca196ac3c329ad83da49377e68424acf4c716
src/views/house/components/scanCodeAlarm.vue
@@ -111,11 +111,15 @@
    residentIdSave: {
      type: String,
      default: ''
    }
    },
    residentDetailsType: {
      type: Number,
      default: 1
    },
  },
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
  data () {
    //这里存放数据
    return {
      row: {},
@@ -141,20 +145,20 @@
  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
@@ -162,14 +166,14 @@
        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
@@ -181,23 +185,23 @@
  },
  //生命周期 - 创建完成(可以访问当前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>