Commit 79826ec7 by yancanhua

fix: 检测师详情详情页面开发

1 parent 1458d354
<template>
<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">
<a-row :gutter="24">
<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="convertToHourMinuteSecond(statisticsData?.avgInspectSec || 0)">
</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 class="tabs-card" :bordered="false" style="margin-top: 12px;">
<!--查询栏-->
<m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm"
@onSearch="pageReload" @onReset="handleReset()" :simpleFieldNum="4">
......@@ -165,6 +163,7 @@ export default class DetectionInspectorPage extends PaginationComponent<Vehicle>
label: '账号状态', field: 'status', type: 'select', allowClear: true, optionItems: this.reviewStatusList, operator: Operator.eq
}],
});
this.pagination.setDefaultSort('createTime', Order.desc);
this.pageLoad();
this.areaData = convertToTree(false);
this.getInspectSummary();
......@@ -212,6 +211,13 @@ export default class DetectionInspectorPage extends PaginationComponent<Vehicle>
this.$refs.enableDialogRef.init({ id: record.id, status: record.status ? 0 : 1 });
}
//秒转换为时分秒
convertToHourMinuteSecond(seconds: number) {
const hours = Math.floor(seconds / 3600);
const minutes = Math.floor((seconds % 3600) / 60);
return `${hours}小时${minutes}分`;
}
//导出检测师列表
downloadExcel(): void {
this.exporting = true;
......
......@@ -25,20 +25,20 @@
</a-descriptions>
</div>
<div style="width: 100%;float: left;margin-top: 16px;">
<a-row :gutter="24" class="mb-12">
<a-col :span="8">
<div style="width: 100%;float: left;margin-top: 24px;">
<a-row :gutter="24">
<a-col :span="12">
<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-col :span="12">
<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">
:value="convertToHourMinuteSecond(pageData?.inspectorSimpleSummary?.avgInspectCost || 0)">
</a-statistic>
</a-card>
</a-col>
......@@ -46,7 +46,7 @@
</div>
<!-- 关联工单列表 -->
<div style="width: 100%;float: left;">
<div style="width: 100%;float: left;margin-top: 16px;">
<a-descriptions :column="1" size="small" layout="vertical">
<template #title>
<title-tip-icon></title-tip-icon>
......@@ -124,6 +124,14 @@ export default class DetectionInspectorView extends PaginationComponent<Vehicle>
handleBack() {
this.$router.back();
}
//秒转换为时分秒
convertToHourMinuteSecond(seconds: number) {
const hours = Math.floor(seconds / 3600);
const minutes = Math.floor((seconds % 3600) / 60);
return `${hours}小时${minutes}分`;
}
}
</script>
<style scoped lang="less">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!