Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f8ca01b2
authored
Aug 18, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交角色修改
1 parent
a0778518
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
23 deletions
html/employee/add.html
html/role/add.html
html/employee/add.html
View file @
f8ca01b
...
@@ -217,6 +217,7 @@
...
@@ -217,6 +217,7 @@
if
(
qs
(
'channel'
))
{
if
(
qs
(
'channel'
))
{
$
(
'#merchantIdText'
).
text
(
qs
(
'merchantName'
))
$
(
'#merchantIdText'
).
text
(
qs
(
'merchantName'
))
getList
(
qs
(
'merchantId'
))
getList
(
qs
(
'merchantId'
))
merchantId
=
qs
(
'merchantId'
)
$
(
'#merchantIdText'
).
removeClass
(
'hide'
)
$
(
'#merchantIdText'
).
removeClass
(
'hide'
)
$
(
'#merchantIdText'
).
addClass
(
'show'
)
$
(
'#merchantIdText'
).
addClass
(
'show'
)
}
else
{
}
else
{
...
@@ -340,17 +341,19 @@
...
@@ -340,17 +341,19 @@
if
(
id
)
{
if
(
id
)
{
getById
(
function
(
checkedList
)
{
getById
(
function
(
checkedList
)
{
visibleMerchant
=
tree
.
create
(
'visibleInferiorMerTree'
,
res
.
data
,
{
checkedList
:
checkedList
})
visibleMerchant
=
tree
.
create
(
'visibleInferiorMerTree'
,
res
.
data
,
{
checkedList
:
checkedList
})
var
node
=
visibleMerchant
.
getNodesByParam
(
'id'
,
merchantId
)
//
var node = visibleMerchant.getNodesByParam('id', merchantId)
visibleMerchant
.
checkNode
(
node
,
true
,
true
)
//
visibleMerchant.checkNode(node, true, true)
all_nodes
=
visibleMerchant
.
getNodes
()
all_nodes
=
visibleMerchant
.
getNodes
()
bindEvent
()
bindEvent
()
})
})
}
else
{
}
else
{
console
.
log
(
11
)
console
.
log
(
11
)
const
arr
=
[]
arr
.
push
(
merchantId
)
visibleMerchant
=
tree
.
create
(
'visibleInferiorMerTree'
,
res
.
data
)
visibleMerchant
=
tree
.
create
(
'visibleInferiorMerTree'
,
res
.
data
)
var
node
=
visibleMerchant
.
getNodesByParam
(
'id'
,
merchantId
)
var
node
=
visibleMerchant
.
getNodesByParam
(
'id'
,
merchantId
,
{
checkedList
:
arr
}
)
console
.
log
(
node
,
visibleMerchant
)
//
console.log(node, visibleMerchant)
// node.checked = true
// node.checked = true
visibleMerchant
.
checkNode
(
node
,
true
,
true
)
visibleMerchant
.
checkNode
(
node
,
true
,
true
)
// visibleMerchant.updateNode(node)
// visibleMerchant.updateNode(node)
...
...
html/role/add.html
View file @
f8ca01b
...
@@ -347,6 +347,7 @@
...
@@ -347,6 +347,7 @@
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
accountType
.
append
(
str
)
accountType
.
append
(
str
)
if
(
roleid
)
{
if
(
roleid
)
{
console
.
log
(
check_arr
)
// 角色权限的check
// 角色权限的check
for
(
var
i
=
0
;
i
<
check_arr
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
check_arr
.
length
;
i
++
)
{
if
(
check_arr
[
i
].
accounttypeId
==
item
.
accounttypeId
)
{
if
(
check_arr
[
i
].
accounttypeId
==
item
.
accounttypeId
)
{
...
@@ -356,25 +357,21 @@
...
@@ -356,25 +357,21 @@
active
.
tabAdd
(
obj
)
active
.
tabAdd
(
obj
)
var
selectArr
=
[]
var
selectArr
=
[]
var
menuData
=
[]
var
menuData
=
[]
for
(
var
j
=
0
;
j
<
productData
.
productList
.
length
;
j
++
)
{
if
(
productData
.
productList
)
{
for
(
var
j
=
0
;
j
<
productData
.
productList
.
length
;
j
++
)
{
menuData
=
productData
.
productList
[
j
]
menuData
=
productData
.
productList
[
j
]
selectArr
.
push
(
menuData
.
productId
)
selectArr
.
push
(
menuData
.
productId
)
active
.
treeTabAdd
(
active
.
treeTabAdd
({
{
name
:
menuData
.
productName
,
name
:
menuData
.
productName
,
value
:
menuData
.
productId
value
:
menuData
.
productId
},
},
item
.
accounttypeId
,
item
.
products
,
menuData
.
idList
item
.
accounttypeId
,
)}
item
.
products
,
selectEl
[
item
.
accounttypeId
].
setValue
(
selectArr
)
menuData
.
idList
var
filterName
=
'treeTab'
+
item
.
accounttypeId
)
var
productId
=
'tab_'
+
item
.
accounttypeId
+
'_'
+
item
.
products
[
0
].
productId
console
.
log
(
filterName
,
productId
)
active
.
tabChange
(
filterName
,
productId
)
}
}
// // 产品的回显
selectEl
[
item
.
accounttypeId
].
setValue
(
selectArr
)
var
filterName
=
'treeTab'
+
item
.
accounttypeId
var
productId
=
'tab_'
+
item
.
accounttypeId
+
'_'
+
item
.
products
[
0
].
productId
active
.
tabChange
(
filterName
,
productId
)
// 树的回显
}
}
}
}
if
(
check_arr
.
length
!=
0
)
{
if
(
check_arr
.
length
!=
0
)
{
...
@@ -396,15 +393,17 @@
...
@@ -396,15 +393,17 @@
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
console
.
log
(
res
.
data
,
'详情'
)
console
.
log
(
res
.
data
,
'详情'
)
var
data
=
res
.
data
var
accounttypeId
=
''
var
accounttypeId
=
''
if
(
res
.
data
.
responseList
)
{
if
(
data
.
responseList
)
{
check_arr
=
res
.
data
.
responseList
check_arr
=
data
.
responseList
}
}
console
.
log
(
check_arr
,
'jklj'
)
console
.
log
(
check_arr
,
'jklj'
)
// findMenuFunTreeByMerId(
)
findMenuFunTreeByMerId
(
data
.
merchantId
)
form
.
val
(
'roleForm'
,
{
form
.
val
(
'roleForm'
,
{
roleName
:
res
.
data
.
roleName
,
roleName
:
data
.
roleName
,
roleDescription
:
res
.
data
.
roleDescription
roleDescription
:
data
.
roleDescription
,
merchantId
:
data
.
merchantId
})
})
}
}
})
})
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment