Merge pull request 'fix : 报警信息框loading' (#299) from dengjie into dev

Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/299
This commit is contained in:
2024-03-04 08:31:41 +00:00

View File

@@ -85,7 +85,7 @@
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
<div class="digital-tunnel" > <div class="digital-tunnel">
<el-dialog :close-on-click-modal="false" v-model="isVisited" title="报警信息" <el-dialog :close-on-click-modal="false" v-model="isVisited" title="报警信息"
width="2175px" width="2175px"
:modal="false"> :modal="false">
@@ -106,7 +106,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="device-table"> <div class="device-table">
<el-table stripe v-loading="loading" <el-table stripe v-loading="loading" :empty-text="tableEmptyText"
style="background-color: #011c29;--el-table-border-color: none;" style="background-color: #011c29;--el-table-border-color: none;"
:header-cell-style="{backgroundColor: '#064B66',color: '#fff',fontSize: '40px',borderBottom: 'none' }" :header-cell-style="{backgroundColor: '#064B66',color: '#fff',fontSize: '40px',borderBottom: 'none' }"
:data="alarmList"> :data="alarmList">
@@ -184,6 +184,7 @@ const showFan = ref(false);
const drawerLeft = ref(true); const drawerLeft = ref(true);
const showTunnelTitle = ref(true); const showTunnelTitle = ref(true);
const loading = ref(false); const loading = ref(false);
const tableEmptyText = ref("加载中~");
const initialIndex = ref(0) const initialIndex = ref(0)
const showFanLoading = ref(0) const showFanLoading = ref(0)
const showWindLoading = ref(0) const showWindLoading = ref(0)
@@ -334,6 +335,11 @@ const getAlarmList = () => {
}).then(res => { }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
loading.value = false loading.value = false
if(res.data.rows.length===0){
tableEmptyText.value='暂无数据~'
}else {
tableEmptyText.value=''
}
alarmList.value = res.data.rows alarmList.value = res.data.rows
total.value = res.data.total total.value = res.data.total
} }
@@ -688,19 +694,33 @@ const initWebSocket = () => {
margin: 820px auto 0 auto; margin: 820px auto 0 auto;
} }
} }
:deep(.el-table__body-wrapper){
:deep(.el-table__body-wrapper) {
height: 90px; height: 90px;
} }
:deep(.el-loading-mask) { :deep(.el-table--fit) {
background-color: transparent; width: auto;
.el-loading-spinner{ //height: 600px;
height: 60px; background-color: transparent!important;
.el-loading-mask{
background: rgba(6, 34, 71, 0.78);
.el-loading-spinner{
.circular{
width: 150px;
height: 150px;
}
}
} }
} }
:deep(.el-table__empty-block) { :deep(.el-table__empty-block) {
font-size: 40px; height: 200px!important;
background-color: transparent; //display: none;
.el-table__empty-text{
font-size: 60px;
color: #08B7B8;
}
} }
.digital-tunnel { .digital-tunnel {