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 1458d354
authored
Mar 19, 2026
by
yancanhua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 车辆检测开发
1 parent
d62e35a8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
507 additions
and
16 deletions
aus-front/admin/src/api/DetectionController.ts
aus-front/admin/src/router/DetectionRouter.ts
aus-front/admin/src/views/detection/inspector/DetectionInspectorView.vue
aus-front/admin/src/views/detection/inspector/components/EnableDialog.vue
aus-front/admin/src/views/detection/inspector/components/InspectorAddForm.vue
aus-front/admin/src/views/detection/inspector/components/OperationLog.vue
aus-front/admin/src/views/detection/inspector/components/ticketList.vue
aus-front/admin/src/api/DetectionController.ts
View file @
1458d35
...
@@ -11,14 +11,6 @@ export class DetectionController {
...
@@ -11,14 +11,6 @@ export class DetectionController {
static
PAGE_INSPECTOR
=
'inspect/page'
;
static
PAGE_INSPECTOR
=
'inspect/page'
;
static
getPreferenceDetail
(
axios
:
AxiosStatic
,
id
:
number
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
'account/preference/detail/'
+
id
,
{});
}
static
inspectSummary
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectSummary
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
'inspect/summary'
,
params
);
return
axios
.
get
(
'inspect/summary'
,
params
);
}
}
...
@@ -32,13 +24,18 @@ export class DetectionController {
...
@@ -32,13 +24,18 @@ export class DetectionController {
}
}
static
inspectStatus
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectStatus
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
'inspect/status
/'
+
params
.
id
,
params
);
return
axios
.
post
(
'inspect/status
'
,
params
);
}
}
static
inspectExport
(
axios
:
AxiosStatic
,
params
:
any
,
config
?:
any
):
Promise
<
AxiosResponse
<
void
>>
{
static
inspectExport
(
axios
:
AxiosStatic
,
params
:
any
,
config
?:
any
):
Promise
<
AxiosResponse
<
void
>>
{
return
axios
.
post
(
'inspect/export'
,
params
,
config
);
return
axios
.
post
(
'inspect/export'
,
params
,
config
);
}
}
static
inspectDetail
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
'/inspect/detail/'
+
params
.
id
,
params
);
}
static
inspectOrderPage
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectOrderPage
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
'inspect/wo/page'
,
params
);
return
axios
.
post
(
'inspect/wo/page'
,
params
);
...
...
aus-front/admin/src/router/DetectionRouter.ts
View file @
1458d35
...
@@ -40,7 +40,7 @@ export const DetectionRouter: Array<RouteRecordRaw> = [
...
@@ -40,7 +40,7 @@ export const DetectionRouter: Array<RouteRecordRaw> = [
path
:
'/detection/inspector/view'
,
path
:
'/detection/inspector/view'
,
component
:
()
=>
import
(
'@/views/detection/inspector/DetectionInspectorView.vue'
),
component
:
()
=>
import
(
'@/views/detection/inspector/DetectionInspectorView.vue'
),
meta
:
{
meta
:
{
breadcrumbs
:
[{
name
:
'检测管理'
},
{
name
:
'检测师管理'
,
path
:
'/detection/
detectionI
nspector'
},
{
name
:
'检测师详情'
}]
breadcrumbs
:
[{
name
:
'检测管理'
},
{
name
:
'检测师管理'
,
path
:
'/detection/
i
nspector'
},
{
name
:
'检测师详情'
}]
}
}
},
},
];
];
aus-front/admin/src/views/detection/inspector/DetectionInspectorView.vue
View file @
1458d35
<
template
>
<div>
<div
class=
"titleBox"
>
检测师详情
<a-button
style=
"float: right;"
@
click=
"handleBack()"
>
返回列表
</a-button>
</div>
<div
class=
"inspectorDetail"
>
<a-descriptions
:column=
"5"
size=
"small"
layout=
"vertical"
>
<template
#
title
>
基本信息
<a-button
@
click=
"handleEdit()"
type=
"primary"
style=
"float: right;"
>
编辑
</a-button>
</
template
>
<a-descriptions-item
label=
"姓名"
>
{{ pageData?.account?.name || '-' }}
</a-descriptions-item>
<a-descriptions-item
label=
"手机号"
>
{{ pageData?.account?.phone || '-' }}
</a-descriptions-item>
<a-descriptions-item
label=
"所在城市"
>
{{ pageData?.account?.regionName || '-' }}
</a-descriptions-item>
<a-descriptions-item
label=
"账号状态"
>
<a-tag
v-if=
"pageData?.account?.status == 1"
color=
"#E8F8F2"
:style=
"{ color: '#00AD74' }"
:bordered=
"false"
>
启用
</a-tag>
<a-tag
v-if=
"pageData?.account?.status == 0"
color=
"#F0F2F5"
:style=
"{ color: '#777C85' }"
:bordered=
"false"
>
禁用
</a-tag>
</a-descriptions-item>
<a-descriptions-item
label=
"账号创建时间"
>
{{ pageData?.account?.createTime || '-' }}
</a-descriptions-item>
</a-descriptions>
</div>
<div
style=
"width: 100%;float: left;margin-top: 16px;"
>
<a-row
:gutter=
"24"
class=
"mb-12"
>
<a-col
:span=
"8"
>
<a-card
class=
"stat-card"
>
<img
src=
"@/assets/detection/inspectorCount.png"
class=
"stat-img"
>
<a-statistic
class=
"stat-data"
title=
"累计已检"
:value=
"pageData?.inspectorSimpleSummary?.inspectCount || 0"
></a-statistic>
</a-card>
</a-col>
<a-col
:span=
"8"
>
<a-card
class=
"stat-card"
>
<img
src=
"@/assets/detection/countInspect.png"
class=
"stat-img"
>
<a-statistic
class=
"stat-data"
title=
"平均检测耗时"
:value=
"pageData?.inspectorSimpleSummary?.avgInspectCost || 0"
>
</a-statistic>
</a-card>
</a-col>
</a-row>
</div>
<!-- 关联工单列表 -->
<div
style=
"width: 100%;float: left;"
>
<a-descriptions
:column=
"1"
size=
"small"
layout=
"vertical"
>
<
template
#
title
>
<title-tip-icon></title-tip-icon>
关联工单列表
<div
class=
"title-line"
></div>
</
template
>
</a-descriptions>
<div
style=
"width: 100%;float: left;"
>
<TicketList
ref=
"ticketListRef"
:ticketListData=
"pageData"
/>
</div>
</div>
<!-- 操作日志 -->
<div
style=
"width: 100%;float: left;"
>
<a-descriptions
:column=
"1"
size=
"small"
layout=
"vertical"
>
<
template
#
title
>
<title-tip-icon></title-tip-icon>
操作日志
<div
class=
"title-line"
></div>
</
template
>
<a-descriptions-item
label=
""
>
<OperationLog
ref=
"operationLogRef"
:operationLogData=
"pageData"
/>
</a-descriptions-item>
</a-descriptions>
</div>
<!--编辑检测师弹窗-->
<InspectorAddForm
ref=
"inspectorAddFormRef"
@
emitOk=
"getDetailData"
/>
</div>
</template>
<
script
lang=
"ts"
>
import
{
Component
}
from
'vue-facing-decorator'
;
import
{
PaginationComponent
}
from
"@/components/PaginationComponent"
;
import
{
Vehicle
}
from
"lib/src/entity/vehicle/entity/Vehicle"
;
import
{
DetectionController
}
from
"@/api/DetectionController"
;
import
TitleDivider
from
"@/components/TitleDivider.vue"
;
import
TitleTipIcon
from
"@/components/icons/TitleTipIcon.vue"
;
import
InspectorAddForm
from
"@/views/detection/inspector/components/InspectorAddForm.vue"
;
import
OperationLog
from
"@/views/detection/inspector/components/OperationLog.vue"
;
import
TicketList
from
"@/views/detection/inspector/components/ticketList.vue"
;
@
Component
({
components
:
{
TitleDivider
,
TitleTipIcon
,
InspectorAddForm
,
OperationLog
,
TicketList
}
})
export
default
class
DetectionInspectorView
extends
PaginationComponent
<
Vehicle
>
{
routeData
:
any
=
{
id
:
''
,
action
:
''
};
pageData
:
any
=
{};
created
():
void
{
this
.
routeData
=
this
.
$route
.
query
;
this
.
getDetailData
();
}
getDetailData
()
{
DetectionController
.
inspectDetail
(
this
.
axios
,
{
id
:
this
.
routeData
.
id
}).
then
(
response
=>
{
this
.
pageData
=
response
.
data
.
data
||
{};
});
}
handleEdit
()
{
this
.
$refs
.
inspectorAddFormRef
.
init
(
this
.
pageData
.
account
||
{});
}
handleBack
()
{
this
.
$router
.
back
();
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.titleBox
{
width
:
-webkit-calc
(
100%
-
24px
);
width
:
-moz-calc
(
100%
-
24px
);
width
:
calc
(
100%
-
24px
);
height
:
32px
;
line-height
:
32px
;
margin-left
:
12px
;
font-size
:
16px
;
font-weight
:
700
;
margin-bottom
:
4px
;
}
.inspectorDetail
{
padding
:
16px
;
width
:
100%
;
border-radius
:
8px
;
float
:
left
;
margin-top
:
12px
;
background
:
linear-gradient
(
56.9deg
,
#e6f6ff
0%
,
#f0f6ff
28.999999999999996%
,
#f0f6ff
60%
,
#e3f1ff
100%
);
}
.ant-card
.ant-card-body
{
padding
:
0
!important
;
}
.ant-card-bordered
{
border
:
none
;
}
.stat-card
::v-deep
(
.ant-card-body
)
{
display
:
flex
;
padding
:
0
16px
;
height
:
100px
;
border-radius
:
8px
;
background
:
linear-gradient
(
180deg
,
#e3f0ff
0%
,
#f9fbfe
100%
);
}
.stat-img
{
width
:
36px
;
height
:
36px
;
margin-right
:
16px
;
margin-top
:
32px
;
}
.stat-data
{
margin-top
:
24px
;
}
.title-line
{
width
:
100%
;
height
:
1px
;
background-color
:
#F2F4F7
;
margin-top
:
10px
;
}
</
style
>
aus-front/admin/src/views/detection/inspector/components/EnableDialog.vue
View file @
1458d35
...
@@ -11,9 +11,9 @@
...
@@ -11,9 +11,9 @@
</div>
</div>
<div
class=
"disabledTxt"
>
禁用后,该检测师将无法登录APP且无法被指派新任务,已在进行中的任务不受影响。是否确认禁用?
</div>
<div
class=
"disabledTxt"
>
禁用后,该检测师将无法登录APP且无法被指派新任务,已在进行中的任务不受影响。是否确认禁用?
</div>
</div>
</div>
<a-form-item
v-if=
"pageStatus"
name=
"
textarea
"
label=
"禁用原因"
<a-form-item
v-if=
"pageStatus"
name=
"
remark
"
label=
"禁用原因"
:rules=
"[
{ required: true, message: '请输入禁用原因' }]">
:rules=
"[
{ required: true, message: '请输入禁用原因' }]">
<a-textarea
v-model:value=
"postData.
textarea
"
show-count
:maxlength=
"200"
<a-textarea
v-model:value=
"postData.
remark
"
show-count
:maxlength=
"200"
style=
"width: 456px;"
/>
style=
"width: 456px;"
/>
</a-form-item>
</a-form-item>
</a-form>
</a-form>
...
@@ -41,13 +41,13 @@ export default class EnableDialog extends EnhanceFormComponent<User> {
...
@@ -41,13 +41,13 @@ export default class EnableDialog extends EnhanceFormComponent<User> {
titleVisible
=
"启用提示"
;
titleVisible
=
"启用提示"
;
pageStatus
=
1
;
pageStatus
=
1
;
postData
=
{
id
:
''
,
status
:
1
,
textarea
:
''
}
postData
=
{
id
:
''
,
status
:
1
,
remark
:
''
}
init
(
data
):
void
{
init
(
data
):
void
{
this
.
pageStatus
=
data
.
status
;
this
.
pageStatus
=
data
.
status
;
this
.
postData
.
id
=
data
.
id
;
this
.
postData
.
id
=
data
.
id
;
this
.
postData
.
status
=
data
.
status
;
this
.
postData
.
status
=
data
.
status
;
this
.
postData
.
textarea
=
''
;
this
.
postData
.
remark
=
''
;
this
.
titleVisible
=
!
data
.
status
?
"启用提示"
:
"账号禁用"
;
this
.
titleVisible
=
!
data
.
status
?
"启用提示"
:
"账号禁用"
;
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
;
}
}
...
@@ -64,7 +64,7 @@ export default class EnableDialog extends EnhanceFormComponent<User> {
...
@@ -64,7 +64,7 @@ export default class EnableDialog extends EnhanceFormComponent<User> {
const
formData
=
{
const
formData
=
{
id
:
this
.
postData
.
id
,
id
:
this
.
postData
.
id
,
status
:
this
.
postData
.
status
==
1
?
0
:
1
,
status
:
this
.
postData
.
status
==
1
?
0
:
1
,
textarea
:
this
.
postData
.
textarea
,
remark
:
this
.
postData
.
remark
,
}
}
DetectionController
.
inspectStatus
(
this
.
axios
,
formData
).
then
(
response
=>
{
DetectionController
.
inspectStatus
(
this
.
axios
,
formData
).
then
(
response
=>
{
this
.
submitted
=
false
;
this
.
submitted
=
false
;
...
...
aus-front/admin/src/views/detection/inspector/components/InspectorAddForm.vue
View file @
1458d35
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<a-cascader
v-model:value=
"postData.registrationCity"
:options=
"areaData"
<a-cascader
v-model:value=
"postData.registrationCity"
:options=
"areaData"
@
change=
"handleCitiesChange"
placeholder=
"请选择所在城市"
style=
"width: 376px;"
/>
@
change=
"handleCitiesChange"
placeholder=
"请选择所在城市"
style=
"width: 376px;"
/>
</a-form-item>
</a-form-item>
<a-form-item
name=
"status"
label=
"账号状态"
>
<a-form-item
v-if=
"!postData.id"
name=
"status"
label=
"账号状态"
>
<a-switch
v-model:checked=
"postData.status"
/>
<a-switch
v-model:checked=
"postData.status"
/>
<span
style=
"padding-left: 8px;"
>
{{
postData
.
status
?
'启用'
:
'禁用'
}}
</span>
<span
style=
"padding-left: 8px;"
>
{{
postData
.
status
?
'启用'
:
'禁用'
}}
</span>
</a-form-item>
</a-form-item>
...
...
aus-front/admin/src/views/detection/inspector/components/OperationLog.vue
0 → 100644
View file @
1458d35
<
template
>
<div
class=
"logBox"
>
<div
v-for=
"(item, index) in logList"
:key=
"index"
class=
"log-list"
>
<div
class=
"progressBox"
>
<div
class=
"progressBox-point"
:class=
"
{ 'bg-1956fe': index > 0 }">
</div>
<div
v-if=
"alllist.length !== index + 1"
class=
"progressBox-line"
></div>
</div>
<div
class=
"log-title"
>
<div
v-if=
"item.description"
class=
"logBox-content"
>
{{
item
.
description
||
'-'
}}
</div>
<div
class=
"logBox-time"
>
<div
v-if=
"item.updateNameCnFirst"
class=
"logBox-point"
>
{{
item
.
updateNameCnFirst
}}
</div>
<span
class=
"p-l-4"
>
{{
item
.
createBy
}}
</span>
<span
class=
"p-l-8"
>
{{
item
.
createTime
}}
</span>
</div>
</div>
</div>
<div
v-if=
"!isAllData"
@
click=
"handleMore()"
class=
"moreBox"
>
查看更多
<DoubleLeftOutlined
color=
"#666666"
font-size=
"16px;"
style=
"transform: rotate(270deg);"
/>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
,
Watch
}
from
"vue-facing-decorator"
;
import
{
DoubleLeftOutlined
}
from
'@ant-design/icons-vue'
;
@
Component
({
components
:
{
DoubleLeftOutlined
}
})
export
default
class
OperationLog
extends
Vue
{
@
Prop
({
type
:
Object
,
required
:
true
})
operationLogData
:
any
;
logList
=
[];
isAllData
=
false
;
alllist
=
[];
@
Watch
(
'operationLogData'
,
{
deep
:
true
,
immediate
:
true
})
watchOperationLogData
(
newValue
:
any
,
oldValue
:
any
):
void
{
const
list
=
(
newValue
.
opLogs
||
[]);
if
(
list
.
length
>
5
)
{
this
.
isAllData
=
false
;
this
.
alllist
=
list
;
this
.
logList
=
list
.
slice
(
0
,
5
);
}
else
{
this
.
isAllData
=
true
;
this
.
logList
=
list
;
}
}
handleMore
()
{
this
.
isAllData
=
true
;
this
.
logList
=
this
.
alllist
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.logBox
{
width
:
100%
;
height
:
auto
;
float
:
left
;
}
.log-list
{
width
:
-webkit-calc
(
100%
-
32px
);
width
:
-moz-calc
(
100%
-
32px
);
width
:
calc
(
100%
-
32px
);
float
:
left
;
margin-bottom
:
16px
;
margin-left
:
32px
;
}
.progressBox
{
width
:
24px
;
float
:
left
;
}
.progressBox-point
{
width
:
8px
;
height
:
8px
;
border
:
2px
solid
#1956fe
;
border-radius
:
8px
;
}
.bg-1956fe
{
background
:
#1956fe
;
}
.progressBox-line
{
width
:
2px
;
height
:
40px
;
background
:
#1956fe
;
margin-top
:
3px
;
margin-left
:
2.5px
;
}
.log-title
{
width
:
-webkit-calc
(
100%
-
24px
);
width
:
-moz-calc
(
100%
-
24px
);
width
:
calc
(
100%
-
24px
);
float
:
left
;
}
.logBox-content
{
width
:
100%
;
height
:
20px
;
line-height
:
20px
;
float
:
left
;
color
:
#777c85
;
font-size
:
14px
;
font-weight
:
400
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.logBox-content
span
{
color
:
#2f3133
;
}
.logBox-time
{
width
:
100%
;
height
:
20px
;
line-height
:
20px
;
float
:
left
;
color
:
#777c85
;
font-size
:
12px
;
font-weight
:
400
;
margin-top
:
6px
;
}
.logBox-point
{
width
:
14px
;
height
:
14px
;
line-height
:
14px
;
background
:
#e6efff
;
text-align
:
center
;
float
:
left
;
margin
:
3px
0
;
color
:
#1956fe
;
font-size
:
8px
;
font-weight
:
700
;
border-radius
:
8px
;
}
.moreBox
{
width
:
-webkit-calc
(
100%
-
32px
);
width
:
-moz-calc
(
100%
-
32px
);
width
:
calc
(
100%
-
32px
);
height
:
20px
;
float
:
left
;
color
:
#666666
;
font-size
:
14px
;
font-weight
:
400
;
line-height
:
20px
;
margin-top
:
8px
;
margin-bottom
:
22px
;
margin-left
:
32px
;
cursor
:
pointer
;
}
.p-l-4
{
padding-left
:
4px
;
}
.p-l-8
{
padding-left
:
8px
;
}
</
style
>
aus-front/admin/src/views/detection/inspector/components/ticketList.vue
0 → 100644
View file @
1458d35
<
template
>
<a-card
class=
"tabs-card"
:bordered=
"false"
:tab-list=
"tabs"
:active-tab-key=
"tabKey"
@
tabChange=
"key => changeTab(key)"
>
<a-table
:columns=
"columns"
:data-source=
"pagination.content"
:loading=
"loading"
:bordered=
"false"
@
change=
"pageRefresh"
@
resizeColumn=
"this.$filters.tableResizeColumn"
size=
"small"
:pagination=
"pageState"
:row-key=
"record => record.id"
:scroll=
"
{ y: 'calc(100vh - 288px)' }">
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'vehicleState'"
>
<vehicle-state-tag
:vehicle-state=
"record.vehicle.vehicleState"
></vehicle-state-tag>
</
template
>
<
template
v-if=
"column.key === 'status'"
>
<a-tag
v-if=
"record.status == 1"
color=
"#FFF3E5"
:style=
"
{ color: '#F0A700' }"
:bordered="false">待检测
</a-tag>
<a-tag
v-else-if=
"record.status == 2"
color=
"#E7F2FE"
:style=
"
{ color: '#288BFA' }"
:bordered="false">检测中
</a-tag>
<a-tag
v-else-if=
"record.status == 3"
color=
"#E8F8F2"
:style=
"
{ color: '#00AD74' }"
:bordered="false">已完成
</a-tag>
<a-tag
v-else-if=
"record.status == 4"
color=
"#F0F2F5"
:style=
"
{ color: '#777C85' }"
:bordered="false">已取消
</a-tag>
</
template
>
<
template
v-if=
"column.key === 'action'"
>
<router-link
:to=
"
{ path: '/detection/order/view', query: { id: record.id, action: 'VIEW' } }">
<a-button
type=
"link"
size=
"small"
>
详情
</a-button>
</router-link>
</
template
>
</template>
</a-table>
</a-card>
</template>
<
script
lang=
"ts"
>
import
{
Component
}
from
'vue-facing-decorator'
;
import
{
message
,
TableColumnsType
}
from
"ant-design-vue"
;
import
{
Operator
,
Order
}
from
"lib/src/core/page/Pagination"
;
import
VehicleStateTag
from
"@/views/vehicle/inventory/VehicleStateTag.vue"
;
import
{
PaginationComponent
}
from
"@/components/PaginationComponent"
;
import
{
Vehicle
}
from
"lib/src/entity/vehicle/entity/Vehicle"
;
import
{
Security
}
from
"@/store"
;
import
{
ExportUtil
}
from
"@/common/ExportUtil"
;
import
{
DetectionController
}
from
"@/api/DetectionController"
;
import
OrderAddForm
from
"@/views/detection/order/components/OrderAddForm.vue"
;
import
cancelDialog
from
"@/views/detection/order/components/cancelDialog.vue"
;
@
Component
({
components
:
{
VehicleStateTag
,
OrderAddForm
,
cancelDialog
}
})
export
default
class
DetectionOrderPage
extends
PaginationComponent
<
Vehicle
>
{
ccountByStatusData
=
{
dispatchedCount
:
0
,
inProgressCount
:
0
,
completedCount
:
0
,
canceledCount
:
0
,
};
tabKey
=
""
;
/**
* 表格列配置
*/
columns
:
TableColumnsType
=
[
{
title
:
'序号'
,
key
:
'index'
,
width
:
70
,
align
:
'center'
,
sorter
:
false
,
customRender
:
({
index
})
=>
{
return
(
this
.
getPagination
().
pageIndex
-
1
)
*
this
.
getPagination
().
pageSize
+
index
+
1
;
},
},
{
title
:
'工单'
,
dataIndex
:
'woId'
,
key
:
'woId'
,
align
:
'center'
,
width
:
170
,
resizable
:
true
,
ellipsis
:
true
},
{
title
:
'车辆名称'
,
dataIndex
:
[
'vehicle'
,
'baseInfo'
,
"carTypeName"
],
key
:
'carTypeName'
,
align
:
'center'
,
width
:
240
,
resizable
:
true
,
ellipsis
:
true
},
{
title
:
'车源号'
,
dataIndex
:
[
'vehicle'
,
'baseInfo'
,
"sourceNo"
],
key
:
'sourceNo'
,
align
:
'center'
,
width
:
170
,
resizable
:
true
,
ellipsis
:
true
},
{
title
:
'派单时间'
,
dataIndex
:
'woTime'
,
key
:
'woTime'
,
align
:
'center'
,
width
:
170
,
resizable
:
true
,
ellipsis
:
true
},
{
title
:
'检测单状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
align
:
'center'
,
width
:
170
,
resizable
:
true
,
ellipsis
:
true
},
{
title
:
'操作'
,
key
:
'action'
,
width
:
190
,
align
:
'center'
,
fixed
:
'right'
},
];
getPagination
()
{
return
this
.
pagination
;
}
/**
* 初始化配置
*/
created
():
void
{
this
.
getinspectOrderCountByStatus
();
this
.
init
(
this
.
axios
,
DetectionController
.
PAGE_INSPECTOR_ORDER
);
this
.
buildQueryForm
({});
this
.
pagination
.
setDefaultSort
(
'createTime'
,
Order
.
desc
);
this
.
changeTab
(
this
.
tabKey
);
}
getinspectOrderCountByStatus
()
{
DetectionController
.
inspectOrderCountByStatus
(
this
.
axios
,
{}).
then
(
res
=>
{
this
.
ccountByStatusData
=
res
.
data
.
data
||
{};
});
}
get
tabs
()
{
const
totalCount
=
(
this
.
ccountByStatusData
.
dispatchedCount
||
0
)
+
(
this
.
ccountByStatusData
.
inProgressCount
||
0
)
+
(
this
.
ccountByStatusData
.
completedCount
||
0
)
+
(
this
.
ccountByStatusData
.
canceledCount
||
0
);
let
tabs
=
[
{
key
:
""
,
tab
:
`全部 (
${
totalCount
||
0
}
)`
},
{
key
:
"DISPATCHED"
,
tab
:
`待检测 (
${
this
.
ccountByStatusData
.
dispatchedCount
||
0
}
)`
},
{
key
:
"IN_PROGRESS"
,
tab
:
`检测中 (
${
this
.
ccountByStatusData
.
inProgressCount
||
0
}
)`
},
{
key
:
"COMPLETED"
,
tab
:
`已完成 (
${
this
.
ccountByStatusData
.
completedCount
||
0
}
)`
},
{
key
:
"CANCELED"
,
tab
:
`已取消 (
${
this
.
ccountByStatusData
.
canceledCount
||
0
}
)`
}
];
return
tabs
;
}
changeTab
(
status
:
string
):
void
{
this
.
tabKey
=
status
;
switch
(
this
.
tabKey
)
{
case
""
:
this
.
pagination
.
removeDefaultFilter
(
'status'
);
break
;
case
"DISPATCHED"
:
this
.
pagination
.
addDefaultFilter
(
'status'
,
1
,
Operator
.
eq
);
break
;
case
"IN_PROGRESS"
:
this
.
pagination
.
addDefaultFilter
(
'status'
,
2
,
Operator
.
eq
);
break
;
case
"COMPLETED"
:
this
.
pagination
.
addDefaultFilter
(
'status'
,
3
,
Operator
.
eq
);
break
;
case
"CANCELED"
:
this
.
pagination
.
addDefaultFilter
(
'status'
,
4
,
Operator
.
eq
);
break
;
}
this
.
loading
=
true
;
this
.
pagination
.
reload
().
then
(
res
=>
{
}).
finally
(()
=>
this
.
loading
=
false
);
}
}
</
script
>
<
style
scoped
lang=
"less"
></
style
>
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