From 2eb1ca2d94a09c2d3ced69de28de72d2d6d77d8e Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 03 三月 2022 15:57:28 +0800
Subject: [PATCH] 国标录像支持多端同时播放

---
 web_src/src/components/MediaServerManger.vue |   35 ++++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/web_src/src/components/MediaServerManger.vue b/web_src/src/components/MediaServerManger.vue
index 19674d1..c412bcb 100644
--- a/web_src/src/components/MediaServerManger.vue
+++ b/web_src/src/components/MediaServerManger.vue
@@ -18,13 +18,17 @@
               <div class="card-img-zlm"></div>
               <div style="padding: 14px;text-align: left">
                 <span style="font-size: 16px">{{item.id}}</span>
+                <el-button v-if="!item.defaultServer" icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">缂栬緫</el-button>
+                <el-button v-if="item.defaultServer" icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">鏌ョ湅</el-button>
+                <el-button icon="el-icon-delete" style="margin-right: 10px;padding: 0;float: right;" type="text" @click="del(item)">绉婚櫎</el-button>
                 <div style="margin-top: 13px; line-height: 12px; ">
-                  <span style="font-size: 14px; color: #999; margin-top: 5px">鍒涘缓鏃堕棿锛�  {{item.createTime}}</span>
-                  <el-button icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">缂栬緫</el-button>
+                  <span style="font-size: 14px; color: #999; margin-top: 5px; ">{{item.ip}}</span>
+                  <span style="font-size: 14px; color: #999; margin-top: 5px; float: right;">{{item.createTime}}</span>
                 </div>
               </div>
               <i v-if="item.status" class="iconfont icon-online server-card-status-online" title="鍦ㄧ嚎"></i>
               <i v-if="!item.status" class="iconfont icon-online server-card-status-offline" title="绂荤嚎"></i>
+              <i v-if="item.defaultServer" class="server-card-default" >榛樿</i>
             </el-card>
           </el-col>
         </el-row>
@@ -88,6 +92,25 @@
       edit: function (row){
         this.$refs.mediaServerEdit.openDialog(row, this.initData)
       },
+      del: function (row){
+        this.$confirm('纭鍒犻櫎姝よ妭鐐癸紵', '鎻愮ず', {
+          confirmButtonText: '纭畾',
+          cancelButtonText: '鍙栨秷',
+          type: 'warning'
+        }).then(() => {
+          this.mediaServerObj.delete(row.id, (data)=>{
+            if (data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: '鍒犻櫎鎴愬姛!'
+              });
+            }
+          })
+
+        }).catch(() => {
+        });
+
+      },
       getNumberByWidth(){
         let candidateNums = [1, 2, 3, 4, 6, 8, 12, 24]
         let clientWidth = window.innerWidth - 30;
@@ -106,7 +129,6 @@
           }
         }
 
-        console.log("aadada:    "+ resultVal)
         return resultVal;
       },
 			dateFormat: function(/** timestamp=0 **/) {
@@ -153,6 +175,13 @@
     color: #808080;
     font-size: 18px;
   }
+  .server-card-default{
+    position: absolute;
+    left: 20px;
+    top: 20px;
+    color: #808080;
+    font-size: 18px;
+  }
 	.server-card:hover {
     border: 1px solid #adadad;
   }

--
Gitblit v1.8.0