|
@@ -1,27 +1,9 @@
|
|
|
<template>
|
|
|
- <div id="auditList">
|
|
|
+ <div id="userlist">
|
|
|
<el-row>
|
|
|
- <el-col :span="24" class="info">
|
|
|
- <!-- <el-col :span="24" class="newuser"><van-button type="info" size="small" @click="usersubmit()">新建用户</van-button> </el-col> -->
|
|
|
- <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
- <p class="textOver">
|
|
|
- <span class="textOver">{{ item.name }}</span>
|
|
|
- <span style="float:right"> <van-button type="danger" size="small" @click="toDelete(item)">删除</van-button></span>
|
|
|
- <span style="float:right"
|
|
|
- ><van-button type="info" size="small" @click="submit(item)">{{
|
|
|
- item.status == '0' ? '审核' : item.status == '1' ? '查看' : '未识别'
|
|
|
- }}</van-button>
|
|
|
- </span>
|
|
|
- </p>
|
|
|
- <p>
|
|
|
- <span class="ptwo"><span>电话:</span>{{ item.phone || '暂无' }}</span>
|
|
|
- <span class="ptwo">
|
|
|
- <span>用户类型:</span>{{ item.role == '2' ? '个人用户' : item.role == '3' ? '企业用户' : item.role == '6' ? '专家用户' : '临时用户' }}</span
|
|
|
- >
|
|
|
- </p>
|
|
|
- <p class="newptwo">
|
|
|
- <span>状态:</span>{{ item.status == '0' ? '待审核' : item.status == '1' ? '审核成功' : item.status == '2' ? '审核拒绝' : '待认证' }}
|
|
|
- </p>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-col :span="24" v-for="(item, index) in list" :key="index">
|
|
|
+ <p>{{ item.name }}</p>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -30,53 +12,17 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: exportuser } = createNamespacedHelpers('exportuser');
|
|
|
-const { mapActions: user } = createNamespacedHelpers('user');
|
|
|
export default {
|
|
|
- name: 'auditList',
|
|
|
- props: {},
|
|
|
+ name: 'userlist',
|
|
|
+ props: {
|
|
|
+ list: { type: Array },
|
|
|
+ },
|
|
|
components: {},
|
|
|
data: function() {
|
|
|
- return {
|
|
|
- list: [],
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.search();
|
|
|
- },
|
|
|
- methods: {
|
|
|
- ...user(['query', 'delete', 'update']),
|
|
|
- ...exportuser({ exportuserQuery: 'query' }),
|
|
|
- async search() {
|
|
|
- if (this.user.code == 'JLCJGLY') {
|
|
|
- const res = await this.query({ limit: '1000' });
|
|
|
- const resTwo = await this.exportuserQuery({ limit: '1000' });
|
|
|
- var newData = res.data.concat(resTwo.data);
|
|
|
- if (this.$checkRes(newData)) {
|
|
|
- var arr = newData.filter(item => item.pid == undefined && item.status != '3');
|
|
|
- this.$set(this, `list`, arr);
|
|
|
- }
|
|
|
- } else {
|
|
|
- const res = await this.query({ limit: '1000', code: this.user.code });
|
|
|
- const resTwo = await this.exportuserQuery({ limit: '1000', code: this.user.code });
|
|
|
- var newData = res.data.concat(resTwo.data);
|
|
|
- if (this.$checkRes(newData)) {
|
|
|
- var arr = newData.filter(item => item.pid == undefined && item.status != '3');
|
|
|
- this.$set(this, `list`, arr);
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- async submit(item) {
|
|
|
- this.$router.push({ path: './detail', query: { id: item.id, role: item.role } });
|
|
|
- },
|
|
|
- usersubmit() {
|
|
|
- this.$router.push({ path: './detail' });
|
|
|
- },
|
|
|
- async toDelete(item) {
|
|
|
- const res = await this.delete(item.id);
|
|
|
- if (this.$checkRes(res, '删除成功', res.errmsg || '删除失败')) this.search();
|
|
|
- },
|
|
|
+ return {};
|
|
|
},
|
|
|
+ created() {},
|
|
|
+ methods: {},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
pageTitle() {
|
|
@@ -89,54 +35,4 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped>
|
|
|
-.newuser {
|
|
|
- text-align: center;
|
|
|
- padding: 10px 0 10px 10px;
|
|
|
-}
|
|
|
-.info {
|
|
|
- border-top: 1px solid #f5f5f5;
|
|
|
- .list {
|
|
|
- background: #fff;
|
|
|
- padding: 0 10px;
|
|
|
- border-bottom: 1px solid #ccc;
|
|
|
- p {
|
|
|
- font-size: 14px;
|
|
|
- color: #000;
|
|
|
- padding: 5px 0;
|
|
|
- }
|
|
|
- p:first-child {
|
|
|
- font-size: 16px;
|
|
|
- span:first-child {
|
|
|
- width: 60%;
|
|
|
- display: inline-block;
|
|
|
- }
|
|
|
- }
|
|
|
- p:nth-child(2) .ptwo {
|
|
|
- display: inline-block;
|
|
|
- width: 50%;
|
|
|
- }
|
|
|
- p:nth-child(2) .ptwo span:first-child {
|
|
|
- color: #ccc;
|
|
|
- }
|
|
|
- p:last-child span {
|
|
|
- color: #ccc;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-.content {
|
|
|
- padding: 16px 16px 160px;
|
|
|
- height: 160px;
|
|
|
- background-color: aqua;
|
|
|
-}
|
|
|
-.newptwo {
|
|
|
- color: #ccc !important;
|
|
|
-}
|
|
|
-/deep/.van-button--small {
|
|
|
- min-width: 60px;
|
|
|
- height: 30px;
|
|
|
- padding: 0 8px;
|
|
|
- font-size: 12px;
|
|
|
- margin: 0 5px 0 0;
|
|
|
-}
|
|
|
-</style>
|
|
|
+<style lang="less" scoped></style>
|