diff --git a/.env.development b/.env.development index 45b93009..cbb55fe5 100644 --- a/.env.development +++ b/.env.development @@ -13,8 +13,8 @@ VITE_PUBLIC_PATH = / # Cross-domain proxy, you can configure multiple # Please note that no line breaks # VITE_PROXY = [["/basic-api","http://60.209.125.238"],["/upload","http://localhost:3300/upload"]] -VITE_PROXY=[["/api","http://60.209.125.238:3008"],["/stage-api","https://www.666cxf.com/stage-api"]] # 开发 测试环境 -# VITE_PROXY=[["/api","http://118.190.144.189:3008"],["/stage-api","https://www.666cxf.com/stage-api"]] # 开发 测试环境 +# VITE_PROXY=[["/api","http://60.209.125.238:3008"],["/stage-api","https://www.666cxf.com/stage-api"]] # 开发 测试环境 +VITE_PROXY=[["/api","http://118.190.144.189:3008"],["/stage-api","https://www.666cxf.com/stage-api"]] # 开发 测试环境 # Delete console VITE_DROP_CONSOLE = false diff --git a/src/views/ContainerManagement/CurrentState/index.vue b/src/views/ContainerManagement/CurrentState/index.vue index 2ea9ab0c..e7d8d099 100644 --- a/src/views/ContainerManagement/CurrentState/index.vue +++ b/src/views/ContainerManagement/CurrentState/index.vue @@ -46,37 +46,42 @@ const refInfoModal = ref() const [registerModal, { openModal }] = useModal() const [registerInfoModal, { openModal: openInfoModal }] = useModal() + const firstQuery = ref(false) const [registerTable, { reload, getDataSource }] = useTable({ title: '集装箱信息列表', api: async (p) => { const res: API.DataResult = await ApiList(p) - let type = true - JSON.parse(p.queryCondition).forEach((e) => { - if (e.FieldName == 'isOnlineId') { - type = false - } - }) - if (type) { - let MessageArr: any = [] - res.data.forEach((item) => { - if (item.isOnlineId == 0) { - MessageArr.push(item.cntrno) + if (firstQuery.value) { + let type = true + JSON.parse(p.queryCondition).forEach((e) => { + if (e.FieldName == 'isOnlineId') { + type = false } }) - if (MessageArr.length) { - // let txt = `有${MessageArr.length}个待上线:` - let txt = `有${MessageArr.length}个待上线.` - // for (let i = 0; i < 5; i++) { - // if (MessageArr[i]) { - // txt = i == 0 ? `${txt} ${MessageArr[i]}` : `${txt},\n${MessageArr[i]}` - // } - // } - notification.warning({ - // message: MessageArr.length > 5 ? `${txt}...` : txt, - message: txt, - duration: 6000, + if (type) { + let MessageArr: any = [] + res.data.forEach((item) => { + if (item.isOnlineId == 0) { + MessageArr.push(item.cntrno) + } }) + if (MessageArr.length) { + // let txt = `有${MessageArr.length}个待上线:` + let txt = `有${MessageArr.length}个待上线.` + // for (let i = 0; i < 5; i++) { + // if (MessageArr[i]) { + // txt = i == 0 ? `${txt} ${MessageArr[i]}` : `${txt},\n${MessageArr[i]}` + // } + // } + notification.warning({ + // message: MessageArr.length > 5 ? `${txt}...` : txt, + message: txt, + duration: 6000, + }) + } } + } else { + firstQuery.value = true } res.data.forEach((item, index) => { item.index = index + 1