Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
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
zhouqian
vue-gjjs
Commits
4e333334
Commit
4e333334
authored
Dec 24, 2021
by
hulei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存按钮增加校验信息回显
parent
87956aa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
commonFuncs.js
src/mixin/commonFuncs.js
+7
-4
No files found.
src/mixin/commonFuncs.js
View file @
4e333334
...
...
@@ -12,12 +12,15 @@ export default {
type
:
"success"
,
});
this
.
$router
.
history
.
push
(
"/business/trnrel"
);
}
else
{
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
"保存失败"
,
type
:
"error"
,
});
if
(
Object
.
keys
(
result
.
fieldErrors
).
length
>
0
){
this
.
$notify
.
error
({
title
:
"错误"
,
message
:
result
.
respMsg
});
}
}
},
// 表单暂存
...
...
@@ -41,9 +44,7 @@ export default {
// 表单校验
async
handleCheck
()
{
let
result
=
await
this
.
checkAll
();
if
(
result
.
respCode
!=
SUCCESS
&&
Object
.
keys
(
result
.
fieldErrors
).
length
==
0
)
{
this
.
$notify
.
error
({
title
:
"错误"
,
message
:
result
.
respMsg
});
}
else
{
if
(
result
.
respCode
==
SUCCESS
&&
Object
.
keys
(
result
.
fieldErrors
).
length
==
0
)
{
// 清除之前的校验状态
this
.
$refs
.
modelForm
.
clearValidate
();
const
fields
=
this
.
$refs
.
modelForm
.
fields
;
...
...
@@ -55,6 +56,8 @@ export default {
// tab切换之后,需出发tab-click的事件
this
.
tabClick
(
tab
);
}
}
else
{
this
.
$notify
.
error
({
title
:
"错误"
,
message
:
result
.
respMsg
});
}
},
},
...
...
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