|
@@ -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,6 +212,7 @@
|
|
|
v-model="popData.permission"
|
|
|
collapse-tags
|
|
|
placeholder="请选择品种"
|
|
|
+ :disabled="!!reportId && isReportHasPermission"
|
|
|
></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>
|
|
@@ -424,6 +429,7 @@
|
|
|
<!-- 关联报告弹窗 -->
|
|
|
<connective-report-dialog
|
|
|
:isShow="isShowReportDialog"
|
|
|
+ :reportId="this.reportId"
|
|
|
@reportChange="setReportUrl"
|
|
|
@cancel="isShowReportDialog=false"
|
|
|
/>
|
|
@@ -534,7 +540,9 @@ export default {
|
|
|
previewVideoUrl:"",
|
|
|
|
|
|
isShowReportDialog:false,//关联报告弹窗
|
|
|
- reportId:0
|
|
|
+ reportId:0,
|
|
|
+ // 报告是否关联品种
|
|
|
+ isReportHasPermission:false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -621,6 +629,10 @@ export default {
|
|
|
if(res.Ret===200){
|
|
|
const arr=res.Data.List||[]
|
|
|
this.perList=arr.map(item => {
|
|
|
+ if(!(item && item.List)){
|
|
|
+ // 无(子)品种
|
|
|
+ return null
|
|
|
+ }
|
|
|
let obj={}
|
|
|
obj.value=item.ClassifyName
|
|
|
obj.label=item.ClassifyName
|
|
@@ -628,7 +640,7 @@ export default {
|
|
|
return {value:_item.ChartPermissionID,label:_item.ChartPermissionName}
|
|
|
})
|
|
|
return obj
|
|
|
- })
|
|
|
+ }).filter(Boolean)
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -643,6 +655,7 @@ export default {
|
|
|
this.popData.VideoId=0
|
|
|
this.popData.permission=''
|
|
|
this.popData.reportUrl=''
|
|
|
+ this.isReportHasPermission=false
|
|
|
if(!item){
|
|
|
this.popData.type='添加视频'
|
|
|
}else{
|
|
@@ -654,9 +667,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
|
|
|
- item.ReportId&&this.setReportUrl({ReportId:item.ReportId,Title:item.ReportTitle})
|
|
|
+ this.setReportUrl({ReportId:item.ReportId || 0,Title:item.ReportTitle || '',
|
|
|
+ PermissionIds:item.ChartPermissionIds?item.ChartPermissionIds.split(','):[]})
|
|
|
}
|
|
|
}
|
|
|
this.showPop=true
|
|
@@ -1072,6 +1088,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
|
|
@@ -1080,6 +1102,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
|
|
|
}
|
|
|
},
|