소스 검색

设备刷新

whj 4 년 전
부모
커밋
4b505cee7a
5개의 변경된 파일61개의 추가작업 그리고 19개의 파일을 삭제
  1. BIN
      public/img/beautiful.png
  2. BIN
      public/img/beautiful2.png
  3. BIN
      public/img/reflash.png
  4. 31 10
      public/testweb/testdevice.html
  5. 30 9
      public/testweb/upgrade.html

BIN
public/img/beautiful.png


BIN
public/img/beautiful2.png


BIN
public/img/reflash.png


+ 31 - 10
public/testweb/testdevice.html

xqd xqd xqd xqd xqd
@@ -166,18 +166,28 @@
             border: 1px solid #efefef;
             padding: 0 .3rem;
         }
+
+        .bg-image{
+            background-image:url(/img/beautiful.png);
+            background-size: cover;
+            background-repeat: no-repeat;
+        }
+        .bg-image1{
+            background-image:url(/img/beautiful2.png);
+            background-size: cover;
+            background-repeat: no-repeat;
+        }
     </style>
 </head>
 
-<body>
-
-    <div id="main">
+<body >
+    <div id="main" :class="isbg?'bg-image1':'bg-image'" style="height: 20rem">
         <div v-if="findBox" style="display: flex;flex-direction: column;align-items: center;">
-            <h1 style="font-size: 0.7rem;text-align: center;margin-bottom: .5rem;">绿色地球定时定点设备调试</h1>
-            <input type="text" class="inputstyle" v-model="value" placeholder="请输入设备编号">
+<!--            <h1 style="font-size: 0.7rem;text-align: center;margin-bottom: .5rem;">绿色地球定时定点设备调试</h1>-->
             <div v-for="(item,index) in list" style="font-size: .5rem;margin-top: .3rem;" @click="tapvalue(item)">
                 {{item}}
             </div>
+            <input type="text" class="inputstyle" v-model="value" placeholder="请输入设备编号">
             <button class="dlbutton" style="margin-top: .8rem;" @click="btnfun()">搜索</button>
         </div>
         <!-- <div v-if="isshezhi" style="margin-top: 1rem; text-align: center">
@@ -201,11 +211,16 @@
                 <div class="bianhao" style="padding-top: 0;">
                     设备型号:{{xiangti}}
                 </div>
-                <div class="bianhao" style="padding-top: 0;display: flex;justify-content: space-between;">
-                    <span> 在线情况:{{isstatus}}</span> <span>版本号:{{arrdata.version}}</span>
+                <div class="bianhao" style="padding-top: 0;">
+                    <span>在线情况:{{isstatus}}</span>
                 </div>
                 <div class="bianhao" style="padding-top: 0;">
-                    示意图:
+                    &nbsp&nbsp&nbsp<span>版本号:{{arrdata.version}}</span>
+                </div>
+
+                <div class="bianhao" style="padding-top: 0;display: flex;align-items: center;justify-content: space-between;">
+                    &nbsp&nbsp&nbsp示意图:
+                    <img src="/img/reflash.png" style="width: 2.54rem;height: .88rem" @click="btnfun()">
                 </div>
                 <div style="text-align: center;">
                     <img v-bind:src="devceImg" alt="" style="width: 7rem;height: 4rem;">
@@ -224,7 +239,11 @@
                         </div>
                     </button>
                     <div style="font-size: .3rem;padding-top: .1rem;padding-bottom: .1rem;margin-top: .3rem;">
-                        点击【开始测试】,全部箱体立即锁死,每15秒锁位状态改变一次
+<!--                        点击【开始测试】,全部箱体立即锁死,每15秒锁位状态改变一次-->
+                        <p>操作说明:</p>
+                        <p>开始测试:全部箱体立即锁死,每15s锁位状态改变一次</p>
+                        <p>停止测试:全部箱体立即停止接收命令,恢复为关门状态</p>
+                        <p style="color: red;">注意:停止测试命令,仅能在锁状态变化的5s过后才有效</p>
                     </div>
                 </div>
                 <!-- <div class="bianhao" style="padding-top: 0; margin-top: .4rem; border-bottom: 0.01rem solid #efefef;">
@@ -290,7 +309,8 @@
                 isstatus: "",
                 Numarr: [],
                 list: [],
