This commit is contained in:
zlwu committed 2026-05-26 19:04:27 +08:00
1 parent 4a00f21bfb
commit edf88dc016
1503 files changed
+329728 -41987

No files matched your search

@@ -22,8 +22,12 @@
<div class="filter-actions-row">
<span class="filter-hint">按编号、名称模糊查询。</span>
<div class="filter-actions-end">
<el-button class="btn-ghost" @click="handleReset"><el-icon><RefreshLeft /></el-icon>重置</el-button>
<el-button class="btn-main" type="primary" @click="handleSearch"><el-icon><Search /></el-icon>搜索</el-button>
<el-button class="btn-ghost" @click="handleReset"
><el-icon><RefreshLeft /></el-icon>重置</el-button
>
<el-button class="btn-main" type="primary" @click="handleSearch"
><el-icon><Search /></el-icon>搜索</el-button
>
</div>
</div>
</el-form>
@@ -68,11 +72,27 @@
header-align="center"
:index="(index) => (pagination.page - 1) * pagination.pageSize + index + 1"
/>
<el-table-column prop="roomCode" label="编号" min-width="140" align="center" header-align="center" />
<el-table-column prop="roomName" label="名称" min-width="160" align="center" header-align="center" />
<el-table-column
prop="roomCode"
label="编号"
min-width="140"
align="center"
header-align="center"
/>
<el-table-column
prop="roomName"
label="名称"
min-width="160"
align="center"
header-align="center"
/>
<el-table-column label="等级" min-width="100" align="center" header-align="center">
<template #default="{ row }">
<el-tag class="clean-room-grade-tag" :class="gradeTagClass(row.roomGrade)" effect="light">
<el-tag
class="clean-room-grade-tag"
:class="gradeTagClass(row.roomGrade)"
effect="light"
>
{{ gradeLabel(row.roomGrade) }}
</el-tag>
</template>
@@ -84,8 +104,20 @@
</el-tag>
</template>
</el-table-column>
<el-table-column prop="areaSqm" label="面积(m²)" min-width="120" align="center" header-align="center" />
<el-table-column label="操作" min-width="320" fixed="right" align="center" header-align="center">
<el-table-column
prop="areaSqm"
label="面积(m²)"
min-width="120"
align="center"
header-align="center"
/>
<el-table-column
label="操作"
min-width="320"
fixed="right"
align="center"
header-align="center"
>
<template #default="{ row }">
<el-button class="btn-op-item" @click="handleView(row)"
><el-icon><View /></el-icon>查看</el-button
@@ -223,16 +255,68 @@
header-align="center"
:index="(index) => (logPagination.page - 1) * logPagination.pageSize + index + 1"
/>
<el-table-column prop="personName" label="人员姓名" min-width="100" align="center" header-align="center" />
<el-table-column prop="deptName" label="部门" min-width="100" align="center" header-align="center" />
<el-table-column prop="enterTime" label="进入时间" min-width="160" align="center" header-align="center" />
<el-table-column prop="purpose" label="目的" min-width="120" align="center" header-align="center" show-overflow-tooltip />
<el-table-column prop="leaveTime" label="离开时间" min-width="160" align="center" header-align="center" />
<el-table-column prop="bodyTemp" label="体温(℃)" min-width="90" align="center" header-align="center">
<template #default="{ row }">{{ row.bodyTemp != null ? row.bodyTemp + '℃' : '-' }}</template>
<el-table-column
prop="personName"
label="人员姓名"
min-width="100"
align="center"
header-align="center"
/>
<el-table-column
prop="deptName"
label="部门"
min-width="100"
align="center"
header-align="center"
/>
<el-table-column
prop="enterTime"
label="进入时间"
min-width="160"
align="center"
header-align="center"
/>
<el-table-column
prop="purpose"
label="目的"
min-width="120"
align="center"
header-align="center"
show-overflow-tooltip
/>
<el-table-column
prop="leaveTime"
label="离开时间"
min-width="160"
align="center"
header-align="center"
/>
<el-table-column
prop="bodyTemp"
label="体温(℃)"
min-width="90"
align="center"
header-align="center"
>
<template #default="{ row }">{{
row.bodyTemp != null ? row.bodyTemp + '℃' : '-'
}}</template>
</el-table-column>
<el-table-column prop="remark" label="备注" min-width="160" align="center" header-align="center" show-overflow-tooltip />
<el-table-column label="操作" min-width="260" fixed="right" align="center" header-align="center">
<el-table-column
prop="remark"
label="备注"
min-width="160"
align="center"
header-align="center"
show-overflow-tooltip
/>
<el-table-column
label="操作"
min-width="260"
fixed="right"
align="center"
header-align="center"
>
<template #default="{ row }">
<el-button class="btn-op-item" @click="handleViewLog(row)"
><el-icon><View /></el-icon>查看</el-button
@@ -253,7 +337,13 @@
:total="logPagination.total"
:page-sizes="[10, 20, 50]"
layout="total, sizes, prev, pager, next"
@size-change="(val) => ((logPagination.page = 1), (logPagination.pageSize = val), loadAccessLogData())"
@size-change="
(val) => (
(logPagination.page = 1),
(logPagination.pageSize = val),
loadAccessLogData()
)
"
@current-change="(val) => ((logPagination.page = val), loadAccessLogData())"
/>
</div>
@@ -302,7 +392,10 @@
</el-select>
</el-form-item>
<el-form-item label="部门" prop="deptName">
<el-input v-model="logFormData.deptName" placeholder="选择人员后自动填入,可手填修改" />
<el-input
v-model="logFormData.deptName"
placeholder="选择人员后自动填入,可手填修改"
/>
</el-form-item>
<el-form-item label="进入时间" prop="enterTime">
<el-date-picker
@@ -351,7 +444,12 @@
<el-icon><Close /></el-icon>
取消
</el-button>
<el-button class="btn-main" type="primary" @click="handleLogSubmit" :loading="logSubmitLoading">
<el-button
class="btn-main"
type="primary"
@click="handleLogSubmit"
:loading="logSubmitLoading"
>
<el-icon><Check /></el-icon>
确定
</el-button>
@@ -372,7 +470,18 @@
</template>
<script setup lang="ts">
import { Plus, Close, Check, View, Edit, Delete, User, OfficeBuilding, RefreshLeft, Search } from '@element-plus/icons-vue'
import {
Plus,
Close,
Check,
View,
Edit,
Delete,
User,
OfficeBuilding,
RefreshLeft,
Search
} from '@element-plus/icons-vue'
import { withFullscreenLoading, fullscreenLoadingText } from '@/utils/fullscreen-loading'
import { buildTreePathLabelFromFlat } from '@/utils/tree-path'
import { cleanRoomGradeLabel } from '@/utils/status-tag-registry'
@@ -443,7 +552,11 @@
{ label: '编号', value: row.roomCode },
{ label: '名称', value: row.roomName },
{ label: '等级', value: gradeLabel(row.roomGrade) },
{ label: '状态', value: row.roomStatus === 'zc' ? '正常' : '异常', tagType: row.roomStatus === 'zc' ? 'success' : 'danger' },
{
label: '状态',
value: row.roomStatus === 'zc' ? '正常' : '异常',
tagType: row.roomStatus === 'zc' ? 'success' : 'danger'
},
{ label: '面积', value: row.areaSqm ? `${row.areaSqm} m²` : '' },
{ label: '备注', value: row.remark, span: true }
]
@@ -553,7 +666,9 @@
async function handleBatchDelete() {
const ids = selectedRows.value.map((r) => r.id)
if (!ids.length) return
await ElMessageBox.confirm(`确定删除选中的 ${ids.length} 个洁净室吗?`, '提示', { type: 'warning' })
await ElMessageBox.confirm(`确定删除选中的 ${ids.length} 个洁净室吗?`, '提示', {
type: 'warning'
})
await withFullscreenLoading(async () => {
for (const id of ids) {
await fetchDeleteCleanRoom(id)
@@ -27,9 +27,9 @@
</template>
<script setup lang="ts">
import { reactive } from 'vue'
import { reactive } from 'vue'
const form = reactive({
value: ''
})
const form = reactive({
value: ''
})
</script>
@@ -16,7 +16,11 @@
<el-form :model="searchForm" class="filter-form" @submit.prevent>
<div class="filter-grid">
<el-form-item label="关键词">
<el-input v-model="searchForm.keyword" placeholder="预约编号/来访单位/联系人" clearable />
<el-input
v-model="searchForm.keyword"
placeholder="预约编号/来访单位/联系人"
clearable
/>
</el-form-item>
<el-form-item label="到访日期">
<el-date-picker
@@ -31,10 +35,16 @@
</el-form-item>
</div>
<div class="filter-actions-row">
<span class="filter-hint">按预约编号、来访单位、联系人模糊查询;默认展示未来 30 天内的到访预约。</span>
<span class="filter-hint"
>按预约编号、来访单位、联系人模糊查询;默认展示未来 30 天内的到访预约。</span
>
<div class="filter-actions-end">
<el-button class="btn-ghost" @click="handleReset"><el-icon><RefreshLeft /></el-icon>重置</el-button>
<el-button class="btn-main" type="primary" @click="handleSearch"><el-icon><Search /></el-icon>搜索</el-button>
<el-button class="btn-ghost" @click="handleReset"
><el-icon><RefreshLeft /></el-icon>重置</el-button
>
<el-button class="btn-main" type="primary" @click="handleSearch"
><el-icon><Search /></el-icon>搜索</el-button
>
</div>
</div>
</el-form>
@@ -79,13 +89,55 @@
header-align="center"
:index="(index) => (pagination.page - 1) * pagination.pageSize + index + 1"
/>
<el-table-column prop="appointmentNo" label="预约编号" min-width="150" align="center" header-align="center" />
<el-table-column prop="visitOrg" label="来访单位" min-width="150" align="center" header-align="center" />
<el-table-column prop="contactName" label="联系人" min-width="120" align="center" header-align="center" />
<el-table-column prop="visitDate" label="到访日期" min-width="180" align="center" header-align="center" />
<el-table-column prop="visitorCount" label="人数" min-width="80" align="center" header-align="center" />
<el-table-column prop="createTime" label="创建时间" min-width="180" align="center" header-align="center" />
<el-table-column label="操作" min-width="320" fixed="right" align="center" header-align="center">
<el-table-column
prop="appointmentNo"
label="预约编号"
min-width="150"
align="center"
header-align="center"
/>
<el-table-column
prop="visitOrg"
label="来访单位"
min-width="150"
align="center"
header-align="center"
/>
<el-table-column
prop="contactName"
label="联系人"
min-width="120"
align="center"
header-align="center"
/>
<el-table-column
prop="visitDate"
label="到访日期"
min-width="180"
align="center"
header-align="center"
/>
<el-table-column
prop="visitorCount"
label="人数"
min-width="80"
align="center"
header-align="center"
/>
<el-table-column
prop="createTime"
label="创建时间"
min-width="180"
align="center"
header-align="center"
/>
<el-table-column
label="操作"
min-width="320"
fixed="right"
align="center"
header-align="center"
>
<template #default="{ row }">
<el-button class="btn-op-item" @click="handleView(row)"
><el-icon><View /></el-icon>查看</el-button
@@ -128,7 +180,11 @@
>
<div class="form-grid-2">
<el-form-item label="预约编号">
<el-input v-model="formData.appointmentNo" placeholder="提交后自动生成" :disabled="true" />
<el-input
v-model="formData.appointmentNo"
placeholder="提交后自动生成"
:disabled="true"
/>
</el-form-item>
<el-form-item label="来访单位" prop="visitOrg">
<el-input v-model="formData.visitOrg" placeholder="请输入来访单位" />
@@ -146,7 +202,13 @@
/>
</el-form-item>
<el-form-item label="人数">
<el-input type="number" step="any" v-model="formData.visitorCount" :min="1" style="width: 100%" />
<el-input
type="number"
step="any"
v-model="formData.visitorCount"
:min="1"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="备注" class="form-col-span-2">
<el-input v-model="formData.remark" type="textarea" :rows="3" placeholder="可选" />
@@ -367,7 +429,9 @@
async function handleBatchDelete() {
const ids = selectedRows.value.map((r) => r.id)
if (!ids.length) return
await ElMessageBox.confirm(`确定删除选中的 ${ids.length} 个预约吗?`, '提示', { type: 'warning' })
await ElMessageBox.confirm(`确定删除选中的 ${ids.length} 个预约吗?`, '提示', {
type: 'warning'
})
await withFullscreenLoading(async () => {
for (const id of ids) {
await fetchDeleteExhibitionAppointment(id)
@@ -1,7 +1,14 @@
<!-- 库位管理(左树 + 右货架行布局) -->
<!-- eslint-disable vue/no-v-model-argument -->
<template>
<div class="page-container storage-page" ref="pageContainerRef" :style="pageContainerStyle" v-loading="clearSlotsLoading" element-loading-text="正在清空格子..." element-loading-background="rgba(255,255,255,0.7)">
<div
class="page-container storage-page"
ref="pageContainerRef"
:style="pageContainerStyle"
v-loading="clearSlotsLoading"
element-loading-text="正在清空格子..."
element-loading-background="rgba(255,255,255,0.7)"
>
<header class="page-head">
<h1>库位管理</h1>
<p class="page-desc">维护库位设施树结构(罐→层→盒),以及叶子节点的格子管理。</p>
@@ -38,7 +45,10 @@
>
<template #default="{ data }">
<div class="storage-tree-node">
<span v-if="data.isLeaf === 1 && slotStatsMap[data.id]" class="storage-tree-node__stats">
<span
v-if="data.isLeaf === 1 && slotStatsMap[data.id]"
class="storage-tree-node__stats"
>
{{ slotStatsMap[data.id].occupied }}/{{ slotStatsMap[data.id].total }}
</span>
<span class="storage-tree-node__name">{{ data.nodeName }}</span>
@@ -82,11 +92,17 @@
}}
</h3>
<div class="storage-content-stats">
<span>总数 <strong>{{ slotStats.total }}</strong></span>
<span
>总数 <strong>{{ slotStats.total }}</strong></span
>
<span class="stats-dot">·</span>
<span>空闲 <strong>{{ slotStats.empty }}</strong></span>
<span
>空闲 <strong>{{ slotStats.empty }}</strong></span
>
<span class="stats-dot">·</span>
<span>占用 <strong>{{ slotStats.occupied }}</strong></span>
<span
>占用 <strong>{{ slotStats.occupied }}</strong></span
>
</div>
</div>
</div>
@@ -133,13 +149,24 @@
:class="{ occupied: cell.slotStatus === '占用' }"
@click="handleOpenOccupancyDialog(cell)"
>
<button class="cell-delete-btn" @click.stop="handleDeleteSlot(cell)" title="删除">×</button>
<button
class="cell-delete-btn"
@click.stop="handleDeleteSlot(cell)"
title="删除"
>×</button
>
<span class="cell-code">{{ cellIndex + 1 }}</span>
<span v-if="cell.occupiedCount > 0" class="cell-badge">{{ cell.occupiedCount }}</span>
<span v-if="cell.occupiedCount > 0" class="cell-badge">{{
cell.occupiedCount
}}</span>
</div>
</div>
</div>
<div class="shelf-add-row" title="在下方新增一行" @click="handleOpenAddRowDialog(ri)">
<div
class="shelf-add-row"
title="在下方新增一行"
@click="handleOpenAddRowDialog(ri)"
>
<span class="add-row-icon">+ 新增行</span>
</div>
</div>
@@ -199,7 +226,13 @@
<el-switch v-model="nodeFormData.isLeaf" :active-value="1" :inactive-value="0" />
</el-form-item>
<el-form-item label="排序">
<el-input-number v-model="nodeFormData.orderNum" :min="0" :step="1" controls-position="right" style="width: 100%" />
<el-input-number
v-model="nodeFormData.orderNum"
:min="0"
:step="1"
controls-position="right"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="备注" class="form-col-span-2">
<el-input v-model="nodeFormData.remark" placeholder="可选" />
@@ -291,10 +324,24 @@
>
<div class="form-grid-2">
<el-form-item label="行数">
<el-input type="number" step="any" v-model="batchForm.rows" :min="1" :max="20" style="width: 100%" />
<el-input
type="number"
step="any"
v-model="batchForm.rows"
:min="1"
:max="20"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="列数">
<el-input type="number" step="any" v-model="batchForm.cols" :min="1" :max="20" style="width: 100%" />
<el-input
type="number"
step="any"
v-model="batchForm.cols"
:min="1"
:max="20"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="编码前缀" class="form-col-span-2">
<template #label>
@@ -340,7 +387,13 @@
>
<el-form :model="addRowForm" label-position="top" class="storage-dialog-form">
<el-form-item label="列数">
<el-input type="number" step="any" v-model="addRowForm.cols" :min="1" style="width: 100%" />
<el-input
type="number"
step="any"
v-model="addRowForm.cols"
:min="1"
style="width: 100%"
/>
</el-form-item>
<div class="storage-batch-preview">
将在当前行下方新增 <strong>{{ addRowForm.cols }}</strong> 个格子
@@ -380,7 +433,12 @@
入库
</el-button>
</div>
<el-table :data="occupancyList" v-loading="occupancyLoading" size="small" max-height="360">
<el-table
:data="occupancyList"
v-loading="occupancyLoading"
size="small"
max-height="360"
>
<el-table-column type="index" label="序号" min-width="60" />
<el-table-column label="物品类型" min-width="120">
<template #default="{ row }">
@@ -393,7 +451,11 @@
<el-table-column prop="itemName" label="物品名称" min-width="140" />
<el-table-column label="来源" min-width="120">
<template #default="{ row }">
{{ { production: '生产入库', manual: '手动入库', transfer: '转移' }[row.itemSource] || row.itemSource }}
{{
{ production: '生产入库', manual: '手动入库', transfer: '转移' }[
row.itemSource
] || row.itemSource
}}
</template>
</el-table-column>
<el-table-column prop="storedAt" label="入库时间" min-width="170" />
@@ -431,14 +493,21 @@
<el-table-column prop="itemName" label="物品名称" min-width="120" />
<el-table-column label="来源" min-width="100">
<template #default="{ row }">
{{ { production: '生产入库', manual: '手动入库', transfer: '转移' }[row.itemSource] || row.itemSource }}
{{
{ production: '生产入库', manual: '手动入库', transfer: '转移' }[
row.itemSource
] || row.itemSource
}}
</template>
</el-table-column>
<el-table-column prop="storedAt" label="入库时间" min-width="170" />
<el-table-column prop="removedAt" label="出库时间" min-width="170" />
<el-table-column label="状态" min-width="100">
<template #default="{ row }">
<el-tag :type="row.occupancyStatus === 'stored' ? 'success' : 'warning'" size="small">
<el-tag
:type="row.occupancyStatus === 'stored' ? 'success' : 'warning'"
size="small"
>
{{ row.occupancyStatus === 'stored' ? '在库' : '已出库' }}
</el-tag>
</template>
@@ -482,7 +551,12 @@
</div>
</el-form>
<div class="occupancy-slot-save-bar">
<el-button type="primary" size="small" :loading="occupancySlotSaving" @click="handleOccupancySlotSave">
<el-button
type="primary"
size="small"
:loading="occupancySlotSaving"
@click="handleOccupancySlotSave"
>
保存
</el-button>
</div>
@@ -524,7 +598,9 @@
</el-form>
<template #footer>
<el-button class="btn-ghost" @click="storeDialogVisible = false">取消</el-button>
<el-button type="primary" :loading="storeSubmitLoading" @click="handleStoreSubmit">确认入库</el-button>
<el-button type="primary" :loading="storeSubmitLoading" @click="handleStoreSubmit"
>确认入库</el-button
>
</template>
</el-dialog>
</section>
@@ -702,9 +778,7 @@
})
/** 解析 slotCode "{prefix}{row}-{col}" 格式,提取行号和列号 */
const parseSlotCode = (
code: string
): { prefix: string; row: number; col: number } | null => {
const parseSlotCode = (code: string): { prefix: string; row: number; col: number } | null => {
const match = code.match(/^(.*?)(\d+)-(\d+)$/)
if (!match) return null
return { prefix: match[1], row: parseInt(match[2], 10), col: parseInt(match[3], 10) }