quanyawei
2024-11-15 a19b20afeacf84c1c743c76b5018bcfbddac2270
src/views/toCarryOutLegislativeReforms/reform/index.vue
@@ -7,6 +7,7 @@
      <searchBar
        v-if="searchType"
        :search-type="'reform'"
        :initialization-data="initializationData"
        @handleSearch="handleSearchBut"
        @handleAdd="handleOpenDialog(null, 'add')"
      />
@@ -506,7 +507,7 @@
        // 总条数,根据接口获取数据长度(注意:这里不能为空)
        totalCount: 0,
        // 个数选择器(可修改)
        pageSizes: [10, 30, 60, 100],
        pageSizes: [10, 50, 100, 200],
        // 默认每页显示的条数(可修改)
        pageSize: 10
      },
@@ -566,6 +567,9 @@
          parseInt(item.dataKey) === this.editEscalationUnitData.polluteType
      )
      return data ? data.dataValue : ''
    },
    initializationData () {
      return this.$route.query
    }
  },
  watch: {
@@ -574,10 +578,32 @@
    }
  },
  created () {
    this.handleSearch({ isInvalid: 0, state: [9, 20, 30] })
    if (Object.entries(this.$route.query).length === 0) {
      this.handleSearch({ isInvalid: 0, state: [9, 20, 30] })
    } else {
      let state = []
      let changeType = null
      let startTime = this.initializationData.startTime
      let endTime = this.initializationData.endTime
      if (this.initializationData.type === 'total') {
        state = []
      } else if (this.initializationData.type === 'unComplete') {
        state = [9, 20, 30]
      } else if (this.initializationData.type === 'complete') {
        state = [40]
      } else if (this.initializationData.type === 'overdue') {
        state = []
        changeType = 2
      }
      this.handleSearch({ isInvalid: 0, state: state, changeType: changeType, startTime: startTime, endTime: endTime })
    }
    this.getUnitList()
    this.getContaminateList()
  },
  // mounted () {
  //   console.log('this.$route.query', this.$route.query)
  //   this.initializationData = this.$route.query
  // },
  methods: {
    getaddressAndLnt (position, address) {
      if (this.mapType === 'edit') {
@@ -905,7 +931,7 @@
        // 总条数,根据接口获取数据长度(注意:这里不能为空)
        totalCount: 0,
        // 个数选择器(可修改)
        pageSizes: [10, 30, 60, 100],
        pageSizes: [10, 50, 100, 200],
        // 默认每页显示的条数(可修改)
        pageSize: pageSize
      }