luobisheng
2022-12-09 a82d79851affba166693ba617fdeea43f1848e7f
src/views/operate/disposal/casepool/pool/index.vue
@@ -5,8 +5,8 @@
                <div class="search">
                    <span>来源查询:</span>
                    <div class="option">
                        <el-select v-model="mystatus" placeholder="违规" @change="setMyStatus">
                            <el-option v-for="item in typeList" :key="item.label" :label="item.name"
                        <el-select clearable v-model="resource" placeholder="请选择来源">
                            <el-option v-for="item in eventSourceOptions" :key="item.label" :label="item.label"
                                :value="item.value">
                            </el-option>
                        </el-select>
@@ -59,7 +59,7 @@
                    </el-table-column>
                    <el-table-column prop="eventSource" label="问题来源" min-width="8">
                        <template slot-scope="scope">
                            <span>{{scope.row.eventSource === 2 ? '人工上报' : '视频上传'}}</span>
                            <span>{{scope.row.eventSource === 2 ? '视频上传' : '人工上传'}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column :prop="mystatus === 1 ? 'category' :'category'"
@@ -152,6 +152,9 @@
import MyVio from './createUser/vio'
import MyDispatch from '@/components/dispatch'
import helper from '@/utils/mydate'
import { RESOURCE_OPTIONS } from "@/utils/helper";
import basecase from "@/api/operate/basecase";
export default {
    components: {
        createUser, MyIll, MyVio, MyDetail, MyDispatch, MyIllDetail
@@ -231,10 +234,11 @@
                    checked: false,
                },
            ],
            eventSourceOptions: RESOURCE_OPTIONS,
            mystatus: 1,
            statusArr: [],
            baseId: 0
            baseId: 0,
            resource: null
        }
    },
    created() {
@@ -255,11 +259,6 @@
        handleDispatch(data) {
            this.baseId = data.id;
            this.dialogDispatch = true;
        },
        // 顶部下拉框
        setMyStatus(value) {
            this.statusArr[1] = value;
            this.changeTypeChecked(value - 1);
        },
        // 选择违规违建
        setDialog({ flag, type }) {
@@ -327,17 +326,19 @@
        },
        // 获取用户列表
        getUserList() {
            const { currentPage, pageSize, statusArr } = this;
            this.$axios({
                method: 'get',
                url: `sccg/base_case/query?state=${statusArr[0]}&current=${currentPage}&size=${pageSize}&resource=2&type=${statusArr[1]}`
            }).then(res => {
                this.totalNum = res.data.total;
                this.tableData = res.data.records;
            })
                .catch(err => {
                    this.tableData = [];
          const params = {
            current: this.currentPage,
            state: this.statusArr[0] ?? null,
            size: this.pageSize,
            resource: this.resource,
            type: this.statusArr[1] ?? null
          }
            basecase.baseCasePoolList(params)
                .then(({ records, total }) => {
                  this.tableData = records;
                  this.totalNum = total;
                })
                .catch(err => this.$message.error(err))
        },
        // 设置表格斑马纹
        tableRowClassName({ row, rowIndex }) {