修改监控
parent
194850dd65
commit
9cc03b1be9
|
|
@ -35,7 +35,7 @@
|
|||
<div class="flex-1">
|
||||
<div
|
||||
class="h-130px"
|
||||
:class="{ 'h-140px': isBase }"
|
||||
:class="{ '!h-160px': isBase }"
|
||||
v-for="(item, index) in listBig"
|
||||
:key="item.url + index"
|
||||
>
|
||||
|
|
@ -47,17 +47,19 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="grid grid-cols-3 gap-x-6px pt-10px">
|
||||
<div class="h-66px" v-for="item in listSmall" :key="item.id">
|
||||
<VideoFlv
|
||||
@onScreen="onScreenClick"
|
||||
class="cursor-pointer"
|
||||
:url="item.url"
|
||||
:name="item.base_name"
|
||||
:screen="true"
|
||||
/>
|
||||
<div class="overflow-y-auto h-80px" v-if="isBase">
|
||||
<div class="grid grid-cols-3 gap-x-6px pt-10px" v-for="(ar, i) in listSmall" :key="i">
|
||||
<div class="h-66px" v-for="item in ar" :key="item.id">
|
||||
<VideoFlv
|
||||
@onScreen="onScreenClick"
|
||||
class="cursor-pointer"
|
||||
:url="item.url"
|
||||
:name="item.base_name"
|
||||
:screen="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -130,7 +132,7 @@
|
|||
|
||||
const currentModelVideo = ref<any>(null)
|
||||
|
||||
const listSmall = computed(() => Data.list.slice(1, 4))
|
||||
const listSmall = computed(() => chunkArray(Data.list?.slice(1, Data.list.length) ?? [], 3))
|
||||
const listBig = computed(() => Data.list.slice(0, 1))
|
||||
|
||||
const currentTabValue = computed(
|
||||
|
|
@ -143,10 +145,18 @@
|
|||
getData()
|
||||
}
|
||||
|
||||
function chunkArray(array, chunkSize) {
|
||||
const result = []
|
||||
for (let i = 0; i < array.length; i += chunkSize) {
|
||||
result.push(array.slice(i, i + chunkSize))
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
async function getTabs() {
|
||||
const resData = await getAgriculturalDeviceBasic({
|
||||
device_type: 1,
|
||||
is_recommended: 1,
|
||||
is_recommended: props.baseId ? null : 1,
|
||||
})
|
||||
Data.tabList = resData
|
||||
if (resData.length) Data.currentTab = resData[0].id
|
||||
|
|
@ -160,7 +170,7 @@
|
|||
base_id: props.baseId ?? Data.currentTab,
|
||||
type: 1,
|
||||
status: 1,
|
||||
is_recommend: 1,
|
||||
is_recommend: props.baseId ? null : 1,
|
||||
})
|
||||
Data.list = []
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue