|
@@ -19,7 +19,7 @@
|
|
|
:filter-node-method="filterNode"
|
|
|
@node-click="handleNodeClick"
|
|
|
node-key="id"
|
|
|
- ref="tree">
|
|
|
+ ref="listTree">
|
|
|
<div class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
<i :class="data.children && data.children.length > 0 ? 'el-icon-folder-opened':'el-icon-document-remove'"></i><span>{{ node.label }}</span>
|
|
|
</div>
|
|
@@ -90,32 +90,36 @@
|
|
|
<div class="table">
|
|
|
<el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="handleTableSelection">
|
|
|
<el-table-column align="center" type="selection" width="55" fixed></el-table-column>
|
|
|
- <el-table-column align="center" label="操作" min-width="110" fixed>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" @click="openMemberForm('edit', scope.row.id)" v-if="checkBtnRole('edit')">编辑</el-button>
|
|
|
- <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="deleteMember(scope.row.id)" v-if="checkBtnRole('del')">
|
|
|
- <el-button slot="reference" type="text">删除</el-button>
|
|
|
- </el-popconfirm>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="姓名" prop="name" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="性别" prop="gender" min-width="100">
|
|
|
+ <el-table-column align="center" label="账号" prop="userName" min-width="120"></el-table-column>
|
|
|
+ <el-table-column align="center" label="用户名" prop="nickName" min-width="120"></el-table-column>
|
|
|
+ <el-table-column align="center" label="角色" prop="roleName" min-width="100"></el-table-column>
|
|
|
+ <el-table-column align="center" label="创建时间" prop="createTime" min-width="160"></el-table-column>
|
|
|
+ <el-table-column align="center" label="最后登录时间" prop="lastLoginTime" min-width="160"></el-table-column>
|
|
|
+ <el-table-column align="center" label="状态" class-name="status-col">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.gender == 1">男</span>
|
|
|
- <span v-else-if="scope.row.gender == 2">女</span>
|
|
|
- <span v-else>未知</span>
|
|
|
+ <el-tag :type="scope.row.status ? 'success':'danger'">{{ scope.row.status ? '正常':'冻结' }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="账号" prop="wechatUserId" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="部门" prop="departmentName" min-width="180" show-overflow-tooltip>
|
|
|
+ <el-table-column align="center" label="操作" min-width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.departmentName }}
|
|
|
+ <template v-if="checkBtnRole('status')">
|
|
|
+ <el-popconfirm v-if="scope.row.status" style="margin-right: 10px;" title="确定冻结吗?" @onConfirm="changeStatus(scope.row.adminUserId, 0)" >
|
|
|
+ <el-button slot="reference" type="text">冻结</el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ <el-popconfirm v-else style="margin-right: 10px;" title="确定恢复吗?" @onConfirm="changeStatus(scope.row.adminUserId, 1)" >
|
|
|
+ <el-button slot="reference" type="text">恢复</el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <el-button type="text" @click="addOrEdit('edit', scope.row.adminUserId)" v-if="checkBtnRole('edit')">编辑</el-button>
|
|
|
+ <el-button type="text" @click="handleReset(scope.row.adminUserId)" v-if="checkBtnRole('reset')">重置密码</el-button>
|
|
|
+
|
|
|
+ <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="deleteMember(scope.row.id)" v-if="checkBtnRole('del')">
|
|
|
+ <el-button slot="reference" type="text">删除</el-button>
|
|
|
+ </el-popconfirm>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="职务" prop="position" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="手机号码" prop="mobile" min-width="140"></el-table-column>
|
|
|
- <el-table-column align="center" label="邮箱" prop="email" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="创建时间" prop="createTime" min-width="160"></el-table-column>
|
|
|
+
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
@@ -215,7 +219,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- getDepartmentList, addDepartment, editDepartment, deleteDepartment, getAreaList,
|
|
|
+ getDepartmentList, addDepartment, editDepartment, deleteDepartment,
|
|
|
getMemberList, addMember, editMember, deleteMember, getMemberDetail
|
|
|
} from '@/api/merchant'
|
|
|
import { findElem, downloadFiles, handleImport } from '@/utils/util'
|
|
@@ -329,13 +333,12 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
filterText(val) {
|
|
|
- this.$refs.tree.filter(val);
|
|
|
+ this.$refs.listTree.filter(val);
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.getTree();
|
|
|
this.getList();
|
|
|
- this.getAreaList();
|
|
|
},
|
|
|
methods: {
|
|
|
// 查询按钮权限
|
|
@@ -360,7 +363,7 @@ export default {
|
|
|
this.listLoading = true;
|
|
|
|
|
|
let params = {
|
|
|
- pageNo: this.currentPage,
|
|
|
+ pageNum: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
adminWebsitId: this.selectDepartment ? this.selectDepartment.id : '',
|
|
|
websitId: this.selectDepartment ? this.selectDepartment.websitId : '',
|
|
@@ -374,13 +377,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- // 获取区域列表
|
|
|
- getAreaList() {
|
|
|
- getAreaList().then(res => {
|
|
|
- this.areaList = res.data;
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
// 更改每页数量
|
|
|
handleSizeChange(val) {
|
|
|
this.pageSize = val;
|
|
@@ -417,7 +413,7 @@ export default {
|
|
|
handleNodeClick(data) {
|
|
|
console.log(data);
|
|
|
if(this.selectDepartment && data.websitId === this.selectDepartment.websitId) {
|
|
|
- this.$refs.tree.setCurrentKey(null);
|
|
|
+ this.$refs.listTree.setCurrentKey(null);
|
|
|
this.selectDepartment = null;
|
|
|
}else {
|
|
|
this.selectDepartment = data;
|
|
@@ -427,7 +423,7 @@ export default {
|
|
|
|
|
|
// 刷新部门
|
|
|
refreshDepartment() {
|
|
|
- this.$refs.tree.setCurrentKey(null);
|
|
|
+ this.$refs.listTree.setCurrentKey(null);
|
|
|
this.selectDepartment = null;
|
|
|
this.getTree();
|
|
|
this.getList();
|