linwe
2024-12-19 e19a03fc09423b56561f3c2f4df709bc2804aad0
公安事情列表及详情
9 files modified
443 ■■■■■ changed files
src/api/dept/newIndex.js 19 ●●●●● patch | view | raw | blame | history
src/router/page/index.js 10 ●●●●● patch | view | raw | blame | history
src/views/house/components/antiFraud.vue 52 ●●●● patch | view | raw | blame | history
src/views/house/components/employees.vue 38 ●●●●● patch | view | raw | blame | history
src/views/house/components/nineSmallPlaces.vue 62 ●●●●● patch | view | raw | blame | history
src/views/house/components/noFraudAuthentication.vue 54 ●●●●● patch | view | raw | blame | history
src/views/house/components/positionTrading.vue 36 ●●●●● patch | view | raw | blame | history
src/views/house/components/rentalHouse.vue 109 ●●●● patch | view | raw | blame | history
src/views/layout/index.vue 63 ●●●● patch | view | raw | blame | history
src/api/dept/newIndex.js
@@ -190,6 +190,11 @@
        }
    })
}
/**
 *
 * @param {*} id
 * @returns
 */
export const getTaskNoFraudReportingInfo = (id) => {
    return request({
        url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/getInfo',
@@ -199,6 +204,20 @@
        }
    })
}
/**
 *
 * @param {*} id
 * @returns
 */
