Browse Source

修改设备管理

plg 11 months ago
parent
commit
24617798c0

BIN
src/renderer/assets/manage/bg_di.png


+ 16 - 4
src/renderer/components/Animation.vue

@@ -11,7 +11,7 @@
       }" @click="singlePeople = false">双人训练</el-button>
     </div>
 
-    <div class="animation_zong">
+    <div :class="{animation_zong:singlePeople,animation_zong_shuang:!singlePeople}">
       <div class="animation_main" v-show="!singlePeople">
         <div class="animation_k" @click="goPage('/menu/animationDes', 1)">
           <img class="animation_img_cla" src="../assets/newAnimation/tianping.png" />
@@ -208,11 +208,23 @@ export default {
   font-family: PingFang SC;
   font-weight: 400;
 }
-.animation_zong{
+
+.animation_zong {
   display: flex;
   flex-direction: column;
   justify-content: space-around;
-  flex:1;
-  padding-bottom:20px;
+  /* justify-content: space-around; */
+  flex: 1;
+  padding-bottom: 20px;
+}
+
+.animation_zong_shuang {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  margin-top:54px;
+
+  flex: 1;
+  padding-bottom: 20px;
 }
 </style>

+ 3 - 2
src/renderer/components/AnimationDes.vue

@@ -448,6 +448,7 @@ export default {
     var k = 1;
     var flagAnimation = true;
     window.addEventListener("resize", function () {
+      console.log('窗口')
       // that.getSize();
       if (flagAnimation) {
         setTimeout(() => {
@@ -1673,8 +1674,8 @@ export default {
           this.delayTime();
           break;
         default:
-          this.urlThreeP = "../../../static/loong_3/index.html";
-        // this.urlThreeP = __static + "/loong_3/index.html";
+          // this.urlThreeP = "../../../static/loong_3/index.html";
+        this.urlThreeP = __static + "/loong_3/index.html";
       }
       this.gameScene = val;
       this.flag = this.gameScene;

+ 90 - 79
src/renderer/components/ManageEquipment.vue

@@ -6,8 +6,7 @@
         <el-col :span="1">&nbsp;</el-col>
         <el-col :span="10" style="text-align: left">
           <el-button size="small" class="xl_down_button" @click="addEquipment()">
-            新增设备</el-button
-          >
+            新增设备</el-button>
         </el-col>
         <el-col :span="11" style="text-align: left"> </el-col>
         <el-col :span="1">&nbsp;</el-col>
@@ -17,17 +16,11 @@
       <el-row>
         <el-col :span="1"> &nbsp;</el-col>
         <el-col :span="10">
-          <el-table
-            :data="tableData"
-            style="width: 100%"
-            @selection-change="handleSelectionChange"
-            :header-cell-style="{
-              background: '#66B497',
-              color: '#FFFFFF',
-              'letter-spacing': '4px',
-            }"
-            :row-class-name="tableRowClassName"
-          >
+          <el-table :data="tableData" style="width: 100%" @selection-change="handleSelectionChange" :header-cell-style="{
+      background: '#66B497',
+      color: '#FFFFFF',
+      'letter-spacing': '4px',
+    }" :row-class-name="tableRowClassName">
             <!-- <el-table-column type="selection" align="center" width="55">
             </el-table-column> -->
             <el-table-column prop="ID" align="center" label="id"> </el-table-column>
@@ -43,17 +36,9 @@
                   @click="singleDownload(scope.$index, scope.row)"
                   >扫描设备</el-button
                 > -->
-                <el-popconfirm
-                  confirmButtonText="确定"
-                  cancelButtonText="取消"
-                  @confirm="removeFun(scope.$index, scope.row)"
-                  icon="el-icon-info"
-                  iconColor="red"
-                  title="确定要删除该设备吗?"
-                >
-                  <el-button class="xl_d_button" size="mini" slot="reference"
-                    >删除</el-button
-                  >
+                <el-popconfirm confirmButtonText="确定" cancelButtonText="取消"
+                  @confirm="removeFun(scope.$index, scope.row)" icon="el-icon-info" iconColor="red" title="确定要删除该设备吗?">
+                  <el-button class="xl_d_button" size="mini" slot="reference">删除</el-button>
                 </el-popconfirm>
                 <!-- <el-button
                   class="xl_d_button"
@@ -67,44 +52,21 @@
         </el-col>
         <el-col :span="2">&nbsp;</el-col>
         <el-col :span="10">
-          <el-table
-            :data="mergeData"
-            style="width: 100%"
-            @selection-change="handleSelectionChange"
-            :header-cell-style="{
-              background: '#66B497',
-              color: '#FFFFFF',
-              'letter-spacing': '4px',
-            }"
-            :row-class-name="tableRowClassName"
-          >
-            <el-table-column
-              prop="rssi"
-              align="center"
-              label="信号强度"
-              :formatter="rssiFor"
-            >
+          <el-table :data="mergeData" style="width: 100%" @selection-change="handleSelectionChange" :header-cell-style="{
+      background: '#66B497',
+      color: '#FFFFFF',
+      'letter-spacing': '4px',
+    }" :row-class-name="tableRowClassName">
+            <el-table-column prop="rssi" align="center" label="信号强度" :formatter="rssiFor">
             </el-table-column>
-            <el-table-column
-              prop="deviceType"
-              align="center"
-              label="类型"
-              :formatter="typeFormatter"
-            >
+            <el-table-column prop="deviceType" align="center" label="类型" :formatter="typeFormatter">
             </el-table-column>
             <el-table-column prop="mac" align="center" label="mac"> </el-table-column>
             <el-table-column label="操作" align="center">
               <template slot-scope="scope">
-                <el-button
-                  :disabled="buttonLinkFlag"
-                  class="xl_d_button"
-                  size="mini"
-                  slot="reference"
-                  @click="linkJudge(scope.$index, scope.row, scope.row.connect)"
-                >
-                  <span v-if="scope.row.connect">断开连接</span
-                  ><span v-if="!scope.row.connect">连接</span></el-button
-                >
+                <el-button :disabled="buttonLinkFlag" class="xl_d_button" size="mini" slot="reference"
+                  @click="linkJudge(scope.$index, scope.row, scope.row.connect)">
+                  <span v-if="scope.row.connect">断开连接</span><span v-if="!scope.row.connect">连接</span></el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -124,32 +86,26 @@
       >
       </el-pagination>
     </p> -->
-    <el-dialog title="添加设备" :visible.sync="centerDialogVisible" width="30%" center>
-      <span>
+    <el-dialog :visible.sync="centerDialogVisible" width="545px" center class="dig_equi">
+      <div slot="title" class="title_di" style="width:545px">
+        <img width="545px" src="../assets/manage/bg_di.png" />
+      </div>
+      <span class="min_equi">
         <div class="equipment_class">
-          <div>选择设备:</div>
-          <el-select v-model="type" style="width: 250px" placeholder="请选择设备">
-            <el-option
-              v-for="item in options"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
+          <div style="margin-left:40px;width:120px">选择设备:&nbsp;&nbsp;</div>
+          <el-select v-model="type" style="width: 100%;margin-right:40px" placeholder="请选择设备">
+            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
         </div>
         <div class="equipment_class">
-          <div>设备mac:</div>
-          <el-input
-            style="width: 250px"
-            v-model="mac"
-            placeholder="例如DC:0D:30:03:39:05"
-          ></el-input>
+          <div style="margin-left:40px;width:120px">设备mac:&nbsp;&nbsp;</div>
+          <el-input style="width: 100%;margin-right:40px" v-model="mac" placeholder="例如DC:0D:30:03:39:05"></el-input>
         </div>
       </span>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="centerDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="addFun()">确 定</el-button>
+        <button class="cancle_add" @click="centerDialogVisible = false">取消</button>
+        <button class="com_add" @click="addFun()">确定</button>
       </span>
     </el-dialog>
   </div>
@@ -823,14 +779,14 @@ export default {
     //开启扫描扫描
     queryScan() {
       let that = this;
-      that.$http.getTmp(`/v2/device/scan`, {}, (res) => {});
+      that.$http.getTmp(`/v2/device/scan`, {}, (res) => { });
     },
 
     //关闭扫描
     closeScan() {
       this.tableVisible = false;
       let that = this;
-      that.$http.getTmp(`/v2/device/stop/scan`, {}, (res) => {});
+      that.$http.getTmp(`/v2/device/stop/scan`, {}, (res) => { });
     },
     singleDownload(index, row) {
       let baseUrl = sessionStorage.getItem("baseUrl");
@@ -913,7 +869,7 @@ export default {
       //   console.log("请求数据的list", res);
       // });
     },
-    handleDelete(index, row) {},
+    handleDelete(index, row) { },
     tableRowClassName({ rowIndex }) {
       if (rowIndex % 2 === 0) {
         return "warning-row";
@@ -932,6 +888,7 @@ export default {
   overflow-y: auto !important;
   background: #ffffff;
 }
+
 .el-input-group {
   line-height: normal;
   display: inline-table;
@@ -939,11 +896,65 @@ export default {
   border-collapse: separate;
   border-spacing: 0;
 }
+
 .equipment_class {
-  margin-top: 20px;
+  width: 100%;
+  margin-top: 30px;
   display: flex;
   flex-direction: row;
   justify-items: center;
   align-items: center;
 }
+
+.dig_equi>>>.el-dialog__header {
+  padding: 0 !important;
+}
+
+.dig_equi>>>.el-dialog {
+  border-top-left-radius: 12px;
+  border-top-right-radius: 12px;
+}
+
+.dig_equi>>>.el-dialog__headerbtn .el-dialog__close {
+  color: #ffffff;
+}
+
+.title_di {
+  width: 545px;
+  background-color: transparent;
+}
+
+.min_equi {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.cancle_add {
+  cursor: pointer;
+  width: 87px;
+  height: 45px;
+  background: #FFFFFF;
+  border-radius: 4px;
+  border: 1px solid #E5E5E5;
+  margin-right: 40px;
+  font-family: Alibaba PuHuiTi 2.0;
+  font-weight: normal;
+  font-size: 20px;
+  color: #666666;
+
+}
+
+.com_add {
+  cursor: pointer;
+  width: 87px;
+  height: 45px;
+  background-color: #5E8AF7;
+  border-radius: 4px;
+  border: 1px solid #E5E5E5;
+  color: #ffffff;
+  font-family: Alibaba PuHuiTi 2.0;
+  font-weight: normal;
+  font-size: 20px;
+}
 </style>