From 829f5116884f98643ffc5b2a548a600d40c0cedb Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 14 四月 2025 23:09:32 +0800
Subject: [PATCH] 处理图片显示问题
---
src/views/smoke/realTime/components/devices.vue | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 156 insertions(+), 3 deletions(-)
diff --git a/src/views/smoke/realTime/components/devices.vue b/src/views/smoke/realTime/components/devices.vue
index 17bcab3..20757f5 100644
--- a/src/views/smoke/realTime/components/devices.vue
+++ b/src/views/smoke/realTime/components/devices.vue
@@ -1,13 +1,166 @@
<template>
-
+ <div>
+ <div class="title">璁惧淇℃伅</div>
+ <div style="width: 100%; overflow-x: scroll">
+ <el-table
+ border
+ stripe
+ ref="multipleTable"
+ :header-cell-style="{
+ background: '#F5F5F5',
+ 'font-weight': '650',
+ 'line-height': '45px'
+ }"
+ :data="tableData"
+ :row-class-name="tableRowClassName"
+ >
+ <el-table-column prop="MN" label="璁惧缂栫爜" min-width="120px">
+ </el-table-column>
+ <el-table-column
+ prop="Locale.Name"
+ label="鐩戞祴鐐�"
+ min-width="150px"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="LocaleNameStr"
+ label="鎵�灞炲崟浣�"
+ min-width="120px"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="SubtypeStr"
+ label="璁惧绫诲瀷"
+ min-width="120px"
+ >
+ </el-table-column>
+ <el-table-column prop="ModelStr" label="鍨嬪彿" min-width="95px">
+ </el-table-column>
+ <el-table-column prop="Brand" label="鍝佺墝" min-width="95px">
+ </el-table-column>
+ <el-table-column prop="Sim" label="SIM鍗�" min-width="95px">
+ </el-table-column>
+ </el-table>
+ </div>
+
+ <div class="title">鐩戞祴鐐硅繍缁存儏鍐�</div>
+ <div style="width: 100%; overflow-x: scroll">
+ <el-table
+ border
+ stripe
+ ref="multipleTable"
+ :header-cell-style="{
+ background: '#F5F5F5',
+ 'font-weight': '650',
+ 'line-height': '45px'
+ }"
+ :data="tableData2"
+ :row-class-name="tableRowClassName"
+ >
+ <el-table-column prop="hour_str" label="鐩戞祴鐐�" width="100px">
+ </el-table-column>
+ <el-table-column
+ prop="hour_str"
+ label="鐩戞祴鐐瑰湴鍧�"
+ min-width="150px"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="hour_str"
+ label="缁存姢绫诲瀷"
+ min-width="150px"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="hour_str"
+ label="璁惧缂栧彿"
+ min-width="150px"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="hour_str"
+ label="娲惧崟鏃ユ湡"
+ min-width="150px"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="hour_str"
+ label="澶勭悊鏃ユ湡"
+ min-width="150px"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="hour_str"
+ label="杩愮淮浜哄憳"
+ min-width="150px"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="hour_str"
+ label="鎿嶄綔鐘舵��"
+ min-width="150px"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="hour_str"
+ label="鏌ョ湅璇︽儏"
+ min-width="150px"
+ >
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
</template>
<script>
+import statisticsApi from "@/api/smoke/statistics";
export default {
+ data() {
+ return {
+ tableData: [],
+ tableData2: []
+ }
+ },
+ created() {
+ this.getData();
+ },
+ methods: {
+ getData() {
+ let param = {
+ field: "devices",
+ localeId: this.inTimeData.Lid
+ }
+ statisticsApi.getDocument(param).then(jsonStr => {
+ const res = JSON.parse(jsonStr)
+ let list = res.Data
+ list.forEach(o => {
+ o.LocaleNameStr = o.Locale.Name.substring(0, o.Locale.Name.length - 3)
+ o.SubtypeStr = o.Subtype == 3 ? '妫�娴嬩华璁惧' : '-'
+ o.ModelStr = o.Model == 2 ? 'MRJC-YY-A01' : '-'
+ });
+ this.tableData = list
+ })
+
+ },
+ // 璁剧疆琛ㄦ牸鏂戦┈绾�
+ tableRowClassName({ row, rowIndex }) {
+ if ((rowIndex + 1) % 2 == 0) {
+ return "warning-row";
+ } else {
+ return "success-row";
+ }
+ return "";
+ },
+ },
+ props: ['inTimeData']
}
</script>
-
<style>
-
+.title {
+ line-height: 1;
+ text-align: left;
+ font-size: 20px;
+ margin: 5px 0px;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0