wl
2022-12-29 d6fb18b49cd61427a343fbe7a2a4f94e4b597bdc
src/views/operate/management/myIndex/index.vue
@@ -21,68 +21,79 @@
            <div class="mainContent">
                <!-- 数据展示 -->
                <el-table ref="multipleTable"
                    :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}"
                    :header-cell-style="{'font-weight':'650','line-height':'45px'}"
                    :data="tableData" style="width: 100%" :row-class-name="tableRowClassName"
                    @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="code" label="事件编号" min-width="18">
                        <template slot-scope="scope">
                            <el-link @click="JumpView(scope.row)">{{scope.row.code}}</el-link>
                        </template>
                    </el-table-column>
                    <el-table-column prop="eventSource" label="问题来源" min-width="10">
                    <el-table-column prop="eventSource" label="问题来源" min-width="8">
                        <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 :prop="myproblem === 1 ? 'category' :'category'" :label="myproblem===1 ? '大类名称' : '违建类别'" :min-width="myproblem===1?'10':'20'">
                    </el-table-column>
                    <el-table-column prop="type" label="小类名称" min-width="10">
                    <el-table-column :prop="myproblem === 1 ? 'type' :'site'" :label="myproblem===1 ? '小类名称' : '违建地点'" min-width="10">
                    </el-table-column>
                    <el-table-column prop="actionCause" label="案由" min-width="10">
                    <el-table-column :prop="myproblem === 1 ? 'actionCause' :'communityId'" :label="myproblem===1 ? '案由' : '所属社区'" min-width="10">
                    </el-table-column>
                    <el-table-column prop="site" label="报警点位" min-width="10">
                    <el-table-column :prop="myproblem === 1 ? 'site' :''" :label="myproblem===1 ? '报警点位' : '违法建筑长、宽、高'" :min-width="myproblem===1?'10' :'20' ">
                        <template slot-scope="scope">
                            <div v-if="myproblem ===2"><span>{{scope.row.buildingLength+'米'+'、'+ scope.row.buildingWidth+'米'+'、'+scope.row.buildingHigh+'米'}}</span></div>
                            <div v-else>{{scope.row.site}}</div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="streetId" label="所属区域" min-width="10">
                    <el-table-column :prop="myproblem === 1 ? 'street' :'buildingArea'" :label="myproblem===1 ? '所属区域' : '违法建筑面积'" min-width="10">
                    </el-table-column>
                    <el-table-column prop="alarmTime" label="报警时间" min-width="15">
                    <el-table-column prop="alarmTime" label="报警时间" min-width="15" v-if="myproblem===1">
                        <template slot-scope="scope">
                            <span>{{filterTime(scope.row.alarmTime)}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="continueTime" label="持续时间" min-width="10">
                    <el-table-column :prop="myproblem === 1 ? 'continueTime' :'materials'" :label="myproblem===1 ? '持续时间' : '违法建筑材料'" min-width="15">
                    </el-table-column>
                    <el-table-column prop="operation" label="操作" min-width="20">
                    <el-table-column prop="operation" label="操作" min-width="15">
                        <template slot-scope="scope">
                            <div class="btn">
                                <span @click="handleExamine(scope.row)" v-if="instatus===7 ? true : false">审核</span>
                                <!-- <span class="line" v-if="instatus===7 ? true : false">|</span> -->
                                <!-- v-if="instatus===7 ? true : false" -->
                                <span @click="handleExamine(scope.row)" v-if="instatus===7">审核</span>
                                <span @click="handleClosure(scope.row)" v-if="instatus===8">结案</span>
                                <span class="line" v-if="instatus !==9">|</span>
                                <span @click="JumpView(scope.row)">查看</span>
                            </div>
                        </template>
                    </el-table-column>
                </el-table>
                <!-- 审核页面 -->
                <el-dialog :visible.sync="dialogExamine" width="80%" title="基础信息(人工)" v-if="dialogExamine"
                <el-dialog :visible.sync="dialogExamine" width="60%" title="基础信息(人工)" v-if="dialogExamine"
                    :before-close="handleClose">
                    <MyExamine :info="info" @closeDialog="closeDialog"></MyExamine>
                    <MyExamine :info="info" v-if="myproblem === 1" @closeDialog="closeDialog"></MyExamine>
                    <MyIllExamine :info="info" v-else  @closeDialog="closeDialog"></MyIllExamine>
                </el-dialog>
                <!-- 结案页面 -->
                <el-dialog :visible.sync="dialogClosure" width="80%" title="基础信息(人工)" v-if="dialogClosure"
                <el-dialog :visible.sync="dialogClosure" width="60%" title="基础信息(人工)" v-if="dialogClosure"
                    :before-close="handleClose">
                    <MyClosure :info="info" @closeDialog="closeDialog"></MyClosure>
                    <MyClosure :info="info" v-if="myproblem === 1" @closeDialog="closeDialog"></MyClosure>
                    <MyIllClosure :info="info" v-else @closeDialog="closeDialog"></MyIllClosure>
                </el-dialog>
                <!-- 详情页面 -->
                <el-dialog :visible.sync="dialogView" width="80%" title="基础信息(人工)" v-if="dialogView"
                    :before-close="handleClose">
                    <MyDetail :info=info v-if="myproblem==1 ? true:false"></MyDetail>
                    <MyIllDetail :info=info v-else></MyIllDetail>
                <el-dialog :visible.sync="dialogView" width="60%" title="基础信息(人工)" v-if="dialogView"
                    :before-close="handleNoClose">
                    <MyDetail :info=info v-if="myproblem === 1" :mycode = 'code'></MyDetail>
                    <MyIllDetail :info=info v-else :mycode="code"></MyIllDetail>
                </el-dialog>
                <!-- tools -->
                <div class="tools">
                <!-- <div class="tools">
                    <div class="funs">
                        <div class="funsItem">
                        <div class="funsItem funs-sp">
                            <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox>
                        </div>
                        <div class="funsItem">
                        <div class="funsItem funs-sp">
                            <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox>
                        </div>
                        <div class="funsItem">
@@ -99,7 +110,7 @@
                            @prev-click="handlePrev" @next-click="handleNext">
                        </el-pagination>
                    </div>
                </div>
                </div> -->
            </div>
        </main>
    </div>
@@ -107,12 +118,14 @@
<script>
import MyExamine from './components/examine'
import MyClosure from './components/closure'
import MyIllExamine from './components/illExamine'
import MyIllClosure from './components/illclosure'
import MyDetail from '@/components/detail'
import MyIllDetail from '@/components/illdetail'
import helper from '@/utils/mydate'
export default {
    components: {
        MyExamine,MyClosure,MyDetail,MyIllDetail
        MyExamine,MyClosure,MyDetail,MyIllDetail,MyIllExamine,MyIllClosure
    },
    data() {
        return {
@@ -163,6 +176,7 @@
            caseId: '',
            myproblem: 1,
            instatus: 7,
            code:''
        }
    },
    created() {
@@ -171,7 +185,6 @@
    methods: {
        // 批量删除
        mulDelete(idArr) {
            console.log(idArr);
            this.$axios({
                method: 'delete',
                url: 'sccg/violations/batch_delete?ids=' + idArr,
@@ -185,7 +198,6 @@
        },
        // 执行下拉框操作
        selectChange(list) {
            console.log(this.tempList);
            if (this.tempList.length !== 0) {
                if (list === 3) {
                    this.preMyIdx = list;
@@ -205,11 +217,7 @@
            list.forEach(item => {
                this.tempList.push(item.code);
            })
            if (list.length === this.tableData.length) {
                this.all = true;
            } else {
                this.all = false
            }
            this.all = list.length === this.tableData.length;
        },
        // 全选
        selectAll() {
@@ -223,16 +231,13 @@
        },
        // 删除单条数据
        handleDelete({ number }) {
            console.log(number);
            this.$confirm('确认删除?')
                .then(_ => {
                    console.log(1);
                    this.$axios({
                        method: 'delete',
                        url: `sccg/violations/delete?id=${number}`,
                    })
                        .then(res => {
                            console.log(res);
                            this.$message({
                                type: res.code === 200 ? 'success' : 'warning',
                                message: res.message
@@ -241,14 +246,14 @@
                            this.getUserList();
                        })
                })
                .catch(_ => { console.log(2) });
                .catch(_ => {  });
        },
        // 获取用户列表
        getUserList() {
            const { currentPage, pageSize, instatus, myproblem } = this;
            this.$axios({
                method: 'get',
                url: `sccg/base_case/query?state=${instatus}&current=${currentPage}&size=${pageSize}&resource=2&type=${myproblem}`
                url: `sccg/base_case/query?state=${instatus}&current=${currentPage}&size=${pageSize}&type=${myproblem}`
            }).then(res => {
                this.totalNum = res.data.total;
                this.tableData = res.data.records;
@@ -256,12 +261,11 @@
        },
        // 设置表格斑马纹
        tableRowClassName({ row, rowIndex }) {
            if ((rowIndex + 1) % 2 == 0) {
            if ((rowIndex + 1) % 2 === 0) {
                return 'warning-row';
            } else {
                return 'success-row';
            }
            return '';
        },
        // 当前页改变触发事件
        changeCurrentPage(page) {
@@ -286,7 +290,11 @@
                })
                .catch(_ => { });
        },
        handleNoClose(done) {
            done();
        },
        async JumpView(data) {
            this.code = data.code
            await this.getEventInfo(data.code);
        },
        // 获取案件信息
@@ -296,7 +304,6 @@
                url: `sccg/base_case/baseCaseDetail/${code}`
            })
                .then(res => {
                    console.log(res);
                    this.info = res.data;
                    this.dialogView = true;
                })
@@ -308,7 +315,6 @@
                url: `sccg/base_case/baseCaseDetail/${code}`
            })
                .then(res => {
                    console.log(res);
                    this.info = res.data;
                    this.dialogExamine = true;
                })
@@ -320,7 +326,6 @@
                url: `sccg/base_case/baseCaseDetail/${code}`
            })
                .then(res => {
                    console.log(res);
                    this.info = res.data;
                    this.dialogClosure = true;
                })
@@ -360,7 +365,7 @@
    color: #4b9bb7;
    header {
        background-color: #09152f;
        // background-color: #09152f;
        padding: 10px 20px;
        .problem,
@@ -377,15 +382,14 @@
    }
    &::v-deep .el-input__inner {
        background-color: #09152f;
        // background-color: #09152f;
        border: 1px solid #17324c;
    }
    main {
        background-color: #09152f;
        // background-color: #09152f;
        margin-top: 20px;
        padding-bottom: 50px;
        border: 1pox solid #fff;
        .btn span:hover{
            cursor: pointer;
        }
@@ -397,12 +401,13 @@
            .funs {
                display: flex;
                .funs-sp{
                    border: 1px solid #17324c;
                }
                .funsItem {
                    line-height: 28px;
                    display: flex;
                    align-items: center;
                    border: 1px solid #17324c;
                    border-radius: 4px;
                    font-size: 12px;
                    margin-left: 10px;
@@ -418,7 +423,7 @@
                    &::v-deep .el-input__inner {
                        border: none;
                        background-color: #09152f;
                        // background-color: #09152f;
                    }
                    &:hover {
@@ -456,18 +461,21 @@
        }
        .el-table {
            color: #4b9bb7;
            font-size: 10px;
            // color: #4b9bb7;
            // font-size: 10px;
            &::v-deep .cell {
                text-overflow: ellipsis;
                white-space: nowrap;
                overflow: hidden;
                .el-checkbox {
                    display: none;
                }
            }
            &::v-deep .el-table__empty-block {
                background-color: #09152f;
            }
            // &::v-deep .el-table__empty-block {
            //     background-color: #09152f;
            // }
            &::v-deep .el-table__empty-block {
                color: #4b9bb7;
@@ -486,9 +494,9 @@
            }
        }
        .el-table::v-deep .warning-row {
            background: #06122c;
        }
        // .el-table::v-deep .warning-row {
            // background: #06122c;
        // }
        .el-table::v-deep .success-row {
            background: #071f39;
@@ -529,9 +537,9 @@
    }
    &::v-deep .el-dialog__header,
    &::v-deep .el-dialog__body {
        background-color: #06122c;
    }
    // &::v-deep .el-dialog__body {
    //     background-color: #06122c;
    // }
    &::v-deep .el-dialog__header {
        display: flex;