| | |
| | | }) |
| | | } |
| | | |
| | | export function fetchBasStationOptionPage(params = {}, requestOptions = {}) { |
| | | return request.post({ |
| | | url: '/basStation/page/v1', |
| | | params: buildBasStationPageParams(params), |
| | | ...requestOptions |
| | | }) |
| | | } |
| | | |
| | | export function fetchBasStationList() { |
| | | return request.post({ |
| | | url: '/basStation/list', |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import AppConfig from '@/config' |
| | | import { languageOptions } from '@/locales' |
| | | |
| | | import { themeAnimation } from '@/utils/ui/animation' |
| | |
| | | <script setup> |
| | | import { computed } from 'vue' |
| | | import { handleMenuJump } from '@/utils/navigation' |
| | | import { formatMenuTitle } from '@/utils/router' |
| | | const props = defineProps({ |
| | | item: { |
| | | type: Object, |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { handleMenuJump } from '@/utils/navigation' |
| | | |
| | | import { ref, computed, onMounted, nextTick } from 'vue' |
| | | import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue' |
| | | import { useThrottleFn } from '@vueuse/core' |
| | | import { formatMenuTitle } from '@/utils/router' |
| | | import { handleMenuJump } from '@/utils/navigation' |
| | | defineOptions({ name: 'ArtMixedMenu' }) |
| | | const route = useRoute() |
| | | const props = defineProps({ |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | | onClick: (item) => { |
| | | if (item.key === 'view') handleView?.(row) |
| | | if (item.key === 'edit') handleEdit?.(row) |
| | | if (item.key === 'delete') handleDelete?.(row) |
| | | } |
| | | }) |
| | | h( |
| | | 'div', |
| | | { class: 'flex justify-center' }, |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | | onClick: (item) => { |
| | | if (item.key === 'view') handleView?.(row) |
| | | if (item.key === 'edit') handleEdit?.(row) |
| | | if (item.key === 'delete') handleDelete?.(row) |
| | | } |
| | | }) |
| | | ) |
| | | } |
| | | ] |
| | | } |
| | | |
| | |
| | | <ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData"> |
| | | <template #left> |
| | | <ElSpace wrap> |
| | | <ElButton v-auth="'add'" @click="showDialog('add')" v-ripple>新增站点区域</ElButton> |
| | | <ElButton v-auth="'add'" @click="handleShowDialog('add')" v-ripple>新增站点区域</ElButton> |
| | | <ElButton |
| | | v-auth="'delete'" |
| | | type="danger" |
| | |
| | | import { defaultResponseAdapter } from '@/utils/table/tableUtils' |
| | | import { guardRequestWithMessage } from '@/utils/sys/requestGuard' |
| | | import { fetchDictDataPage } from '@/api/system-manage' |
| | | import { fetchBasStationPage } from '@/api/bas-station' |
| | | import { fetchBasStationOptionPage } from '@/api/bas-station' |
| | | import { fetchWarehouseAreasList } from '@/api/warehouse-areas' |
| | | import { |
| | | fetchBasStationAreaDetail, |
| | |
| | | const containerTypeOptions = ref([]) |
| | | const stationOptions = ref([]) |
| | | const useStatusOptions = ref([]) |
| | | const stationOptionsLoaded = ref(false) |
| | | const stationOptionsLoading = ref(null) |
| | | let handleDeleteAction = null |
| | | |
| | | const areaLabelMap = computed( |
| | |
| | | } |
| | | } |
| | | |
| | | async function ensureStationOptions() { |
| | | if (stationOptionsLoaded.value) { |
| | | return |
| | | } |
| | | |
| | | if (stationOptionsLoading.value) { |
| | | await stationOptionsLoading.value |
| | | return |
| | | } |
| | | |
| | | stationOptionsLoading.value = (async () => { |
| | | const response = await guardRequestWithMessage( |
| | | fetchBasStationOptionPage( |
| | | { |
| | | current: 1, |
| | | pageSize: 100 |
| | | }, |
| | | { |
| | | showErrorMessage: false |
| | | } |
| | | ), |
| | | { records: [] }, |
| | | { |
| | | timeoutMessage: '站点别名选项加载超时,已停止等待' |
| | | } |
| | | ) |
| | | stationOptions.value = resolveBasStationAreaStationOptions(defaultResponseAdapter(response).records) |
| | | stationOptionsLoaded.value = true |
| | | })() |
| | | |
| | | try { |
| | | await stationOptionsLoading.value |
| | | } finally { |
| | | stationOptionsLoading.value = null |
| | | } |
| | | } |
| | | |
| | | async function handleShowDialog(type, record) { |
| | | await ensureStationOptions() |
| | | showDialog(type, record) |
| | | } |
| | | |
| | | async function openEditDialog(row) { |
| | | try { |
| | | const detail = await guardRequestWithMessage(fetchBasStationAreaDetail(row.id), {}, { |
| | | timeoutMessage: '站点区域详情加载超时,已停止等待' |
| | | }) |
| | | showDialog('edit', detail) |
| | | await handleShowDialog('edit', detail) |
| | | } catch (error) { |
| | | ElMessage.error(error?.message || '获取站点区域详情失败') |
| | | } |
| | |
| | | crossZoneAreaOptions.value = options |
| | | } |
| | | |
| | | async function loadStationOptions() { |
| | | const response = await guardRequestWithMessage( |
| | | fetchBasStationPage({ |
| | | current: 1, |
| | | pageSize: 500 |
| | | }, { |
| | | showErrorMessage: false |
| | | }), |
| | | { records: [] }, |
| | | { |
| | | timeoutMessage: '站点别名选项加载超时,已停止等待' |
| | | } |
| | | ) |
| | | stationOptions.value = resolveBasStationAreaStationOptions(defaultResponseAdapter(response).records) |
| | | } |
| | | |
| | | async function loadContainerTypeOptions() { |
| | | const response = await guardRequestWithMessage( |
| | | fetchDictDataPage({ |
| | |
| | | onMounted(async () => { |
| | | await Promise.allSettled([ |
| | | loadAreaOptions(), |
| | | loadStationOptions(), |
| | | loadContainerTypeOptions(), |
| | | loadUseStatusOptions() |
| | | ]) |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 180, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | import ListExportPrint from '@/components/biz/list-export-print/index.vue' |
| | | import { defaultResponseAdapter } from '@/utils/table/tableUtils' |
| | | import { guardRequestWithMessage } from '@/utils/sys/requestGuard' |
| | | import { fetchBasStationPage } from '@/api/bas-station' |
| | | import { fetchBasStationOptionPage } from '@/api/bas-station' |
| | | import { fetchWarehouseAreasList } from '@/api/warehouse-areas' |
| | | import { fetchDictDataPage } from '@/api/system-manage' |
| | | import { |
| | |
| | | const deviceOptions = ref([]) |
| | | const areaOptions = ref([]) |
| | | const stationOptions = ref([]) |
| | | const stationOptionsLoaded = ref(false) |
| | | const stationOptionsLoading = ref(null) |
| | | const detailDrawerVisible = ref(false) |
| | | const detailLoading = ref(false) |
| | | const detailData = ref({}) |
| | |
| | | } |
| | | } |
| | | |
| | | function openInitDialog(record = null) { |
| | | async function ensureStationOptions() { |
| | | if (stationOptionsLoaded.value) { |
| | | return |
| | | } |
| | | |
| | | if (stationOptionsLoading.value) { |
| | | await stationOptionsLoading.value |
| | | return |
| | | } |
| | | |
| | | stationOptionsLoading.value = (async () => { |
| | | const response = await guardRequestWithMessage( |
| | | fetchBasStationOptionPage( |
| | | { |
| | | current: 1, |
| | | pageSize: 100 |
| | | }, |
| | | { |
| | | showErrorMessage: false |
| | | } |
| | | ), |
| | | { records: [] }, |
| | | { |
| | | timeoutMessage: '站点列表加载超时,已停止等待' |
| | | } |
| | | ) |
| | | stationOptions.value = buildSelectOptions(defaultResponseAdapter(response).records, ['stationName', 'name']) |
| | | stationOptionsLoaded.value = true |
| | | })() |
| | | |
| | | try { |
| | | await stationOptionsLoading.value |
| | | } finally { |
| | | stationOptionsLoading.value = null |
| | | } |
| | | } |
| | | |
| | | async function openInitDialog(record = null) { |
| | | await ensureStationOptions() |
| | | currentInitData.value = record ? createInitRecordFromRow(record) : buildDeviceSiteInitModel() |
| | | initDialogVisible.value = true |
| | | } |
| | |
| | | areaOptions.value = resolveDeviceSiteAreaOptions(defaultResponseAdapter(response).records) |
| | | } |
| | | |
| | | async function loadStationOptions() { |
| | | const response = await guardRequestWithMessage( |
| | | fetchBasStationPage({ |
| | | current: 1, |
| | | pageSize: 500 |
| | | }, { |
| | | showErrorMessage: false |
| | | }), |
| | | { records: [] }, |
| | | { |
| | | timeoutMessage: '站点列表加载超时,已停止等待' |
| | | } |
| | | ) |
| | | stationOptions.value = buildSelectOptions(defaultResponseAdapter(response).records, ['stationName', 'name']) |
| | | } |
| | | |
| | | onMounted(async () => { |
| | | await Promise.all([loadTypeOptions(), loadDeviceOptions(), loadAreaOptions(), loadStationOptions()]) |
| | | await Promise.all([loadTypeOptions(), loadDeviceOptions(), loadAreaOptions()]) |
| | | }) |
| | | </script> |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 190, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |
| | |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h('div', [ |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 110, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 90, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonTable, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 140, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h('div', [ |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 140, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h('div', [ |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 110, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 110, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 110, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 110, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => { |
| | | const operations = [{ key: 'view', label: '详情', icon: 'ri:eye-line' }] |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 220, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 180, |
| | | align: 'right', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => { |
| | | const operations = [{ key: 'view', label: '详情', icon: 'ri:eye-line' }] |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 110, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 220, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h('div', [ |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 110, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 170, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 90, |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonTable, { |