Commit 317fcde5 authored by xd's avatar xd

假数据

parent 0d29d168
...@@ -11,11 +11,10 @@ export function getMailList(data) { ...@@ -11,11 +11,10 @@ export function getMailList(data) {
}) })
} }
//通讯录管理---组织架构 //通讯录管理---组织架构
export function getOrgTree(data) { export function getOrgTree() {
return request({ return request({
url: '', url: '/admin/auth/addressbook/addressBookPage',
method: 'post', method: 'get',
data: data
}) })
} }
export function getHistoryList() { export function getHistoryList() {
...@@ -24,3 +23,10 @@ export function getHistoryList() { ...@@ -24,3 +23,10 @@ export function getHistoryList() {
method: 'get', method: 'get',
}) })
} }
export function deleteCounter(inData) {
return request({
url: '/admin/auth/stall/delete',
method: 'delete',
params: inData
})
}
\ No newline at end of file
...@@ -19,19 +19,20 @@ ...@@ -19,19 +19,20 @@
> >
<el-table-column <el-table-column
label="序号" label="序号"
width="70" width="120"
type="index" type="index"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column label="头像" align="center" > <el-table-column label="头像" align="center" width="240" >
<template slot-scope="scope"> <template slot-scope="scope">
<span><img :src="scope.row.thumbAvatar" alt=""></span> <span><img :src="scope.row.thumbAvatar" alt="" style="width:60px;height60px;"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="userName" prop="userName"
label="姓名" label="姓名"
align="center" align="center"
width="240"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="userId" prop="userId"
...@@ -42,7 +43,7 @@ ...@@ -42,7 +43,7 @@
prop="bar" prop="bar"
label="更新时间" label="更新时间"
align="center" align="center"
width="120"
></el-table-column> ></el-table-column>
</el-table> </el-table>
</div> </div>
......
...@@ -173,7 +173,12 @@ export default { ...@@ -173,7 +173,12 @@ export default {
this.$refs.editCounter.counterDialog = true this.$refs.editCounter.counterDialog = true
}, },
handleDelete(id) { handleDelete(id) {
this.$confirm('确定删除该柜组吗?', {
}).then(() => {
this.$message.success("删除成功")
}).catch(() => {
this.$message.info("取消删除")
});
}, },
handleEditClose() { handleEditClose() {
this.editDialog = false this.editDialog = false
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
<div class="ty"> <div class="ty">
<div> <div>
<span>全部</span> <span>全部</span>
<span class="number">(103)</span> <span class="number">{{ allNumber }}</span>
</div> </div>
</div> </div>
<div class="ty" style="margin:15px 0;"> <div class="ty" style="margin:15px 0;">
<div> <div>
<span>未分组</span> <span>未分组</span>
<span class="number">(8)</span> <span class="number">{{ wNumber }}</span>
</div> </div>
</div> </div>
<div class="tree"> <div class="tree">
...@@ -21,15 +21,26 @@ ...@@ -21,15 +21,26 @@
:data="data1" :data="data1"
node-key="id" node-key="id"
:expand-on-click-node="false" :expand-on-click-node="false"
@node-click="handleTreeClick"
> >
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
<span style="margin-left:30px;" class="btn"> <span style="margin-left:30px;" class="btn">
<el-button type="text" size="mini" @click="() => edit(data)"> <el-button
type="text"
size="mini"
@click="() => edit(data)"
v-if="data.type"
>
<i class="el-icon-edit"></i> <i class="el-icon-edit"></i>
</el-button> </el-button>
<el-button type="text" size="mini" @click="() => remove(node, data)"> <el-button
<i class="el-icon-delete" ></i> v-if="data.type"
type="text"
size="mini"
@click="() => remove(node, data)"
>
<i class="el-icon-delete"></i>
</el-button> </el-button>
</span> </span>
</span> </span>
...@@ -55,7 +66,7 @@ ...@@ -55,7 +66,7 @@
size="small" size="small"
@click="synchronismMember" @click="synchronismMember"
>同步记录</el-button >同步记录</el-button
> >
</div> </div>
<!-- 搜索区 --> <!-- 搜索区 -->
<el-form <el-form
...@@ -73,58 +84,49 @@ ...@@ -73,58 +84,49 @@
/> />
</el-form-item> </el-form-item>
<el-button class="button buttondark" size="small">搜索</el-button> <el-button class="button buttondark" size="small">搜索</el-button>
</el-form> </el-form>
</div> </div>
<el-table <el-table
stripe stripe
class="list" class="list"
ref="multipleTable" ref="multipleTable"
:data="list.main" :data="list1.main4"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
height="calc(100% - 140px)" height="calc(100% - 140px)"
> >
<el-table-column type="selection" width="60"></el-table-column> <el-table-column type="selection" width="60"></el-table-column>
<el-table-column <el-table-column
prop="taskName" prop="name"
label="姓名" label="姓名"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="id" prop="wxId"
label="企业微信ID" label="企业微信ID"
align="center" align="center"
width="120"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="taskType" prop="dept"
label="部门" label="部门"
align="center" align="center"
width="150"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="taskType" prop="role"
label="角色" label="角色"
align="center" align="center"
width="120"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="bar" prop="mobile"
label="手机号" label="手机号"
align="center" align="center"
width="150"
></el-table-column> ></el-table-column>
<el-table-column label="同步时间" width="180" align="center">
<template slot-scope="scope">{{ scope.row.sendDate }}</template>
</el-table-column>
<el-table-column <el-table-column
prop="bar" label="同步时间"
label="备注" width="180"
align="center" align="center"
width="120" prop="time"
></el-table-column> />
<el-table-column label="角色" align="center" fixed="right" width="120" />
</el-table> </el-table>
<div class="fy"> <div class="fy">
<el-pagination <el-pagination
...@@ -144,8 +146,16 @@ ...@@ -144,8 +146,16 @@
@handleFinish="removeFinish" @handleFinish="removeFinish"
></move-dialog> ></move-dialog>
<add-store ref="addStore"></add-store> <add-store ref="addStore"></add-store>
<!-- <add-counter ref="addCounter"></add-counter> --> <el-dialog title="提示" :visible.sync="nameDialog" width="30%">
<div class="changeName">
<span style="margin:0 10px;">门店名称:</span>
<el-input v-model="storeName" placeholder="请输入名称"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="nameDialog = false">取 消</el-button>
<el-button type="primary" @click="nameDialog = false">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -153,140 +163,365 @@ ...@@ -153,140 +163,365 @@
import MoveDialog from "./components/move"; import MoveDialog from "./components/move";
// import AddCounter from "./components/addCounter"; // import AddCounter from "./components/addCounter";
import AddStore from "./components/addStore"; import AddStore from "./components/addStore";
import { getMailList } from "@/api/jinjian" import { getOrgTree } from "@/api/in/mail";
export default { export default {
data() { data() {
const data1 = [ const data1 = [
{ {
id: 1, id: 1,
label: "一级 1", label: "亿百分科技",
children: [ children: [
{ {
id: 4, id: 2,
label: "二级 1-1", label: "一号柜组",
children: [ children: [
{ {
id: 9, id: 5,
label: "三级 1-1-1" label: "Nike门店",
type: "门店"
}, },
{ {
id: 10, id: 6,
label: "三级 1-1-2" label: "阿迪达斯",
type: "门店"
}
]
},
{
id: 3,
label: "二号柜组",
children: [
{
id: 7,
label: "vans门店",
type: "门店"
} }
] ]
} }
/* {
id: 4,
label: "三号柜组",
children: [
{
id: 9,
label: "匡威门店"
}
]
} */
] ]
}, }
{ ];
id: 2, return {
label: "一级 2", data1: JSON.parse(JSON.stringify(data1)),
children: [ list1: {
main1: [
{ {
id: 5, id: "1",
label: "二级 2-1" name: "李振华",
wxId: "lizhenhua",
dept: "销售部",
role: "店长",
mobile: "1588171558",
time: "2020/01/20"
}, },
{ {
id: 6, id: "1",
label: "二级 2-2" 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: 3, id: "2",
label: "一级 3", name: "胡鑫",
children: [ wxId: "huxin",
dept: "销售部",
role: "店长",
mobile: "15881715583",
time: "2020/01/20"
},
{ {
id: 7, id: "2",
label: "二级 3-1" name: "刘燕",
wxId: "liuyan",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
}, },
{ {
id: 8, id: "2",
label: "二级 3-2" name: "张梦瑶",
wxId: "zhangmengyao",
dept: "销售部",
role: "店员",
mobile: "18877678653",
time: "2020/01/20"
} }
] ],
}, main3: [
{ {
id: 9, id: "2",
label: "一级 3", name: "吴倩",
children: [ wxId: "wuqian",
dept: "销售部",
role: "店长",
mobile: "15881715583",
time: "2020/01/20"
},
{ {
id: 10, id: "2",
label: "二级 3-1" name: "吕思思",
wxId: "lvsisi",
dept: "销售部",
role: "店员",
mobile: "15655443243",
time: "2020/01/20"
}, },
{ {
id: 11, id: "2",
label: "二级 3-2" name: "张君",
wxId: "zhangjun",
dept: "销售部",
role: "店员",
mobile: "18877678790",
time: "2020/01/20"
} }
] ],
} main4: [
]; {
return { id: "1",
data1: JSON.parse(JSON.stringify(data1)), name: "李振华",
list: { wxId: "lizhenhua",
main: [ dept: "销售部",
{ role: "店长",
id: "1001", mobile: "1588171558",
taskName: "2019年男装销售任务", time: "2020/01/20"
taskType: "拉新", },
bar: "男装", {
taskContent: "任务内容任务内容任务内容...", id: "1",
sendDate: "2019/02/08" name: "唐珊翰",
wxId: "tangshanyu",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
}, },
{ {
id: "1002", id: "1",
taskName: "2019年男装销售任务", name: "苏聪",
taskType: "拉新", wxId: "sucong",
bar: "男装", dept: "销售部",
taskContent: "任务内容任务内容任务内容...", role: "店员",
sendDate: "2019/02/08" mobile: "1887767865",
time: "2020/01/20"
}, },
{ {
id: "1003", id: "2",
taskName: "2019年男装销售任务", name: "胡鑫",
taskType: "拉新", wxId: "huxin",
bar: "男装", dept: "销售部",
taskContent: "任务内容任务内容任务内容...", role: "店长",
sendDate: "2019/02/08" mobile: "15881715583",
time: "2020/01/20"
}, },
{ {
id: "1003", id: "2",
taskName: "2019年男装销售任务", name: "刘燕",
taskType: "拉新", wxId: "liuyan",
bar: "男装", dept: "销售部",
taskContent: "任务内容任务内容任务内容...", role: "店员",
sendDate: "2019/02/08" mobile: "15655447788",
time: "2020/01/20"
}, },
{ {
id: "1003", id: "2",
taskName: "2019年男装销售任务", name: "张梦瑶",
taskType: "拉新", wxId: "zhangmengyao",
bar: "男装", dept: "销售部",
taskContent: "任务内容任务内容任务内容...", role: "店员",
sendDate: "2019/02/08" mobile: "18877678653",
time: "2020/01/20"
}, },
{ {
id: "1003", id: "2",
taskName: "2019年男装销售任务", name: "吴倩",
taskType: "拉新", wxId: "wuqian",
bar: "男装", dept: "销售部",
taskContent: "任务内容任务内容任务内容...", role: "店长",
sendDate: "2019/02/08" mobile: "15881715583",
time: "2020/01/20"
}, },
{ {
id: "1003", id: "2",
taskName: "2019年男装销售任务", name: "吕思思",
taskType: "拉新", wxId: "lvsisi",
bar: "男装", dept: "销售部",
taskContent: "任务内容任务内容任务内容...", role: "店员",
sendDate: "2019/02/08" mobile: "15655443243",
time: "2020/01/20"
}, },
{ {
id: "1003", id: "2",
taskName: "2019年男装销售任务", name: "张君",
taskType: "拉新", wxId: "zhangjun",
bar: "男装", dept: "销售部",
taskContent: "任务内容任务内容任务内容...", role: "店员",
sendDate: "2019/02/08" 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: { search: {
...@@ -312,6 +547,7 @@ export default { ...@@ -312,6 +547,7 @@ export default {
] ]
} }
}, },
isShow: false, isShow: false,
formData: { formData: {
status: "", status: "",
...@@ -325,7 +561,16 @@ export default { ...@@ -325,7 +561,16 @@ export default {
}, },
moveDialogShow: false, moveDialogShow: false,
counterDialog: false, counterDialog: false,
storeDialog: false storeDialog: false,
storeName: "",
nameDialog: false,
allNumber: "",
wNumber: "",
orgData: {
label: "name",
children: "adminStallList",
id: "id"
}
}; };
}, },
components: { components: {
...@@ -334,9 +579,43 @@ export default { ...@@ -334,9 +579,43 @@ export default {
AddStore AddStore
}, },
created() { created() {
this.getMailList() this.getOrgTree();
this.getMailList();
}, },
methods: { methods: {
getOrgTree() {
/* getOrgTree().then( res => {
console.log(res,"tree???");
let data = res.data
this.allNumber = data['用户的总数']
this.wNumber = data['未分组用户的总数']
this.data1 = data['所有的柜组']
}) */
},
handleTreeClick(data) {
console.log(data, "data");
switch (data.id) {
case 1:
this.list1.main4 = this.list1.main6;
break;
case 5:
this.list1.main4 = this.list1.main1;
break;
case 6:
this.list1.main4 = this.list1.main2;
break;
case 7:
this.list1.main4 = this.list1.main3;
break;
case 2:
this.list1.main4 = this.list1.main5;
break;
default:
this.list1.main4 = this.list1.main3;
break;
}
},
append(data) { append(data) {
const newChild = { id: id++, label: "testtest", children: [] }; const newChild = { id: id++, label: "testtest", children: [] };
if (!data.children) { if (!data.children) {
...@@ -345,17 +624,23 @@ export default { ...@@ -345,17 +624,23 @@ export default {
data.children.push(newChild); data.children.push(newChild);
}, },
edit(data) { edit(data) {
console.log(data, "data");
this.nameDialog = true;
}, },
remove(data) { remove(data) {
console.log("删除"); console.log("删除");
this.$confirm('门店下包含成员,删除后所有成员将被移动到“未分组”列表,是否确认继续删除?', { this.$confirm(
}).then(() => { "门店下包含成员,删除后所有成员将被移动到“未分组”列表,是否确认继续删除?",
this.$message.success("删除成功") {}
}).catch(() => { )
this.$message.info("取消删除") .then(() => {
}); this.$message.success("删除成功");
})
.catch(() => {
this.$message.info("取消删除");
});
}, },
listPick() {}, listPick() {},
testButtonClick() {}, testButtonClick() {},
...@@ -377,7 +662,7 @@ export default { ...@@ -377,7 +662,7 @@ export default {
}, */ }, */
addStore() { addStore() {
console.log("触发没"); console.log("触发没");
this.$refs.addStore.addStoreDialog = true; this.$refs.addStore.addStoreDialog = true;
}, },
getMailList() { getMailList() {
...@@ -389,9 +674,7 @@ export default { ...@@ -389,9 +674,7 @@ export default {
}) */ }) */
}, },
handleShopowner() { handleShopowner() {}
}
} }
}; };
</script> </script>
...@@ -414,7 +697,13 @@ export default { ...@@ -414,7 +697,13 @@ export default {
padding-bottom: 10px; padding-bottom: 10px;
border-bottom: 1px solid #f8f8f8; border-bottom: 1px solid #f8f8f8;
} }
.changeName {
display: flex;
align-items: center;
}
.changeName >>> .el-input {
width: 70%;
}
.end { .end {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -534,16 +823,17 @@ export default { ...@@ -534,16 +823,17 @@ export default {
height: 35px; height: 35px;
} }
.tree { .tree {
border-radius:10px; border-radius: 10px;
background: #f8f8f8; background: #f8f8f8;
} }
.tree >>> .el-tree { .tree >>> .el-tree {
background: transparent; background: transparent;
} }
.el-icon-delete { .el-icon-delete {
color: rgba(208,2,27,1); color: rgba(208, 2, 27, 1);
} }
.el-icon-delete,.el-icon-edit { .el-icon-delete,
.el-icon-edit {
font-weight: bold; font-weight: bold;
} }
</style> </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