linwe
2024-06-12 91fbddb0c07bcab4f88f247a3367e9efb0154c2d
src/views/cGovernance/statisticalAnalysis/index.vue
@@ -7,10 +7,16 @@
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="success" size="small" plain icon="el-icon-upload2" @click="handleImport">调度单位
        <!-- <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleOrg('Y')">主办单位
        </el-button>
        <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">主办单位
        </el-button>
        <el-button type="success" size="small" plain icon="el-icon-upload2" @click="handleOrg('N')">调度单位
        </el-button> -->
        <el-radio-group size="mini" @change="handleOrg" v-model="radio1">
          <el-radio-button label="主办单位"></el-radio-button>
          <el-radio-button label="调度单位"></el-radio-button>
        </el-radio-group>
      </template>
    </avue-crud>
@@ -30,7 +36,9 @@
    remove,
    update,
    add,
    getDetail
    getDetail,
    getCount,
    synchronizeData
  } from "@/api/task/eCallEventTwo"
  import {
    add as circleAdd,
@@ -47,10 +55,14 @@
  export default {
    data() {
      return {
        radio1: '主办单位',
        editPopup: false,
        form: {},
        editForm: {},
        query: {},
        query: {
          tagMain: 'Y',
          mainFlag: 1
        },
        loading: true,
        page: {
          pageSize: 10,
@@ -63,14 +75,16 @@
        circleRadio: 0,
        shareCircleRow: {},
        option: {
          // labelWidth: 130,
          labelWidth: 130,
          menu: false,
          // searchLabelWidth: 96,
          // searchShow: true,
          // searchMenuSpan: 3,
          // menuWidth: 310,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 310,
          delBtn: false,
          editBtn: false,
          addBtn: false,
          height: "auto",
          calcHeight: 54,
          dialogWidth: 950,
@@ -83,110 +97,112 @@
          // excelBtn: true,
          dialogClickModal: false,
          column: [{
              label: "单位",
              prop: "orderCode",
              span: 12,
              hide: true,
            },
              label: "单位名称",
              prop: "orgName",
              search: true,
              overHidden: true,
            },
            {
              label: "时间区间",
              prop: "dateTime",
              type: "datetimerange",
              format: "yyyy-MM-dd HH:mm:ss",
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              searchSpan: 6,
              searchRange: true,
              hide: true,
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              search: true,
              rules: [{
                required: true,
                message: "请选择时间区间",
                trigger: "blur",
              }, ],
            },
            {
              label: "工单数",
              prop: "orderCode",
              prop: "orderNumber",
              span: 12,
              searchSpan: 4,
              width: 160,
              hide: true,
              // overHidden: true,
              // search: true,
              searchLabelWidth: 76,
              addDisplay: false,
            },
            {
              hide: true,
              label: "派发单数",
              prop: "orderCode",
              prop: "dispatchNumber",
              span: 12,
              searchSpan: 4,
              width: 160,
              overHidden: true,
              display: false,
              // search: true,
              // overHidden: true,
              // display: false,
              searchLabelWidth: 76,
              addDisplay: false,
              // addDisplay: false,
            },
            {
              label: "办理单数(率)",
              prop: "orderCode",
              prop: "handRate",
              span: 12,
              searchSpan: 4,
              width: 160,
              overHidden: true,
              // search: true,
              searchLabelWidth: 76,
              addDisplay: false,
            },
            {
              label: "办结单数(率)",
              prop: "orderCode",
              prop: "checkRate",
              span: 12,
              searchSpan: 4,
              width: 160,
              overHidden: true,
              // search: true,
              searchLabelWidth: 76,
              addDisplay: false,
            },
            {
              label: "答复单数(率)",
              prop: "orderCode",
              prop: "doneRate",
              span: 12,
              searchSpan: 4,
              width: 160,
              overHidden: true,
              // search: true,
              searchLabelWidth: 76,
              addDisplay: false,
            },
            {
              label: "回访单数(率)",
              prop: "orderCode",
              prop: "respRate",
              span: 12,
              searchSpan: 4,
              width: 160,
              overHidden: true,
              // search: true,
              searchLabelWidth: 76,
              addDisplay: false,
            },
            {
              label: "核实单数(率)",
              prop: "orderCode",
              prop: "reviewRate",
              span: 12,
              searchSpan: 4,
              width: 160,
              overHidden: true,
              // search: true,
              searchLabelWidth: 76,
              addDisplay: false,
            },
            {
              label: "督办单数",
              prop: "orderCode",
              prop: "superviseNumber",
              span: 12,
              searchSpan: 4,
              width: 160,
              overHidden: true,
              // search: true,
              searchLabelWidth: 76,
              addDisplay: false,
            },
          ],
        },
        data: [],
        tagMain: 'Y'
      }
    },
@@ -222,6 +238,21 @@
      }
    },
    methods: {
      handleOrg(tagMain) {
        console.log("***************" + tagMain)
        if (tagMain === '主办单位') {
          this.query.tagMain = "Y"
          this.query.mainFlag = 1
          let dispatchNumberColumn = this.findObject(this.option.column, 'dispatchNumber')
          dispatchNumberColumn.hide = true
        } else {
          let dispatchNumberColumn = this.findObject(this.option.column, 'dispatchNumber')
          dispatchNumberColumn.hide = false
          this.query.tagMain = "N"
          this.query.mainFlag = 2
        }
        this.onLoad(this.page, this.query)
      },
      openMap() {
        this.$refs.avueInputMap.box = true
        console.log(this.$refs.avueInputMap)
@@ -244,13 +275,6 @@
      },
      rowSave(row, done, loading) {
        console.log("777777777777777777777" + JSON.stringify(row))
        // let local = this.locationDispose(row.sceneAddr)
        // row.sceneAddr = local.sceneAddr
        // row.sceneGeoLat = local.latitude
        // row.sceneGeoLng = local.longitude
        console.log("88888888888888888888888888" + JSON.stringify(row))
        add(row).then(
          () => {
            this.onLoad(this.page)
@@ -322,8 +346,14 @@
        this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params
        Object.assign(this.query, params)
        this.page.currentPage = 1
        console.log("*******params**********" + JSON.stringify(params))
        if (this.query.mainFlag == 1) {
          params.sinkOrgName = params.orgName
        } else {
          params.subjectOrgName = params.orgName
        }
        this.onLoad(this.page, params)
        done()
      },
@@ -421,6 +451,7 @@
        } = this.query
        let values = {
          ...params,
          ...this.query,
        }
        if (dateTime) {
          values = {
@@ -432,27 +463,19 @@
          values.dateTime = null
        }
        this.loading = true
        getList(page.currentPage, page.pageSize, values).then((res) => {
        getCount(this.page.currentPage, this.page.pageSize, values).then((res) => {
          const data = res.data.data
          this.page.total = data.total
          this.data = data.records
          this.data.forEach(item => {
            // this.$set(item, 'phoneflag', false)
            // if (item.imageUrls) {
            //   if (item.imageUrls.length > 0) {
            //     var urls = []
            //     var names = item.imageUrls.split(",")
            //     names.forEach(name => {
            //       urls.push(website.minioUrl + name)
            //     })
            //     item.imageUrls = urls.join(",")
            //   }
            // }
          })
          this.loading = false
          this.selectionClear()
          // this.selectionClear()
        })
      }
      },
      getsynchronizeData() {
        synchronizeData().then((res) => {
        })
      },
    },
  }
</script>