Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EL-ADMIN
Project
Project
Details
Activity
Releases
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
JiangSN
EL-ADMIN
Commits
ab986947
Commit
ab986947
authored
Oct 20, 2021
by
JiangSN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化公共查看详情方法代码逻辑
parent
5bde956f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
crud.js
eladmin-web/src/components/Crud/crud.js
+17
-11
No files found.
eladmin-web/src/components/Crud/crud.js
View file @
ab986947
...
...
@@ -192,16 +192,24 @@ function CRUD(options) {
* @param {*} queryList 返回参数
*/
toCheck
(
data
,
queryList
)
{
crud
.
loading
=
true
if
(
queryList
.
status
){
queryList
.
id
=
data
.
id
crud
.
loading
=
true
initData
(
queryList
.
url
,
queryList
).
then
(
res
=>
{
//循环对象
let
list
=
res
.
content
[
0
];
for
(
var
k
in
list
){
data
[
k
]
=
list
[
k
];
}
this
.
toCheckPush
(
data
)
}).
finally
(
err
=>
{
this
.
toCheckPush
(
data
)
})
}
else
{
this
.
toCheckPush
(
data
)
}
},
toCheckPush
(
data
){
crud
.
loading
=
false
crud
.
resetForm
(
JSON
.
parse
(
JSON
.
stringify
(
data
)))
if
(
!
(
callVmHook
(
crud
,
CRUD
.
HOOK
.
beforeToEdit
,
crud
.
form
)
&&
callVmHook
(
crud
,
CRUD
.
HOOK
.
beforeToCU
,
crud
.
form
)))
{
...
...
@@ -212,8 +220,6 @@ function CRUD(options) {
crud
.
getDataStatus
(
crud
.
getDataId
(
data
)).
check
=
CRUD
.
STATUS
.
PREPARED
callVmHook
(
crud
,
CRUD
.
HOOK
.
afterToEdit
,
crud
.
form
)
callVmHook
(
crud
,
CRUD
.
HOOK
.
afterToCU
,
crud
.
form
)
})
}
},
/**
* 启动删除
...
...
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