用户列表
parent
51d4f4439c
commit
3adbe087cd
File diff suppressed because it is too large
Load Diff
|
@ -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
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -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'),
|
||||
|
|
Loading…
Reference in New Issue