“dzb”
2022-10-09 fde4758dd43927cce678d99ffe71e05931616f26
src/views/operate/myWait/index.vue
@@ -30,15 +30,18 @@
                    @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="category" label="问题小类" min-width="10">
                    </el-table-column>
                    <el-table-column prop="typeSecond" label="问题描述" min-width="10">
                    <el-table-column prop="eventSource" label="问题描述" min-width="10">
                    </el-table-column>
                    <el-table-column prop="typeFirst" label="创建时间" min-width="10">
                    <el-table-column prop="createTime" label="创建时间" min-width="10">
                    </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>
@@ -91,6 +94,7 @@
<script>
import updateUser from "./updateUser"
import createUser from "./createUser"
import {computeTime} from '@/utils/helper'
export default {
    components: {
        updateUser,createUser
@@ -213,44 +217,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 +267,10 @@
                    done();
                })
                .catch(_ => { });
        },
        // 计算时间
        getRestTime(time2){
            return computeTime(time2);
        }
    }
}