|  | @ -11,14 +11,14 @@ | 
		
	
		
			
				|  |  |         <el-form-item label="设备方向" prop="direction"> |  |  |         <el-form-item label="设备方向" prop="direction"> | 
		
	
		
			
				|  |  |           <el-radio-group v-model="classifyForm.direction" @change="clearCheckbox"> |  |  |           <el-radio-group v-model="classifyForm.direction" @change="clearCheckbox"> | 
		
	
		
			
				|  |  |             <el-radio :label="1" value="across">横屏</el-radio> |  |  |             <el-radio :label="1" value="across">横屏</el-radio> | 
		
	
		
			
				|  |  |             <el-radio :label="2" value='vertical'>竖屏</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 v-if="formatType==0" :src="imgSrc" alt="" width="200" height="150"> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <img v-if="formatType==0" :src="imgSrc" alt="" width="200" height="150" /> | 
		
	
		
			
				|  |  |           <video v-else-if="formatType==1" width="320" height="240" controls> |  |  |           <video v-else-if="formatType==1" width="320" height="240" controls> | 
		
	
		
			
				|  |  |             <source :src="videoSrc" type="video/mp4" /> |  |  |             <source :src="videoSrc" type="video/mp4" /> | 
		
	
		
			
				|  |  |           </video> |  |  |           </video> | 
		
	
	
		
			
				|  | @ -27,7 +27,7 @@ | 
		
	
		
			
				|  |  |           </audio> |  |  |           </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"> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         <el-form-item v-if="formatType != 0" el-form-item label="上传封面" prop="img_path"> | 
		
	
		
			
				|  |  |           <UploadCover ref="childUpload" /> |  |  |           <UploadCover ref="childUpload" /> | 
		
	
		
			
				|  |  |         </el-form-item> |  |  |         </el-form-item> | 
		
	
		
			
				|  |  |       </el-form> |  |  |       </el-form> | 
		
	
	
		
			
				|  | @ -117,9 +117,13 @@ | 
		
	
		
			
				|  |  |     <div class="publish_layer"> |  |  |     <div class="publish_layer"> | 
		
	
		
			
				|  |  |       <el-dialog title="创建文件夹" :close-on-click-modal="false" :show-close="false" :visible.sync="mkdirVisible" width="616px" height="384px"> |  |  |       <el-dialog title="创建文件夹" :close-on-click-modal="false" :show-close="false" :visible.sync="mkdirVisible" width="616px" height="384px"> | 
		
	
		
			
				|  |  |         <el-form ref="form" :inline="true" :model="form" size="small" label-width="100px"> |  |  |         <el-form ref="form" :inline="true" :model="form" size="small" label-width="100px"> | 
		
	
		
			
				|  |  |           <el-form-item label="文件夹名称" prop="name" :rules="[ |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <el-form-item | 
		
	
		
			
				|  |  |  |  |  |             label="文件夹名称" | 
		
	
		
			
				|  |  |  |  |  |             prop="name" | 
		
	
		
			
				|  |  |  |  |  |             :rules="[ | 
		
	
		
			
				|  |  |               { required: true, message: '请输入名称', trigger: 'blur' } |  |  |               { required: true, message: '请输入名称', trigger: 'blur' } | 
		
	
		
			
				|  |  |             ]"> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             ]" | 
		
	
		
			
				|  |  |  |  |  |           > | 
		
	
		
			
				|  |  |             <el-input v-model="form.name" style="width: 336px" /> |  |  |             <el-input v-model="form.name" style="width: 336px" /> | 
		
	
		
			
				|  |  |           </el-form-item> |  |  |           </el-form-item> | 
		
	
		
			
				|  |  |           <el-form-item label="封面" prop="file"> |  |  |           <el-form-item label="封面" prop="file"> | 
		
	
	
		
			
				|  | @ -160,7 +164,7 @@ | 
		
	
		
			
				|  |  |   </div> |  |  |   </div> | 
		
	
		
			
				|  |  | </template> |  |  | </template> | 
		
	
		
			
				|  |  | <script> |  |  | <script> | 
		
	
		
			
				|  |  | import { reqThemeGallery, reqHeaderList } from "@/api/theme/theme.js"; |  |  |  | 
		
	
		
			
				|  |  |  |  |  | import { reqThemeGallery, reqHeaderList } from '@/api/theme/theme.js' | 
		
	
		
			
				|  |  | import { saveMaterial } from '@/api/material/material' |  |  | import { saveMaterial } from '@/api/material/material' | 
		
	
		
			
				|  |  | import Upload from './upload' |  |  | import Upload from './upload' | 
		
	
		
			
				|  |  | import UploadCover from './upload_cover' |  |  | import UploadCover from './upload_cover' | 
		
	
	
		
			
				|  | @ -181,17 +185,17 @@ export default { | 
		
	
		
			
				|  |  |       required: true |  |  |       required: true | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   data () { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |   data() { | 
		
	
		
			
				|  |  |     return { |  |  |     return { | 
		
	
		
			
				|  |  |       orga_id: '133221333123111', // 机构ID |  |  |       orga_id: '133221333123111', // 机构ID | 
		
	
		
			
				|  |  |       queryInfo: { |  |  |       queryInfo: { | 
		
	
		
			
				|  |  |         theme_name: '',//主题库的名字 |  |  |  | 
		
	
		
			
				|  |  |         theme_class: '', //主题素材列表 |  |  |  | 
		
	
		
			
				|  |  |         device_direction: null,//横竖屏 |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         theme_name: '', // 主题库的名字 | 
		
	
		
			
				|  |  |  |  |  |         theme_class: '', // 主题素材列表 | 
		
	
		
			
				|  |  |  |  |  |         device_direction: null, // 横竖屏 | 
		
	
		
			
				|  |  |         orga_id: 133221333123111, |  |  |         orga_id: 133221333123111, | 
		
	
		
			
				|  |  |         start_time: '',  //搜索开始的时间 |  |  |  | 
		
	
		
			
				|  |  |         end_time: '',   //结束开始的时间 |  |  |  | 
		
	
		
			
				|  |  |         folder_id: '',//文件夹的id |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         start_time: '', // 搜索开始的时间 | 
		
	
		
			
				|  |  |  |  |  |         end_time: '', // 结束开始的时间 | 
		
	
		
			
				|  |  |  |  |  |         folder_id: '', // 文件夹的id | 
		
	
		
			
				|  |  |         page: 1, |  |  |         page: 1, | 
		
	
		
			
				|  |  |         size: 3 |  |  |         size: 3 | 
		
	
		
			
				|  |  |       }, |  |  |       }, | 
		
	
	
		
			
				|  | @ -205,9 +209,9 @@ export default { | 
		
	
		
			
				|  |  |         is_all_name: '', |  |  |         is_all_name: '', | 
		
	
		
			
				|  |  |         is_all: false, |  |  |         is_all: false, | 
		
	
		
			
				|  |  |         id: '', |  |  |         id: '', | 
		
	
		
			
				|  |  |         orga_ids: ["133221333123111"], |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         orga_ids: ['133221333123111'], | 
		
	
		
			
				|  |  |         selectName: null, |  |  |         selectName: null, | 
		
	
		
			
				|  |  |         direction: 1, //横竖屏 |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         direction: 1, // 横竖屏 | 
		
	
		
			
				|  |  |         selectNameList: [], |  |  |         selectNameList: [], | 
		
	
		
			
				|  |  |         img_path: '' |  |  |         img_path: '' | 
		
	
		
			
				|  |  |       }, |  |  |       }, | 
		
	
	
		
			
				|  | @ -221,12 +225,12 @@ export default { | 
		
	
		
			
				|  |  |         name: '', |  |  |         name: '', | 
		
	
		
			
				|  |  |         file: null |  |  |         file: null | 
		
	
		
			
				|  |  |       }, |  |  |       }, | 
		
	
		
			
				|  |  |       themeGalleryList: [],//主题库的列表 |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       themeGalleryList: [], // 主题库的列表 | 
		
	
		
			
				|  |  |       formatType: null, // 上传素材类型 0 img 1 video 2 audio |  |  |       formatType: null, // 上传素材类型 0 img 1 video 2 audio | 
		
	
		
			
				|  |  |       materialImgPath: '', // 素材封面 |  |  |       materialImgPath: '', // 素材封面 | 
		
	
		
			
				|  |  |       materialDuration: 0, // 时长 |  |  |       materialDuration: 0, // 时长 | 
		
	
		
			
				|  |  |       materialName: '', // 素材名称 |  |  |       materialName: '', // 素材名称 | 
		
	
		
			
				|  |  |       fileSize: '',//大小 |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       fileSize: '', // 大小 | 
		
	
		
			
				|  |  |       listThemeData: [ |  |  |       listThemeData: [ | 
		
	
		
			
				|  |  |         { |  |  |         { | 
		
	
		
			
				|  |  |           id: '1', |  |  |           id: '1', | 
		
	
	
		
			
				|  | @ -325,19 +329,19 @@ export default { | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   watch: { |  |  |   watch: { | 
		
	
		
			
				|  |  |     isMultiSelected (newName, oldName) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     isMultiSelected(newName, oldName) { | 
		
	
		
			
				|  |  |       if (newName === false) { |  |  |       if (newName === false) { | 
		
	
		
			
				|  |  |         this.selectedListIds = [] |  |  |         this.selectedListIds = [] | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   mounted () { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |   mounted() { | 
		
	
		
			
				|  |  |     this.getThemeGallery() |  |  |     this.getThemeGallery() | 
		
	
		
			
				|  |  |     this.getHeaderList() |  |  |     this.getHeaderList() | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   methods: { |  |  |   methods: { | 
		
	
		
			
				|  |  |     // 获取主题库list |  |  |     // 获取主题库list | 
		
	
		
			
				|  |  |     getThemeGallery () { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     getThemeGallery() { | 
		
	
		
			
				|  |  |       const params = this.queryInfo |  |  |       const params = this.queryInfo | 
		
	
		
			
				|  |  |       reqThemeGallery(params).then(res => { |  |  |       reqThemeGallery(params).then(res => { | 
		
	
		
			
				|  |  |         console.log(res) |  |  |         console.log(res) | 
		
	
	
		
			
				|  | @ -348,7 +352,7 @@ export default { | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     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) { | 
		
	
	
		
			
				|  | @ -356,12 +360,12 @@ export default { | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     clearCheckbox (label) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     clearCheckbox(label) { | 
		
	
		
			
				|  |  |       this.classifyForm.direction = label |  |  |       this.classifyForm.direction = label | 
		
	
		
			
				|  |  |       console.log(this.classifyForm.direction) |  |  |       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) | 
		
	
	
		
			
				|  | @ -369,7 +373,7 @@ export default { | 
		
	
		
			
				|  |  |       // console.log(class_ids) |  |  |       // console.log(class_ids) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 上传 |  |  |     // 上传 | 
		
	
		
			
				|  |  |     saveMaterial () { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     saveMaterial() { | 
		
	
		
			
				|  |  |       console.log('-----------') |  |  |       console.log('-----------') | 
		
	
		
			
				|  |  |       console.log(this.formatType) |  |  |       console.log(this.formatType) | 
		
	
		
			
				|  |  |       this.uploadDialogVisible = true |  |  |       this.uploadDialogVisible = true | 
		
	
	
		
			
				|  | @ -392,40 +396,40 @@ export default { | 
		
	
		
			
				|  |  |         console.log(this.$refs.uploadMaterial.uploadFileUrl) |  |  |         console.log(this.$refs.uploadMaterial.uploadFileUrl) | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |       const params = { |  |  |       const params = { | 
		
	
		
			
				|  |  |         class_ids: this.class_ids, //主题库头部id集合 |  |  |  | 
		
	
		
			
				|  |  |         deposit_url: this.uploadFileUrl,  //素材存放路径 |  |  |  | 
		
	
		
			
				|  |  |         device_direction: this.classifyForm.direction,  //横竖屏 |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         class_ids: this.class_ids, // 主题库头部id集合 | 
		
	
		
			
				|  |  |  |  |  |         deposit_url: this.uploadFileUrl, // 素材存放路径 | 
		
	
		
			
				|  |  |  |  |  |         device_direction: this.classifyForm.direction, // 横竖屏 | 
		
	
		
			
				|  |  |         material_id: null, |  |  |         material_id: null, | 
		
	
		
			
				|  |  |         folder_id: null,//文件夹的id |  |  |  | 
		
	
		
			
				|  |  |         img_path: this.materialImgPath, //封面图片的id |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         folder_id: null, // 文件夹的id | 
		
	
		
			
				|  |  |  |  |  |         img_path: this.materialImgPath, // 封面图片的id | 
		
	
		
			
				|  |  |         material_type: this.formatType, |  |  |         material_type: this.formatType, | 
		
	
		
			
				|  |  |         file_size: this.fileSize, // 文件大小 |  |  |         file_size: this.fileSize, // 文件大小 | 
		
	
		
			
				|  |  |         orga_id: this.queryInfo.orga_id, // 机构id |  |  |         orga_id: this.queryInfo.orga_id, // 机构id | 
		
	
		
			
				|  |  |         store_type: 2// 库类型 1.素材库 2.主题库 |  |  |         store_type: 2// 库类型 1.素材库 2.主题库 | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     resetForm () { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     resetForm() { | 
		
	
		
			
				|  |  |       this.addDialogVisible = false |  |  |       this.addDialogVisible = false | 
		
	
		
			
				|  |  |       this.uploadDialogVisible = false |  |  |       this.uploadDialogVisible = false | 
		
	
		
			
				|  |  |       this.$refs.classifyForm.resetFields() |  |  |       this.$refs.classifyForm.resetFields() | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |     // 创建文件夹 |  |  |     // 创建文件夹 | 
		
	
		
			
				|  |  |     handleMkdir () { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     handleMkdir() { | 
		
	
		
			
				|  |  |       this.mkdirVisible = true |  |  |       this.mkdirVisible = true | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 移动至 |  |  |     // 移动至 | 
		
	
		
			
				|  |  |     moveingTo (index) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     moveingTo(index) { | 
		
	
		
			
				|  |  |       this.movingVisible = true |  |  |       this.movingVisible = true | 
		
	
		
			
				|  |  |       // this.movingChecked = index |  |  |       // this.movingChecked = index | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 选择文件夹 |  |  |     // 选择文件夹 | 
		
	
		
			
				|  |  |     wjjSelected (index) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     wjjSelected(index) { | 
		
	
		
			
				|  |  |       this.movingChecked = index |  |  |       this.movingChecked = index | 
		
	
		
			
				|  |  |       console.log(this.movingChecked) |  |  |       console.log(this.movingChecked) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 多选选中 |  |  |     // 多选选中 | 
		
	
		
			
				|  |  |     selectedItem (id) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     selectedItem(id) { | 
		
	
		
			
				|  |  |       const arr = this.selectedListIds |  |  |       const arr = this.selectedListIds | 
		
	
		
			
				|  |  |       // includes()方法判断是否包含某一元素,返回true或false表示是否包含元素,对NaN一样有效 |  |  |       // includes()方法判断是否包含某一元素,返回true或false表示是否包含元素,对NaN一样有效 | 
		
	
		
			
				|  |  |       if (arr.includes(id)) { |  |  |       if (arr.includes(id)) { | 
		
	
	
		
			
				|  | @ -439,13 +443,13 @@ export default { | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 即时发布/定时发布 |  |  |     // 即时发布/定时发布 | 
		
	
		
			
				|  |  |     publishHandle (index) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     publishHandle(index) { | 
		
	
		
			
				|  |  |       this.$router.push( |  |  |       this.$router.push( | 
		
	
		
			
				|  |  |         { |  |  |         { | 
		
	
		
			
				|  |  |           path: '/release', query: { tag: index } |  |  |           path: '/release', query: { tag: index } | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       ) |  |  |       ) | 
		
	
		
			
				|  |  |     }, |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     } | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |   } |  |  |   } | 
		
	
		
			
				|  |  | } |  |  | } | 
		
	
	
		
			
				|  | 
 |