|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="manage-root organize-manage">
|
|
|
+ <div class="manage-root organize-manage person-list">
|
|
|
<Header />
|
|
|
<div class="manage-root-contain">
|
|
|
<nav-menu class="manage-root-contain-left" :activeMenuIndex="activeMenuIndex"></nav-menu>
|
|
@@ -75,6 +75,7 @@
|
|
|
class="search-table"
|
|
|
:data="tableData"
|
|
|
style="width: 100%"
|
|
|
+ key="table"
|
|
|
:max-height="tableHeight"
|
|
|
@selection-change="handleSelectionChange">
|
|
|
<el-table-column
|
|
@@ -88,29 +89,26 @@
|
|
|
min-width="132"
|
|
|
class-name="user-info">
|
|
|
<template slot-scope="scope">
|
|
|
- <img class="touxiang" :src="scope.row.img?scope.row.img:require('../../assets/avatar.png')" />
|
|
|
- <span class="name">{{scope.row.userName}}</span>
|
|
|
+ <img class="touxiang" :src="scope.row.image_url?scope.row.image_url:require('../../assets/avatar.png')" />
|
|
|
+ <span class="name">{{scope.row.user_name}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="realName"
|
|
|
+ prop="real_name"
|
|
|
label="真实姓名"
|
|
|
width="103">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="sex"
|
|
|
+ prop="sex_name"
|
|
|
label="性别"
|
|
|
width="56">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{scope.row.sex==='0'?'男':scope.row.sex==='1'?'女':'未知'}}
|
|
|
- </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="type"
|
|
|
label="权限"
|
|
|
width="88" >
|
|
|
<template slot-scope="scope">
|
|
|
- {{formatterType(scope.row)}}
|
|
|
+ {{scope.row.is_manager==='true'?'管理员':'普通用户'}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -126,7 +124,7 @@
|
|
|
width="160">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="data"
|
|
|
+ prop="register_time"
|
|
|
label="注册时间"
|
|
|
sortable
|
|
|
width="144">
|
|
@@ -159,7 +157,7 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
class="primary-btn"
|
|
|
- v-if="scope.row.status==='0'&&scope.row.type!=='0'">
|
|
|
+ v-if="scope.row.status===0">
|
|
|
开启
|
|
|
</el-button>
|
|
|
<el-button
|
|
@@ -167,14 +165,15 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
class="red-btn"
|
|
|
- v-else-if="scope.row.status==='1'&&scope.row.type!=='0'">
|
|
|
+ v-else-if="scope.row.status===1">
|
|
|
停用
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@click.native.prevent="handleDelete(scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- class="red-btn">
|
|
|
+ class="red-btn"
|
|
|
+ v-if="scope.row.status===0">
|
|
|
删除
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -197,6 +196,7 @@
|
|
|
:data="tableData"
|
|
|
style="width: 100%"
|
|
|
:max-height="tableHeight"
|
|
|
+ key="auditTable"
|
|
|
@selection-change="handleSelectionChange">
|
|
|
<el-table-column
|
|
|
type="selection"
|
|
@@ -209,22 +209,19 @@
|
|
|
min-width="132"
|
|
|
class-name="user-info">
|
|
|
<template slot-scope="scope">
|
|
|
- <img class="touxiang" :src="scope.row.img?scope.row.img:require('../../assets/avatar.png')" />
|
|
|
- <span class="name">{{scope.row.userName}}</span>
|
|
|
+ <img class="touxiang" :src="scope.row.image_url?scope.row.image_url:require('../../assets/avatar.png')" />
|
|
|
+ <span class="name">{{scope.row.user_name}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="realName"
|
|
|
+ prop="real_name"
|
|
|
label="真实姓名"
|
|
|
width="103">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="sex"
|
|
|
+ prop="sex_name"
|
|
|
label="性别"
|
|
|
width="56">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{scope.row.sex==='0'?'男':scope.row.sex==='1'?'女':'未知'}}
|
|
|
- </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="email"
|
|
@@ -239,16 +236,19 @@
|
|
|
width="160">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="data"
|
|
|
+ prop="apply_time"
|
|
|
label="申请时间"
|
|
|
sortable
|
|
|
width="144">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="data"
|
|
|
+ prop="audit_time"
|
|
|
label="审核时间"
|
|
|
sortable
|
|
|
width="144">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.audit_time?scope.row.audit_time:'-'}}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="status"
|
|
@@ -256,8 +256,8 @@
|
|
|
width="116" >
|
|
|
<template slot-scope="scope">
|
|
|
<div class="status-box">
|
|
|
- <span :style="{background:statusList[scope.row.status].bg}"></span>
|
|
|
- <b :style="{color:statusList[scope.row.status].color}">{{statusList[scope.row.status].text}}</b>
|
|
|
+ <span :style="{background:auditStatusList[scope.row.audit_status].bg}"></span>
|
|
|
+ <b :style="{color:auditStatusList[scope.row.audit_status].color}">{{auditStatusList[scope.row.audit_status].text}}</b>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -274,18 +274,18 @@
|
|
|
查看
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
+ @click.native.prevent="handleAudit(scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
class="primary-btn">
|
|
|
同意
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- @click.native.prevent="handleDelete(scope.row)"
|
|
|
+ @click.native.prevent="handleAudit(scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
class="red-btn"
|
|
|
- v-if="scope.row.type==='0'">
|
|
|
+ v-if="scope.row.audit_status===0">
|
|
|
拒绝
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -359,6 +359,14 @@ export default {
|
|
|
{
|
|
|
account_type:-1,
|
|
|
account_type_name:'全部'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ account_type:1,
|
|
|
+ account_type_name:'管理员'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ account_type:0,
|
|
|
+ account_type_name:'普通用户'
|
|
|
}
|
|
|
],
|
|
|
searchAuditStatusList:[
|
|
@@ -584,8 +592,8 @@ export default {
|
|
|
role_type:this.searchType,
|
|
|
status:this.tabsIndex===0?this.searchStatus:-1,
|
|
|
audit_status:this.tabsIndex===1?this.searchAuditStatus:-1,
|
|
|
- page_capacity:this.pageSize,
|
|
|
- cur_page:this.pageNumber,
|
|
|
+ page_capacity:this.tabsIndex===0?this.pageSize:this.pageSizes,
|
|
|
+ cur_page:this.tabsIndex===0?this.pageNumber:this.pageNumbers,
|
|
|
list_type: this.tabsIndex*1
|
|
|
}
|
|
|
getLogin(MethodName, data)
|
|
@@ -599,21 +607,6 @@ export default {
|
|
|
this.loading = false
|
|
|
});
|
|
|
},
|
|
|
- // 处理账户类型
|
|
|
- formatterType(row){
|
|
|
- let typeCn = ''
|
|
|
- let list = this.typeList
|
|
|
- if(row.type){
|
|
|
- for(let i=0;i<list.length;i++){
|
|
|
- if(row.type===list[i].value){
|
|
|
- typeCn = list[i].label
|
|
|
- }
|
|
|
- }
|
|
|
- }else{
|
|
|
- typeCn = '未知'
|
|
|
- }
|
|
|
- return typeCn
|
|
|
- },
|
|
|
// 创建机构或者编辑信息
|
|
|
handleEdit(row){
|
|
|
// 根据登录用户判断当前用户是不是超管 在table里加上disabled
|
|
@@ -633,24 +626,38 @@ export default {
|
|
|
|
|
|
},
|
|
|
// 停用 启用
|
|
|
- handleUp(row, index) {
|
|
|
- let Mname = "book-book_manager-SetPublishStatusForBook";
|
|
|
- let updataData = JSON.parse(JSON.stringify(row));
|
|
|
+ handleUp(row) {
|
|
|
+ let Mname = "/OrgServer/Manager/PersonManager/EnablePerson";
|
|
|
+ let data = {
|
|
|
+ id_list: [row.id]
|
|
|
+ };
|
|
|
+ if (row.status === 0) {
|
|
|
+ // 下架状态
|
|
|
+ data.is_enable = "true";
|
|
|
+ } else if (row.status === 1) {
|
|
|
+ data.is_enable = "false";
|
|
|
+ }
|
|
|
+ getLogin(Mname, data).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getList()
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 通过 拒绝
|
|
|
+ handleAudit(row) {
|
|
|
+ let Mname = "/OrgServer/Manager/PersonManager/AuditPerson";
|
|
|
let data = {
|
|
|
- book_id: row.id
|
|
|
+ id_list: [row.id]
|
|
|
};
|
|
|
- if (row.publish_status == 0) {
|
|
|
+ if (row.audit_status === 2) {
|
|
|
// 下架状态
|
|
|
- data.publish_status = 1;
|
|
|
- updataData.publish_status = 1;
|
|
|
- } else if (row.publish_status == 1) {
|
|
|
- data.publish_status = 0;
|
|
|
- updataData.publish_status = 0;
|
|
|
+ data.is_pass = "true";
|
|
|
+ } else if (row.audit_status === 0) {
|
|
|
+ data.is_pass = "false";
|
|
|
}
|
|
|
- // getContent(Mname, data).then(res => {
|
|
|
- // this.$message.success("操作成功");
|
|
|
- // this.$set(this.tableData, index, updataData);
|
|
|
- // });
|
|
|
+ getLogin(Mname, data).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getList()
|
|
|
+ });
|
|
|
},
|
|
|
handleSizeChange(val,type,page) {
|
|
|
this[type] = val
|
|
@@ -691,6 +698,7 @@ export default {
|
|
|
},
|
|
|
// 复选框
|
|
|
handleSelectionChange(val) {
|
|
|
+ console.log(val)
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
handleChangeTabs(value){
|
|
@@ -742,25 +750,11 @@ export default {
|
|
|
|
|
|
});
|
|
|
},
|
|
|
- // 权限列表
|
|
|
- getUserAccountTypeList(){
|
|
|
- let MethodName = "/OrgServer/DictManager/GetSysUserAccountTypeList";
|
|
|
- getLogin(MethodName, {})
|
|
|
- .then((res) => {
|
|
|
- if(res.status===1){
|
|
|
- this.typeList = this.typeList.concat(res.account_type_list)
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.loading = false
|
|
|
- });
|
|
|
- }
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
this.getList()
|
|
|
this.getTableHeight();
|
|
|
- this.getUserAccountTypeList()
|
|
|
if(this.id){
|
|
|
this.getInfo()
|
|
|
}else{
|
|
@@ -807,18 +801,7 @@ export default {
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
/* @import url(); 引入css类 */
|
|
|
-.user-info{
|
|
|
- .cell{
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- .touxiang{
|
|
|
- width: 24px;
|
|
|
- height: 24px;
|
|
|
- border-radius: 50%;
|
|
|
- margin-right: 8px;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+
|
|
|
.total-number{
|
|
|
color: #86909C;
|
|
|
font-weight: 400;
|
|
@@ -902,4 +885,18 @@ export default {
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
}
|
|
|
+.person-list{
|
|
|
+ .user-info{
|
|
|
+ .cell{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .touxiang{
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin-right: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|