This commit is contained in:
parent
4079289aac
commit
6ea01cb14b
|
|
@ -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变化
|
||||
|
|
|
|||
Loading…
Reference in New Issue