用户列表

pull/269/head
volleyball26 2021-01-21 15:04:07 +08:00
parent 51d4f4439c
commit 3adbe087cd
5 changed files with 24421 additions and 27 deletions

24401
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -25,4 +25,4 @@
"@vue/cli-service": "^3.9.0",
"vue-template-compiler": "^2.6.10"
}
}
}

View File

@ -2,7 +2,7 @@ import request from '../utils/request';
export const fetchData = query => {
return request({
url: './table.json',
url: 'http://127.0.0.1:8000/userlist',
method: 'get',
params: query
});

View File

@ -15,9 +15,9 @@
class="handle-del mr10"
@click="delAllSelection"
>批量删除</el-button>
<el-select v-model="query.address" placeholder="地址" class="handle-select mr10">
<el-option key="1" label="广东省" value="广东省"></el-option>
<el-option key="2" label="湖南省" value="湖南省"></el-option>
<el-select v-model="query.department" placeholder="部门" class="handle-select mr10">
<el-option key="1" label="计科" value="计科"></el-option>
<el-option key="2" label="物联网" value="物联网"></el-option>
</el-select>
<el-input v-model="query.name" placeholder="用户名" class="handle-input mr10"></el-input>
<el-button type="primary" icon="el-icon-search" @click="handleSearch"></el-button>
@ -32,29 +32,22 @@
>
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="name" label="用户名"></el-table-column>
<el-table-column label="账户余额">
<template slot-scope="scope">{{scope.row.money}}</template>
<el-table-column prop="uuid" label="用户uuid"></el-table-column>
<el-table-column label="用户名">
<template slot-scope="scope">{{scope.row.name}}</template>
</el-table-column>
<el-table-column label="头像(查看大图)" align="center">
<template slot-scope="scope">
<el-image
class="table-td-thumb"
:src="scope.row.thumb"
:preview-src-list="[scope.row.thumb]"
:src="scope.row.avatar"
:preview-src-list="[scope.row.avatar]"
></el-image>
</template>
</el-table-column>
<el-table-column prop="address" label="地址"></el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<el-tag
:type="scope.row.state==='成功'?'success':(scope.row.state==='失败'?'danger':'')"
>{{scope.row.state}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="department" label="部门"></el-table-column>
<el-table-column prop="date" label="注册时间"></el-table-column>
<el-table-column prop="build_time" label="注册时间"></el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button
@ -89,8 +82,8 @@
<el-form-item label="用户名">
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item label="地址">
<el-input v-model="form.address"></el-input>
<el-form-item label="部门">
<el-input v-model="form.department"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -131,7 +124,7 @@ export default {
getData() {
fetchData(this.query).then(res => {
console.log(res);
this.tableData = res.list;
this.tableData = res;
this.pageTotal = res.pageTotal || 50;
});
},

View File

@ -19,16 +19,16 @@ export default new Router({
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
meta: { title: '系统首页' }
},
{
path: '/table',
component: () => import(/* webpackChunkName: "table" */ '../components/page/BaseTable.vue'),
meta: { title: '用户列表' }
},
{
path: '/icon',
component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
meta: { title: '自定义图标' }
},
{
path: '/table',
component: () => import(/* webpackChunkName: "table" */ '../components/page/BaseTable.vue'),
meta: { title: '基础表格' }
},
{
path: '/tabs',
component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),