“dzb”
2022-10-03 4d9a35462803c7392dedca8d95fe21ff3d949466
src/views/operate/disposal/casepool/dispatch/index.vue
@@ -4,7 +4,13 @@
            <div class="headerContent">
                <div class="search">
                    <span>筛选条件:</span>
                    <el-input placeholder="请输入内容" v-model="context"></el-input>
                    <div class="option">
                        <el-select v-model="mystatus" placeholder="违规" @change="setMystatus">
                            <el-option v-for="item in typeList" :key="item.label" :label="item.name"
                                :value="item.value">
                            </el-option>
                        </el-select>
                    </div>
                    <div class="findBtn">
                        <el-button type="primary" @click="getUserList">查询</el-button>
                    </div>
@@ -24,9 +30,9 @@
                    @selection-change="tableChange">
                    <el-table-column type="selection" min-width="5">
                    </el-table-column>
                    <el-table-column prop="code" label="事件编号" min-width="10">
                    <el-table-column prop="id" label="事件编号" min-width="10">
                        <template slot-scope="scope">
                            <el-link @click="JumpView(scope.row)">{{scope.row.code}}</el-link>
                            <el-link @click="JumpView(scope.row)">{{scope.row.id}}</el-link>
                        </template>
                    </el-table-column>
                    <el-table-column prop="eventSource" label="问题来源" min-width="10">
@@ -46,25 +52,30 @@
                    <el-table-column prop="continueTime" label="持续时间" min-width="10">
                    </el-table-column>
                    <el-table-column prop="operation" label="操作" min-width="20">
                        <template>
                        <template slot-scope="scope">
                            <div class="btn">
                                <span>调度</span>
                                <span class="line">|</span>
                                <span @click="opernDialog">上传处置结果</span>
                                <span @click="opernDialog(scope.row)">上传处置结果</span>
                            </div>
                        </template>
                    </el-table-column>
                </el-table>
                <!-- 查看修改页面 -->
                <el-dialog :visible.sync="dialogUpdate" width="80%" title="基础信息(人工)"
                <!-- <el-dialog :visible.sync="dialogUpdate" width="80%" title="基础信息(人工)"
                    v-if="dialogUpdate" :before-close="handleClose">
                    <updateUser :info=info />
                </el-dialog> -->
                <!-- 详情页展示 -->
                <el-dialog :visible.sync="dialogView" width="80%" title="基础信息(人工)" v-if="dialogView"
                    :before-close="handleClose">
                    <MyDetail :info=info></MyDetail>
                </el-dialog>
                <!-- 上传页面 -->
                <el-dialog :visible.sync="dialogUpload" width="45%" title="上传处置结果"
                <el-dialog :visible.sync="dialogUpload" width="60%" title="上传处置结果"
                    v-if="dialogUpload" :before-close="handleClose">
                    <!-- <uploadVio></uploadVio>违规 -->
                    <uploadIll></uploadIll>
                    <uploadVio v-if="mystatus === 0"></uploadVio>
                    <uploadIll v-else></uploadIll>
                </el-dialog>
                <!-- tools -->
                <div class="tools">
@@ -95,19 +106,22 @@
    </div>
</template>
<script>
import updateUser from "./updateUser"
// import updateUser from "./updateUser"
import uploadVio from './updateUser/uploadResult/vio'
import uploadIll from "./updateUser/uploadResult/ill"
import MyDetail from '@/components/detail'
export default {
    components: {
        updateUser,uploadVio,uploadIll
        // updateUser,
        uploadVio,uploadIll,MyDetail
    },
    data() {
        return {
            tableData: [],
            context: "",
            dialogUpload:false,
            dialogUpdate: false,
            // dialogUpdate: false,
            dialogView:false,
            info: {},
            totalNum: null,
            pageSize: 10,
@@ -115,6 +129,7 @@
            all: false,
            unsame: false,
            myIdx: 0,
            preMyIdx:0,
            options: [
                {
                    value: 0,
@@ -147,42 +162,12 @@
                    checked: false,
                },
            ],
            tagList: [
                {
                    name: '待处理',
                    value: 7,
                    checked: true
                },
                {
                    name: '已上报',
                    value: 1,
                    checked: false
                },
                {
                    name: '已调度',
                    value: 3,
                    checked: false
                },
                {
                    name: '在学习',
                    value: 4,
                    checked: false
                },
                {
                    name: '暂不处理',
                    value: 4,
                    checked: false
                },
            ],
            statusArr:[],
            mystatus:0,
        }
    },
    created() {
        this.tagList.forEach(item => {
            if (item.checked) {
                this.statusArr[0] = item.value;
            }
        })
        this.statusArr[0] = 6;
        this.typeList.forEach(item => {
            if (item.checked) {
                this.statusArr[1] = item.value;
@@ -191,6 +176,13 @@
        this.getUserList();
    },
    methods: {
        // 顶部下拉框
        setMystatus(value) {
            console.log(value);
            this.statusArr[1] = value;
            this.changeTypeChecked(value - 1);
            this.getUserList();
        },
        // 批量删除
        mulDelete(idArr){
            console.log(idArr);
@@ -206,25 +198,27 @@
            })
        },
        // 执行下拉框操作
        selectChange(val) {
            let ids = [];
            this.tempList.forEach(item => {
                ids.push(item.number);
            })
            if (ids.length !== 0) {
                if (val === 3) {
                    this.mulDelete(ids);
        selectChange(list) {
            console.log(this.tempList);
            if (this.tempList.length !== 0) {
                if (list === 3) {
                    this.preMyIdx = list;
                    this.mulDelete(this.tempList);
                }
            } else {
                this.myIdx = this.preMyIdx;
                this.$message({
                    type: 'warning',
                    message: '您还没选中任何数据',
                })
            }
        },
        // 监听表格选中状态
        // 监听表格
        tableChange(list) {
            this.tempList = list;
            this.tempList = [];
            list.forEach(item => {
                this.tempList.push(item.code);
            })
            if (list.length === this.tableData.length) {
                this.all = true;
            } else {
@@ -269,7 +263,7 @@
            console.log(statusArr);
            this.$axios({
                method: 'get',
                url: `sccg/base-case/query/${statusArr[1]}?state=${statusArr[0]}&current=${currentPage}&size=${pageSize}&resource=2`
                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;
@@ -285,6 +279,9 @@
                    item.checked = false;
                }
            })
            this.mystatus = idx + 1;
            this.statusArr[1] = this.typeList[idx].value;
            this.getUserList();
        },
        // 设置表格斑马纹
        tableRowClassName({ row, rowIndex }) {
@@ -314,27 +311,28 @@
            this.$confirm('确认关闭?')
                .then(_ => {
                    this.dialogUpload = false;
                    this.dialogUpdate = false;
                    // this.dialogUpdate = false;
                    done();
                })
                .catch(_ => { });
        },
        async JumpView(data){
            await this.getEventInfo(data.code);
            this.dialogView = true;
        },
        // 获取案件信息
        getEventInfo(code){
            this.$axios({
                method:'get',
                url:`sccg/base-case/baseCaseDetail/${code}`
                url:`sccg/base_case/baseCaseDetail/${code}`
            })
            .then(res=>{
                this.info = res.data;  
                this.dialogView = true;
            })
        },
        opernDialog(){
        opernDialog(data){
            this.dialogUpload = true;
            console.log(data);
        }
    }
}
@@ -396,7 +394,10 @@
            }
        }
    }
    &::v-deep .el-input__inner {
        background-color: #09152f;
        border: 1px solid #17324c;
    }
    main {
        background-color: #09152f;
        margin-top: 20px;