“dzb”
2022-10-10 676722551d0bc2f8caa0644961e60deef3f0d532
src/views/operate/disposal/casepool/pool/index.vue
@@ -26,9 +26,10 @@
                    <el-dialog :before-close="handleClose" :visible.sync="dialogNewAdd"
                        :title="newAddType === 0 ? '违规事件登记' : '违建事件登记' " width="60%" v-if="dialogNewAdd">
                        <!-- 违建登记 -->
                        <MyIll v-if="newAddType === 1" :mytype=newAddType @changeDialog=changeDialog />
                        <MyIll v-if="newAddType === 1" :refresh="getUserList" :mytype=newAddType
                            @changeDialog=changeDialog />
                        <!-- 违规登记 -->
                        <myVio v-else :mytype=newAddType @changeDialog=changeDialog />
                        <myVio v-else :mytype=newAddType @changeDialog=changeDialog :refresh="getUserList" />
                    </el-dialog>
                </div>
            </div>
@@ -51,12 +52,15 @@
                    @selection-change="tableChange">
                    <el-table-column type="selection" min-width="5">
                    </el-table-column>
                    <el-table-column prop="id" label="事件编号" min-width="10">
                    <el-table-column prop="code" label="事件编号" min-width="10">
                        <template slot-scope="scope">
                            <el-link @click="JumpView(scope.row)">{{scope.row.id}}</el-link>
                            <el-link @click="JumpView(scope.row)">{{scope.row.code}}</el-link>
                        </template>
                    </el-table-column>
                    <el-table-column prop="eventSource" label="问题来源" min-width="10">
                        <template slot-scope="scope">
                            <span>{{scope.row.eventSource === 2 ? '人工上报' : '视频上传'}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="category" label="大类名称" min-width="10">
                    </el-table-column>
@@ -74,7 +78,7 @@
                    </el-table-column>
                    <el-table-column prop="operation" label="操作" min-width="20">
                        <template slot-scope="scope">
                            <div class="operation">
                            <div class="operation" v-if="statusArr[0]===0">
                                <span @click="handleFind(scope.row)">上报</span>
                                <span class="line">|</span>
                                <span @click="handleDispatch(scope.row)">调度</span>
@@ -89,24 +93,27 @@
                <!-- 详情页展示 -->
                <el-dialog :visible.sync="dialogView" width="80%" title="基础信息(人工)" v-if="dialogView"
                    :before-close="handleClose">
                    <MyDetail :info=info></MyDetail>
                    <MyDetail :info=info v-if="mystatus==1 ? true:false"></MyDetail>
                    <MyIllDetail :info=info v-else></MyIllDetail>
                </el-dialog>
                <!-- 调度 -->
                <el-dialog :visible.sync="dialogDispatch" width="80%" title="调度信息" v-if="dialogDispatch"
                    :before-close="handleClose">
                    <MyDispatch :id="baseId" @changeDialog="changeDialog"></MyDispatch>
                    <MyDispatch :id="baseId" :mytype="mystatus" @changeDialog="changeDialog" :refresh="getUserList">
                    </MyDispatch>
                </el-dialog>
                <!-- tools -->
                <div class="tools">
                    <div class="funs">
                        <div class="funsItem">
                            <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox>
                            <el-checkbox v-model="all" @change="selectAll()"
                                :disabled="tableData.length !== 0 ? false : true">全选</el-checkbox>
                        </div>
                        <div class="funsItem">
                            <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox>
                        </div>
                        <div class="funsItem">
                            <el-select v-model="myIdx" placeholder="批量操作" @change="selectChange">
                            <el-select v-model="myIdx" placeholder="批量操作" @change="selectChange" disabled>
                                <el-option v-for="item in options" :key="item.value" :label="item.label"
                                    :value="item.value" :disabled="item.disabled">
                                </el-option>
@@ -126,13 +133,14 @@
</template>
<script>
import MyDetail from '@/components/detail'
import MyIllDetail from '@/components/illdetail'
import createUser from "./createUser"
import MyIll from './createUser/ill'
import MyVio from './createUser/vio'
import MyDispatch from '@/components/dispatch'
export default {
    components: {
        createUser, MyIll, MyVio, MyDetail, MyDispatch
        createUser, MyIll, MyVio, MyDetail, MyDispatch, MyIllDetail
    },
    data() {
        return {
@@ -152,7 +160,7 @@
            dialogCreate: false,
            dialogView: false,
            dialogNewAdd: false,
            dialogDispatch:false,
            dialogDispatch: false,
            newAddType: 0,
            totalNum: null,
            pageSize: 10,
@@ -221,9 +229,9 @@
                    checked: false,
                },
            ],
            mystatus: '',
            mystatus: 1,
            statusArr: [],
            baseId:0
            baseId: 0
        }
    },
