Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-4
Overview
Overview
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
office
haoban-4
Commits
ac990eab
Commit
ac990eab
authored
Jul 21, 2020
by
无尘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加门店绑定组件
parent
7d25348f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
6 deletions
+32
-6
store-auth-dialog.vue
src/components/company/store-auth-dialog.vue
+6
-2
store-auth-group.vue
src/components/company/store-auth-group.vue
+26
-4
No files found.
src/components/company/store-auth-dialog.vue
View file @
ac990eab
...
...
@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-07-21 10:10:57
* @LastEditors: 无尘
* @LastEditTime: 2020-07-21 1
4:15:54
* @LastEditTime: 2020-07-21 1
7:21:39
-->
<!--
设置成员所在部门(回收站)
...
...
@@ -12,7 +12,7 @@
import storeAuthDialog from '@/components/company/store-auth-dialog.vue';
-->
<
template
>
<el-dialog
width=
"600px"
title=
"门店绑定
"
:visible
.
sync=
"setVisible"
append-to-body
:before-close=
"handleClose"
>
<el-dialog
width=
"600px"
:title=
"bindType == 1 ? '门店绑定':'门店共享'
"
:visible
.
sync=
"setVisible"
append-to-body
:before-close=
"handleClose"
>
<div
class=
"bind-store-body"
>
<div
class=
"el-form-item el-form-item--large"
>
<label
for=
"name"
class=
"el-form-item__label"
style=
"width: 110px;"
>
...
...
@@ -49,6 +49,10 @@ import errMsg from '@/common/js/error';
import
showMsg
from
'@/common/js/showmsg'
;
export
default
{
props
:
{
bindType
:
{
type
:
String
,
default
:
'1'
},
selectData
:
{
type
:
[
Object
,
Array
],
default
()
{
...
...
src/components/company/store-auth-group.vue
View file @
ac990eab
...
...
@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-07-21 10:10:57
* @LastEditors: 无尘
* @LastEditTime: 2020-07-21 1
1:24:14
* @LastEditTime: 2020-07-21 1
7:19:53
-->
<!--
设置成员所在部门(回收站)
...
...
@@ -100,10 +100,32 @@
/**
* 选择 tree 节点,获取选择节点信息
*/
checkGroup
:
function
(
e
)
{
checkGroup
:
function
(
e
,
checkedKeys
)
{
const
that
=
this
;
that
.
groupIds
=
that
.
$refs
.
groupTree
.
getCheckedNodes
();
that
.
$emit
(
'checkGroupIds'
,
that
.
$refs
.
groupTree
.
getCheckedNodes
());
if
(
!!
e
.
children
)
{
const
checkFlag
=
checkedKeys
.
checkedKeys
.
includes
(
e
.
id
);
that
.
$refs
.
groupTree
.
setChecked
(
e
.
id
,
checkFlag
,
true
)
e
.
children
.
forEach
(
ele
=>
{
that
.
$refs
.
groupTree
.
setChecked
(
ele
.
id
,
checkFlag
,
true
);
if
(
checkFlag
)
{
ele
.
disabled
=
true
;
}
else
{
ele
.
disabled
=
ele
.
useFlag
?
true
:
false
;
}
// 递归子级禁用和选中
});
}
// 这里还要过滤已选的数据,把非禁用的数据过滤出来
const
groups
=
that
.
$refs
.
groupTree
.
getCheckedNodes
();
if
(
!!
groups
.
length
)
{
let
arr
=
[];
groups
.
forEach
(
ele
=>
{
if
(
!
ele
.
disabled
)
{
arr
.
push
(
ele
)
}
})
that
.
$emit
(
'checkGroupIds'
,
arr
);
}
},
/**
* 获取tree 数据
...
...
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