|
@@ -26,7 +26,8 @@
|
|
|
<div class="container-item container__label">观测时间:{{processTableFrom.data_time?processTableFrom.data_time:'--'}}</div>
|
|
|
<div class="container-item container__label">自动站状态:
|
|
|
<!-- <el-tag type="danger" size="default" hit>离线</el-tag>-->
|
|
|
- <el-tag type="success" size="default" hit>在线</el-tag>
|
|
|
+<!-- <el-tag type="success" size="default" hit>在线</el-tag>-->
|
|
|
+ --
|
|
|
</div>
|
|
|
<div class="container-item container__label">站址:{{addressLabel(selectedItem)}}</div>
|
|
|
</div>
|
|
@@ -39,25 +40,23 @@
|
|
|
</div>
|
|
|
<div class="card table-main">
|
|
|
<div>站台状况</div>
|
|
|
- <div class="container-device-main mt15">
|
|
|
+ <div v-if="customizeColumns&&customizeColumns.length>0" class="container-device-main mt15">
|
|
|
<template v-for="item in customizeColumns">
|
|
|
<div class="container-device-item">
|
|
|
<div class="container-text-box">
|
|
|
<div class="container-title">{{item.se_name}}</div>
|
|
|
- <div class="container-name mt15 mb15">传感器状态:</div>
|
|
|
- <div class="container-name">证书剩余时间:536天</div>
|
|
|
+ <div class="container-name mt15 mb15">传感器状态:{{getProcessValue(item.se_type)}}</div>
|
|
|
+ <div class="container-name">证书剩余时间:{{findRemainingDays(item.se_type)}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="device-img">
|
|
|
+ <img :src="getCustomImg(item.se_type)" class="device-img">
|
|
|
</div>
|
|
|
- <div class="device-img"></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <div class="container-device-item">
|
|
|
- <div class="container-text-box">
|
|
|
- <div class="container-title">超声风传感器</div>
|
|
|
- <div class="container-name mt15 mb15">传感器状态:</div>
|
|
|
- <div class="container-name">证书剩余时间:536天</div>
|
|
|
- </div>
|
|
|
- <div class="device-img"></div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <div v-else class="no-data">
|
|
|
+ <img src="/src/assets/images/notData.png" alt="notData">
|
|
|
+ <div class="no-data-title">暂无数据</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 添加或修改对话框 -->
|
|
@@ -133,11 +132,35 @@ import img1700 from "@/assets/images/single/1700.png"
|
|
|
import { getPlatformList, getStaitemList, getYallSensorList} from "@/api/modules/allData";
|
|
|
import {onMounted, reactive, ref} from "vue";
|
|
|
import {Platform} from "@/api/interface";
|
|
|
+const getCustomImg = (iconName: string) => {
|
|
|
+ const icons = {
|
|
|
+ 0: img0,
|
|
|
+ 100: img100,
|
|
|
+ 200: img200,
|
|
|
+ 300: img300,
|
|
|
+ 400: img400,
|
|
|
+ 500: img500,
|
|
|
+ 600: img600,
|
|
|
+ 700: img700,
|
|
|
+ 800: img800,
|
|
|
+ 900: img900,
|
|
|
+ 1000: img1000,
|
|
|
+ 1100: img1100,
|
|
|
+ 1200: img1200,
|
|
|
+ 1300: img1300,
|
|
|
+ 1400: img1400,
|
|
|
+ 1500: img1500,
|
|
|
+ 1600: img1600,
|
|
|
+ 1700: img1700,
|
|
|
+ };
|
|
|
+ return icons[iconName] || null;
|
|
|
+};
|
|
|
+
|
|
|
const pageable = ref<any>({
|
|
|
data_type: true,
|
|
|
time_order: undefined,
|
|
|
time_space: 1,
|
|
|
- as_code_list:['61000'],
|
|
|
+ as_code_list:[],
|
|
|
state_list: [
|
|
|
0,
|
|
|
1,
|
|
@@ -150,6 +173,27 @@ const pageable = ref<any>({
|
|
|
|
|
|
const processTableData = ref([]);
|
|
|
const processTableFrom = ref({});
|
|
|
+const certData = ref([]);
|
|
|
+
|
|
|
+const findRemainingDays = (inputSeType) => {
|
|
|
+ const selectedCert = certData.value.find(cert => cert.se_type === parseInt(inputSeType));
|
|
|
+ if (selectedCert) {
|
|
|
+ const currentTime = Math.floor(Date.now() / 1000);
|
|
|
+ const remainingSeconds = selectedCert.cal_date_i - currentTime;
|
|
|
+ return Math.ceil(remainingSeconds / (60 * 60 * 24))+'天';
|
|
|
+ } else {
|
|
|
+ return '--'
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const getProcessValue=(param)=>{
|
|
|
+ if (!processTableFrom.value) {
|
|
|
+ console.error('processTableFrom is null or undefined');
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ const valve = processTableFrom.value[param] !== undefined ? processTableFrom.value[param] : null;
|
|
|
+ return getLabelByValue(valve);
|
|
|
+}
|
|
|
|
|
|
const sensorList =ref<any>([])
|
|
|
// 被选中当条数据下标
|
|
@@ -382,5 +426,17 @@ function addressLabel(item) {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+.no-data{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 200px
|
|
|
+}
|
|
|
|
|
|
+.no-data-title{
|
|
|
+ margin-top: 12px;
|
|
|
+ color: var(--el-text-color-secondary);
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
</style>
|