quanyawei
2023-11-21 ed82f84917285bb6baf5622326563371262578de
Merge branch 'feature_1.0'
5 files modified
145 ■■■■ changed files
package-lock.json 13 ●●●●● patch | view | raw | blame | history
package.json 1 ●●●● patch | view | raw | blame | history
src/views/toCarryOutLegislativeReforms/reform/index.vue 3 ●●●● patch | view | raw | blame | history
src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue 31 ●●●●● patch | view | raw | blame | history
src/views/toCarryOutLegislativeReforms/summaryPage/index.vue 97 ●●●●● patch | view | raw | blame | history
package-lock.json
@@ -5106,6 +5106,11 @@
        }
      }
    },
    "comutils": {
      "version": "1.1.19",
      "resolved": "https://registry.npmmirror.com/comutils/-/comutils-1.1.19.tgz",
      "integrity": "sha512-JxXB67juILiwhdLwOsYyjUqwWEhHdObI0EClOPk+JDtEuTbac59s0pxGpfCBnNNQ5JommifmcMGneW/4Cg7YWw=="
    },
    "concat-map": {
      "version": "0.0.1",
      "resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz",
@@ -20265,6 +20270,14 @@
      "resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.0.6.tgz?cache=0&sync_timestamp=1615477493682&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.0.6.tgz",
      "integrity": "sha1-Lk8PnLsLltAgWrJpDP5YiTUTasM="
    },
    "vue-seamless-scroll": {
      "version": "1.1.23",
      "resolved": "https://registry.npmmirror.com/vue-seamless-scroll/-/vue-seamless-scroll-1.1.23.tgz",
      "integrity": "sha512-HBjUub8WwsKJzbFCrwKPDrZn4e+SSbkKgwWtjKtfLwesiFGwSsVxP44/Z6d3kpXy94qIFOiflJH6l0/9pj7SGA==",
      "requires": {
        "comutils": "^1.1.9"
      }
    },
    "vue-style-loader": {
      "version": "4.1.3",
      "resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.3.tgz",
package.json
@@ -55,6 +55,7 @@
    "vue-json-excel": "^0.3.0",
    "vue-mapvgl": "^0.0.32",
    "vue-router": "3.0.6",
    "vue-seamless-scroll": "^1.1.23",
    "vuex": "3.1.0",
    "xlsx": "^0.16.9",
    "xlsx-style": "^0.8.13"
src/views/toCarryOutLegislativeReforms/reform/index.vue
@@ -548,6 +548,7 @@
      })
    },
    handleSearchBut(obj) {
      let pageSize = this.pagination.pageSize
      this.pagination = {
        currentPage: 1,
        // 总条数,根据接口获取数据长度(注意:这里不能为空)
@@ -555,7 +556,7 @@
        // 个数选择器(可修改)
        pageSizes: [10, 30, 60, 100],
        // 默认每页显示的条数(可修改)
        pageSize: 10
        pageSize: pageSize
      }
      this.handleSearch(obj)
    },
