|
|
@@ -0,0 +1,96 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-table
|
|
|
+ v-loading="listLoading"
|
|
|
+ :data="list"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ >
|
|
|
+ <el-table-column align="center" label="ID" width="95">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.id }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="昵称">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.nickName }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="手机号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.mp }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="邮箱">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.mail }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="性别">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.gender.text }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag>{{ scope.row.state.text }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+
|
|
|
+ <el-table-column label="注册时间">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.registerTime }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="角色">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-for="role in scope.row.listRoles" :key="role.id">{{ role.name }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { findPage } from "@/api/userInfo";
|
|
|
+
|
|
|
+export default {
|
|
|
+ filters: {
|
|
|
+ statusFilter(status) {
|
|
|
+ const statusMap = {
|
|
|
+ published: "success",
|
|
|
+ draft: "gray",
|
|
|
+ deleted: "danger",
|
|
|
+ };
|
|
|
+ return statusMap[status];
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ list: null,
|
|
|
+ listLoading: true,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.fetchData();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ fetchData() {
|
|
|
+ this.listLoading = true;
|
|
|
+ findPage({})
|
|
|
+ .then((response) => {
|
|
|
+ this.list = response.data;
|
|
|
+ })
|
|
|
+ .finally(() => (this.listLoading = false));
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|