diff --git a/.env b/.env index d97467d..a80741d 100644 --- a/.env +++ b/.env @@ -19,15 +19,15 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' # --------------------------- 开发环境 api地址 ---------------------------------- # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 #VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 -VITE_APP_DEV_SERVICE = http://192.168.101.174:9999 # 邓-本地 -# VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 +#VITE_APP_DEV_SERVICE = http://192.168.101.174:9999 # 邓-本地 + VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 开发环境 图片访问基础地址 --------------------------- # VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 #VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上 -VITE_IMAGE_DEV_PATH = http://192.168.101.174:9999 # 邓-本地 - # VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 +#VITE_IMAGE_DEV_PATH = http://192.168.101.174:9999 # 邓-本地 + VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 # VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 生产环境 api地址 ---------------------------------- diff --git a/src/pages/boxes/list.vue b/src/pages/boxes/list.vue index a1c4988..daa00ae 100644 --- a/src/pages/boxes/list.vue +++ b/src/pages/boxes/list.vue @@ -6,23 +6,12 @@ import { isEmpty } from "radash" import { hooks, router } from "@@/index" import { boxesApi } from "@@/api" -import zTabs from "@@/components/other/z-tabs/z-tabs.vue" -import CustomWaterfallsFlow from "@@/components/other/custom-waterfalls-flow/custom-waterfalls-flow.vue" import { filePath } from "@/sheep/utils/file" -const data = { - tabs: [ - { id: null, name: "全部", disabled: false }, - { id: 0, name: "空闲", disabled: false }, - { id: 1, name: "部分空闲", disabled: false }, - { id: 2, name: "已满", disabled: false }, - ], -} - const state = reactive({ detailId: null, pa: { - status: data.tabs[0].id, + status: null, // 移除状态筛选 }, }) @@ -35,35 +24,47 @@ const boxesList = computed(() => { const pageRef = ref(null) const pageHook = hooks.usePage(pageRef, boxesApi.page, null, "data.records") + const query = (page: number, pagesize: number) => { pageHook.startPage(page, pagesize, false, state.pa) } +// 获取状态样式类 +const getStatusClass = (status: number) => { + const statusMap: Record = { + 0: 'status-available', + 1: 'status-partial', + 2: 'status-full' + } + return statusMap[status] || 'status-available' +} + +// 获取状态文本 +const getStatusText = (status: number) => { + const statusMap: Record = { + 0: '空闲', + 1: '部分空闲', + 2: '已满' + } + return statusMap[status] || '空闲' +} + onLoad((options: any) => { if (!isEmpty(options.id)) { state.detailId = options.id state.pa.merchantId = options.id } }) + onShow(() => { if (pageRef.value) { pageRef.value.reload(false) } }) - -const doTab = (e: any) => { - const target = data.tabs[e] - state.pa.status = target.id - pageRef.value.reload(true) -} - -const doCard = (v: any) => { - router.jump("/pages/boxes/detail", { id: v.id }) -} - +