|
|
@ -94,14 +94,14 @@ |
|
|
|
<audio v-if="formatType==2" :src="uploadForm.deposit_url" controls></audio> |
|
|
|
<!-- <p>文件名:{{ fileNames }}</p> --> |
|
|
|
</div> |
|
|
|
<Upload ref="uploadMaterial" :is-theme="isTheme" @saveMaterial="saveMaterial" @uploadSubmit="uploadSubmit" /> |
|
|
|
<Upload ref="uploadMaterial" :is-theme="isTheme" @saveMaterial="saveMaterial" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="formatType != 0" label="添加封面" prop="img_path"> |
|
|
|
<UploadCover ref="childUpload" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" round @click="uploadSubmit('uploadForm')">确 定</el-button> |
|
|
|
<el-button type="primary" round @click="uploadSubmit()">确 定</el-button> |
|
|
|
<el-button round @click="resetForm('uploadForm')">关 闭</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
@ -158,6 +158,23 @@ |
|
|
|
<el-pagination style="margin-top: 20px;" background :current-page="page" :total="total" :page-size="size" :pager-count="5" :page-sizes="[3, 5, 10]" layout="prev, pager, next, jumper,->,sizes,total" @current-change="getThemeHistoryList" @size-change="handleSizeChange" /> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- <div class="release_layer upload_layer"> |
|
|
|
<el-dialog :close-on-click-modal="false" :show-close="false" :visible.sync="selectContVisible" width="1200px"> |
|
|
|
<div slot="title" class="layer_tab_title"> |
|
|
|
<span>主题库</span> |
|
|
|
</div> |
|
|
|
<ThemeGalleryList |
|
|
|
ref="ThemeGalleryList" |
|
|
|
:is-multi-selected="isMultiSelected" |
|
|
|
:mulit-text="mulitText" |
|
|
|
:show-item-info="showItemInfo" |
|
|
|
:tab-item="tabItem" |
|
|
|
@changedMultiSelected="changedMultiSelected" |
|
|
|
/> |
|
|
|
</el-dialog> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -241,7 +258,8 @@ export default { |
|
|
|
isEditTheme: false, |
|
|
|
page: 1, |
|
|
|
size: 10, |
|
|
|
total: 0 |
|
|
|
total: 0, |
|
|
|
selectContVisible: true |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
@ -466,46 +484,53 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
this.uploadForm.class_ids = this.selectClassifyList |
|
|
|
if (this.uploadForm.class_ids.length == 0) { |
|
|
|
this.$message.error('请选择类别名称') |
|
|
|
return |
|
|
|
} else if (!this.uploadForm.device_direction) { |
|
|
|
this.$message.error('请选择设备方向') |
|
|
|
return |
|
|
|
} else if (!this.uploadForm.deposit_url) { |
|
|
|
this.$message.error('请上传资源内容') |
|
|
|
return |
|
|
|
} else if (!this.uploadForm.material_name) { |
|
|
|
this.$message.error('请输入文件名称') |
|
|
|
return |
|
|
|
} |
|
|
|
// this.uploadForm.orga_id = this.orga_id |
|
|
|
this.uploadForm.store_type = 2 |
|
|
|
this.$refs[formName].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
setTimeout(() => { |
|
|
|
saveMaterial(this.uploadForm).then(res => { |
|
|
|
if (res.code === 200) { |
|
|
|
this.$message({ |
|
|
|
message: '上传素材成功', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
this.uploadDialogVisible = false |
|
|
|
this.getThemeHistoryList() |
|
|
|
// 上传表单重置 |
|
|
|
this.selectClassifyList = [] |
|
|
|
this.uploadForm.device_direction = 0 |
|
|
|
this.uploadForm.deposit_url = null |
|
|
|
this.formatType = -1 |
|
|
|
this.uploadForm.material_type = null |
|
|
|
this.uploadForm.img_path = null |
|
|
|
this.materialImgPath = null |
|
|
|
this.$nextTick(() => { |
|
|
|
if (this.$refs.uploadMaterial) { |
|
|
|
this.$refs.uploadMaterial.filePercent = 0 |
|
|
|
} |
|
|
|
if (this.$refs.childUpload) { |
|
|
|
this.$refs.childUpload.imageUrl = null |
|
|
|
} |
|
|
|
}) |
|
|
|
this.$refs.uploadForm.resetFields() |
|
|
|
} else { |
|
|
|
this.$message.error(res.msg) |
|
|
|
setTimeout(() => { |
|
|
|
saveMaterial(this.uploadForm).then(res => { |
|
|
|
if (res.code === 200) { |
|
|
|
this.$message({ |
|
|
|
message: '上传素材成功', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
this.uploadDialogVisible = false |
|
|
|
this.getThemeHistoryList() |
|
|
|
this.$refs.ThemeGalleryList.getThemeGallery() |
|
|
|
// 上传表单重置 |
|
|
|
this.selectClassifyList = [] |
|
|
|
this.uploadForm.device_direction = 0 |
|
|
|
this.uploadForm.deposit_url = null |
|
|
|
this.formatType = -1 |
|
|
|
this.uploadForm.material_type = null |
|
|
|
this.uploadForm.img_path = null |
|
|
|
this.materialImgPath = null |
|
|
|
this.$nextTick(() => { |
|
|
|
if (this.$refs.uploadMaterial) { |
|
|
|
this.$refs.uploadMaterial.filePercent = 0 |
|
|
|
} |
|
|
|
if (this.$refs.childUpload) { |
|
|
|
this.$refs.childUpload.imageUrl = null |
|
|
|
} |
|
|
|
}) |
|
|
|
}, 200) |
|
|
|
} else { |
|
|
|
console.log('error submit!!') |
|
|
|
return false |
|
|
|
} |
|
|
|
}) |
|
|
|
this.$refs.uploadForm.resetFields() |
|
|
|
} else { |
|
|
|
this.$message.error(res.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, 200) |
|
|
|
}, |
|
|
|
// 上传历史list - 主题库 |
|
|
|
getThemeHistoryList(pager = 1) { |
|
|
|