1、车船模块fix bug

2、运力模块fix bug
3、新增设备台账
4、其他bug 修复
5、调整组织、人员模块
This commit is contained in:
2026-08-07 08:28:21 +08:00
parent 1e4de76978
commit 6a02e9126b
37 changed files with 2593 additions and 645 deletions

View File

@@ -90,6 +90,26 @@
placeholder="请输入船长"
/>
</template>
<template #fineAmountForm>
<el-input
v-model="form.fineAmount"
:disabled="boxType === 'view'"
inputmode="decimal"
placeholder="请输入"
@input="value => normalizeDecimalInput('fineAmount', value)"
>
<template #append></template>
</el-input>
</template>
<template #deductPointsForm>
<el-input
v-model="form.deductPoints"
:disabled="boxType === 'view'"
inputmode="numeric"
placeholder="请输入"
@input="value => normalizeIntegerInput('deductPoints', value)"
/>
</template>
<template #processStatus="{ row }">
<span :class="row.processStatus === '未处理' ? 'violation-record-page__danger' : ''">
{{ row.processStatus }}
@@ -141,6 +161,7 @@ import { getList as getVehicleList } from '@/api/transportCapacity/transport-veh
import { getList as getShipList } from '@/api/transportCapacity/transport-ship';
import { getList as getDriverList } from '@/api/transportCapacity/driver';
import { getDeptTree } from '@/api/system/dept';
import { getDictionary } from '@/api/system/dictbiz';
import { exportBlob } from '@/api/common';
import { downloadXls } from '@/utils/util';
import { openImportDialog } from '@/utils/import-excel';
@@ -179,6 +200,7 @@ export default {
},
created() {
this.initDeptTree();
this.initViolationTypeOptions();
},
computed: {
...mapGetters(['permission', 'userInfo']),
@@ -229,6 +251,15 @@ export default {
column.dicData = res.data.data;
});
},
initViolationTypeOptions() {
getDictionary({ code: 'type_of_traffic_violation' }).then(res => {
const column = this.findColumn(this.option.column, 'violationType');
column.dicData = (res.data.data || []).map(item => ({
label: item.dictValue,
value: item.dictValue,
}));
});
},
updateVehicleTypeDisplays(vehicleType, oldValue) {
const vehicleTypeColumn = this.findColumn(this.option.column, 'vehicleType');
const vehicleNoColumn = this.findColumn(this.option.column, 'vehicleNo');
@@ -240,6 +271,17 @@ export default {
driverColumn.label = vehicleType === '船舶' ? '船长' : '驾驶人';
typeColumn.display = vehicleType !== '船舶';
itemColumn.display = vehicleType === '船舶';
typeColumn.rules =
vehicleType === '船舶'
? []
: [{ required: true, message: '请选择类型', trigger: 'change' }];
itemColumn.rules =
vehicleType === '船舶'
? [
{ required: true, message: '请输入事项', trigger: 'blur' },
{ max: 100, message: '最多 100 个字符', trigger: 'blur' },
]
: [{ max: 100, message: '最多 100 个字符', trigger: 'blur' }];
vehicleTypeColumn.disabled = Boolean(this.form.id);
if (!this.isDetailLoading && oldValue && vehicleType !== oldValue) {
this.form.vehicleNo = '';
@@ -315,6 +357,16 @@ export default {
if (!value || typeof value === 'string') return value;
return JSON.stringify(value);
},
normalizeDecimalInput(prop, value) {
const sanitized = String(value ?? '').replace(/[^\d.]/g, '');
const [integerPart, ...decimalParts] = sanitized.split('.');
this.form[prop] = decimalParts.length
? `${integerPart || '0'}.${decimalParts.join('').slice(0, 2)}`
: integerPart;
},
normalizeIntegerInput(prop, value) {
this.form[prop] = String(value ?? '').replace(/\D/g, '');
},
normalizeRow(row) {
const values = { ...row };
values.vehicleType = values.vehicleType || '车辆';
@@ -337,6 +389,14 @@ export default {
return values;
},
validateRow(row) {
if (row.vehicleType === '船舶' && !row.violationItem) {
this.$message.warning('请输入事项');
return false;
}
if (row.vehicleType !== '船舶' && !row.violationType) {
this.$message.warning('请选择类型');
return false;
}
if (
row.violationTime &&
new Date(row.violationTime.replace(/-/g, '/')).getTime() > Date.now()