2023年11月5日 修改列表
This commit is contained in:
parent
66f630f85a
commit
7de6cccf69
|
@ -93,7 +93,14 @@
|
|||
</a-row>
|
||||
</div>
|
||||
|
||||
<div class="" style="padding: 10px 10px 0 10px;">
|
||||
<!-- <div style="float:right"><a-button type="link" >切换视图</a-button></div> -->
|
||||
<div style="float:right">
|
||||
<a-switch checkedChildren="卡片" unCheckedChildren="列表" v-model:checked="twoShowType" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div v-show="twoShowType" class="" style="padding: 10px 10px 0 10px;">
|
||||
<a-row :gutter="[16,16]">
|
||||
<a-col :span="6" v-for="(item,index) of cardList" :key="index">
|
||||
<a-card bordered hoverable @click="() => (currentCardIndex = index,searchReset())" :class="currentCardIndex == index?'active':''">
|
||||
|
@ -139,6 +146,111 @@
|
|||
</a-row>
|
||||
</div>
|
||||
|
||||
<div v-show="!twoShowType" style="padding: 10px 10px 0 10px;">
|
||||
<a-table
|
||||
rowKey="jsbh"
|
||||
v-show="true"
|
||||
:loading="loading"
|
||||
:data-source="cardList"
|
||||
:pagination="false"
|
||||
bordered
|
||||
size="middle"
|
||||
class="ant-table-striped"
|
||||
:scroll="{ y: 650 }"
|
||||
:rowSelection="{ type: 'radio', onChange: onSelectChange2 }"
|
||||
>
|
||||
<a-table-column width="70px" title="序号" align="center" data-index="index">
|
||||
<template #default="{ index }">
|
||||
{{ index+1 }}
|
||||
</template>
|
||||
</a-table-column>
|
||||
<a-table-column title="教学楼" data-index="jxlName"/>
|
||||
|
||||
<!-- @click="() => (currentCardIndex = index,searchReset())" -->
|
||||
<!-- <div class="bgshua" style="float: right"><a-button type="primary" @click="refreshLogsFn(item.jxlName)">设备检测</a-button></div> -->
|
||||
|
||||
<a-table-column title="总数" data-index="_">
|
||||
<template #default="{ record }">
|
||||
<span @click="openDetail({ jxlName: record.jxlName })">
|
||||
{{ record.jsNum }}
|
||||
</span>
|
||||
</template>
|
||||
</a-table-column>
|
||||
|
||||
<a-table-column title="可直播" data-index="_">
|
||||
<template #default="{ record }">
|
||||
<span @click="openDetail({ jxlName: record.jxlName, sfyx: '0' })">
|
||||
{{ record.child.length }}
|
||||
</span>
|
||||
</template>
|
||||
</a-table-column>
|
||||
|
||||
<a-table-column title="开放听课" data-index="_">
|
||||
<template #default="{ record }">
|
||||
<span @click="openDetail({ jxlName: record.jxlName })">
|
||||
{{ record.child.filter(x => x.sfyx == 0).length || 0 }}
|
||||
</span>
|
||||
</template>
|
||||
</a-table-column>
|
||||
|
||||
<a-table-column title="设备异常" data-index="_">
|
||||
<template #default="{ record }">
|
||||
<span v-if="!statusLogList.length">未检测</span>
|
||||
<span v-else>{{ statusLogList.filter(x => x.jxlName == record.jxlName && x.type != 'green' ).length }}</span>
|
||||
</template>
|
||||
</a-table-column>
|
||||
|
||||
<a-table-column title="正在上课" data-index="_">
|
||||
<template #default="{ record }">
|
||||
<span @click="openDetail({ jxlName: record.jxlName, nowIsClass: true})">
|
||||
{{ record.child.filter(x => x?.nowIsClass).length || 0}}
|
||||
</span>
|
||||
</template>
|
||||
</a-table-column>
|
||||
|
||||
<a-table-column title="正在直播" data-index="_">
|
||||
<template #default="{ record }">
|
||||
<span @click="openDetail({ jxlName: record.jxlName, onLineClassType: 'green'})">
|
||||
{{ record.child.filter(x => x?.nowIsClass && x?.child['教师近景']?.isOnLine).length || 0}}
|
||||
</span>
|
||||
</template>
|
||||
</a-table-column>
|
||||
|
||||
<a-table-column title="直播异常" data-index="_">
|
||||
<template #default="{ record }">
|
||||
<span @click="openDetail({ jxlName: record.jxlName, onLineClassType: 'red'})">
|
||||
{{ record.child.filter(x => x?.nowIsClass && !x?.child['教师近景']?.isOnLine).length || 0 }}
|
||||
</span>
|
||||
</template>
|
||||
</a-table-column>
|
||||
|
||||
<!-- <a-col :span="6" @click="openDetail({ jxlName: item.jxlName})">总数</a-col>
|
||||
<a-col :span="6" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName})">{{ item.jsNum }}</a-col> -->
|
||||
|
||||
<!-- <a-col :span="6" @click="openDetail({ jxlName: item.jxlName, sfyx: '0'})">可直播</a-col>
|
||||
<a-col :span="6" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName, sfyx: '0'})">{{ item.child.length }}</a-col> -->
|
||||
|
||||
<!-- <a-col :span="6" @click="openDetail({ jxlName: item.jxlName })">开放听课</a-col>
|
||||
<a-col :span="6" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName})">{{ item.child.filter(x => x.sfyx == 0).length || 0 }}</a-col> -->
|
||||
|
||||
<!-- <a-col :span="6" ><div>设备异常</div></a-col>
|
||||
<a-col :span="6" style="font-weight: 600;" v-if="!statusLogList.length">未检测</a-col>
|
||||
<a-col :span="6" style="font-weight: 600;" v-else>{{ statusLogList.filter(x => x.jxlName == item.jxlName && x.type != 'green' ).length }}</a-col> -->
|
||||
|
||||
|
||||
<!-- <a-col :span="8" @click="openDetail({ jxlName: item.jxlName, nowIsClass: true})">正在上课</a-col>
|
||||
<a-col :span="8" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName, nowIsClass: true})">{{ item.child.filter(x => x?.nowIsClass).length || 0}}</a-col> -->
|
||||
|
||||
<!-- <a-col :span="8" @click="openDetail({ jxlName: item.jxlName, onLineClassType: 'green'})">正在直播</a-col>
|
||||
<a-col :span="8" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName, onLineClassType: 'green'})">{{ item.child.filter(x => x?.nowIsClass && x?.child['教师近景']?.isOnLine).length || 0}}</a-col> -->
|
||||
|
||||
<!-- <a-col :span="8" @click="openDetail({ jxlName: item.jxlName, onLineClassType: 'red'})">直播异常</a-col>
|
||||
<a-col :span="8" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName, onLineClassType: 'red'})">{{ item.child.filter(x => x?.nowIsClass && !x?.child['教师近景']?.isOnLine).length || 0 }}</a-col> -->
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
<div style="height: 1rem;"></div>
|
||||
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
|
@ -368,6 +480,7 @@ const allClassNum:Ref<any> = ref(0);
|
|||
const showAllLiveKey:Ref<string> = ref('showAllLiveKey');
|
||||
const isShowAllLive:Ref<boolean> = ref(false);
|
||||
const loading:Ref<boolean> = ref(false);
|
||||
const twoShowType:Ref<boolean> = ref(true);
|
||||
const { createMessage, createInfoModal, createErrorModal } = useMessage();
|
||||
const route = useRouter();
|
||||
const queryParam:Ref<any> = ref({});
|
||||
|
@ -623,6 +736,18 @@ function onSelectChange(selectedRowKeyList: string | number[]){
|
|||
selectedRowKeys.value = selectedRowKeyList;
|
||||
}
|
||||
|
||||
function onSelectChange2(key,selectedRowKeyList: string | number[]){
|
||||
|
||||
// console.log(`🚀 ------------------------------------------------------------------------------------🚀`);
|
||||
// console.log(`🚀 ~ file: index.vue:741 ~ onSelectChange2 ~ selectedRowKeyList:`, selectedRowKeyList,...d);
|
||||
// console.log(`🚀 ------------------------------------------------------------------------------------🚀`);
|
||||
let c = selectedRowKeyList[0]
|
||||
let index = cardList.value.findIndex(x => x.jsbh == key);
|
||||
currentCardIndex.value = index
|
||||
searchReset()
|
||||
// selectedRowKeys.value = selectedRowKeyList;
|
||||
}
|
||||
|
||||
function checkSelectValue(){
|
||||
return checkIsList(selectedRowKeys.value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue