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 ade08541
authored
May 11, 2026
by
chenwq1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 新增检测评分
1 parent
6c269a49
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
555 additions
and
169 deletions
aus-front/admin/src/api/DetectionController.ts
aus-front/admin/src/views/detection/order/DetectionOrderEdit.vue
aus-front/admin/src/views/detection/order/DetectionOrderPage.vue
aus-front/admin/src/views/detection/order/components/CustomizeFormButtonSelectUploadFile.vue
aus-front/admin/src/views/detection/order/components/CustomizeFormUploadFile.vue
aus-front/admin/src/views/detection/order/components/TestingScore.vue
aus-front/admin/src/views/detection/template/DetectionTemplatePage.vue
aus-front/admin/src/views/detection/template/DetectionTemplatePreview.vue
aus-front/admin/src/api/DetectionController.ts
View file @
ade0854
import
{
AxiosResponse
,
AxiosStatic
}
from
"axios"
;
import
{
AxiosResponse
,
AxiosStatic
}
from
'axios'
;
/**
/**
*/
*/
export
class
DetectionController
{
export
class
DetectionController
{
static
inspectPage
(
static
inspectPage
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
axios
:
AxiosStatic
,
return
axios
.
post
(
'inspect/page'
,
params
);
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/page"
,
params
);
}
}
static
PAGE_INSPECTOR
=
'inspect/page'
;
static
PAGE_INSPECTOR
=
"inspect/page"
;
static
inspectSummary
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectSummary
(
return
axios
.
get
(
'inspect/summary'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
"inspect/summary"
,
params
);
}
}
static
inspectAdd
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectAdd
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
'inspect/add'
,
params
);
return
axios
.
post
(
"inspect/add"
,
params
);
}
}
static
inspectUpdate
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectUpdate
(
return
axios
.
post
(
'inspect/update/'
+
params
.
id
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/update/"
+
params
.
id
,
params
);
}
}
static
inspectStatus
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectStatus
(
return
axios
.
post
(
'inspect/status'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/status"
,
params
);
}
}
static
inspectExport
(
axios
:
AxiosStatic
,
params
:
any
,
config
?:
any
):
Promise
<
AxiosResponse
<
void
>>
{
static
inspectExport
(
return
axios
.
post
(
'inspect/export'
,
params
,
config
);
axios
:
AxiosStatic
,
params
:
any
,
config
?:
any
,
):
Promise
<
AxiosResponse
<
void
>>
{
return
axios
.
post
(
"inspect/export"
,
params
,
config
);
}
}
static
inspectDetail
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectDetail
(
return
axios
.
get
(
'/inspect/detail/'
+
params
.
id
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
"/inspect/detail/"
+
params
.
id
,
params
);
}
}
static
inspectReportPage
(
static
inspectReportPage
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
axios
:
AxiosStatic
,
return
axios
.
post
(
'inspect/report/page'
,
params
);
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/report/page"
,
params
);
}
}
static
PAGE_INSPECTOR_REPORT
=
'inspect/report/page'
;
static
PAGE_INSPECTOR_REPORT
=
"inspect/report/page"
;
static
inspectReportExport
(
axios
:
AxiosStatic
,
params
:
any
,
config
?:
any
):
Promise
<
AxiosResponse
<
void
>>
{
static
inspectReportExport
(
return
axios
.
post
(
'inspect/report/export'
,
params
,
config
);
axios
:
AxiosStatic
,
params
:
any
,
config
?:
any
,
):
Promise
<
AxiosResponse
<
void
>>
{
return
axios
.
post
(
"inspect/report/export"
,
params
,
config
);
}
}
static
inspectReportBind
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectReportBind
(
return
axios
.
post
(
'inspect/report/bind'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/report/bind"
,
params
);
}
}
static
inspectReportUnbind
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectReportUnbind
(
return
axios
.
post
(
'inspect/report/unbind'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/report/unbind"
,
params
);
}
}
static
inspectOrderPage
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectOrderPage
(
return
axios
.
post
(
'inspect/wo/page'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/wo/page"
,
params
);
}
}
static
PAGE_INSPECTOR_ORDER
=
'inspect/wo/page'
;
static
PAGE_INSPECTOR_ORDER
=
"inspect/wo/page"
;
static
inspectOrderAdd
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectOrderAdd
(
return
axios
.
post
(
'inspect/wo/add'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/wo/add"
,
params
);
}
}
static
inspectOrderCountByStatus
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectOrderCountByStatus
(
return
axios
.
post
(
'inspect/wo/statusCount'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/wo/statusCount"
,
params
);
}
}
static
inspectOrderUpdate
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectOrderUpdate
(
return
axios
.
post
(
'inspect/wo/update'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/wo/update"
,
params
);
}
}
static
inspectOrderExport
(
axios
:
AxiosStatic
,
params
:
any
,
config
?:
any
):
Promise
<
AxiosResponse
<
void
>>
{
static
inspectOrderExport
(
return
axios
.
post
(
'inspect/wo/export'
,
params
,
config
);
axios
:
AxiosStatic
,
params
:
any
,
config
?:
any
,
):
Promise
<
AxiosResponse
<
void
>>
{
return
axios
.
post
(
"inspect/wo/export"
,
params
,
config
);
}
}
static
inspectOrderCancel
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectOrderCancel
(
return
axios
.
post
(
'inspect/wo/cancel'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/wo/cancel"
,
params
);
}
}
// static inspectOrderDetail(axios: AxiosStatic, params: any): Promise<AxiosResponse> {
// static inspectOrderDetail(axios: AxiosStatic, params: any): Promise<AxiosResponse> {
// return axios.get('inspect/wo/detail/' + params.id, params);
// return axios.get('inspect/wo/detail/' + params.id, params);
// }
// }
static
inspectOrderDetail
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectOrderDetail
(
return
axios
.
post
(
'inspect/wo/detail'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/wo/detail"
,
params
);
}
}
static
inspectReportDetail
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectReportDetail
(
return
axios
.
get
(
'inspect/report/detail/'
+
params
.
id
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
"inspect/report/detail/"
+
params
.
id
,
params
);
}
}
static
inspectOrderAudit
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectOrderAudit
(
return
axios
.
post
(
'inspect/wo/audit'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/wo/audit"
,
params
);
}
}
static
inspectionTemplate
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectionTemplate
(
return
axios
.
get
(
'inspectionTemplate/'
+
params
.
id
+
'/rootNodes'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
"inspectionTemplate/"
+
params
.
id
+
"/rootNodes"
,
params
,
);
}
}
static
inspectionTemplateDefault
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectionTemplateDefault
(
return
axios
.
post
(
'inspectionTemplate/default'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspectionTemplate/default"
,
params
);
}
}
static
getCarTypeList
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
getCarTypeList
(
return
axios
.
get
(
'ropApi/getCarTypeList?csId='
+
params
.
csId
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
"ropApi/getCarTypeList?csId="
+
params
.
csId
,
params
);
}
}
static
inspectionNode
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectionNode
(
return
axios
.
get
(
'inspectionNode/'
+
params
.
id
+
'/children?taskId='
+
params
.
taskId
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
"inspectionNode/"
+
params
.
id
+
"/children?taskId="
+
params
.
taskId
,
);
}
}
static
inspectRecordSave
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
inspectRecordSave
(
return
axios
.
post
(
'inspect/record/save'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspect/record/save"
,
params
);
}
}
static
completeInspection
(
axios
:
AxiosStatic
,
params
:
any
):
Promise
<
AxiosResponse
>
{
static
completeInspection
(
return
axios
.
post
(
'inspectionRecord/completeInspection'
,
params
);
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspectionRecord/completeInspection"
,
params
);
}
static
PAGE_INSPECTOR_REPORT_INSPECTOR
=
"inspectionTemplate/page"
;
static
inspectionTemplatePage
(
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
post
(
"inspectionTemplate/page"
,
params
);
}
}
static
inspectionTemplateDetail
(
axios
:
AxiosStatic
,
params
:
any
,
):
Promise
<
AxiosResponse
>
{
return
axios
.
get
(
"inspectionTemplate/detail/"
+
params
.
id
);
}
}
}
aus-front/admin/src/views/detection/order/DetectionOrderEdit.vue
View file @
ade0854
...
@@ -12,12 +12,12 @@
...
@@ -12,12 +12,12 @@
<CheckCircleFilled
v-if=
"item.completedFlag == '1'"
class=
"circleFilled"
/>
<CheckCircleFilled
v-if=
"item.completedFlag == '1'"
class=
"circleFilled"
/>
</div>
</div>
</div>
</div>
<div
class=
"customizeFormBox"
>
<div
class=
"customizeFormBox"
v-if=
"activeNodeId != -1"
>
<CustomizeForm
ref=
"customizeFormRef"
@
submitSuccess=
"getTemplateData('0')"
/>
<CustomizeForm
ref=
"customizeFormRef"
@
submitSuccess=
"getTemplateData('0')"
/>
</div>
</div>
<
!--
<div
class=
"customizeFormBox
"
>
<
div
class=
"customizeFormBox"
v-if=
"activeNodeId == -1
"
>
<TestingScore
ref=
"testingScoreRef"
/>
<TestingScore
ref=
"testingScoreRef"
/>
</div>
-->
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -64,7 +64,10 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
...
@@ -64,7 +64,10 @@ export default class DetectionOrderEdit extends PaginationComponent<Vehicle> {
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
,
{
id
:
routeData
.
id
,
status
}).
then
(
response
=>
{
this
.
nodeList
=
response
?.
data
?.
data
||
[];
this
.
nodeList
=
(
response
?.
data
?.
data
||
[]).
map
(
item
=>
({
...
item
,
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
);
...
...
aus-front/admin/src/views/detection/order/DetectionOrderPage.vue
View file @
ade0854
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
</router-link>
</router-link>
<a-button
v-if=
"record.status == 1"
type=
"link"
@
click=
"handleAddOrder(record)"
<a-button
v-if=
"record.status == 1"
type=
"link"
@
click=
"handleAddOrder(record)"
size=
"small"
>
编辑
</a-button>
size=
"small"
>
编辑
工单
</a-button>
<a-button
v-if=
"record.status == 1 || record.status == 2"
type=
"link"
<a-button
v-if=
"record.status == 1 || record.status == 2"
type=
"link"
@
click=
"handleCancelOrder(record)"
size=
"small"
>
取消工单
</a-button>
@
click=
"handleCancelOrder(record)"
size=
"small"
>
取消工单
</a-button>
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
<router-link
v-if=
"record.status != 3"
<router-link
v-if=
"record.status != 3"
:to=
"
{ path: '/detection/order/edit', query: { id: record.id, page: 'order', action: 'EDIT' } }">
:to=
"
{ path: '/detection/order/edit', query: { id: record.id, page: 'order', action: 'EDIT' } }">
<a-button
type=
"link"
size=
"small"
>
编辑
</a-button>
<a-button
type=
"link"
size=
"small"
>
编辑
报告
</a-button>
</router-link>
</router-link>
</
template
>
</
template
>
...
...
aus-front/admin/src/views/detection/order/components/CustomizeFormButtonSelectUploadFile.vue
View file @
ade0854
<
template
>
<
template
>
<div>
<div>
<div
class=
"hidden-input"
>
<div
class=
"hidden-input"
>
<input
ref=
"fileInputRef"
accept=
"image/*"
type=
"file"
@
change=
"onFileChange"
>
<input
ref=
"fileInputRef"
accept=
"image/*"
type=
"file"
@
change=
"onFileChange"
/>
</div>
</div>
<div
class=
"uploadPage"
>
<div
class=
"uploadPage"
>
<div
v-if=
"(getValidationRules().maxCount || 3) > pickerValue.length"
class=
"uploadBox"
<div
@
click=
"handlePickFile()"
>
v-if=
"(getValidationRules().maxCount || 3) > pickerValue.length"
class=
"uploadBox"
@
click=
"handlePickFile()"
>
<PlusOutlined
class=
"plusBox"
/>
<PlusOutlined
class=
"plusBox"
/>
<div
class=
"uploadTxt"
>
<div
class=
"uploadTxt"
>
上传图片
</div>
上传图片
</div>
</div>
</div>
<div
v-for=
"(url, index) in pickerValue"
:key=
"index"
class=
"uploadBox"
>
<div
v-for=
"(url, index) in pickerValue"
:key=
"index"
class=
"uploadBox"
>
<!-- 删除按钮 -->
<!-- 删除按钮 -->
<div
class=
"deleteBox"
title=
"点击删除"
@
click=
"handleDelete(url)"
>
<div
class=
"deleteBox"
title=
"点击删除"
@
click=
"handleDelete(url)"
>
<CloseCircleOutlined
class=
"closeIcon"
/>
<CloseCircleOutlined
class=
"closeIcon"
/>
</div>
</div>
<!-- 图片 -->
<!-- 图片 -->
...
@@ -28,17 +42,15 @@ import { uploadFile } from "@/utils/upload.js";
...
@@ -28,17 +42,15 @@ import { uploadFile } from "@/utils/upload.js";
import
{
PlusOutlined
,
CloseCircleOutlined
}
from
"@ant-design/icons-vue"
;
import
{
PlusOutlined
,
CloseCircleOutlined
}
from
"@ant-design/icons-vue"
;
import
{
message
}
from
"ant-design-vue"
;
import
{
message
}
from
"ant-design-vue"
;
@
Component
({
components
:
{
PlusOutlined
,
CloseCircleOutlined
}
})
@
Component
({
components
:
{
PlusOutlined
,
CloseCircleOutlined
}
})
export
default
class
CustomizeFormButtonSelectUploadFile
extends
Vue
{
export
default
class
CustomizeFormButtonSelectUploadFile
extends
Vue
{
@
Prop
({
default
:
()
=>
{
}
})
@
Prop
({
default
:
()
=>
{}
})
item
:
any
=
{};
item
:
any
=
{};
pickerValue
:
any
=
[];
pickerValue
:
any
=
[];
// item.resultStatus 变化时,清空选择项
// item.resultStatus 变化时,清空选择项
@
Watch
(
'item.resultStatus'
,
{
deep
:
true
,
immediate
:
true
})
@
Watch
(
"item.resultStatus"
,
{
deep
:
true
,
immediate
:
true
})
watchItem
(
newValue
:
any
,
oldValue
:
any
):
void
{
watchItem
(
newValue
:
any
,
oldValue
:
any
):
void
{
if
(
newValue
)
{
if
(
newValue
)
{
this
.
pickerValue
=
[];
this
.
pickerValue
=
[];
...
@@ -52,7 +64,14 @@ export default class CustomizeFormButtonSelectUploadFile extends Vue {
...
@@ -52,7 +64,14 @@ export default class CustomizeFormButtonSelectUploadFile extends Vue {
// 初始化数据
// 初始化数据
initData
()
{
initData
()
{
this
.
pickerValue
=
this
.
item
?.
inspectionResultVO
?.
inspectionValueList
?.
filter
(
item
=>
item
.
valueText
&&
item
.
interactionType
==
"image_upload"
)?.
map
(
item
=>
item
.
valueText
)
||
[];
this
.
pickerValue
=
this
.
item
?.
inspectionResultVO
?.
inspectionValueList
?.
filter
(
(
item
)
=>
item
.
valueText
&&
item
.
interactionType
==
"image_upload"
,
)
?.
map
((
item
)
=>
item
.
valueText
)
||
[];
this
.
updateData
();
this
.
updateData
();
}
}
...
@@ -72,15 +91,24 @@ export default class CustomizeFormButtonSelectUploadFile extends Vue {
...
@@ -72,15 +91,24 @@ export default class CustomizeFormButtonSelectUploadFile extends Vue {
if
(
!
file
)
return
;
if
(
!
file
)
return
;
const
maxSize10MB
=
10
*
1024
*
1024
;
const
maxSize10MB
=
10
*
1024
*
1024
;
const
maxSize100MB
=
100
*
1024
*
1024
;
const
maxSize100MB
=
100
*
1024
*
1024
;
if
(
this
.
item
.
interactionType
==
"image_upload"
&&
file
.
size
>
maxSize10MB
)
{
if
(
this
.
item
.
interactionType
==
"image_upload"
&&
file
.
size
>
maxSize10MB
)
{
return
message
.
error
(
"文件大小不能超过10MB"
);
return
message
.
error
(
"文件大小不能超过10MB"
);
}
}
if
(
this
.
item
.
interactionType
==
"video_upload"
&&
file
.
size
>
maxSize100MB
)
{
if
(
this
.
item
.
interactionType
==
"video_upload"
&&
file
.
size
>
maxSize100MB
)
{
return
message
.
error
(
"文件大小不能超过100MB"
);
return
message
.
error
(
"文件大小不能超过100MB"
);
}
}
try
{
try
{
const
res
=
await
uploadFile
(
file
);
const
res
=
await
uploadFile
(
file
);
const
url
=
(
typeof
res
.
aliyunAddress
===
"string"
&&
res
.
aliyunAddress
)
||
(
typeof
res
.
url
===
"string"
&&
res
.
url
)
||
""
;
const
url
=
(
typeof
res
.
aliyunAddress
===
"string"
&&
res
.
aliyunAddress
)
||
(
typeof
res
.
url
===
"string"
&&
res
.
url
)
||
""
;
message
.
success
(
"上传成功"
);
message
.
success
(
"上传成功"
);
this
.
pickerValue
.
push
(
url
);
this
.
pickerValue
.
push
(
url
);
this
.
updateData
();
this
.
updateData
();
...
@@ -133,6 +161,16 @@ export default class CustomizeFormButtonSelectUploadFile extends Vue {
...
@@ -133,6 +161,16 @@ export default class CustomizeFormButtonSelectUploadFile extends Vue {
border-radius
:
6px
;
border-radius
:
6px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.uploadBox
:deep
(
.ant-image
),
.uploadBox
:deep
(
.ant-image-img
)
{
width
:
100%
;
height
:
100%
;
border-radius
:
6px
;
}
.uploadBox
:deep
(
.ant-image-img
)
{
object-fit
:
cover
;
}
.plusBox
{
.plusBox
{
float
:
left
;
float
:
left
;
...
@@ -140,7 +178,7 @@ export default class CustomizeFormButtonSelectUploadFile extends Vue {
...
@@ -140,7 +178,7 @@ export default class CustomizeFormButtonSelectUploadFile extends Vue {
margin-right
:
36px
;
margin-right
:
36px
;
margin-left
:
36px
;
margin-left
:
36px
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#9
BA3AD
;
color
:
#9
ba3ad
;
}
}
.closeIcon
{
.closeIcon
{
...
@@ -176,4 +214,4 @@ export default class CustomizeFormButtonSelectUploadFile extends Vue {
...
@@ -176,4 +214,4 @@ export default class CustomizeFormButtonSelectUploadFile extends Vue {
height
:
20px
;
height
:
20px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
</
style
>
aus-front/admin/src/views/detection/order/components/CustomizeFormUploadFile.vue
View file @
ade0854
<
template
>
<
template
>
<div>
<div>
<div
class=
"hidden-input"
>
<div
class=
"hidden-input"
>
<input
ref=
"fileInputRef"
:accept=
"item.interactionType == 'image_upload' ? 'image/*' : 'video/*'"
<input
type=
"file"
@
change=
"onFileChange"
>
ref=
"fileInputRef"
:accept=
"
item.interactionType == 'image_upload'
? 'image/*'
: 'video/*'
"
type=
"file"
@
change=
"onFileChange"
/>
</div>
</div>
<div
class=
"uploadPage"
>
<div
class=
"uploadPage"
>
<div
v-if=
"(getValidationRules().maxCount || 3) > pickerValue.length"
class=
"uploadBox"
<div
@
click=
"handlePickFile()"
>
v-if=
"(getValidationRules().maxCount || 3) > pickerValue.length"
class=
"uploadBox"
@
click=
"handlePickFile()"
>
<PlusOutlined
class=
"plusBox"
/>
<PlusOutlined
class=
"plusBox"
/>
<div
class=
"uploadTxt"
>
<div
class=
"uploadTxt"
>
{{
item
.
interactionType
==
'image_upload'
?
'上传图片'
:
'上传视频'
}}
{{
item
.
interactionType
==
"image_upload"
?
"上传图片"
:
"上传视频"
}}
</div>
</div>
</div>
</div>
<div
v-for=
"(url, index) in pickerValue"
:key=
"index"
class=
"uploadBox"
>
<div
v-for=
"(url, index) in pickerValue"
:key=
"index"
class=
"uploadBox"
>
<!-- 删除按钮 -->
<!-- 删除按钮 -->
<div
class=
"deleteBox"
title=
"点击删除"
@
click=
"handleDelete(url)"
>
<div
class=
"deleteBox"
title=
"点击删除"
@
click=
"handleDelete(url)"
>
<CloseCircleOutlined
class=
"closeIcon"
/>
<CloseCircleOutlined
class=
"closeIcon"
/>
</div>
</div>
<!-- 图片 -->
<!-- 图片 -->
<a-image
v-if=
"item.interactionType == 'image_upload'"
class=
"uploadBoxImg"
:src=
"url"
/>
<a-image
v-if=
"item.interactionType == 'image_upload'"
class=
"uploadBoxImg"
:src=
"url"
/>
<!-- 视频 -->
<!-- 视频 -->
<video
v-if=
"item.interactionType == 'video_upload'"
class=
"uploadBoxImg"
controls
:src=
"url"
>
<video
v-if=
"item.interactionType == 'video_upload'"
class=
"uploadBoxImg"
controls
:src=
"url"
>
您的浏览器不支持 video 标签。
您的浏览器不支持 video 标签。
</video>
</video>
<!-- 点击视频预览 -->
<!-- 点击视频预览 -->
<div
v-if=
"item.interactionType == 'video_upload'"
@
click=
"previewVideo(url)"
class=
"videoPreviewBox"
>
<div
</div>
v-if=
"item.interactionType == 'video_upload'"
@
click=
"previewVideo(url)"
class=
"videoPreviewBox"
></div>
</div>
</div>
</div>
</div>
<!-- 视频预览弹窗 -->
<!-- 视频预览弹窗 -->
<a-modal
v-model:open=
"videoVisible"
title=
"视频播放"
:width=
"760"
>
<a-modal
v-model:open=
"videoVisible"
title=
"视频播放"
:width=
"760"
>
<div
style=
"width: 100%; height: 680px;overflow: auto;"
>
<div
style=
"width: 100%; height: 680px; overflow: auto"
>
<video
style=
"width: 100%;height: 660px;"
controls
:src=
"videoUrl"
>
<video
style=
"width: 100%; height: 660px"
controls
:src=
"videoUrl"
>
您的浏览器不支持 video 标签。
您的浏览器不支持 video 标签。
</video>
</video>
</div>
</div>
<template
#
footer
></
template
>
<template
#
footer
></
template
>
</a-modal>
</a-modal>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
...
@@ -47,18 +85,15 @@ import { uploadFile } from "@/utils/upload.js";
...
@@ -47,18 +85,15 @@ import { uploadFile } from "@/utils/upload.js";
import
{
PlusOutlined
,
CloseCircleOutlined
}
from
"@ant-design/icons-vue"
;
import
{
PlusOutlined
,
CloseCircleOutlined
}
from
"@ant-design/icons-vue"
;
import
{
message
}
from
"ant-design-vue"
;
import
{
message
}
from
"ant-design-vue"
;
@
Component
({
components
:
{
PlusOutlined
,
CloseCircleOutlined
}
})
@
Component
({
components
:
{
PlusOutlined
,
CloseCircleOutlined
}
})
export
default
class
CustomizeFormUploadFile
extends
Vue
{
export
default
class
CustomizeFormUploadFile
extends
Vue
{
@
Prop
({
default
:
()
=>
{
}
})
@
Prop
({
default
:
()
=>
{}
})
item
:
any
=
{};
item
:
any
=
{};
pickerValue
:
any
=
[];
pickerValue
:
any
=
[];
videoVisible
:
boolean
=
false
;
videoVisible
=
false
;
videoUrl
:
string
=
""
;
videoUrl
=
""
;
mounted
()
{
mounted
()
{
this
.
initData
();
this
.
initData
();
...
@@ -66,7 +101,10 @@ export default class CustomizeFormUploadFile extends Vue {
...
@@ -66,7 +101,10 @@ export default class CustomizeFormUploadFile extends Vue {
// 初始化数据
// 初始化数据
initData
()
{
initData
()
{
this
.
pickerValue
=
this
.
item
?.
inspectionResultVO
?.
inspectionValueList
?.
filter
(
item
=>
item
.
valueText
)?.
map
(
item
=>
item
.
valueText
)
||
[];
this
.
pickerValue
=
this
.
item
?.
inspectionResultVO
?.
inspectionValueList
?.
filter
((
item
)
=>
item
.
valueText
)
?.
map
((
item
)
=>
item
.
valueText
)
||
[];
this
.
updateData
();
this
.
updateData
();
}
}
...
@@ -86,15 +124,24 @@ export default class CustomizeFormUploadFile extends Vue {
...
@@ -86,15 +124,24 @@ export default class CustomizeFormUploadFile extends Vue {
if
(
!
file
)
return
;
if
(
!
file
)
return
;
const
maxSize10MB
=
10
*
1024
*
1024
;
const
maxSize10MB
=
10
*
1024
*
1024
;
const
maxSize100MB
=
100
*
1024
*
1024
;
const
maxSize100MB
=
100
*
1024
*
1024
;
if
(
this
.
item
.
interactionType
==
"image_upload"
&&
file
.
size
>
maxSize10MB
)
{
if
(
this
.
item
.
interactionType
==
"image_upload"
&&
file
.
size
>
maxSize10MB
)
{
return
message
.
error
(
"文件大小不能超过10MB"
);
return
message
.
error
(
"文件大小不能超过10MB"
);
}
}
if
(
this
.
item
.
interactionType
==
"video_upload"
&&
file
.
size
>
maxSize100MB
)
{
if
(
this
.
item
.
interactionType
==
"video_upload"
&&
file
.
size
>
maxSize100MB
)
{
return
message
.
error
(
"文件大小不能超过100MB"
);
return
message
.
error
(
"文件大小不能超过100MB"
);
}
}
try
{
try
{
const
res
=
await
uploadFile
(
file
);
const
res
=
await
uploadFile
(
file
);
const
url
=
(
typeof
res
.
aliyunAddress
===
"string"
&&
res
.
aliyunAddress
)
||
(
typeof
res
.
url
===
"string"
&&
res
.
url
)
||
""
;
const
url
=
(
typeof
res
.
aliyunAddress
===
"string"
&&
res
.
aliyunAddress
)
||
(
typeof
res
.
url
===
"string"
&&
res
.
url
)
||
""
;
message
.
success
(
"上传成功"
);
message
.
success
(
"上传成功"
);
this
.
pickerValue
.
push
(
url
);
this
.
pickerValue
.
push
(
url
);
this
.
updateData
();
this
.
updateData
();
...
@@ -120,11 +167,12 @@ export default class CustomizeFormUploadFile extends Vue {
...
@@ -120,11 +167,12 @@ export default class CustomizeFormUploadFile extends Vue {
previewVideo
(
url
:
string
)
{
previewVideo
(
url
:
string
)
{
const
timestamp
=
new
Date
().
getTime
();
const
timestamp
=
new
Date
().
getTime
();
const
urlWithTimestamp
=
url
.
includes
(
'?'
)
?
`
${
url
}
&t=
${
timestamp
}
`
:
`
${
url
}
?t=
${
timestamp
}
`
;
const
urlWithTimestamp
=
url
.
includes
(
"?"
)
?
`
${
url
}
&t=
${
timestamp
}
`
:
`
${
url
}
?t=
${
timestamp
}
`
;
this
.
videoUrl
=
urlWithTimestamp
;
this
.
videoUrl
=
urlWithTimestamp
;
this
.
videoVisible
=
true
;
this
.
videoVisible
=
true
;
}
}
}
}
</
script
>
</
script
>
...
@@ -155,7 +203,16 @@ export default class CustomizeFormUploadFile extends Vue {
...
@@ -155,7 +203,16 @@ export default class CustomizeFormUploadFile extends Vue {
border-radius
:
6px
;
border-radius
:
6px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.uploadBox
:deep
(
.ant-image
),
.uploadBox
:deep
(
.ant-image-img
)
{
width
:
100%
;
height
:
100%
;
border-radius
:
6px
;
}
.uploadBox
:deep
(
.ant-image-img
)
{
object-fit
:
cover
;
}
.plusBox
{
.plusBox
{
float
:
left
;
float
:
left
;
...
@@ -163,7 +220,7 @@ export default class CustomizeFormUploadFile extends Vue {
...
@@ -163,7 +220,7 @@ export default class CustomizeFormUploadFile extends Vue {
margin-right
:
36px
;
margin-right
:
36px
;
margin-left
:
36px
;
margin-left
:
36px
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#9
BA3AD
;
color
:
#9
ba3ad
;
}
}
.closeIcon
{
.closeIcon
{
...
@@ -210,4 +267,4 @@ export default class CustomizeFormUploadFile extends Vue {
...
@@ -210,4 +267,4 @@ export default class CustomizeFormUploadFile extends Vue {
opacity
:
0.1
;
opacity
:
0.1
;
z-index
:
9
;
z-index
:
9
;
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
</
style
>
aus-front/admin/src/views/detection/order/components/TestingScore.vue
View file @
ade0854
<
template
>
<
template
>
<div>
<div
class=
"testing-score"
>
<a-form
layout=
"vertical"
ref=
"formRef"
>
<a-form
layout=
"vertical"
ref=
"formRef"
>
<div>
<div
class=
"score-section"
>
<a-form-item
label=
"外观评分"
:rules=
"[
{ required: true, message: '请输入外观评分' }]">
<div
class=
"section-header"
>
<div
class=
"score-ticks"
>
<title-tip-icon></title-tip-icon>
<span>
0
</span><span>
20
</span><span>
40
</span><span>
60
</span><span>
80
</span><span>
100
</span>
<span
class=
"section-title"
>
外观评分
</span>
</div>
<span
class=
"section-required"
>
*
</span>
<a-slider
id=
"exteriorScoreId"
v-model:value=
"postData.exteriorScore"
/>
</div>
</a-form-item>
<div
class=
"score-ticks"
>
<a-form-item
label=
"评分依据"
:rules=
"[
{ required: true, message: '请说明外观主要扣分项' }]">
<span>
0
</span><span>
20
</span><span>
40
</span><span>
60
</span><span>
80
</span><span>
100
</span>
<a-textarea
v-model:value=
"postData.exteriorComment"
</div>
placeholder=
"请查验外观主要划分级别。如:全车多处刮痕,右后侧碰撞有修复痕迹..."
:auto-size=
"
{ minRows: 2, maxRows: 5 }" />
<a-slider
id=
"exteriorScoreId"
v-model:value=
"postData.exteriorScore"
/>
</a-form-item>
<a-textarea
v-model:value=
"postData.exteriorComment"
placeholder=
"请查验外观主要划分级别。如:全车多处刮痕,右后侧碰撞有修复痕迹..."
:auto-size=
"
{ minRows: 3, maxRows: 5 }"
:maxlength="200"
show-count
class="score-textarea"
/>
</div>
</div>
<div>
<a-form-item
label=
"骨架评级"
:rules=
"[
{ required: true, message: '请输入骨架评级' }]">
<div
class=
"score-section"
>
<div
class=
"selectList"
>
<div
class=
"section-header"
>
<div
v-for=
"(col, index) in columnsList"
:key=
"index"
class=
"selectBut"
<title-tip-icon></title-tip-icon>
:class=
"
{ 'pitchOn': postData.skeletonLevel == col.value }"
<span
class=
"section-title"
>
骨架评级
</span>
@click="postData.skeletonLevel = col.value">
<span
class=
"section-required"
>
*
</span>
{{
col
.
text
}}
</div>
<div
v-if=
"postData.skeletonLevel == col.value"
class=
"pitchImg"
></div>
<div
class=
"selectList"
>
</div>
<div
v-for=
"(col, index) in columnsList"
:key=
"index"
class=
"selectBut"
:class=
"
{ pitchOn: postData.skeletonLevel == col.value }"
@click="postData.skeletonLevel = col.value">
{{
col
.
text
}}
<div
v-if=
"postData.skeletonLevel == col.value"
class=
"pitchImg"
></div>
</div>
</div>
</a-form-item>
</div>
<a-form-item
label=
"评分依据"
:rules=
"[
{ required: true, message: '请查验车辆骨架相关部位和程度' }]">
<a-textarea
<a-textarea
v-model:value=
"postData.skeletonComment"
v-model:value=
"postData.skeletonComment"
placeholder=
"请查验车辆骨架相关部位和程度。如:右前翼子板头部从轻微形变影响整形..."
:auto-size=
"
{ minRows: 2, maxRows: 5 }" />
placeholder=
"请查验车辆骨架相关部位和程度。如:右前翼子板头部从轻微形变影响整形..."
</a-form-item>
:auto-size=
"
{ minRows: 3, maxRows: 5 }"
:maxlength="200"
show-count
class="score-textarea"
/>
</div>
</div>
<div>
<a-form-item
label=
"内饰评级"
:rules=
"[
{ required: true, message: '请输入内饰评级' }]">
<div
class=
"score-section"
>
<div
class=
"selectList"
>
<div
class=
"section-header"
>
<div
v-for=
"(col, index) in columnsList"
:key=
"index"
class=
"selectBut"
<title-tip-icon></title-tip-icon>
:class=
"
{ 'pitchOn': postData.interiorLevel == col.value }"
<span
class=
"section-title"
>
内饰评级
</span>
@click="postData.interiorLevel = col.value">
<span
class=
"section-required"
>
*
</span>
{{
col
.
text
}}
</div>
<div
v-if=
"postData.interiorLevel == col.value"
class=
"pitchImg"
></div>
<div
class=
"selectList"
>
</div>
<div
v-for=
"(col, index) in columnsList"
:key=
"index"
class=
"selectBut"
:class=
"
{ pitchOn: postData.interiorLevel == col.value }"
@click="postData.interiorLevel = col.value">
{{
col
.
text
}}
<div
v-if=
"postData.interiorLevel == col.value"
class=
"pitchImg"
></div>
</div>
</div>
</a-form-item>
</div>
<a-form-item
label=
"评分依据"
:rules=
"[
{ required: true, message: '请查验车辆内饰相关部位和程度' }]">
<a-textarea
<a-textarea
v-model:value=
"postData.interiorComment"
v-model:value=
"postData.interiorComment"
placeholder=
"请查验车辆内饰相关部位和程度。如:右前翼子板头部从轻微形变影响整形..."
:auto-size=
"
{ minRows: 2, maxRows: 5 }" />
placeholder=
"请查验车辆内饰相关部位和程度。如:右前翼子板头部从轻微形变影响整形..."
</a-form-item>
:auto-size=
"
{ minRows: 3, maxRows: 5 }"
:maxlength="200"
show-count
class="score-textarea"
/>
</div>
</div>
<div>
<a-form-item
label=
"综合评分"
:rules=
"[
{ required: true, message: '请输入综合评分' }]">
<div
class=
"score-section score-section--highlight"
>
<div
class=
"score-ticks"
>
<div
class=
"section-header"
>
<span>
0
</span><span>
20
</span><span>
40
</span><span>
60
</span><span>
80
</span><span>
100
</span>
<title-tip-icon></title-tip-icon>
</div>
<span
class=
"section-title"
>
综合评分
</span>
<a-slider
id=
"overallScoreId"
v-model:value=
"postData.overallScore"
/>
<span
class=
"section-required"
>
*
</span>
</a-form-item>
</div>
<a-form-item
label=
"综合评价"
:rules=
"[
{ required: true, message: '请对车辆综合情况进行评价...' }]">
<div
class=
"score-ticks"
>
<a-textarea
v-model:value=
"postData.overallComment"
placeholder=
"请对车辆综合情况进行评价..."
<span>
0
</span><span>
20
</span><span>
40
</span><span>
60
</span><span>
80
</span><span>
100
</span>
:auto-size=
"
{ minRows: 2, maxRows: 5 }" />
</div>
</a-form-item>
<a-slider
id=
"overallScoreId"
v-model:value=
"postData.overallScore"
/>
<a-textarea
v-model:value=
"postData.overallComment"
placeholder=
"请对车辆综合情况进行评价..."
:auto-size=
"
{ minRows: 3, maxRows: 5 }"
:maxlength="200"
show-count
class="score-textarea"
/>
</div>
</div>
</a-form>
</a-form>
<div
class=
"footer-submit"
>
<div
class=
"footer-submit"
>
...
@@ -67,12 +98,12 @@
...
@@ -67,12 +98,12 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
"vue-facing-decorator"
;
import
{
Component
,
Vue
}
from
"vue-facing-decorator"
;
import
Title
Divider
from
"@/components/TitleDivider
.vue"
;
import
Title
TipIcon
from
"@/components/icons/TitleTipIcon
.vue"
;
import
{
DetectionController
}
from
"@/api/DetectionController"
;
import
{
DetectionController
}
from
"@/api/DetectionController"
;
import
{
message
}
from
"ant-design-vue"
;
import
{
message
}
from
"ant-design-vue"
;
@
Component
({
@
Component
({
components
:
{
Title
Divider
}
components
:
{
Title
TipIcon
}
})
})
export
default
class
TestingScore
extends
Vue
{
export
default
class
TestingScore
extends
Vue
{
...
@@ -159,6 +190,43 @@ export default class TestingScore extends Vue {
...
@@ -159,6 +190,43 @@ export default class TestingScore extends Vue {
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
.testing-score
{
width
:
100%
;
}
.score-section
{
margin-bottom
:
24px
;
}
.score-section--highlight
{
padding
:
4px
16px
16px
;
background
:
#ECF1FF
;
border-radius
:
8px
;
}
.section-header
{
display
:
flex
;
align-items
:
center
;
height
:
42px
;
margin-bottom
:
16px
;
border-bottom
:
1px
solid
#F2F4F7
;
}
.section-title
{
font-family
:
'HarmonyOS Sans'
,
-apple-system
,
BlinkMacSystemFont
,
'PingFang SC'
,
sans-serif
;
font-weight
:
500
;
font-size
:
14px
;
line-height
:
22px
;
color
:
#2F3133
;
}
.section-required
{
margin-left
:
4px
;
font-size
:
14px
;
line-height
:
22px
;
color
:
#EB4E4E
;
}
.score-ticks
{
.score-ticks
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
...
@@ -167,25 +235,29 @@ export default class TestingScore extends Vue {
...
@@ -167,25 +235,29 @@ export default class TestingScore extends Vue {
color
:
#999
;
color
:
#999
;
}
}
.score-textarea
{
margin-top
:
12px
;
}
.footer-submit
{
.footer-submit
{
display
:
flex
;
width
:
100%
;
width
:
100%
;
padding
:
16px
0
;
margin-top
:
20px
;
margin-top
:
20px
;
border-top
:
1px
solid
#f2f4f7
;
border-top
:
1px
solid
#f2f4f7
;
display
:
flex
;
padding
:
16px
0
;
}
}
.selectList
{
.selectList
{
width
:
100%
;
width
:
100%
;
overflow
:
hidden
;
}
}
.selectBut
{
.selectBut
{
position
:
relative
;
position
:
relative
;
float
:
left
;
float
:
left
;
min-width
:
160px
;
min-width
:
160px
;
padding
:
0
24px
;
height
:
36px
;
height
:
36px
;
padding
:
0
24px
;
margin-right
:
6px
;
margin-right
:
6px
;
margin-bottom
:
12px
;
margin-bottom
:
12px
;
margin-left
:
6px
;
margin-left
:
6px
;
...
@@ -206,6 +278,10 @@ export default class TestingScore extends Vue {
...
@@ -206,6 +278,10 @@ export default class TestingScore extends Vue {
border
:
1px
solid
#185efe
!important
;
border
:
1px
solid
#185efe
!important
;
}
}
.score-section--highlight
.pitchOn
{
background
:
#ffffff
!important
;
}
.pitchImg
{
.pitchImg
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
...
@@ -217,4 +293,4 @@ export default class TestingScore extends Vue {
...
@@ -217,4 +293,4 @@ export default class TestingScore extends Vue {
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
background-size
:
100%
;
background-size
:
100%
;
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
</
style
>
aus-front/admin/src/views/detection/template/DetectionTemplatePage.vue
View file @
ade0854
<
template
>
<a-card
class=
"tabs-card"
:bordered=
"false"
>
<div
class=
"table-operations"
style=
"margin-bottom: 16px; width: 100%; float: left"
>
<div
class=
"flex justify-end"
style=
"float: left"
>
检测模板管理
</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 - 350px)' }"
>
<template
#
bodyCell=
"
{ column, record }">
<template
v-if=
"column.key === 'action'"
>
<router-link
:to=
"
{
path: '/detection/template/preview',
query: { id: record.id },
}"
>
<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
{
TableColumnsType
}
from
"ant-design-vue"
;
import
{
PaginationComponent
}
from
"@/components/PaginationComponent"
;
import
{
DetectionController
}
from
"@/api/DetectionController"
;
interface
InspectionTemplate
{
id
:
number
;
templateName
:
string
;
templateType
:
number
;
description
:
string
;
}
@
Component
({})
export
default
class
DetectionTemplatePage
extends
PaginationComponent
<
InspectionTemplate
>
{
/**
* 表格列配置
*/
columns
:
TableColumnsType
=
[
{
title
:
"序号"
,
key
:
"index"
,
width
:
70
,
align
:
"center"
,
fixed
:
"left"
,
sorter
:
false
,
customRender
:
({
index
})
=>
{
const
pager
=
this
.
getPagination
();
return
(
pager
.
pageIndex
-
1
)
*
pager
.
pageSize
+
index
+
1
;
},
},
{
title
:
"模板名称"
,
dataIndex
:
"templateName"
,
key
:
"templateName"
,
align
:
"center"
,
},
{
title
:
"适配车型"
,
dataIndex
:
"templateType"
,
key
:
"templateType"
,
align
:
"center"
,
customRender
:
({
text
})
=>
{
return
(
{
1
:
"燃油车"
,
2
:
"新能源车"
,
}[
Number
(
text
)]
||
"-"
);
},
},
{
title
:
"备注说明"
,
dataIndex
:
"description"
,
key
:
"description"
,
align
:
"center"
,
width
:
370
,
resizable
:
true
,
ellipsis
:
true
,
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
170
,
align
:
"center"
,
fixed
:
"right"
,
},
];
getPagination
()
{
return
this
.
pagination
;
}
/**
* 初始化配置
*/
created
():
void
{
const
url
=
DetectionController
.
PAGE_INSPECTOR_REPORT_INSPECTOR
;
this
.
init
(
this
.
axios
,
url
);
this
.
pageLoad
();
}
}
</
script
>
aus-front/admin/src/views/detection/template/DetectionTemplatePreview.vue
View file @
ade0854
This diff is collapsed.
Click to expand it.
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