This commit is contained in:
bb_pan 2026-01-05 19:59:57 +08:00
parent 4079289aac
commit 6ea01cb14b
1 changed files with 22 additions and 18 deletions

View File

@ -30,7 +30,7 @@
<template v-for="(val, index) in v.list" :key="index">
<div
class="item"
@click="selectScreen(v.type, val, i)"
@click="selectScreen(v.type, val, i, index)"
:class="{
active: val.isChecked,
}"
@ -426,7 +426,8 @@ const getCompanyAddressListData = async () => {
//
//
const getDeviceListData = async (params: any = null, keyWord: any = null) => {
const getDeviceListData = async (params: any = null, keyWord: any = null, index: any = null) => {
console.log('🚀 ~ getDeviceListData ~ index:', index)
//
const searchParams: any = {
keyWord: keyWord ? keyWord : keyWordsSearch.value ? keyWordsSearch.value : '',
@ -500,22 +501,24 @@ const getDeviceListData = async (params: any = null, keyWord: any = null) => {
const searchParams_2 = JSON.parse(JSON.stringify(searchParams))
searchParams_2.companyId = ''
const result: any = await getCompanyCountApi(searchParams_2)
screenChooseList[4].list.forEach((e: any, index: any) => {
if (index != 0) {
e.name = e.companyAbbreviationName + `(${0})`
}
})
for (let key in result.data) {
screenChooseList[4].list.forEach((e: any, index: any) => {
if (e.companyId == key) {
e.name = ''
e.name = e.companyName + `(${result.data[key]})`
}
})
}
equipList.value = res.rows
total.value = res.total
if (index === 0 || !index){
const result: any = await getCompanyCountApi(searchParams_2)
screenChooseList[4].list.forEach((e: any, index: any) => {
if (index != 0) {
e.name = e.companyAbbreviationName + `(${0})`
}
})
for (let key in result.data) {
screenChooseList[4].list.forEach((e: any, index: any) => {
if (e.companyId == key) {
e.name = ''
e.name = e.companyName + `(${result.data[key]})`
}
})
}
}
}
//
@ -579,7 +582,8 @@ const changeDropdown = (sort: any, val: any) => {
}
// select
const selectScreen = async (type: any, item: any, index: number) => {
const selectScreen = async (type: any, item: any, index: number, tabIndex: number) => {
console.log('🚀 ~ selectScreen ~ index:', tabIndex)
screenChooseList[index].list.forEach((e: any) => {
if (e === item) {
//
@ -625,7 +629,7 @@ const selectScreen = async (type: any, item: any, index: number) => {
// item.isChecked = !item.isChecked
console.log('🚀 ~ selectScreen ~ item.isChecked:', item.isChecked)
getDeviceListData()
getDeviceListData(null, null, tabIndex)
}
//page