Commit 5949cb0b authored by wengjianling's avatar wengjianling

pc通讯录管理

parent a9758cfa
......@@ -5,7 +5,7 @@ import request from '@/utils/request'
//通讯录管理---表格---获取全部人员
export function getAllMemberList(data) {
return request({
url: '/admin/auth/addressbook/getUserAll',
url: '/admin/auth/addressbook/clerk/getAll',
method: 'get',
params: data
})
......@@ -13,7 +13,7 @@ export function getAllMemberList(data) {
// 获取未分组人员
export function getNoGroupMember(data) {
return request({
url: '/admin/auth/addressbook/getUserUnselected',
url: '/admin/auth/addressbook/clerk/getArrangeNot',
method: 'get',
params: data
})
......@@ -21,7 +21,7 @@ export function getNoGroupMember(data) {
// 获取柜组用户
export function getGroupById(data) {
return request({
url: '/admin/auth/addressbook/getUserByShopId',
url: '/admin/auth/addressbook/orgnization/getClerkById',
method: 'get',
params: data
})
......@@ -37,13 +37,13 @@ export function getMemberById(data) {
//通讯录管理---组织架构
export function getOrgTree() {
return request({
url: '/admin/auth/addressbook/addressBookPage',
url: '/admin/auth/addressbook/orgnization/getAll',
method: 'get',
})
}
export function getHistoryList(data) {
return request({
url: 'admin/auth/addressbook/synchronization',
url: 'admin/auth/addressbook/clerk/synchronization',
method: 'get',
params:data
})
......@@ -57,7 +57,6 @@ export function getHistoryList(data) {
}
// 获取移动分组
// /admin/auth/addressbook/synchronization
export function getGroup() {
return request({
url: '/admin/auth/addressbook/selectGroupPage',
......@@ -77,7 +76,16 @@ export function getHistoryList(data) {
// 移动人员
export function moveMember(data) {
return request({
url: 'admin/auth/addressbook/updateStallClerkByUserId',
url: 'admin/auth/addressbook/clerk/moveTo',
method: 'put',
params:data
})
}
// 设置管理员||取消管理员
export function changeRole(data) {
return request({
url: 'admin/auth/addressbook/clerk/configManagerById',
method: 'put',
params:data
})
......@@ -86,8 +94,26 @@ export function getHistoryList(data) {
// 模糊查询
export function search(data) {
return request({
url: '/admin/auth/addressbook/getUserByKeyWords',
url: '/admin/auth/addressbook/clerk/getByUserIdOrUserName',
method: 'get',
params:data
})
}
// 添加子部门
export function addGroup(data) {
return request({
url: '/admin/auth/addressbook/orgnization/save',
method: 'post',
params:data
})
}
// 删除子部门
export function deleteGroup(data) {
return request({
url: '/admin/auth/addressbook/orgnization/deleteById',
method: 'delete',
params:data
})
}
\ No newline at end of file
......@@ -11,7 +11,7 @@
<!-- 顶栏 -->
<div
class="d2-theme-header"
:style="{ opacity: this.searchActive ? 0.5 : 1 }"
:style="{ opacity: this.searchActive ? 0.5 : 1 }"
flex-box="0"
flex
>
......@@ -33,7 +33,7 @@
</div>
</div>
<!-- 下面 主体 -->
<div class="d2-theme-container" flex-box="1" flex flex="dir:top">
<div class="d2-theme-container" flex-box="1" flex="dir:top">
<!-- 主体 侧边栏 -->
<!-- <div
flex-box="0"
......@@ -101,17 +101,17 @@ export default {
name: 'd2-layout-header-aside',
mixins: [mixinSearch],
components: {
d2MenuSide,
// d2MenuSide,
d2MenuHeader,
d2Tabs,
// d2Tabs,
d2HeaderFullscreen,
d2HeaderLocales,
d2HeaderSearch,
d2HeaderSize,
d2HeaderTheme,
// d2HeaderLocales,
// d2HeaderSearch,
// d2HeaderSize,
// d2HeaderTheme,
d2HeaderUser,
d2HeaderLog,
d2HeaderColor,
// d2HeaderLog,
// d2HeaderColor,
d2HeaderAlarmNotify
},
data () {
......
<template>
<div class="ct">
<el-dialog
title="创建子部门"
:visible.sync="addDialog"
width="30%"
:show-close="false"
:close-on-click-modal="false"
>
<div class="config_item">
<label class="config_name">部门名称</label>
<el-input class="config_value" v-model="params.d_name" placeholder="请输入部门名称" />
</div>
<div class="config_item">
<span class="config_name">上级部门</span>
<div>
<div @click="showTreeData" class="config_value father_group">
<span class="father_name_text">{{ paramsForShow.father_name }}</span>
<span :class="showTree ? 'arrow_up' : 'arrow_down'"></span>
</div>
</div>
</div>
<div class="tree_data" v-if="showTree">
<el-tree
ref="tree"
class="tree"
:check-strictly="true"
:data="treeData"
node-key="id"
@node-click="handleNodeClick"
@check-change="checkChange"
>
</el-tree>
</div>
<div class="config_item">
<label class="config_name">店铺编号</label>
<el-input class="config_value" v-model="params.code" placeholder="请输入店铺编号" />
</div>
<div class="tips" v-if="checked">请将表单填写完整</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleAddCancel" size="small">取 消</el-button>
<el-button type="primary" @click="handleAddFinish" size="small"
>确 定</el-button
>
</span>
</el-dialog>
<div></div>
</div>
</template>
<script>
import { addGroup, getOrgTree } from "@/api/in/mail";
import { log } from "util";
export default {
props: {
addDialog: {
type: Boolean,
default: false
}
},
data() {
return {
treeData: [],
group_name: '',
shop_code: '',
showTree: false,
paramsForShow: {
name: '',
father_name: '',
code: ''
},
params: {
d_name: '',
d_parentId: '',
code: ''
},
checked: false
};
},
created() {
this.getList()
},
methods: {
handleAddCancel() {
this.$emit("handleAddCancel");
},
handleAddFinish() {
if(!this.params.d_name || !this.params.d_parentId || !this.params.code) {
this.checked = true
return
}
addGroup(this.params).then(res=> {
// console.log(res)
})
// console.log(addGroup)
this.$emit("handleAddFinish");
},
handleNodeClick(item, node, self) {
// console.log(item,node,self)
this.params.d_parentId = item.id;
this.paramsForShow.father_name = item.label
},
checkChange(item, node, self) {
},
showTreeData() {
this.showTree = !this.showTree
},
getList() {
getOrgTree().then(res => {
console.log(res.data.organizations)
this.treeData = [res.data.organizations];
}).catch(err => {
console.log(err)
});
}
}
};
</script>
<style scoped>
.tree >>> .is-leaf + .el-checkbox .el-checkbox__inner {
display: inline-block;
}
.tree >>> .el-checkbox .el-checkbox__inner {
display: none;
}
.choose {
padding: 16px;
font-size: 16px;
font-weight: bold;
color: rgba(56, 56, 56, 1);
box-sizing: border-box;
}
.title {
display: flex;
align-items: center;
justify-content: space-between;
/* border-bottom: 1px solid #f8f8f8; */
padding-bottom: 10px;
}
.transfer-footer {
margin-left: 20px;
padding: 6px 5px;
}
.ct >>> .el-dialog__header {
border-bottom: 1px solid #f8f8f8;
}
.ct >>> .el-dialog__body {
padding: 20px 40px;
}
.ct >>> .el-transfer-panel {
width: 250px;
}
.circle {
width: 30px;
height: 30px;
line-height: 30px;
border-radius: 50%;
border: 1px solid rgba(208, 2, 27, 1);
position: relative;
}
.circle >>> .icon {
width: 28px;
height: 28px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.br {
border-top: 1px solid #f8f8f8;
border-bottom: 1px solid #f8f8f8;
padding: 24px 0;
}
.config_item {
display: flex;
flex-direction: row;
align-items: center;
}
.config_name:before {
content: '* ';
color: red;
}
.config_name {
width: 80px;
text-align: center;
margin-right: 10px;
}
.config_value {
width: 230px;
}
.father_group {
margin: 10px 0;
width: 228px;
height: 38px;
border-radius: 4px;
border: 1px solid #DCDFE6;
position: relative;
}
.arrow_down {
width: 0;
height: 0;
border-width: 5px;
border-style: solid;
border-color: #ccc transparent transparent transparent;
position: absolute;
right: 10px;
top: 20px;
}
.arrow_up {
width: 0;
height: 0;
border-width: 5px;
border-style: solid;
border-color: transparent transparent #ccc transparent;
position: absolute;
right: 10px;
top: 15px;
}
.tree_data {
margin-left: 90px;
}
.father_name_text {
line-height: 38px;
padding-left: 15px;
}
.tips {
width: 100%;
text-align: center;
color: red;
margin: 5px 0;
}
</style>
<template>
<div class="ct">
<el-dialog
title="删除子部门"
:visible.sync="deleteDialog"
width="30%"
:show-close="false"
:close-on-click-modal="false"
>
<div v-if="nowNode.children.length > 0 ? true : false">删除"{{nowNode.label}}"请先删除其下所有子部门</div>
<div v-else>部门"{{nowNode.label}}"删除后,该部门下的用户会被分配至“未分组列表”,是否删除?</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleDeleteCancel" size="small">取 消</el-button>
<el-button v-if="nowNode.children.length > 0 ? false : true" type="primary" @click="handleDeleteFinish" size="small"
>确 定</el-button
>
</span>
</el-dialog>
<div></div>
</div>
</template>
<script>
import { deleteGroup } from "@/api/in/mail";
import { log } from "util";
export default {
props: {
deleteDialog: {
type: Boolean,
default: true
},
nowNode: {
type: Object,
default: {}
}
},
data() {
return {
};
},
created() {
console.log(this.nowNode)
},
methods: {
handleDeleteCancel() {
this.$emit('handleDeleteCancel')
},
handleDeleteFinish() {
deleteGroup({id: this.nowNode.id}).then(res => {
console.log(res)
})
this.$emit('handleDeleteFinish')
}
}
};
</script>
<style scoped>
.tree >>> .is-leaf + .el-checkbox .el-checkbox__inner {
display: inline-block;
}
.tree >>> .el-checkbox .el-checkbox__inner {
display: none;
}
.choose {
padding: 16px;
font-size: 16px;
font-weight: bold;
color: rgba(56, 56, 56, 1);
box-sizing: border-box;
}
.title {
display: flex;
align-items: center;
justify-content: space-between;
/* border-bottom: 1px solid #f8f8f8; */
padding-bottom: 10px;
}
.transfer-footer {
margin-left: 20px;
padding: 6px 5px;
}
.ct >>> .el-dialog__header {
border-bottom: 1px solid #f8f8f8;
}
.ct >>> .el-dialog__body {
padding: 20px 40px;
}
.ct >>> .el-transfer-panel {
width: 250px;
}
.circle {
width: 30px;
height: 30px;
line-height: 30px;
border-radius: 50%;
border: 1px solid rgba(208, 2, 27, 1);
position: relative;
}
.circle >>> .icon {
width: 28px;
height: 28px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.br {
border-top: 1px solid #f8f8f8;
border-bottom: 1px solid #f8f8f8;
padding: 24px 0;
}
</style>
......@@ -102,7 +102,7 @@ export default {
page: {
currentPage: 1,
size: 20,
total: 100
total: 0
},
};
},
......@@ -115,9 +115,9 @@ export default {
pageNum: 1
}
getHistoryList(params).then(res => {
console.log(res,"res");
this.main = res.data.list
this.page.total = Number(res.data.total)
// console.log(res,"res");
this.main = res.data.pageInfo.list
this.page.total = Number(res.data.pageInfo.total)
})
},
setListsHeadStyle({ row, column, rowIndex, columnIndex }) {
......
......@@ -59,7 +59,6 @@
show-checkbox
:check-strictly="true"
:data="treeData"
:props="orgData"
node-key="id"
@node-click="handleNodeClick"
@check-change="checkChange"
......@@ -78,7 +77,7 @@
</template>
<script>
import { getGroup, moveMember } from "@/api/in/mail";
import { getOrgTree, moveMember } from "@/api/in/mail";
import { log } from "util";
export default {
......@@ -94,11 +93,6 @@ export default {
},
data() {
return {
orgData: {
label: "name",
children: "adminStallList",
id: "id"
},
treeData: []
};
},
......@@ -110,10 +104,11 @@ export default {
this.$emit("handleCancel");
},
handleFinish() {
console.log(this.idList)
let groupId = this.$refs.tree.getCheckedKeys()[0]
let data = {
stallIds: groupId,
userIds: this.idList+','
departmentId: groupId,
id: this.idList[0]
}
moveMember(data).then(res=> {
this.$emit("handleFinish", false);
......@@ -162,14 +157,9 @@ export default {
},
getList() {
getGroup().then(res => {
console.log(res, "移动的数据获取");
let obj = {
name: "未分组",
id: 0
};
res.data = [obj, ...res.data];
this.treeData = res.data;
getOrgTree().then(res => {
console.log(res.data.organizations)
this.treeData = [res.data.organizations];
});
}
}
......
......@@ -19,7 +19,6 @@
<div class="tree">
<el-tree
class="trees"
:props="orgData"
:data="data1"
node-key="id"
default-expand-all
......@@ -32,9 +31,11 @@
</div>
</div>
<div class="right">
<div class="top"><span>{{title}}</span> 共(<span>{{totalNumber}}</span>)人 </div>
<div class="top"><span>{{groupName}} {{title}}</span> 共(<span>{{totalNumber}}</span>)人 </div>
<div class="searchs">
<div class="buttons">
<el-button class="button button_group" size="small" @click="addChild">添加子部门</el-button
>
<el-button class="button buttondark" size="small" @click="handleMove" :disabled="idList.length>0? false:true "
>移动</el-button
>
......@@ -44,6 +45,8 @@
@click="synchronismMember"
>同步记录</el-button
>
<el-button class="button buttondark" :disabled="groupId ? false : true" size="small" @click="deleteChild">删除子部门</el-button
>
</div>
<!-- 搜索区 -->
<el-form
......@@ -85,15 +88,14 @@
align="center"
></el-table-column>
<el-table-column
prop="dept"
prop="stall"
label="部门"
align="center"
></el-table-column>
<el-table-column prop="role" label="角色" align="center">
<el-table-column prop="isManager" label="角色" align="center">
<template slot-scope="scope">
<span v-if="scope.row.managerType == 0">店员</span>
<span v-if="scope.row.managerType == 1">店长</span>
<span v-if="scope.row.managerType == 2">柜组负责人</span>
<span v-if="scope.row.isManager == 0">普通用户</span>
<span v-if="scope.row.isManager == 1">管理员</span>
</template>
</el-table-column>
<el-table-column
......@@ -107,6 +109,16 @@
align="center"
prop="synchronization"
/>
<el-table-column
prop="isManager"
label="操作"
align="center"
>
<template slot-scope="scope">
<span @click="setAdmin(scope.row)" class="setAdmin" v-if="scope.row.isManager == 0">设为管理员</span>
<span @click="cancelAdmin(scope.row)" class="cancelAdmin" v-if="scope.row.isManager == 1">取消管理员</span>
</template>
</el-table-column>
</el-table>
<div class="fy">
<el-pagination
......@@ -126,11 +138,26 @@
@handleFinish="removeFinish"
:idList="idList"
></move-dialog>
<add-dialog
v-if="addDialogShow"
:addDialog="addDialogShow"
@handleAddCancel="addDialogShow = false"
@handleAddFinish="addFinish"
></add-dialog>
<delete-dialog
v-if="deleteDialogShow"
:daleteDialog="deleteDialogShow"
@handleDeleteCancel="deleteDialogShow = false"
@handleDeleteFinish="deleteFinish"
:nowNode="nowNode"
></delete-dialog>
</div>
</template>
<script>
import MoveDialog from "./components/move";
import AddDialog from "./components/addGroup";
import DeleteDialog from "./components/deleteGroup";
import {
getOrgTree,
getAllMemberList,
......@@ -138,391 +165,15 @@ import {
getMemberById,
storeNameChange,
getGroupById,
changeRole,
search
} from "@/api/in/mail";
export default {
data() {
const data1 = [
{
id: 1,
label: "亿百分科技",
children: [
{
id: 2,
label: "一号柜组",
children: [
{
id: 5,
label: "Nike门店",
type: "门店"
},
{
id: 6,
label: "阿迪达斯",
type: "门店"
}
]
},
{
id: 3,
label: "二号柜组",
children: [
{
id: 7,
label: "vans门店",
type: "门店"
}
]
}
/* {
id: 4,
label: "三号柜组",
children: [
{
id: 9,
label: "匡威门店"
}
]
} */
]
}
];
return {
data1: JSON.parse(JSON.stringify(data1)),
list1: {
main1: [
{
id: "1",
name: "李振华",
wxId: "lizhenhua",
dept: "销售部",
role: "店长",
mobile: "1588171558",
time: "2020/01/20"
},
{
id: "1",
name: "唐珊翰",
wxId: "tangshanyu",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
},
{
id: "1",
name: "苏聪",
wxId: "sucong",
dept: "销售部",
role: "店员",
mobile: "1887767865",
time: "2020/01/20"
}
],
main2: [
{
id: "2",
name: "胡鑫",
wxId: "huxin",
dept: "销售部",
role: "店长",
mobile: "15881715583",
time: "2020/01/20"
},
{
id: "2",
name: "刘燕",
wxId: "liuyan",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
},
{
id: "2",
name: "张梦瑶",
wxId: "zhangmengyao",
dept: "销售部",
role: "店员",
mobile: "18877678653",
time: "2020/01/20"
}
],
main3: [
{
id: "2",
name: "吴倩",
wxId: "wuqian",
dept: "销售部",
role: "店长",
mobile: "15881715583",
time: "2020/01/20"
},
{
id: "2",
name: "吕思思",
wxId: "lvsisi",
dept: "销售部",
role: "店员",
mobile: "15655443243",
time: "2020/01/20"
},
{
id: "2",
name: "张君",
wxId: "zhangjun",
dept: "销售部",
role: "店员",
mobile: "18877678790",
time: "2020/01/20"
}
],
main4: [
{
id: "1",
name: "李振华",
wxId: "lizhenhua",
dept: "销售部",
role: "店长",
mobile: "1588171558",
time: "2020/01/20"
},
{
id: "1",
name: "唐珊翰",
wxId: "tangshanyu",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
},
{
id: "1",
name: "苏聪",
wxId: "sucong",
dept: "销售部",
role: "店员",
mobile: "1887767865",
time: "2020/01/20"
},
{
id: "2",
name: "胡鑫",
wxId: "huxin",
dept: "销售部",
role: "店长",
mobile: "15881715583",
time: "2020/01/20"
},
{
id: "2",
name: "刘燕",
wxId: "liuyan",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
},
{
id: "2",
name: "张梦瑶",
wxId: "zhangmengyao",
dept: "销售部",
role: "店员",
mobile: "18877678653",
time: "2020/01/20"
},
{
id: "2",
name: "吴倩",
wxId: "wuqian",
dept: "销售部",
role: "店长",
mobile: "15881715583",
time: "2020/01/20"
},
{
id: "2",
name: "吕思思",
wxId: "lvsisi",
dept: "销售部",
role: "店员",
mobile: "15655443243",
time: "2020/01/20"
},
{
id: "2",
name: "张君",
wxId: "zhangjun",
dept: "销售部",
role: "店员",
mobile: "18877678790",
time: "2020/01/20"
}
],
main5: [
{
id: "1",
name: "李振华",
wxId: "lizhenhua",
dept: "销售部",
role: "店长",
mobile: "1588171558",
time: "2020/01/20"
},
{
id: "1",
name: "唐珊翰",
wxId: "tangshanyu",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
},
{
id: "1",
name: "苏聪",
wxId: "sucong",
dept: "销售部",
role: "店员",
mobile: "1887767865",
time: "2020/01/20"
},
{
id: "2",
name: "胡鑫",
wxId: "huxin",
dept: "销售部",
role: "店长",
mobile: "15881715583",
time: "2020/01/20"
},
{
id: "2",
name: "刘燕",
wxId: "liuyan",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
},
{
id: "2",
name: "张梦瑶",
wxId: "zhangmengyao",
dept: "销售部",
role: "店员",
mobile: "18877678653",
time: "2020/01/20"
}
],
main6: [
{
id: "1",
name: "李振华",
wxId: "lizhenhua",
dept: "销售部",
role: "店长",
mobile: "1588171558",
time: "2020/01/20"
},
{
id: "1",
name: "唐珊翰",
wxId: "tangshanyu",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
},
{
id: "1",
name: "苏聪",
wxId: "sucong",
dept: "销售部",
role: "店员",
mobile: "1887767865",
time: "2020/01/20"
},
{
id: "2",
name: "胡鑫",
wxId: "huxin",
dept: "销售部",
role: "店长",
mobile: "15881715583",
time: "2020/01/20"
},
{
id: "2",
name: "刘燕",
wxId: "liuyan",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
},
{
id: "2",
name: "张梦瑶",
wxId: "zhangmengyao",
dept: "销售部",
role: "店员",
mobile: "18877678653",
time: "2020/01/20"
},
{
id: "2",
name: "吴倩",
wxId: "wuqian",
dept: "销售部",
role: "店长",
mobile: "15881715583",
time: "2020/01/20"
},
{
id: "2",
name: "吕思思",
wxId: "lvsisi",
dept: "销售部",
role: "店员",
mobile: "15655443243",
time: "2020/01/20"
},
{
id: "2",
name: "张君",
wxId: "zhangjun",
dept: "销售部",
role: "店员",
mobile: "18877678790",
time: "2020/01/20"
}
],
search: {
bar: [
{
id: "1",
name: "全部"
},
{
id: "2",
name: "测试"
}
],
taskType: [
{
id: "1",
name: "全部"
},
{
id: "2",
name: "测试"
}
]
}
},
data1: [],
groupName: '',
tableData: [],
isShow: false,
formData: {
......@@ -535,6 +186,8 @@ export default {
total: 0
},
moveDialogShow: false,
addDialogShow: false,
deleteDialogShow: false,
counterDialog: false,
storeDialog: false,
nameDialog: false,
......@@ -552,11 +205,14 @@ export default {
groupId: "",
counterId: 0,
title: "全部",
totalNumber: ""
totalNumber: "",
nowNode: {}
};
},
components: {
MoveDialog
MoveDialog,
AddDialog,
DeleteDialog
},
created() {
this.getOrgTree();
......@@ -566,35 +222,30 @@ export default {
getOrgTree() {
getOrgTree().then(res => {
let data = res.data;
this.allNumber = data["用户的总数"];
this.wNumber = data["未分组用户的总数"];
this.data1 = data["所有的柜组"];
this.allNumber = data.numOfClerks;
this.wNumber = data.numOfClerksArrangeNot
this.data1 = [data.organizations];
});
},
handleTreeClick(data) {
this.formData.keywords = ''
this.title = data.name
if(data.shopId) {
this.groupId = data.shopId
}
if(data.type){
this.storeId = data.id
this.getStoreMember(1,1)
}else {
this.groupId = data.id
this.getGroupMember(1,1)
}
this.nowNode = data
this.groupName = data.label
this.groupId = data.id
this.getGroupMember(1,1)
},
getGroupMember(page,ctPage) {
this.page.currentPage = ctPage
this.type = this.sType = 3
let params = {
pageNum: page,
shopId: this.groupId
id: this.groupId
};
getGroupById(params).then(res => {
this.tableData = res.data.list;
this.page.total = this.totalNumber = Number(res.data.total);
this.tableData = res.data.pageInfo.list;
this.page.total = this.totalNumber = Number(res.data.pageInfo.total);
});
},
getStoreMember(page,ctPage) {
......@@ -626,36 +277,38 @@ export default {
this.handleTypeChange(val,ctPage)
},
getMailList(page,ctPage) {
this.groupName = ''
this.formData.keywords = ''
this.title = "全部"
this.type = this.sType = 1;
this.page.currentPage = ctPage
this.groupId = ''
let params = {
pageNum: page
};
getAllMemberList(params).then(res => {
console.log(res, "res");
this.tableData = res.data.list;
this.page.total = this.totalNumber = this.allNumber = Number(res.data.total);
this.tableData = res.data.pageInfo.list;
this.page.total = this.totalNumber = this.allNumber = Number(res.data.pageInfo.total);
});
},
handleShopowner() {},
getNoGroupMember(page,ctPage) {
this.groupName = ''
this.formData.keywords = ''
this.page.currentPage = ctPage
this.title = "未分组"
this.type = this.sType = 2;
this.groupId = ''
let params = {
pageNum: page
};
getNoGroupMember(params).then(res => {
this.tableData = res.data.list;
this.page.total = this.totalNumber = this.wNumber = Number(res.data.total);
console.log(res.data)
this.tableData = res.data.pageInfo.list;
this.page.total = this.totalNumber = this.wNumber = Number(res.data.pageInfo.total);
});
},
handleMemberChange(val) {
console.log(val,"val");
let ids = []
val.map(function(item) {
ids.push(item.id)
......@@ -695,14 +348,56 @@ export default {
this.counterId = this.groupId;
}
let params = {
keyWords: this.formData.keywords,
stallId: this.counterId,
pageNum: page
param: this.formData.keywords
}
search(params).then(res=>{
this.tableData = res.data.list
this.page.total = Number(res.data.total);
console.log(res)
this.tableData = res.data
// this.page.total = Number(res.data.total);
})
},
setAdmin(user) {
this.changeRole(1, user.d_id, user.id)
},
cancelAdmin(user) {
this.changeRole(0, user.d_id, user.id)
},
changeRole(state, departmentId, id) {
let params = {
departmentId,
flag: state,
id
}
changeRole(params).then(res => {
if(this.groupId) {
this.getGroupMember(1,1);
}else if(this.title === '未分组') {
this.getNoGroupMember(1,1)
}else if(this.formData.keywords){
this.handleSearch(1,1)
}else {
this.getOrgTree();
this.getMailList(1,1);
}
})
},
addChild() {
this.addDialogShow = true
},
addFinish() {
this.addDialogShow = false
this.getOrgTree();
this.getMailList(1,1);
},
deleteChild() {
this.deleteDialogShow = true
},
deleteFinish() {
this.deleteDialogShow = false
this.getOrgTree();
this.getMailList(1,1);
}
}
};
......@@ -874,4 +569,23 @@ export default {
.el-icon-edit {
font-weight: bold;
}
.setAdmin {
color: blue;
text-decoration: underline;
cursor: pointer;
}
.cancelAdmin {
color: #aaa;
text-decoration: underline;
cursor: pointer;
}
.button_group {
height: 32px;
background-color: #e8e9fe;
color: #4e59c7;
border: 1px solid #4e59c7;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-top: 4px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment