Эх сурвалжийг харах

Merge branch 'sit' of daiyanrong/live-telecast-ui-pc into master

戴艳蓉 3 жил өмнө
parent
commit
928515b8bf

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/index.html


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/css/chunk-2e7fc444.93e41db1.css


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/app.7a4d56b9.js


BIN
dist/static/js/app.7a4d56b9.js.gz


BIN
dist/static/js/app.7bfcaa52.js.gz


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-2e7fc444.75e64ff5.js


BIN
dist/static/js/chunk-2e7fc444.75e64ff5.js.gz


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-32b89fd5.44f1a0f6.js


BIN
dist/static/js/chunk-32b89fd5.44f1a0f6.js.gz


+ 7 - 0
src/apis/service/videos/videoList/index.js → src/apis/service/mobile/videos/index.js

@@ -10,5 +10,12 @@ export default {
   change: (data, params) => http(api + 'Change', data, 'post', params),
   //删除项目
   delete: (data, params) => http(api + 'Delete', data, 'post', params),
+ 
+   // 编辑视频
+   update: (data, params) => http(api + 'Edit', data, 'post', params),
+   // 添加
+   add: (data, params) => http(api + 'Create', data, 'post', params),
+   // 详情
+   detail: (data, params) => http(api + 'Read', data, 'post', params),
 
 }

+ 0 - 15
src/apis/service/videos/videoCreate/index.js

@@ -1,15 +0,0 @@
-import http from '@/apis/axios'
-const api = 'admin/'
-export default {
- 
-  // 查询列表
-  list: (data, params) => http(api + 'video', data, 'post', params),
-  // 编辑视频
-  edit: (data, params) => http(api + 'Edit', data, 'post', params),
-  // 添加
-  add: (data, params) => http(api + 'Create', data, 'post', params),
-  // 详情
-  detail: (data, params) => http(api + 'Read', data, 'post', params),
-
-
-}

+ 17 - 4
src/config/env.development.js

@@ -1,16 +1,29 @@
 // 本地
 module.exports = {
+  // title: '五常稻田',
+  // baseUrl: 'http://localhost:8080',
+  // api: {
+  //   baseApi: 'http://www.fivechang.com/',
+  // },
+  // fileURL: `https://api2.edusit.zretchome.com`,
+  // appId: 'wx5ac3a2c2d72b6f26',
+  // ding: {
+  //   //企业id
+  //   CorpId: "dingc78fa4301e1a424a35c2f4657eb6378f",
+  //   //应用凭证
+  //   AgentId: "1184953963"
+  // }
   title: '五常稻田',
-  baseUrl: 'http://localhost:8080',
+  baseUrl: 'http://wx.wxhr.sit.futurelab.tv',
   api: {
-    baseApi: 'http://www.fivechang.com/',
+    baseApi: 'http://five.sit.wanyuhengtong.com/',
   },
-  fileURL: `https://api2.edusit.zretchome.com`,
+  fileURL: `https://api2.edu.futurelab.tv`,
   appId: 'wx5ac3a2c2d72b6f26',
   ding: {
     //企业id
     CorpId: "dingc78fa4301e1a424a35c2f4657eb6378f",
     //应用凭证
-    AgentId: "1184953963"
+    AgentId:"1184953963"
   }
 }

+ 141 - 129
src/views/mobile/videos/addEdit.vue

@@ -33,7 +33,7 @@
             <el-form-item label="视频链接" prop="video_url">
               <el-input
                 v-model="ruleForm.video_url"
-                  type="textarea"
+                type="textarea"
                 :autosize="{ minRows: 4, maxRows: 4 }"
                 placeholder="请输入视频链接"
                 :disabled="isDetail === '007'"
@@ -51,18 +51,20 @@
               />
             </el-form-item>
             <el-form-item label="视频封面" prop="video_img">
