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 d7907cc4
authored
May 22, 2026
by
chenwq1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 提示bug
1 parent
5eb46cf9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
42 deletions
aus-front/admin/src/views/detection/order/DetectionOrderEdit.vue
aus-front/admin/src/views/detection/order/DetectionOrderEdit.vue
View file @
d7907cc
...
@@ -3,46 +3,67 @@
...
@@ -3,46 +3,67 @@
<div
class=
"detection-order-edit__header"
>
<div
class=
"detection-order-edit__header"
>
<div
class=
"pageBox_title"
>
<div
class=
"pageBox_title"
>
编辑检测报告
编辑检测报告
<a-button
style=
"float: right;"
@
click=
"handleBack()"
>
返回列表
</a-button>
<a-button
style=
"float: right"
@
click=
"handleBack()"
>
返回列表
</a-button
>
</div>
</div>
<InformationEdit
ref=
"informationEditRef"
:pageData=
"pageData.inspectionWORespVO ||
{}" />
<InformationEdit
ref=
"informationEditRef"
:pageData=
"pageData.inspectionWORespVO ||
{}"
/>
<div
class=
"optionBox"
>
<div
class=
"optionBox"
>
<div
v-for=
"item in nodeList"
@
click=
"handleNodeList(item)"
:key=
"item.id"
<div
:class=
"
{ 'optionBut_active': item.id == activeNodeId }" class="optionBut">
v-for=
"item in nodeList"
@
click=
"handleNodeList(item)"
:key=
"item.id"
:class=
"
{ optionBut_active: item.id == activeNodeId }"
class="optionBut"
>
{{
item
.
nodeName
}}
{{
item
.
nodeName
}}
<CheckCircleFilled
v-if=
"item.completedFlag == '1'"
class=
"circleFilled"
/>
<CheckCircleFilled
v-if=
"item.completedFlag == '1'"
class=
"circleFilled"
/>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"customizeFormBox"
v-if=
"activeNodeId != -1"
>
<div
class=
"customizeFormBox"
v-if=
"activeNodeId != -1"
>
<CustomizeForm
ref=
"customizeFormRef"
@
submitSuccess=
"onFormSubmitSuccess"
/>
<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=
"onFormSubmitSuccess"
/>
<TestingScore
ref=
"testingScoreRef"
@
submitSuccess=
"onFormSubmitSuccess"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
}
from
'vue-facing-decorator'
;
import
{
Component
}
from
"vue-facing-decorator"
;
import
{
PaginationComponent
}
from
"@/components/PaginationComponent"
;
import
{
PaginationComponent
}
from
"@/components/PaginationComponent"
;
import
{
Vehicle
}
from
"lib/src/entity/vehicle/entity/Vehicle"
;
import
{
Vehicle
}
from
"lib/src/entity/vehicle/entity/Vehicle"
;
import
InformationEdit
from
"@/views/detection/order/components/InformationEdit.vue"
;
import
InformationEdit
from
"@/views/detection/order/components/InformationEdit.vue"
;
import
CustomizeForm
from
"@/views/detection/order/components/CustomizeForm.vue"
;
import
CustomizeForm
from
"@/views/detection/order/components/CustomizeForm.vue"
;
import
TestingScore
from
"@/views/detection/order/components/TestingScore.vue"
;
import
TestingScore
from
"@/views/detection/order/components/TestingScore.vue"
;
import
{
DetectionController
}
from
"@/api/DetectionController"
;
import
{
DetectionController
}
from
"@/api/DetectionController"
;
import
{
CheckCircleFilled
}
from
'@ant-design/icons-vue'
import
{
CheckCircleFilled
}
from
"@ant-design/icons-vue"
;
import
{
TrackHelper
}
from
"@/common/TrackHelper"
;
import
{
TrackHelper
}
from
"@/common/TrackHelper"
;
import
{
Modal
}
from
"ant-design-vue"
;
import
{
Modal
}
from
"ant-design-vue"
;
import
{
applyResolvedInitialValuesToLeafNodes
}
from
"@/views/detection/order/utils/inspectInitialValues"
;
import
{
applyResolvedInitialValuesToLeafNodes
}
from
"@/views/detection/order/utils/inspectInitialValues"
;
@
Component
({
@
Component
({
components
:
{
InformationEdit
,
CustomizeForm
,
CheckCircleFilled
,
TestingScore
}
components
:
{
InformationEdit
,
CustomizeForm
,
CheckCircleFilled
,
TestingScore
,
},
})
})
export
default
class
DetectionOrderEdit
extends
PaginationComponent
<
Vehicle
>
{
export
default
class
DetectionOrderEdit
extends
PaginationComponent
<
Vehicle
>
{
pageData
:
any
=
{};
pageData
:
any
=
{};
defaultData
:
any
=
{};
defaultData
:
any
=
{};
...
@@ -63,7 +84,7 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -63,7 +84,7 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
});
});
this
.
getDetailData
();
this
.
getDetailData
();
this
.
getDefaultTemplate
().
finally
(()
=>
{
this
.
getDefaultTemplate
().
finally
(()
=>
{
this
.
getTemplateData
(
'1'
);
this
.
getTemplateData
(
"1"
);
});
});
}
}
...
@@ -74,26 +95,35 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -74,26 +95,35 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
getDetailData
()
{
getDetailData
()
{
const
routeData
=
this
.
$route
.
query
||
{};
const
routeData
=
this
.
$route
.
query
||
{};
let
postData
=
{
workOrderId
:
routeData
.
id
}
let
postData
=
{
workOrderId
:
routeData
.
id
};
DetectionController
.
inspectOrderDetail
(
this
.
axios
,
postData
).
then
(
response
=>
{
DetectionController
.
inspectOrderDetail
(
this
.
axios
,
postData
).
then
(
(
response
)
=>
{
this
.
pageData
=
response
.
data
.
data
||
{};
this
.
pageData
=
response
.
data
.
data
||
{};
const
wo
=
this
.
pageData
?.
inspectionWORespVO
||
{};
const
wo
=
this
.
pageData
?.
inspectionWORespVO
||
{};
TrackHelper
.
setEditContext
({
TrackHelper
.
setEditContext
({
workOrderId
:
routeData
.
id
,
workOrderId
:
routeData
.
id
,
reportId
:
routeData
.
id
,
reportId
:
routeData
.
id
,
vehicleId
:
wo
.
vehicleId
||
wo
.
vehicle
?.
id
||
this
.
pageData
?.
vehicle
?.
id
||
""
,
vehicleId
:
});
wo
.
vehicleId
||
wo
.
vehicle
?.
id
||
this
.
pageData
?.
vehicle
?.
id
||
""
,
});
});
},
);
}
}
getTemplateData
(
status
)
{
getTemplateData
(
status
)
{
const
routeData
=
this
.
$route
.
query
||
{};
const
routeData
=
this
.
$route
.
query
||
{};
DetectionController
.
inspectionTemplate
(
this
.
axios
,
{
id
:
routeData
.
id
,
status
}).
then
(
response
=>
{
DetectionController
.
inspectionTemplate
(
this
.
axios
,
{
this
.
nodeList
=
(
response
?.
data
?.
data
||
[]).
map
(
item
=>
({
id
:
routeData
.
id
,
status
,
}).
then
((
response
)
=>
{
this
.
nodeList
=
(
response
?.
data
?.
data
||
[]).
map
((
item
)
=>
({
...
item
,
...
item
,
nodeName
:
item
.
id
==
-
1
?
"检测评分"
:
item
.
nodeName
,
nodeName
:
item
.
id
==
-
1
?
"检测评分"
:
item
.
nodeName
,
}));
}));
if
(
status
==
'1'
)
{
if
(
status
==
"1"
)
{
this
.
activeNodeId
=
this
.
nodeList
[
0
].
id
||
null
;
this
.
activeNodeId
=
this
.
nodeList
[
0
].
id
||
null
;
this
.
getInspectionNodeData
(
this
.
activeNodeId
);
this
.
getInspectionNodeData
(
this
.
activeNodeId
);
}
}
...
@@ -102,7 +132,9 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -102,7 +132,9 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
getDefaultTemplate
()
{
getDefaultTemplate
()
{
const
routeData
=
this
.
$route
.
query
||
{};
const
routeData
=
this
.
$route
.
query
||
{};
return
DetectionController
.
inspectionTemplateDefault
(
this
.
axios
,
{
taskId
:
routeData
.
id
}).
then
(
response
=>
{
return
DetectionController
.
inspectionTemplateDefault
(
this
.
axios
,
{
taskId
:
routeData
.
id
,
}).
then
((
response
)
=>
{
this
.
defaultData
=
response
?.
data
?.
data
||
{};
this
.
defaultData
=
response
?.
data
?.
data
||
{};
return
this
.
getCarTypeList
(
this
.
defaultData
.
carSeriesId
);
return
this
.
getCarTypeList
(
this
.
defaultData
.
carSeriesId
);
});
});
...
@@ -113,31 +145,41 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -113,31 +145,41 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
this
.
carTypeList
=
[];
this
.
carTypeList
=
[];
return
Promise
.
resolve
();
return
Promise
.
resolve
();
}
}
return
DetectionController
.
getCarTypeList
(
this
.
axios
,
{
csId
:
id
}).
then
(
response
=>
{
return
DetectionController
.
getCarTypeList
(
this
.
axios
,
{
csId
:
id
,
}).
then
((
response
)
=>
{
const
data
=
response
?.
data
?.
data
||
{};
const
data
=
response
?.
data
?.
data
||
{};
this
.
carTypeList
=
(
data
.
carinfos
||
[]).
map
(
item
=>
({
text
:
item
.
name
||
""
,
value
:
String
(
item
.
id
)
||
""
}));
this
.
carTypeList
=
(
data
.
carinfos
||
[]).
map
((
item
)
=>
({
text
:
item
.
name
||
""
,
value
:
String
(
item
.
id
)
||
""
,
}));
});
});
}
}
getInspectionNodeData
(
taskId
)
{
getInspectionNodeData
(
taskId
)
{
const
routeData
=
this
.
$route
.
query
||
{};
const
routeData
=
this
.
$route
.
query
||
{};
DetectionController
.
inspectionNode
(
this
.
axios
,
{
id
:
taskId
,
taskId
:
routeData
.
id
}).
then
(
response
=>
{
DetectionController
.
inspectionNode
(
this
.
axios
,
{
id
:
taskId
,
taskId
:
routeData
.
id
,
}).
then
((
response
)
=>
{
const
nodeList
=
response
?.
data
?.
data
||
[];
const
nodeList
=
response
?.
data
?.
data
||
[];
const
taskIdMap
=
{
const
taskIdMap
=
{
48
:
"车型信息"
,
48
:
"车型信息"
,
60
:
"车身主图"
,
60
:
"车身主图"
,
551
:
"工况视频"
551
:
"工况视频"
,
};
};
if
(
taskIdMap
[
taskId
])
{
if
(
taskIdMap
[
taskId
])
{
this
.
inspectionNodeList
=
[{
this
.
inspectionNodeList
=
[
{
id
:
taskId
,
id
:
taskId
,
nodeName
:
taskIdMap
[
taskId
],
nodeName
:
taskIdMap
[
taskId
],
childrenNodes
:
nodeList
childrenNodes
:
nodeList
,
}];
},
];
}
else
{
}
else
{
this
.
inspectionNodeList
=
nodeList
;
this
.
inspectionNodeList
=
nodeList
;
}
}
this
.
inspectionNodeList
=
this
.
inspectionNodeList
.
map
(
item
=>
({
this
.
inspectionNodeList
=
this
.
inspectionNodeList
.
map
(
(
item
)
=>
({
...
item
,
...
item
,
childrenNodes
:
this
.
applyLeafDefaults
(
item
.
childrenNodes
||
[]),
childrenNodes
:
this
.
applyLeafDefaults
(
item
.
childrenNodes
||
[]),
}));
}));
...
@@ -163,10 +205,13 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -163,10 +205,13 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
return
(
nodes
||
[]).
map
((
item
)
=>
{
return
(
nodes
||
[]).
map
((
item
)
=>
{
const
mapped
=
{
const
mapped
=
{
...
item
,
...
item
,
resultStatus
:
item
?.
inspectionResultVO
?.
resultStatus
==
3
?
true
:
false
,
resultStatus
:
item
?.
inspectionResultVO
?.
resultStatus
==
3
?
true
:
false
,
};
};
if
(
mapped
.
childrenNodes
?.
length
)
{
if
(
mapped
.
childrenNodes
?.
length
)
{
mapped
.
childrenNodes
=
this
.
mapNodeResultStatus
(
mapped
.
childrenNodes
);
mapped
.
childrenNodes
=
this
.
mapNodeResultStatus
(
mapped
.
childrenNodes
,
);
}
}
return
mapped
;
return
mapped
;
});
});
...
@@ -176,7 +221,7 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -176,7 +221,7 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
if
(
this
.
activeNodeId
!=
null
)
{
if
(
this
.
activeNodeId
!=
null
)
{
this
.
savedNodeIds
.
add
(
Number
(
this
.
activeNodeId
));
this
.
savedNodeIds
.
add
(
Number
(
this
.
activeNodeId
));
}
}
this
.
getTemplateData
(
'0'
);
this
.
getTemplateData
(
"0"
);
}
}
getActiveFormRef
():
any
{
getActiveFormRef
():
any
{
...
@@ -196,10 +241,8 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -196,10 +241,8 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
if
(
this
.
savedNodeIds
.
has
(
nodeId
))
{
if
(
this
.
savedNodeIds
.
has
(
nodeId
))
{
return
true
;
return
true
;
}
}
const
node
=
(
this
.
nodeList
||
[]).
find
(
const
node
=
(
this
.
nodeList
||
[]).
find
((
n
)
=>
Number
(
n
.
id
)
===
nodeId
);
(
n
)
=>
Number
(
n
.
id
)
===
nodeId
,
return
node
?.
completedFlag
==
"1"
;
);
return
node
?.
completedFlag
==
'1'
;
}
}
needsConfirmLeave
():
boolean
{
needsConfirmLeave
():
boolean
{
...
@@ -216,10 +259,11 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -216,10 +259,11 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
return
;
return
;
}
}
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'提示'
,
title
:
"提示"
,
content
:
'当前一级类目下,存在必填检测项未完成,强制离开将丢失数据,请完成检查后切换tab或离开标签页。'
,
content
:
okText
:
'强制离开'
,
"检测到当前页面有未保存的内容,强制离开将丢失数据。建议先点击保存,再切换 Tab 或离开页面"
,
cancelText
:
'继续填写'
,
okText
:
"强制离开"
,
cancelText
:
"继续填写"
,
onOk
:
()
=>
{
onOk
:
()
=>
{
this
.
switchNode
(
item
);
this
.
switchNode
(
item
);
},
},
...
@@ -237,7 +281,6 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -237,7 +281,6 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
this
.
$router
.
back
();
this
.
$router
.
back
();
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
...
...
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