董国庆
2026-06-25 3449c98a4af9ce62f9dc2d9dc45ed5e1a3fa2230
测试运营工作台不显示场站--626合并到2.0
2个文件已修改
54 ■■■■■ 已修改文件
src/views/testDemo/operationWorkbench/list.vue 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/testDemo/operationWorkbench/map.vue 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/testDemo/operationWorkbench/list.vue
@@ -66,7 +66,6 @@
const TABS: Array<{ label: string, value: WorkbenchTab }> = [
  { label: '围栏列表', value: 'fence' },
  { label: '点位列表', value: 'point' },
  { label: '场站列表', value: 'station' },
]
const pointStatusOptions = [
src/views/testDemo/operationWorkbench/map.vue
@@ -905,8 +905,16 @@
const initialEntryContext = getWorkbenchEntryContext()
function isStationHiddenEntry(tab: WorkbenchTab) {
  return tab === 'station'
}
function normalizeVisibleTab(tab: WorkbenchTab) {
  return isStationHiddenEntry(tab) ? 'point' : tab
}
// 页面级筛选与面板展示状态。
const activeTab = ref<WorkbenchTab>(initialEntryContext.tab)
const activeTab = ref<WorkbenchTab>(normalizeVisibleTab(initialEntryContext.tab))
const cityValue = ref<string>(initialEntryContext.cityCode)
const keyword = ref('')
const leftExpanded = ref(true)
@@ -932,10 +940,18 @@
const previewImage = ref('')
const selectShowState = reactive<Record<string, boolean>>({})
const selectedCreateTool = ref<WorkbenchTab | ''>('')
const visibleTabOptions = computed(() =>
  tabOptions.filter(item => item.value !== 'station'),
)
const visibleCreateToolOptions = computed(() =>
  createToolOptions.filter(item => item.value !== 'station'),
)
const selectedCreateToolOption = computed(() => {
  return (
    createToolOptions.find(item => item.value === selectedCreateTool.value)
    visibleCreateToolOptions.value.find(
      item => item.value === selectedCreateTool.value,
    )
    || null
  )
})
@@ -1074,7 +1090,7 @@
  showOperationArea: true,
  showRestrictedArea: true,
  showPoint: true,
  showStation: true,
  showStation: false,
})
const pointDetailData = ref<Entity.Point | null>(null)
const pointEditSnapshot = ref<string>('')
@@ -1228,7 +1244,7 @@
})
const currentTabLabel = computed(
  () => tabOptions.find(item => item.value === activeTab.value)?.label || '',
  () => visibleTabOptions.value.find(item => item.value === activeTab.value)?.label || '',
)
const currentCityLabel = computed(
  () =>
@@ -4889,9 +4905,9 @@
}
async function applyWorkbenchEntryPresentation(tab: WorkbenchTab, id: string) {
  if (!id)
  if (!id || isStationHiddenEntry(tab))
    return
  activeTab.value = tab
  activeTab.value = normalizeVisibleTab(tab)
  if (tab === 'point')
    pointPanelClosed.value = false
  if (tab === 'fence')
@@ -5065,12 +5081,13 @@
    const entryContext = getWorkbenchEntryContext(cityOptions.value)
    const routeQuery = route.query as Record<string, unknown>
    const cityChanged = cityValue.value !== entryContext.cityCode
    if (activeTab.value !== entryContext.tab)
      activeTab.value = entryContext.tab
    const nextVisibleTab = normalizeVisibleTab(entryContext.tab)
    if (activeTab.value !== nextVisibleTab)
      activeTab.value = nextVisibleTab
    if (cityChanged)
      cityValue.value = entryContext.cityCode
    pendingWorkbenchType.value = entryContext.type || ''
    if (entryContext.id) {
    if (entryContext.id && !isStationHiddenEntry(entryContext.tab)) {
      if (workbenchDataReady.value)
        await applyWorkbenchEntryPresentation(entryContext.tab, entryContext.id)
      else if (selectedId.value !== entryContext.id)
@@ -5079,6 +5096,7 @@
    else if (
      !entryContext.id
      && entryContext.type === 'create'
      && !isStationHiddenEntry(entryContext.tab)
      && !cityChanged
    ) {
      handleWorkbenchCreateByTab(entryContext.tab)
@@ -8046,9 +8064,11 @@
  workbenchDataReady.value = false
  await Promise.all([loadPointResources(), loadFenceData(), loadStationData()])
  workbenchDataReady.value = true
  const entryContext = getWorkbenchEntryContext(cityOptions.value)
  if (pendingWorkbenchType.value === 'create') {
    pendingWorkbenchType.value = ''
    await handleWorkbenchCreateByTab(activeTab.value)
    if (!isStationHiddenEntry(entryContext.tab))
      await handleWorkbenchCreateByTab(normalizeVisibleTab(entryContext.tab))
    return
  }
  if (map.value) {
@@ -8056,10 +8076,12 @@
    await nextTick()
    focusSelectedEntity(false)
  }
  const entryContext = getWorkbenchEntryContext(cityOptions.value)
  if (
    !isStationHiddenEntry(entryContext.tab)
    && (
    entryContext.id
    && (entryContext.type === 'detail' || entryContext.type === 'edit')
    )
  ) {
    await applyWorkbenchEntryPresentation(entryContext.tab, entryContext.id)
  }
@@ -8746,7 +8768,7 @@
      <div class="left-panel-tabs">
        <button
          v-for="tab in tabOptions"
          v-for="tab in visibleTabOptions"
          :key="tab.value"
          class="tab-btn"
          :class="{ active: activeTab === tab.value }"
@@ -9081,7 +9103,7 @@
              </n-popover>
              <div v-if="showCreateMenu" class="coverage-detail create-detail">
                <div
                  v-for="option in createToolOptions"
                  v-for="option in visibleCreateToolOptions"
                  :key="option.value"
                  class="create-option"
                  :class="{ active: selectedCreateTool === option.value }"
@@ -9146,11 +9168,6 @@
                <div class="layer-option">
                  <n-checkbox v-model:checked="layerControl.showPoint">
                    点位
                  </n-checkbox>
                </div>
                <div class="layer-option">
                  <n-checkbox v-model:checked="layerControl.showStation">
                    场站
                  </n-checkbox>
                </div>
              </div>