quanyawei
2024-09-12 9251f709dc2a0d278ef2c0cdd76a244bfefc5784
src/views/toCarryOutLegislativeReforms/reform/index.vue
@@ -1,17 +1,44 @@
<template>
  <div v-loading="loading" class="main">
  <div
    v-loading="loading"
    class="main"
  >
    <div>
      <searchBar v-if="searchType" :search-type="'reform'" @handleSearch="handleSearchBut" @handleAdd="handleOpenDialog(null, 'add')" />
      <newWorkOrder v-if="centerDialogVisible" ref="newWorkOrder" :parent-form-data="parentFormData" :title="title" :page-state="pageState" :visible.sync="centerDialogVisible" @handleSubmit="newHandleSubmit" />
      <searchBar
        v-if="searchType"
        :search-type="'reform'"
        :initialization-data="initializationData"
        @handleSearch="handleSearchBut"
        @handleAdd="handleOpenDialog(null, 'add')"
      />
      <newWorkOrder
        v-if="centerDialogVisible"
        ref="newWorkOrder"
        :is-to-map.sync="isToMap"
        :parent-form-data="parentFormData"
        :title="title"
        :page-state="pageState"
        :visible.sync="centerDialogVisible"
        @handleSubmit="newHandleSubmit"
      />
      <!-- <el-divider></el-divider> -->
      <div class="tab">
        <div class="exportBox">
          <div>查询列表</div>
          <div>
            <el-button type="primary" size="mini" @click="handleOpenDialog(null, 'add')">
            <el-button
              type="primary"
              size="mini"
              @click="handleOpenDialog(null, 'add')"
            >
              新建
            </el-button>
            <el-button :disabled="!(selectionRows.length>0)" type="info" size="mini" @click="isNowDonw">
            <el-button
              :disabled="!(selectionRows.length>0)"
              type="info"
              size="mini"
              @click="isNowDonw"
            >
              导出
            </el-button>
          </div>
@@ -20,8 +47,15 @@
        <div style="position: relative;">
          <div>
            <div v-if="sealList.length>0">
              <div v-for="(item,index) in sealList" :key="index" :style="{'height':item.styleHeight}">
                <div v-if="item.isInvalid===1" class="yingzhang">
              <div
                v-for="(item,index) in sealList"
                :key="index"
                :style="{'height':item.styleHeight}"
              >
                <div
                  v-if="item.isInvalid===1"
                  class="yingzhang"
                >
                  <div class="seal-red">
                    已作废
                  </div>
@@ -30,12 +64,28 @@
            </div>
          </div>
          <div style="position: absolute;top:0;width: 100%;">
            <el-table size="mini" :data="tableData" border style="width: 100%" :header-cell-style="{
            <el-table
              size="mini"
              :data="tableData"
              border
              style="width: 100%"
              :header-cell-style="{
                color: '#101111',
                fontSize: '16px'
              }" @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="40" align="center" />
              <el-table-column type="index" label="序号" width="60px" align="center" />
              }"
              @selection-change="handleSelectionChange"
            >
              <el-table-column
                type="selection"
                width="40"
                align="center"
              />
              <el-table-column
                type="index"
                label="序号"
                width="60px"
                align="center"
              />
              <el-table-column align="center">
                <template slot="header">
                  <div>单号</div>
@@ -46,8 +96,20 @@
                  <div>{{ scope.row.escalationTime }}</div>
                </template>
              </el-table-column>
              <el-table-column align="center" prop="unitId" label="责任主体" width="150px" :formatter="unitIdFormatter" />
              <el-table-column align="center" prop="polluteType" label="污染分类" width="120px" :formatter="polluteTypeFormatter" />
              <el-table-column
                align="center"
                prop="unitId"
                label="责任主体"
                width="150px"
                :formatter="unitIdFormatter"
              />
              <el-table-column
                align="center"
                prop="polluteType"
                label="污染分类"
                width="120px"
                :formatter="polluteTypeFormatter"
              />
              <el-table-column align="center">
                <template slot="header">
                  <div>整改方式</div>
@@ -55,7 +117,10 @@
                </template>
                <template slot-scope="scope">
                  <div>{{ dictObj.changeEnum[scope.row.changeType] }}</div>
                  <div v-show="scope.row.changeType && scope.row.changeType === 2" :class="[Number(scope.row.residueDay) < 0 ? errorClass : '']">
                  <div
                    v-show="scope.row.changeType && scope.row.changeType === 2"
                    :class="[Number(scope.row.residueDay) < 0 ? errorClass : '']"
                  >
                    <span v-if="Number(scope.row.residueDay) < 0">
                      延期 {{ Math.abs(scope.row.residueDay) }}天
                    </span>
@@ -63,31 +128,63 @@
                  </div>
                </template>
              </el-table-column>
              <el-table-column align="center" prop="investigationType" label="排查方式" width="100px" :formatter="investigationTypeFormatter" />
              <el-table-column align="center" prop="state" width="100px" label="流程状态">
              <el-table-column
                align="center"
                prop="investigationType"
                label="排查方式"
                width="100px"
                :formatter="investigationTypeFormatter"
              />
              <el-table-column
                align="center"
                prop="state"
                width="100px"
                label="流程状态"
              >
                <template slot-scope="scope">
                  <el-tag v-if="scope.row.state === 40" type="success">
                  <el-tag
                    v-if="scope.row.state === 40"
                    type="success"
                  >
                    {{ stateFormatter(scope.row) }}
                  </el-tag>
                  <el-tag v-if="scope.row.state === 50" type="danger">
                  <el-tag
                    v-if="scope.row.state === 50"
                    type="danger"
                  >
                    {{ stateFormatter(scope.row) }}
                  </el-tag>
                  <el-tag v-if="scope.row.state === 9" type="info">
                  <el-tag
                    v-if="scope.row.state === 9"
                    type="info"
                  >
                    {{ stateFormatter(scope.row) }}
                  </el-tag>
                  <el-tag v-if="scope.row.state === 20" type="warning">
                  <el-tag
                    v-if="scope.row.state === 20"
                    type="warning"
                  >
                    {{ stateFormatter(scope.row) }}
                  </el-tag>
                  <el-tag v-if="scope.row.state === 10" type="warning">
                  <el-tag
                    v-if="scope.row.state === 10"
                    type="warning"
                  >
                    {{ stateFormatter(scope.row) }}
                  </el-tag>
                  <el-tag v-if="scope.row.state === 30" type="warning">
                  <el-tag
                    v-if="scope.row.state === 30"
                    type="warning"
                  >
                    {{ stateFormatter(scope.row) }}
                  </el-tag>
                </template>
              </el-table-column>
              <!-- <el-table-column align="center" prop="isInvalid" label="是否作废" width="60px" :formatter="isInvalidFormatter" /> -->
              <el-table-column align="center" width="150px">
              <el-table-column
                align="center"
                width="150px"
              >
                <template slot="header">
                  <div>上报单位</div>
                  <div>上报人</div>
@@ -107,27 +204,66 @@
                  <div>{{ scope.row.updateTime }}</div>
                </template>
              </el-table-column>
              <el-table-column align="center" prop="createTime" min-width="100px" label="操作">
              <el-table-column
                align="center"
                prop="createTime"
                min-width="100px"
                label="操作"
              >
                <template slot-scope="scope">
                  <el-button type="text" size="medium" @click="openWorkOrdinDialog(scope.row, 'detail')">
                  <el-button
                    type="text"
                    size="medium"
                    @click="openWorkOrdinDialog(scope.row, 'detail')"
                  >
                    详情
                  </el-button>
                  <el-button v-if="scope.row.isCode==='1'" type="text" size="medium" @click="openEditDialog(scope.row)">
                  <el-button
                    v-if="scope.row.isCode==='1'"
                    type="text"
                    size="medium"
                    @click="openEditDialog(scope.row)"
                  >
                    修改单位
                  </el-button>
                  <el-button v-if="scope.row.state === 9" type="text" size="medium" @click="handleOpenDialog(scope.row, 'edit')">
                  <el-button
                    v-if="scope.row.state === 9"
                    type="text"
                    size="medium"
                    @click="handleOpenDialog(scope.row, 'edit')"
                  >
                    编辑
                  </el-button>
                  <el-button v-if="scope.row.state > 30 && scope.row.isInvalid === 0" type="text" size="medium" @click="handleCancel(scope.row)">
                  <el-button
                    v-if="scope.row.state > 30 && scope.row.isInvalid === 0"
                    type="text"
                    size="medium"
                    @click="handleCancel(scope.row)"
                  >
                    作废
                  </el-button>
                  <el-button v-if="scope.row.state === 20" type="text" size="medium" @click="openWorkOrdinDialog(scope.row, 'work')">
                  <el-button
                    v-if="scope.row.state === 20"
                    type="text"
                    size="medium"
                    @click="openWorkOrdinDialog(scope.row, 'work')"
                  >
                    整改
                  </el-button>
                  <el-button v-if="scope.row.state === 30 && scope.row.isApprove === 1" type="text" size="medium" @click="openWorkOrdinDialog(scope.row, 'approve')">
                  <el-button
                    v-if="scope.row.state === 30 && scope.row.isApprove === 1"
                    type="text"
                    size="medium"
                    @click="openWorkOrdinDialog(scope.row, 'approve')"
                  >
                    审批
                  </el-button>
                  <el-button v-if="scope.row.state === 20 && scope.row.changeType === 2 &&scope.row.applyState === 0" type="text" size="medium" @click="openWorkOrdinDialog(scope.row, 'delay')">
                  <el-button
                    v-if="scope.row.state === 20 && scope.row.changeType === 2 &&scope.row.applyState === 0"
                    type="text"
                    size="medium"
                    @click="openWorkOrdinDialog(scope.row, 'delay')"
                  >
                    延期申请
                  </el-button>
                </template>
