优化
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import '@/styles/adminWorkbench.css'
|
||||
import '@/styles/adminDensity.css'
|
||||
import { computed, onMounted, reactive, ref, watch } from 'vue'
|
||||
import { ElMessage, ElMessageBox, type FormInstance, type FormRules } from 'element-plus'
|
||||
@@ -410,7 +411,7 @@ async function toggleStatus(row: PlatformLocationResource) {
|
||||
? `确定停用“${row.locationCode}”吗?停用前后端会再次检查是否存在活动预占或占用。`
|
||||
: `确定重新启用“${row.locationCode}”吗?仅启用仓库中的库位可以恢复可用。`,
|
||||
`${action}库位`,
|
||||
{ customClass: 'admin-density-confirm', type: nextStatus === 'AVAILABLE' ? 'success' : 'warning', confirmButtonText: `确认${action}`, cancelButtonText: '取消' },
|
||||
{ customClass: 'admin-density-confirm admin-workbench', type: nextStatus === 'AVAILABLE' ? 'success' : 'warning', confirmButtonText: `确认${action}`, cancelButtonText: '取消' },
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
@@ -435,7 +436,7 @@ async function removeLocation(row: PlatformLocationResource) {
|
||||
await ElMessageBox.confirm(
|
||||
`确定删除已停用库位“${row.locationCode}”吗?系统会保留审计记录,此操作不能直接恢复。`,
|
||||
'删除库位',
|
||||
{ customClass: 'admin-density-confirm', type: 'warning', confirmButtonText: '确认删除', cancelButtonText: '取消' },
|
||||
{ customClass: 'admin-density-confirm admin-workbench', type: 'warning', confirmButtonText: '确认删除', cancelButtonText: '取消' },
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
@@ -481,12 +482,12 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AdminPage as="div" class="location-page admin-density">
|
||||
<AdminPage as="div" class="location-page admin-density admin-workbench">
|
||||
<ListPageLayout aria-label="库位列表页面">
|
||||
|
||||
|
||||
|
||||
<section aria-label="库位列表区域"><DataTable appearance="integrated" :stripe="false" column-settings-mode="show" :results-visible="!loadError"
|
||||
<section class="workbench-table is-page-surface" aria-label="库位列表区域"><DataTable appearance="integrated" :stripe="false" column-settings-mode="show" :results-visible="!loadError"
|
||||
v-model:page="page"
|
||||
v-model:page-size="pageSize"
|
||||
:data="rows"
|
||||
@@ -601,7 +602,7 @@ onMounted(() => {
|
||||
v-model="editorOpen"
|
||||
:title="editorMode === 'edit' && form.locationCode ? `${editorTitle} · ${form.locationCode}` : editorTitle"
|
||||
width="min(1000px, calc(100vw - 28px))"
|
||||
class="location-editor-dialog admin-density-dialog"
|
||||
class="location-editor-dialog admin-density-dialog admin-workbench is-dialog"
|
||||
:confirm-loading="saving"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="!saving"
|
||||
@@ -680,15 +681,15 @@ onMounted(() => {
|
||||
.state-alert .el-button { margin-top: var(--admin-space-4, 10px); }
|
||||
.location-actions { white-space: nowrap; }
|
||||
.location-cell { display: flex; min-width: 0; align-items: center; gap: var(--admin-space-4, 10px); }
|
||||
.location-cell > span { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border-radius: 7px; background: #eef3fa; color: var(--cc-primary); }
|
||||
.location-cell > span { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border-radius: 7px; background: var(--workbench-surface-soft); color: var(--workbench-primary); }
|
||||
.location-cell > div, .stacked-value { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
|
||||
.location-cell strong, .stacked-value strong { overflow-wrap: anywhere; }
|
||||
.location-cell small, .stacked-value small { color: var(--cc-muted); font-size: var(--admin-font-caption, 12px); }
|
||||
.location-cell small, .stacked-value small { color: var(--workbench-muted); font-size: var(--admin-font-caption, 12px); }
|
||||
.remark-cell { display: -webkit-box; overflow: hidden; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
|
||||
.editor-form { padding: 0; }
|
||||
.editor-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--admin-space-5, 12px); }
|
||||
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--admin-space-3, 8px); }
|
||||
.editor-footer > span { color: var(--cc-muted); font-size: var(--admin-font-caption, 12px); }
|
||||
.editor-footer > span { color: var(--workbench-muted); font-size: var(--admin-font-caption, 12px); }
|
||||
.editor-footer > span i { color: var(--el-color-danger); font-style: normal; }
|
||||
.editor-footer > div { display: flex; gap: var(--admin-space-3, 8px); }
|
||||
.editor-footer :deep(.el-button + .el-button) { margin-left: 0; }
|
||||
|
||||
Reference in New Issue
Block a user