-            <div class="videoCoverBox">
-              <i
-                v-show="ruleForm.video_img !== ''&&isDetail !== '007'"
-                class="el-icon-close"
-                @click="closeImg()">
-            </i>
-            <img v-if="ruleForm.video_img !=='' " :src="ruleForm.video_img" alt="" class="videoCover">
-              <div
-                  class="btnupload"
-                  v-else
-                  style="position: relative"
-                  >
+              <div class="videoCoverBox">
+                <i
+                  v-show="ruleForm.video_img !== '' && isDetail !== '007'"
+                  class="el-icon-close"
+                  @click="closeImg()"
+                >
+                </i>
+                <img
+                  v-if="ruleForm.video_img !== ''"
+                  :src="ruleForm.video_img"
+                  alt=""
+                  class="videoCover"
+                />
+                <div class="btnupload" v-else style="position: relative">
                   <i class="el-icon-plus avatar-uploader-icon"></i>
                   <Upload
                     class="Upload"
@@ -70,14 +72,15 @@
                     :multiple="true"
                     :uploadcondition="beforeAvatarUpload"
                     @UploadErrorEvent="UploadErrorEvent"
-                    @UploadSuccessEvent="UploadSuccessEvent">
+                    @UploadSuccessEvent="UploadSuccessEvent"
+                  >
                   </Upload>
-              </div> 
-              
-            </div>
-               <div class="txt-tips fl">
+                </div>
+              </div>
+              <div class="txt-tips fl">
                 <p>
-                  <span>大小:小于5MB;</span><span>尺寸:250*160,单位:px;</span
+                  <span>大小:小于5MB;</span
+                  ><span>尺寸:250*160,单位:px;</span
                   ><span>类型:jpg.png.bmp.jpeg</span>
                 </p>
               </div>
@@ -100,9 +103,9 @@
   </el-dialog>
 </template>
 <script>
-import asyncRequest from "@/apis/service/videos/videoCreate";
+import asyncRequest from "@/apis/service/mobile/videos";
 import resToken from "@/mixins/resToken";
-import Upload from '@/components/Upload';
+import Upload from "@/components/Upload";
 export default {
   name: "videos",
   props: ["showModel", "id", "isDetail", "sitem"],
@@ -117,19 +120,19 @@ export default {
       value: [],
       list: [],
       states: [],
-      tags:[],
+      tags: [],
       disabled: false,
       loading: false,
-      loading_video_set:false,
+      loading_video_set: false,
       title: "新建视频",
       showModelThis: this.showModel,
       ruleForm: {
-        video_sn: "",//视频编号
+        video_sn: "", //视频编号
         video_name: "", // 视频名称
         video_url: "", // 视频地址
-        remark:"",//视频描述
-        video_img:"",//视频封面
-        video_set:"",//视频设置
+        remark: "", //视频描述
+        video_img: "", //视频封面
+        video_set: "", //视频设置
       },
       rulesThis: this.rules,
       rules: {
@@ -137,39 +140,49 @@ export default {
           {
             required: true,
             trigger: "blur",
-            message:"请输入视频名称"
+            message: "请输入视频名称",
+          },
+          {
+            min: 2,
+            max: 50,
+            message: "视频名称在3到50个字符",
+            trigger: "blur",
           },
-          {min:2,max:50,message:"视频名称在3到50个字符",trigger:'blur'}
         ],
         video_url: [
           {
             required: true,
             trigger: "blur",
-            message:"请输入视频地址"
+            message: "请输入视频地址",
           },
         ],
         remark: [
           {
             required: true,
             trigger: "blur",
-            message:"请输入视频描述"
+            message: "请输入视频描述",
+          },
+          {
+            min: 3,
+            max: 250,
+            message: "视频描述在3到250个字符",
+            trigger: "blur",
           },
-          {min:3,max:250,message:"视频描述在3到250个字符",trigger:'blur'}
         ],
-        video_img:[
+        video_img: [
           {
-            required:true,
-            trigger:'blur',
-            message:"请上传视频封面",
-          }
+            required: true,
+            trigger: "blur",
+            message: "请上传视频封面",
+          },
         ],
-        video_set:[
+        video_set: [
           {
-            required:false,
-            trigger:'blur',
-            message:"asdadsdsa"
-          }
-        ]
+            required: false,
+            trigger: "blur",
+            message: "asdadsdsa",
+          },
+        ],
       },
     };
   },
@@ -186,13 +199,12 @@ export default {
       }
     },
   },
