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
1417705e
Commit
1417705e
authored
Nov 25, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.文档库目录过滤掉特殊符号
parent
44706a6e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
HGWD001E.js
src/main/webapp/HG/WD/HGWD001E.js
+5
-0
HGWD001F.js
src/main/webapp/HG/WD/HGWD001F.js
+5
-0
common.js
src/main/webapp/common/js/common.js
+11
-0
No files found.
src/main/webapp/HG/WD/HGWD001E.js
View file @
1417705e
...
@@ -154,6 +154,11 @@ let save = function (btnNode) {
...
@@ -154,6 +154,11 @@ let save = function (btnNode) {
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
if
(
isChinese
(
fileName
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
目录名称
\"
,不能包含特殊字符!"
);
flag
=
false
;
return
false
;
}
});
});
if
(
flag
)
{
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
...
...
src/main/webapp/HG/WD/HGWD001F.js
View file @
1417705e
...
@@ -133,6 +133,11 @@ let save = function (btnNode) {
...
@@ -133,6 +133,11 @@ let save = function (btnNode) {
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
if
(
isChinese
(
fileName
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
目录名称
\"
,不能包含特殊字符!"
);
flag
=
false
;
return
false
;
}
});
});
if
(
flag
)
{
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
...
...
src/main/webapp/common/js/common.js
View file @
1417705e
...
@@ -10,6 +10,17 @@ function isBlank(data) {
...
@@ -10,6 +10,17 @@ function isBlank(data) {
}
}
/**
/**
* 是否为中文 不包含特殊字符
* @param str 字符串
* @returns {boolean} true:包含中文,false:不包含中文
*/
function
isChinese
(
str
){
let
reg
=
/^
[\u
4e00-
\u
9fa5_a-zA-Z0-9
]
+$/
;
return
!
reg
.
test
(
str
);
}
/**
* 是否数字
* 是否数字
*
*
* @param val
* @param val
...
...
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