Commit 6a4175ca by yancanhua

fix: 前端测试问题修改

1 parent 27173328
......@@ -87,7 +87,7 @@
</template>
<template v-if="column.key === 'avgInspectCost'">
{{ convertToHourMinuteSecond(record.avgInspectSec || 0) }}
{{ convertToHourMinuteSecond(record.avgInspectCost || 0) }}
</template>
<template v-if="column.key === 'action'">
......
......@@ -5,8 +5,8 @@
<a-form layout="vertical" :model="postData" :label-col="labelCol" :wrapper-col="wrapperCol"
ref="formRef">
<a-form-item name="name" label="姓名"
:rules="[{ required: true, message: '请输入检测室真实姓名' }, { pattern: /^(?:[\u4e00-\u9fa5]{1,10}|[a-zA-Z]{2,20})$/, message: '请输入1-10个中文字符或2-20个英文字符' }]">
<a-input v-model:value="postData.name" placeholder="请输入检测室真实姓名" :maxlength="20"
:rules="[{ required: true, message: '请输入检测师真实姓名' }, { pattern: /^(?:[\u4e00-\u9fa5]{1,10}|[a-zA-Z]{2,20})$/, message: '请输入1-10个中文字符或2-20个英文字符' }]">
<a-input v-model:value="postData.name" placeholder="请输入检测师真实姓名" :maxlength="20"
style="width: 376px;" />
</a-form-item>
<a-form-item name="phone" label="手机号码"
......
......@@ -67,7 +67,7 @@ export default class DetectionOrderPage extends PaginationComponent<Vehicle> {
return (this.getPagination().pageIndex - 1) * this.getPagination().pageSize + index + 1;
},
},
{ title: '工单', dataIndex: 'woId', key: 'woId', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '工单单号', dataIndex: 'woId', key: 'woId', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '车辆名称', dataIndex: ['vehicle', 'baseInfo', "carTypeName"], key: 'carTypeName', align: 'center', width: 240, resizable: true, ellipsis: true },
{ title: '车源号', dataIndex: ['vehicle', 'baseInfo', "sourceNo"], key: 'sourceNo', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '派单时间', dataIndex: 'woTime', key: 'woTime', align: 'center', width: 170, resizable: true, ellipsis: true },
......
......@@ -177,7 +177,7 @@ export default class DetectionOrderPage extends PaginationComponent<Vehicle> {
{ title: '车辆状态', dataIndex: ['vehicle', "vehicleState"], key: 'vehicleState', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '检测师', dataIndex: ['inspector', "name"], key: 'name', align: 'left', width: 170, resizable: true, ellipsis: true },
{ title: '检测地址', dataIndex: 'inspectionAddress', key: 'inspectionAddress', align: 'center', width: 240, resizable: true, ellipsis: true },
{ title: '检测状态', dataIndex: 'status', key: 'status', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '检测单状态', dataIndex: 'status', key: 'status', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '审核状态', dataIndex: 'auditStatus', key: 'auditStatus', width: 170, align: 'center', resizable: true, ellipsis: true },
{ title: '创建时间', dataIndex: 'createTime', key: 'createTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true },
{ title: '完成检测时间', dataIndex: 'inspectionCompletedTime', key: 'inspectionCompletedTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true },
......
......@@ -36,7 +36,7 @@
</a-descriptions-item>
<a-descriptions-item label="创建时间">{{ pageData.createTime || '-' }}</a-descriptions-item>
<a-descriptions-item label="完成检测时间">{{ pageData.inspectionCompletedTime || '-'
}}</a-descriptions-item>
}}</a-descriptions-item>
</a-descriptions>
<a-descriptions :column="2" size="small" layout="vertical">
......@@ -47,7 +47,7 @@
</template>
<a-descriptions-item label="车型名称">
{{ pageData.vehicle?.baseInfo?.carSeriesName }} {{ pageData?.vehicle?.baseInfo?.carTypeName
|| '-' }}
|| '-' }}
</a-descriptions-item>
<a-descriptions-item label="车源号">
{{ pageData?.vehicle?.baseInfo?.sourceNo || '-' }}
......@@ -101,7 +101,6 @@
</a-descriptions-item>
</a-descriptions>
<a-descriptions :column="2" size="small" layout="vertical">
<template #title>
<title-tip-icon></title-tip-icon>
......@@ -136,7 +135,15 @@
<div class="title-line"></div>
</template>
<a-descriptions-item label="">
<div class="linkBox">{{ inspectionReportResp?.h5Url || '-' }}</div>
<div class="linkBox">
{{ inspectionReportResp?.h5Url || '-' }}
<div v-if="inspectionReportResp?.h5Url"
@click="copyCustomText(inspectionReportResp?.h5Url)"
style="color: #1956FE;font-size: 12px; cursor: pointer;float: right;margin-right: 12px;">
<CopyOutlined style="color: #1956FE;font-size: 12px;" />
复制
</div>
</div>
</a-descriptions-item>
</a-descriptions>
</a-card>
......@@ -149,13 +156,14 @@
import { Component, Prop, Vue, Watch } from "vue-facing-decorator";
import { PaginationComponent } from "@/components/PaginationComponent";
import { Vehicle } from "lib/src/entity/vehicle/entity/Vehicle";
import TitleDivider from "@/components/TitleDivider.vue";
import TitleTipIcon from "@/components/icons/TitleTipIcon.vue";
import VehicleStateTag from "@/views/vehicle/inventory/VehicleStateTag.vue";
import { CopyOutlined } from "@ant-design/icons-vue";
import { message } from "ant-design-vue";
@Component({
components: { TitleDivider, TitleTipIcon, VehicleStateTag }
components: { TitleDivider, TitleTipIcon, VehicleStateTag, CopyOutlined }
})
......@@ -166,7 +174,14 @@ export default class DetectionOrderView extends PaginationComponent<Vehicle> {
@Prop({ type: Object, required: true })
inspectionReportResp: any;
async copyCustomText(text) {
try {
await navigator.clipboard.writeText(text);
message.success('复制成功');
} catch (err) {
message.error('复制失败');
}
}
}
</script>
......
......@@ -3,7 +3,17 @@
<!--查询栏-->
<m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm"
@onSearch="handlePageReload" @onReset="handleReset" :simpleFieldNum="4" />
@onSearch="handlePageReload" @onReset="handleReset" :simpleFieldNum="4">
<template #keyword="{ record }">
<a-popover>
<template #content>
<p>搜索报告编号、工单号、车源号、VIN码、车牌</p>
</template>
<a-input v-model:value="pagination.queryForm.keyword" placeholder="搜索报告编号、工单号、车源号、VIN码、车牌" />
</a-popover>
</template>
</m-pagination-query-render>
<!--查询栏end-->
<!--库存车辆列表start-->
......@@ -31,12 +41,15 @@
<template v-if="column.key === 'carTypeName'">
<div class="carTypeNameBox">
<div class="carTypeNameBox_image">
<a-image v-if="record.vehicle?.cover?.url" :width="60"
style="border-radius: 4px;" :src="record.vehicle?.cover?.url" />
<a-image v-if="record.vehicle?.cover?.url" :width="60" style="border-radius: 4px;"
:src="record.vehicle?.cover?.url" />
</div>
<div class="carTypeNameBox_text">
<div class="carTypeNameBox_name" :title="record.vehicle?.baseInfo?.carSeriesName + record.vehicle?.baseInfo?.carTypeName || '-'">
{{ record.vehicle?.baseInfo?.carSeriesName}} {{ record.vehicle?.baseInfo?.carTypeName || '-' }}
<div class="carTypeNameBox_name"
:title="record.vehicle?.baseInfo?.carSeriesName + record.vehicle?.baseInfo?.carTypeName || '-'">
{{ record.vehicle?.baseInfo?.carSeriesName }} {{ record.vehicle?.baseInfo?.carTypeName
||
'-' }}
</div>
<div class="carTypeNameBox_vin" :title="record.vehicle?.baseInfo?.vin || '-'">VIN码:{{
record.vehicle?.baseInfo?.vin || '-' }}</div>
......@@ -59,13 +72,15 @@
</template>
<template v-if="column.key === 'woId'">
<router-link :to="{ path: '/detection/order/view', query: { id: record.id, page: 'report', action: 'VIEW' } }">
<router-link
:to="{ path: '/detection/order/view', query: { id: record.id, page: 'report', action: 'VIEW' } }">
<a-button type="link" size="small">{{ record.woId }}</a-button>
</router-link>
</template>
<template v-if="column.key === 'action'">
<router-link :to="{ path: '/detection/order/view', query: { id: record.id, page: 'report', action: 'VIEW' } }">
<router-link
:to="{ path: '/detection/order/view', query: { id: record.id, page: 'report', action: 'VIEW' } }">
<a-button type="link" size="small">预览</a-button>
</router-link>
<a-button type="link" @click="handleBind(record, 2)" v-if="record.bindStatus == 1"
......@@ -159,7 +174,9 @@ export default class DetectionReportPage extends PaginationComponent<Vehicle> {
this.init(this.axios, DetectionController.PAGE_INSPECTOR_REPORT);
this.buildQueryForm({
keyword: [null, { label: '关键字', field: 'keyword', placeholder: '搜索报告编号、工单号、车源号、VIN码、车牌', operator: Operator.like }],
keyword: [null, {
name: 'keyword', label: '关键字', field: 'keyword', type: 'slot', placeholder: '搜索报告编号、工单号、车源号、VIN码、车牌', operator: Operator.eq
}],
bindStatus: [null, {
label: '绑定状态', field: 'bindStatus', type: 'select', allowClear: true, optionItems: this.bindStatusList, operator: Operator.eq
}],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!