From 9bdae9d2183a84af835d8f327aaacd0c8877188d Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 10 Dec 2024 15:06:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env/.env.dev | 4 +- src/layout/header.vue | 208 +++++++++++++++--- .../user/lessor/quality-manage/index.vue | 6 +- 3 files changed, 188 insertions(+), 30 deletions(-) diff --git a/env/.env.dev b/env/.env.dev index 98cb05f..8455276 100644 --- a/env/.env.dev +++ b/env/.env.dev @@ -8,9 +8,9 @@ VITE_API_URL = '/proxyApi' # VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭 # VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅 -VITE_proxyTarget = 'http://192.168.2.127:28080' # 梁超 +# VITE_proxyTarget = 'http://192.168.2.127:28080' # 梁超 # VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试服务 -# VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务 +VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务 # VITE_proxyTarget = 'http://192.168.2.129:18080' # 马帅j # VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型) diff --git a/src/layout/header.vue b/src/layout/header.vue index f785754..d0cf26e 100644 --- a/src/layout/header.vue +++ b/src/layout/header.vue @@ -9,9 +9,10 @@ import userClass from '../hooks/userClass' const { getCompanyList } = userClass() import imgSrc from '@/assets/img/logo.png' const store: any = mainStore() +const searchTypeName = ref('装备') const userStore = useStore() const cart = cartStore() -const isType = localStorage.getItem('rolesType') +const isType: any = localStorage.getItem('rolesType') userStore.editMenuList(1) const route = useRoute() const router = useRouter() @@ -21,6 +22,7 @@ rolesName.value = localStorage.getItem('rolesType') const isAdmin = ref(false) const roles = store.userInfo.roles const activeLoginCompanyName = ref('') +const searchCheckVisible = ref(false) if (roles?.length > 0) { isAdmin.value = roles.some((e: any) => e.roleKey == 'admin') } @@ -102,16 +104,39 @@ const searchKeywordBtn = () => { store.addHistoryRecord(keywordIptValue.value) if (route.path == '/equipList') { - $bus.emit('search', keywordIptValue.value) + if (searchTypeName.value === '装备') { + $bus.emit('search', keywordIptValue.value) + } else { + router.push({ + name: 'parity', + query: { keyWord: keywordIptValue.value }, + }) + } } if (route.path == '/parity') { + if (searchTypeName.value === '需求') { + $bus.emit('search', keywordIptValue.value) + } else { + router.push({ + name: 'equipList', + query: { keyWord: keywordIptValue.value }, + }) + } $bus.emit('search', keywordIptValue.value) } if (route.path == '/home') { - router.push({ - name: 'equipList', - query: { keyWord: keywordIptValue.value }, - }) + if (searchTypeName.value === '装备') { + router.push({ + name: 'equipList', + query: { keyWord: keywordIptValue.value }, + }) + } + if (searchTypeName.value === '需求') { + router.push({ + name: 'parity', + query: { keyWord: keywordIptValue.value }, + }) + } } } @@ -277,8 +302,76 @@ const onJumpUser = () => { -