修改bug

This commit is contained in:
yangjun 2024-02-28 11:15:02 +08:00
parent 06e21726d7
commit 547b799dff
2 changed files with 105 additions and 74 deletions

View File

@ -28,40 +28,68 @@ export const columns: BasicColumn[] = [
dataIndex: 'jsmc'
},
{
title: '教近景',
title: '教近景',
align: "center",
dataIndex: 'lbzj'
dataIndex: 'lbzj',
customRender: ({ text }) => {
if(text == 'green'){
return "正常";
}else{
return "异常";
}
},
},
{
title: '教师全景',
title: '教全景',
align: "center",
dataIndex: 'jsqj'
dataIndex: 'jsqj',
customRender: ({ text }) => {
if(text == 'green'){
return "正常";
}else{
return "异常";
}
},
},
{
title: '学生全景',
align: "center",
dataIndex: 'xsqj'
dataIndex: 'xsqj',
customRender: ({ text }) => {
if(text == 'green'){
return "正常";
}else{
return "异常";
}
},
},
{
title: 'PPT',
align: "center",
dataIndex: 'ppt'
},
{
title: '绿色的数量',
align: "center",
dataIndex: 'greenNum'
},
{
title: '状态指示',
align: "center",
dataIndex: 'type',
},
{
title: '状态指示(标记)',
align: "center",
dataIndex: 'forceState',
dataIndex: 'ppt',
customRender: ({ text }) => {
if(text == 'green'){
return "正常";
}else{
return "异常";
}
},
},
// {
// title: '绿色的数量',
// align: "center",
// dataIndex: 'greenNum'
// },
// {
// title: '状态指示',
// align: "center",
// dataIndex: 'type',
// },
// {
// title: '状态指示(标记)',
// align: "center",
// dataIndex: 'forceState',
// },
];
//查询数据
@ -69,53 +97,53 @@ export const searchFormSchema: FormSchema[] = [
{
label: "教学楼名称",
field: 'jxlName',
component: 'Input',
component: 'JInput',
colProps: {span: 6},
},
{
label: "教室名称",
field: 'jsmc',
component: 'Input',
colProps: {span: 6},
},
{
label: "教师近景",
field: 'lbzj',
component: 'Input',
colProps: {span: 6},
},
{
label: "教师全景",
field: 'jsqj',
component: 'Input',
colProps: {span: 6},
},
{
label: "学生全景",
field: 'xsqj',
component: 'Input',
colProps: {span: 6},
},
{
label: "PPT",
field: 'ppt',
component: 'Input',
colProps: {span: 6},
},
{
label: "绿色的数量",
field: 'greenNum',
component: 'Input',
colProps: {span: 6},
},
{
label: "状态指示灯",
field: 'type',
component: 'JDictSelectTag',
componentProps:{
},
component: 'JInput',
colProps: {span: 6},
},
// {
// label: "教室近景",
// field: 'lbzj',
// component: 'Input',
// colProps: {span: 6},
// },
// {
// label: "教室全景",
// field: 'jsqj',
// component: 'Input',
// colProps: {span: 6},
// },
// {
// label: "学生全景",
// field: 'xsqj',
// component: 'Input',
// colProps: {span: 6},
// },
// {
// label: "PPT",
// field: 'ppt',
// component: 'Input',
// colProps: {span: 6},
// },
// {
// label: "绿色的数量",
// field: 'greenNum',
// component: 'Input',
// colProps: {span: 6},
// },
// {
// label: "状态指示灯",
// field: 'type',
// component: 'JDictSelectTag',
// componentProps:{
// },
// colProps: {span: 6},
// },
];
//表单数据
@ -131,12 +159,12 @@ export const formSchema: FormSchema[] = [
component: 'Input',
},
{
label: '教近景',
label: '教近景',
field: 'lbzj',
component: 'Input',
},
{
label: '教全景',
label: '教全景',
field: 'jsqj',
component: 'Input',
},

View File

@ -48,7 +48,7 @@
<a-col :span="6">
<div class="numberBlob handleCss" @click="openLogDetail({ forceStateIsBad: 'red' })">
<div v-if="!statusLogList.length" class="numSpan orange">未检测</div>
<div v-else class="numSpan orange">{{ statusLogList.filter(x => x.forceState == 'red' || x.type != 'green' ).length || 0 }}</div>
<div v-else class="numSpan orange">{{ statusLogList.filter(x => x.forceState == 'red' ).length || 0 }}</div>
<div class="numberName">
<!-- <RiseOutlined class="orange"/> -->
设备异常
@ -121,13 +121,13 @@
<a-row style="margin-bottom: 10px;text-align: center;border-bottom: 1px #f0f0f0 solid ;padding-bottom: 10px;">
<a-col class="hover handleCss" :span="6" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName, zbgn: undefined })"><span>{{ item.jsNum }}</span></a-col>
<a-col class="hover" :span="6" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName })"><span>{{ item.child.filter(x => x.zbgn == '0').length || 0 }}</span></a-col>
<a-col class="hover" :span="6" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName, sfyx: '0' })"><span>{{ item.child.filter(x => x.tjKftkzt == 1).length || 0 }}</span></a-col>
<a-col class="hover" :span="6" style="font-weight: 600;" @click="openDetail({ jxlName: item.jxlName, tjKftkzt:'1' })"><span>{{ item.child.filter(x => x.tjKftkzt == 1).length || 0 }}</span></a-col>
<a-col class="" :span="6" style="font-weight: 600;" v-if="!statusLogList.length"><span>未检测</span></a-col>
<a-col class="hover handleCss" :span="6" style="font-weight: 600;" @click="openLogDetail({ jxlName: item.jxlName, forceStateIsBad: 'red' })" v-else><span>{{ statusLogList.filter(x => x.jxlName == item.jxlName && ( x.forceState == 'red' || x.type != 'green') ).length }}</span></a-col>
<a-col class="hover handleCss" :span="6" style="font-weight: 600;" @click="openLogDetail({ jxlName: item.jxlName, forceStateIsBad: 'red' })" v-else><span>{{ statusLogList.filter(x => x.jxlName == item.jxlName && ( x.forceState == 'red' ) ).length }}</span></a-col>
<a-col class="hover" :span="6" @click="openDetail({ jxlName: item.jxlName, zbgn: undefined })"><span>总数</span></a-col>
<a-col class="hover" :span="6" @click="openDetail({ jxlName: item.jxlName })"><span>可直播</span></a-col>
<a-col class="hover" :span="6" @click="openDetail({ jxlName: item.jxlName, tjKftkzt:'1' })"><span>开放听课</span></a-col>
<a-col :span="6" @click="openLogDetail({ jxlName: item.jxlName })">
<a-col :span="6" @click="openLogDetail({ jxlName: item.jxlName, forceStateIsBad: 'red' })">
<div>设备异常</div>
<!-- <div v-if="statusLogList.length" style="font-size: .5rem;">{{ statusLogList[0]?.createTime }}</div> -->
<div v-if="statusLogList.length" style="font-size: .5rem;">{{ statusLogList.find(x => x.jxlName == item.jxlName)?.createTime }}</div>
@ -198,13 +198,13 @@
<a-table-column title="开放听课" data-index="_">
<template #default="{ record }">
<span @click="openDetail({ jxlName: record.jxlName, tjKftkzt: '0' })">
<span @click="openDetail({ jxlName: record.jxlName, tjKftkzt:'1' })">
{{ record.child.filter(x => x.sfyx == 0).length || 0 }}
</span>
</template>
</a-table-column>
<a-table-column title="设备异常" data-index="_">
<a-table-column title="设备异常2" 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>
@ -491,11 +491,11 @@
<a v-else-if="record.sfyx == 0" @click="changeKt(record,false)">关闭前台展示</a>
<a v-if="record.tjKftkzt == 0" @click="changeKftk(record,'1')"> | 开放听课</a>
<a v-else-if="record.tjKftkzt == 1" @click="changeKftk(record,'0')"> | 关闭听课</a>
<a @click="changeSdjc(record)"> | 手动检测</a>
<!-- <a @click="changeSdjc(record)"> | 手动检测</a> -->
<a-button type="link" style="padding: 0" @click="jcZhiHuiJiaoShi(record)">检测教室 |</a-button>
<a-button type="link" style="padding: 0" v-if="!record.forceState || record.forceState == 'red'" @click="changeFlag(record, 'green')">标记为有效 |</a-button>
<a-button type="link" style="padding: 0" v-if="record.forceState == 'green'" @click="changeFlag(record, 'red')">标记为无效 |</a-button>
<a-button type="link" style="padding: 0" v-if="!record.forceState || record.forceState == 'red'" @click="changeFlag(record, 'green')">标记为有效 </a-button>
<a-button type="link" style="padding: 0" v-if="record.forceState == 'green'" @click="changeFlag(record, 'red')">标记为无效 </a-button>
<!-- {{ record.id }} -->
</template>
@ -507,7 +507,7 @@
<a-button type="link" style="padding: 0" disabled v-else-if="record.sfyx == 0" @click="changeKt(record,false)">关闭前台展示</a-button>
<a-button v-if="record.tjKftkzt == 0" @click="changeKftk(record,'1')"> | 开放听课</a-button>
<a-button v-else-if="record.tjKftkzt == 1" @click="changeKftk(record,'0')"> | 关闭听课</a-button>
<a-button @click="changeSdjc(record)"> | 手动检测</a-button>
<!-- <a-button @click="changeSdjc(record)"> | 手动检测</a-button> -->
<a-button type="link" style="padding: 0" disabled @click="jcZhiHuiJiaoShi(record)">检测教室 |</a-button>
<a-button type="link" style="padding: 0" disabled v-if="!record.forceState || record.forceState == 'red'" @click="changeFlag(record, 'green')">标记为有效 |</a-button>
@ -1254,7 +1254,10 @@ function changeFlag(record, flag){
defHttp.post({ url: '/jiaoshi/kcZhihuijiaoshiStateLog/updateByJsbh', params: {
jsbh: record.jsbh,
forceState: flag
}});
}}).then(res => {
queryParam.value.jxlName = null;
loadData();
});
}
function tableChange(pagination) {