From e1ac04b42be89ca26ff5f94c17c4e2eebe52a0a2 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期二, 03 一月 2023 09:52:39 +0800
Subject: [PATCH] Merge branch 'dev1.0' of ssh://42.193.1.25:29418/sccg_ui into dev1.0

---
 src/views/operate/video/index.vue |  100 +++++++++++++++++++++++++++++--------------------
 1 files changed, 59 insertions(+), 41 deletions(-)

diff --git a/src/views/operate/video/index.vue b/src/views/operate/video/index.vue
index c6b0890..5968ca9 100644
--- a/src/views/operate/video/index.vue
+++ b/src/views/operate/video/index.vue
@@ -17,10 +17,10 @@
           <div class="findBtn">
             <el-button type="primary" @click="searchVideoList">鏌ヨ</el-button>
           </div>
-          <div class="findBtn">
-            <el-button class="button-addition" type="primary" @click="handleOpera(null, 'create')">娣诲姞</el-button>
-          </div>
         </div>
+        <div class="addBtn">
+            <el-button type="primary" @click="handleOpera(null, 'create')">鏂板</el-button>
+          </div>
       </div>
     </header>
     <main>
@@ -39,9 +39,6 @@
         <el-table
           ref="multipleTable"
           :header-cell-style="{
-            background: '#06122c',
-            'font-size': '12px',
-            color: '#4b9bb7',
             'font-weight': '650',
             'line-height': '45px',
           }"
@@ -50,7 +47,7 @@
           :row-class-name="tableRowClassName"
           @selection-change="tableChange"
         >
-          <el-table-column type="selection" min-width="5"> </el-table-column>
+          <el-table-column v-show="mystatus == 1" type="selection" min-width="5" :selectable="selectable"> </el-table-column>
           <el-table-column prop="code" label="鎵�灞炰簨浠剁紪鍙�" min-width="18">
           </el-table-column>
           <el-table-column prop="category" label="闂绫诲埆" min-width="8">
@@ -112,8 +109,6 @@
               <el-select
                 v-model="myIdx"
                 placeholder="鎵归噺鎿嶄綔"
-                @change="selectChange"
-                disabled
               >
                 <el-option
                   v-for="item in options"
@@ -121,6 +116,7 @@
                   :label="item.label"
                   :value="item.value"
                   :disabled="item.disabled"
+                  @click.native="selectChange"
                 >
                 </el-option>
               </el-select>
@@ -148,6 +144,7 @@
 import { CATEGOTY, EVENT_SOURCE } from "@/utils/helper";
 
 export default {
+  name: 'video-upload-page',
   components: { updateInterface },
   data() {
     return {
@@ -171,14 +168,14 @@
           label: "鎵归噺鎿嶄綔",
           disabled: true,
         },
-        {
-          value: 1,
-          label: "鎵归噺鍚敤",
-        },
-        {
-          value: 2,
-          label: "鎵归噺绂佺敤",
-        },
+        // {
+        //   value: 1,
+        //   label: "鎵归噺鍚敤",
+        // },
+        // {
+        //   value: 2,
+        //   label: "鎵归噺绂佺敤",
+        // },
         {
           value: 3,
           label: "鎵归噺鍒犻櫎",
@@ -188,7 +185,7 @@
       typeList: [
         {
           name: "鎽勫儚澶存帹閫�",
-          value: null,
+          value: "01",
           checked: true,
         },
         {
@@ -226,22 +223,35 @@
     },
     // 鎵归噺鍒犻櫎
     mulDelete(idArr) {
-      videoManagement.deleteVideoRescources({ ids: idArr })
-          .then(() => {
-            this.$message.success('鎿嶄綔鎴愬姛');
-            this.searchVideoList();
-          })
-          .catch(err => {
-            this.$message.error(`${err}`);
-          })
+      this.$confirm("鎮ㄧ‘瀹氳鎵归噺鍒犻櫎瑙嗛鍚�?")
+                .then((_) => {
+                    this.$axios({
+                        method: "delete",
+                        url: "/sccg/video_resources/deletion_batch?ids=" + idArr,
+                    }).then((res) => {
+                        if (res.code === 200) {
+                            this.$message({
+                                type: "success",
+                                message: "鎵归噺鍒犻櫎瑙嗛鎴愬姛",
+                            });
+                            this.searchVideoList();
+                        } else {
+                            this.$message({
+                                type: "error",
+                                message: res.message,
+                            });
+                        }
+                    });
+                })
+                .catch((err) => {
+                    console.log(err);
+                });
     },
     // 鎵ц涓嬫媺妗嗘搷浣�
     selectChange(list) {
       if (this.tempList.length !== 0) {
-        if (list === 3) {
           this.preMyIdx = list;
           this.mulDelete(this.tempList);
-        }
       } else {
         this.myIdx = this.preMyIdx;
         this.$message({
@@ -254,7 +264,7 @@
     tableChange(list) {
       this.tempList = [];
       list.forEach((item) => {
-        this.tempList.push(item.code);
+        this.tempList.push(item.id);
       });
       this.all = list.length === this.tableData.length;
     },
@@ -341,7 +351,14 @@
 
     getEventSource(value) {
       return EVENT_SOURCE.find(item => item.value === value);
-    }
+    },
+    selectable(row,index){
+         if(this.mystatus == '1'){
+           return false;//绂佺敤鐘舵��
+         }else{
+           return true;//闈炵鐢ㄧ姸鎬�
+         }
+    },
   },
 };
 </script>
@@ -353,7 +370,7 @@
   color: #4b9bb7;
 
   header {
-    background-color: #09152f;
+    background-color: white;
 
     .headerContent {
       padding: 0 40px;
@@ -375,7 +392,7 @@
           color: #1d3f57;
 
           &::v-deep .el-input__inner {
-            background-color: #09152f;
+            // background-color: #09152f;
             border: 1px solid #17324c;
           }
         }
@@ -395,7 +412,7 @@
       }
 
       .addBtn {
-        background-color: #eb5d01;
+        // background-color: #eb5d01;
         border: none;
         border-radius: 20px;
         padding: 12px 30px;
@@ -404,12 +421,12 @@
   }
 
   &::v-deep .el-input__inner {
-    background-color: #09152f;
+    // background-color: #09152f;
     border: 1px solid #17324c;
   }
 
   main {
-    background-color: #09152f;
+    // background-color: #09152f;
     margin-top: 20px;
     padding-bottom: 50px;
 
@@ -435,9 +452,10 @@
       }
 
       .is-active {
-        background-color: #070f22;
+        // background-color: #070f22;
         border-radius: 4px;
-        color: #fff;
+            color: #333;
+        font-size: 500;
       }
     }
 
@@ -491,7 +509,7 @@
           &::v-deep li,
           &::v-deep .btn-prev,
           &::v-deep .btn-next {
-            background-color: #071f39;
+            // background-color: #071f39;
             color: #4b9bb7;
           }
 
@@ -504,8 +522,8 @@
     }
 
     .el-table {
-      color: #4b9bb7;
-      font-size: 10px;
+      // color: #4b9bb7;
+      // font-size: 10px;
 
       &::v-deep .cell {
         text-overflow: ellipsis;
@@ -532,7 +550,7 @@
   }
 
   :deep(.el-range-input) {
-    background-color: #09152f;
+    // background-color: #09152f;
   }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0