Parcourir la source

微信提审权限以及优化

pansl il y a 1 an
Parent
commit
37b48ae607

+ 31 - 7
src/views/videoManage/wechatAudit/tabs/wechatAuditList/form/videoSync.vue

@@ -1,19 +1,32 @@
 <template>
   <div class="wrapper">
     <!-- :poster="videoImg"视频封面 -->
-    <video id="my-player" style="width:500px;" :key="current.public_video_url" class="video-js" controls autoplay
+    <video id="my-player" style="width:500px;" v-if="viewStatus" :key="wxcurrent.wxpublic_video_url" class="video-js"
+      controls autoplay ref="myVideo">
+      <source :src="wxcurrent.wxpublic_video_url" type="video/mp4">
+    </video>
+    <video id="my-player" style="width:500px;" v-else :key="current.public_video_url" class="video-js" controls autoplay
       ref="myVideo">
       <source :src="current.public_video_url" type="video/mp4">
     </video>
+
     <!-- 视频名称列表布局 -->
     <div class="video-wrapper">
       <div class="flex items-center justify-between h-10">
         <div class="w-full text-base font-medium">剧名: <span class="ml-2 text-lg font-bold text-dark-600">{{
-          props.primary.name }}</span> <span v-if="current.series_name">(当前播放{{ current.series_name }})</span></div>
-        <el-button type="primary" size="default" @click="syncVideoChange">同步视频</el-button>
+          props.primary.name }}</span> <span v-if="current.series_name || wxcurrent.series_name">
+            (当前播放{{ current.series_name || wxcurrent.series_name }})
+          </span>
+        </div>
+        <el-button :type="viewStatus ? 'success' : 'default'" size="default" @click="changeSoure"
+          v-action="'video.VideoSeriesWechatCheck.medialink'">({{ viewStatus ?
+            '微信视频' : '原始视频' }})切换视频播放源</el-button>
+        <el-button type="primary" size="default" v-action="'video.VideoSeriesWechatCheck.syncWechat'"
+          @click="syncVideoChange">同步视频</el-button>
         <el-popover placement="top" :width="400" trigger="click">
           <template #reference>
-            <el-button style="margin-right: 16px" @click="viewStatusChange">查看状态</el-button>
+            <el-button style="margin-right: 16px" @click="viewStatusChange"
+              v-action="'video.VideoSeriesWechatCheck.medialink'">查看状态</el-button>
           </template>
           <div class="flex items-center">
             <div class="dot-success"></div>
@@ -82,21 +95,31 @@ const colorType = (data: object) => {
   }
 }
 const current = ref({})