-                istrue: false
+                istrue: false,
+                isbg:false
             },
             mounted() {
                 // this.getData("866222053211317")
@@ -342,6 +362,7 @@
                                 this.typevalue = res.data.data.device_type
                                 this.findBox = false;
                                 this.isbox = true
+                                this.isbg = true
                                 this.getData()
                             }
                         })

+ 30 - 9
public/testweb/upgrade.html

xqd xqd xqd xqd xqd xqd xqd
@@ -6,11 +6,14 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>设备调试</title>
     <style>
+        *{
+            margin: 0;
+            padding: 0;
+        }
         #main {
             display: flex;
             justify-content: center;
             align-items: center;
-            height: 15rem;
             padding: 0 .5rem;
         }
 
@@ -28,6 +31,7 @@
             justify-content: center;
             align-items: center;
             flex-direction: column;
+            margin-top: 4rem;
         }
 
         .btnstyle {
@@ -38,13 +42,27 @@
             background-color: rgb(118, 206, 169);
             color: #fff;
             border-radius: .8rem;
-            margin-top: .3rem;
+            margin-top: .8rem;
+        }
+
+        .btncolor {
+            background: white !important;
+        }
+        .bg-image{
+            background-image:url(/img/beautiful.png);
+            background-size: cover;
+            background-repeat: no-repeat;
+        }
+        .bg-image1{
+            background-image:url(/img/beautiful2.png);
+            background-size: cover;
+            background-repeat: no-repeat;
         }
     </style>
 </head>
 
 <body>
-    <div id="main">
+    <div id="main" :class="isbg?'bg-image1':'bg-image'" style="height: 20rem">
         <div class="container" v-if="isInstall">
             <div v-if="list.length!=0">
                 <div v-for="(item,index) in list" :key="index" style="font-size: .5rem;margin-top: .3rem;"
@@ -55,16 +73,16 @@
             <input class="inputstyle" type="text" v-model="value" placeholder="请输入你需要升级的设备IMEI号码">
             <button class="btnstyle" @click="installbtn">点击搜索</button>
         </div>
-        <div v-if="isshezhi" style="margin-top: 1rem; text-align: center">
-            <h1 style="font-size: 0.7rem;text-align: center">绿色地球</h1>
-            <input type="text" class="inputstyle" disabled v-model="value" placeholder="">
+        <div v-if="isshezhi" style="margin-top: 6rem; text-align: center">
+<!--            <h1 style="font-size: 0.7rem;text-align: center">绿色地球</h1>-->
+            <input type="text" class="inputstyle btncolor"  disabled v-model="value" placeholder="">
             <div v-if="phonedata.length!=0">
                 <div v-for="(item,index) in phonedata" :key="index" style="font-size: .5rem;margin-top: .3rem;"
                     @click="tapphone(item)">
                     {{item}}
                 </div>
             </div>
-            <input type="text" class="inputstyle" v-model="phone" placeholder="请输入DTU绑定手机卡号">
+            <input type="text" class="inputstyle"  v-model="phone" placeholder="请输入DTU绑定手机卡号">
             <br />
             <select class="inputstyle" v-model="typevalue" @change="changeProduct($event)">
                 <option value="0">请选择</option>
@@ -88,6 +106,7 @@
             <div style="margin-top: .4rem;width: 100%;text-align: center;">
                 <button class="btnstyle" @click="resetbtn">重置设备</button>
                 <button class="btnstyle" @click="upbtn">升级程序</button>
+                <button class="btnstyle" @click="installbtn">刷新设备</button>
             </div>
             <div style="font-size: .3rem;margin-top: .4rem;">
                 备注:
@@ -124,7 +143,8 @@
                 isbox: false,
                 isshezhi: false,
                 phoneList: [],
-                phonedata: []
+                phonedata: [],
+                isbg:false
             },
             mounted() {
                 this.getNum()
@@ -231,12 +251,13 @@
                                     console.log("进来了")
                                     this.isInstall = false
                                     this.isbox = true
+                                    this.isbg = true
                                     this.equipment = res.data.data.id
                                     this.isxian = res.data.data.status
                                     this.versionNum = res.data.data.version
                                     this.isnew = res.data.data.is_last
                                     this.typevalue = res.data.data.device_type
-                                } else if (res.data.data.phone == null && res.data.data.device_type == null) {
+                                } else if (res.data.data.phone == null || res.data.data.device_type == null) {
                                     console.log("进来了")
                                     this.isInstall = false
                                     this.isshezhi = true