Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0874a2e9
authored
2023-08-23 13:26:30 +0800
by
xiaomiao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
ed170e10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
15 deletions
src/views/registerBook/djbFrame.vue
src/views/registerBook/djbFrame.vue
View file @
0874a2e
...
...
@@ -71,6 +71,8 @@ export default {
//左侧树形结构数据
treedata
:
[],
sfqdata
:
[],
keyy
:
""
,
iskey
:
""
,
defaultNode
:
""
,
defaultProps
:
{
value
:
"id"
,
...
...
@@ -109,12 +111,12 @@ export default {
return
item
.
bdcdyid
==
val
.
bdcdyid
;
});
this
.
activeName
=
index
this
.
setstyle
(
index
,
0
);
this
.
setstyle
(
index
,
0
,
this
.
iskey
);
}
else
{
this
.
sfqdata
.
push
(
loadsfqData
(
res
.
result
,
val
.
bdcdyh
,
val
.
bdcdyid
));
this
.
activeName
=
this
.
sfqdata
.
length
-
1
;
this
.
$nextTick
(()
=>
{
this
.
setstyle
(
this
.
sfqdata
.
length
-
1
,
0
);
this
.
setstyle
(
this
.
sfqdata
.
length
-
1
,
0
,
this
.
iskey
);
})
}
}
...
...
@@ -146,9 +148,17 @@ export default {
{
linShi
:
0
,
xianShi
:
0
,
liShi
:
0
},
this
.
formData
.
bdcdylx
||
""
);
this
.
$refs
.
tree
.
setCurrentKey
(
this
.
defaultNode
.
id
);
//data[0].id为默认选中的节点
this
.
loadComponent
(
this
.
defaultNode
.
form
);
this
.
setstyle
(
0
,
0
);
this
.
sfqdata
[
0
].
children
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
id
==
this
.
defaultNode
.
id
){
this
.
iskey
=
index
}
})
// this.$refs.tree.setCurrentKey(this.defaultNode.id); //data[0].id为默认选中的节点
// this.loadComponent(this.defaultNode.form);
this
.
setstyle
(
0
,
0
,
this
.
iskey
);
});
}
});
...
...
@@ -173,20 +183,26 @@ export default {
* @author: renchao
* 设置样式和点击定位到当前功能
*/
setstyle
(
newindex
,
index
)
{
if
(
index
==
0
){
this
.
loadComponent
(
this
.
$refs
.
sfq
[
newindex
].
$children
[
0
].
$attrs
.
re
.
form
);
}
let
dpme
=
this
.
$refs
.
sfq
[
newindex
].
$children
[
0
].
$el
if
(
index
!=
0
)
{
dpme
.
style
.
backgroundColor
=
"#ffffff"
;
dpme
.
style
.
color
=
"black"
;
dpme
.
style
.
border
=
"none"
;
}
else
{
setstyle
(
newindex
,
index
,
key
)
{
if
(
key
!=
undefined
||
this
.
keyy
==
index
){
if
(
key
!=
undefined
){
this
.
keyy
=
key
}
this
.
loadComponent
(
this
.
$refs
.
sfq
[
newindex
].
$children
[
this
.
keyy
].
$attrs
.
re
.
form
);
let
dpme
=
this
.
$refs
.
sfq
[
newindex
].
$children
[
this
.
keyy
].
$el
dpme
.
style
.
backgroundColor
=
"#f5f5f5"
;
dpme
.
style
.
color
=
"#0079fe"
;
dpme
.
style
.
borderRight
=
"4px solid #0079fe"
;
}
else
{
let
dpme
=
this
.
$refs
.
sfq
[
newindex
].
$children
[
this
.
keyy
].
$el
dpme
.
style
.
backgroundColor
=
"#ffffff"
;
dpme
.
style
.
color
=
"black"
;
dpme
.
style
.
border
=
"none"
;
}
},
/**
* @description: addlist
...
...
@@ -195,12 +211,21 @@ export default {
* 新增列表功能
*/
addlist
(
data
,
index
)
{
if
(
index
!=
undefined
){
let
newindex
=
this
.
sfqdata
.
findIndex
((
item
)
=>
{
return
item
.
bdcdyid
==
data
.
bdcdyid
;
});
this
.
setstyle
(
newindex
,
index
);
this
.
currentSelectProps
.
bdcdyid
=
data
.
bdcdyid
;
this
.
loadComponent
(
data
.
form
);
}
else
{
let
newindex
=
this
.
sfqdata
.
findIndex
((
item
)
=>
{
return
item
.
bdcdyid
==
data
.
bdcdyid
;
});
this
.
setstyle
(
newindex
,
index
,
this
.
iskey
);
this
.
currentSelectProps
.
bdcdyid
=
data
.
bdcdyid
;
}
},
/**
* @description: loadComponent
...
...
Please
register
or
sign in
to post a comment