Commit e4860026 by yancanhua

fix: 自测问题调整

1 parent 80b850cd
...@@ -248,13 +248,28 @@ export default class DetectionInspectorPage extends PaginationComponent<Vehicle> ...@@ -248,13 +248,28 @@ export default class DetectionInspectorPage extends PaginationComponent<Vehicle>
} }
DetectionController.inspectExport(this.axios, paramsData, { responseType: 'blob' }).then(response => { DetectionController.inspectExport(this.axios, paramsData, { responseType: 'blob' }).then(response => {
message.success('导出任务已创建,请稍后在浏览器下载列表中查看'); message.success('导出任务已创建,请稍后在浏览器下载列表中查看');
ExportUtil.downloadExcelFile(response.data, '检测师列表'); ExportUtil.downloadExcelFile(response.data, '检测师列表' + this.getNewTime());
}).catch(error => { }).catch(error => {
console.error('Error downloading Word file:', error); console.error('Error downloading Word file:', error);
}).finally(() => { }).finally(() => {
this.exporting = false; this.exporting = false;
}); });
} }
getNewTime() {
//获取当前年月日时分秒
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1;
const monthStr = month < 10 ? '0' + month : month;
const day = date.getDate();
const dayStr = day < 10 ? '0' + day : day;
const hour = date.getHours();
const minute = date.getMinutes();
const minuteStr = minute < 10 ? '0' + minute : minute;
return `${year}-${monthStr}-${dayStr}-${hour}-${minuteStr}`
}
} }
</script> </script>
......
...@@ -43,12 +43,14 @@ ...@@ -43,12 +43,14 @@
</template> </template>
<template v-if="column.key === 'custodianName'"> <template v-if="column.key === 'custodianName'">
<div class="templateName" :title="record.vehicle?.custodianInfo?.custodianName || '-'" >{{ record.vehicle?.custodianInfo?.custodianName || '-' }}</div> <div class="templateName" :title="record.vehicle?.custodianInfo?.custodianName || '-'">{{
record.vehicle?.custodianInfo?.custodianName || '-' }}</div>
<div class="templatePhone">{{ record.vehicle?.custodianInfo?.custodianPhone || '-' }}</div> <div class="templatePhone">{{ record.vehicle?.custodianInfo?.custodianPhone || '-' }}</div>
</template> </template>
<template v-if="column.key === 'name'"> <template v-if="column.key === 'name'">
<div class="templateName" :title="record.inspector?.name || '-'" >{{ record.inspector?.name || '-' }}</div> <div class="templateName" :title="record.inspector?.name || '-'">{{ record.inspector?.name || '-' }}
</div>
<div class="templatePhone">{{ record.inspector?.phone || '-' }}</div> <div class="templatePhone">{{ record.inspector?.phone || '-' }}</div>
</template> </template>
...@@ -288,13 +290,28 @@ export default class DetectionOrderPage extends PaginationComponent<Vehicle> { ...@@ -288,13 +290,28 @@ export default class DetectionOrderPage extends PaginationComponent<Vehicle> {
} }
DetectionController.inspectOrderExport(this.axios, paramsData, { responseType: 'blob' }).then(response => { DetectionController.inspectOrderExport(this.axios, paramsData, { responseType: 'blob' }).then(response => {
message.success('导出任务已创建,请在下载中心查看'); message.success('导出任务已创建,请在下载中心查看');
ExportUtil.downloadExcelFile(response.data, '检测订单管理列表'); ExportUtil.downloadExcelFile(response.data, '检测订单管理列表' + this.getNewTime());
}).catch(error => { }).catch(error => {
console.error('Error downloading Word file:', error); console.error('Error downloading Word file:', error);
}).finally(() => { }).finally(() => {
this.exporting = false; this.exporting = false;
}); });
} }
getNewTime() {
//获取当前年月日时分秒
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1;
const monthStr = month < 10 ? '0' + month : month;
const day = date.getDate();
const dayStr = day < 10 ? '0' + day : day;
const hour = date.getHours();
const minute = date.getMinutes();
const minuteStr = minute < 10 ? '0' + minute : minute;
return `${year}-${monthStr}-${dayStr}-${hour}-${minuteStr}`
}
} }
</script> </script>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<a-descriptions-item label="车源号">{{ vehicleData.sourceNo || '-' }}</a-descriptions-item> <a-descriptions-item label="车源号">{{ vehicleData.sourceNo || '-' }}</a-descriptions-item>
<a-descriptions-item label="VIN码">{{ vehicleData.vin || '-' }}</a-descriptions-item> <a-descriptions-item label="VIN码">{{ vehicleData.vin || '-' }}</a-descriptions-item>
<a-descriptions-item label="车牌号">{{ vehicleData.licensePlate || '-' <a-descriptions-item label="车牌号">{{ vehicleData.licensePlate || '-'
}}</a-descriptions-item> }}</a-descriptions-item>
</a-descriptions> </a-descriptions>
</div> </div>
</a-form-item> </a-form-item>
...@@ -177,7 +177,14 @@ export default class OrderAddForm extends EnhanceFormComponent<User> { ...@@ -177,7 +177,14 @@ export default class OrderAddForm extends EnhanceFormComponent<User> {
//检测人员获取 //检测人员获取
getInspectPageList() { getInspectPageList() {
DetectionController.inspectPage(this.axios, {}).then(response => { const params = {
"offset": 0,
"limit": 1000,
"filters": [{ "field": "status", "operator": "eq", "value": "1", "logic": "and" }],
"sort": "createTime",
"order": "desc"
}
DetectionController.inspectPage(this.axios, params).then(response => {
this.inspectPageList = response?.data?.content || []; this.inspectPageList = response?.data?.content || [];
}) })
} }
......
...@@ -220,20 +220,33 @@ export default class DetectionReportPage extends PaginationComponent<Vehicle> { ...@@ -220,20 +220,33 @@ export default class DetectionReportPage extends PaginationComponent<Vehicle> {
this.exporting = true; this.exporting = true;
DetectionController.inspectReportExport(this.axios, this.pagination.requestParams, { responseType: 'blob' }).then(response => { DetectionController.inspectReportExport(this.axios, this.pagination.requestParams, { responseType: 'blob' }).then(response => {
message.success('导出任务已创建,请稍后在浏览器下载列表中查看'); message.success('导出任务已创建,请稍后在浏览器下载列表中查看');
ExportUtil.downloadExcelFile(response.data, '检测报告管理列表'); ExportUtil.downloadExcelFile(response.data, '检测报告管理列表' + this.getNewTime());
}).catch(error => { }).catch(error => {
console.error('Error downloading Word file:', error); console.error('Error downloading Word file:', error);
}).finally(() => { }).finally(() => {
this.exporting = false; this.exporting = false;
}); });
} }
getNewTime() {
//获取当前年月日时分秒
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1;
const monthStr = month < 10 ? '0' + month : month;
const day = date.getDate();
const dayStr = day < 10 ? '0' + day : day;
const hour = date.getHours();
const minute = date.getMinutes();
const minuteStr = minute < 10 ? '0' + minute : minute;
return `${year}-${monthStr}-${dayStr}-${hour}-${minuteStr}`
}
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.carTypeNameBox { .carTypeNameBox {
width: 100%; width: 100%;
display: flex; display: flex;
......
...@@ -252,22 +252,26 @@ export default class PreferencePage extends PaginationComponent<Deposit> { ...@@ -252,22 +252,26 @@ export default class PreferencePage extends PaginationComponent<Deposit> {
} }
PreferenceController.exportPreference(this.axios, paramsData, { responseType: 'blob' }).then(response => { PreferenceController.exportPreference(this.axios, paramsData, { responseType: 'blob' }).then(response => {
message.success('导出任务已创建,请在下载中心查看'); message.success('导出任务已创建,请在下载中心查看');
//获取当前年月日时分秒 ExportUtil.downloadExcelFile(response.data, '收车偏好列表' + this.getNewTime());
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1;
const monthStr = month < 10 ? '0' + month : month;
const day = date.getDate();
const dayStr = day < 10 ? '0' + day : day;
const hour = date.getHours();
const minute = date.getMinutes();
const minuteStr = minute < 10 ? '0' + minute : minute;
ExportUtil.downloadExcelFile(response.data, '收车偏好列表' + year + monthStr + dayStr + hour + minuteStr);
}).catch(error => { }).catch(error => {
console.error('Error downloading Word file:', error); console.error('Error downloading Word file:', error);
}).finally(() => { }).finally(() => {
this.exporting = false; this.exporting = false;
}); });
}
getNewTime() {
//获取当前年月日时分秒
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1;
const monthStr = month < 10 ? '0' + month : month;
const day = date.getDate();
const dayStr = day < 10 ? '0' + day : day;
const hour = date.getHours();
const minute = date.getMinutes();
const minuteStr = minute < 10 ? '0' + minute : minute;
return `${year}-${monthStr}-${dayStr}-${hour}-${minuteStr}`
} }
onSelectChange(selectedRowKeys: number[], selectedRows: []): void { onSelectChange(selectedRowKeys: number[], selectedRows: []): void {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!