export const getHouseRentalDetail = (id) => {
    return request({
        url: '/api/blade-houseRental/houseRental/getDetail',
        method: 'get',
        params: {
            id
        }
    })
}
/**
 * 题目树
src/router/page/index.js
@@ -29,6 +29,9 @@
  import("../../views/practitionersManage/index.vue");
const policeAlarmRecordsManage = () =>
  import("../../views/policeAlarmRecordsManage/index.vue");
const comprehensiveSearch = () =>
  import("../../views/comprehensiveSearch/index.vue");
const available = () => import("../../views/available/index.vue");
const risk = () => import("../../views/risk/index.vue");
@@ -182,6 +185,13 @@
        component: policeAlarmRecordsManage,
      },
      {
        path: "comprehensiveSearch",
        meta: {
          title: "综合搜索",
        },
        component: comprehensiveSearch,
      },
      {
        path: "available",
        meta: {
          title: "可用资源图",
src/views/house/components/antiFraud.vue
@@ -13,14 +13,22 @@
        </div>
      </div>
      <el-table :data="dataList.records" style="width: 100%" @cell-click="cellClick" v-if="current == 1">
      <el-table :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" v-loading="residentLoading"
        element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(17, 38, 163, 1)" :empty-text="residentNoDataText" :data="dataList.records"
        style="width: 100%" @cell-click="cellClick" v-if="current == 1">
        <el-table-column align="center" prop="policeman" label="宣防人姓名"> </el-table-column>
        <el-table-column align="center" prop="policemanPhone" label="宣防人电话"> </el-table-column>
        <el-table-column align="center" prop="pcsName" label="宣防人单位"> </el-table-column>
        <el-table-column align="center" prop="pubContent" label="宣防内容"> </el-table-column>
      </el-table>
      <el-table :data="dataList.records" style="width: 100%" @cell-click="cellClick" v-if="current == 2">
      <el-table :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" v-loading="residentLoading"
        element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(17, 38, 163, 1)" :empty-text="residentNoDataText" :data="dataList.records"
        style="width: 100%" @cell-click="cellClick" v-if="current == 2">
        <el-table-column align="center" show-overflow-tooltip prop="address" label="地址"> </el-table-column>
        <el-table-column align="center" prop="recContent" label="核实内容信息"> </el-table-column>
        <el-table-column align="center" prop="createTime" label="创建时间"> </el-table-column>
@@ -228,10 +236,12 @@
  },
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data () {
  data() {
    //这里存放数据
    return {
      row: {},
      residentLoading: false,
      residentNoDataText: '暂无数据',
      current: 1,
      detailBox: false,
      dataList: {
@@ -249,29 +259,37 @@
  watch: {},
  //方法集合
  methods: {
    changeData (type) {
    changeData(type) {
      this.current = type
      this.detailBox = false
      if (type == 1) {
        this.residentLoading = true
        getTaskLabelAntiFraudPage('123456').then((res) => {
          this.dataList.total = res.data.data.total
          this.dataList.records = res.data.data.records
          this.residentLoading = false
        }).catch((err) => {
          this.residentLoading = false
        })
      } else {
        this.residentLoading = true
        getBackblastWarnHanRec('123456').then((res) => {
          this.dataList.total = res.data.data.total
          this.dataList.records = res.data.data.records
          this.residentLoading = false
        }).catch((err) => {
          this.residentLoading = false
        })
      }
    },
    cellClick (row, column, cell, event) {
    cellClick(row, column, cell, event) {
      row.pubUrls = this.getImgUrls(row.pubUrls)
      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/place/' + ele
@@ -283,24 +301,28 @@
  },
  //生命周期 - 创建完成(可以访问当前this实例)
  created () {
  created() {
    console.log('tableFromPop mounted', this.hushiPeoTy)
    this.residentLoading = true
    getTaskLabelAntiFraudPage(123456).then((res) => {
      this.dataList.total = res.data.data.total
      this.dataList.records = res.data.data.records
      this.residentLoading = false
    }).catch((err) => {
      this.residentLoading = false
    })
  },
  //生命周期 - 挂载完成(可以访问DOM元素)
  mounted () {
  mounted() {
    console.log('tableFromPop mounted', this.hushiPeoTy)
  },
  beforeCreate () { }, //生命周期 - 创建之前
  beforeMount () { }, //生命周期 - 挂载之前
  beforeUpdate () { }, //生命周期 - 更新之前
  updated () { }, //生命周期 - 更新之后
  beforeDestroy () { }, //生命周期 - 销毁之前
  destroyed () { }, //生命周期 - 销毁完成
  activated () { }, //如果页面有keep-alive缓存功能,这个函数会触发
  beforeCreate() { }, //生命周期 - 创建之前
  beforeMount() { }, //生命周期 - 挂载之前
  beforeUpdate() { }, //生命周期 - 更新之前
  updated() { }, //生命周期 - 更新之后
  beforeDestroy() { }, //生命周期 - 销毁之前
  destroyed() { }, //生命周期 - 销毁完成
  activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
}
</script>
src/views/house/components/employees.vue
@@ -2,7 +2,11 @@
<template>
  <div class="table-box-w">
    <div class="list-box">
      <el-table :data="dataList.records" style="width: 100%" @cell-click="cellClick">
      <el-table :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" v-loading="residentLoading"
        element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(17, 38, 163, 1)" :empty-text="residentNoDataText" :data="dataList.records"
        style="width: 100%" @cell-click="cellClick">
        <!-- 包含了姓名、性别、民族、身份证号码、手机号、现居住地、岗位、从业人员照片等。 -->
        <el-table-column align="center" prop="name" label="姓名"> </el-table-column>
        <el-table-column align="center" prop="gender" label="性别">
@@ -182,11 +186,13 @@
  },
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data () {
  data() {
    //这里存放数据
    return {
      row: {},
      detailBox: false,
      residentLoading: false,
      residentNoDataText: '暂无数据',
      dataList: {
        total: 1,
        records: []
@@ -202,20 +208,24 @@
  watch: {},
  //方法集合
  methods: {
    init () {
    init() {
      this.residentLoading = true
      getPlacePractitionerPage(123456).then((res) => {
        this.dataList.total = res.data.data.total
        this.dataList.records = res.data.data.records
        this.residentLoading = false
      }).catch((err) => {
        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/place/' + ele
@@ -227,23 +237,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>
src/views/house/components/nineSmallPlaces.vue
@@ -12,7 +12,11 @@
        </div>
      </div>
      <el-table :data="dataList.records" style="width: 100%" @cell-click="cellClick" v-if="current == 1">
      <el-table :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" v-loading="residentLoading"
        element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(17, 38, 163, 1)" :empty-text="residentNoDataText" :data="dataList.records"
        style="width: 100%" @cell-click="cellClick" v-if="current == 1">
        <el-table-column align="center" prop="placeName" label="场所名称"> </el-table-column>
        <el-table-column align="center" prop="principal" label="场所负责人"> </el-table-column>
        <el-table-column align="center" prop="principalPhone" label="场所负责人电话"> </el-table-column>
@@ -25,7 +29,11 @@
        </el-table-column>
      </el-table>
      <el-table :data="dataList.records" style="width: 100%" @cell-click="cellClick" v-if="current == 2">
      <el-table :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" v-loading="residentLoading"
        element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(17, 38, 163, 1)" :empty-text="residentNoDataText" :data="dataList.records"
        style="width: 100%" @cell-click="cellClick" v-if="current == 2">
        <el-table-column align="center" prop="placeName" label="场所名称"> </el-table-column>
        <el-table-column align="center" prop="principal" label="场所负责人"> </el-table-column>
        <el-table-column align="center" prop="principalPhone" label="场所负责人电话"> </el-table-column>
@@ -367,12 +375,14 @@
  },
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data () {
  data() {
    //这里存放数据
    return {
      row: {},
      current: 1,
      detailBox: false,
      residentLoading: false,
      residentNoDataText: '暂无数据',
      dataList: {
        total: 1,
        records: []
@@ -394,7 +404,7 @@
  //方法集合
  methods: {
    // 写一个方法,把阿拉伯数字转换中文的大写
    getUpperCase (num) {
    getUpperCase(num) {
      const chineseNumbers = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']
      const units = ['', '十', '百', '千', '万']
      let str = ''
@@ -406,35 +416,47 @@
      console.log(numResult)
      return numResult
    },
    handleSizeChange (val) {
    handleSizeChange(val)  {
      console.log(`每页 ${val} 条`)
      this.pageparm.pageSize = val
      this.changeData(this.current)
    },
    handleCurrentChange (val) {
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
      this.pageparm.current = val
      this.changeData(this.current)
    },
    changeData (type) {
    changeData(type) {
      this.current = type
      this.detailBox = false
      if (type == 1) {
        this.residentLoading = true
        getPlaceCheckPage(123456, 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
        }).catch((err) => {
          this.residentLoading = false
        })
      } else {
        this.residentLoading = true
        getTaskPlaceSelfCheckPage(1, 123456, 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
        }).catch((err) => {
          this.residentLoading = false
        })
      }
    },
    init () {
    init() {
      this.residentLoading = true
      getPlaceCheckPage(123456, 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
      }).catch((err) => {
        this.residentLoading = false
      })
      getPatrolGroupTree(1, 1).then((res) => {
@@ -447,7 +469,7 @@
        })
      })
    },
    cellClick (row, column, cell, event) {
    cellClick(row, column, cell, event) {
      row.employerImg = this.getImgUrls(row.employerImg)
      this.row = row
      this.detailBox = !this.detailBox
@@ -478,7 +500,7 @@
    },
    getRectificationImageUrls () {
    getRectificationImageUrls() {
      return (item) => {
        let imageUrls = item.rectificationImageUrls
@@ -492,7 +514,7 @@
      }
    },
    // // 图片转换
    getImgUrls (imageUrls) {
    getImgUrls(imageUrls) {
      if (imageUrls && imageUrls != '' && imageUrls.length > 0) {
        imageUrls = imageUrls.split(',').filter(ele => ele != '').map(ele => {
          // return 'http://10.141.11.11/place/' + ele
@@ -504,23 +526,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>
src/views/house/components/noFraudAuthentication.vue
@@ -2,7 +2,11 @@
<template>
  <div class="table-box-w">
    <div class="list-box">
      <el-table :data="dataList.records" style="width: 100%" @cell-click="cellClick">
      <el-table :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" v-loading="residentLoading"
        element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(17, 38, 163, 1)" :empty-text="residentNoDataText" :data="dataList.records"
        style="width: 100%" @cell-click="cellClick">
        <el-table-column align="center" prop="placeName" label="场所名称"> </el-table-column>
        <el-table-column align="center" prop="principal" label="场所负责人"> </el-table-column>
@@ -158,15 +162,16 @@
  },
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data () {
  data() {
    //这里存放数据
    return {
      row: {},
      detailBox: false,
      residentLoading: false,
      residentNoDataText: '暂无数据',
      dataList: {
        total: 1,
        records: []
      },
      // 无诈分类
      noFraudTypeList: [
@@ -194,7 +199,7 @@
  //方法集合
  methods: {
    // 获取无诈数据
    getNoFraudType (val) {
    getNoFraudType(val) {
      let type = ''
      this.noFraudTypeList.forEach(item => {
        if (item.value == val) {
@@ -204,31 +209,35 @@
      return type
    },
    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
      getTaskNoFraudReporting(123456, 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
      }).catch((err) => {
        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/place/' + ele
@@ -240,23 +249,24 @@
  },
  //生命周期 - 创建完成(可以访问当前this实例)
  created () {
    console.log('tableFromPop mounted', this.hushiPeoTy)
  },
  //生命周期 - 挂载完成(可以访问DOM元素)
  mounted () {
  created() {
    console.log('tableFromPop mounted', this.hushiPeoTy)
    this.init()
  },
  beforeCreate () { }, //生命周期 - 创建之前
  beforeMount () { }, //生命周期 - 挂载之前
  beforeUpdate () { }, //生命周期 - 更新之前
  updated () { }, //生命周期 - 更新之后
  beforeDestroy () { }, //生命周期 - 销毁之前
  destroyed () { }, //生命周期 - 销毁完成
  activated () { }, //如果页面有keep-alive缓存功能,这个函数会触发
  //生命周期 - 挂载完成(可以访问DOM元素)
  mounted() {
    console.log('tableFromPop mounted', this.hushiPeoTy)
    this.init()
  },
  beforeCreate() { }, //生命周期 - 创建之前
  beforeMount() { }, //生命周期 - 挂载之前
  beforeUpdate() { }, //生命周期 - 更新之前
  updated() { }, //生命周期 - 更新之后
  beforeDestroy() { }, //生命周期 - 销毁之前
  destroyed() { }, //生命周期 - 销毁完成
  activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
}
</script>
src/views/house/components/positionTrading.vue
@@ -2,7 +2,11 @@
<template>
  <div class="table-box-w">
    <div class="list-box">
      <el-table :data="dataList.records" style="width: 100%" @cell-click="cellClick">
      <el-table :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" v-loading="residentLoading"
        element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(17, 38, 163, 1)" :empty-text="residentNoDataText" :data="dataList.records"
        style="width: 100%" @cell-click="cellClick">
        <!-- 包含了场所名称、阵地类型、交易人员姓名、手机号、身份证号码、物品名称、交易数量、交易金额、校验过程、交易物品图片等 -->
        <el-table-column align="center" prop="labelName" label="阵地类型"> </el-table-column>
        <el-table-column align="center" prop="placeName" label="场所名称"> </el-table-column>
@@ -176,10 +180,12 @@
  },
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data () {
  data() {
    //这里存放数据
    return {
      row: {},
      residentLoading: false,
      residentNoDataText: '暂无数据',
      detailBox: false,
      dataList: {
        total: 1,
@@ -196,7 +202,7 @@
  watch: {},
  //方法集合
  methods: {
    cellClick (row, column, cell, event) {
    cellClick(row, column, cell, event) {
      row.imageUrls = this.getImgUrls(row.imageUrls)
      row.goodsImageUrls = this.getImgUrls(row.goodsImageUrls)
      this.row = row
@@ -204,7 +210,7 @@
      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/place/' + ele
@@ -216,25 +222,29 @@
  },
  //生命周期 - 创建完成(可以访问当前this实例)
  created () {
  created() {
    console.log('tableFromPop mounted', this.hushiPeoTy)
    // this.residentIdSave
    this.residentLoading = true
    getTaskLabelReportingEventPage(123456).then((res) => {
      this.dataList.total = res.data.data.total
      this.dataList.records = res.data.data.records
      this.residentLoading = false
    }).catch((err) => {
      this.residentLoading = false
    })
  },
  //生命周期 - 挂载完成(可以访问DOM元素)
  mounted () {
  mounted() {
    console.log('tableFromPop mounted', this.hushiPeoTy)
  },
  beforeCreate () { }, //生命周期 - 创建之前
  beforeMount () { }, //生命周期 - 挂载之前
  beforeUpdate () { }, //生命周期 - 更新之前
  updated () { }, //生命周期 - 更新之后
  beforeDestroy () { }, //生命周期 - 销毁之前
  destroyed () { }, //生命周期 - 销毁完成
  activated () { }, //如果页面有keep-alive缓存功能,这个函数会触发
  beforeCreate() { }, //生命周期 - 创建之前
  beforeMount() { }, //生命周期 - 挂载之前
  beforeUpdate() { }, //生命周期 - 更新之前
  updated() { }, //生命周期 - 更新之后
  beforeDestroy() { }, //生命周期 - 销毁之前
  destroyed() { }, //生命周期 - 销毁完成
  activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
}
</script>
src/views/house/components/rentalHouse.vue
@@ -16,7 +16,12 @@
                </div>
            </div> -->
      <el-table :data="dataList.records" style="width: 100%" @cell-click="cellClick" v-if="current == 1">
      <el-table :data="dataList.records"
        :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" v-loading="residentLoading"
        element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(17, 38, 163, 1)" :empty-text="residentNoDataText" style="width: 100%"
        @cell-click="cellClick" v-if="current == 1">
        <el-table-column align="center" prop="tenantName" label="租户名称"> </el-table-column>
        <el-table-column align="center" prop="phone" label="租户电话"> </el-table-column>
        <el-table-column align="center" prop="rentalTime" label="租房时间"> </el-table-column>
@@ -96,6 +101,15 @@
              </el-col>
              <el-col :span="18">
                <div class="detail-row">{{ row.phone }}</div>
              </el-col>
            </el-row>
            <el-row class="">
              <el-col :span="6">
                <div class="detail-row">与业主关系</div>
              </el-col>
              <el-col :span="18">
                <div class="detail-row">{{ replaceOwnerRelation(reportingInfo.relationship) }}</div>
              </el-col>
            </el-row>
@@ -301,7 +315,8 @@
import {
  getHouseRentalPage,
  geTaskResidencePermitApplyPage,
  getTenantPage
  getTenantPage,
  getHouseRentalDetail
} from "@/api/dept/newIndex.js"
export default {
  name: 'tableFromPop',
@@ -314,21 +329,48 @@
  },
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data () {
  data() {
    //这里存放数据
    return {
      row: {},
      current: 1,
      detailBox: false,
      residentLoading: false,
      residentNoDataText: '暂无数据',
      dataList: {
        total: 1,
        records: []
      },
      reportingInfo: {},
      pageparm: {
        pageSize: 10,
        current: 1
      }
      },
      // 业主关系字典
      ownerRelation: [
        { label: '业主', value: 1 },
        { label: '妻子', value: 2 },
        { label: '丈夫', value: 3 },
        { label: '女儿', value: 4 },
        { label: '儿子', value: 5 },
        { label: '母亲', value: 6 },
        { label: '父亲', value: 7 },
        { label: '奶奶', value: 8 },
        { label: '爷爷', value: 9 },
        { label: '女婿', value: 10 },
        { label: '孙子', value: 11 },
        { label: '孙女', value: 12 },
        { label: '外公', value: 13 },
        { label: '外婆', value: 14 },
        { label: '外孙女', value: 15 },
        { label: '外孙', value: 16 },
        { label: '儿媳', value: 17 },
        { label: '租户', value: 18 },
        { label: '其他', value: 19 },
      ]
    }
  },
@@ -339,18 +381,27 @@
  watch: {},
  //方法集合
  methods: {
    handleSizeChange (val) {
    // 替换业主关系
    replaceOwnerRelation(val) {
      for (let i = 0; i < this.ownerRelation.length; i++) {
        if (this.ownerRelation[i].value == val) {
          return this.ownerRelation[i].label
        }
      }
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`)
      this.pageparm.pageSize = val
      this.changeData(this.current)
    },
    handleCurrentChange (val) {
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
      this.pageparm.current = val
      this.changeData(this.current)
    },
    changeData (type) {
    changeData(type) {
      this.current = type
      this.detailBox = false
      if (type == 1) {
@@ -371,20 +422,34 @@
      }
    },
    init () {
    init() {
      this.residentLoading = true
      getHouseRentalPage('a1', 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
      }).catch((err) => {
        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)
      if (this.row.id != row.id) {
        this.row = row
        this.detailBox = true
      } else {
        this.detailBox = !this.detailBox
      }
      // 查询详情 row.id
      getHouseRentalDetail(row.id).then((res) => {
        console.log('详情', res.data.data)
        if (res.data.data && res.data.data.householdList.length > 0) {
          this.reportingInfo = res.data.data.householdList[0]
        }
      })
    },
    // // 图片转换
    getImgUrls (imageUrls) {
    getImgUrls(imageUrls) {
      if (imageUrls && imageUrls != '' && imageUrls.length > 0) {
        imageUrls = imageUrls.split(',').filter(ele => ele != '').map(ele => {
          // return 'http://10.141.11.11/place/' + ele
@@ -396,23 +461,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>
src/views/layout/index.vue
@@ -17,11 +17,10 @@
                    <span :class="{ on: showChange(item) }">{{ item.menuName }}</span>
                    <div class="sub-nav-list" v-show="item.children && item.childrenFlag">
                        <div v-for="(subItem, subIndex) in item.children" :key="subIndex"
                            @click.stop="goToPath(subItem)">
                        <div v-for="(subItem, subIndex) in item.children" :key="subIndex" @click.stop="goToPath(subItem)">
                            {{
                        subItem.menuName
                    }}
                                subItem.menuName
                            }}
                        </div>
                    </div>
                </div>
@@ -37,16 +36,15 @@
                    @click="goToPath(item)" v-for="(item, index) in menuRightList" :key="index">
                    <span :class="{ on: showChange(item) }">
                        {{
                        item.menuName }}
                            item.menuName }}
                    </span>
                    <div class="sub-nav-list" v-show="item.children && item.childrenFlag">
                        <div :class="{ on: currentUrl.indexOf(subItem.path) != -1 }"
                            v-for="(subItem, subIndex) in item.children" :key="subIndex"
                            @click.stop="goToPath(subItem, 4)">
                            v-for="(subItem, subIndex) in item.children" :key="subIndex" @click.stop="goToPath(subItem, 4)">
                            {{
                        subItem.menuName
                    }}
                                subItem.menuName
                            }}
                        </div>
                    </div>
                </div>
@@ -116,9 +114,8 @@
                    :icon="show ? 'el-icon-arrow-left' : 'el-icon-arrow-right'" id="FlexibleBtn" type="primary"
                    @click="flexibelClick"></el-button>
                <div slot="resetPopup">
                    <el-dialog title="修改密码" :visible.sync="resetPsdPopupShow" :modal="true"
                        :before-close="resetBeforeClose" :modal-append-to-body="false" :close-on-click-modal="false"
                        class="reset-popup-box">
                    <el-dialog title="修改密码" :visible.sync="resetPsdPopupShow" :modal="true" :before-close="resetBeforeClose"
                        :modal-append-to-body="false" :close-on-click-modal="false" class="reset-popup-box">
                        <div class="reset-popup-body">
                            <el-form ref="form" :rules="rules" :model="form" label-width="80px">
                                <el-form-item label="原密码" prop="oldPassword">
@@ -165,13 +162,13 @@
import { mapGetters } from "vuex"
export default {
    provide () {
    provide() {
        return {
            userInfo: JSON.parse(getUserInfo()),
        }
    },
    data () {
    data() {
        return {
            form: {},
            rules: {
@@ -271,6 +268,10 @@
                            menuName: '扫码报警',
                            path: '/layout/policeAlarmRecordsManage'
                        },
                        {
                            menuName: '综合搜索',
                            path: '/layout/comprehensiveSearch'
                        },
                    ]
                },
                {
@@ -303,7 +304,7 @@
    computed: {
        ...mapGetters(['permission']),
        showChange () {
        showChange() {
            return (item) => {
                if ('children' in item && item.children.length) {
                    return item.children.some(i => this.currentUrl == i.path)
@@ -314,7 +315,7 @@
        }
    },
    created () {
    created() {
        this.currentUrl = this.$route.path
        this.init()
@@ -324,7 +325,7 @@
    watch: {
        $route: {
            handler (newPath, oldPath) {
            handler(newPath, oldPath) {
                this.currentUrl = newPath.path
                this.$nextTick(() => {
@@ -348,17 +349,17 @@
        }
    },
    mounted () {
    mounted() {
    },
    methods: {
        // 重置密码
        resetPsd () {
        resetPsd() {
            this.resetPsdPopupShow = true
        },
        // 提交修改
        submitForm () {
        submitForm() {
            this.$refs.form.validate((valid) => {
                if (valid) {
                    updatePassword(md5(this.form.oldPassword), md5(this.form.newPassword), md5(this.form.newPassword1)).then(res => {
@@ -384,28 +385,28 @@
        },
        // 取消提交
        cancelSF () {
        cancelSF() {
            this.resetBeforeClose()
        },
        // 弹窗关闭事件
        resetBeforeClose () {
        resetBeforeClose() {
            this.$refs.form.resetFields()
            this.resetPsdPopupShow = false
        },
        init () {
        init() {
            this.user = this.$store.state.user.userInfo
        },
        //登出
        goTOLogout () {
        goTOLogout() {
            this.$store.dispatch("LogOut").then(() => {
                this.$router.push({ path: "/login" })
            })
        },
        // 跳转页面
        goToPage (pagePath) {
        goToPage(pagePath) {
            this.$router.push(pagePath)
        },
@@ -413,7 +414,7 @@
         * @description: 跳转运维管理平台
         * @return {*}
         */
        goToBack () {
        goToBack() {
            var path = HTUrl + "?token=" + getToken()
            window.open(path)
        },
@@ -423,7 +424,7 @@
         * @param {*} e 子元素上绑定的的自定义属性
         * @return {*} 没有返回值
         */
        goToPath (params, key = 0) {
        goToPath(params, key = 0) {
            console.log(params, key, 465)
            if (params.path) {
@@ -434,7 +435,7 @@
            }
        },
        flexibelClick () {
        flexibelClick() {
            this.show = !this.show
            if (this.$refs['target-name'].boxResize) this.$refs['target-name'].boxResize(this.show)
@@ -456,7 +457,7 @@
            }
        },
        resize (val, flag = false) {
        resize(val, flag = false) {
            this.boxWidth = val
            this.show = flag
@@ -482,13 +483,13 @@
            })
        },
        openUser () {
        openUser() {
            this.userOn = !this.userOn
            this.isShowUserDetail = !this.isShowUserDetail
        },
        // 定时检测token
        refreshToken () {
        refreshToken() {
            this.refreshTime = setInterval(() => {
                const token = getStore({
                    name: "store-token",