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
8fc9cc8a
Commit
8fc9cc8a
authored
Nov 18, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.目录结构增加搜索功能
parent
7c2e49ab
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
164 additions
and
92 deletions
+164
-92
CodesetConstant.java
...java/com/baosight/hggp/core/constant/CodesetConstant.java
+6
-23
CommonConstant.java
.../java/com/baosight/hggp/core/constant/CommonConstant.java
+5
-0
CodeOptionTools.java
...in/java/com/baosight/hggp/core/tools/CodeOptionTools.java
+64
-0
ServiceHGPZ021.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ021.java
+1
-1
ServiceHGWD001D.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
+19
-2
ServiceHGWD001E.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001E.java
+2
-2
ServiceHGWD001F.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001F.java
+1
-1
ServiceHGWD002.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD002.java
+3
-0
ServiceXSOG0801A.java
...om/baosight/xservices/xs/og/service/ServiceXSOG0801A.java
+1
-1
ServiceXSOG0801B.java
...om/baosight/xservices/xs/og/service/ServiceXSOG0801B.java
+1
-1
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+6
-4
HGWD002.js
src/main/webapp/HG/WD/HGWD002.js
+49
-50
HGWD002.jsp
src/main/webapp/HG/WD/HGWD002.jsp
+6
-7
No files found.
src/main/java/com/baosight/hggp/core/constant/CodesetConstant.java
View file @
8fc9cc8a
...
@@ -6,28 +6,11 @@ package com.baosight.hggp.core.constant;
...
@@ -6,28 +6,11 @@ package com.baosight.hggp.core.constant;
*/
*/
public
class
CodesetConstant
{
public
class
CodesetConstant
{
/**
// 项目来源
* 动态表
public
static
final
String
PROJECT_SOURCE
=
"app.sc.projectSource"
;
*
// 动态表
* @author:songx
public
static
final
String
DYNAMIC_TABLE
=
"app.pz.dynamicTable"
;
* @date:2024/3/1,17:36
// 组织机构类型
*/
public
static
final
String
ORG_TYPE
=
"xs.og.orgType"
;
public
static
class
HgPz
{
// 动态表
public
static
final
String
DYNAMIC_TABLE
=
"app.pz.dynamicTable"
;
}
/**
* 组织机构
*
* @author:songx
* @date:2024/3/1,17:36
*/
public
static
class
XsOg
{
// 组织机构类型
public
static
final
String
ORG_TYPE
=
"xs.og.orgType"
;
}
}
}
src/main/java/com/baosight/hggp/core/constant/CommonConstant.java
View file @
8fc9cc8a
...
@@ -132,6 +132,11 @@ public class CommonConstant {
...
@@ -132,6 +132,11 @@ public class CommonConstant {
public
static
final
String
ENAME
=
"ename"
;
public
static
final
String
ENAME
=
"ename"
;
// 动态列
// 动态列
public
static
final
String
DYNAMIC_COLUMN
=
"dynamicColumn"
;
public
static
final
String
DYNAMIC_COLUMN
=
"dynamicColumn"
;
// VALUE_FIELD
public
static
final
String
VALUE_FIELD
=
"valueField"
;
// TEXT_FIELD
public
static
final
String
TEXT_FIELD
=
"textField"
;
}
}
/**
/**
...
...
src/main/java/com/baosight/hggp/core/tools/CodeOptionTools.java
0 → 100644
View file @
8fc9cc8a
package
com
.
baosight
.
hggp
.
core
.
tools
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlockMeta
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 2021-04-27 迁移到此处
*
* @author:songx
* @date:2021/4/27,15:21
*/
public
class
CodeOptionTools
{
/**
* 下拉框
*
* @param inInfo
* @param codeName
* @param blockId
* @param isSymbol
*/
public
static
void
buildOption
(
EiInfo
inInfo
,
String
codeName
,
String
blockId
,
boolean
isSymbol
)
{
EiBlock
newBlock
=
new
EiBlock
(
blockId
);
newBlock
.
addBlockMeta
(
initCodeMeta
());
List
<
Map
>
results
=
CodeValueTools
.
getCodeValues
(
codeName
);
for
(
Map
result
:
results
)
{
Map
<
String
,
String
>
row
=
new
HashMap
<>();
String
id
=
MapUtils
.
getString
(
result
,
"value"
);
String
text
=
MapUtils
.
getString
(
result
,
"label"
);
row
.
put
(
CommonConstant
.
Field
.
VALUE_FIELD
,
id
);
row
.
put
(
CommonConstant
.
Field
.
TEXT_FIELD
,
isSymbol
?
id
+
"-"
+
text
:
text
);
newBlock
.
addRow
(
row
);
}
inInfo
.
addBlock
(
newBlock
);
}
/**
* 构造下拉框的数据项.
*
* @return
*/
private
static
EiBlockMeta
initCodeMeta
()
{
EiColumn
eiColumn
;
EiBlockMeta
eiMetadata
=
new
EiBlockMeta
();
eiColumn
=
new
EiColumn
(
CommonConstant
.
Field
.
TEXT_FIELD
);
eiColumn
.
setFieldLength
(
150
);
eiColumn
.
setDescName
(
"描述"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
CommonConstant
.
Field
.
VALUE_FIELD
);
eiColumn
.
setFieldLength
(
30
);
eiColumn
.
setDescName
(
"值"
);
eiMetadata
.
addMeta
(
eiColumn
);
return
eiMetadata
;
}
}
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ021.java
View file @
8fc9cc8a
...
@@ -110,7 +110,7 @@ public class ServiceHGPZ021 extends ServiceBase {
...
@@ -110,7 +110,7 @@ public class ServiceHGPZ021 extends ServiceBase {
*/
*/
private
void
checkImportData
(
List
<
HGPZ021
>
fPz021s
)
{
private
void
checkImportData
(
List
<
HGPZ021
>
fPz021s
)
{
// 表名称小代码
// 表名称小代码
List
<
Map
>
dynamicTables
=
CodeValueTools
.
getCodeValues
(
CodesetConstant
.
HgPz
.
DYNAMIC_TABLE
);
List
<
Map
>
dynamicTables
=
CodeValueTools
.
getCodeValues
(
CodesetConstant
.
DYNAMIC_TABLE
);
for
(
HGPZ021
fPz021
:
fPz021s
)
{
for
(
HGPZ021
fPz021
:
fPz021s
)
{
AssertUtils
.
isEmpty
(
fPz021
.
getTableCode
(),
String
.
format
(
"序号[%s]表英文名不能为空"
,
fPz021
.
getId
()));
AssertUtils
.
isEmpty
(
fPz021
.
getTableCode
(),
String
.
format
(
"序号[%s]表英文名不能为空"
,
fPz021
.
getId
()));
for
(
Map
dynamicTableMap
:
dynamicTables
)
{
for
(
Map
dynamicTableMap
:
dynamicTables
)
{
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
8fc9cc8a
package
com
.
baosight
.
hggp
.
hg
.
wd
.
service
;
package
com
.
baosight
.
hggp
.
hg
.
wd
.
service
;
import
com.baosight.hggp.core.constant.CodesetConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
...
@@ -31,6 +32,7 @@ import org.apache.commons.lang.StringUtils;
...
@@ -31,6 +32,7 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
...
@@ -246,7 +248,7 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -246,7 +248,7 @@ public class ServiceHGWD001D extends TreeService {
boolean
isManager
=
HgWdUtils
.
HgWd009
.
isManager
();
boolean
isManager
=
HgWdUtils
.
HgWd009
.
isManager
();
List
<
String
>
projectSources
=
isManager
?
null
:
listTopNode
();
List
<
String
>
projectSources
=
isManager
?
null
:
listTopNode
();
// 项目来源小代码
// 项目来源小代码
List
<
Map
>
codesetMaps
=
CodeValueTools
.
getCodeValues
(
"app.sc.projectSource"
);
List
<
Map
>
codesetMaps
=
CodeValueTools
.
getCodeValues
(
CodesetConstant
.
PROJECT_SOURCE
);
for
(
Map
codesetMap
:
codesetMaps
)
{
for
(
Map
codesetMap
:
codesetMaps
)
{
String
id
=
MapUtils
.
getString
(
codesetMap
,
"value"
);
String
id
=
MapUtils
.
getString
(
codesetMap
,
"value"
);
String
text
=
MapUtils
.
getString
(
codesetMap
,
"label"
);
String
text
=
MapUtils
.
getString
(
codesetMap
,
"label"
);
...
@@ -400,8 +402,23 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -400,8 +402,23 @@ public class ServiceHGWD001D extends TreeService {
if
(!
HgWdUtils
.
HgWd009
.
isManager
())
{
if
(!
HgWdUtils
.
HgWd009
.
isManager
())
{
queryMap
.
put
(
"userId"
,
UserSessionUtils
.
getLoginName
());
queryMap
.
put
(
"userId"
,
UserSessionUtils
.
getLoginName
());
}
}
queryMap
.
put
(
HGSC001
.
FIELD_approval_status
,
HGConstant
.
ApprovalStatus
.
YS
);
List
<
HGWD001
>
nodeWds
=
dao
.
query
(
HGWD001
.
QUERY
,
queryMap
);
List
<
HGWD001
>
nodeWds
=
dao
.
query
(
HGWD001
.
QUERY
,
queryMap
);
// 查询父级结构
if
(
CollectionUtils
.
isEmpty
(
nodeWds
))
{
return
inInfo
;
}
List
<
List
<
String
>>
allPath
=
new
ArrayList
<>();
for
(
HGWD001
nodeWd
:
nodeWds
)
{
String
fileIdPath
=
nodeWd
.
getFileIdPath
();
if
(
StringUtils
.
isBlank
(
fileIdPath
))
{
continue
;
}
List
<
String
>
fileIds
=
Arrays
.
stream
(
fileIdPath
.
split
(
"/"
))
.
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toList
());
fileIds
.
add
(
nodeWd
.
getFileId
());
allPath
.
add
(
fileIds
);
}
inInfo
.
set
(
"allPath"
,
allPath
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"搜索节点失败"
);
LogUtils
.
setMsg
(
inInfo
,
e
,
"搜索节点失败"
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001E.java
View file @
8fc9cc8a
...
@@ -93,10 +93,10 @@ public class ServiceHGWD001E extends ServiceEPBase {
...
@@ -93,10 +93,10 @@ public class ServiceHGWD001E extends ServiceEPBase {
if
(
wd001
==
null
)
{
if
(
wd001
==
null
)
{
String
filePath
=
setFilePath
(
hgsc001
,
edcm01Map
.
get
(
"app.sc.projectSource"
));
String
filePath
=
setFilePath
(
hgsc001
,
edcm01Map
.
get
(
"app.sc.projectSource"
));
hgwd001
.
setFilePath
(
filePath
+
"/"
+
hgwd001
.
getFileName
());
hgwd001
.
setFilePath
(
filePath
+
"/"
+
hgwd001
.
getFileName
());
hgwd001
.
setFileIdPath
(
setFileIdPath
(
hgsc001
));
hgwd001
.
setFileIdPath
(
setFileIdPath
(
hgsc001
));
}
else
{
}
else
{
hgwd001
.
setFilePath
(
wd001
.
getFilePath
()
+
"/"
+
hgwd001
.
getFileName
());
hgwd001
.
setFilePath
(
wd001
.
getFilePath
()
+
"/"
+
hgwd001
.
getFileName
());
hgwd001
.
setFileIdPath
(
wd001
.
getFile
Path
()
+
"/"
+
hg
wd001
.
getFileId
());
hgwd001
.
setFileIdPath
(
wd001
.
getFile
IdPath
()
+
"/"
+
wd001
.
getFileId
());
}
}
if
(
hgwd001
.
getId
()
==
null
||
hgwd001
.
getId
()
==
0
)
{
if
(
hgwd001
.
getId
()
==
null
||
hgwd001
.
getId
()
==
0
)
{
this
.
add
(
hgwd001
);
this
.
add
(
hgwd001
);
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001F.java
View file @
8fc9cc8a
...
@@ -85,7 +85,7 @@ public class ServiceHGWD001F extends ServiceEPBase {
...
@@ -85,7 +85,7 @@ public class ServiceHGWD001F extends ServiceEPBase {
hgwd001
.
setFileIdPath
(
setFileIdPath
(
hgsc001
));
hgwd001
.
setFileIdPath
(
setFileIdPath
(
hgsc001
));
}
else
{
}
else
{
hgwd001
.
setFilePath
(
wd001
.
getFilePath
()
+
"/"
+
hgwd001
.
getFileName
());
hgwd001
.
setFilePath
(
wd001
.
getFilePath
()
+
"/"
+
hgwd001
.
getFileName
());
hgwd001
.
setFileIdPath
(
wd001
.
getFilePath
()
+
"/"
+
hgwd001
.
getFileId
());
hgwd001
.
setFileIdPath
(
wd001
.
getFile
Id
Path
()
+
"/"
+
hgwd001
.
getFileId
());
}
}
if
(
hgwd001
.
getId
()
==
null
||
hgwd001
.
getId
()
==
0
)
{
if
(
hgwd001
.
getId
()
==
null
||
hgwd001
.
getId
()
==
0
)
{
this
.
add
(
hgwd001
);
this
.
add
(
hgwd001
);
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD002.java
View file @
8fc9cc8a
...
@@ -2,7 +2,9 @@ package com.baosight.hggp.hg.wd.service;
...
@@ -2,7 +2,9 @@ package com.baosight.hggp.hg.wd.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CodesetConstant
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.tools.CodeOptionTools
;
import
com.baosight.hggp.hg.sc.enums.ProjectSourceEnum
;
import
com.baosight.hggp.hg.sc.enums.ProjectSourceEnum
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
...
@@ -37,6 +39,7 @@ public class ServiceHGWD002 extends ServiceBase {
...
@@ -37,6 +39,7 @@ public class ServiceHGWD002 extends ServiceBase {
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
));
CodeOptionTools
.
buildOption
(
inInfo
,
CodesetConstant
.
PROJECT_SOURCE
,
"project_source"
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGWD002
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGWD002
().
eiMetadata
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
...
...
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0801A.java
View file @
8fc9cc8a
...
@@ -67,7 +67,7 @@ public class ServiceXSOG0801A extends ServiceEPBase {
...
@@ -67,7 +67,7 @@ public class ServiceXSOG0801A extends ServiceEPBase {
condition
=
" ITEM_CODE = 'NOT CODE'"
;
condition
=
" ITEM_CODE = 'NOT CODE'"
;
}
}
}
}
List
<
Map
>
orgTypes
=
CodeValueTools
.
getCodeValues
(
CodesetConstant
.
XsOg
.
ORG_TYPE
,
condition
);
List
<
Map
>
orgTypes
=
CodeValueTools
.
getCodeValues
(
CodesetConstant
.
ORG_TYPE
,
condition
);
inInfo
.
addBlock
(
"orgTypeBlock"
).
addRows
(
orgTypes
);
inInfo
.
addBlock
(
"orgTypeBlock"
).
addRows
(
orgTypes
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
XSOG01
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
XSOG01
().
eiMetadata
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0801B.java
View file @
8fc9cc8a
...
@@ -58,7 +58,7 @@ public class ServiceXSOG0801B extends ServiceEPBase {
...
@@ -58,7 +58,7 @@ public class ServiceXSOG0801B extends ServiceEPBase {
}
else
{
}
else
{
condition
=
" ITEM_CODE = 'NOT CODE'"
;
condition
=
" ITEM_CODE = 'NOT CODE'"
;
}
}
List
<
Map
>
orgTypes
=
CodeValueTools
.
getCodeValues
(
CodesetConstant
.
XsOg
.
ORG_TYPE
,
condition
);
List
<
Map
>
orgTypes
=
CodeValueTools
.
getCodeValues
(
CodesetConstant
.
ORG_TYPE
,
condition
);
inInfo
.
addBlock
(
"orgTypeBlock"
).
addRows
(
orgTypes
);
inInfo
.
addBlock
(
"orgTypeBlock"
).
addRows
(
orgTypes
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
XSOG01
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
XSOG01
().
eiMetadata
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
8fc9cc8a
...
@@ -94,8 +94,9 @@ $(function () {
...
@@ -94,8 +94,9 @@ $(function () {
IPLATUI
.
EFTree
=
{
IPLATUI
.
EFTree
=
{
"categoryTree"
:
{
"categoryTree"
:
{
ROOT
:
{
label
:
'root'
,
text
:
'目录结构'
},
query
:
function
(
inInfo
,
model
)
{
query
:
function
(
inInfo
,
model
)
{
if
(
model
==
null
)
{
if
(
model
==
null
||
model
.
id
===
"root"
)
{
return
inInfo
;
return
inInfo
;
}
}
let
label
=
model
.
label
;
let
label
=
model
.
label
;
...
@@ -324,11 +325,12 @@ $(function () {
...
@@ -324,11 +325,12 @@ $(function () {
})
})
$
(
"#categoryTree"
).
mousedown
(
function
(
e
)
{
$
(
"#categoryTree"
).
mousedown
(
function
(
e
)
{
if
(
e
.
button
!==
2
)
{
let
title
=
e
.
target
.
title
;
if
(
e
.
button
!==
2
||
CommonUtils
.
isBlank
(
title
))
{
return
return
}
}
if
(
"
engineering"
===
e
.
target
.
title
||
"foreign"
===
e
.
target
.
title
if
(
"
root"
===
title
||
"engineering"
===
title
||
"foreign"
===
title
||
"spare"
===
e
.
target
.
title
||
"other"
===
e
.
target
.
title
)
{
||
"spare"
===
title
||
"other"
===
title
)
{
$
(
"#isAdd"
).
css
(
'display'
,
'none'
);
$
(
"#isAdd"
).
css
(
'display'
,
'none'
);
$
(
"#isDel"
).
css
(
'display'
,
'none'
);
$
(
"#isDel"
).
css
(
'display'
,
'none'
);
$
(
"#isEdit"
).
css
(
'display'
,
'none'
);
$
(
"#isEdit"
).
css
(
'display'
,
'none'
);
...
...
src/main/webapp/HG/WD/HGWD002.js
View file @
8fc9cc8a
...
@@ -86,15 +86,50 @@ $(function () {
...
@@ -86,15 +86,50 @@ $(function () {
}
}
init
();
init
();
IPLATUI
.
EFGrid
=
{
"result"
:
{
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
pageable
:
{
pageSize
:
500
,
pageSizes
:
[
20
,
50
,
100
,
200
,
500
],
},
columns
:
[{
field
:
"operator"
,
title
:
"操作"
,
template
:
function
(
model
)
{
let
template
=
''
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showPreview(
\'
'
+
model
.
docId
+
'
\'
)" >预览</a>'
;
return
template
;
}
},
{
field
:
"docVersion"
,
template
:
function
(
model
)
{
return
"v"
+
model
.
docVersion
;
}
},
{
field
:
"docType"
,
template
:
function
(
row
)
{
if
(
!
isBlank
(
row
.
docType
)
&&
row
.
docType
.
startsWith
(
"."
))
{
return
row
.
docType
.
substring
(
1
);
}
return
row
.
docType
==
null
?
""
:
row
.
docType
;
}
}],
loadComplete
:
function
(
grid
)
{
}
}
}
IPLATUI
.
EFTree
=
{
IPLATUI
.
EFTree
=
{
"docTree"
:
{
"docTree"
:
{
ROOT
:
{
label
:
'root'
,
text
:
'目录结构'
},
query
:
function
(
inInfo
,
model
)
{
query
:
function
(
inInfo
,
model
)
{
if
(
model
==
null
)
{
if
(
model
==
null
||
model
.
id
===
"root"
)
{
return
inInfo
;
return
inInfo
;
}
}
let
label
=
model
.
label
;
// 选中树节点
// 选中树节点
selectTreeId
(
label
);
selectTreeId
(
model
.
id
);
// 设置选中节点
// 设置选中节点
treeSelectClick
(
model
);
treeSelectClick
(
model
);
inInfo
.
set
(
"inqu_status-0-projCode"
,
$
(
"#inqu_status-0-projCode"
).
val
());
inInfo
.
set
(
"inqu_status-0-projCode"
,
$
(
"#inqu_status-0-projCode"
).
val
());
...
@@ -106,10 +141,8 @@ $(function () {
...
@@ -106,10 +141,8 @@ $(function () {
// 设置选中节点
// 设置选中节点
treeSelectClick
(
nodeData
);
treeSelectClick
(
nodeData
);
},
},
/*ROOT:{label: 'root',text: '组织机构'},*/
template
:
function
(
node
)
{
template
:
function
(
node
)
{
let
item
=
node
.
item
;
let
item
=
node
.
item
;
let
title
=
item
.
text
;
let
icon
=
'fa fa-globe'
let
icon
=
'fa fa-globe'
if
(
item
.
label
!==
'root'
)
{
if
(
item
.
label
!==
'root'
)
{
switch
(
item
.
leafType
)
{
switch
(
item
.
leafType
)
{
...
@@ -121,14 +154,15 @@ $(function () {
...
@@ -121,14 +154,15 @@ $(function () {
break
;
break
;
}
}
}
}
return
' <span class="'
+
icon
+
'" style="padding-right: 8px"> </span> <span class="titleClass" title="'
+
item
.
label
+
'">'
+
title
+
'</span>'
return
' <span class="'
+
icon
+
'" style="padding-right: 8px"> </span> '
+
'<span class="titleClass" title="'
+
item
.
label
+
'">'
+
item
.
text
+
'</span>'
},
},
loadComplete
:
function
(
options
)
{
loadComplete
:
function
(
options
)
{
// 树节点查询
// 树节点查询
$
(
"#search"
).
on
(
"click"
,
treeSearch
);
$
(
"#search"
).
on
(
"click"
,
treeSearch
);
},
},
selectTreeNode
:
{
selectTreeNode
:
{
fil
eId
:
''
,
tre
eId
:
''
,
projCode
:
''
,
projCode
:
''
,
leafType
:
''
,
leafType
:
''
,
downloadFlag
:
'0'
downloadFlag
:
'0'
...
@@ -138,45 +172,10 @@ $(function () {
...
@@ -138,45 +172,10 @@ $(function () {
* 开启结点拖拽功能,默认dragAndDrop = false不开启,
* 开启结点拖拽功能,默认dragAndDrop = false不开启,
* 若未开启拖拽,不会触发dragstart和dragend事件
* 若未开启拖拽,不会触发dragstart和dragend事件
*/
*/
dragAndDrop
:
false
,
dragAndDrop
:
false
}
}
};
};
IPLATUI
.
EFGrid
=
{
"result"
:
{
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
pageable
:
{
pageSize
:
500
,
pageSizes
:
[
20
,
50
,
100
,
200
,
500
],
},
columns
:
[{
field
:
"operator"
,
title
:
"操作"
,
template
:
function
(
model
)
{
let
template
=
''
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showPreview(
\'
'
+
model
.
docId
+
'
\'
)" >预览</a>'
;
return
template
;
}
},
{
field
:
"docVersion"
,
template
:
function
(
model
)
{
return
"v"
+
model
.
docVersion
;
}
},
{
field
:
"docType"
,
template
:
function
(
row
)
{
if
(
!
isBlank
(
row
.
docType
)
&&
row
.
docType
.
startsWith
(
"."
))
{
return
row
.
docType
.
substring
(
1
);
}
return
row
.
docType
==
null
?
""
:
row
.
docType
;
}
}],
loadComplete
:
function
(
grid
)
{
}
}
}
// 查询
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
$
(
"#QUERY"
).
on
(
"click"
,
query
);
...
@@ -294,12 +293,11 @@ let treeSelectClick = function (nodeData) {
...
@@ -294,12 +293,11 @@ let treeSelectClick = function (nodeData) {
* @param nodeData
* @param nodeData
*/
*/
let
setTreeNodeValue
=
function
(
nodeData
)
{
let
setTreeNodeValue
=
function
(
nodeData
)
{
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
fil
eId
=
nodeData
.
id
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
tre
eId
=
nodeData
.
id
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
projCode
=
nodeData
.
projCode
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
projCode
=
nodeData
.
projCode
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
leafType
=
nodeData
.
leafType
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
leafType
=
nodeData
.
leafType
;
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
downloadFlag
=
nodeData
.
downloadFlag
==
null
?
0
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
downloadFlag
=
nodeData
.
downloadFlag
==
null
?
0
:
nodeData
.
downloadFlag
;
:
nodeData
.
downloadFlag
;
$
(
"[name = 'inqu_status-0-parentId']"
).
val
(
nodeData
.
id
);
$
(
"[name = 'inqu_status-0-fileId']"
).
val
(
nodeData
.
id
);
$
(
"[name = 'inqu_status-0-fileId']"
).
val
(
nodeData
.
id
);
$
(
"[name = 'inqu_status-0-projCode']"
).
val
(
nodeData
.
projCode
);
$
(
"[name = 'inqu_status-0-projCode']"
).
val
(
nodeData
.
projCode
);
}
}
...
@@ -338,19 +336,20 @@ let preview = function () {
...
@@ -338,19 +336,20 @@ let preview = function () {
* @param docId
* @param docId
*/
*/
let
showPreview
=
function
(
docId
)
{
let
showPreview
=
function
(
docId
)
{
let
fileId
=
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
fil
eId
;
let
treeId
=
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
tre
eId
;
addRecordWindow
(
fil
eId
,
docId
);
addRecordWindow
(
tre
eId
,
docId
);
}
}
/**
/**
* 树节点查询
* 树节点查询
*/
*/
let
treeSearch
=
function
(){
let
treeSearch
=
function
(){
let
treeId
=
IPLATUI
.
EFTree
.
docTree
.
selectTreeNode
.
treeId
;
let
tree
=
$
(
"#docTree"
).
data
(
"kendoTreeView"
);
let
tree
=
$
(
"#docTree"
).
data
(
"kendoTreeView"
);
let
leafName
=
$
(
"#searchText"
).
val
();
let
leafName
=
$
(
"#searchText"
).
val
();
if
(
leafName
==
null
||
leafName
.
trim
()
===
''
)
{
if
(
CommonUtils
.
isBlank
(
leafName
)
)
{
tree
.
reload
(
"root"
);
tree
.
reload
(
"root"
);
return
return
;
}
}
let
inInfo
=
new
EiInfo
();
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-fileName"
,
leafName
);
inInfo
.
set
(
"inqu_status-0-fileName"
,
leafName
);
...
@@ -362,7 +361,7 @@ let treeSearch = function (){
...
@@ -362,7 +361,7 @@ let treeSearch = function (){
}
}
// 获取所有满足条件的子节点路径
// 获取所有满足条件的子节点路径
const
allPath
=
res
.
get
(
"allPath"
)
const
allPath
=
res
.
get
(
"allPath"
)
if
(
allPath
.
length
<=
0
)
{
if
(
CommonUtils
.
isBlank
(
allPath
)
||
allPath
.
length
<=
0
)
{
return
;
return
;
}
}
tree
.
reload
(
"root"
);
tree
.
reload
(
"root"
);
...
...
src/main/webapp/HG/WD/HGWD002.jsp
View file @
8fc9cc8a
...
@@ -17,30 +17,29 @@
...
@@ -17,30 +17,29 @@
<
%
--
</
div
>
--%>
<
%
--
</
div
>
--%>
<div
id=
"menu"
style=
"margin-top: 12px; margin-bottom: 8px"
>
<div
id=
"menu"
style=
"margin-top: 12px; margin-bottom: 8px"
>
<EF:EFTree
bindId=
"docTree"
ename=
"tree_name"
textField=
"text"
valueField=
"label"
<EF:EFTree
bindId=
"docTree"
ename=
"tree_name"
textField=
"text"
valueField=
"label"
hasChildren=
"leaf"
pid=
"parentId"
serviceName=
"HGWD001D"
methodName=
"queryTree"
hasChildren=
"leaf"
pid=
"parentId"
serviceName=
"HGWD001D"
methodName=
"queryTree"
>
expandLevel=
"1"
>
</EF:EFTree>
</EF:EFTree>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
</div>
</div>
<div
id=
"right-pane"
class=
"i-fit-height"
>
<div
id=
"right-pane"
class=
"i-fit-height"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<EF:EFInput
cname=
"项目代码"
ename=
"projCode
"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
ename=
"projCode"
cname=
"项目代码
"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库id"
ename=
"fileI
d"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
ename=
"fileId"
cname=
"文档库i
d"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFSelect
blockId=
"inqu_status"
row=
"0"
ename=
"fileType"
cname=
"附件分类
"
colWidth=
"3"
<EF:EFSelect
ename=
"fileType"
cname=
"附件分类"
blockId=
"inqu_status"
row=
"0
"
colWidth=
"3"
filter=
"contains"
>
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hggp.hgwd.fileType"
/>
<EF:EFCodeOption
codeName=
"hggp.hgwd.fileType"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput
cname=
"附件名称"
ename=
"docName
"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
ename=
"docName"
cname=
"附件名称
"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFDateSpan
startCname=
"上传时间"
endCname=
"至"
blockId=
"inqu_status"
row=
"0"
<EF:EFDateSpan
startCname=
"上传时间"
endCname=
"至"
blockId=
"inqu_status"
row=
"0"
startName=
"createdDateFrom"
endName=
"createdDateTo"
role=
"date"
startName=
"createdDateFrom"
endName=
"createdDateTo"
role=
"date"
format=
"yyyy-MM-dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"false"
>
format=
"yyyy-MM-dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"false"
>
</EF:EFDateSpan>
</EF:EFDateSpan>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFInput
cname=
"文件路径"
ename=
"filePath
"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
ename=
"filePath"
cname=
"文件路径
"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
...
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