fangyuan
2022-12-14 8ca4bb420f3197b624707239e7062923b2bd7df4
src/views/intelligentPatrol/studyJudge/inspectionTable/index.vue
@@ -16,11 +16,10 @@
          <span>{{ scope.row.eventSource === 2 ? '视频上传' : '人工上传' }}</span>
        </template>
      </el-table-column>
      <el-table-column :prop="mystatus === 1 ? 'category' :'category'"
                       :label="mystatus===1 ? '大类名称' : '违建类别'" :min-width="mystatus===1?'10':'15'">
      <el-table-column :prop="mystatus === 1 ? 'category' : 'category'" :label="mystatus === 1 ? '大类名称' : '违建类别'"
        :min-width="mystatus === 1 ? '10' : '15'">
      </el-table-column>
      <el-table-column :prop="mystatus === 1 ? 'type' :'site'" :label="mystatus===1 ? '小类名称' : '违建地点'"
                       min-width="10">
      <el-table-column :prop="mystatus === 1 ? 'type' : 'site'" :label="mystatus === 1 ? '小类名称' : '违建地点'" min-width="10">
      </el-table-column>
      <el-table-column :prop="mystatus === 1 ? 'site' :''" :label="mystatus===1 ? '报警点位' : '违法建筑长、宽、高'"
                       :min-width="mystatus===1?'10' :'20' ">
@@ -32,16 +31,16 @@
          <div v-else>{{ scope.row.site }}</div>
        </template>
      </el-table-column>
      <el-table-column :prop="mystatus === 1 ? 'street' :'buildingArea'"
                       :label="mystatus===1 ? '所属区域' : '违法建筑面积'" min-width="12">
      <el-table-column :prop="mystatus === 1 ? 'street' : 'buildingArea'" :label="mystatus === 1 ? '所属区域' : '违法建筑面积'"
        min-width="12">
      </el-table-column>
      <el-table-column prop="alarmTime" label="报警时间" min-width="15" v-if="mystatus===1">
        <template slot-scope="scope">
          <span>{{ filterTime(scope.row.alarmTime) }}</span>
        </template>
      </el-table-column>
      <el-table-column :prop="mystatus === 1 ? 'continueTime' :'materials'"
                       :label="mystatus===1 ? '持续时间' : '违法建筑材料'" min-width="12">
      <el-table-column :prop="mystatus === 1 ? 'continueTime' : 'materials'" :label="mystatus === 1 ? '持续时间' : '违法建筑材料'"
        min-width="12">
      </el-table-column>
      <el-table-column prop="operation" label="操作" min-width="20">
        <template slot-scope="scope">
@@ -57,45 +56,24 @@
    <div class="tools">
      <div class="funs">
        <div class="funsItem funs-sp">
          <el-checkbox v-model="all" @change="selectAll()"
          >全选
          </el-checkbox
          >
          <el-checkbox v-model="all" @change="selectAll()">全选
          </el-checkbox>
        </div>
        <div class="funsItem funs-sp">
          <el-checkbox v-model="unsame" @change="disSame(tableData)"
          >反选
          </el-checkbox
          >
          <el-checkbox v-model="unsame" @change="disSame(tableData)">反选
          </el-checkbox>
        </div>
        <div class="funsItem">
          <el-select
              v-model="myIdx"
              placeholder="批量操作"
              @change="selectChange"
          >
            <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                :disabled="item.disabled"
            >
          <el-select v-model="myIdx" placeholder="批量操作" @change="selectChange">
            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"
              :disabled="item.disabled">
            </el-option>
          </el-select>
        </div>
      </div>
      <div class="pagination">
        <el-pagination
            background
            :current-page="currentPage"
            layout="prev, pager, next"
            :total="totalNum"
            :page-size="pageSize"
            @current-change="changeCurrentPage"
            @prev-click="handlePrev"
            @next-click="handleNext"
        >
        <el-pagination background :current-page="currentPage" layout="prev, pager, next" :total="totalNum"
          :page-size="pageSize" @current-change="changeCurrentPage" @prev-click="handlePrev" @next-click="handleNext">
        </el-pagination>
      </div>
    </div>
@@ -170,13 +148,24 @@
      }
    },
    mulHandler(ids, option) {
      console.log("whj", ids, option)
      console.log(this.options.filter(x => x.value === option))
      // debugger
      // console.log("whj", ids, option)
      // console.log(this.options.filter(x => x.value === option))
      const tag = this.options.filter(x => x.value === option)[0].label
      if (option === 3) {
        this.$confirm(`您确定要${tag}吗?`)
            .then((_) => {
            this.$axios({
              method: 'put',
              url: `/sccg/base_case/batch_case_study?ids=${ids}`,
            })
              .then(res => {
                this.$message({
                  type: res.code === 200 ? 'success' : 'warning',
                  message: res.message+",事件已经批量处理,请进入案件池在学习"
                })
                this.getInspectionData();
              })
            })
            .catch((err) => {
              console.log(err);
@@ -184,7 +173,17 @@
      } else if (option === 4) {
        this.$confirm(`您确定要${tag}吗?`)
            .then((_) => {
            this.$axios({
              method: 'put',
              url: `/sccg/base_case/batch_case_Ignore?ids=${ids}`,
            })
              .then(res => {
                this.$message({
                  type: res.code === 200 ? 'success' : 'warning',
                  message: res.message+",事件已经批量处理,请进入案件池在学习"
                })
                this.getInspectionData();
              })
            })
            .catch((err) => {
              console.log(err);
@@ -301,7 +300,6 @@
</script>
<style scoped lang="scss">
.tools {
  display: flex;
  justify-content: space-between;
@@ -354,6 +352,7 @@
    justify-content: center;
    .el-pagination {
      &::v-deep li,
      &::v-deep .btn-prev,
      &::v-deep .btn-next {
@@ -385,5 +384,4 @@
    }
  }
}
</style>