-  mounted(){
-    this.list = this.states.map(item => {
-        return { value: `value:${item}`, label: `label:${item}` };
-    })
+  mounted() {
+    this.list = this.states.map((item) => {
+      return { value: `value:${item}`, label: `label:${item}` };
+    });
   },
   methods: {
-   
     async initForm() {
       this.loading = true;
       if (this.isDetail === "003") {
@@ -200,15 +212,14 @@ export default {
         this.rulesThis = this.rules;
         await this.resetForm();
       } else {
-         await this.resetForm();
         if (this.isDetail === "007") {
           this.title = "视频详情";
           this.rulesThis = {};
-        }else{
+        } else {
           this.title = "修改视频";
-        this.rulesThis = this.rules;
+          this.rulesThis = this.rules;
         }
-       
+        await this.resetForm();
         await this.initData();
       }
       this.loading = false;
@@ -229,9 +240,9 @@ export default {
           this.ruleForm = {
             video_sn: "",
             video_name: "",
-            remark:"",
+            remark: "",
             video_url: "", // 视频地址
-            video_img:"",//视频封面
+            video_img: "", //视频封面
           };
         }
       });
@@ -264,7 +275,7 @@ export default {
         } else {
           return false;
         }
-      })
+      });
     },
     UploadErrorEvent() {
       this.$message.error("图片上传失败!");
@@ -273,15 +284,16 @@ export default {
     UploadSuccessEvent(data) {
       if (data && data.url && data.url !== "break") {
         const { url, name } = data.url;
-        this.ruleForm.video_img=url
+        this.ruleForm.video_img = url;
         this.$message.success("图片上传成功!");
         this.$refs.ruleForm.validateField("video_img");
       }
     },
     beforeAvatarUpload(file) {
       let isJPG = false,
-          isLt5M = false;//判断文件的大小
-      if (file) {//传入文件
+        isLt5M = false; //判断文件的大小
+      if (file) {
+        //传入文件
         if (
           file.type === "image/jpg" ||
           file.type === "image/png" ||
@@ -301,98 +313,98 @@ export default {
       return isJPG && isLt5M;
     },
     async closeImg() {
-      this.ruleForm.video_img=''
+      this.ruleForm.video_img = "";
       this.$refs.ruleForm.validateField("video_img");
-      
     },
   },
 };
 </script>
 
 <style lang="scss" scoped>
-.videos{
- .btnupload {
-      float: left;
-      border: 1px solid rgb(220, 223, 230);
-      box-sizing: border-box;
-      width: 254px;
-      height: 164px;
-      line-height: 164px;
-      text-align: center;
-    }
-    .Upload {
-      width: 254px;
-      height: 164px;
-      line-height: 164px;
-      text-align: center;
-      position: absolute;
-      line-height: 0px;
-      top: 0;
-      left: 0;
-      z-index: 2;
-      line-height: 164px;
-    }
-    .fileUp {
-      vertical-align: top;
-    }
-    .avatar {
-      width: 254px;
-      height: 164px;
-      line-height: 164px;
-      text-align: center;
-    }
-    .avatar-uploader .el-upload:hover {
-      border-color: #409eff;
-    }
-    .avatar-uploader-icon {
-      font-size: 33px;
-      color: #8c939d;
-      width: 50px;
-      height: 50px;
-      line-height: 50px;
-      text-align: center;
-    }
-    .avatar {
-      width: 100%;
-      height: 100%;
-      display: block;
-    }
-    .txt-tips {
-      display: inline-block;
-      font-size: 13px;
-      color: #606266;
-      padding: 15px 0 0 15px;
-      p {
-        margin: 0;
-        line-height: 30px;
-        span {
-          padding: 0 15px 0 0;
-        }
+.videos {
+  .btnupload {
+    float: left;
+    border: 1px solid rgb(220, 223, 230);
+    box-sizing: border-box;
+    width: 254px;
+    height: 164px;
+    line-height: 164px;
+    text-align: center;
+  }
+  .Upload {
+    width: 254px;
+    height: 164px;
+    line-height: 164px;
+    text-align: center;
+    position: absolute;
+    line-height: 0px;
+    top: 0;
+    left: 0;
+    z-index: 2;
+    line-height: 164px;
+  }
+  .fileUp {
+    vertical-align: top;
+  }
+  .avatar {
+    width: 254px;
+    height: 164px;
+    line-height: 164px;
+    text-align: center;
+  }
+  .avatar-uploader .el-upload:hover {
+    border-color: #409eff;
+  }
+  .avatar-uploader-icon {
+    font-size: 33px;
+    color: #8c939d;
+    width: 50px;
+    height: 50px;
+    line-height: 50px;
+    text-align: center;
+  }
+  .avatar {
+    width: 100%;
+    height: 100%;
+    display: block;
+  }
+  .txt-tips {
+    display: inline-block;
+    font-size: 13px;
+    color: #606266;
+    padding: 15px 0 0 15px;
+    p {
+      margin: 0;
+      line-height: 30px;
+      span {
+        padding: 0 15px 0 0;
       }
     }
-    .avatar-uploader .el-upload {
-      border: 1px dashed #d9d9d9;
-      border-radius: 6px;
-      cursor: pointer;
-      position: relative;
-      overflow: hidden;
-    }
+  }
+  .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
 }
-.videoCover{//视频封面的容器样式
+.videoCover {
+  //视频封面的容器样式
   width: 250px;
   height: 160px;
   overflow: hidden;
   display: block;
   object-fit: cover;
 }
-.videoCoverBox{
+.videoCoverBox {
   width: 250px;
   height: 160px;
   position: relative;
   left: 0;
   top: 0;
   cursor: pointer;
-  .el-icon-close{
+  .el-icon-close {
     width: 20px;
     height: 20px;
     display: block;
@@ -403,7 +415,7 @@ export default {
   }
 }
 // 视频设置的容器
-.video-set{
+.video-set {
   width: 100%;
   height: 100px;
 }

+ 213 - 204
src/views/mobile/videos/index.vue

@@ -5,11 +5,7 @@
     >
       <ex-table
         v-loading="loading"
-        v-if="
-          powers && powers.length > 0 && powers.some((item) => item == '001')
-        "
         :table="table"
-
         :data="tableData"
         :columns="columns"
         :page="pageInfo"
@@ -25,152 +21,165 @@
           searchList();
         "
       >
-      <template #table-header="{}">
-        <el-col  style="width: 150px;">
-            <el-select
-              :size="searchSize"
-              v-model="parmValue.status"
-              placeholder="请选择状态">
-              <el-option
-                v-for="item in statusList"
-                :key="'status' + item.id"
-                :label="item.label"
-                :value="item.id"/>
-            </el-select>
-          </el-col>
-        <div style="width: 100%">
-          <el-row>
-            <el-col :span="15">
-              <el-input 
+        <template #table-header="{}">
+          <el-row  style="width:100%">
+            <el-col style="width: 150px">
+              <el-select
                 :size="searchSize"
-                placeholder="请输入内容" 
-                v-model="input" 
-                class="input-with-select">
-                  <el-select 
-                    v-model="select" 
-                    slot="prepend" 
-                    placeholder="请选择" 
-                    style="width:120px;">
-                      <el-option label="视频名称" value="1"></el-option>
-                      <el-option label="视频链接" value="2"></el-option>
-                      <el-option label="视频编号" value="3"></el-option>
-                  </el-select>
-                <el-button 
-                  slot="append" 
+                v-model="parmValue.status"
+                placeholder="视频状态"
+              >
+                <el-option
+                  v-for="item in statusList"
+                  :key="'status' + item.id"
+                  :label="item.label"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-col>
+
+            <el-col :span="15" style="width: 400px;padding:0 0 0 10px">
+              <el-input
+                :size="searchSize"
+                placeholder="请输入内容"
+                v-model="input"
+                class="input-with-select"
+              >
+                <el-select
+                  v-model="select"
+                  slot="prepend"
+                  placeholder="请选择"
+                  style="width: 120px"
+                >
+                  <el-option label="视频名称" value="1"></el-option>
+                  <el-option label="视频链接" value="2"></el-option>
+                  <el-option label="视频编号" value="3"></el-option>
+                </el-select>
+                <el-button
+                  slot="append"
                   @click.native="searchList"
-                  icon="el-icon-search">
+                  icon="el-icon-search"
+                >
                 </el-button>
               </el-input>
             </el-col>
-              <el-col
-                :span="3"
-                style="width: 60px; float: left;margin-left:10px">
-                <el-button
-                  type="warning"
-                  :size="searchSize"
-                  @click="restSearch">
-                  重置
-                </el-button>
-              </el-col>
-              <el-col
-                :span="3"
-                v-if="powers.some((item) => item == '003')"
-                style="width: 60px; float: right">
-                <el-button
-                  type="primary"
-                  :size="searchSize"
-                  @click="restSearch">
-                  搜索
-                </el-button>
-              </el-col>
-              <el-col
-                :span="2"
+            <el-col
+              :span="3"
+              style="width: 66px; float: left; margin-left: 10px"
+            >
+              <el-button type="warning" :size="searchSize" @click="restSearch">
+                重置
+              </el-button>
+            </el-col>
+            <el-col
+              :span="3"
+              v-if="powers.some((item) => item == '003')"
+              style="width: 70px; float: right"
+            >
+              <el-button type="primary" :size="searchSize" @click="restSearch">
+                搜索
+              </el-button>
+            </el-col>
+            <el-col
+              :span="2"
+              v-if="powers.some((item) => item == '003')"
+              style="width: 70px; float: right; margin-right: 10px"
+            >
+              <el-button
                 v-if="powers.some((item) => item == '003')"
-                style="width: 60px; float: right;margin-right:20px">
-                <el-button
-                  v-if="powers.some((item) => item == '003')"
-                    type="primary"
-                    :size="searchSize"
-                    @click="openModal('add', '003', {})">
-                    添加
-                </el-button>
-              </el-col>
+                type="primary"
+                :size="searchSize"
+                @click="openModal('add', '003', {})"
+              >
+                添加
+              </el-button>
+            </el-col>
           </el-row>
-        </div>
-      </template>
-      <template #operation="{ scope }">
-        <el-tooltip
-          v-if="powers.some((item) => item == '007')"
-          class="item"
-          effect="dark"
-          content="详情"
-          placement="top"
-        >
-          <i
-            class="el-icon-view tb-icon"
-            @click="openModal(scope.row.id, '007', scope.row)"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="powers.some((item) => item == '005')"
-          class="item"
-          effect="dark"
-          content="修改"
-          placement="top"
-        >
-          <i
-            class="el-icon-edit tb-icon"
-            @click="openModal(scope.row.id, '005', scope.row)"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="powers.some((item) => item == '004')&&scope.row.status==='1'"
-          class="item"
-          effect="dark"
-          content="禁用"
-          placement="top"
-          @click="openModal(scope.row.id, '004', scope.row)"
-        >
-          <i
-            class="tb-icon el-icon-error" 
-            @click="selectPop(scope.row.status,scope.row.id)"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="powers.some((item) => item == '004')&&scope.row.status!=='1'"
-          class="item"
-          effect="dark"
-          content="启用"
-          placement="top"
-          @click="openModal(scope.row.id, '004', scope.row)"
-        >
-          <i
-            class="tb-icon el-icon-success" 
-            @click="selectPop(scope.row.status,scope.row.id)"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="powers.some((item) => item == '006')"
-          class="item"
-          effect="dark"
-          content="删除"
-          placement="top"
-          @click="openModal(scope.row.id, '006', scope.row)"
-        >
-          <i
-            class="tb-icon el-icon-delete-solid" 
-            @click="deletePop(scope.row.id)"
-          ></i>
-        </el-tooltip>
-      </template>
-      <template #status="{ scope }">
+        </template>
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((item) => item == '007')"
+            class="item"
+            effect="dark"
+            content="详情"
+            placement="top"
+          >
+            <i
+              class="el-icon-view tb-icon"
+              @click="openModal(scope.row.id, '007', scope.row)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="powers.some((item) => item == '005')"
+            class="item"
+            effect="dark"
+            content="修改"
+            placement="top"
+          >
+            <i
+              class="el-icon-edit tb-icon"
+              @click="openModal(scope.row.id, '005', scope.row)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="
+              powers.some((item) => item == '004') && scope.row.status === '1'
+            "
+            class="item"
+            effect="dark"
+            content="禁用"
+            placement="top"
+            @click="openModal(scope.row.id, '004', scope.row)"
+          >
+            <i
+              class="tb-icon el-icon-error"
+              @click="selectPop(scope.row.status, scope.row.id)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="
+              powers.some((item) => item == '004') && scope.row.status !== '1'
+            "
+            class="item"
+            effect="dark"
+            content="启用"
+            placement="top"
+            @click="openModal(scope.row.id, '004', scope.row)"
+          >
+            <i
+              class="tb-icon el-icon-success"
+              @click="selectPop(scope.row.status, scope.row.id)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="powers.some((item) => item == '006')"
+            class="item"
+            effect="dark"
+            content="删除"
+            placement="top"
+            @click="openModal(scope.row.id, '006', scope.row)"
+          >
+            <i
+              class="tb-icon el-icon-delete-solid"
+              @click="deletePop(scope.row.id)"
+            ></i>
+          </el-tooltip>
+        </template>
+        <template #status="{ scope }">
           <el-tag
             :size="tablebtnSize"
-            :type="scope.row.status == '0' ? 'danger' : scope.row.status == '1'?'success':''"
+            :type="
+              scope.row.status == '0'
+                ? 'danger'
+                : scope.row.status == '1'
+                ? 'success'
+                : ''
+            "
             v-text="
               (statusList.find((item) => item.status == scope.row.status) || {})
                 .label || '--'
-            ">
+            "
+          >
           </el-tag>
         </template>
       </ex-table>
@@ -190,7 +199,7 @@
 </template>
 <script>
 import mixinPage from "@/mixins/elPaginationHandle";
-import asyncRequest from "@/apis/service/videos/videoList";
+import asyncRequest from "@/apis/service/mobile/videos";
 import ExTable from "@/components/ExTableNew.vue";
 import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
@@ -205,7 +214,10 @@ export default {
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
-      let tran = this.$store.getters.btnList.find((item) => item.menu_route == "videos") || {};
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "videos"
+        ) || {};
       if (tran && tran.action && tran.action.length > 0) {
         return tran.action;
       } else {
@@ -216,7 +228,7 @@ export default {
   data() {
     return {
       sitem: null,
-      select: "",
+      select: "1",
       input: "",
       statusList: [
         { status: "1", label: "启用" },
@@ -230,15 +242,15 @@ export default {
         page: 1, // 页码数
         size: 15, // 页容量
         status: "", //视频状态
-        video_sn: "",//视频编号
+        video_sn: "", //视频编号
         video_name: "", // 视频名称
-        video_url: "", // 视频地址        
+        video_url: "", // 视频地址
       },
       tableData: [],
       // 表格 - 数据
       table: {
-        stripe: true,//是否是斑马条纹边框
-        border: true,//是否显示纵向边框
+        stripe: true, //是否是斑马条纹边框
+        border: true, //是否显示纵向边框
         // _defaultHeader_: ["setcol"]
       },
       // 表格 - 分页
@@ -251,9 +263,9 @@ export default {
       columns: [
         {
           prop: "id",
-          label: "视频编号",
-         width: "70px",
-           fixed: "left",
+          label: "ID",
+          width: "70px",
+          fixed: "left",
         },
         {
           prop: "video_name",
@@ -266,10 +278,9 @@ export default {
         },
         {
           prop: "status",
-          label:"视频状态",
+          label: "视频状态",
           _slot_: "status",
-          width:"100px"
-          
+          width: "100px",
         },
         {
           prop: "addtime",
@@ -289,36 +300,36 @@ export default {
     };
   },
   mounted() {
-    this.searchList();//异步调用接口,请求数据
+    this.searchList(); //异步调用接口,请求数据
   },
   methods: {
-    selectPop(staus,id) {
-        this.$confirm('此操作将切换视频状态, 是否继续?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.changeBtnStatus(staus,id)
-        })
+    selectPop(staus, id) {
+      this.$confirm("此操作将切换视频状态, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        this.changeBtnStatus(staus, id);
+      });
     },
-    msgPop(){
+    msgPop() {
       this.$alert(res.msg, {
-        confirmButtonText: '确定',
-        callback: action => {
+        confirmButtonText: "确定",
+        callback: (action) => {
           this.$message({
-            type: 'info',
-            message: `action: ${ action }`
+            type: "info",
+            message: `action: ${action}`,
           });
-        }
+        },
       });
     },
-    deletePop(id){
-      this.$alert("请确认要删除吗?","提示",{
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
+    deletePop(id) {
+      this.$alert("请确认要删除吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
       }).then(() => {
-        this.deleteBtnProject(id)
+        this.deleteBtnProject(id);
       });
     },
     //-重置-输入框数据
@@ -334,12 +345,12 @@ export default {
       this.parmValue = {
         video_name: "", // 视频名称
         video_url: "", // 视频链接
-        video_sn:"",//视频编号
+        video_sn: "", //视频编号
         status: "", //视频状态
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
-      this.searchList();//请求接口数据
+      this.searchList(); //请求接口数据
     },
     // 打开弹窗,添加-详情-修改-启/禁用-删除按钮
     openModal(id, isDetail, sitem) {
@@ -348,60 +359,59 @@ export default {
       this.isDetail = isDetail;
     },
     //
-    async changeBtnStatus(status,id){
-      this.loading = false;//开启loading加载
+    async changeBtnStatus(status, id) {
+      this.loading = false; //开启loading加载
       let changeValue = {
-        id:"",
-        status:"",
+        id: "",
+        status: "",
       };
-      changeValue.status = (status === "1" ? "0" : "1");
+      changeValue.status = status === "1" ? "0" : "1";
       changeValue.id = id;
-      var res = await asyncRequest.change(changeValue);//请求更新视频接口/admin/Change
+      var res = await asyncRequest.change(changeValue); //请求更新视频接口/admin/Change
       if (res && res.code === 0 && res.data) {
         //正常响应的操作
       } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();//登出
+        await this.logout(); //登出
       } else {
-        this.msgPop();//警告弹窗,提示接口返回信息
+        this.msgPop(); //警告弹窗,提示接口返回信息
       }
-      this.loading = false;//停止loading
+      this.loading = false; //停止loading
       this.searchList();
     },
-    async deleteBtnProject(id){
+    async deleteBtnProject(id) {
       this.loading = false;
       let deleteValue = {
-        id:"",
-      }
-      deleteValue.id = id;//入参
-      var res = await asyncRequest.delete(deleteValue);//调用/admin/Delete接口,
-      if(res && res.code === 0){
-          //正常响应后的操作
-      }else if(res && res.code >= 100 && res.code <= 104){
+        id: "",
+      };
+      deleteValue.id = id; //入参
+      var res = await asyncRequest.delete(deleteValue); //调用/admin/Delete接口,
+      if (res && res.code === 0) {
+        //正常响应后的操作
+      } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
-      }else{
+      } else {
         this.msgPop();
       }
       this.loading = false;
       this.searchList();
     },
     async searchList() {
-      this.loading = true;//开启加载loading
-      this.parmValue.video_name = this.select === "1" ? this.input : "";//把用户输入的name赋到video_name上
-      this.parmValue.video_url = this.select === "2" ? this.input : "";//赋url
-      this.parmValue.video_sn = this.select === "3" ? this.input : "";//赋video_sn
-      const res = await asyncRequest.list(this.parmValue);//调用视频列表接口/admin/video
+      this.loading = true; //开启加载loading
+      this.parmValue.video_name = this.select === "1" ? this.input : ""; //把用户输入的name赋到video_name上
+      this.parmValue.video_url = this.select === "2" ? this.input : ""; //赋url
+      this.parmValue.video_sn = this.select === "3" ? this.input : ""; //赋video_sn
+      const res = await asyncRequest.list(this.parmValue); //调用视频列表接口/admin/video
       if (res && res.code === 0 && res.data) {
-        this.tableData = res.data.video;//正常响应把响应数据存到tableData中。
-        this.pageInfo.total = Number(res.data.count);//存入总数据量
+        this.tableData = res.data.video; //正常响应把响应数据存到tableData中。
+        this.pageInfo.total = Number(res.data.count); //存入总数据量
       } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();//超时登出
+        await this.logout(); //超时登出
       } else {
-        this.tableData = [];//如果服务器未正常响应且不是登出状态,初始化数据
+        this.tableData = []; //如果服务器未正常响应且不是登出状态,初始化数据
         this.pageInfo.total = 0;
       }
-      this.loading = false;//关闭loading
+      this.loading = false; //关闭loading
     },
-
   },
 };
 </script>
@@ -413,5 +423,4 @@ export default {
   background-color: #fff;
   width: 100px;
 }
-
 </style>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно