瀏覽代碼

小需求:线上路演视频权限与报告权限关联

hbchen 1 年之前
父節點
當前提交
68ed6b68b7

+ 6 - 2
src/views/interaction_manage/components/connectiveReportDialog.vue

@@ -61,11 +61,15 @@ export default {
     isShow:{
       type:Boolean,
       default:false
+    },
+    reportId:{
+      type:Number,
+      default:0
     }
   },
   data() {
     return {
-      ReportId:'',
+      ReportId:0,
       searchTitle:'',
       searchType:'',
       reportTypeList:[],
@@ -75,7 +79,7 @@ export default {
   watch:{
     isShow(val){
       if(val){
-        this.ReportId=''
+        this.ReportId=this.reportId
         this.searchTitle=''
         this.searchType=''
         this.getTableData()

+ 14 - 5
src/views/interaction_manage/videoManage.vue

@@ -12,7 +12,7 @@
             <el-input
                 placeholder="关键词搜索"
                 v-model="keyword"
-                style="maxWidth:520px"
+                style="max-width:520px"
                 @input="searchHandle"
                 clearable
                 v-if="navType!==2"
@@ -212,7 +212,7 @@
                             v-model="popData.permission"
                             collapse-tags
                             placeholder="请选择品种"
-                            :disabled="!!reportId"
+                            :disabled="!!reportId && isReportHasPermission"
                         ></el-cascader>
                     </el-form-item>
                     <el-form-item label="视频" prop="videoUrl">
@@ -429,6 +429,7 @@
         <!-- 关联报告弹窗 -->
         <connective-report-dialog
           :isShow="isShowReportDialog"
+          :reportId="this.reportId"
           @reportChange="setReportUrl"
           @cancel="isShowReportDialog=false"
         />
@@ -539,7 +540,9 @@ export default {
             previewVideoUrl:"",
             
             isShowReportDialog:false,//关联报告弹窗
-            reportId:0
+            reportId:0,
+            // 报告是否关联品种
+            isReportHasPermission:false
         }
     },
     created() {
@@ -648,6 +651,7 @@ export default {
             this.popData.VideoId=0
             this.popData.permission=''
             this.popData.reportUrl=''
+            this.isReportHasPermission=false
             if(!item){
                 this.popData.type='添加视频'
             }else{
@@ -659,9 +663,12 @@ export default {
                 this.popData.VideoSeconds=item.VideoSeconds
                 this.popData.VideoId=item.CommunityVideoId
                 if(this.navType===3){
-                    this.popData.permission=item.ChartPermissionIds.split(',')
+                    this.$nextTick(()=>{
+                        this.popData.permission=item.ChartPermissionIds.split(',').map(it => +it)
+                    })
                     this.popData.VideoId=item.RoadVideoId
-                    this.setReportUrl({ReportId:item.ReportId || 0,Title:item.ReportTitle || ''})
+                    this.setReportUrl({ReportId:item.ReportId || 0,Title:item.ReportTitle || '',
+                                        PermissionIds:item.ChartPermissionIds?item.ChartPermissionIds.split(','):[]})
                 }
             }
             this.showPop=true
@@ -1091,6 +1098,8 @@ export default {
         setReportUrl(item){
           this.reportId = item.ReportId
           this.popData.reportUrl = item.Title
+          this.popData.permission=item.PermissionIds
+          this.isReportHasPermission = item.PermissionIds && item.PermissionIds.length>0
           this.isShowReportDialog = false
         }
     },