Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
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
platform
hg-smart
Commits
1186f766
Commit
1186f766
authored
Aug 31, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-08-31 文件浏览调整
parent
eb97bb46
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
234 additions
and
38 deletions
+234
-38
HGWD002.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD002.xml
+4
-4
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+2
-2
HGWD002.js
src/main/webapp/HG/WD/HGWD002.js
+190
-2
HGWD002.jsp
src/main/webapp/HG/WD/HGWD002.jsp
+38
-30
No files found.
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD002.xml
View file @
1186f766
...
...
@@ -13,8 +13,8 @@
A.FILE_ID as "fileId",
<!-- 文件ID -->
A.FILE_TYPE as "fileType",
<!-- 文件类型 -->
A.FILE_NAME as "fileName",
<!-- 文件名称 -->
A
.DOC_VERSION as "docVersion",
<!-- 文件版本号 -->
A
.RELEASE_DATE as "releaseDate",
<!-- 发布时间 -->
B
.DOC_VERSION as "docVersion",
<!-- 文件版本号 -->
B
.RELEASE_DATE as "releaseDate",
<!-- 发布时间 -->
B.DOC_ID as "docId",
<!-- 文件号 -->
B.DOC_NAME as "docName",
<!-- 文件附件名称 -->
B.PREVIEW_NUM as "previewNum",
<!-- 预览次数 -->
...
...
@@ -69,7 +69,7 @@
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGWD001 A
INNER JOIN ${hggpSchema}.HG
CW999 B ON A.ID = B.MAT
_ID
INNER JOIN ${hggpSchema}.HG
WD099 B ON A.FILE_ID = B.BIZ
_ID
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"orderBy"
/>
...
...
@@ -78,7 +78,7 @@
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*)
FROM ${hggpSchema}.HGWD001 A
INNER JOIN ${hggpSchema}.HG
CW999 B ON A.ID = B.MAT
_ID
INNER JOIN ${hggpSchema}.HG
WD099 B ON A.FILE_ID = B.BIZ
_ID
WHERE 1=1
<include
refid=
"condition"
/>
</select>
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
1186f766
...
...
@@ -131,10 +131,10 @@ $(function () {
icon
=
'fa fa-user'
break
;
case
'1'
:
icon
=
'fa fa-
folder
'
icon
=
'fa fa-
clipboard
'
break
;
default
:
icon
=
'fa fa-
clipboard
'
icon
=
'fa fa-
folder
'
//icon = 'fa fa-home'
}
}
...
...
src/main/webapp/HG/WD/HGWD002.js
View file @
1186f766
$
(
function
()
{
const
init
=
()
=>
{
$
(
"#HGWD002"
).
css
(
"padding-bottom"
,
"8px"
)
sessionStorage
.
removeItem
(
"__user_id__"
)
setTimeout
(()
=>
{
let
parendId
=
$
(
"inqu_status-0-parentId"
).
val
();
if
(
!
isBlank
(
parendId
)){
resultGrid
.
dataSource
.
page
(
1
);
}
// 显示授权按钮
showAuthButton
();
},
1000
);
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
function
(
e
)
{
resultGrid
.
dataSource
.
page
(
1
);
});
// 分割线组件
(
function
()
{
splitter
=
$
(
"#splitter"
).
kendoSplitter
({
panes
:
[
{
size
:
"30%"
,
min
:
"25%"
,
max
:
"75%"
,
collapsible
:
true
},
{},
{
collapsible
:
true
}
]
}).
data
(
"kendoSplitter"
);
// 当 EFRegion 的 fitHeight="true" 时,需要为 splitter 中的 k-splitbar 加上 class="i-fit-height"。
$
(
"#splitter"
).
find
(
".k-splitbar"
).
addClass
(
"i-fit-height"
);
//加下面的延迟是为了处理 多界面同时刷新 界面展示不全的问题
var
interval01
=
setInterval
(
splitterInterval
,
200
);
function
splitterInterval
()
{
if
(
document
.
getElementById
(
"splitter"
).
getElementsByClassName
(
"k-splitbar"
).
length
!==
1
)
{
$
(
"#splitter"
).
kendoSplitter
({
panes
:
[
{
size
:
"30%"
,
min
:
"25%"
,
max
:
"75%"
,
collapsible
:
true
},
{},
{
collapsible
:
true
}
]
});
}
else
{
clearInterval
(
interval01
);
}
}
})();
// 抽屉组件
(
function
()
{
$
(
".close-btn span"
).
on
(
"click"
,
function
()
{
closeDrawer
()
})
function
closeDrawer
()
{
$
(
".drawer-wrapper"
).
css
(
"transform"
,
"translateX(-100%)"
);
// 重置splitter
splitter
.
collapse
(
".k-pane:first"
)
splitter
.
expand
(
".k-pane:first"
)
}
function
openDrawer
(
url
,
userId
)
{
$
(
".drawer-wrapper"
).
css
(
"transform"
,
"translateX(0%)"
);
const
lastId
=
sessionStorage
.
getItem
(
"__user_id__"
)
if
(
lastId
!==
userId
)
{
sessionStorage
.
setItem
(
"__user_id__"
,
userId
);
}
if
(
$
(
".drawer-wrapper iframe"
).
attr
(
"src"
)
===
''
)
{
$
(
".drawer-wrapper iframe"
).
attr
(
"src"
,
url
)
}
refreshUserDetail
();
function
refreshUserDetail
()
{
if
(
$
(
"#iframeDrawer"
)?.
get
(
0
)?.
contentWindow
?.
refreshWindow
)
{
$
(
"#iframeDrawer"
).
get
(
0
).
contentWindow
.
refreshWindow
()
return
}
setTimeout
(()
=>
{
refreshUserDetail
();
},
50
)
}
}
window
.
closeDrawer
=
closeDrawer
;
window
.
openDrawer
=
openDrawer
;
})();
}
init
();
IPLATUI
.
EFTree
=
{
"docTree"
:
{
select
:
function
(
e
)
{
var
_data
=
this
.
dataItem
(
e
.
node
);
var
labelValue
=
_data
.
label
;
var
typeValue
=
_data
.
type
;
const
eNameValue
=
_data
.
ename
;
setTreeNodeValue
(
_data
);
$
(
"[name = 'inqu_status-0-parentId']"
).
val
(
labelValue
);
$
(
"[name = 'inqu_status-0-fileId']"
).
val
(
eNameValue
);
$
(
"[name = 'inqu_status-0-leafLevel']"
).
val
(
_data
.
leafLevel
==
null
?
0
:
_data
.
leafLevel
);
$
(
"[name = 'inqu_status-0-projCode']"
).
val
(
_data
.
projCode
);
$
(
"[name = 'inqu_status-0-companyCode']"
).
val
(
_data
.
companyCode
);
$
(
"[name = 'inqu_status-0-type']"
).
val
(
typeValue
);
$
(
"[name = 'inqu_status-0-fileName']"
).
val
(
_data
.
text
);
resultGrid
.
dataSource
.
page
(
1
);
// 显示授权按钮
showAuthButton
();
},
/*ROOT:{label: 'root',text: '组织机构'},*/
template
:
function
(
node
)
{
var
item
=
node
.
item
;
var
title
=
item
.
text
;
let
icon
=
'fa fa-globe'
if
(
item
.
label
!==
'root'
)
{
switch
(
item
.
type
)
{
case
'company'
:
// title = title + ' [公司]';
icon
=
'fa fa-building'
break
;
case
'dept'
:
// title = title + ' [部门]';
icon
=
'fa fa-users'
break
;
case
'post'
:
// title = title + ' [岗位]';
icon
=
'fa fa-user'
break
;
case
'1'
:
icon
=
'fa fa-clipboard'
break
;
default
:
icon
=
'fa fa-folder'
//icon = 'fa fa-home'
}
}
return
' <span class="'
+
icon
+
'" style="padding-right: 8px"> </span> <span class="titleClass" title="'
+
item
.
label
+
'">'
+
title
+
'</span>'
},
loadComplete
:
function
(
options
)
{
},
selectTreeNode
:
{
fileId
:
''
,
parentId
:
''
,
projCode
:
''
,
companyCode
:
''
,
leafLevel
:
''
,
type
:
''
,
},
// expandLevel:1,
/**
* 开启结点拖拽功能,默认dragAndDrop = false不开启,
* 若未开启拖拽,不会触发dragstart和dragend事件
*/
dragAndDrop
:
false
,
}
};
IPLATUI
.
EFGrid
=
{
"result"
:
{
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
...
...
@@ -22,7 +180,7 @@ $(function () {
},
{
field
:
"docVersion"
,
template
:
function
(
model
)
{
return
"
v
"
+
model
.
docVersion
;
return
"
V
"
+
model
.
docVersion
;
}
}],
loadComplete
:
function
(
grid
)
{
...
...
@@ -46,7 +204,7 @@ $(function () {
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
//
query();
// 按键事件
downKeyUp
();
});
...
...
@@ -139,3 +297,32 @@ let download = function () {
}
});
}
/**
* 设置树节点的值
*
* @param nodeData
*/
let
setTreeNodeValue
=
function
(
nodeData
)
{
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
fileId
=
nodeData
.
label
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
parentId
=
nodeData
.
parentId
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
fileName
=
nodeData
.
text
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
companyCode
=
nodeData
.
companyCode
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
projCode
=
nodeData
.
projCode
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
leafLevel
=
nodeData
.
leafLevel
;
}
/**
* 显示授权按钮
*/
let
showAuthButton
=
function
()
{
let
leafType
=
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
leafLevel
;
// C:目录
if
(
leafType
&&
leafType
>
0
)
{
$
(
"#PREVIEW"
).
attr
(
"disabled"
,
false
);
$
(
"#DOWNLOAD"
).
attr
(
"disabled"
,
false
);
}
else
{
$
(
"#PREVIEW"
).
attr
(
"disabled"
,
true
);
$
(
"#DOWNLOAD"
).
attr
(
"disabled"
,
true
);
}
}
\ No newline at end of file
src/main/webapp/HG/WD/HGWD002.jsp
View file @
1186f766
...
...
@@ -6,37 +6,45 @@
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"文档浏览"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
cname=
"公司名称"
ename=
"projName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"项目名称"
ename=
"projName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"文件名称"
ename=
"fileName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFSelect
cname=
"文件类型"
ename=
"fileType"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
optionLabel=
"全部"
defultValue=
""
>
<EF:EFCodeOption
codeName=
"hggp.hgwd.fileType"
/>
</EF:EFSelect>
<div
id=
"splitter"
class=
"i-fit-height"
>
<div
id=
"left-pane"
class=
"i-fit-height"
>
<EF:EFRegion
title=
"文档目录树"
id=
"tree"
fitHeight=
"true"
>
<div
id=
"menu"
style=
"margin-top: 12px; margin-bottom: 8px"
>
<EF:EFTree
bindId=
"docTree"
ename=
"tree_name"
textField=
"text"
valueField=
"label"
hasChildren=
"leaf"
pid=
"parentId"
serviceName=
"HGWD001D"
methodName=
"query"
>
</EF:EFTree>
</div>
</EF:EFRegion>
</div>
</EF:EFRegion>
<div
id=
"right-pane"
class=
"i-fit-height"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
cname=
"公司代码"
ename=
"companyCode"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"项目代码"
ename=
"projCode"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库id"
ename=
"parentId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库id"
ename=
"fileId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"类型"
ename=
"type"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"层级"
ename=
"leafLevel"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库名称"
ename=
"fileName"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"业务类型"
ename=
"bizType"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
value=
"WD"
/>
<EF:EFInput
cname=
"文件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
width=
"160"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"left"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"true"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"true"
width=
"140"
align=
"left"
/>
<EF:EFColumn
ename=
"fileId"
cname=
"文件ID"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFComboColumn
ename=
"fileType"
cname=
"文件类型"
enable=
"false"
width=
"90"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hggp.hgwd.fileType"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"fileName"
cname=
"文件名"
enable=
"false"
width=
"100"
align=
"left"
/>
<EF:EFColumn
ename=
"docVersion"
cname=
"版本号"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"docId"
cname=
"附件ID"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docName"
cname=
"附件名称"
enable=
"false"
width=
"100"
align=
"left"
/>
<EF:EFColumn
ename=
"previewNum"
cname=
"预览次数"
enable=
"false"
width=
"100"
align=
"right"
/>
<EF:EFColumn
ename=
"downloadNum"
cname=
"下载次数"
enable=
"false"
width=
"100"
align=
"right"
/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
personal=
"true"
queryMethod=
"query"
>
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"fileId"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docVersion"
cname=
"版本号"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"previewNum"
cname=
"预览次数"
enable=
"false"
width=
"100"
align=
"right"
/>
<EF:EFColumn
ename=
"downloadNum"
cname=
"下载次数"
enable=
"false"
width=
"100"
align=
"right"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"200"
align=
"center"
/>
</EF:EFGrid>
</EF:EFRegion>
</div>
</div>
</EF:EFPage>
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