src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue
@@ -36,7 +36,7 @@
    }
  },
  watch: {
    'cylindricalityData': {
    cylindricalityData: {
      handler(newVal) {
        console.log('newVal', newVal)
        this.seriesData = []
@@ -44,15 +44,18 @@
        const arr = []
        newVal.forEach(item => {
          arr.push({
            name: item.name,
            type: 'bar',
            barWidth: '40%',
            data: [item.value]
          })
          arr.push(item.value)
          this.namelist.push(item.name)
        })
        this.seriesData = arr
        this.seriesData = [
          {
            type: 'bar',
            barWidth: '40%',
            data: arr
          }
        ]
        console.log('this.seriesData', this.seriesData)
        console.log('this.namelist', this.namelist)
        this.$nextTick(() => {
          this.initChart()
        })
@@ -110,7 +113,8 @@
            bottom: '3%',
            containLabel: true
          },
          xAxis: [{
          xAxis: [
            {
            type: 'category',
            data: this.namelist,
            axisTick: {
@@ -123,8 +127,10 @@
            axisLabel: {
              color: '#989898'
            }
          }],
          yAxis: [{
            }
          ],
          yAxis: [
            {
            type: 'value',
            axisTick: {
              show: false
@@ -140,7 +146,8 @@
            axisLabel: {
              color: '#8c8c8c'
            }
          }],
            }
          ],
          series: this.seriesData
        },
        true
src/views/toCarryOutLegislativeReforms/summaryPage/index.vue
@@ -1,14 +1,14 @@
<template>
  <div class="main">
    <div class="timeSelect">
      <el-radio-group v-model="searchForm.number" style="margin-left:20px" @input="changeNumber">
      <el-radio-group v-model="searchForm.number" style="margin-left:20px" @input="changeNumber('timeMouted')">
        <el-radio-button label="1">近1个月</el-radio-button>
        <el-radio-button label="2">近2个月</el-radio-button>
        <el-radio-button label="3">近3个月</el-radio-button>
        <el-radio-button label="6">近6个月</el-radio-button>
        <el-radio-button label="12">近12个月</el-radio-button>
      </el-radio-group>
      <el-date-picker v-model="timeInterval" el-time-picker type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeNumber" />
      <el-date-picker v-model="timeInterval" el-time-picker type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeNumber('timeValue')" />
    </div>
    <div class="agentSummary">
      <div class="circle">
@@ -40,10 +40,36 @@
                导出
              </el-button>
            </div>
            <div class="tab">
              <el-table :data="tableData" border max-height="400" style="width: 100%" :header-cell-style="{
            <div class="min">
              <div class="tab" style="display: inline-block; width: 100%">
                <el-table :data="tableData" class="top" border style="width: 100%" :header-cell-style="{
                  background: '#99D4FF', color: '#101111', fontSize: '16px'
                }">
                  <el-table-column align="center" type="index" width="60" label="序号" />
                  <el-table-column align="center" prop="unitName" label="责任单位" />
                  <el-table-column align="center" prop="total" label="总工单" />
                  <el-table-column align="center" prop="number" label="完成数" />
                  <el-table-column align="center" prop="unNumber" label="未成数" />
                  <el-table-column align="center" prop="rate" label="完成率" />
                  <el-table-column align="center" prop="deduction" label="扣分" />
                  <el-table-column align="center" prop="marks" label="加分" />
                  <el-table-column align="center" prop="totalPoints" label="总得分" />
                </el-table>
                <vueSeamless :data="tableData" v-if="tableData.length>5" ref="scroll3" :pause="true" class="seamless-warp" style="width: 100%;" :class-option="classOption">
                  <el-table :data="tableData" v-if="tableData.length>0" class="bottom" border style="width: 100%;margin-bottom:50px">
                    <el-table-column align="center" type="index" width="60" />
                    <el-table-column align="center" prop="unitName" label="责任单位" />
                    <el-table-column align="center" prop="total" label="总工单" />
                    <el-table-column align="center" prop="number" label="完成数" />
                    <el-table-column align="center" prop="unNumber" label="未成数" />
                    <el-table-column align="center" prop="rate" label="完成率" />
                    <el-table-column align="center" prop="deduction" label="扣分" />
                    <el-table-column align="center" prop="marks" label="加分" />
                    <el-table-column align="center" prop="totalPoints" label="总得分" />
                  </el-table>
                </vueSeamless>
                <el-table :data="tableData" v-else class="bottom" border style="width: 100%;margin-bottom:50px">
                  <el-table-column align="center" type="index" width="60" />
                <el-table-column align="center" prop="unitName" label="责任单位" />
                <el-table-column align="center" prop="total" label="总工单" />
                <el-table-column align="center" prop="number" label="完成数" />
@@ -54,6 +80,8 @@
                <el-table-column align="center" prop="totalPoints" label="总得分" />
              </el-table>
            </div>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="明细" name="second">
@@ -86,10 +114,12 @@
</template>
<script>
import vueSeamless from 'vue-seamless-scroll'
import pollutionClassificationEcharts from '@/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts'
import reportTypeEcharts from '@/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts'
export default {
  components: {
    vueSeamless,
    pollutionClassificationEcharts,
    reportTypeEcharts
  },
@@ -115,7 +145,15 @@
        overdue: ''
      },
      chartData: [],
      cylindricalityData: []
      cylindricalityData: [],
      tableDataTotal: 0
    }
  },
  computed: {
    classOption() {
      let data = this.loadMore()
      console.log('return ', data)
      return data
    }
  },
  created() {
@@ -124,6 +162,32 @@
    this.handleSearch()
  },
  methods: {
    loadMore() {
      let data = {}
      if (this.tableDataTotal > 5) {
        data = {
          step: 0.8, // 数值越大速度滚动越快
          limitMoveNum: this.tableData.length, // 开始无缝滚动的数据量 this.tableData
          hoverStop: true, // 是否开启鼠标悬停stop
          autoPlay: true,
          direction: 1, // 0向下 1向上 2向左 3向右
          openWatch: true, // 开启数据实时监控刷新dom
          singleHeight: 30, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
          singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
          waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
        }
      } else {
        this.$refs.scroll3 && this.$refs.scroll3._cancle()
        data = {
          step: 0, // 数值越大速度滚动越快
          limitMoveNum: this.tableData.length,
          openWatch: true
        }
      }
      console.log('data', data)
      return data
    },
    ecxport() {
      this.$request({
        url: '/allocation/unitExel',
@@ -164,6 +228,11 @@
      return data ? data.unitName : ''
    },
    changeNumber(val) {
      if (val === 'timeValue') {
        this.searchForm.number = null
      } else {
        this.timeInterval = []
      }
      this.handleSearch()
    },
    handleClick(tab, event) {
@@ -202,7 +271,8 @@
      }).then(res => {
        if (res.code === 0) {
          this.responeForm = res.data
          this.tableData = res.data.unitView
          this.tableData = res.data.unitView || []
          this.tableDataTotal = this.tableData.length
          this.chartData = res.data.polluteType
          this.cylindricalityData = res.data.escalationType
        } else {
@@ -336,5 +406,20 @@
      }
    }
  }
  .seamless-warp {
    height: 380px;
    overflow: hidden;
  }
  .min {
    display: flex;
    width: 100%;
  }
  .top /deep/.el-table__body-wrapper {
    display: none;
  }
  .bottom /deep/.el-table__header-wrapper {
    display: none;
    width: 100%;
  }
}
</style>