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 856c63ae
authored
Mar 17, 2026
by
yancanhua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:检测功能开发
1 parent
d522c4e1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
208 additions
and
39 deletions
aus-front/admin/src/api/DetectionController.ts
aus-front/admin/src/assets/detection/avgInspectSec.png
aus-front/admin/src/assets/detection/countInspect.png
aus-front/admin/src/assets/detection/inspectorCount.png
aus-front/admin/src/views/detection/inspector/DetectionInspectorPage.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/api/DetectionController.ts
View file @
856c63a
...
...
@@ -17,12 +17,21 @@ export class DetectionController {
return
axios
.
get
(
'account/preference/detail/'
+
id
,
{});
}
static
inspectSummary
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
'inspect/summary'
,
params
);
}
static
inspectAdd
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
'inspect/add'
,
params
);
}
static
inspectUpdate
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
'inspect/update'
,
params
);
}
static
inspectStatus
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
'inspect/status'
,
params
);
}
static
exportPreference
(
axios
:
AxiosStatic
,
params
:
any
,
config
?:
any
):
Promise
<
AxiosResponse
<
void
>>
{
return
axios
.
post
(
'account/preference/export'
,
params
,
config
);
...
...
aus-front/admin/src/assets/detection/avgInspectSec.png
0 → 100644
View file @
856c63a
3.41 KB
aus-front/admin/src/assets/detection/countInspect.png
0 → 100644
View file @
856c63a
2.35 KB
aus-front/admin/src/assets/detection/inspectorCount.png
0 → 100644
View file @
856c63a
3.44 KB
aus-front/admin/src/views/detection/inspector/DetectionInspectorPage.vue
View file @
856c63a
<
template
>
<a-card
class=
"tabs-card"
:bordered=
"false"
>
<!--查询栏-->
<m-pagination-query-render
:fields=
"pagination.filterFields"
:form=
"pagination.queryForm"
@
onSearch=
"pageReload"
@
onReset=
"handleReset()"
:simpleFieldNum=
"4"
>
<template
#
cityCodeName=
"
{ record }">
<a-cascader
v-model:value=
"carProvinceCity"
:options=
"areaData"
@
change=
"handleChangeCity"
placeholder=
"请选择省/市"
/>
</
template
>
</m-pagination-query-render>
<!--查询栏end-->
<!--库存车辆列表start-->
<div
class=
"table-operations"
style=
"margin-bottom: 16px;width: 100%;float: left;"
>
<div
class=
"flex justify-end"
style=
"float: left;"
>
检测师列表
</div>
<div
class=
"flex justify-end"
style=
"float: right;"
>
<a-button
type=
"primary"
@
click=
"handleAdd()"
>
新增检测师
</a-button>
<a-button
@
click=
"downloadExcel"
:disabled=
"exporting"
>
导出
</a-button>
<div>
<a-card
:bordered=
"false"
>
<a-row
v-sec=
"'account_1'"
:gutter=
"16"
class=
"mb-12"
>
<a-col
:span=
"6"
>
<a-card
class=
"stat-card"
>
<img
src=
"@/assets/detection/inspectorCount.png"
class=
"stat-img"
>
<a-statistic
class=
"stat-data"
title=
"检测师总计"
:value=
"statisticsData.inspectorCount"
></a-statistic>
</a-card>
</a-col>
<a-col
:span=
"6"
>
<a-card
class=
"stat-card"
>
<img
src=
"@/assets/detection/countInspect.png"
class=
"stat-img"
>
<a-statistic
class=
"stat-data"
title=
"累计已检"
:value=
"statisticsData.countInspect"
>
</a-statistic>
</a-card>
</a-col>
<a-col
:span=
"6"
>
<a-card
class=
"stat-card"
>
<img
src=
"@/assets/detection/avgInspectSec.png"
class=
"stat-img"
>
<a-statistic
class=
"stat-data"
title=
"平均检测耗时"
:value=
"statisticsData.avgInspectSec"
>
</a-statistic>
</a-card>
</a-col>
<a-col
:span=
"6"
>
<a-card
class=
"stat-card"
>
<img
src=
"@/assets/detection/inspectorCount.png"
class=
"stat-img"
>
<a-statistic
class=
"stat-data"
title=
"已启用账号数"
:value=
"statisticsData.enableInspectorCount"
>
</a-statistic>
</a-card>
</a-col>
</a-row>
</a-card>
<a-card
class=
"tabs-card"
:bordered=
"false"
>
<!--查询栏-->
<m-pagination-query-render
:fields=
"pagination.filterFields"
:form=
"pagination.queryForm"
@
onSearch=
"pageReload"
@
onReset=
"handleReset()"
:simpleFieldNum=
"4"
>
<template
#
cityCodeName=
"
{ record }">
<a-cascader
v-model:value=
"carProvinceCity"
:options=
"areaData"
@
change=
"handleChangeCity"
placeholder=
"请选择省/市"
/>
</
template
>
</m-pagination-query-render>
<!--查询栏end-->
<!--库存车辆列表start-->
<div
class=
"table-operations"
style=
"margin-bottom: 16px;width: 100%;float: left;"
>
<div
class=
"flex justify-end"
style=
"float: left;"
>
检测师列表
</div>
<div
class=
"flex justify-end"
style=
"float: right;"
>
<a-button
type=
"primary"
@
click=
"handleAdd()"
>
新增检测师
</a-button>
<a-button
@
click=
"downloadExcel"
:disabled=
"exporting"
>
导出
</a-button>
</div>
</div>
</div>
<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)' }"
>
<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'"
>
111
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'vehicleState'"
>
111
</
template
>
</template>
</template>
</a-table>
</a-table>
<!--新增/编辑检测师弹窗-->
<InspectorAddForm
ref=
"inspectorAddFormRef"
/>
<!--新增/编辑检测师弹窗-->
<InspectorAddForm
ref=
"inspectorAddFormRef"
/>
</a-card>
</a-card>
</div>
</template>
<
script
lang=
"ts"
>
import
{
Component
}
from
'vue-facing-decorator'
;
...
...
@@ -60,6 +95,13 @@ import { DefaultOptionType } from "ant-design-vue/es/vc-cascader/Cascader";
export
default
class
DetectionInspectorPage
extends
PaginationComponent
<
Vehicle
>
{
statisticsData
=
{
inspectorCount
:
0
,
enableInspectorCount
:
0
,
countInspect
:
0
,
avgInspectSec
:
0
,
}
areaData
:
DefaultOptionType
[]
=
[];
carProvinceCity
=
[];
...
...
@@ -111,6 +153,20 @@ export default class DetectionInspectorPage extends PaginationComponent<Vehicle>
});
this
.
pageLoad
();
this
.
areaData
=
convertToTree
(
false
);
this
.
getInspectSummary
();
}
//获取统计数据
getInspectSummary
()
{
DetectionController
.
inspectSummary
(
this
.
axios
,
{}).
then
(
response
=>
{
const
data
=
response
.
data
.
data
||
{};
this
.
statisticsData
=
{
inspectorCount
:
data
.
inspectorCount
||
0
,
enableInspectorCount
:
data
.
enableInspectorCount
||
0
,
countInspect
:
data
.
countInspect
||
0
,
avgInspectSec
:
data
.
avgInspectSec
||
0
,
}
})
}
//区域数据发生变化
...
...
@@ -147,5 +203,31 @@ export default class DetectionInspectorPage extends PaginationComponent<Vehicle>
}
</
script
>
<
style
scoped
lang=
"less"
>
.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%
);
}
<
style
scoped
lang=
"less"
></
style
>
.stat-img
{
width
:
36px
;
height
:
36px
;
margin-right
:
16px
;
margin-top
:
32px
;
}
.stat-data
{
margin-top
:
24px
;
}
</
style
>
aus-front/admin/src/views/detection/inspector/components/EnableDialog.vue
0 → 100644
View file @
856c63a
<
template
>
<div>
<a-modal
v-model:open=
"dialogVisible"
:title=
"titleVisible"
@
ok=
"handleOk"
>
<a-spin
:spinning=
"submitted"
style=
"margin-top: 16px;"
>
<a-form
layout=
"vertical"
:model=
"postData"
:label-col=
"labelCol"
:wrapper-col=
"wrapperCol"
ref=
"formRef"
>
<a-form-item
name=
"name"
label=
"禁用原因"
:rules=
"[
{ required: true, message: '请输入禁用原因' }]">
<a-textarea
v-model:value=
"postData.textarea"
show-count
:maxlength=
"200"
style=
"width: 456px;"
/>
</a-form-item>
</a-form>
</a-spin>
</a-modal>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
}
from
'vue-facing-decorator'
;
import
{
EnhanceFormComponent
}
from
"@/core/form/EnhanceFormComponent"
;
import
{
DetectionController
}
from
"@/api/DetectionController"
;
import
{
message
}
from
"ant-design-vue"
;
import
{
User
}
from
"lib/src/entity/security/entity/User"
;
@
Component
({
components
:
{}
})
export
default
class
EnableDialog
extends
EnhanceFormComponent
<
User
>
{
dialogVisible
=
false
;
titleVisible
=
"启用提示"
;
postData
=
{
id
:
''
,
status
:
1
,
textarea
:
''
}
init
(
data
):
void
{
this
.
dialogVisible
=
true
;
this
.
titleVisible
=
!
data
.
status
?
"启用提示"
:
"账号禁用"
;
}
handleOk
()
{
this
.
$refs
.
formRef
.
validate
().
then
((
valid
)
=>
{
if
(
valid
)
{
this
.
submitted
=
true
;
const
formData
=
{
id
:
this
.
postData
.
id
||
''
,
status
:
1
,
textarea
:
this
.
postData
.
textarea
,
}
DetectionController
.
inspectStatus
(
this
.
axios
,
formData
).
then
(
response
=>
{
this
.
submitted
=
false
;
message
.
success
(
"操作成功"
);
this
.
$emit
(
"emitOk"
);
this
.
dialogVisible
=
false
;
}).
finally
(()
=>
this
.
submitted
=
false
);
}
});
}
}
</
script
>
\ No newline at end of file
aus-front/admin/src/views/detection/inspector/components/InspectorAddForm.vue
View file @
856c63a
...
...
@@ -103,12 +103,21 @@ export default class InspectorAddForm extends EnhanceFormComponent<User> {
regionName
:
this
.
postData
.
regionName
,
status
:
this
.
postData
.
status
?
1
:
0
,
}
DetectionController
.
inspectAdd
(
this
.
axios
,
formData
).
then
(
response
=>
{
this
.
submitted
=
false
;
message
.
success
(
"添加成功"
);
this
.
$emit
(
"ok"
);
this
.
dialogVisible
=
false
;
}).
finally
(()
=>
this
.
submitted
=
false
);
if
(
this
.
postData
.
id
)
{
DetectionController
.
inspectUpdate
(
this
.
axios
,
formData
).
then
(
response
=>
{
this
.
submitted
=
false
;
message
.
success
(
"更新成功"
);
this
.
$emit
(
"emitOk"
);
this
.
dialogVisible
=
false
;
}).
finally
(()
=>
this
.
submitted
=
false
);
}
else
{
DetectionController
.
inspectAdd
(
this
.
axios
,
formData
).
then
(
response
=>
{
this
.
submitted
=
false
;
message
.
success
(
"添加成功"
);
this
.
$emit
(
"emitOk"
);
this
.
dialogVisible
=
false
;
}).
finally
(()
=>
this
.
submitted
=
false
);
}
}
});
}
...
...
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