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 912f206a
authored
May 14, 2026
by
chenwq1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: gengxin
1 parent
65f72a25
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
9 deletions
aus-front/admin/src/views/detection/order/DetectionOrderEdit.vue
aus-front/admin/src/views/detection/order/DetectionOrderEdit.vue
View file @
912f206
...
@@ -56,8 +56,9 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -56,8 +56,9 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
reportId
:
q
.
id
,
reportId
:
q
.
id
,
});
});
this
.
getDetailData
();
this
.
getDetailData
();
this
.
getDefaultTemplate
().
finally
(()
=>
{
this
.
getTemplateData
(
'1'
);
this
.
getTemplateData
(
'1'
);
this
.
getDefaultTemplate
(
);
}
);
}
}
unmounted
():
void
{
unmounted
():
void
{
...
@@ -95,14 +96,18 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -95,14 +96,18 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
getDefaultTemplate
()
{
getDefaultTemplate
()
{
const
routeData
=
this
.
$route
.
query
||
{};
const
routeData
=
this
.
$route
.
query
||
{};
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
||
{};
this
.
getCarTypeList
(
this
.
defaultData
.
carSeriesId
);
return
this
.
getCarTypeList
(
this
.
defaultData
.
carSeriesId
);
});
});
}
}
getCarTypeList
(
id
)
{
getCarTypeList
(
id
)
{
DetectionController
.
getCarTypeList
(
this
.
axios
,
{
csId
:
id
}).
then
(
response
=>
{
if
(
!
id
)
{
this
.
carTypeList
=
[];
return
Promise
.
resolve
();
}
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
)
||
""
}));
});
});
...
@@ -145,6 +150,26 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -145,6 +150,26 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
dropdown
:
'valueKey'
,
dropdown
:
'valueKey'
,
radio_button_select
:
'valueKey'
radio_button_select
:
'valueKey'
};
};
// 节点名称 -> /inspectionTemplate/default 字段,按包含关系匹配
const
matchers
:
{
match
:
(
n
:
string
)
=>
boolean
;
key
:
string
}[]
=
[
{
match
:
n
=>
n
===
'品牌'
,
key
:
'carBrand'
},
{
match
:
n
=>
n
===
'车系'
,
key
:
'carSeriesName'
},
{
match
:
n
=>
n
===
'车型'
,
key
:
'carTypeId'
},
{
match
:
n
=>
/车源/
.
test
(
n
),
key
:
'sourceNo'
},
{
match
:
n
=>
/VIN|车架号/i
.
test
(
n
),
key
:
'vin'
},
{
match
:
n
=>
/车牌/
.
test
(
n
),
key
:
'licensePlate'
},
{
match
:
n
=>
/注册|登记/
.
test
(
n
),
key
:
'registrationDate'
},
{
match
:
n
=>
/出厂|生产/
.
test
(
n
),
key
:
'productionDate'
},
{
match
:
n
=>
/年检/
.
test
(
n
),
key
:
'annualInspectionExpiry'
},
{
match
:
n
=>
/交强险/
.
test
(
n
),
key
:
'compulsoryInsuranceExpiry'
},
{
match
:
n
=>
/排量/
.
test
(
n
),
key
:
'displacement'
},
{
match
:
n
=>
/排放/
.
test
(
n
),
key
:
'emissionStandard'
},
{
match
:
n
=>
/发动机/
.
test
(
n
),
key
:
'engineNumber'
},
{
match
:
n
=>
/颜色/
.
test
(
n
),
key
:
'exteriorColor'
},
{
match
:
n
=>
/钥匙/
.
test
(
n
),
key
:
'keyCount'
},
{
match
:
n
=>
/里程/
.
test
(
n
),
key
:
'mileage'
},
{
match
:
n
=>
/使用性质|营运/
.
test
(
n
),
key
:
'usageType'
},
];
const
defaultList
=
list
.
map
(
item
=>
{
const
defaultList
=
list
.
map
(
item
=>
{
const
inspectionValueList
=
item
?.
inspectionResultVO
?.
inspectionValueList
||
[];
const
inspectionValueList
=
item
?.
inspectionResultVO
?.
inspectionValueList
||
[];
let
value
=
null
;
let
value
=
null
;
...
@@ -153,12 +178,26 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -153,12 +178,26 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
if
(
key
)
value
=
inspectionValueList
[
0
][
key
]
||
''
;
if
(
key
)
value
=
inspectionValueList
[
0
][
key
]
||
''
;
}
}
if
(
item
.
nodeName
==
'品牌'
)
{
if
(
value
==
null
||
value
===
''
)
{
value
=
this
.
defaultData
.
carBrand
||
''
;
const
hit
=
matchers
.
find
(
m
=>
m
.
match
(
String
(
item
.
nodeName
||
''
)));
if
(
hit
)
{
const
dv
=
this
.
defaultData
?.[
hit
.
key
];
if
(
dv
!=
null
&&
dv
!==
''
)
{
value
=
String
(
dv
);
// 下拉/单选:default 返回的是名称,需要换成 options 里的 id
if
(
item
.
interactionType
===
'dropdown'
||
item
.
interactionType
===
'radio_button_select'
)
{
const
optionsList
=
item
.
nodeName
===
'车型'
?
this
.
carTypeList
:
JSON
.
parse
(
item
.
options
||
'[]'
).
map
((
s
:
string
)
=>
{
const
parts
=
(
s
||
''
).
split
(
'-'
);
return
{
text
:
parts
[
1
]
||
''
,
value
:
parts
[
0
]
||
''
};
});
const
opt
=
optionsList
.
find
((
o
:
any
)
=>
String
(
o
.
value
)
===
value
)
||
optionsList
.
find
((
o
:
any
)
=>
String
(
o
.
text
)
===
value
);
value
=
opt
?
String
(
opt
.
value
)
:
''
;
}
}
}
}
if
(
item
.
nodeName
==
'车系'
)
{
value
=
this
.
defaultData
.
carSeriesName
||
''
;
}
}
return
{
...
item
,
resultStatus
:
item
?.
inspectionResultVO
?.
resultStatus
==
3
?
true
:
false
,
value
};
return
{
...
item
,
resultStatus
:
item
?.
inspectionResultVO
?.
resultStatus
==
3
?
true
:
false
,
value
};
});
});
...
...
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