@@ -137,52 +273,119 @@
        </div>
      </div>
      <div class="pagina">
        <el-pagination background :current-page="pagination.currentPage" :page-sizes="pagination.pageSizes" :page-size="pagination.pageSize" :total="pagination.totalCount" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
        <el-pagination
          background
          :current-page="pagination.currentPage"
          :page-sizes="pagination.pageSizes"
          :page-size="pagination.pageSize"
          :total="pagination.totalCount"
          layout="total, sizes, prev, pager, next, jumper"
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
        />
      </div>
    </div>
    <workOrderInformation v-if="workOrdinDialogVisible" :dialog-data="dialogData" :visible.sync="workOrdinDialogVisible" @handeleSumit="handeleSumit" />
    <el-dialog title="作废" :visible.sync="dialogVisible" width="600px" :before-close="handleClose" center>
    <workOrderInformation
      v-if="workOrdinDialogVisible"
      :dialog-data="dialogData"
      :is-to-map.sync="isToMap"
      :visible.sync="workOrdinDialogVisible"
      @handeleSumit="handeleSumit"
    />
    <el-dialog
      title="作废"
      :visible.sync="dialogVisible"
      width="600px"
      :before-close="handleClose"
      center
    >
      <div>
        <el-form label-width="100px">
          <el-form-item label="作废理由:" style="margin-right: 30px">
            <el-input v-model="invalidReason" type="textarea" :autosize="{ minRows: 2, maxRows: 10 }" placeholder="请输入内容" />
          <el-form-item
            label="作废理由:"
            style="margin-right: 30px"
          >
            <el-input
              v-model="invalidReason"
              type="textarea"
              :autosize="{ minRows: 2, maxRows: 10 }"
              placeholder="请输入内容"
            />
          </el-form-item>
        </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
      <span
        slot="footer"
        class="dialog-footer"
      >
        <el-button @click="handleClose">取 消</el-button>
        <el-button type="primary" @click="handleInvalid">确 定</el-button>
        <el-button
          type="primary"
          @click="handleInvalid"
        >确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog v-if="dialogEditVisible" title="修改" :visible.sync="dialogEditVisible" width="800px" top="5vh" :before-close="handleClose" center>
    <el-dialog
      v-if="dialogEditVisible"
      title="修改"
      :visible.sync="dialogEditVisible"
      width="800px"
      top="5vh"
      :before-close="handleClose"
      center
    >
      <el-descriptions title="基本信息">
        <template slot="extra">
          <div>
            {{ editEscalationUnitData.allocationNum }}
          </div>
        </template>
        <el-descriptions-item label="上报时间" label-class-name="itemSpan">
        <el-descriptions-item
          label="上报时间"
          label-class-name="itemSpan"
        >
          {{ editEscalationUnitData.escalationTime }}
        </el-descriptions-item>
        <el-descriptions-item label="责任单位" label-class-name="itemSpan">
        <el-descriptions-item
          label="责任单位"
          label-class-name="itemSpan"
        >
          {{ updataUnitIdFormatter }}
        </el-descriptions-item>
        <el-descriptions-item label="污染分类" label-class-name="itemSpan">
        <el-descriptions-item
          label="污染分类"
          label-class-name="itemSpan"
        >
          {{ polluteTypeeDITFormatter }}
        </el-descriptions-item>
        <el-descriptions-item label="整改类型" label-class-name="itemSpan">
        <el-descriptions-item
          label="整改类型"
          label-class-name="itemSpan"
        >
          {{ dictObj.changeEnum[editEscalationUnitData.changeType] }}
        </el-descriptions-item>
        <el-descriptions-item label="期限天数" label-class-name="itemSpan">
        <el-descriptions-item
          label="期限天数"
          label-class-name="itemSpan"
        >
          {{ editEscalationUnitData.changeDay || 0 }} 天
        </el-descriptions-item>
        <el-descriptions-item label="上报单位" label-class-name="itemSpan">
        <el-descriptions-item
          label="上报单位"
          label-class-name="itemSpan"
        >
          {{ updataEscalationUnitIdFormatter }}
        </el-descriptions-item>
        <el-descriptions-item label="上报人" label-class-name="itemSpan">
        <el-descriptions-item
          label="上报人"
          label-class-name="itemSpan"
        >
          {{ editEscalationUnitData.escalationName }}
        </el-descriptions-item>
        <el-descriptions-item label="污染位置" label-class-name="itemSpan">
        <el-descriptions-item
          label="污染位置"
          label-class-name="itemSpan"
        >
          {{ editEscalationUnitData.pollutePosition }}
        </el-descriptions-item>
      </el-descriptions>
@@ -191,24 +394,55 @@
        <p class="editTile">
          修改操作
        </p>
        <el-form :inline="true" class="demo-form-inline">
        <el-form
          :inline="true"
          class="demo-form-inline"
        >
          <el-form-item label="责任单位:">
            <el-select v-model="formInEdit.unitId" size="small" clearable placeholder="请选择">
              <el-option v-for="item in unitList" :key="item.unitId" :label="item.unitName" :value="item.unitId" />
            <el-select
              v-model="formInEdit.unitId"
              size="small"
              clearable
              placeholder="请选择"
            >
              <el-option
                v-for="item in unitList"
                :key="item.unitId"
                :label="item.unitName"
                :value="item.unitId"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="污染分类:">
            <el-select v-model="formInEdit.polluteType" size="small" clearable placeholder="请选择">
              <el-option v-for="item in polluteList" :key="item.dataKey" :label="item.dataValue" :value="item.dataKey" />
            <el-select
              v-model="formInEdit.polluteType"
              size="small"
              clearable
              placeholder="请选择"
            >
              <el-option
                v-for="item in polluteList"
                :key="item.dataKey"
                :label="item.dataValue"
                :value="item.dataKey"
              />
            </el-select>
          </el-form-item>
        </el-form>
      </div>
      <el-collapse>
        <el-collapse-item title="修改记录" name="1">
        <el-collapse-item
          title="修改记录"
          name="1"
        >
          <div class="block">
            <el-timeline>
              <el-timeline-item v-for="(activity, index) in operatingLog" :key="index" :color="'#0bbd87'" :timestamp="activity.createTime">
              <el-timeline-item
                v-for="(activity, index) in operatingLog"
                :key="index"
                :color="'#0bbd87'"
                :timestamp="activity.createTime"
              >
                <div v-if="activity.content">
                  操作人: {{ activity.userName }}
                </div>
@@ -224,11 +458,22 @@
        </el-collapse-item>
      </el-collapse>
      <span slot="footer" class="dialog-footer">
      <span
        slot="footer"
        class="dialog-footer"
      >
        <el-button @click="handleClose">取 消</el-button>
        <el-button type="primary" @click="handleEditChange">确 定</el-button>
        <el-button
          type="primary"
          @click="handleEditChange"
        >确 定</el-button>
      </span>
    </el-dialog>
    <mapContainer
      v-if="isToMap"
      :visible.sync="isToMap"
      @addressAndLnt="getaddressAndLnt"
    />
  </div>
