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
9a26684b
Commit
9a26684b
authored
Nov 04, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.fixBug:修复文档数不显示目录的问题
parent
cf22c4b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
172 additions
and
64 deletions
+172
-64
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+58
-45
HGWD003.js
src/main/webapp/HG/WD/HGWD003.js
+79
-17
HGWD003.jsp
src/main/webapp/HG/WD/HGWD003.jsp
+2
-1
common.js
src/main/webapp/common/js/common.js
+33
-1
No files found.
src/main/webapp/HG/WD/HGWD001.js
View file @
9a26684b
...
@@ -875,32 +875,40 @@ let showAuthButton = function () {
...
@@ -875,32 +875,40 @@ let showAuthButton = function () {
let
parentId
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
fileId
;
let
parentId
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
fileId
;
let
leafLevel
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
leafLevel
;
let
leafLevel
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
leafLevel
;
let
isAuth
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
isAuth
;
let
isAuth
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
isAuth
;
let
changeRecord
=
$
(
"#CHANGE_RECORD"
).
hide
();
// 隐藏变更记录按钮
if
(
!
isBlank
(
leafLevel
)
&&
leafLevel
==
0
){
if
(
!
isBlank
(
leafLevel
)
&&
leafLevel
===
0
)
{
changeRecord
.
show
();
CommonUtils
.
showButton
(
"CHANGE_RECORD"
);
$
(
"#COPY_PROT_FILE"
).
show
();
CommonUtils
.
showButton
(
"COPY_PROT_FILE"
);
}
}
else
{
// C:目录
CommonUtils
.
hideButton
(
"CHANGE_RECORD"
);
if
(
isBlank
(
leafType
)
||
leafType
!=
"C"
)
{
}
$
(
"#RELEASE"
).
hide
();
// C:目录
$
(
"#UPLOAD_FILE"
).
hide
();
if
(
isBlank
(
leafType
)
||
leafType
!==
"C"
)
{
$
(
"#COPY_FILE"
).
hide
();
CommonUtils
.
hideButton
(
"RELEASE"
);
//$("#COPY_PROT_FILE").hide();
CommonUtils
.
hideButton
(
"UPLOAD_FILE"
);
$
(
"#PREVIEW"
).
hide
();
CommonUtils
.
hideButton
(
"COPY_FILE"
);
$
(
"#BATCH_DOWNLOAD"
).
hide
();
CommonUtils
.
hideButton
(
"PREVIEW"
);
return
CommonUtils
.
hideButton
(
"BATCH_DOWNLOAD"
);
}
return
}
// 0:不授权
// 0:不授权
if
(
isAuth
==
0
)
{
if
(
isAuth
===
0
)
{
$
(
"#RELEASE"
).
show
();
notAuthShowButton
();
$
(
"#UPLOAD_FILE"
).
show
();
}
else
{
$
(
"#COPY_FILE"
).
show
();
isProjectManager
(
parentId
);
$
(
"#COPY_PROT_FILE"
).
show
();
$
(
"#PREVIEW"
).
show
();
$
(
"#BATCH_DOWNLOAD"
).
show
();
return
;
}
}
isProjectManager
(
parentId
);
}
/**
* 不授权显示按钮
*/
function
notAuthShowButton
()
{
CommonUtils
.
showButton
(
"RELEASE"
);
CommonUtils
.
showButton
(
"UPLOAD_FILE"
);
CommonUtils
.
showButton
(
"COPY_FILE"
);
CommonUtils
.
showButton
(
"COPY_PROT_FILE"
);
CommonUtils
.
showButton
(
"PREVIEW"
);
CommonUtils
.
showButton
(
"BATCH_DOWNLOAD"
);
}
}
/**
/**
...
@@ -1054,33 +1062,38 @@ let showPreview = function (docId, docType, docName) {
...
@@ -1054,33 +1062,38 @@ let showPreview = function (docId, docType, docName) {
addRecordWindow
(
fileId
,
docId
,
docType
,
docName
);
addRecordWindow
(
fileId
,
docId
,
docType
,
docName
);
}
}
/**
* 项目管理人员
*
* @param parentId
*/
let
isProjectManager
=
function
(
parentId
)
{
let
isProjectManager
=
function
(
parentId
)
{
let
inEiInfo
=
new
EiInfo
();
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"inqu_status-0-fileId"
,
parentId
);
inEiInfo
.
set
(
"inqu_status-0-fileId"
,
parentId
);
$
(
"#COPY_PROT_FILE"
).
show
();
$
(
"#BATCH_DOWNLOAD"
).
show
();
$
(
"#RELEASE"
).
show
();
$
(
"#UPLOAD_FILE"
).
show
();
$
(
"#COPY_FILE"
).
show
();
$
(
"#PREVIEW"
).
show
();
EiCommunicator
.
send
(
"HGWD001"
,
"queryProjectManager"
,
inEiInfo
,
{
EiCommunicator
.
send
(
"HGWD001"
,
"queryProjectManager"
,
inEiInfo
,
{
onSuccess
(
ei
)
{
onSuccess
(
ei
)
{
if
(
ei
.
status
!=
-
1
){
if
(
ei
.
status
<
0
){
switch
(
ei
.
extAttr
.
isManager
)
{
return
;
case
1
:
case
2
:
break
case
3
:
$
(
"#RELEASE"
).
hide
();
break
default
:
$
(
"#RELEASE"
).
hide
();
$
(
"#UPLOAD_FILE"
).
hide
();
$
(
"#COPY_FILE"
).
hide
();
$
(
"#PREVIEW"
).
hide
();
$
(
"#COPY_PROT_FILE"
).
hide
();
}
}
}
let
isManager
=
ei
.
extAttr
.
isManager
;
if
(
isManager
===
1
||
isManager
===
2
||
isManager
===
3
)
{
if
(
isManager
===
1
||
isManager
===
2
)
{
CommonUtils
.
showButton
(
"RELEASE"
);
}
else
{
CommonUtils
.
hideButton
(
"RELEASE"
);
}
CommonUtils
.
showButton
(
"COPY_PROT_FILE"
);
CommonUtils
.
showButton
(
"BATCH_DOWNLOAD"
);
CommonUtils
.
showButton
(
"UPLOAD_FILE"
);
CommonUtils
.
showButton
(
"COPY_FILE"
);
CommonUtils
.
showButton
(
"PREVIEW"
);
}
else
{
CommonUtils
.
showButton
(
"RELEASE"
);
CommonUtils
.
showButton
(
"UPLOAD_FILE"
);
CommonUtils
.
showButton
(
"COPY_FILE"
);
CommonUtils
.
showButton
(
"PREVIEW"
);
CommonUtils
.
showButton
(
"COPY_PROT_FILE"
);
}
}
}
},
{
async
:
false
})
},
{
async
:
false
})
}
}
...
...
src/main/webapp/HG/WD/HGWD003.js
View file @
9a26684b
...
@@ -2,24 +2,22 @@ $(function () {
...
@@ -2,24 +2,22 @@ $(function () {
IPLATUI
.
EFTree
=
{
IPLATUI
.
EFTree
=
{
"docTree"
:
{
"docTree"
:
{
select
:
function
(
e
)
{
query
:
function
(
inInfo
,
model
)
{
var
nodeData
=
this
.
dataItem
(
e
.
node
);
if
(
model
==
null
)
{
let
value
=
nodeData
.
label
;
return
inInfo
;
let
leafType
=
nodeData
.
leafType
;
IPLATUI
.
EFTree
.
docTree
.
selectNode
.
treeId
=
value
;
IPLATUI
.
EFTree
.
docTree
.
selectNode
.
leaf
=
nodeData
.
leaf
;
IPLATUI
.
EFTree
.
docTree
.
selectNode
.
leafType
=
leafType
;
// leafType=C:目录
if
(
leafType
==
'C'
)
{
$
(
"#inqu_status-0-fileId"
).
val
(
value
);
$
(
"#inqu_status-0-fileName"
).
val
(
nodeData
.
text
);
}
else
{
$
(
"#inqu_status-0-fileId"
).
val
(
''
);
$
(
"#inqu_status-0-fileName"
).
val
(
''
);
}
}
resultGrid
.
dataSource
.
page
(
1
);
let
label
=
model
.
label
;
// 显示授权按钮
// 选中树节点
showAuthButton
();
selectTreeId
(
label
);
// 设置选中节点
treeSelectClick
(
model
);
inInfo
.
set
(
"inqu_status-0-projCode"
,
model
.
projCode
);
return
inInfo
;
},
select
:
function
(
e
)
{
let
nodeData
=
this
.
dataItem
(
e
.
node
);
// 设置选中节点
treeSelectClick
(
nodeData
);
},
},
template
:
function
(
node
)
{
template
:
function
(
node
)
{
var
item
=
node
.
item
;
var
item
=
node
.
item
;
...
@@ -294,3 +292,66 @@ let checkSelectMain = function () {
...
@@ -294,3 +292,66 @@ let checkSelectMain = function () {
}
}
return
true
;
return
true
;
}
}
/**
* 选中树节点
*
* @param treeId
*/
let
selectTreeId
=
function
(
treeId
)
{
// 刷新树节点
const
tree
=
$
(
"#docTree"
).
data
(
"kendoTreeView"
);
// 选中的节点
selectTreeNode
(
tree
,
treeId
);
}
/**
* 选中树节点
*
* @param tree
* @param treeId
*/
let
selectTreeNode
=
(
tree
,
treeId
)
=>
{
if
(
!
tree
||
treeId
==
null
)
{
return
}
setTimeout
(()
=>
{
let
barDataItem
=
tree
.
dataSource
.
get
(
treeId
);
if
(
barDataItem
)
{
let
barElement
=
tree
.
findByUid
(
barDataItem
.
uid
);
// 刷新完成后选中对应的树节点
tree
.
select
(
barElement
);
}
else
{
selectTreeNode
(
tree
,
treeId
)
}
},
300
)
}
/**
* 树点击事件
*
* @param nodeData
*/
let
treeSelectClick
=
function
(
nodeData
)
{
// 设置选择的树节点信息
setTreeNodeValue
(
nodeData
);
// 显示授权按钮
showAuthButton
();
// 刷新列表
query
();
}
/**
* 设置树节点的值
*
* @param nodeData
*/
let
setTreeNodeValue
=
function
(
nodeData
)
{
IPLATUI
.
EFTree
.
docTree
.
selectNode
.
treeId
=
nodeData
.
label
;
IPLATUI
.
EFTree
.
docTree
.
selectNode
.
leaf
=
nodeData
.
leaf
;
IPLATUI
.
EFTree
.
docTree
.
selectNode
.
leafType
=
nodeData
.
leafType
;
// leafType=C:目录
$
(
"#inqu_status-0-fileId"
).
val
(
nodeData
.
label
);
$
(
"#inqu_status-0-fileName"
).
val
(
nodeData
.
text
);
$
(
"#inqu_status-0-projCode"
).
val
(
nodeData
.
projCode
);
}
\ No newline at end of file
src/main/webapp/HG/WD/HGWD003.jsp
View file @
9a26684b
...
@@ -26,7 +26,8 @@
...
@@ -26,7 +26,8 @@
<div
class=
"col-md-8"
>
<div
class=
"col-md-8"
>
<EF:EFRegion
title=
"查询区"
id=
"inqu"
>
<EF:EFRegion
title=
"查询区"
id=
"inqu"
>
<EF:EFInput
cname=
"文件ID"
ename=
"fileId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"项目"
ename=
"projCode"
blockId=
"inqu_status"
row=
"0"
/>
<EF:EFInput
cname=
"文件ID"
ename=
"fileId"
blockId=
"inqu_status"
row=
"0"
/>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFInput
cname=
"文件名称"
ename=
"fileName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
<EF:EFInput
cname=
"文件名称"
ename=
"fileName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
readonly=
"true"
/>
readonly=
"true"
/>
...
...
src/main/webapp/common/js/common.js
View file @
9a26684b
...
@@ -740,13 +740,45 @@ function loadChange(grid,e,field) {
...
@@ -740,13 +740,45 @@ function loadChange(grid,e,field) {
data
===
'undefined'
||
data
===
'unknown'
;
data
===
'undefined'
||
data
===
'unknown'
;
}
}
/**
* 隐藏按钮
*
* @param name
*/
function
hideButton
(
name
)
{
let
button
=
$
(
"#"
+
name
);
button
.
hide
();
// 隐藏父级标签,防止按钮重叠
let
parent
=
button
.
parent
();
parent
.
css
(
"display"
,
"none"
);
}
/**
* 显示按钮
*
* @param name
*/
function
showButton
(
name
)
{
let
button
=
$
(
"#"
+
name
);
let
parent
=
button
.
parent
();
if
(
!
CommonUtils
.
isBlank
(
button
.
attr
(
"uuid"
)))
{
button
.
show
();
parent
.
css
(
"display"
,
""
);
}
else
{
// 隐藏父级标签,防止按钮重叠
parent
.
css
(
"display"
,
"none"
);
}
}
// export 到全局作用域 window对象
// export 到全局作用域 window对象
$
.
extend
(
window
,
{
$
.
extend
(
window
,
{
CommonUtils
:
{
CommonUtils
:
{
uploadFile
:
uploadFile
,
uploadFile
:
uploadFile
,
downloadFile
:
downloadFile
,
downloadFile
:
downloadFile
,
previewFile
:
previewFile
,
previewFile
:
previewFile
,
isBlank
:
isBlank
isBlank
:
isBlank
,
hideButton
:
hideButton
,
showButton
:
showButton
}
}
});
});
})(
window
.
jQuery
);
})(
window
.
jQuery
);
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