2023年10月31日 修复问题

This commit is contained in:
bai 2023-10-31 01:31:55 +08:00
parent 1864d4fbd7
commit 2dbe6c6855
1 changed files with 98 additions and 47 deletions

View File

@ -3,11 +3,15 @@
<div class="" style="padding: 1rem 1rem 0 1rem;">
<a-row :gutter="[16,16]">
<a-col :span="10">
<a-card class="cardDiv" title="教室情况">
<a-col :span="12">
<a-card class="cardDiv">
<template #title>
<div style="float: left;">教室情况</div>
<div style="float: right"><a-button type="primary" @click="refreshLogsFn()">设备检测</a-button></div>
</template>
<!-- -<i class="fa-sharp fa-solid fa-user"></i>- -->
<a-row class="" :gutter="[16,16]">
<a-col :xs="{ span: 8 }" :sm="{ span: 8 }" :lg="{ span: 8 }">
<a-col :span="6">
<div class="numberBlob handleCss" @click="openDetail({})">
<div class="numSpan">{{ allClassNum }}</div>
<div class="numberName">
@ -16,7 +20,7 @@
</div>
</div>
</a-col>
<a-col :xs="{ span: 8 }" :sm="{ span: 8 }" :lg="{ span: 8 }">
<a-col :span="6">
<div class="numberBlob handleCss" @click="openDetail({ sfyx: '0' })">
<div class="numSpan blue">{{ leftList.length }}</div>
<div class="numberName">
@ -25,34 +29,7 @@
</div>
</div>
</a-col>
<a-col :xs="{ span: 8 }" :sm="{ span: 8 }" :lg="{ span: 8 }">
<div class="numberBlob handleCss" @click="refreshLogs({})">
<div class="numSpan orange" style="font-size: 24px;height: 50px;line-height: 50px;">未检测</div>
<div class="numberName">
<!-- <RiseOutlined class="orange"/> -->
直播异常
</div>
</div>
</a-col>
</a-row>
<!-- <a-divider /> -->
<!-- <div class="buttomDiv"></div> -->
</a-card>
</a-col>
<a-col :span="14">
<a-card class="cardDiv" title="上课情况">
<!-- -<i class="fa-sharp fa-solid fa-user"></i>- -->
<a-row class="" :gutter="[16,16]">
<a-col :xs="{ span: 6 }" :sm="{ span: 6 }" :lg="{ span: 6 }">
<div class="numberBlob handleCss" @click="openDetail({ nowIsClass: true })">
<div class="numSpan">{{ (leftList.filter(x => x?.nowIsClass).length || 0) }}</div>
<div class="numberName">
<!-- <StockOutlined class="blue"/> -->
正在上课
</div>
</div>
</a-col>
<a-col :xs="{ span: 6 }" :sm="{ span: 6 }" :lg="{ span: 6 }">
<a-col :span="6">
<div class="numberBlob handleCss" @click="openDetail({ sfyx2: '0' })">
<div class="numSpan orange" style="font-size: 24px;height: 50px;line-height: 50px;">{{ getSysConfig().flag5 == 0?'否':'是' }}</div>
<div class="numberName">
@ -61,7 +38,36 @@
</div>
</div>
</a-col>
<a-col :xs="{ span: 6 }" :sm="{ span: 6 }" :lg="{ span: 6 }">
<a-col :span="6">
<div class="numberBlob">
<div v-if="!statusLogList.length" class="numSpan orange" style="font-size: 24px;height: 50px;line-height: 50px;">未检测</div>
<div v-else class="numSpan orange" style="font-size: 24px;height: 50px;line-height: 50px;">{{ statusLogList.filter(x => x.type != 'green' ).length }}</div>
<div class="numberName">
<!-- <RiseOutlined class="orange"/> -->
设备异常
</div>
<div v-if="statusLogList.length" style="font-size: .5rem;">{{ statusLogList[0]?.createTime }}</div>
</div>
</a-col>
</a-row>
<!-- <a-divider /> -->
<!-- <div class="buttomDiv"></div> -->
</a-card>
</a-col>
<a-col :span="12">
<a-card class="cardDiv" title="上课情况">
<!-- -<i class="fa-sharp fa-solid fa-user"></i>- -->
<a-row class="" :gutter="[16,16]">
<a-col :span="8">
<div class="numberBlob handleCss" @click="openDetail({ nowIsClass: true })">
<div class="numSpan">{{ (leftList.filter(x => x?.nowIsClass).length || 0) }}</div>
<div class="numberName">
<!-- <StockOutlined class="blue"/> -->
正在上课
</div>
</div>
</a-col>
<a-col :span="8">
<div class="numberBlob handleCss" @click="openDetail({ onLineClassType: 'green' })">
<div class="numSpan blue">{{ (leftList.filter(x => x?.nowIsClass && x?.child['教师近景']?.isOnLine).length || 0) }}</div>
<div class="numberName">
@ -70,7 +76,7 @@
</div>
</div>
</a-col>
<a-col :xs="{ span: 6 }" :sm="{ span: 6 }" :lg="{ span: 6 }">
<a-col :span="8">
<div class="numberBlob handleCss" @click="openDetail({ onLineClassType: 'red' })">
<div class="numSpan orange">{{ (leftList.filter(x => x?.nowIsClass && !x?.child['教师近景']?.isOnLine).length || 0) }}</div>
<div class="numberName">
@ -93,23 +99,41 @@
<!-- <a-card bordered hoverable @click="() => (currentCardIndex = index,searchReset())" :class="currentCardIndex == index?'active':''"> -->
<a-card bordered >
<template #title>
<div style="font-size: 15px;font-weight: 600;margin-bottom: 10px;">{{ item.jxlName }}</div>
<div style="float: left;font-size: 15px;font-weight: 600;margin-bottom: 10px;">{{ item.jxlName }}</div>
<div style="float: right"><a-button type="primary" @click="refreshLogsFn(item.jxlName)">设备检测</a-button></div>
</template>
<a-row style="margin-bottom: 10px;text-align: center;border-bottom: 1px #f0f0f0 solid ;padding-bottom: 10px;">
<a-col :span="8" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName})">{{ item.jsNum }}</a-col>
<a-col :span="8" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName, sfyx: '0'})">{{ item.child.length }}</a-col>
<a-col :span="8" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName})">{{ item.child.filter(x => x.allIsOnLine == 4).length || 0 }}</a-col>
<a-col :span="8" @click="openDetail({ jxlName: item.jxlName})">总数</a-col>
<a-col :span="8" @click="openDetail({ jxlName: item.jxlName, sfyx: '0'})">可直播</a-col>
<a-col :span="8" @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" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName, sfyx: '0'})">{{ item.child.length }}</a-col>
<a-col :span="6" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName})">{{ item.child.filter(x => x.allIsOnLine == 4).length || 0 }}</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="6" @click="openDetail({ jxlName: item.jxlName})">总数</a-col>
<a-col :span="6" @click="openDetail({ jxlName: item.jxlName, sfyx: '0'})">可直播</a-col>
<a-col :span="6" @click="openDetail({ jxlName: item.jxlName })">开放听课</a-col>
<a-col :span="6" >
<div>设备异常</div>
<div v-if="statusLogList.length" style="font-size: .5rem;">{{ statusLogList[0]?.createTime }}</div>
</a-col>
<!-- <div v-if="!statusLogList.length" class="numSpan orange" style="font-size: 24px;height: 50px;line-height: 50px;">未检测</div>
<div v-else class="numSpan orange" style="font-size: 24px;height: 50px;line-height: 50px;"></div>
<div class="numberName">
设备异常
</div>
<div v-if="statusLogList.length" style="font-size: .5rem;">{{ statusLogList[0]?.createTime }}</div> -->
</a-row>
<a-row style="text-align: center;">
<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" 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" 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-col :span="8" @click="openDetail({ jxlName: item.jxlName, nowIsClass: true})">正在上课</a-col>
<a-col :span="8" @click="openDetail({ jxlName: item.jxlName, onLineClassType: 'green'})">正在直播</a-col>
<a-col :span="8" @click="openDetail({ jxlName: item.jxlName, onLineClassType: 'red'})">直播异常</a-col>
<a-col :span="6" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName, nowIsClass: true})">{{ item.child.filter(x => x?.nowIsClass).length || 0}}</a-col>
<a-col :span="6" 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="6" 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-col :span="6" style="font-weight: 600;" >&nbsp;</a-col>
<a-col :span="6" @click="openDetail({ jxlName: item.jxlName, nowIsClass: true})">正在上课</a-col>
<a-col :span="6" @click="openDetail({ jxlName: item.jxlName, onLineClassType: 'green'})">正在直播</a-col>
<a-col :span="6" @click="openDetail({ jxlName: item.jxlName, onLineClassType: 'red'})">直播异常</a-col>
<a-col :span="6" >&nbsp;</a-col>
</a-row>
</a-card>
</a-col>
@ -337,6 +361,7 @@ const leftList:Ref<any> = ref([]);
const cardList:Ref<any> = ref([]);
const selectedRowKeys :Ref<any> = ref([]);
const currentItem:Ref<any> = ref({});
const statusLogList:Ref<any> = ref([]);
const currentCardIndex:Ref<any> = ref(0);
const allClassNum:Ref<any> = ref(0);
// const topWidth:any = ref('0');
@ -369,6 +394,7 @@ enum Api {
updateAllLive = '/jiaoshi/kcZhihuijiaoshi/updateAllLive',
changeAvyLiveApi = '/httpinterface/runAvyApiByIds',
xxhbjsjbxxList = '/xxhbjsjbxx/xxhbjsjbxx/list',
getRefreshLogList = '/jiaoshi/kcZhihuijiaoshiStateLog/list',
refreshLogs = '/jiaoshi/kcZhihuijiaoshi/refreshLogs',
}
/**
@ -380,6 +406,7 @@ const updateAllLive = (params) => defHttp.get({ url: Api.updateAllLive, params }
const changeAvyLiveApi = (params) => defHttp.get({ url: Api.changeAvyLiveApi, params,timeout: 9000000 });
const jsjbxxList = (params) => defHttp.get({ url: Api.xxhbjsjbxxList, params,timeout: 9000000 });
const refreshLogs = (params) => defHttp.get({ url: Api.refreshLogs, params,timeout: 9000000 });
const getRefreshLogList = (params) => defHttp.get({ url: Api.getRefreshLogList, params,timeout: 9000000 });
const shangXianQuartz = ref<any>({});
@ -511,6 +538,8 @@ function loadData(){
getAutoShangXianQuartz();
getJsjbxxList();
getRefreshLogListFn();
}
function openDetail(param){
@ -528,6 +557,28 @@ function getJsjbxxList(){
});
}
function refreshLogsFn(jxlName?){
createInfoModal({ title: '结果',content: '执行中请等待3~5分钟后刷新页面' });
refreshLogs({ jxlName }).then(res => {
let list = (res?.records) ?? (res) ?? [];
console.log(`🚀 ----------------------------------------------------------🚀`);
console.log(`🚀 ~ file: index.vue:539 ~ refreshLogsFn ~ list:`, list);
console.log(`🚀 ----------------------------------------------------------🚀`);
statusLogList.value = list;
})
}
function getRefreshLogListFn(){
getRefreshLogList({ pageSize: -1 }).then(res => {
let list = (res?.records) ?? [];
console.log(`🚀 ----------------------------------------------------------🚀`);
console.log(`🚀 ~ file: index.vue:539 ~ getRefreshLogList ~ list:`, list);
console.log(`🚀 ----------------------------------------------------------🚀`);
statusLogList.value = list;
})
}
//class
function getIsOnLineClass(record){
let resClas = 'red';