“dzb”
2022-09-27 80e0b9da4d4da98452f8930b148750763d85f090
src/views/systemSetting/baseSetting/role/index.vue
@@ -12,7 +12,7 @@
                <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">
                        <createUser :refresh="getUserList" />
                        <createUser :refresh="context==='' ? getUserList : search" />
                    </el-dialog>
                </div>
            </div>
@@ -63,8 +63,8 @@
                <!-- 查看修改页面 -->
                <el-dialog :visible.sync="dialogUpdate" width="45%" :title="updateFlag ? '权限设置' :'查看角色信息'"
                    v-if="dialogUpdate">
                    <updateUser :updateFlag="updateFlag" :userInfo=userInfo :getUserList=getUserList
                        @changeDialog="changeDialog" />
                    <updateUser :updateFlag="updateFlag" :userInfo=userInfo
                        :getUserList=" context ? getUserList : getUserList" @changeDialog="changeDialog" />
                </el-dialog>
                <!-- 分页 -->
                <div class="pagination">
@@ -167,37 +167,26 @@
                    if (res.code === 200) {
                        console.log(res);
                        res.data.list.forEach(item => {
                            item.createTime = helper(item.createTime);
                            // item.createTime = helper(item.createTime);
                            item.status == 1 ? item.status = true : item.status = false;
                        })
                        that.tableData = res.data.list
                        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,
                    url: 'sccg/role/list?keyword=' + context + '&pageNum=' + currentPage + '&pageSize=' + pageSize,
                }).then(res => {
                    if (res.code === 200) {
                        console.log(2, 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.length;
                        this.totalNum = res.data.list.length;
                    }
                })
                //     this.$axios.get('sccg/role/list?'+context).then(res => {
                //     if (res.code === 200) {
                //         console.log(2,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
                //     }
                // })
            }
        },
        // 设置表格斑马纹