wl
2022-10-25 78563aa7a2a3304e872fe35094e6925a64f5b4b2
src/views/operate/myWait/index.vue
@@ -1,7 +1,7 @@
<template>
    <div class="userList">
        <div class="headerTitle">
            运营管理》基础设置》违规事项设置
            运营管理》我的待办
        </div>
        <header>
            <div class="headerContent">
@@ -12,13 +12,6 @@
                        <el-button type="primary" @click="getUserList">查询</el-button>
                    </div>
                </div>
                <!-- <div class="addUser">
                    <el-button class="addBtn" type="primary" @click="dialogCreate = true">新增违规类型</el-button>
                    <el-dialog :visible.sync="dialogCreate" title="新增违规类型" width="45%" v-if="dialogCreate"
                        :before-close="handleClose">
                        <createUser :refresh="getUserList" />
                    </el-dialog>
                </div> -->
            </div>
        </header>
        <main>
@@ -30,17 +23,29 @@
                    @selection-change="tableChange">
                    <el-table-column type="selection" min-width="5">
                    </el-table-column>
                    <el-table-column prop="number" label="事件编号" min-width="10">
                    <el-table-column prop="code" label="事件编号" min-width="10">
                    </el-table-column>
                    <el-table-column prop="typeThird" label="问题小类" min-width="10">
                    <el-table-column prop="eventSource" label="问题来源" min-width="10">
                        <template slot-scope="scope">
                            <span>{{scope.row.eventSource===1 ? '视频巡查': '人工上报'}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="typeSecond" label="问题描述" min-width="10">
                    <el-table-column prop="category" label="问题类别" min-width="10">
                        <template slot-scope="scope">
                            <span>{{scope.row.category===1 ? '违规': '违建'}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="typeFirst" label="创建时间" min-width="10">
                    <el-table-column prop="createTime" label="创建时间" min-width="10">
                        <template slot-scope="scope">
                            <span>{{changeTime(scope.row.createTime)}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="type" label="剩余时间" min-width="10">
                        <template slot-scope="scope">
                            <span>{{getRestTime(scope.row.limitTime)}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="type" label="问题状态" min-width="10">
                    <el-table-column prop="stepName" label="问题状态" min-width="10">
                    </el-table-column>
                    <el-table-column  min-width="10">
                    </el-table-column>
@@ -91,6 +96,8 @@
<script>
import updateUser from "./updateUser"
import createUser from "./createUser"
import {computeTime} from '@/utils/helper'
import filterTime from '@/utils/mydate'
export default {
    components: {
        updateUser,createUser
@@ -213,44 +220,14 @@
            // 获取所有用户信息
            this.$axios({
                method: 'get',
                url: `sccg/violations/query?current=${currentPage}&size=${pageSize}&keyWord=${context}`,
                // ?current=${currentPage},&size=${pageSize}&
                url: `sccg/my_backlog/query?num=${context}`,
            })
                .then(res => {
                    this.tableData = res.data.records;
                    this.totalNum = res.data.total;
                    this.tableData = res.data;
                    this.totalNum = res.data.length;
                })
        },
        // search() {
        //     const that = this;
        //     const { currentPage, pageSize, context } = this;
        //     // 获取所有用户信息
        //     if (context == '') {
        //         this.$axios.get('sccg/role/list?keyword=' + '&pageNum=' + currentPage + '&pageSize=' + pageSize).then(res => {
        //             if (res.code === 200) {
        //                 console.log(res);
        //                 res.data.list.forEach(item => {
        //                     // item.createTime = helper(item.createTime);
        //                     item.status == 1 ? item.status = true : item.status = false;
        //                 })
        //                 that.tableData = res.data.list;
        //                 this.totalNum = res.data.list.length;
        //             }
        //         })
        //     } else {
        //         this.$axios({
        //             method: 'get',
        //             url: 'sccg/role/list?keyword=' + context + '&pageNum=' + currentPage + '&pageSize=' + pageSize,
        //         }).then(res => {
        //             if (res.code === 200) {
        //                 res.data.list.forEach(item => {
        //                     item.status == 1 ? item.status = true : item.status = false;
        //                 })
        //                 that.tableData = res.data.list
        //                 this.totalNum = res.data.list.length;
        //             }
        //         })
        //     }
        // },
        // 设置表格斑马纹
        tableRowClassName({ row, rowIndex }) {
            if ((rowIndex + 1) % 2 == 0) {
@@ -293,6 +270,16 @@
                    done();
                })
                .catch(_ => { });
        },
        // 计算时间
        getRestTime(time2){
            return computeTime(time2);
        },
        // 改变日期格式
        changeTime(time){
            if(time){
                return filterTime(time);
            }
        }
    }
}