|
@@ -3,37 +3,46 @@
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24" class="padding20">
|
|
<el-col :span="24" class="padding20">
|
|
<el-form :inline="true" :model="searchForm" class="demo-form-inline" size="small">
|
|
<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 label="真实姓名">
|
|
|
|
+ <el-input v-model="searchForm.realName" placeholder="请输入真实姓名"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="primary">查询</el-button>
|
|
|
|
- <el-button>重置</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="handleQuery">查询</el-button>
|
|
|
|
+ <el-button @click="handleReset">重置</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24" class="padding20">
|
|
<el-col :span="24" class="padding20">
|
|
- <el-table :data="tableData" border stripe style="width: 100%" size="small" max-height="700">
|
|
|
|
- <el-table-column prop="name" label="用户昵称"></el-table-column>
|
|
|
|
- <el-table-column prop="phone" 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="操作">
|
|
|
|
|
|
+ <el-table :data="tableData" border stripe style="width: 100%" size="small" max-height="700" v-loading="loading" element-loading-text="加载中" element-loading-spinner="el-icon-loading">
|
|
|
|
+ <el-table-column type="index" align="center" label="序号"></el-table-column>
|
|
|
|
+ <el-table-column prop="workerId" label="工作人员ID" align="center"></el-table-column>
|
|
|
|
+ <el-table-column prop="workerName" label="工作人员姓名" align="center"></el-table-column>
|
|
|
|
+ <el-table-column prop="status" label="状态" align="center">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.status" style="color:#45A6B5">启用</span>
|
|
|
|
+ <span v-else style="color:#F56C6C">禁用</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="headImg" align="center" label="头像">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-avatar :size="40" :src="scope.row.headImg">
|
|
|
|
+ <img src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"/>
|
|
|
|
+ </el-avatar>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="addTime" label="注册时间" align="center"></el-table-column>
|
|
|
|
+ <el-table-column prop="isBindWechat" label="是否绑定微信" align="center">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.isBindWechat" style="color:#45A6B5">是</span>
|
|
|
|
+ <span v-else style="color:#F56C6C">否</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <!-- <el-table-column prop="admin" label="是否为管理员" align="center"></el-table-column> -->
|
|
|
|
+ <el-table-column label="操作" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" size="small" @click="handleCancelAdmin(scope.row)">取消管理员</el-button>
|
|
|
|
|
|
+ <!-- <el-button type="text" size="small" @click="handleCancelAdmin(scope.row)">取消管理员</el-button> -->
|
|
<el-button type="text" size="small" @click="handleServeRecord(scope.row)">服务记录</el-button>
|
|
<el-button type="text" size="small" @click="handleServeRecord(scope.row)">服务记录</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -43,13 +52,11 @@
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24" class="padding20 flexend" >
|
|
<el-col :span="24" class="padding20 flexend" >
|
|
<el-pagination
|
|
<el-pagination
|
|
- @size-change="handleSizeChange"
|
|
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
:current-page="currentPage"
|
|
:current-page="currentPage"
|
|
- :page-sizes="[100, 200, 300, 400]"
|
|
|
|
- :page-size="100"
|
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
- :total="400"
|
|
|
|
|
|
+ :page-size="pageSize"
|
|
|
|
+ layout="total, prev, pager, next"
|
|
|
|
+ :total="total"
|
|
size="small"
|
|
size="small"
|
|
>
|
|
>
|
|
</el-pagination>
|
|
</el-pagination>
|
|
@@ -59,37 +66,50 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { getWorkerList } from '@/request/request'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
loading: false,
|
|
loading: false,
|
|
searchForm: {
|
|
searchForm: {
|
|
- phone: '',
|
|
|
|
- user: '',
|
|
|
|
- admin: ''
|
|
|
|
|
|
+ realName: ''
|
|
},
|
|
},
|
|
- tableData: [
|
|
|
|
- {
|
|
|
|
- name: '范一岚',
|
|
|
|
- phone: '18626576880',
|
|
|
|
- time: '1995-12-27',
|
|
|
|
- times: 100,
|
|
|
|
- count: 227,
|
|
|
|
- admin: '是'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- currentPage: 1
|
|
|
|
|
|
+ tableData: [],
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ pageSize: 20,
|
|
|
|
+ total: 0
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- console.log('query mounted');
|
|
|
|
|
|
+ this.handleQuery()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- handleSizeChange () {
|
|
|
|
-
|
|
|
|
|
|
+ handleReset () {
|
|
|
|
+ this.searchForm.realName = ''
|
|
|
|
+ },
|
|
|
|
+ handleQuery () {
|
|
|
|
+ this.currentPage = 1
|
|
|
|
+ this.getWorkerListFn()
|
|
|
|
+ },
|
|
|
|
+ getWorkerListFn () {
|
|
|
|
+ let data = {
|
|
|
|
+ currentPage: this.currentPage,
|
|
|
|
+ realName: this.searchForm.realName
|
|
|
|
+ }
|
|
|
|
+ this.loading = true
|
|
|
|
+ getWorkerList(data).then(res => {
|
|
|
|
+ this.loading = false
|
|
|
|
+ this.total = res.data.total
|
|
|
|
+ this.pageSize = res.data.pageSize
|
|
|
|
+ this.tableData = res.data.vos || []
|
|
|
|
+ }).catch(e => {
|
|
|
|
+ console.log(e)
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- handleCurrentChange () {
|
|
|
|
-
|
|
|
|
|
|
+ handleCurrentChange (currentPage) {
|
|
|
|
+ this.currentPage = currentPage
|
|
|
|
+ this.getWorkerListFn()
|
|
},
|
|
},
|
|
handleCancelAdmin () {
|
|
handleCancelAdmin () {
|
|
this.$confirm('确定取消管理员吗?').then( _=> {
|
|
this.$confirm('确定取消管理员吗?').then( _=> {
|
|
@@ -98,6 +118,8 @@ export default {
|
|
},
|
|
},
|
|
handleServeRecord (row) {
|
|
handleServeRecord (row) {
|
|
this.$store.commit('setUserModulesView', 1)
|
|
this.$store.commit('setUserModulesView', 1)
|
|
|
|
+ this.$store.commit('setWorkerId', row.workerId)
|
|
|
|
+ sessionStorage.setItem("workerName", row.workerName)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|