Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
ybf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xulili
ybf
Commits
cdbb4781
Commit
cdbb4781
authored
Feb 03, 2020
by
Z
Browse files
Options
Browse Files
Download
Plain Diff
Z: Dot: store: see done.
parents
a2ab9eaf
5e5020bf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
128 additions
and
149 deletions
+128
-149
counter.js
ybf_admin/src/api/in/counter.js
+3
-1
mail.js
ybf_admin/src/api/in/mail.js
+18
-0
move.vue
ybf_admin/src/pages/in/contact/components/move.vue
+92
-89
mail.vue
ybf_admin/src/pages/in/contact/mail.vue
+15
-59
No files found.
ybf_admin/src/api/in/counter.js
View file @
cdbb4781
...
@@ -13,3 +13,5 @@ export function getList() {
...
@@ -13,3 +13,5 @@ export function getList() {
params
:
inData
params
:
inData
})
})
}
}
\ No newline at end of file
ybf_admin/src/api/in/mail.js
View file @
cdbb4781
...
@@ -48,3 +48,21 @@ export function getHistoryList(data) {
...
@@ -48,3 +48,21 @@ export function getHistoryList(data) {
params
:
inData
params
:
inData
})
})
}
}
// 获取移动分组
// /admin/auth/addressbook/synchronization
export
function
getGroup
()
{
return
request
({
url
:
'/admin/auth/addressbook/selectGroupPage'
,
method
:
'get'
,
})
}
// 修改门店名字
export
function
storeNameChange
(
data
)
{
return
request
({
url
:
'/admin/auth/stall/update'
,
method
:
'put'
,
data
})
}
\ No newline at end of file
ybf_admin/src/pages/in/contact/components/move.vue
View file @
cdbb4781
...
@@ -2,13 +2,20 @@
...
@@ -2,13 +2,20 @@
<div
class=
"ct"
>
<div
class=
"ct"
>
<el-dialog
<el-dialog
:visible
.
sync=
"moveDialog"
:visible
.
sync=
"moveDialog"
width=
"
55
%"
width=
"
30
%"
:show-close=
"false"
:show-close=
"false"
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
>
>
<div
class=
"choose"
>
<!--
<div
class=
"choose"
>
<div
class=
"title"
>
<div
class=
"cg"
>
选择分组
</div>
<div
class=
"circle"
@
click=
"handleClose"
>
<d2-icon-svg
name=
"close"
class=
"icon"
/>
</div>
</div>
<tree-transfer
<tree-transfer
:title=
"title"
:title=
"title"
:button_text=
"['添加', '删除']"
:from_data=
"fromData"
:from_data=
"fromData"
:to_data=
"toData"
:to_data=
"toData"
:defaultProps=
"
{ label: 'label' }"
:defaultProps=
"
{ label: 'label' }"
...
@@ -16,11 +23,11 @@
...
@@ -16,11 +23,11 @@
@removeBtn="remove"
@removeBtn="remove"
:mode="mode"
:mode="mode"
height="540px"
height="540px"
filter
:filter="false"
openAll
openAll
>
>
</tree-transfer>
</tree-transfer>
<
!--
<
div
class=
"title"
>
<div
class=
"title"
>
<div
class=
"cg"
>
选择分组
</div>
<div
class=
"cg"
>
选择分组
</div>
<div
class=
"circle"
@
click=
"handleClose"
>
<div
class=
"circle"
@
click=
"handleClose"
>
<d2-icon-svg
name=
"close"
class=
"icon"
/>
<d2-icon-svg
name=
"close"
class=
"icon"
/>
...
@@ -43,8 +50,21 @@
...
@@ -43,8 +50,21 @@
>
>
</el-transfer>
</el-transfer>
</div>
</div>
</div>
-->
</div>
</div>
</div>
-->
<el-tree
ref=
"tree"
class=
"tree"
show-checkbox
:check-strictly=
"true"
:data=
"treeData"
:props=
"orgData"
node-key=
"id"
@
node-click=
"handleNodeClick"
@
check-change=
"checkChange"
>
</el-tree>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"handleCancel"
size=
"small"
>
取 消
</el-button>
<el-button
@
click=
"handleCancel"
size=
"small"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"handleFinish"
size=
"small"
<el-button
type=
"primary"
@
click=
"handleFinish"
size=
"small"
...
@@ -52,14 +72,14 @@
...
@@ -52,14 +72,14 @@
>
>
</span>
</span>
</el-dialog>
</el-dialog>
<div>
<div></div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
treeTransfer
from
"el-tree-transfer"
;
import
{
getGroup
}
from
"@/api/in/mail"
;
import
{
log
}
from
"util"
;
export
default
{
export
default
{
props
:
{
props
:
{
moveDialog
:
{
moveDialog
:
{
...
@@ -68,69 +88,18 @@ export default {
...
@@ -68,69 +88,18 @@ export default {
}
}
},
},
data
()
{
data
()
{
const
generateData
=
_
=>
{
const
data
=
[];
for
(
let
i
=
1
;
i
<=
15
;
i
++
)
{
data
.
push
({
key
:
i
,
label
:
`备选项
${
i
}
`
});
}
return
data
;
};
return
{
return
{
title
:
""
,
orgData
:
{
mode
:
"transfer"
,
// transfer addressList
label
:
"name"
,
fromData
:
[
children
:
"adminStallList"
,
{
id
:
"id"
id
:
"1"
,
pid
:
0
,
label
:
"一级 1"
,
children
:
[
{
id
:
"1-1"
,
pid
:
"1"
,
label
:
"二级 1-1"
,
disabled
:
true
,
children
:
[]
},
},
{
treeData
:
[]
id
:
"1-2"
,
pid
:
"1"
,
label
:
"二级 1-2"
,
children
:
[
{
id
:
"1-2-1"
,
pid
:
"1-2"
,
children
:
[],
label
:
"二级 1-2-1"
},
{
id
:
"1-2-2"
,
pid
:
"1-2"
,
children
:
[],
label
:
"二级 1-2-2"
}
]
}
]
}
],
toData
:
[],
////////////
data
:
generateData
(),
value
:
[
1
],
value4
:
[
1
],
renderFunc
(
h
,
option
)
{
return
(
<
span
>
{
option
.
key
}
-
{
option
.
label
}
<
/span
>
);
}
};
};
},
},
components
:{
treeTransfer
},
created
()
{
this
.
getList
();
},
methods
:
{
methods
:
{
handleCancel
()
{
handleCancel
()
{
this
.
$emit
(
"handleCancel"
);
this
.
$emit
(
"handleCancel"
);
...
@@ -138,7 +107,7 @@ export default {
...
@@ -138,7 +107,7 @@ export default {
handleFinish
()
{
handleFinish
()
{
this
.
$emit
(
"handleFinish"
,
false
);
this
.
$emit
(
"handleFinish"
,
false
);
},
},
handleChange
()
{},
/*
handleChange() {},
handleClose() {
handleClose() {
this.$emit("handleCancel");
this.$emit("handleCancel");
},
},
...
@@ -156,18 +125,52 @@ export default {
...
@@ -156,18 +125,52 @@ export default {
console.log("toData:", toData);
console.log("toData:", toData);
console.log("obj:", obj);
console.log("obj:", obj);
},
},
remove
(
fromData
,
toData
,
obj
)
{
remove(fromData,
toData, obj)
{
// 树形穿梭框模式transfer时,返回参数为左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
// 树形穿梭框模式transfer时,返回参数为左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
// 通讯录模式addressList时,返回参数为右侧收件人列表、右侧抄送人列表、右侧密送人列表
// 通讯录模式addressList时,返回参数为右侧收件人列表、右侧抄送人列表、右侧密送人列表
console.log("fromData:", fromData);
console.log("fromData:", fromData);
console.log("toData:", toData);
console.log("toData:", toData);
console.log("obj:", obj);
console.log("obj:", obj);
}, */
handleNodeClick
(
item
,
node
,
self
)
{
//自己定义的editCheckId,防止单选出现混乱
this
.
editCheckId
=
item
.
id
;
this
.
$refs
.
tree
.
setCheckedKeys
([
item
.
id
]);
},
checkChange
(
item
,
node
,
self
)
{
if
(
node
==
true
)
{
this
.
editCheckId
=
item
.
id
;
this
.
$refs
.
tree
.
setCheckedKeys
([
item
.
id
]);
}
else
{
if
(
this
.
editCheckId
==
item
.
id
)
{
this
.
$refs
.
tree
.
setCheckedKeys
([
item
.
id
]);
}
}
},
getList
()
{
getGroup
().
then
(
res
=>
{
console
.
log
(
res
,
"移动的数据获取"
);
let
obj
=
{
name
:
"未分组"
,
id
:
0
};
res
.
data
=
[
obj
,
...
res
.
data
];
this
.
treeData
=
res
.
data
;
});
}
}
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.tree
>>>
.is-leaf
+
.el-checkbox
.el-checkbox__inner
{
display
:
inline-block
;
}
.tree
>>>
.el-checkbox
.el-checkbox__inner
{
display
:
none
;
}
.choose
{
.choose
{
padding
:
16px
;
padding
:
16px
;
font-size
:
16px
;
font-size
:
16px
;
...
@@ -190,7 +193,7 @@ export default {
...
@@ -190,7 +193,7 @@ export default {
padding
:
0
!important
;
padding
:
0
!important
;
}
}
.ct
>>>
.el-dialog__body
{
.ct
>>>
.el-dialog__body
{
padding
:
0
;
padding
:
40px
;
}
}
.ct
>>>
.el-transfer-panel
{
.ct
>>>
.el-transfer-panel
{
width
:
250px
;
width
:
250px
;
...
...
ybf_admin/src/pages/in/contact/mail.vue
View file @
cdbb4781
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div>
<div>
<div
class=
"title"
>
组织架构
</div>
<div
class=
"title"
>
组织架构
</div>
<div
class=
"bottom"
>
<div
class=
"bottom"
>
<div
class=
"ty"
@
click=
"getMailList"
>
<div
class=
"ty"
@
click=
"getMailList
(1)
"
>
<div>
<div>
<span>
全部
</span>
<span>
全部
</span>
<span
class=
"number"
>
{{
allNumber
}}
</span>
<span
class=
"number"
>
{{
allNumber
}}
</span>
...
@@ -26,32 +26,14 @@
...
@@ -26,32 +26,14 @@
>
>
<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"
>
<el-button
type=
"text"
size=
"mini"
@
click=
"() => edit(data)"
v-if=
"data.type"
>
<i
class=
"el-icon-edit"
></i>
</el-button>
<el-button
v-if=
"data.type"
type=
"text"
size=
"mini"
@
click=
"() => remove(node, data)"
>
<i
class=
"el-icon-delete"
></i>
</el-button>
</span>
</span>
</span>
</el-tree>
</el-tree>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"end"
>
<!--
<div
class=
"end"
>
<span
class=
"add-r"
@
click=
"addStore"
>
添加门店/专柜
</span>
<span
class=
"add-r"
@
click=
"addStore"
>
添加门店/专柜
</span>
</div>
</div>
-->
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<!--
<div
class=
"right-c"
>
-->
<!--
<div
class=
"right-c"
>
-->
...
@@ -151,24 +133,22 @@
...
@@ -151,24 +133,22 @@
@
handleCancel=
"moveDialogShow = false"
@
handleCancel=
"moveDialogShow = false"
@
handleFinish=
"removeFinish"
@
handleFinish=
"removeFinish"
></move-dialog>
></move-dialog>
<add-store
ref=
"addStore"
></add-store>
<!-- <el-dialog title="提示" v-if="nameDialog" :visible.sync="nameDialog" width="30%" >
<el-dialog
title=
"提示"
:visible
.
sync=
"nameDialog"
width=
"30%"
>
<div class="changeName">
<div class="changeName">
<span style="margin:0 10px;">门店名称:</span>
<span style="margin:0 10px;">门店名称:</span>
<el-input
v-model=
"store
N
ame"
placeholder=
"请输入名称"
></el-input>
<el-input v-model="store
.n
ame" placeholder="请输入名称"></el-input>
</div>
</div>
<span slot="footer" class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="nameDialog = false">取 消</el-button>
<el-button @click="nameDialog = false">取 消</el-button>
<el-button
type=
"primary"
@
click=
"
nameDialog = fals
e"
>
确 定
</el-button>
<el-button type="primary" @click="
handleNameChang
e">确 定</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
-->
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
MoveDialog
from
"./components/move"
;
import
MoveDialog
from
"./components/move"
;
import
AddStore
from
"./components/addStore"
;
import
{
getOrgTree
,
getAllMemberList
,
getNoGroupMember
,
getMemberById
,
storeNameChange
}
from
"@/api/in/mail"
;
import
{
getOrgTree
,
getAllMemberList
,
getNoGroupMember
,
getMemberById
}
from
"@/api/in/mail"
;
export
default
{
export
default
{
data
()
{
data
()
{
const
data1
=
[
const
data1
=
[
...
@@ -567,7 +547,6 @@ export default {
...
@@ -567,7 +547,6 @@ export default {
moveDialogShow
:
false
,
moveDialogShow
:
false
,
counterDialog
:
false
,
counterDialog
:
false
,
storeDialog
:
false
,
storeDialog
:
false
,
storeName
:
""
,
nameDialog
:
false
,
nameDialog
:
false
,
allNumber
:
""
,
allNumber
:
""
,
wNumber
:
""
,
wNumber
:
""
,
...
@@ -576,12 +555,15 @@ export default {
...
@@ -576,12 +555,15 @@ export default {
children
:
"adminStallList"
,
children
:
"adminStallList"
,
id
:
"id"
id
:
"id"
},
},
type
:
1
type
:
1
,
store
:
{
name
:
""
,
id
:
""
}
};
};
},
},
components
:
{
components
:
{
MoveDialog
,
MoveDialog
,
AddStore
},
},
created
()
{
created
()
{
this
.
getOrgTree
();
this
.
getOrgTree
();
...
@@ -626,32 +608,6 @@ export default {
...
@@ -626,32 +608,6 @@ export default {
this
.
page
.
total
=
Number
(
res
.
data
.
total
)
this
.
page
.
total
=
Number
(
res
.
data
.
total
)
})
})
},
},
append
(
data
)
{
const
newChild
=
{
id
:
id
++
,
label
:
"testtest"
,
children
:
[]
};
if
(
!
data
.
children
)
{
this
.
$set
(
data
,
"children"
,
[]);
}
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
(
"取消删除"
);
});
},
listPick
()
{},
listPick
()
{},
testButtonClick
()
{},
testButtonClick
()
{},
pagesSizeChange
()
{},
pagesSizeChange
()
{},
...
@@ -673,10 +629,10 @@ export default {
...
@@ -673,10 +629,10 @@ export default {
/* addCounter() {
/* addCounter() {
this.$refs.addCounter.counterDialog = true;
this.$refs.addCounter.counterDialog = true;
}, */
}, */
addStore
()
{
/*
addStore() {
this.$refs.addStore.addStoreDialog = true;
this.$refs.addStore.addStoreDialog = true;
},
},
*/
getMailList
(
page
)
{
getMailList
(
page
)
{
this
.
type
=
1
this
.
type
=
1
let
params
=
{
let
params
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment