Browse Source

总台直播审核

yuhongqi 4 months ago
parent
commit
277e9fe527
2 changed files with 39 additions and 1 deletions
  1. 8 0
      src/api/live/live.js
  2. 31 1
      src/views/live/live/index.vue

+ 8 - 0
src/api/live/live.js

@@ -73,3 +73,11 @@ export function getLivingUrl(liveId) {
     method: 'get'
   })
 }
+
+export function updateLiveIsAudit(data) {
+  return request({
+    url: '/live/live/updateLiveIsAudit' ,
+    method: 'post',
+    data: data
+  })
+}

+ 31 - 1
src/views/live/live/index.vue

@@ -117,6 +117,13 @@
             @click="handleManage(scope.row)"
             v-hasPermi="['live:console:list']"
           >管理</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-monitor"
+            @click="handleAudit(scope.row)"
+            v-hasPermi="['live:console:edit']"
+          >审核</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -203,7 +210,7 @@
 </template>
 
 <script>
-import { listLive, getLive, delLive, addLive, updateLive, exportLive,selectCompanyTalent } from "@/api/live/live";
+import { listLive, getLive, delLive, addLive, updateLive, exportLive,selectCompanyTalent,updateLiveIsAudit } from "@/api/live/live";
 import Editor from '@/components/Editor/wang';
 import user from '@/store/modules/user';
 
@@ -462,6 +469,29 @@ export default {
     handleManage(row) {
       this.$router.push('/live/liveConsole/' + row.liveId)
     },
+    handleAudit( row){
+      this.$alert('是否审核通过?', '审核', {
+        confirmButtonText: '同意',
+        cancelButtonText: '不同意',
+        showCancelButton: true, // 显示取消按钮(即“不同意”)
+        distinguishCancelAndClose: true,
+        type: 'warning',
+        callback: action => {
+          let isAudit;
+          if(action === 'cancel') isAudit = 0;
+          if(action === 'confirm') isAudit = 1;
+          if("confirm" === action || "cancel" === action){
+            updateLiveIsAudit( {"liveId" : row.liveId, "isAudit" : isAudit}).then(res => {
+              if (res > 0) {
+                this.$message.success("审核成功")
+              }else {
+                this.$message.error(res.msg)
+              }
+            })
+          }
+        }
+      });
+    },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;