Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
d4f7452d
Commit
d4f7452d
authored
May 14, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
3ea749c5
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
290 additions
and
141 deletions
+290
-141
iview-admin/src/components/main/components/tags-nav/tags-nav.vue
+1
-1
iview-admin/src/components/tables/tables.vue
+13
-13
iview-admin/src/view/components/split-pane/split-pane.vue
+3
-1
iview-admin/src/view/components/split-pane2/split-pane2.vue
+58
-0
iview-admin/src/view/components/tables/biztables.vue
+5
-2
iview-admin/src/view/components/tables/forms/childs/switchs.vue
+5
-2
iview-admin/src/view/components/tables/forms/forms.vue
+17
-10
iview-admin/src/view/components/tables/forms/jsoneditor.vue
+102
-50
iview-admin/src/view/userinfo/orginfo_page.vue
+83
-62
iview-admin/src/view/userinfo/userinfo_page.vue
+3
-0
No files found.
iview-admin/src/components/main/components/tags-nav/tags-nav.vue
View file @
d4f7452d
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<div
class=
"scroll-outer"
ref=
"scrollOuter"
@
DOMMouseScroll=
"handlescroll"
@
mousewheel=
"handlescroll"
>
<div
class=
"scroll-outer"
ref=
"scrollOuter"
@
DOMMouseScroll=
"handlescroll"
@
mousewheel=
"handlescroll"
>
<div
ref=
"scrollBody"
class=
"scroll-body"
:style=
"
{left: tagBodyLeft + 'px'}">
<div
ref=
"scrollBody"
class=
"scroll-body"
:style=
"
{left: tagBodyLeft + 'px'}">
<transition-group
name=
"taglist-moving-animation"
>
<transition-group
name=
"taglist-moving-animation"
>
<Tag
<Tag
style=
"border:none"
type=
"dot"
type=
"dot"
v-for=
"(item, index) in list"
v-for=
"(item, index) in list"
ref=
"tagsPageOpened"
ref=
"tagsPageOpened"
...
...
iview-admin/src/components/tables/tables.vue
View file @
d4f7452d
...
@@ -189,12 +189,15 @@ export default {
...
@@ -189,12 +189,15 @@ export default {
edittingText
:
""
,
edittingText
:
""
,
searchValue
:
""
,
searchValue
:
""
,
searchKey
:
""
,
searchKey
:
""
,
tblheight
:
300
tblheight
:
300
};
};
},
},
methods
:
{
methods
:
{
getHeight
(){
setHeight
(
h
)
{
return
window
.
innerHeight
-
this
.
$refs
.
tablesMain
.
$el
.
offsetTop
-
160
return
this
.
tblheight
=
h
;
},
getHeight
()
{
return
window
.
innerHeight
-
this
.
$refs
.
tablesMain
.
$el
.
offsetTop
-
202
;
},
},
advSearch
()
{
advSearch
()
{
this
.
$emit
(
"on-adv-search"
);
this
.
$emit
(
"on-adv-search"
);
...
@@ -261,14 +264,13 @@ export default {
...
@@ -261,14 +264,13 @@ export default {
props
:
{
props
:
{
type
:
btninfo
.
type
,
type
:
btninfo
.
type
,
disabled
:
disabled
:
params
.
row
.
isSystem
&&
params
.
row
.
isSystem
&&
btninfo
.
key
==
"delete"
(
btninfo
.
key
==
"delete"
)
?
true
?
true
:
false
:
false
},
},
on
:
{
on
:
{
click
:
()
=>
{
click
:
()
=>
{
vmobj
.
$emit
(
"on-exec"
,
btninfo
.
key
,
params
.
row
,
btninfo
);
vmobj
.
$emit
(
"on-exec"
,
btninfo
.
key
,
params
.
row
,
btninfo
);
}
}
}
}
},
},
...
@@ -390,17 +392,15 @@ export default {
...
@@ -390,17 +392,15 @@ export default {
//if (this.searchable) this.handleSearch();
//if (this.searchable) this.handleSearch();
}
}
},
},
create
(){
create
()
{},
},
mounted
()
{
mounted
()
{
this
.
handleColumns
(
this
.
columns
);
this
.
handleColumns
(
this
.
columns
);
this
.
setDefaultSearchKey
();
this
.
setDefaultSearchKey
();
this
.
handleTableData
();
this
.
handleTableData
();
this
.
tblheight
=
this
.
getHeight
()
// this.tblheight = this.getHeight();
$
(
window
).
resize
(()
=>
{
// $(window).resize(() =>
{
this
.
tblheight
=
this
.
getHeight
()
// this.tblheight = this.getHeight();
})
// });
},
},
computed
:
{
computed
:
{
searchcols
:
function
()
{
searchcols
:
function
()
{
...
...
iview-admin/src/view/components/split-pane/split-pane.vue
View file @
d4f7452d
...
@@ -10,7 +10,9 @@
...
@@ -10,7 +10,9 @@
</div>
</div>
</split-pane>
</split-pane>
</div>
</div>
<div
slot=
"right"
class=
"pane right-pane"
></div>
<div
slot=
"right"
class=
"pane right-pane"
>
<slot
name=
"right"
></slot>
</div>
</split-pane>
</split-pane>
</div>
</div>
</
template
>
</
template
>
...
...
iview-admin/src/view/components/split-pane2/split-pane2.vue
0 → 100644
View file @
d4f7452d
<
template
>
<div
class=
"split-pane-page-wrapper"
>
<split-pane
v-model=
"offset"
@
on-moving=
"handleMoving"
>
<div
slot=
"left"
class=
"pane left-pane"
>
<slot
name=
"left"
></slot>
</div>
<div
slot=
"right"
class=
"pane right-pane"
>
<slot
name=
"right"
></slot>
</div>
</split-pane>
</div>
</
template
>
<
script
>
import
SplitPane
from
'_c/split-pane'
import
Icons
from
'_c/icons'
export
default
{
name
:
'split_pane_page'
,
components
:
{
SplitPane
,
Icons
},
data
()
{
return
{
offset
:
0.2
,
offsetVertical
:
'250px'
}
},
methods
:
{
handleMoving
(
e
)
{
console
.
log
(
e
.
atMin
,
e
.
atMax
)
}
}
}
</
script
>
<
style
lang=
"less"
>
.split-pane-page-wrapper
{
height
:
100%
;
.pane{
width
:
100%
;
height
:
100%
;
&.left-pane{
}
&
.right-pane
{
}
&
.top-pane
{
}
&
.bottom-pane
{
}
}
}
</
style
>
iview-admin/src/view/components/tables/biztables.vue
View file @
d4f7452d
<
template
>
<
template
>
<div>
<div
style=
"height:100%"
>
<Card
style=
"height:100%"
>
<Card
style=
"height:100%"
>
<Drawer
<Drawer
placement=
"right"
placement=
"right"
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
>
{{
bt
.
title
}}
</Button>
>
{{
bt
.
title
}}
</Button>
</
template
>
</
template
>
</tables>
</tables>
<div
style=
"text-align:center"
>
<div
style=
"text-align:center
;margin-top:10px
"
>
<Page
<Page
:total=
"pageInfo.total"
:total=
"pageInfo.total"
:page-size-opts=
"[15,30,50,100,200,500]"
:page-size-opts=
"[15,30,50,100,200,500]"
...
@@ -204,6 +204,9 @@ export default {
...
@@ -204,6 +204,9 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
setHeight
(
h
)
{
return
this
.
$refs
.
tables
.
setHeight
(
h
);
},
ondrawvisable
(
v
)
{
ondrawvisable
(
v
)
{
if
(
v
)
{
if
(
v
)
{
this
.
initZIndex
=
this
.
initZIndex
;
this
.
initZIndex
=
this
.
initZIndex
;
...
...
iview-admin/src/view/components/tables/forms/childs/switchs.vue
View file @
d4f7452d
<
template
>
<
template
>
<i-switch
v-model=
"switch1"
size=
"large"
:true-color=
"truecolor"
:false-color=
"falsecolor"
>
<i-switch
v-model=
"switch1"
size=
"large"
:true-color=
"truecolor"
:false-color=
"falsecolor"
@
on-change=
"onchange"
>
<span
slot=
"open"
>
{{
openlabel
}}
</span>
<span
slot=
"open"
>
{{
openlabel
}}
</span>
<span
slot=
"close"
>
{{
closelabel
}}
</span>
<span
slot=
"close"
>
{{
closelabel
}}
</span>
</i-switch>
</i-switch>
...
@@ -23,11 +23,13 @@ export default {
...
@@ -23,11 +23,13 @@ export default {
truecolor
:
String
,
truecolor
:
String
,
falsecolor
:
String
,
falsecolor
:
String
,
openlabel
:
String
,
openlabel
:
String
,
closelabel
:
String
closelabel
:
String
,
propname
:
String
},
},
data
()
{
data
()
{
return
{
return
{
switch1
:
this
.
value
,
switch1
:
this
.
value
,
currentprop
:
this
.
propname
};
};
},
},
watch
:
{
watch
:
{
...
@@ -38,6 +40,7 @@ export default {
...
@@ -38,6 +40,7 @@ export default {
methods
:
{
methods
:
{
onchange
(
v
)
{
onchange
(
v
)
{
this
.
$emit
(
"change"
,
this
.
switch1
);
this
.
$emit
(
"change"
,
this
.
switch1
);
this
.
$emit
(
"changewithprop"
,
this
.
switch1
,
this
.
currentprop
);
}
}
},
},
created
()
{
created
()
{
...
...
iview-admin/src/view/components/tables/forms/forms.vue
View file @
d4f7452d
...
@@ -76,6 +76,8 @@
...
@@ -76,6 +76,8 @@
:closelabel=
"ctl.closetext"
:closelabel=
"ctl.closetext"
:truecolor=
"ctl.truecolor"
:truecolor=
"ctl.truecolor"
:falsecolor=
"ctl.falsecolor"
:falsecolor=
"ctl.falsecolor"
:propname=
"ctl.prop"
@
changewithprop=
"controlCtl"
></Switchs>
></Switchs>
</
template
>
</
template
>
<
template
v-if=
"ctl.type=='checkgroup'"
>
<
template
v-if=
"ctl.type=='checkgroup'"
>
...
@@ -216,6 +218,8 @@
...
@@ -216,6 +218,8 @@
:closelabel=
"ctl.closetext"
:closelabel=
"ctl.closetext"
:truecolor=
"ctl.truecolor"
:truecolor=
"ctl.truecolor"
:falsecolor=
"ctl.falsecolor"
:falsecolor=
"ctl.falsecolor"
:propname=
"ctl.prop"
@
changewithprop=
"controlCtl"
></Switchs>
></Switchs>
</
template
>
</
template
>
<
template
v-if=
"ctl.type=='checkgroup'"
>
<
template
v-if=
"ctl.type=='checkgroup'"
>
...
@@ -331,9 +335,12 @@ export default {
...
@@ -331,9 +335,12 @@ export default {
},
},
computed
:
{},
computed
:
{},
methods
:
{
methods
:
{
controlCtl
(
v
,
prop
)
{
this
.
$emit
(
"controlctl"
,
v
,
prop
,
this
)
},
setHeight
()
{
setHeight
()
{
let
domel
=
this
.
$refs
.
formcard
.
$el
;
let
domel
=
this
.
$refs
.
formcard
.
$el
;
let
h
=
window
.
innerHeight
-
domel
.
offsetTop
;
let
h
=
window
.
innerHeight
-
domel
.
offsetTop
-
3
;
console
.
log
(
"======================="
,
h
);
console
.
log
(
"======================="
,
h
);
$
(
domel
).
css
(
"height"
,
h
+
"px"
);
$
(
domel
).
css
(
"height"
,
h
+
"px"
);
},
},
...
@@ -399,17 +406,17 @@ export default {
...
@@ -399,17 +406,17 @@ export default {
return
;
return
;
}
}
m
.
ctls
.
forEach
(
ctl
=>
{
m
.
ctls
.
forEach
(
ctl
=>
{
this
.
$set
(
this
.
ctlVisable
,
ctl
.
prop
,
true
);
this
.
$set
(
this
.
ctlVisable
,
ctl
.
prop
,
ctl
.
isHide
?
false
:
true
);
if
(
ctl
.
rules
&&
ctl
.
rules
.
length
>=
0
)
{
if
(
ctl
.
rules
&&
ctl
.
rules
.
length
>=
0
)
{
console
.
log
(
//
console.log(
"ctl.rules========================"
,
//
"ctl.rules========================",
ctl
.
prop
,
//
ctl.prop,
ctl
.
rules
//
ctl.rules
);
//
);
ctl
.
rules
.
forEach
(
r
=>
{
ctl
.
rules
.
forEach
(
r
=>
{
if
(
r
.
iscustom
)
{
if
(
r
.
iscustom
)
{
console
.
log
(
"validate................"
);
//
console.log("validate................");
r
.
validator
=
this
[
"validatex"
];
r
.
validator
=
this
[
"validatex"
];
}
}
});
});
...
@@ -427,8 +434,8 @@ export default {
...
@@ -427,8 +434,8 @@ export default {
}
else
if
(
ctl
.
type
==
"number"
)
{
}
else
if
(
ctl
.
type
==
"number"
)
{
this
.
$set
(
this
.
formModel
,
ctl
.
prop
,
0
);
this
.
$set
(
this
.
formModel
,
ctl
.
prop
,
0
);
}
else
{
}
else
{
console
.
log
(
"============="
);
//
console.log("=============");
console
.
log
(
"============="
,
ctl
.
prop
);
//
console.log("=============", ctl.prop);
this
.
$set
(
this
.
$set
(
this
.
formModel
,
this
.
formModel
,
ctl
.
prop
,
ctl
.
prop
,
...
...
iview-admin/src/view/components/tables/forms/jsoneditor.vue
View file @
d4f7452d
<
template
>
<
template
>
<div
id=
"orgcard"
>
<div
id=
"orgcard"
style=
"height:100%"
>
<Card
style=
"height:100%"
>
<Card
style=
"height:100%"
>
<Alert
type=
"warning"
>
<template
slot=
"desc"
>
当前节点:
{{
currentData
?
currentData
.
title
:
"请选择操作节点"
}}
</
template
>
</Alert>
<Tree
v-if=
"!isupdate"
:data=
"treedata"
:render=
"renderContent"
class=
"ptree"
></Tree>
<Tree
v-if=
"!isupdate"
:data=
"treedata"
:render=
"renderContent"
class=
"ptree"
></Tree>
<Drawer
<Drawer
ref=
"eddrawer"
ref=
"eddrawer"
...
@@ -11,7 +17,7 @@
...
@@ -11,7 +17,7 @@
width=
"70"
width=
"70"
@
on-visible-change=
"ondrawvisable"
@
on-visible-change=
"ondrawvisable"
>
>
<NodeForm
ref=
"nodeform"
:fminfo=
"nodeinfo"
>
<NodeForm
ref=
"nodeform"
:fminfo=
"nodeinfo"
@
controlctl=
"controlctl"
>
<
template
v-slot:default=
"slotProps"
>
<
template
v-slot:default=
"slotProps"
>
<Button
type=
"text"
@
click=
"doexec('ok',slotProps.fm)"
>
保存
</Button>
<Button
type=
"text"
@
click=
"doexec('ok',slotProps.fm)"
>
保存
</Button>
<Button
type=
"text"
@
click=
"doexec('cancel',slotProps.fm)"
>
取消
</Button>
<Button
type=
"text"
@
click=
"doexec('cancel',slotProps.fm)"
>
取消
</Button>
...
@@ -25,6 +31,7 @@
...
@@ -25,6 +31,7 @@
import
{
getApp
,
saveAuths
,
findAuthsByRoles
}
from
"@/api/meta"
;
import
{
getApp
,
saveAuths
,
findAuthsByRoles
}
from
"@/api/meta"
;
import
NodeForm
from
"./forms.vue"
;
import
NodeForm
from
"./forms.vue"
;
import
config
from
"@/config"
;
import
config
from
"@/config"
;
export
default
{
export
default
{
name
:
"jsoneditor"
,
name
:
"jsoneditor"
,
props
:
{
props
:
{
...
@@ -47,13 +54,72 @@ export default {
...
@@ -47,13 +54,72 @@ export default {
return
{
return
{
isupdate
:
false
,
isupdate
:
false
,
currentData
:
null
,
currentData
:
null
,
orgpath
:
"/root"
,
code
:
"root"
,
code
:
"root"
,
treedata
:
[],
treedata
:
[],
treedataclone
:
[],
originalMetaInfo
:
[
{
title
:
"基本信息"
,
key
:
"baseinfo"
,
cols
:
1
,
ctls
:
[
{
type
:
"input"
,
label
:
"序号"
,
prop
:
"seq"
,
placeHolder
:
"请输入序号"
,
style
:
{
width
:
"165px"
},
rules
:
[{
required
:
true
,
message
:
" "
,
trigger
:
"blur"
}]
},
{
type
:
"input"
,
label
:
"编码"
,
prop
:
"code"
,
placeHolder
:
"请输入编码"
,
style
:
""
,
rules
:
[{
required
:
true
,
message
:
" "
,
trigger
:
"blur"
}]
},
{
type
:
"input"
,
label
:
"标题"
,
prop
:
"title"
,
placeHolder
:
"请输入节点标题"
,
style
:
""
,
rules
:
[{
required
:
true
,
message
:
" "
,
trigger
:
"blur"
}],
default
:
"点击修改"
}
]
},
{
title
:
"节点路径"
,
key
:
"baseinfo"
,
cols
:
2
,
ctls
:
[
{
type
:
"input"
,
label
:
"KEY"
,
prop
:
"nodeKey"
,
placeHolder
:
"请输入编码"
,
disabled
:
true
,
style
:
""
,
rules
:
[]
},
{
type
:
"input"
,
label
:
"路径"
,
prop
:
"orgpath"
,
placeHolder
:
""
,
disabled
:
true
,
style
:
""
,
rules
:
[]
}
]
}
],
originalRoot
:
{
originalRoot
:
{
title
:
"使用者定义"
,
title
:
"使用者定义"
,
code
:
"root"
,
expand
:
true
,
expand
:
true
,
orgpath
:
"/root"
,
render
:
(
h
,
{
root
,
node
,
data
})
=>
{
render
:
(
h
,
{
root
,
node
,
data
})
=>
{
return
h
(
return
h
(
"span"
,
"span"
,
...
@@ -121,68 +187,35 @@ export default {
...
@@ -121,68 +187,35 @@ export default {
type
:
"default"
,
type
:
"default"
,
size
:
"small"
size
:
"small"
},
},
nodeinfo
:
{
nodeinfo
:
{},
name
:
"节点编辑"
,
treeheight
:
0
main
:
[
{
title
:
"基本信息"
,
key
:
"baseinfo"
,
cols
:
1
,
ctls
:
[
{
type
:
"input"
,
label
:
"标题"
,
prop
:
"title"
,
placeHolder
:
"请输入节点标题"
,
style
:
""
,
rules
:
[{
required
:
true
,
message
:
" "
,
trigger
:
"blur"
}],
default
:
"点击修改"
},
{
type
:
"input"
,
label
:
"编码"
,
prop
:
"code"
,
placeHolder
:
"请输入编码"
,
style
:
""
,
rules
:
[{
required
:
true
,
message
:
" "
,
trigger
:
"blur"
}]
}
]
}
],
lists
:
null
}
};
};
},
},
mounted
()
{
mounted
()
{
this
.
initTree
();
this
.
initTree
();
this
.
$nextTick
(()
=>
{
this
.
setHeight
();
});
$
(
window
).
resize
(()
=>
{
this
.
setHeight
();
});
},
},
created
()
{
created
()
{
if
(
this
.
metainfo
)
{
if
(
this
.
metainfo
)
{
this
.
nodeinfo
=
Object
.
assign
(
this
.
nodeinfo
,
this
.
metainfo
);
this
.
nodeinfo
=
Object
.
assign
(
this
.
nodeinfo
,
this
.
metainfo
);
this
.
nodeinfo
.
main
=
this
.
nodeinfo
.
main
.
concat
(
this
.
originalMetaInfo
);
}
}
window
.
modiTreeNodeByCode
=
function
(
treedata
,
newobj
,
parentitem
)
{
window
.
modiTreeNodeByCode
=
function
(
treedata
,
newobj
,
parentitem
)
{
treedata
.
forEach
(
item
=>
{
treedata
.
forEach
(
item
=>
{
if
(
item
.
nodeKey
==
newobj
.
nodeKey
)
{
if
(
item
.
nodeKey
==
newobj
.
nodeKey
)
{
item
=
Object
.
assign
(
item
,
newobj
);
item
=
Object
.
assign
(
item
,
newobj
);
return
;
}
}
if
(
item
.
children
)
{
if
(
item
.
children
)
{
if
(
parentitem
)
{
if
(
parentitem
)
{
item
.
orgpath
=
parentitem
.
orgpath
+
"/"
+
item
.
code
;
item
.
orgpath
=
parentitem
.
orgpath
+
"/"
+
item
.
code
;
}
else
{
}
else
{
item
.
orgpath
=
item
.
code
;
item
.
orgpath
=
item
.
code
;
}
}
item
.
children
.
sort
((
item1
,
item2
)
=>
{
item
.
children
.
sort
((
item1
,
item2
)
=>
{
return
item1
.
seq
<
item2
.
seq
;
return
item1
.
seq
<
item2
.
seq
;
});
});
modiTreeNodeByCode
(
item
.
children
,
newobj
);
modiTreeNodeByCode
(
item
.
children
,
newobj
,
item
);
}
else
{
}
else
{
if
(
parentitem
)
{
if
(
parentitem
)
{
item
.
orgpath
=
parentitem
.
orgpath
+
"/"
+
item
.
code
;
item
.
orgpath
=
parentitem
.
orgpath
+
"/"
+
item
.
code
;
...
@@ -194,26 +227,37 @@ export default {
...
@@ -194,26 +227,37 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
ondrawvisable
()
{},
setCtlVisable
(
prop
,
b
)
{
this
.
$refs
.
nodeform
.
setCtlVisable
(
prop
,
b
);
},
controlctl
(
v
,
prop
,
fm
)
{
this
.
$emit
(
"controlctl"
,
v
,
prop
,
fm
);
},
ondrawvisable
(
v
)
{
this
.
$emit
(
"drawaction"
,
v
,
this
.
$refs
.
nodeform
);
},
resetForm
()
{
resetForm
()
{
this
.
$refs
.
nodeform
.
resetForm
();
this
.
$refs
.
nodeform
.
resetForm
();
this
.
$refs
.
nodeform
.
formModel
.
children
=
[];
this
.
$refs
.
nodeform
.
formModel
.
children
=
[];
},
},
refreshTree
()
{
this
.
isupdate
=
true
;
this
.
$nextTick
(()
=>
{
this
.
isupdate
=
false
;
});
},
doexec
(
k
,
fm
)
{
doexec
(
k
,
fm
)
{
if
(
k
==
"ok"
)
{
if
(
k
==
"ok"
)
{
this
.
$refs
.
nodeform
.
validate
(
v
=>
{
this
.
$refs
.
nodeform
.
validate
(
v
=>
{
console
.
log
(
v
);
console
.
log
(
v
);
if
(
v
)
{
if
(
v
)
{
this
.
isupdate
=
true
;
let
modiobj
=
this
.
$refs
.
nodeform
.
getNewModel
();
let
modiobj
=
this
.
$refs
.
nodeform
.
getNewModel
();
modiTreeNodeByCode
(
this
.
treedata
,
modiobj
,
null
);
modiTreeNodeByCode
(
this
.
treedata
,
modiobj
,
null
);
this
.
showedform
=
false
;
this
.
showedform
=
false
;
this
.
$emit
(
"modisave"
,
this
.
treedata
,
modiobj
);
this
.
$emit
(
"modisave"
,
this
.
treedata
,
modiobj
);
this
.
resetForm
();
this
.
resetForm
();
console
.
log
(
this
.
treedata
);
console
.
log
(
this
.
treedata
);
this
.
$nextTick
(()
=>
{
//this.refreshTree()//使用者调用刷新
this
.
isupdate
=
false
;
});
}
}
});
});
}
else
{
}
else
{
...
@@ -247,6 +291,7 @@ export default {
...
@@ -247,6 +291,7 @@ export default {
this
.
originalRoot
,
this
.
originalRoot
,
originalData
[
0
]
originalData
[
0
]
);
);
console
.
log
(
originalData
);
console
.
log
(
console
.
log
(
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,"
,
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,"
,
this
.
originalRoot
this
.
originalRoot
...
@@ -264,6 +309,7 @@ export default {
...
@@ -264,6 +309,7 @@ export default {
let
el
=
$orgcard
.
get
()[
0
];
let
el
=
$orgcard
.
get
()[
0
];
let
h
=
window
.
innerHeight
-
el
.
offsetTop
-
30
;
let
h
=
window
.
innerHeight
-
el
.
offsetTop
-
30
;
$orgcard
.
css
(
"height"
,
h
+
"px"
);
$orgcard
.
css
(
"height"
,
h
+
"px"
);
this
.
treeheight
=
h
;
},
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
renderContent
(
h
,
{
root
,
node
,
data
})
{
return
h
(
return
h
(
...
@@ -279,7 +325,12 @@ export default {
...
@@ -279,7 +325,12 @@ export default {
"span"
,
"span"
,
{
{
on
:
{
on
:
{
click
:
()
=>
{
click
:
$event
=>
{
$
(
"span"
,
".ptree"
).
removeClass
(
"spansel"
);
$
(
$event
.
target
)
.
parent
()
.
parent
()
.
addClass
(
"spansel"
);
this
.
onselnode
(
node
,
data
);
this
.
onselnode
(
node
,
data
);
}
}
}
}
...
@@ -358,6 +409,7 @@ export default {
...
@@ -358,6 +409,7 @@ export default {
.ptree
span
:hover
{
.ptree
span
:hover
{
background-color
:
lightgray
;
background-color
:
lightgray
;
}
}
.spansel
{
.spansel
{
background-color
:
lightgray
;
background-color
:
lightgray
;
}
}
...
...
iview-admin/src/view/userinfo/orginfo_page.vue
View file @
d4f7452d
<
template
>
<
template
>
<div>
<div
id=
"orgdiv"
>
<OrgEditor
:initData=
"initData"
:metainfo=
"metainfo"
></OrgEditor>
<SplitPanel>
<OrgEditor
slot=
"left"
ref=
"orgtree"
:initData=
"initData"
:metainfo=
"metainfo"
@
controlctl=
"controlctl"
@
drawaction=
"drawaction"
></OrgEditor>
<UserInfo
ref=
"userinfo"
slot=
"right"
></UserInfo>
</SplitPanel>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getApp
,
saveAuths
,
findAuthsByRoles
}
from
"@/api/meta"
;
import
{
getApp
,
saveAuths
,
findAuthsByRoles
}
from
"@/api/meta"
;
import
OrgEditor
from
"@/view/components/tables/forms/jsoneditor.vue"
;
import
OrgEditor
from
"@/view/components/tables/forms/jsoneditor.vue"
;
import
SplitPanel
from
"@/view/components/split-pane2/split-pane2.vue"
;
import
UserInfo
from
"./userinfo_page.vue"
;
import
config
from
"@/config"
;
import
config
from
"@/config"
;
export
default
{
export
default
{
name
:
"treeinfo_page"
,
name
:
"treeinfo_page"
,
props
:
{},
props
:
{},
components
:
{
components
:
{
OrgEditor
OrgEditor
,
SplitPanel
,
UserInfo
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -19,74 +33,41 @@ export default {
...
@@ -19,74 +33,41 @@ export default {
name
:
"节点编辑"
,
name
:
"节点编辑"
,
main
:
[
main
:
[
{
{
title
:
"基本信息"
,
title
:
"授权信息"
,
key
:
"baseinfo"
,
cols
:
1
,
ctls
:
[
{
type
:
"input"
,
label
:
"序号"
,
prop
:
"seq"
,
placeHolder
:
"请输入序号"
,
style
:
{
width
:
"165px"
},
rules
:
[{
required
:
true
,
message
:
" "
,
trigger
:
"blur"
}]
},
{
type
:
"input"
,
label
:
"编码"
,
prop
:
"code"
,
placeHolder
:
"请输入编码"
,
style
:
""
,
rules
:
[{
required
:
true
,
message
:
" "
,
trigger
:
"blur"
}]
},
{
type
:
"input"
,
label
:
"标题"
,
prop
:
"title"
,
placeHolder
:
"请输入节点标题"
,
style
:
""
,
rules
:
[{
required
:
true
,
message
:
" "
,
trigger
:
"blur"
}],
default
:
"点击修改"
}
]
},
{
title
:
"节点路径"
,
key
:
"baseinfo"
,
key
:
"baseinfo"
,
cols
:
2
,
cols
:
2
,
ctls
:
[
ctls
:
[
{
{
type
:
"input"
,
type
:
"switch"
,
label
:
"KEY"
,
label
:
"是否岗位"
,
prop
:
"nodeKey"
,
prop
:
"isPosition"
,
placeHolder
:
"请输入编码"
,
opentext
:
"是"
,
disabled
:
true
,
closetext
:
"否"
,
style
:
""
,
trurcolor
:
""
,
rules
:
[]
falsecolor
:
""
,
placeHolder
:
""
,
style
:
""
},
},
{
{
type
:
"input"
,
type
:
"switch"
,
label
:
"路径"
,
label
:
"是否负责人"
,
prop
:
"orgpath"
,
prop
:
"isMain"
,
opentext
:
"是"
,
closetext
:
"否"
,
trurcolor
:
""
,
falsecolor
:
""
,
placeHolder
:
""
,
placeHolder
:
""
,
disabled
:
true
,
style
:
""
,
style
:
""
,
rules
:
[]
isHide
:
true
}
]
},
},
{
{
title
:
"授权信息"
,
key
:
"baseinfo"
,
cols
:
2
,
ctls
:
[
{
type
:
"input"
,
type
:
"input"
,
label
:
"
兼职
"
,
label
:
"
监控
"
,
prop
:
"orgtag"
,
prop
:
"orgtag"
,
placeHolder
:
"输入
兼职的部门编码
,逗号分隔"
,
placeHolder
:
"输入
监控的部门编码(非岗位)
,逗号分隔"
,
style
:
""
,
style
:
""
,
rules
:
[]
rules
:
[],
isHide
:
true
},
},
{
{
type
:
"model-select"
,
type
:
"model-select"
,
...
@@ -96,7 +77,8 @@ export default {
...
@@ -96,7 +77,8 @@ export default {
prop
:
"roles"
,
prop
:
"roles"
,
labelField
:
"name"
,
labelField
:
"name"
,
valueField
:
"id"
,
valueField
:
"id"
,
style
:
{
"margin-left"
:
"10px"
,
width
:
"165px"
}
style
:
{
"margin-left"
:
"10px"
,
width
:
"165px"
},
isHide
:
true
}
}
]
]
}
}
...
@@ -105,14 +87,53 @@ export default {
...
@@ -105,14 +87,53 @@ export default {
}
}
};
};
},
},
mounted
()
{},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
setHeight
();
});
$
(
window
).
resize
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
setHeight
();
});
});
},
methods
:
{
methods
:
{
setHeight
()
{
let
$orgdiv
=
$
(
"#orgdiv"
);
let
el
=
$orgdiv
.
get
()[
0
];
let
h
=
window
.
innerHeight
-
el
.
offsetTop
;
$orgdiv
.
css
(
"height"
,
h
+
"px"
);
this
.
$refs
.
userinfo
.
setHeight
(
h
-
120
)
},
drawaction
(
v
,
fm
)
{
if
(
fm
.
formModel
.
isPosition
)
{
fm
.
setCtlVisable
(
"isMain"
,
true
);
fm
.
setCtlVisable
(
"orgtag"
,
true
);
fm
.
setCtlVisable
(
"roles"
,
true
);
}
else
{
fm
.
setCtlVisable
(
"isMain"
,
false
);
fm
.
setCtlVisable
(
"orgtag"
,
false
);
fm
.
setCtlVisable
(
"roles"
,
false
);
}
},
controlctl
(
v
,
prop
,
fm
)
{
if
(
prop
==
"isPosition"
)
{
if
(
v
)
{
fm
.
setCtlVisable
(
"isMain"
,
true
);
fm
.
setCtlVisable
(
"orgtag"
,
true
);
fm
.
setCtlVisable
(
"roles"
,
true
);
}
else
{
fm
.
setCtlVisable
(
"isMain"
,
false
);
fm
.
setCtlVisable
(
"orgtag"
,
false
);
fm
.
setCtlVisable
(
"roles"
,
false
);
}
}
},
initData
(
cbk
)
{
initData
(
cbk
)
{
cbk
([
cbk
([
{
{
title
:
"目录"
,
title
:
"目录"
,
code
:
"root"
,
orgpath
:
"/root"
,
expand
:
true
,
expand
:
true
,
roles
:
[]
roles
:
[]
}
}
...
...
iview-admin/src/view/userinfo/userinfo_page.vue
View file @
d4f7452d
...
@@ -22,6 +22,9 @@ export default {
...
@@ -22,6 +22,9 @@ export default {
BizTable
BizTable
},
},
methods
:
{
methods
:
{
setHeight
(
h
){
this
.
$refs
.
bt
.
setHeight
(
h
)
},
onnew
()
{
onnew
()
{
this
.
$refs
.
bt
.
setFormCtlVisable
(
"userName"
,
true
);
this
.
$refs
.
bt
.
setFormCtlVisable
(
"userName"
,
true
);
},
},
...
...
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