修改危废品箱大屏

This commit is contained in:
hzz 2023-10-08 08:49:13 +08:00
parent 00f79619f9
commit 0c497a0b8f
2 changed files with 37 additions and 14 deletions

View File

@ -6,7 +6,8 @@
<div class="card-content" :class="{ noborder,'red-bg':prop.config.value>=prop.config.limit }">
<div v-if="prop.config.type == 1" class="type1">
<div class="img">
<img :src="prop.config.image">
<img :src="prop.config.image" v-if="prop.config.value<prop.config.limit">
<img :src="prop.config.image1" v-else>
</div>
<div class="text">
{{ prop.config.value }}{{ prop.config.unit }}
@ -18,7 +19,7 @@
</div>
<div class="text2">
<div class="text2-l " :class="[prop.config.value == 0?'grey':'green']"></div>
<div class="text2-r">{{ prop.config.value == 0?'关闭':'开启' }}</div>
<div class="text2-r" :class="[prop.config.value == 0?'grey':'green']">{{ prop.config.value == 0?'关闭':'开启' }}</div>
</div>
</div>
<div v-if="prop.config.type == 3" class="type3">
@ -94,7 +95,7 @@ const porptitle = computed(() => {
box-sizing: border-box;
}
.red-bg {
background-color: #2C273A;
background-color: rgba(228, 57, 97, 0.1411764705882353);
}
.noborder {
@ -160,6 +161,15 @@ const porptitle = computed(() => {
.text2-l.green {
background-color: #53FFC3;
}
.text2-r.grey {
color: #A7A6BD;
/* background-color: #A7A6BD; */
}
.text2-r.green {
color: #53FFC3;
/* background-color: #53FFC3; */
}
.text2-r {
font-size: 14px;
}

View File

@ -42,14 +42,19 @@
<ZdScrollBoard ref="devList" :config="board_config" :style="{
width: '100%',
height: '100%',
}" />
}" v-show="!isempty" />
<div v-show="isempty"
style="display: flex; align-items: center;width: 100%;height: 100%;justify-content: center;">
<el-empty :image-size="120" />
</div>
</Border>
</div>
</div>
</div>
<HDialog :tableData="dialogdata" :title="DialogTitle" v-model:dialogTableVisible="dialogTableVisible" :dialogLoading="dialogLoading"
@getDialogdatafun="getDialogdatafun" :total="dialogtotal" :type="dialogType"></HDialog>
<HDialog :tableData="dialogdata" :title="DialogTitle" v-model:dialogTableVisible="dialogTableVisible"
:dialogLoading="dialogLoading" @getDialogdatafun="getDialogdatafun" :total="dialogtotal" :type="dialogType">
</HDialog>
</div>
</template>
@ -65,6 +70,7 @@ import ZdScrollBoard from "@/components/data-view/index.vue";
import HDialog from './components/HDialog.vue';
import { getGuoJian24Trend, getAirWind, getGuoJianAlarmRecord } from '@/http/guojian/index'
import { update } from '@tweenjs/tween.js';
let timer = null
let titleTip = [
@ -88,7 +94,7 @@ const config = reactive({
type: 1,
classArr: [],
value: 0,
limit: 70,
limit: 80,
unit: '%RH'
},
wendu: {
@ -97,7 +103,7 @@ const config = reactive({
type: 1,
classArr: [],
value: 0,
limit: 30,
limit: 40,
unit: '℃'
},
kongtiao: {
@ -153,6 +159,7 @@ const calc = reactive({
xAxis: [],
})
let devList = ref()
let isempty = ref(false)
let board_config = reactive({
header: ['报警时间', '名称', '状态', '持续时长'],
headerBGC: '#081B56',
@ -269,6 +276,11 @@ async function getGuoJianAlarmRecordList() {
items.sum + '分钟',
]
})
if (updateList.length == 0) {
isempty.value = true
} else {
isempty.value = false
}
devList.value.updateRows(updateList, board_config)
}
}
@ -277,6 +289,7 @@ onMounted((() => {
getGuoJianAlarmRecordList()
timer = setInterval(() => {
getGuoJian24TrendData()
getGuoJianAlarmRecordList()
}, 1000 * 60)
}))