+const wxcurrent = ref({})
+
+const changeSoure = () => {
+  viewStatus.value = !viewStatus.value
+  current.value = {}
+  wxcurrent.value = {}
+  checkAll.value = false
+  videoChoose.value = []
+}
 // 查看状态
 const viewStatusChange = () => {
   current.value = {}
+  wxcurrent.value = {}
   viewStatus.value = true
   checkAll.value = false
   videoChoose.value = []
 }
 // 同步视频
 const syncVideoChange = () => {
+  viewStatus.value = false
   const series_ids = videoChoose.value.map(e => e.id)
   videoStockWechatCheckVideoSeriesSyncWechat({ series_ids }).then(res => {
     console.log(res);
     ElMessage.success(res.message)
   })
-  viewStatus.value = false
   console.log(videoChoose.value, series_ids, 'videoChoosevideoChoose');
 }
 const initVideoList = (params: object) => {
@@ -122,10 +145,11 @@ const videoShow = (source: object) => {
 }
 const videoShowWx = (source: object) => {
   console.log(source);
+  wxcurrent.value = videoChoose.value.find(el => el.public_video_url == source.public_video_url) ?? {}
   videoStockWechatCheckVideoSeriesMedialink({ series_id: source.id }).then(res => {
     console.log(res);
-    current.value = videoChoose.value.find(el => el.public_video_url == source.public_video_url) ?? {}
-    current.value.public_video_url = res.data
+    wxcurrent.value = videoChoose.value.find(el => el.public_video_url == source.public_video_url) ?? {}
+    wxcurrent.value.wxpublic_video_url = res.data
   })
 }
 

+ 5 - 5
src/views/videoManage/wechatAudit/tabs/wechatAuditList/index.vue

@@ -19,9 +19,9 @@
     <div class="table-default">
       <div class="set-warpper">
         <div>
-          <Operate :show="open" />
+          <Operate :show="open" v-action="'video.WechatCheck.add'" />
         </div>
-        <el-button @click="mulSet" size="default">批量提审</el-button>
+        <el-button @click="mulSet" v-action="'video.WechatCheck.check'" size="default">批量提审</el-button>
       </div>
       <el-table :data="tableData" class="mt-3" v-loading="loading" @selection-change="handleSelectionChange">
         <el-table-column type="selection" />
@@ -65,11 +65,11 @@
         <el-table-column label="操作">
           <template #default="scope">
             <el-button @click="open(scope.row)" link type="primary" size="small"
-              v-action="'video.video.update'">编辑</el-button><br />
+              v-action="'video.WechatCheck.update'">编辑</el-button><br />
             <el-button link type="primary" size="small" @click="deliverDelete(scope.row)"
-              v-action="'video.episode.add'">删除</el-button><br />
+              v-action="'video.WechatCheck.delete'">删除</el-button><br />
             <el-button @click="deliverChange(scope.row)" link type="primary" size="small"
-              v-action="'video.video.setChargeConfig'">一键提审</el-button><br />
+              v-action="'video.WechatCheck.check'">一键提审</el-button><br />
             <el-button link type="primary" size="small" @click="openType('videoSyncVisible', scope.row)"
               v-action="'video.episode.downloadList'">同步视频</el-button>
             <br />

+ 8 - 7
src/views/videoManage/wechatAudit/tabs/wechatAuditStatus/index.vue

@@ -27,10 +27,11 @@
     </div>
     <div class="table-default">
       <div class="set-warpper">
-        <el-button @click="mulSet" size="default">批量提审</el-button>
+        <el-button @click="mulSet" size="default" v-action="'video.WechatCheck.check'"
+          v-if="isShowOperate">批量提审</el-button>
       </div>
       <el-table :data="tableData" class="mt-3" v-loading="loading" @selection-change="handleSelectionChange">
-        <el-table-column type="selection" />
+        <el-table-column type="selection" v-if="isShowOperate" />
         <el-table-column label="剧目名称" prop="name" show-overflow-tooltip min-width="150">
         </el-table-column>
         <el-table-column label="制作方名称" prop="producer" show-overflow-tooltip min-width="100">
@@ -79,8 +80,8 @@
             <div>{{ scope.row.apply_at }}</div>
           </template>
         </el-table-column>
-        <el-table-column prop="status" v-if="['1,5', '2', '3', '4'].includes(query.status)" label="审核状态"
-          show-overflow-tooltip min-width="150">
+        <el-table-column prop="status" v-if="['2', '3', '4'].includes(query.status)" label="审核状态" show-overflow-tooltip
+          min-width="150">
           <template #default="scope">
             <div>{{ scope.row.status_str }}</div>
           </template>
@@ -94,11 +95,11 @@
         <el-table-column label="操作" v-if="isShowOperate">
           <template #default="scope">
             <el-button @click="open(scope.row)" link type="primary" size="small"
-              v-action="'video.video.update'">编辑</el-button><br />
+              v-action="'video.WechatCheck.update'">编辑</el-button><br />
             <el-button link type="primary" size="small" @click="deliverDelete(scope.row)"
-              v-action="'video.episode.add'">删除</el-button><br />
+              v-action="'video.WechatCheck.delete'">删除</el-button><br />
             <el-button @click="deliverChange(scope.row)" link type="primary" size="small"
-              v-action="'video.video.setChargeConfig'">重新提审</el-button><br />
+              v-action="'video.WechatCheck.check'">重新提审</el-button><br />
             <br />
           </template>
         </el-table-column>