Browse Source

设备详情

oyq28 1 năm trước cách đây
mục cha
commit
d0f69b3baf
1 tập tin đã thay đổi với 15 bổ sung31 xóa
  1. 15 31
      src/main/resources/static/admin/bigScreen/index.html

+ 15 - 31
src/main/resources/static/admin/bigScreen/index.html

@@ -123,28 +123,14 @@
 <script type="text/javascript">
     // 假设设备信息的容器元素是一个 <div> 标签,并具有类名 "data_bottom"
     const container = document.querySelector('.data_bottom');
-    var requestData;
+    var requestData = {
+        // 根据你的后端要求构建 PageParam 对象
+        pageParam: {
+            // 可能需要添加具体的属性值,比如 pageSize, pageNumber 等等
+            "openPage": "NO"
+        }
+    };
     function init(){
-        callAPI();
-        // 首次调用函数开始刷新
-        refreshPage();
-    }
-    function refreshPage() {
-        setTimeout(function() {
-            location.reload(true); // 重新加载页面,参数为 true 表示强制从服务器重新加载
-            callAPI();
-        }, 10000); // 设置10秒钟的定时器
-    }
-
-
-    function callAPI() {
-        requestData = {
-            // 根据你的后端要求构建 PageParam 对象
-            pageParam: {
-                // 可能需要添加具体的属性值,比如 pageSize, pageNumber 等等
-                "openPage": "NO"
-            }
-        };
         $.ajax({
             url:"/admin/page/crudQuery/aDevice",
             type: "POST", // 指定请求类型为 POST
@@ -167,28 +153,25 @@
                     newDeviceDiv.innerHTML = `
                     <div class="main_title">
                       <img src="../picture/t_7.png" alt="">
-                      ${device.deviceName ? device.deviceName : '未知'}
+                      ${device.deviceName}
                     </div>
                     <div class="main_table t_btn8" id=\"${device.id}\">
-                      <img src="../picture/device/`+device.deviceModel+`.jpg" ">
+                      <img src="../picture/jichuang.jpg">
                       <table>
                                 <thead>
                                 <tr>
                                     <th>设备状态</th>
-                                    <th>${device.deviceState}</th>
+                                    <th>空闲</th>
                                 </tr>
                                 </thead>
                                 <tbody>
                                 <tr>
-                                    <td>设备厂家</td>
-                                    <td>${device.factory? device.factory : '未知'}</td>
+                                    <td>设备名称</td>
+                                    <td>${device.deviceName}</td>
                                 </tr>
                                 <tr>
                                     <td>型号</td>
-                                    <td>${device.deviceModel? device.deviceModel : '未知'}</td>
-                                </tr>
-                                    <td>主程序号</td>
-                                    <td>${device.mainProg}</td>
+                                    <td>${device.deviceModel}</td>
                                 </tr>
                                     <td>主程序号</td>
                                     <td>${device.mainProg}</td>
@@ -254,8 +237,9 @@
         });
     }
 
-    init();
 
+
+    init();
 </script>