| | |
| | | |
| | | // 获取机巢搜索结果 |
| | | const getDeviceList = async () => { |
| | | const res = await selectDeviceList({ |
| | | keyword: searchKey.value, |
| | | }); |
| | | const res = await selectDeviceList({nickname: searchKey.value}); |
| | | if (res.data.code !== 0) return; |
| | | machineNestList.value = res?.data?.data || []; |
| | | downList.value = res?.data?.data || []; |
| | |
| | | watch(searchKey, async (newVal) => { |
| | | if (optionsValue.value === '2') { |
| | | await getAddressList(); |
| | | } else { |
| | | await getDeviceList(); |
| | | } |
| | | }, { immediate: false }); |
| | | |
| | | onMounted(() => { |
| | | getDeviceList(); |
| | | document.addEventListener('click', handleClickOutside); |
| | | }); |
| | | |
| | |
| | | .select-down-list { |
| | | position: absolute; |
| | | top: 188px; |
| | | left: 45%; |
| | | transform: translateX(-45%); |
| | | left: 44%; |
| | | transform: translateX(-40%); |
| | | width: 220px; |
| | | height: 256px; |
| | | overflow-y: auto; |
| | |
| | | border-radius: 0px 0px 8px 8px; |
| | | border: 1px solid; |
| | | border-image: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(115, 192, 255, 1)) 1 1; |
| | | opacity: 0.8; |
| | | &::-webkit-scrollbar { |
| | | width: 0; |
| | | display: none; |
| | |
| | | line-height: 32px; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | &:hover { |
| | | background: linear-gradient( 90deg, rgba(0,122,255,0) 0%, rgba(0,98,204,0.6) 50%, rgba(0,73,153,0) 100%); |
| | | border: 1px solid; |
| | | border-image: linear-gradient(90deg, rgba(0, 199, 190, 0), rgba(48, 176, 199, 1), rgba(0, 199, 190, 0)) 1 1; |
| | | } |
| | | } |
| | | } |
| | | .searchBox { |