|  | @ -9,22 +9,31 @@ | 
		
	
		
			
				|  |  |           </el-checkbox-group> |  |  |           </el-checkbox-group> | 
		
	
		
			
				|  |  |         </el-form-item> |  |  |         </el-form-item> | 
		
	
		
			
				|  |  |         <el-form-item label="设备方向" prop="direction"> |  |  |         <el-form-item label="设备方向" prop="direction"> | 
		
	
		
			
				|  |  |           <el-radio-group v-model="classifyForm.direction" @change="clearCheckbox()"> |  |  |  | 
		
	
		
			
				|  |  |             <el-radio :label="0">横屏</el-radio> |  |  |  | 
		
	
		
			
				|  |  |             <el-radio :label="1">竖屏</el-radio> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <el-radio-group v-model="classifyForm.direction" @change="clearCheckbox"> | 
		
	
		
			
				|  |  |  |  |  |             <el-radio :label="1" value="across">横屏</el-radio> | 
		
	
		
			
				|  |  |  |  |  |             <el-radio :label="2" value='vertical'>竖屏</el-radio> | 
		
	
		
			
				|  |  |           </el-radio-group> |  |  |           </el-radio-group> | 
		
	
		
			
				|  |  |         </el-form-item> |  |  |         </el-form-item> | 
		
	
		
			
				|  |  |         <!-- <el-form-item label="文件名称"> |  |  |         <!-- <el-form-item label="文件名称"> | 
		
	
		
			
				|  |  |           <el-input v-model="classifyForm.name" style="width:336px" /> |  |  |           <el-input v-model="classifyForm.name" style="width:336px" /> | 
		
	
		
			
				|  |  |         </el-form-item> --> |  |  |         </el-form-item> --> | 
		
	
		
			
				|  |  |         <el-form-item label="上传内容" prop="img_path"> |  |  |         <el-form-item label="上传内容" prop="img_path"> | 
		
	
		
			
				|  |  |           <img :src="imgSrc" alt=""> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <img v-if="formatType==0" :src="imgSrc" alt="" width="200" height="150"> | 
		
	
		
			
				|  |  |  |  |  |           <video v-else-if="formatType==1" width="320" height="240" controls> | 
		
	
		
			
				|  |  |  |  |  |             <source :src="videoSrc" type="video/mp4" /> | 
		
	
		
			
				|  |  |  |  |  |           </video> | 
		
	
		
			
				|  |  |  |  |  |           <audio v-else width="200" height="150" controls> | 
		
	
		
			
				|  |  |  |  |  |             <source :src="audioSrc" /> | 
		
	
		
			
				|  |  |  |  |  |           </audio> | 
		
	
		
			
				|  |  |           <Upload ref="uploadMaterial" @saveMaterial="saveMaterial" /> |  |  |           <Upload ref="uploadMaterial" @saveMaterial="saveMaterial" /> | 
		
	
		
			
				|  |  |         </el-form-item> |  |  |         </el-form-item> | 
		
	
		
			
				|  |  |  |  |  |         <el-form-item el-form-item v-if="formatType != 0" label="上传封面" prop="img_path"> | 
		
	
		
			
				|  |  |  |  |  |           <UploadCover ref="childUpload" /> | 
		
	
		
			
				|  |  |  |  |  |         </el-form-item> | 
		
	
		
			
				|  |  |       </el-form> |  |  |       </el-form> | 
		
	
		
			
				|  |  |       <div slot="footer" class="dialog-footer"> |  |  |       <div slot="footer" class="dialog-footer"> | 
		
	
		
			
				|  |  |         <el-button type="primary" round @click="submitForm('classifyForm')">新增</el-button> |  |  |         <el-button type="primary" round @click="submitForm('classifyForm')">新增</el-button> | 
		
	
		
			
				|  |  |         <el-button round @click="resetForm('classifyForm')">关闭</el-button> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         <el-button round @click="resetForm">关闭</el-button> | 
		
	
		
			
				|  |  |       </div> |  |  |       </div> | 
		
	
		
			
				|  |  |     </el-dialog> |  |  |     </el-dialog> | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
	
		
			
				|  | @ -175,17 +184,17 @@ export default { | 
		
	
		
			
				|  |  |   data () { |  |  |   data () { | 
		
	
		
			
				|  |  |     return { |  |  |     return { | 
		
	
		
			
				|  |  |       orga_id: '133221333123111', // 机构ID |  |  |       orga_id: '133221333123111', // 机构ID | 
		
	
		
			
				|  |  |       // queryInfo: { |  |  |  | 
		
	
		
			
				|  |  |       //   theme_name: '',//主题库的名字 |  |  |  | 
		
	
		
			
				|  |  |       //   theme_class: '', //主题素材列表 |  |  |  | 
		
	
		
			
				|  |  |       //   device_direction: null,//横竖屏 |  |  |  | 
		
	
		
			
				|  |  |       //   orga_id: 133221333123111, |  |  |  | 
		
	
		
			
				|  |  |       //   start_time: '',  //搜索开始的时间 |  |  |  | 
		
	
		
			
				|  |  |       //   end_time: '',   //结束开始的时间 |  |  |  | 
		
	
		
			
				|  |  |       //   folder_id: '',//文件夹的id |  |  |  | 
		
	
		
			
				|  |  |       //   page: 1, |  |  |  | 
		
	
		
			
				|  |  |       //   size: 3 |  |  |  | 
		
	
		
			
				|  |  |       // }, |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       queryInfo: { | 
		
	
		
			
				|  |  |  |  |  |         theme_name: '',//主题库的名字 | 
		
	
		
			
				|  |  |  |  |  |         theme_class: '', //主题素材列表 | 
		
	
		
			
				|  |  |  |  |  |         device_direction: null,//横竖屏 | 
		
	
		
			
				|  |  |  |  |  |         orga_id: 133221333123111, | 
		
	
		
			
				|  |  |  |  |  |         start_time: '',  //搜索开始的时间 | 
		
	
		
			
				|  |  |  |  |  |         end_time: '',   //结束开始的时间 | 
		
	
		
			
				|  |  |  |  |  |         folder_id: '',//文件夹的id | 
		
	
		
			
				|  |  |  |  |  |         page: 1, | 
		
	
		
			
				|  |  |  |  |  |         size: 3 | 
		
	
		
			
				|  |  |  |  |  |       }, | 
		
	
		
			
				|  |  |       // 选中的导航栏id |  |  |       // 选中的导航栏id | 
		
	
		
			
				|  |  |       class_ids: [], |  |  |       class_ids: [], | 
		
	
		
			
				|  |  |       // 导航栏的lsit |  |  |       // 导航栏的lsit | 
		
	
	
		
			
				|  | @ -198,7 +207,7 @@ export default { | 
		
	
		
			
				|  |  |         id: '', |  |  |         id: '', | 
		
	
		
			
				|  |  |         orga_ids: ["133221333123111"], |  |  |         orga_ids: ["133221333123111"], | 
		
	
		
			
				|  |  |         selectName: null, |  |  |         selectName: null, | 
		
	
		
			
				|  |  |         direction: null, |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         direction: 1, //横竖屏 | 
		
	
		
			
				|  |  |         selectNameList: [], |  |  |         selectNameList: [], | 
		
	
		
			
				|  |  |         img_path: '' |  |  |         img_path: '' | 
		
	
		
			
				|  |  |       }, |  |  |       }, | 
		
	
	
		
			
				|  | @ -213,7 +222,11 @@ export default { | 
		
	
		
			
				|  |  |         file: null |  |  |         file: null | 
		
	
		
			
				|  |  |       }, |  |  |       }, | 
		
	
		
			
				|  |  |       themeGalleryList: [],//主题库的列表 |  |  |       themeGalleryList: [],//主题库的列表 | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       formatType: null, // 上传素材类型 0 img 1 video 2 audio | 
		
	
		
			
				|  |  |  |  |  |       materialImgPath: '', // 素材封面 | 
		
	
		
			
				|  |  |  |  |  |       materialDuration: 0, // 时长 | 
		
	
		
			
				|  |  |  |  |  |       materialName: '', // 素材名称 | 
		
	
		
			
				|  |  |  |  |  |       fileSize: '',//大小 | 
		
	
		
			
				|  |  |       listThemeData: [ |  |  |       listThemeData: [ | 
		
	
		
			
				|  |  |         { |  |  |         { | 
		
	
		
			
				|  |  |           id: '1', |  |  |           id: '1', | 
		
	
	
		
			
				|  | @ -306,7 +319,9 @@ export default { | 
		
	
		
			
				|  |  |           enabled: false |  |  |           enabled: false | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       ], |  |  |       ], | 
		
	
		
			
				|  |  |       imgSrc: '' |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       imgSrc: '', | 
		
	
		
			
				|  |  |  |  |  |       videoSrc: '', | 
		
	
		
			
				|  |  |  |  |  |       audioSrc: '' | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   watch: { |  |  |   watch: { | 
		
	
	
		
			
				|  | @ -317,58 +332,82 @@ export default { | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   mounted () { |  |  |   mounted () { | 
		
	
		
			
				|  |  |     // this.getThemeGallery() |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     this.getThemeGallery() | 
		
	
		
			
				|  |  |     this.getHeaderList() |  |  |     this.getHeaderList() | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   methods: { |  |  |   methods: { | 
		
	
		
			
				|  |  |     // 获取主题库list |  |  |     // 获取主题库list | 
		
	
		
			
				|  |  |     // getThemeGallery () { |  |  |  | 
		
	
		
			
				|  |  |     //   const params = this.queryInfo |  |  |  | 
		
	
		
			
				|  |  |     //   reqThemeGallery(params).then(res => { |  |  |  | 
		
	
		
			
				|  |  |     //     if (res.code == 200) { |  |  |  | 
		
	
		
			
				|  |  |     //       this.themeGalleryList = res.data.content |  |  |  | 
		
	
		
			
				|  |  |     //       this.total = res.data.reqThemeGallery |  |  |  | 
		
	
		
			
				|  |  |     //     } |  |  |  | 
		
	
		
			
				|  |  |     //   }) |  |  |  | 
		
	
		
			
				|  |  |     // }, |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     getThemeGallery () { | 
		
	
		
			
				|  |  |  |  |  |       const params = this.queryInfo | 
		
	
		
			
				|  |  |  |  |  |       reqThemeGallery(params).then(res => { | 
		
	
		
			
				|  |  |  |  |  |         console.log(res) | 
		
	
		
			
				|  |  |  |  |  |         if (res.code == 200) { | 
		
	
		
			
				|  |  |  |  |  |           this.themeGalleryList = res.data.content | 
		
	
		
			
				|  |  |  |  |  |           console.log(this.themeGalleryList) | 
		
	
		
			
				|  |  |  |  |  |           this.total = res.data.totalElements | 
		
	
		
			
				|  |  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |  |       }) | 
		
	
		
			
				|  |  |  |  |  |     }, | 
		
	
		
			
				|  |  |     getHeaderList () { |  |  |     getHeaderList () { | 
		
	
		
			
				|  |  |       const { orga_id } = this |  |  |       const { orga_id } = this | 
		
	
		
			
				|  |  |       reqHeaderList(orga_id).then(res => { |  |  |       reqHeaderList(orga_id).then(res => { | 
		
	
		
			
				|  |  |         if (res.code == 200) { |  |  |         if (res.code == 200) { | 
		
	
		
			
				|  |  |           this.tabItem = res.data |  |  |           this.tabItem = res.data | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |  |  |  |     clearCheckbox (label) { | 
		
	
		
			
				|  |  |  |  |  |       this.classifyForm.direction = label | 
		
	
		
			
				|  |  |  |  |  |       console.log(this.classifyForm.direction) | 
		
	
		
			
				|  |  |  |  |  |     }, | 
		
	
		
			
				|  |  |     // 当复选框发生改变的时候 |  |  |     // 当复选框发生改变的时候 | 
		
	
		
			
				|  |  |     handleCheckedCitiesChange (val) { |  |  |     handleCheckedCitiesChange (val) { | 
		
	
		
			
				|  |  |       const class_ids = [] |  |  |       const class_ids = [] | 
		
	
		
			
				|  |  |       val.forEach(item => { |  |  |       val.forEach(item => { | 
		
	
		
			
				|  |  |         class_ids.push(item) |  |  |         class_ids.push(item) | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |       console.log(class_ids) |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       // console.log(class_ids) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 上传 |  |  |     // 上传 | 
		
	
		
			
				|  |  |     saveMaterial () { |  |  |     saveMaterial () { | 
		
	
		
			
				|  |  |  |  |  |       console.log('-----------') | 
		
	
		
			
				|  |  |  |  |  |       console.log(this.formatType) | 
		
	
		
			
				|  |  |       this.uploadDialogVisible = true |  |  |       this.uploadDialogVisible = true | 
		
	
		
			
				|  |  |       this.$nextTick(() => { |  |  |       this.$nextTick(() => { | 
		
	
		
			
				|  |  |         this.imgSrc = this.$refs.uploadMaterial.uploadFileUrl |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         if (formatType == 0) { | 
		
	
		
			
				|  |  |  |  |  |           this.imgSrc = this.$refs.uploadMaterial.uploadFileUrl | 
		
	
		
			
				|  |  |  |  |  |         } else if (formatType == 1) { | 
		
	
		
			
				|  |  |  |  |  |           this.videoSrc = this.$refs.uploadMaterial.uploadFileUrl | 
		
	
		
			
				|  |  |  |  |  |         } else { | 
		
	
		
			
				|  |  |  |  |  |           this.audioSrc = this.$refs.uploadMaterial.uploadFileUrl | 
		
	
		
			
				|  |  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  |         // console.log(this.formatType) | 
		
	
		
			
				|  |  |  |  |  |         const duration = this.$refs.uploadMaterial.duration | 
		
	
		
			
				|  |  |  |  |  |         this.fileSize = this.$refs.uploadMaterial.fileSize | 
		
	
		
			
				|  |  |  |  |  |         // 主题名称 | 
		
	
		
			
				|  |  |  |  |  |         this.materialName = this.$refs.uploadMaterial.fileNames | 
		
	
		
			
				|  |  |  |  |  |         // 图片音频视频 类别 | 
		
	
		
			
				|  |  |  |  |  |         const formatType = this.$refs.uploadMaterial.formatType | 
		
	
		
			
				|  |  |         console.log(this.$refs.uploadMaterial.uploadFileUrl) |  |  |         console.log(this.$refs.uploadMaterial.uploadFileUrl) | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |       // if (row) { |  |  |  | 
		
	
		
			
				|  |  |       //   console.log(row.type) |  |  |  | 
		
	
		
			
				|  |  |       //   this.uploadTitle = '编辑' |  |  |  | 
		
	
		
			
				|  |  |       //   this.classifyForm.name = row.name |  |  |  | 
		
	
		
			
				|  |  |       //   this.classifyForm.direction = row.direction |  |  |  | 
		
	
		
			
				|  |  |       //   this.classifyForm.selectNameList.push(row.type) |  |  |  | 
		
	
		
			
				|  |  |       // } else { |  |  |  | 
		
	
		
			
				|  |  |       //   this.uploadTitle = '上传' |  |  |  | 
		
	
		
			
				|  |  |       // } |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       const params = { | 
		
	
		
			
				|  |  |  |  |  |         class_ids: this.class_ids, //主题库头部id集合 | 
		
	
		
			
				|  |  |  |  |  |         deposit_url: this.uploadFileUrl,  //素材存放路径 | 
		
	
		
			
				|  |  |  |  |  |         device_direction: this.classifyForm.direction,  //横竖屏 | 
		
	
		
			
				|  |  |  |  |  |         material_id: null, | 
		
	
		
			
				|  |  |  |  |  |         folder_id: null,//文件夹的id | 
		
	
		
			
				|  |  |  |  |  |         img_path: this.materialImgPath, //封面图片的id | 
		
	
		
			
				|  |  |  |  |  |         material_type: this.formatType, | 
		
	
		
			
				|  |  |  |  |  |         file_size: this.fileSize, // 文件大小 | 
		
	
		
			
				|  |  |  |  |  |         orga_id: this.queryInfo.orga_id, // 机构id | 
		
	
		
			
				|  |  |  |  |  |         store_type: 2// 库类型 1.素材库 2.主题库 | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     resetForm (formName) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     resetForm () { | 
		
	
		
			
				|  |  |       this.addDialogVisible = false |  |  |       this.addDialogVisible = false | 
		
	
		
			
				|  |  |       this.uploadDialogVisible = false |  |  |       this.uploadDialogVisible = false | 
		
	
		
			
				|  |  |       this.$refs[formName].resetFields() |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.$refs.classifyForm.resetFields() | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |     // 创建文件夹 |  |  |     // 创建文件夹 | 
		
	
	
		
			
				|  | 
 |