This commit is contained in:
2026-08-26 23:18:14 +08:00
parent 9d512ebad4
commit b36aefc7c4
43 changed files with 991 additions and 383 deletions
+6 -14
View File
@@ -96,22 +96,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<empty-pagination
@@ -142,6 +130,7 @@ import { downloadXls } from '@/utils/util';
import { openImportDialog } from '@/utils/import-excel';
import { getToken } from '@/utils/auth';
import { normalizeSearchRangeParams } from '@/utils/search-range';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import { excelOption, option } from '@/option/vehicle/accident-record';
import NProgress from 'nprogress';
@@ -152,6 +141,9 @@ const createTimeRangeMap = {
};
export default {
components: {
VehicleAttachmentTable,
},
data() {
return {
form: {},
+6 -14
View File
@@ -83,22 +83,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<empty-pagination
@@ -128,12 +116,16 @@ import { exportBlob } from '@/api/common';
import { downloadXls } from '@/utils/util';
import { openImportDialog } from '@/utils/import-excel';
import { getToken } from '@/utils/auth';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import { excelOption, option } from '@/option/vehicle/annual-inspection-record';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
components: {
VehicleAttachmentTable,
},
data() {
return {
form: {},
@@ -146,9 +146,11 @@
<el-table-column label="序号" type="index" width="90" align="center" />
<el-table-column label="信用等级" prop="creditLevel" width="120" align="center" />
<el-table-column label="标准说明" prop="standardDescription" min-width="320" />
<el-table-column v-if="!readonly" label="操作" width="160" align="center">
<el-table-column label="操作" width="160" align="center">
<template #default="{ row, $index }">
<el-link type="primary" @click="openStandard(row, $index)">编辑</el-link>
<el-link type="primary" @click="openStandard(row, $index)">
{{ readonly ? '查看' : '编辑' }}
</el-link>
<el-link type="danger" v-if="!readonly" @click="removeStandard($index)"
>删除</el-link
>
@@ -450,7 +452,7 @@
</el-form>
</section-card>
<template #footer>
<el-button @click="standardBox = false">取消</el-button>
<el-button @click="standardBox = false">{{ readonly ? '关闭' : '取消' }}</el-button>
<el-button type="primary" v-if="!readonly" @click="saveStandard">保存</el-button>
</template>
</el-dialog>
+11
View File
@@ -4160,11 +4160,13 @@ export default {
)}分`
);
this.calculateScore(this.currentScore);
if (prop === 'reviewScore') this.logReviewScoreSummary();
return;
}
}
detail[prop] = normalized;
this.calculateScore(this.currentScore);
if (prop === 'reviewScore') this.logReviewScoreSummary();
},
handleScoreDecimalInput(prop, value) {
const normalized = String(value || '')
@@ -4217,6 +4219,15 @@ export default {
return sum + this.getScoreItemFullScore(item);
}, 0);
},
logReviewScoreSummary() {
const details = this.currentScore.details || [];
console.log('[评分详情] 复评评分结果', {
复评总分: this.currentScore.reviewScore,
总分: this.getScoreFullMark(details),
得分率: `${this.currentScore.scoreRate}%`,
匹配到的信用等级: this.currentScore.creditLevel || '',
});
},
matchCreditStandard(score, scoreRate) {
const standards = (score.standards || [])
.filter(item => item && item.creditLevel)
+6 -2
View File
@@ -85,10 +85,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload v-model="form.attachments" :readonly="boxType === 'view'" />
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload v-model="form.attachments" :readonly="boxType === 'view'" />
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<el-dialog title="ETC记录数据导入" append-to-body v-model="excelBox" width="555px">
@@ -111,12 +111,16 @@ import { exportBlob } from '@/api/common';
import { downloadXls } from '@/utils/util';
import { openImportDialog } from '@/utils/import-excel';
import { getToken } from '@/utils/auth';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import { excelOption, option } from '@/option/vehicle/etc-record';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
components: {
VehicleAttachmentTable,
},
data() {
return {
form: {},
+5 -14
View File
@@ -122,22 +122,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<el-dialog title="保养记录数据导入" append-to-body v-model="excelBox" width="555px">
@@ -169,6 +157,7 @@ import { formatUpdateUserName } from '@/utils/audit';
import { getToken } from '@/utils/auth';
import { normalizeSearchRangeParams } from '@/utils/search-range';
import AddressMapPicker from '@/components/address-map-picker/main.vue';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
@@ -180,6 +169,7 @@ const createTimeRangeMap = {
export default {
components: {
AddressMapPicker,
VehicleAttachmentTable,
},
data() {
const validateNonNegative = (rule, value, callback) => {
@@ -377,6 +367,7 @@ export default {
{
label: '附件',
prop: 'attachments',
hide: true,
span: 24,
minWidth: 100,
slot: true,
+13 -15
View File
@@ -106,22 +106,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<el-dialog title="维修记录数据导入" append-to-body v-model="excelBox" width="555px">
@@ -153,6 +141,7 @@ import { formatUpdateUserName } from '@/utils/audit';
import { getToken } from '@/utils/auth';
import { normalizeSearchRangeParams } from '@/utils/search-range';
import AddressMapPicker from '@/components/address-map-picker/main.vue';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
@@ -164,6 +153,7 @@ const createTimeRangeMap = {
export default {
components: {
AddressMapPicker,
VehicleAttachmentTable,
},
data() {
const validateNonNegative = (rule, value, callback) => {
@@ -362,6 +352,7 @@ export default {
{
label: '附件',
prop: 'attachments',
hide: true,
span: 24,
minWidth: 100,
slot: true,
@@ -542,9 +533,14 @@ export default {
.catch(() => callback([]));
},
formatMileage(value, unit) {
if (value === undefined || value === null || value === '') return '';
if (this.normalizeMileageValue(value) === null) return '';
return `${Math.max(Number(value), 0)} ${unit || '公里'}`;
},
normalizeMileageValue(value) {
if (value === undefined || value === null || value === '' || Number(value) === -1)
return null;
return value;
},
formatAttachments(value) {
if (!value) return '';
if (Array.isArray(value)) return `${value.length}`;
@@ -595,6 +591,7 @@ export default {
const values = { ...row };
values.vehicleType = values.vehicleType || '车辆';
values.mileageUnit = values.vehicleType === '船舶' ? '海里' : '公里';
values.mileage = this.normalizeMileageValue(values.mileage);
if (values.vehicleNo) {
values.vehicleNo =
values.vehicleType === '船舶'
@@ -676,6 +673,7 @@ export default {
detail.attachments = this.parseAttachments(detail.attachments);
detail.vehicleType = detail.vehicleType || '车辆';
detail.mileageUnit = detail.vehicleType === '船舶' ? '海里' : '公里';
detail.mileage = this.normalizeMileageValue(detail.mileage);
this.form = detail;
this.updateVehicleType(detail.vehicleType);
})
+6 -2
View File
@@ -149,10 +149,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload v-model="form.attachments" :readonly="boxType === 'view'" />
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload v-model="form.attachments" :readonly="boxType === 'view'" />
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<empty-pagination
@@ -183,6 +183,7 @@ import { downloadXls } from '@/utils/util';
import { openImportDialog } from '@/utils/import-excel';
import { getToken } from '@/utils/auth';
import { normalizeSearchRangeParams } from '@/utils/search-range';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import { excelOption, option } from '@/option/vehicle/mileage-record';
import NProgress from 'nprogress';
@@ -193,6 +194,9 @@ const createTimeRangeMap = {
};
export default {
components: {
VehicleAttachmentTable,
},
data() {
return {
form: {},
+6 -2
View File
@@ -116,10 +116,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload v-model="form.attachments" :readonly="boxType === 'view'" />
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload v-model="form.attachments" :readonly="boxType === 'view'" />
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<el-dialog title="油电记录数据导入" append-to-body v-model="excelBox" width="555px">
@@ -143,12 +143,16 @@ import { exportBlob } from '@/api/common';
import { downloadXls } from '@/utils/util';
import { openImportDialog } from '@/utils/import-excel';
import { getToken } from '@/utils/auth';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import { excelOption, option } from '@/option/vehicle/oil-electric-record';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
components: {
VehicleAttachmentTable,
},
data() {
return {
form: {},
+6 -2
View File
@@ -85,10 +85,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload v-model="form.attachments" :readonly="boxType === 'view'" />
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload v-model="form.attachments" :readonly="boxType === 'view'" />
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<el-dialog title="其他费用记录数据导入" append-to-body v-model="excelBox" width="555px">
@@ -112,12 +112,16 @@ import { exportBlob } from '@/api/common';
import { downloadXls } from '@/utils/util';
import { openImportDialog } from '@/utils/import-excel';
import { getToken } from '@/utils/auth';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import { excelOption, option } from '@/option/vehicle/other-expense-record';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
components: {
VehicleAttachmentTable,
},
data() {
return {
form: {},
+6 -14
View File
@@ -94,22 +94,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<empty-pagination
@@ -139,6 +127,7 @@ import { downloadXls } from '@/utils/util';
import { openImportDialog } from '@/utils/import-excel';
import { getToken } from '@/utils/auth';
import { normalizeSearchRangeParams } from '@/utils/search-range';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import { excelOption, option } from '@/option/vehicle/tire-replacement-record';
import NProgress from 'nprogress';
@@ -149,6 +138,9 @@ const createTimeRangeMap = {
};
export default {
components: {
VehicleAttachmentTable,
},
data() {
return {
form: {},
@@ -74,10 +74,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload v-model="form.attachments" :readonly="boxType === 'view'" />
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload v-model="form.attachments" :readonly="boxType === 'view'" />
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<el-dialog title="变更记录数据导入" append-to-body v-model="excelBox" width="555px">
@@ -102,6 +102,7 @@ import { downloadXls } from '@/utils/util';
import { openImportDialog } from '@/utils/import-excel';
import { getToken } from '@/utils/auth';
import { normalizeSearchRangeParams } from '@/utils/search-range';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import { excelOption, option } from '@/option/vehicle/transport-change-record';
import NProgress from 'nprogress';
@@ -112,6 +113,9 @@ const createTimeRangeMap = {
};
export default {
components: {
VehicleAttachmentTable,
},
data() {
return {
form: {},
+5 -14
View File
@@ -128,22 +128,10 @@
<span>{{ formatAttachments(row.attachments) }}</span>
</template>
<template #attachmentsForm>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
<template #attachments-form>
<vehicle-attachment-upload
v-model="form.attachments"
:readonly="boxType === 'view'"
button-text="新增"
button-icon="el-icon-plus"
:show-tip="false"
/>
<vehicle-attachment-table v-model="form.attachments" :readonly="boxType === 'view'" />
</template>
</avue-crud>
<empty-pagination
@@ -182,6 +170,7 @@ import { openImportDialog } from '@/utils/import-excel';
import { getToken } from '@/utils/auth';
import { normalizeSearchRangeParams } from '@/utils/search-range';
import AddressMapPicker from '@/components/address-map-picker/main.vue';
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
import { mapGetters } from 'vuex';
import { excelOption, option } from '@/option/vehicle/violation-record';
import NProgress from 'nprogress';
@@ -194,6 +183,7 @@ const createTimeRangeMap = {
export default {
components: {
AddressMapPicker,
VehicleAttachmentTable,
},
data() {
return {
@@ -519,6 +509,7 @@ export default {
this.form = {
vehicleType: '车辆',
processStatus: '未处理',
attachments: [],
};
this.updateVehicleTypeDisplays('车辆');
this.updateProcessResultDisplay('未处理');