hbchen 1 éve
szülő
commit
9bd0f79b7b

+ 1 - 0
src/views/interaction_manage/components/connectiveReportDialog.vue

@@ -109,6 +109,7 @@ export default {
     saveHandle(){
       //检查该报告是否已关联视频
       const item = this.reportList.find(i=>i.ReportId==this.ReportId)
+      if(!item) return 
       if(item.BindVideo){
         this.$message.error(`该报告已关联${item.BindVideoTitle},请重新选择`)
         return 

+ 13 - 2
src/views/interaction_manage/videoManage.vue

@@ -212,6 +212,7 @@
                             v-model="popData.permission"
                             collapse-tags
                             placeholder="请选择品种"
+                            :disabled="!!reportId"
                         ></el-cascader>
                     </el-form-item>
                     <el-form-item label="视频" prop="videoUrl">
@@ -234,7 +235,11 @@
                     </el-form-item>
                     <el-form-item label="关联报告" prop="reportUrl" v-if="navType==3">
                         <div style="display:flex">
-                        <el-input readonly v-model="popData.reportUrl" placeholder="请选择关联报告"></el-input>
+                        <el-input readonly v-model="popData.reportUrl" placeholder="请选择关联报告">
+                            <template slot='suffix' v-if="!!popData.reportUrl">
+                                <i class="el-icon-circle-close" style="cursor: pointer;margin-right: 5px;" @click="reportRemove"></i>
+                            </template>
+                        </el-input>
                         <el-button type="primary" style="margin-left:10px;" @click="showReportDialog">关联报告</el-button>
                         </div>
                     </el-form-item>
@@ -656,7 +661,7 @@ export default {
                 if(this.navType===3){
                     this.popData.permission=item.ChartPermissionIds.split(',')
                     this.popData.VideoId=item.RoadVideoId
-                    item.ReportId&&this.setReportUrl({ReportId:item.ReportId,Title:item.ReportTitle})
+                    this.setReportUrl({ReportId:item.ReportId || 0,Title:item.ReportTitle || ''})
                 }
             }
             this.showPop=true
@@ -1072,6 +1077,12 @@ export default {
         endingPreview(){
             this.$refs.previewVideo && this.$refs.previewVideo.pause()
         },
+        // 删除关联的报告
+        reportRemove(){
+            this.popData.reportUrl=''
+            this.reportId = 0
+            this.popData.permission=''
+        },
         //打开关联报告弹窗
         showReportDialog(){
           this.isShowReportDialog = true