|
@@ -1,88 +1,39 @@
|
|
|
<template>
|
|
|
- <div class="user-page" v-loading="loading" element-loading-text="加载中" element-loading-spinner="el-icon-loading">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" class="padding20">
|
|
|
- <el-form :inline="true" :model="searchForm" class="demo-form-inline" size="small">
|
|
|
- <el-form-item label="用户昵称">
|
|
|
- <el-input v-model="searchForm.user" placeholder="模糊搜索"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="手机号">
|
|
|
- <el-input v-model="searchForm.phone" placeholder="精确搜索"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="管理员">
|
|
|
- <el-select v-model="searchForm.admin" placeholder="请选择">
|
|
|
- <el-option label="是" value="1"></el-option>
|
|
|
- <el-option label="否" value="0"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary">查询</el-button>
|
|
|
- <el-button>重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" class="padding20">
|
|
|
- <el-table :data="tableData" border stripe style="width: 100%" size="small" height="700">
|
|
|
- <el-table-column prop="date" label="用户昵称"></el-table-column>
|
|
|
- <el-table-column prop="name" label="用户手机号"></el-table-column>
|
|
|
- <el-table-column prop="time" label="创建时间"></el-table-column>
|
|
|
- <el-table-column prop="times" label="用户建档次数"></el-table-column>
|
|
|
- <el-table-column prop="count" label="检测次数"></el-table-column>
|
|
|
- <el-table-column prop="admin" label="是否为管理员"></el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" size="small">取消管理员</el-button>
|
|
|
- <el-button type="text" size="small">服务记录</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" class="padding20 flexend" >
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-sizes="[100, 200, 300, 400]"
|
|
|
- :page-size="100"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="400"
|
|
|
- size="small"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <div class="user-page">
|
|
|
+ <transition name="el-fade-in-linear">
|
|
|
+ <Query v-show="userModulesView == 0"></Query>
|
|
|
+ </transition>
|
|
|
+ <transition name="el-fade-in-linear">
|
|
|
+ <Record v-show="userModulesView == 1"></Record>
|
|
|
+ </transition>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import Query from './query'
|
|
|
+import Record from './recoed'
|
|
|
+import { mapState } from 'vuex'
|
|
|
export default {
|
|
|
name: 'user',
|
|
|
data() {
|
|
|
return {
|
|
|
- loading: false,
|
|
|
- searchForm: {
|
|
|
- phone: '',
|
|
|
- user: '',
|
|
|
- admin: ''
|
|
|
- },
|
|
|
- tableData: [],
|
|
|
- currentPage: 1
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState({
|
|
|
+ userModulesView: s => s.userModulesView
|
|
|
+ })
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ Query,
|
|
|
+ Record
|
|
|
+ },
|
|
|
mounted() {
|
|
|
-
|
|
|
+ console.log('user mounted', this.userModulesView, this.$store);
|
|
|
},
|
|
|
methods: {
|
|
|
- handleSizeChange () {
|
|
|
-
|
|
|
- },
|
|
|
- handleCurrentChange () {
|
|
|
-
|
|
|
- }
|
|
|
+
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -91,12 +42,5 @@ export default {
|
|
|
.user-page {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- .padding20 {
|
|
|
- padding: 20px;
|
|
|
- }
|
|
|
- .flexend {
|
|
|
- display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
- }
|
|
|
}
|
|
|
</style>
|