|
|
@@ -96,9 +96,7 @@
|
|
|
<div v-if="conflictRows.length" class="paste-conflict-block">
|
|
|
<h4 class="paste-conflict-title">冲突处理</h4>
|
|
|
<div v-for="row in conflictRows" :key="row.key" class="paste-conflict-row">
|
|
|
- <div class="paste-conflict-label">
|
|
|
- {{ row.label }}已存在:{{ row.existingLabel }}
|
|
|
- </div>
|
|
|
+ <div class="paste-conflict-label"> {{ row.label }}已存在:{{ row.existingLabel }} </div>
|
|
|
<el-radio-group v-model="row.action">
|
|
|
<el-radio value="reuse">复用</el-radio>
|
|
|
<el-radio value="overwrite">覆盖更新</el-radio>
|
|
|
@@ -122,7 +120,12 @@
|
|
|
<el-button @click="handleCancel">
|
|
|
<el-icon><Close /></el-icon>取消
|
|
|
</el-button>
|
|
|
- <el-button type="primary" :loading="submitLoading" :disabled="!parsed" @click="handleSubmit">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :loading="submitLoading"
|
|
|
+ :disabled="!parsed"
|
|
|
+ @click="handleSubmit"
|
|
|
+ >
|
|
|
<el-icon><Check /></el-icon>确认生成
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -139,7 +142,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
- import { ElDialog } from 'element-plus'
|
|
|
+ import { ElDialog, ElMessage } from 'element-plus'
|
|
|
import { Check, Close, MagicStick } from '@element-plus/icons-vue'
|
|
|
import {
|
|
|
pasteRecognizeApi,
|
|
|
@@ -297,7 +300,7 @@
|
|
|
})
|
|
|
const page = pickBxPageResult<{ id: string; licensePlate: string }>(res)
|
|
|
const hit = (page.list || []).find(
|
|
|
- v => (v.licensePlate || '').trim() === vehicleForm.licensePlate.trim()
|
|
|
+ (v) => (v.licensePlate || '').trim() === vehicleForm.licensePlate.trim()
|
|
|
)
|
|
|
if (hit) {
|
|
|
rows.push({
|
|
|
@@ -310,7 +313,11 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- async function findPersonnelByIdCard(idCardNo: string, key: 'driver' | 'escort', label: string) {
|
|
|
+ async function findPersonnelByIdCard(
|
|
|
+ idCardNo: string,
|
|
|
+ key: 'driver' | 'escort',
|
|
|
+ label: string
|
|
|
+ ) {
|
|
|
const card = idCardNo.trim()
|
|
|
if (!card) return
|
|
|
const res = await personnelApi.list({
|
|
|
@@ -321,7 +328,7 @@
|
|
|
})
|
|
|
const page = pickBxPageResult<{ id: string; personnelName: string; idCardNo?: string }>(res)
|
|
|
const hit = (page.list || []).find(
|
|
|
- p => (p.idCardNo || '').trim().toUpperCase() === card.toUpperCase()
|
|
|
+ (p) => (p.idCardNo || '').trim().toUpperCase() === card.toUpperCase()
|
|
|
)
|
|
|
if (hit) {
|
|
|
rows.push({
|
|
|
@@ -364,18 +371,18 @@
|
|
|
if (!conflictRows.value.length) {
|
|
|
await detectConflicts()
|
|
|
}
|
|
|
- if (conflictRows.value.some(r => r.action === 'cancel')) {
|
|
|
+ if (conflictRows.value.some((r) => r.action === 'cancel')) {
|
|
|
ElMessage.info('已取消本次生成')
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- const conflicts: PasteConflictItem[] = conflictRows.value.map(r => ({
|
|
|
+ const conflicts: PasteConflictItem[] = conflictRows.value.map((r) => ({
|
|
|
key: r.key,
|
|
|
existingId: r.existingId,
|
|
|
action: r.action
|
|
|
}))
|
|
|
|
|
|
- const carrier = carrierOptions.value.find(c => c.id === carrierId.value)
|
|
|
+ const carrier = carrierOptions.value.find((c) => c.id === carrierId.value)
|
|
|
const needVehicle = showVehicleFields.value
|
|
|
|
|
|
const res = await pasteRecognizeApi.commit({
|
|
|
@@ -447,7 +454,7 @@
|
|
|
|
|
|
watch(
|
|
|
() => props.visible,
|
|
|
- async v => {
|
|
|
+ async (v) => {
|
|
|
if (v) {
|
|
|
rawText.value = PL_PASTE_SAMPLE_TEXT
|
|
|
await ensureCarriers()
|