@@ -267,7 +275,7 @@
                .then(_ => {
                    this.$axios({
                        method: 'delete',
                        url: 'sccg/base-case/batch_deletion?ids=' + idArr + '&type=' + statusArr[1],
                        url: 'sccg/base_case/batch_deletion?ids=' + idArr + '&type=' + statusArr[1],
                    }).then(res => {
                        if (res.code === 200) {
                            this.getUserList();
@@ -305,7 +313,7 @@
        tableChange(list) {
            this.tempList = [];
            list.forEach(item => {
                this.tempList.push(item.code);
                this.tempList.push(item.id);
            })
            if (list.length === this.tableData.length) {
                this.all = true;
@@ -335,6 +343,10 @@
                this.tableData = res.data.records;
                console.log(res);
            })
                .catch(err => {
                    console.log(err)
                    this.tableData = [];
                })
        },
        // 设置表格斑马纹
        tableRowClassName({ row, rowIndex }) {
@@ -365,12 +377,12 @@
            this.currentPage = page;
            this.getUserList();
        },
        changeDialog(val) {
            this.dialogNewAdd = val.dialogView;
            this.dialogCreate = val.dialogView;
            this.dialogView = val.dialogView;
            this.dialogDispatch = val.dialogView;
            this.getUserList();
        changeDialog({ flag }) {
            this.dialogNewAdd = flag;
            this.dialogCreate = flag;
            this.dialogView = flag;
            this.dialogDispatch = flag;
            // this.getUserList();
        },
        handleClose(done) {
            this.$confirm('确认关闭?')
@@ -427,50 +439,62 @@
                })
        },
        // 在学习
        handleLearn({id}){
        handleLearn({ id }) {
            console.log(id);
            this.$axios({
                method:'put',
                url:'sccg/base_case/case_status_update?caseId='+id + '&state='+3
                method: 'put',
                url: 'sccg/base_case/case_status_update?caseId=' + id + '&state=' + 3
            })
            .then(res=>{
                console.log(res);
                if(res.code === 200){
                    this.$message({
                        type:'success',
                        message:'操作成功',
                    })
                    this.getUserList();
                }else{
                    this.$message({
                        type:'error',
                        message:'操作失败'
                    })
                }
            })
                .then(res => {
                    console.log(res);
                    if (res.code === 200) {
                        this.$notify({
                            title: '温馨提示',
                            message: '此事件已忽略,返回系统在学习',
                            type: 'success',
                            position: 'bottom-right'
                        })
                        // this.$message({
                        //     type:'success',
                        //     message:'操作成功',
                        // })
                        this.getUserList();
                    } else {
                        this.$message({
                            type: 'error',
                            message: '操作失败'
                        })
                    }
                })
        },
        // 暂不处理
        handleNotDeal({id}){
        handleNotDeal({ id }) {
            console.log(id);
            this.$axios({
                method:'put',
                url:'sccg/base_case/case_status_update?caseId='+id + '&state='+4
                method: 'put',
                url: 'sccg/base_case/case_status_update?caseId=' + id + '&state=' + 4
            })
            .then(res=>{
                console.log(res);
                if(res.code === 200){
                    this.$message({
                        type:'success',
                        message:'操作成功',
                    })
                    this.getUserList();
                }else{
                    this.$message({
                        type:'error',
                        message:'操作失败'
                    })
                }
            })
                .then(res => {
                    console.log(res);
                    if (res.code === 200) {
                        this.$notify({
                            title: '温馨提示',
                            message: '此事件暂不处理,请前往暂不处理界面查看详情',
                            type: 'success',
                            position: 'bottom-right'
                        })
                        // this.$message({
                        //     type:'success',
                        //     message:'操作成功',
                        // })
                        this.getUserList();
                    } else {
                        this.$message({
                            type: 'error',
                            message: '操作失败'
                        })
                    }
                })
        }
    }
}