Commit 317fcde5 authored by xd's avatar xd

假数据

parent 0d29d168
......@@ -11,11 +11,10 @@ export function getMailList(data) {
})
}
//通讯录管理---组织架构
export function getOrgTree(data) {
export function getOrgTree() {
return request({
url: '',
method: 'post',
data: data
url: '/admin/auth/addressbook/addressBookPage',
method: 'get',
})
}
export function getHistoryList() {
......@@ -24,3 +23,10 @@ export function getHistoryList() {
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 @@
>
<el-table-column
label="序号"
width="70"
width="120"
type="index"
align="center"
></el-table-column>
<el-table-column label="头像" align="center" >
<el-table-column label="头像" align="center" width="240" >
<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>
</el-table-column>
<el-table-column
prop="userName"
label="姓名"
align="center"
width="240"
></el-table-column>
<el-table-column
prop="userId"
......@@ -42,7 +43,7 @@
prop="bar"
label="更新时间"
align="center"
width="120"
></el-table-column>
</el-table>
</div>
......
......@@ -173,7 +173,12 @@ export default {
this.$refs.editCounter.counterDialog = true
},
handleDelete(id) {
this.$confirm('确定删除该柜组吗?', {
}).then(() => {
this.$message.success("删除成功")
}).catch(() => {
this.$message.info("取消删除")
});
},
handleEditClose() {
this.editDialog = false
......
......@@ -7,13 +7,13 @@
<div class="ty">
<div>
<span>全部</span>
<span class="number">(103)</span>
<span class="number">{{ allNumber }}</span>
</div>
</div>
<div class="ty" style="margin:15px 0;">
<div>
<span>未分组</span>
<span class="number">(8)</span>
<span class="number">{{ wNumber }}</span>
</div>
</div>
<div class="tree">
......@@ -21,15 +21,26 @@
:data="data1"
node-key="id"
:expand-on-click-node="false"
@node-click="handleTreeClick"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<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>
</el-button>
<el-button type="text" size="mini" @click="() => remove(node, data)">
<i class="el-icon-delete" ></i>
<el-button
v-if="data.type"
type="text"
size="mini"
@click="() => remove(node, data)"
>
<i class="el-icon-delete"></i>
</el-button>
</span>
</span>
......@@ -73,58 +84,49 @@
/>
</el-form-item>
<el-button class="button buttondark" size="small">搜索</el-button>
</el-form>
</div>
<el-table
stripe
class="list"
ref="multipleTable"
:data="list.main"
:data="list1.main4"
tooltip-effect="dark"
style="width: 100%"
height="calc(100% - 140px)"
>
<el-table-column type="selection" width="60"></el-table-column>
<el-table-column
prop="taskName"
prop="name"
label="姓名"
align="center"
></el-table-column>
<el-table-column
prop="id"
prop="wxId"
label="企业微信ID"
align="center"
width="120"
></el-table-column>
<el-table-column
prop="taskType"
prop="dept"
label="部门"
align="center"
width="150"
></el-table-column>
<el-table-column
prop="taskType"
prop="role"
label="角色"
align="center"
width="120"
></el-table-column>
<el-table-column
prop="bar"
prop="mobile"
label="手机号"
align="center"
width="150"
></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
prop="bar"
label="备注"
label="同步时间"
width="180"
align="center"
width="120"
></el-table-column>
<el-table-column label="角色" align="center" fixed="right" width="120" />
prop="time"
/>
</el-table>
<div class="fy">
<el-pagination
......@@ -144,8 +146,16 @@
@handleFinish="removeFinish"
></move-dialog>
<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>
</template>
......@@ -153,140 +163,365 @@
import MoveDialog from "./components/move";
// import AddCounter from "./components/addCounter";
import AddStore from "./components/addStore";
import { getMailList } from "@/api/jinjian"
import { getOrgTree } from "@/api/in/mail";
export default {
data() {
const data1 = [
{
id: 1,
label: "一级 1",
label: "亿百分科技",
children: [
{
id: 4,
label: "二级 1-1",
id: 2,
label: "一号柜组",
children: [
{
id: 9,
label: "三级 1-1-1"
id: 5,
label: "Nike门店",
type: "门店"
},
{
id: 10,
label: "三级 1-1-2"
}
]
id: 6,
label: "阿迪达斯",
type: "门店"
}
]
},
{
id: 2,
label: "一级 2",
id: 3,
label: "二号柜组",
children: [
{
id: 5,
label: "二级 2-1"
},
id: 7,
label: "vans门店",
type: "门店"
}
]
}
/* {
id: 4,
label: "三号柜组",
children: [
{
id: 6,
label: "二级 2-2"
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: 3,
label: "一级 3",
children: [
id: "1",
name: "唐珊翰",
wxId: "tangshanyu",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
},
{
id: 7,
label: "二级 3-1"
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: 8,
label: "二级 3-2"
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: 9,
label: "一级 3",
children: [
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: 10,
label: "二级 3-1"
id: "1",
name: "唐珊翰",
wxId: "tangshanyu",
dept: "销售部",
role: "店员",
mobile: "15655447788",
time: "2020/01/20"
},
{
id: 11,
label: "二级 3-2"
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"
}
];
return {
data1: JSON.parse(JSON.stringify(data1)),
list: {
main: [
{
id: "1001",
taskName: "2019年男装销售任务",
taskType: "拉新",
bar: "男装",
taskContent: "任务内容任务内容任务内容...",
sendDate: "2019/02/08"
},
{
id: "1002",
taskName: "2019年男装销售任务",
taskType: "拉新",
bar: "男装",
taskContent: "任务内容任务内容任务内容...",
sendDate: "2019/02/08"
},
{
id: "1003",
taskName: "2019年男装销售任务",
taskType: "拉新",
bar: "男装",
taskContent: "任务内容任务内容任务内容...",
sendDate: "2019/02/08"
},
{
id: "1003",
taskName: "2019年男装销售任务",
taskType: "拉新",
bar: "男装",
taskContent: "任务内容任务内容任务内容...",
sendDate: "2019/02/08"
},
{
id: "1003",
taskName: "2019年男装销售任务",
taskType: "拉新",
bar: "男装",
taskContent: "任务内容任务内容任务内容...",
sendDate: "2019/02/08"
},
{
id: "1003",
taskName: "2019年男装销售任务",
taskType: "拉新",
bar: "男装",
taskContent: "任务内容任务内容任务内容...",
sendDate: "2019/02/08"
},
{
id: "1003",
taskName: "2019年男装销售任务",
taskType: "拉新",
bar: "男装",
taskContent: "任务内容任务内容任务内容...",
sendDate: "2019/02/08"
},
{
id: "1003",
taskName: "2019年男装销售任务",
taskType: "拉新",
bar: "男装",
taskContent: "任务内容任务内容任务内容...",
sendDate: "2019/02/08"
],
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: {
......@@ -312,6 +547,7 @@ export default {
]
}
},
isShow: false,
formData: {
status: "",
......@@ -325,7 +561,16 @@ export default {
},
moveDialogShow: false,
counterDialog: false,
storeDialog: false
storeDialog: false,
storeName: "",
nameDialog: false,
allNumber: "",
wNumber: "",
orgData: {
label: "name",
children: "adminStallList",
id: "id"
}
};
},
components: {
......@@ -334,9 +579,43 @@ export default {
AddStore
},
created() {
this.getMailList()
this.getOrgTree();
this.getMailList();
},
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) {
const newChild = { id: id++, label: "testtest", children: [] };
if (!data.children) {
......@@ -345,16 +624,22 @@ export default {
data.children.push(newChild);
},
edit(data) {
console.log(data, "data");
this.nameDialog = true;
},
remove(data) {
console.log("删除");
this.$confirm('门店下包含成员,删除后所有成员将被移动到“未分组”列表,是否确认继续删除?', {
}).then(() => {
this.$message.success("删除成功")
}).catch(() => {
this.$message.info("取消删除")
this.$confirm(
"门店下包含成员,删除后所有成员将被移动到“未分组”列表,是否确认继续删除?",
{}
)
.then(() => {
this.$message.success("删除成功");
})
.catch(() => {
this.$message.info("取消删除");
});
},
listPick() {},
......@@ -389,9 +674,7 @@ export default {
}) */
},
handleShopowner() {
}
handleShopowner() {}
}
};
</script>
......@@ -414,7 +697,13 @@ export default {
padding-bottom: 10px;
border-bottom: 1px solid #f8f8f8;
}
.changeName {
display: flex;
align-items: center;
}
.changeName >>> .el-input {
width: 70%;
}
.end {
display: flex;
align-items: center;
......@@ -534,16 +823,17 @@ export default {
height: 35px;
}
.tree {
border-radius:10px;
border-radius: 10px;
background: #f8f8f8;
}
.tree >>> .el-tree {
background: transparent;
}
.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;
}
</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