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
dd71ae4c
Commit
dd71ae4c
authored
May 15, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
8dc66ffd
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
164 additions
and
58 deletions
+164
-58
iview-admin/src/api/data.js
+3
-3
iview-admin/src/components/main/components/header-bar/custom-bread-crumb/custom-bread-crumb.less
+1
-0
iview-admin/src/components/main/components/header-bar/header-bar.less
+2
-0
iview-admin/src/components/main/main.less
+1
-1
iview-admin/src/components/main/main.vue
+6
-2
iview-admin/src/components/tables/tables.vue
+5
-12
iview-admin/src/router/routers.js
+9
-9
iview-admin/src/view/appinfo/appinfo_page.vue
+31
-11
iview-admin/src/view/components/pagespace/page_space.vue
+43
-0
iview-admin/src/view/components/tables/biztables.vue
+5
-0
iview-admin/src/view/components/tables/forms/jsoneditor.vue
+8
-3
iview-admin/src/view/userinfo/orginfo_page.vue
+46
-17
iview-admin/src/view/userinfo/userinfo_page.vue
+4
-0
No files found.
iview-admin/src/api/data.js
View file @
dd71ae4c
...
@@ -61,10 +61,10 @@ export const uploadImg = formData => {
...
@@ -61,10 +61,10 @@ export const uploadImg = formData => {
})
})
}
}
export
const
getOrg
Data
=
()
=>
{
export
const
getOrg
s
=
()
=>
{
return
axios
.
request
({
return
axios
.
request
({
url
:
'
get_org_data
'
,
url
:
'
/web/common/companyCtl/getOrgs
'
,
method
:
'
ge
t'
method
:
'
pos
t'
})
})
}
}
...
...
iview-admin/src/components/main/components/header-bar/custom-bread-crumb/custom-bread-crumb.less
View file @
dd71ae4c
.custom-bread-crumb{
.custom-bread-crumb{
display: inline-block;
display: inline-block;
vertical-align: top;
vertical-align: top;
color:white
}
}
iview-admin/src/components/main/components/header-bar/header-bar.less
View file @
dd71ae4c
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
width: 100%;
width: 100%;
height: 100%;
height: 100%;
position: relative;
position: relative;
background-color: black;
color:white;
.custom-content-con{
.custom-content-con{
float: right;
float: right;
height: auto;
height: auto;
...
...
iview-admin/src/components/main/main.less
View file @
dd71ae4c
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
}
}
.header-con{
.header-con{
background: #fff;
background: #fff;
padding: 0
2
0px;
padding: 0 0px;
width: 100%;
width: 100%;
}
}
.main-layout-con{
.main-layout-con{
...
...
iview-admin/src/components/main/main.vue
View file @
dd71ae4c
...
@@ -18,11 +18,14 @@
...
@@ -18,11 +18,14 @@
<language
v-if=
"$config.useI18n"
@
on-lang-change=
"setLocal"
style=
"margin-right: 10px;"
:lang=
"local"
/>
<language
v-if=
"$config.useI18n"
@
on-lang-change=
"setLocal"
style=
"margin-right: 10px;"
:lang=
"local"
/>
<error-store
v-if=
"$config.plugin['error-store'] && $config.plugin['error-store'].showInHeader"
:has-read=
"hasReadErrorPage"
:count=
"errorCount"
></error-store>
<error-store
v-if=
"$config.plugin['error-store'] && $config.plugin['error-store'].showInHeader"
:has-read=
"hasReadErrorPage"
:count=
"errorCount"
></error-store>
<fullscreen
v-model=
"isFullscreen"
style=
"margin-right: 10px;"
/>
<fullscreen
v-model=
"isFullscreen"
style=
"margin-right: 10px;"
/>
<Tooltip
content=
"切换多页签"
placement=
"bottom"
>
<span
style=
"cursor:pointer"
@
click=
"navTabShow=!navTabShow"
><Icon
style=
"font-size:22px;padding-right:10px"
type=
"ios-albums-outline"
/></span>
</Tooltip>
</header-bar>
</header-bar>
</Header>
</Header>
<Content
class=
"main-content-con"
>
<Content
class=
"main-content-con"
>
<Layout
class=
"main-layout-con"
>
<Layout
class=
"main-layout-con"
>
<div
class=
"tag-nav-wrapper"
>
<div
v-show=
"navTabShow"
class=
"tag-nav-wrapper"
>
<tags-nav
:value=
"$route"
@
input=
"handleClick"
:list=
"tagNavList"
@
on-close=
"handleCloseTag"
/>
<tags-nav
:value=
"$route"
@
input=
"handleClick"
:list=
"tagNavList"
@
on-close=
"handleCloseTag"
/>
</div>
</div>
<Content
class=
"content-wrapper"
>
<Content
class=
"content-wrapper"
>
...
@@ -68,7 +71,8 @@ export default {
...
@@ -68,7 +71,8 @@ export default {
collapsed
:
false
,
collapsed
:
false
,
minLogo
,
minLogo
,
maxLogo
,
maxLogo
,
isFullscreen
:
false
isFullscreen
:
false
,
navTabShow
:
true
}
}
},
},
computed
:
{
computed
:
{
...
...
iview-admin/src/components/tables/tables.vue
View file @
dd71ae4c
...
@@ -173,6 +173,10 @@ export default {
...
@@ -173,6 +173,10 @@ export default {
searchPlace
:
{
searchPlace
:
{
type
:
String
,
type
:
String
,
default
:
"top"
default
:
"top"
},
tblheight
:{
type
:
Number
,
default
:
300
}
}
},
},
/**
/**
...
@@ -188,17 +192,10 @@ export default {
...
@@ -188,17 +192,10 @@ export default {
edittingCellId
:
""
,
edittingCellId
:
""
,
edittingText
:
""
,
edittingText
:
""
,
searchValue
:
""
,
searchValue
:
""
,
searchKey
:
""
,
searchKey
:
""
tblheight
:
300
};
};
},
},
methods
:
{
methods
:
{
setHeight
(
h
)
{
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"
);
},
},
...
@@ -397,10 +394,6 @@ export default {
...
@@ -397,10 +394,6 @@ export default {
this
.
handleColumns
(
this
.
columns
);
this
.
handleColumns
(
this
.
columns
);
this
.
setDefaultSearchKey
();
this
.
setDefaultSearchKey
();
this
.
handleTableData
();
this
.
handleTableData
();
// this.tblheight = this.getHeight();
// $(window).resize(() => {
// this.tblheight = this.getHeight();
// });
},
},
computed
:
{
computed
:
{
searchcols
:
function
()
{
searchcols
:
function
()
{
...
...
iview-admin/src/router/routers.js
View file @
dd71ae4c
...
@@ -135,15 +135,15 @@ export default [
...
@@ -135,15 +135,15 @@ export default [
},
},
component
:
()
=>
import
(
'@/view/userinfo/orginfo_page.vue'
)
component
:
()
=>
import
(
'@/view/userinfo/orginfo_page.vue'
)
},
},
{
//
{
path
:
'user_info'
,
//
path: 'user_info',
name
:
'user_info'
,
//
name: 'user_info',
meta
:
{
//
meta: {
icon
:
'ios-man'
,
//
icon: 'ios-man',
title
:
'用户信息'
//
title: '用户信息'
},
//
},
component
:
()
=>
import
(
'@/view/userinfo/userinfo_page.vue'
)
//
component: () => import('@/view/userinfo/userinfo_page.vue')
},
//
},
{
{
path
:
'role_info'
,
path
:
'role_info'
,
name
:
'role_info_page'
,
name
:
'role_info_page'
,
...
...
iview-admin/src/view/appinfo/appinfo_page.vue
View file @
dd71ae4c
<
template
>
<
template
>
<div>
<PageSpace
@
sizechange=
"sizechange"
>
<BizTable
<template
v-slot:default=
"
{adjustHeight}">
ref=
"bt"
<BizTable
:formatCol=
"formatCol"
ref=
"bt"
metaName=
"app_info"
:formatCol=
"formatCol"
packageName=
"common"
metaName=
"app_info"
isMulti
packageName=
"common"
:refvalidatemethod=
"validmethod"
:tblheight=
"adjustHeight-120"
@
onexec=
"onexec"
isMulti
></BizTable>
:refvalidatemethod=
"validmethod"
</div>
@
onexec=
"onexec"
:savebefore=
"beforesave"
:editbefore=
"beforedit"
:addbefore=
"beforeadd"
></BizTable>
</
template
>
</PageSpace>
</template>
</template>
<
script
>
<
script
>
import
BizTable
from
"../components/tables/biztables"
;
import
BizTable
from
"../components/tables/biztables"
;
import
PageSpace
from
"@/view/components/pagespace/page_space.vue"
;
export
default
{
export
default
{
name
:
"appinfo_page"
,
name
:
"appinfo_page"
,
data
()
{
data
()
{
return
{};
return
{};
},
},
components
:
{
components
:
{
PageSpace
,
BizTable
BizTable
},
},
methods
:
{
methods
:
{
sizechange
(
h
){
console
.
log
(
h
)
},
beforeadd
(
row
,
cbk
)
{
return
cbk
({
value
:
true
,
message
:
null
});
},
beforedit
(
row
,
cbk
)
{
return
cbk
({
value
:
true
,
message
:
null
});
},
beforesave
(
key
,
row
,
cbk
)
{
return
cbk
(
row
);
},
onexec
(
k
,
row
)
{},
onexec
(
k
,
row
)
{},
validmethod
(
rule
,
value
,
callback
)
{
validmethod
(
rule
,
value
,
callback
)
{
if
(
rule
.
field
==
"functionJSON"
)
{
if
(
rule
.
field
==
"functionJSON"
)
{
...
...
iview-admin/src/view/components/pagespace/page_space.vue
0 → 100644
View file @
dd71ae4c
<
template
>
<div
id=
"framediv"
>
<slot
:adjustHeight=
"frameHeight"
></slot>
</div>
</
template
>
<
script
>
export
default
{
name
:
"pagespace_page"
,
prop
:{
tweak
:
Number
},
data
()
{
return
{
frameHeight
:
0
,
advalue
:
this
.
tweak
?
this
.
tweak
:
0
};
},
components
:
{
},
mounted
(){
this
.
setHeight
();
$
(
window
).
resize
(()
=>
{
this
.
setHeight
()
})
},
methods
:
{
setHeight
(){
this
.
$nextTick
(()
=>
{
let
$framediv
=
$
(
"#framediv"
);
let
el
=
$framediv
.
get
()[
0
];
let
h
=
window
.
innerHeight
-
el
.
offsetTop
-
this
.
advalue
;
this
.
frameHeight
=
h
})
console
.
log
(
"h............................."
,
h
)
this
.
$emit
(
"sizechange"
,
this
.
frameHeight
)
}
}
};
</
script
>
<
style
>
</
style
>
iview-admin/src/view/components/tables/biztables.vue
View file @
dd71ae4c
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
searchable
searchable
search-place=
"top"
search-place=
"top"
:loading=
"tblloading"
:loading=
"tblloading"
:tblheight=
"tblheight"
highlightRow
highlightRow
v-model=
"tableData"
v-model=
"tableData"
:columns=
"colswithauth"
:columns=
"colswithauth"
...
@@ -183,6 +184,10 @@ export default {
...
@@ -183,6 +184,10 @@ export default {
},
},
addbefore
:
{
addbefore
:
{
type
:
Function
type
:
Function
},
tblheight
:
{
type
:
Number
,
default
:
300
}
}
},
},
data
()
{
data
()
{
...
...
iview-admin/src/view/components/tables/forms/jsoneditor.vue
View file @
dd71ae4c
...
@@ -145,6 +145,7 @@ export default {
...
@@ -145,6 +145,7 @@ export default {
this
.
currentData
=
data
;
this
.
currentData
=
data
;
this
.
currentNode
=
node
;
this
.
currentNode
=
node
;
this
.
rootNode
=
root
;
this
.
rootNode
=
root
;
this
.
selclick
(
root
,
node
,
data
)
}
}
}
}
},
},
...
@@ -220,7 +221,7 @@ export default {
...
@@ -220,7 +221,7 @@ export default {
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
,
item
);
modiTreeNodeByCode
(
item
.
children
,
newobj
,
item
);
}
else
{
}
else
{
...
@@ -234,6 +235,9 @@ export default {
...
@@ -234,6 +235,9 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
selclick
(
root
,
node
,
data
){
this
.
$emit
(
"onselnode"
,
root
,
node
,
data
)
},
setCtlVisable
(
prop
,
b
)
{
setCtlVisable
(
prop
,
b
)
{
this
.
$refs
.
nodeform
.
setCtlVisable
(
prop
,
b
);
this
.
$refs
.
nodeform
.
setCtlVisable
(
prop
,
b
);
},
},
...
@@ -287,7 +291,7 @@ export default {
...
@@ -287,7 +291,7 @@ export default {
initTree
()
{
initTree
()
{
//异步加载
//异步加载
//按照当前公司加载组织结构,如果数据为空,那么就初始化一个根实体对象
//按照当前公司加载组织结构,如果数据为空,那么就初始化一个根实体对象
if
(
this
.
initData
)
{
if
(
this
.
initData
&&
this
.
treedata
.
length
==
0
)
{
this
.
initData
(
originalData
=>
{
this
.
initData
(
originalData
=>
{
if
(
if
(
originalData
&&
originalData
&&
...
@@ -345,7 +349,7 @@ export default {
...
@@ -345,7 +349,7 @@ export default {
this
.
currentData
=
data
;
this
.
currentData
=
data
;
this
.
currentNode
=
node
;
this
.
currentNode
=
node
;
this
.
rootNode
=
root
;
this
.
rootNode
=
root
;
this
.
selclick
(
root
,
node
,
data
)
}
}
}
}
},
},
...
@@ -415,6 +419,7 @@ export default {
...
@@ -415,6 +419,7 @@ export default {
const
parent
=
root
.
find
(
el
=>
el
.
nodeKey
===
parentKey
).
node
;
const
parent
=
root
.
find
(
el
=>
el
.
nodeKey
===
parentKey
).
node
;
const
index
=
parent
.
children
.
indexOf
(
data
);
const
index
=
parent
.
children
.
indexOf
(
data
);
parent
.
children
.
splice
(
index
,
1
);
parent
.
children
.
splice
(
index
,
1
);
this
.
$emit
(
"deletenode"
,
this
.
treedata
,
node
)
},
},
findParentByNode
(
node
)
{
findParentByNode
(
node
)
{
const
parentKey
=
this
.
rootNode
.
find
(
el
=>
el
===
node
).
parent
;
const
parentKey
=
this
.
rootNode
.
find
(
el
=>
el
===
node
).
parent
;
...
...
iview-admin/src/view/userinfo/orginfo_page.vue
View file @
dd71ae4c
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
:metainfo=
"metainfo"
:metainfo=
"metainfo"
@
controlctl=
"controlctl"
@
controlctl=
"controlctl"
@
drawaction=
"drawaction"
@
drawaction=
"drawaction"
@
modisave=
"orgsave"
@
deletenode=
"orgsave"
@
onselnode=
"onselnode"
></OrgEditor>
></OrgEditor>
<UserInfo
<UserInfo
ref=
"userinfo"
ref=
"userinfo"
...
@@ -21,6 +24,7 @@
...
@@ -21,6 +24,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getApp
,
saveAuths
,
findAuthsByRoles
}
from
"@/api/meta"
;
import
{
getApp
,
saveAuths
,
findAuthsByRoles
}
from
"@/api/meta"
;
import
{
saveFormData
,
getOrgs
}
from
"@/api/data"
;
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
SplitPanel
from
"@/view/components/split-pane2/split-pane2.vue"
;
import
UserInfo
from
"./userinfo_page.vue"
;
import
UserInfo
from
"./userinfo_page.vue"
;
...
@@ -105,6 +109,26 @@ export default {
...
@@ -105,6 +109,26 @@ export default {
});
});
},
},
methods
:
{
methods
:
{
onselnode
(
root
,
node
,
data
){
this
.
$refs
.
userinfo
.
searchWhere
({
opath
:
data
.
code
})
},
orgsave
(
treedata
,
modidata
)
{
saveFormData
(
"/web/common/companyCtl/setOrgs"
,
{
orgJson
:
treedata
,
curdata
:
modidata
}).
then
(
res
=>
{
let
rtn
=
res
.
data
;
console
.
log
(
"ddddddddddddddddd"
,
rtn
);
if
(
rtn
.
status
==
0
)
{
let
treedata2
=
rtn
.
data
.
orgJson
;
console
.
log
(
"save org..............................."
,
treedata2
);
this
.
$refs
.
orgtree
.
treedata
=
treedata2
;
this
.
$refs
.
orgtree
.
refreshTree
();
this
.
$Message
.
success
(
"当前操作成功完成"
)
}
else
{
}
});
},
beforeadd
(
row
,
cbk
)
{
beforeadd
(
row
,
cbk
)
{
if
(
!
this
.
$refs
.
orgtree
.
currentData
)
{
if
(
!
this
.
$refs
.
orgtree
.
currentData
)
{
return
cbk
({
value
:
false
,
message
:
"请选择岗位节点"
});
return
cbk
({
value
:
false
,
message
:
"请选择岗位节点"
});
...
@@ -130,7 +154,8 @@ export default {
...
@@ -130,7 +154,8 @@ export default {
this
.
$refs
.
orgtree
.
currentData
&&
this
.
$refs
.
orgtree
.
currentData
&&
this
.
$refs
.
orgtree
.
currentData
.
isPosition
this
.
$refs
.
orgtree
.
currentData
.
isPosition
)
{
)
{
row
.
opath
=
this
.
$refs
.
orgtree
.
currentData
.
orgpath
;
row
.
opath
=
this
.
$refs
.
orgtree
.
currentData
.
orgpath
row
.
ptags
=
this
.
$refs
.
orgtree
.
currentData
.
orgtag
;
}
}
console
.
log
(
"before.save"
,
key
,
row
);
console
.
log
(
"before.save"
,
key
,
row
);
return
cbk
(
row
);
return
cbk
(
row
);
...
@@ -154,17 +179,19 @@ export default {
...
@@ -154,17 +179,19 @@ export default {
}
}
},
},
controlctl
(
v
,
prop
,
fm
)
{
controlctl
(
v
,
prop
,
fm
)
{
if
(
prop
==
"isMain"
){
if
(
prop
==
"isMain"
)
{
let
cnode
=
this
.
$refs
.
orgtree
.
currentNode
let
cnode
=
this
.
$refs
.
orgtree
.
currentNode
;
let
pnode
=
this
.
$refs
.
orgtree
.
findParentByNode
(
cnode
)
let
pnode
=
this
.
$refs
.
orgtree
.
findParentByNode
(
cnode
);
let
fmodel
=
fm
.
formModel
let
fmodel
=
fm
.
formModel
;
if
(
fmodel
.
orgtag
&&
fmodel
.
orgtag
.
indexOf
(
pnode
.
code
)
<
0
){
if
(
fmodel
.
orgtag
&&
fmodel
.
orgtag
.
indexOf
(
pnode
.
code
)
<
0
)
{
let
ttmp
=
fmodel
.
orgtag
.
split
(
","
).
push
(
pnode
.
code
).
join
(
","
)
let
ttmp
=
fmodel
.
orgtag
fmodel
.
orgtag
=
ttmp
.
split
(
","
)
}
else
{
.
push
(
pnode
.
code
)
fmodel
.
orgtag
=
pnode
.
code
.
join
(
","
);
fmodel
.
orgtag
=
ttmp
;
}
else
{
fmodel
.
orgtag
=
pnode
.
code
;
}
}
}
}
if
(
prop
==
"isPosition"
)
{
if
(
prop
==
"isPosition"
)
{
if
(
v
)
{
if
(
v
)
{
...
@@ -179,13 +206,15 @@ export default {
...
@@ -179,13 +206,15 @@ export default {
}
}
},
},
initData
(
cbk
)
{
initData
(
cbk
)
{
cbk
([
getOrgs
().
then
(
res
=>
{
{
let
rtn
=
res
.
data
;
title
:
"目录"
,
if
(
rtn
.
status
==
0
)
{
expand
:
true
,
let
treedata2
=
rtn
.
data
.
orgJson
;
roles
:
[]
cbk
(
treedata2
);
}
else
{
throw
new
Error
(
"获取组织数据出错"
)
}
}
]
);
}
);
}
}
}
}
};
};
...
...
iview-admin/src/view/userinfo/userinfo_page.vue
View file @
dd71ae4c
...
@@ -51,6 +51,10 @@ export default {
...
@@ -51,6 +51,10 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
searchWhere
(
obj
)
{
this
.
$refs
.
bt
.
initWhere
=
obj
;
this
.
$refs
.
bt
.
fetchData
();
},
setHeight
(
h
)
{
setHeight
(
h
)
{
this
.
$refs
.
bt
.
setHeight
(
h
);
this
.
$refs
.
bt
.
setHeight
(
h
);
},
},
...
...
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