Commit 79826ec7 by yancanhua

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

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