</template>
@@ -238,19 +483,23 @@
import _ from 'lodash'
import qs from 'qs'
import searchBar from '@/views/toCarryOutLegislativeReforms/components/queryForm'
import mapContainer from '@/views/toCarryOutLegislativeReforms/components/locationMap'
import newWorkOrder from '@/views/toCarryOutLegislativeReforms/components/newWorkOrder'
import workOrderInformation from '@/views/toCarryOutLegislativeReforms/components/workOrderInformation'
export default {
  components: {
    searchBar,
    newWorkOrder,
    mapContainer,
    workOrderInformation
  },
  // mixins: [mixins],
  data() {
  data () {
    return {
      loading: false,
      isToMap: false,
      selectionRows: [],
      position: [],
      errorClass: 'errorClass',
      searchType: 'reform',
      pagination: {
@@ -258,7 +507,7 @@
        // 总条数,根据接口获取数据长度(注意:这里不能为空)
        totalCount: 0,
        // 个数选择器(可修改)
        pageSizes: [10, 30, 60, 100],
        pageSizes: [10, 50, 100, 200],
        // 默认每页显示的条数(可修改)
        pageSize: 10
      },
@@ -280,7 +529,9 @@
      dictObj: JSON.parse(localStorage.getItem('dictObj')),
      parentFormData: {},
      pageState: 'add',
      mapType: 'edit',
      invalidReason: '',
      address: '',
      slectRow: {},
      title: '',
      searchData: {
@@ -316,19 +567,55 @@
          parseInt(item.dataKey) === this.editEscalationUnitData.polluteType
      )
      return data ? data.dataValue : ''
    },
    initializationData () {
      return this.$route.query
    }
  },
  created() {
    this.handleSearch({ isInvalid: 0, state: [9, 20, 30] })
  watch: {
    isToMap (newVal, oldVal) {
      this.isToMap = newVal
    }
  },
  created () {
    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: {
    handleSelectionChange(rows) {
    getaddressAndLnt (position, address) {
      if (this.mapType === 'edit') {
        this.$refs.newWorkOrder.formData.pollutePosition = address
        this.position = position
      }
    },
    handleSelectionChange (rows) {
      console.log(rows)
      this.selectionRows = rows
    },
    isNowDonw() {
    isNowDonw () {
      this.$confirm('立即下载或者后台下载?', '提示', {
        confirmButtonText: '立即下载',
        cancelButtonText: '后台下载',
@@ -348,7 +635,7 @@
          }
        })
    },
    exportData() {
    exportData () {
      // this.dowOrgFile('交办单导出.xlsx')
      let that = this
      const CancelToken = axios.CancelToken
@@ -372,10 +659,11 @@
        params: {
          id: this.selectionRows.map(item => item.allocationId)
        },
        cancelToken: new CancelToken(function executor(c) {
        cancelToken: new CancelToken(function executor (c) {
          cancel = c
        }),
        onDownloadProgress(progress) {
        onDownloadProgress (progress) {
          console.log('onDownloadProgress', progress)
          const loaded = progress.loaded
          // progress对象中的loaded表示已经下载的数量,total表示总数量,这里计算出百分比
          let downProgress = Math.round((loaded / totalSize) * 100)
@@ -411,10 +699,11 @@
        })
        .catch(err => {
          clearTimeout(timer)
          console.log('导出失败', err)
          this.loading = false
        })
    },
    getOutExcel(fileName, res) {
    getOutExcel (fileName, res) {
      const blob = new Blob([res], { type: 'application/x-xls' })
      if (window.navigator.msSaveOrOpenBlob) {
        // 兼容 IE & EDGE
@@ -432,11 +721,16 @@
        link.click()
        // 下载完成进行释放
        url.revokeObjectURL(link.href)
        this.$message.success('下载完成!')
        this.$message({
          showClose: true,
          duration: 0,
          message: '下载完成!',
          type: 'success'
        })
        this.loading = false
      }
    },
    openEditDialog(row) {
    openEditDialog (row) {
      this.editEscalationUnitData = row
      this.dialogEditVisible = true
      this.$request({
@@ -455,15 +749,15 @@
          console.log(err)
        })
    },
    handleCancel(row) {
    handleCancel (row) {
      this.dialogVisible = true
      this.slectRow = row
    },
    handleClose() {
    handleClose () {
      this.dialogVisible = false
      this.dialogEditVisible = false
    },
    handleEditChange() {
    handleEditChange () {
      if (this.formInEdit.polluteType === '' && this.formInEdit.unitId === '') {
        this.$message({
          message: '请选择后再提交',
@@ -499,7 +793,7 @@
          console.log(err)
        })
    },
    handleInvalid() {
    handleInvalid () {
      this.$request({
        url: '/allocation/invalid',
        method: 'get',
@@ -520,12 +814,13 @@
      })
    },
    // 详情
    handleOpenDialog(row, type) {
    handleOpenDialog (row, type) {
      this.pageState = type
      this.parentFormData = {}
      if (type === 'add') {
        this.title = '新建交办单'
        this.centerDialogVisible = true
        this.mapType = 'edit'
      } else {
        this.title = '编辑交办单'
        this.$request({
@@ -541,35 +836,35 @@
        })
      }
    },
    updatUnitIdFormatter(val) {
    updatUnitIdFormatter (val) {
      const data = this.unitList.find(
        item => item && item.unitId === val.escalationUnitId
      )
      return data ? data.unitName : ''
    },
    unitIdFormatter(val) {
    unitIdFormatter (val) {
      const data = this.unitList.find(
        item => item && item.unitId === val.unitId
      )
      return data ? data.unitName : ''
    },
    polluteTypeFormatter(val) {
    polluteTypeFormatter (val) {
      const data = this.polluteList.find(
        item => item && parseInt(item.dataKey) === val.polluteType
      )
      return data ? data.dataValue : ''
    },
    investigationTypeFormatter(val) {
    investigationTypeFormatter (val) {
      return this.dictObj.investigationEnum[val.investigationType]
    },
    stateFormatter(val) {
    stateFormatter (val) {
      return this.dictObj.allocationApproveEnum[val.state]
    },
    isInvalidFormatter(val) {
    isInvalidFormatter (val) {
      return this.dictObj.yesOrNo[val.isInvalid]
    },
    // 获取责任单位list
    getUnitList() {
    getUnitList () {
      this.$request({
        url: '/allocation/unit',
        method: 'get'
@@ -581,7 +876,7 @@
        }
      })
    },
    getContaminateList() {
    getContaminateList () {
      this.$request({
        url: '/allocation/contaminate',
        method: 'get'
@@ -593,11 +888,11 @@
        }
      })
    },
    handeleSumit() {
    handeleSumit () {
      this.handleSearch()
    },
    // 提交
    newHandleSubmit(obj) {
    newHandleSubmit (obj) {
      console.log(obj)
      console.log(this.parentFormData)
      let api = '/allocation/insert'
@@ -605,10 +900,18 @@
        api = '/allocation/update'
        // obj.fileBaseList = [...this.parentFormData.fileBaseList, ... obj.fileBaseList]
      }
      let latitude = ''
      let longitude = ''
      if (this.position.length > 0) {
        latitude = this.position[1]
        longitude = this.position[0]
      }
      this.$request({
        url: api,
        method: 'post',
        data: {
          'latitude': latitude,
          'longitude': longitude,
          ...obj
        }
      }).then(res => {
@@ -621,20 +924,20 @@
        }
      })
    },
    handleSearchBut(obj) {
    handleSearchBut (obj) {
      const pageSize = this.pagination.pageSize
      this.pagination = {
        currentPage: 1,
        // 总条数,根据接口获取数据长度(注意:这里不能为空)
        totalCount: 0,
        // 个数选择器(可修改)
        pageSizes: [10, 30, 60, 100],
        pageSizes: [10, 50, 100, 200],
        // 默认每页显示的条数(可修改)
        pageSize: pageSize
      }
      this.handleSearch(obj)
    },
    handleSearch(obj) {
    handleSearch (obj) {
      this.selectionRows = []
      if (obj) {
        this.searchData = obj
@@ -671,7 +974,7 @@
    },
    // 分页
    // 每页显示的条数
    handleSizeChange(val) {
    handleSizeChange (val) {
      // 改变每页显示的条数
      console.log('345')
      this.pagination.pageSize = val
@@ -680,14 +983,14 @@
      this.handleSearch()
    },
    // 显示第几页
    handleCurrentChange(val) {
    handleCurrentChange (val) {
      // 改变默认的页数
      console.log('123')
      this.pagination.currentPage = val
      this.handleSearch()
      // console.log(val)
    },
    openWorkOrdinDialog(row, type) {
    openWorkOrdinDialog (row, type) {
      this.$request({
        url: '/allocation/detail',
        method: 'get',
@@ -714,6 +1017,9 @@
            sysCode: '1010203'
          }
        } else if (type === 'detail') {
          this.mapType = 'view'
          this.position = [res.data.longitude, res.data.latitude]
          this.address = res.data.pollutePosition
          this.dialogData = {
            title: '交办单详情',
            parentFormData: res.data,