Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5eb46cf9
authored
May 21, 2026
by
chenwq1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 版本更新
1 parent
cfad23a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
2 deletions
aus-front/admin/src/views/detection/order/DetectionOrderEdit.vue
aus-front/admin/src/views/detection/order/components/CustomizeForm.vue
aus-front/admin/src/views/detection/order/components/TestingScore.vue
aus-front/admin/src/views/detection/order/DetectionOrderEdit.vue
View file @
5eb46cf
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
</div>
</div>
</div>
</div>
<div
class=
"customizeFormBox"
v-if=
"activeNodeId != -1"
>
<div
class=
"customizeFormBox"
v-if=
"activeNodeId != -1"
>
<CustomizeForm
ref=
"customizeFormRef"
@
submitSuccess=
"
getTemplateData('0')
"
/>
<CustomizeForm
ref=
"customizeFormRef"
@
submitSuccess=
"
onFormSubmitSuccess
"
/>
</div>
</div>
<div
class=
"customizeFormBox"
v-if=
"activeNodeId == -1"
>
<div
class=
"customizeFormBox"
v-if=
"activeNodeId == -1"
>
<TestingScore
ref=
"testingScoreRef"
@
submitSuccess=
"
getTemplateData('0')
"
/>
<TestingScore
ref=
"testingScoreRef"
@
submitSuccess=
"
onFormSubmitSuccess
"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -48,6 +48,8 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -48,6 +48,8 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
nodeList
:
any
=
[];
nodeList
:
any
=
[];
activeNodeId
:
number
=
null
;
activeNodeId
:
number
=
null
;
/** 本次编辑会话内已成功保存过的一级类目 */
savedNodeIds
=
new
Set
<
number
>
();
carTypeList
:
any
=
[];
carTypeList
:
any
=
[];
inspectionNodeList
:
any
=
[];
inspectionNodeList
:
any
=
[];
...
@@ -170,8 +172,49 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -170,8 +172,49 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
});
});
}
}
onFormSubmitSuccess
()
{
if
(
this
.
activeNodeId
!=
null
)
{
this
.
savedNodeIds
.
add
(
Number
(
this
.
activeNodeId
));
}
this
.
getTemplateData
(
'0'
);
}
getActiveFormRef
():
any
{
if
(
Number
(
this
.
activeNodeId
)
===
-
1
)
{
return
this
.
$refs
.
testingScoreRef
;
}
return
this
.
$refs
.
customizeFormRef
;
}
hasUnsavedChanges
():
boolean
{
const
form
=
this
.
getActiveFormRef
();
return
!!
form
?.
hasUnsavedChanges
?.();
}
isCurrentTabSaved
():
boolean
{
const
nodeId
=
Number
(
this
.
activeNodeId
);
if
(
this
.
savedNodeIds
.
has
(
nodeId
))
{
return
true
;
}
const
node
=
(
this
.
nodeList
||
[]).
find
(
(
n
)
=>
Number
(
n
.
id
)
===
nodeId
,
);
return
node
?.
completedFlag
==
'1'
;
}
needsConfirmLeave
():
boolean
{
if
(
this
.
isCurrentTabSaved
()
&&
!
this
.
hasUnsavedChanges
())
{
return
false
;
}
return
this
.
hasUnsavedChanges
()
||
!
this
.
isCurrentTabSaved
();
}
handleNodeList
(
item
:
any
)
{
handleNodeList
(
item
:
any
)
{
if
(
item
.
id
==
this
.
activeNodeId
)
return
;
if
(
item
.
id
==
this
.
activeNodeId
)
return
;
if
(
!
this
.
needsConfirmLeave
())
{
this
.
switchNode
(
item
);
return
;
}
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'提示'
,
title
:
'提示'
,
content
:
'当前一级类目下,存在必填检测项未完成,强制离开将丢失数据,请完成检查后切换tab或离开标签页。'
,
content
:
'当前一级类目下,存在必填检测项未完成,强制离开将丢失数据,请完成检查后切换tab或离开标签页。'
,
...
...
aus-front/admin/src/views/detection/order/components/CustomizeForm.vue
View file @
5eb46cf
...
@@ -354,6 +354,10 @@ export default class CustomizeForm extends Vue {
...
@@ -354,6 +354,10 @@ export default class CustomizeForm extends Vue {
this
.
leafIdToName
=
nameMap
;
this
.
leafIdToName
=
nameMap
;
}
}
hasUnsavedChanges
():
boolean
{
return
this
.
collectModifiedFieldNames
().
length
>
0
;
}
collectModifiedFieldNames
():
string
[]
{
collectModifiedFieldNames
():
string
[]
{
const
current
:
Record
<
string
,
any
>
=
{};
const
current
:
Record
<
string
,
any
>
=
{};
const
walk
=
(
nodes
:
any
[]
=
[])
=>
{
const
walk
=
(
nodes
:
any
[]
=
[])
=>
{
...
...
aus-front/admin/src/views/detection/order/components/TestingScore.vue
View file @
5eb46cf
...
@@ -403,6 +403,10 @@ export default class TestingScore extends Vue {
...
@@ -403,6 +403,10 @@ export default class TestingScore extends Vue {
this
.
initialPostData
=
snap
;
this
.
initialPostData
=
snap
;
}
}
hasUnsavedChanges
():
boolean
{
return
this
.
collectModifiedFieldNames
().
length
>
0
;
}
collectModifiedFieldNames
():
string
[]
{
collectModifiedFieldNames
():
string
[]
{
const
current
:
Record
<
string
,
any
>
=
{};
const
current
:
Record
<
string
,
any
>
=
{};
Object
.
keys
(
this
.
postData
).
forEach
((
k
)
=>
{
Object
.
keys
(
this
.
postData
).
forEach
((
k
)
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment