|
|
@@ -18,8 +18,17 @@
|
|
|
>
|
|
|
<el-button>{{ type === 'h5_games' ? '选择Zip压缩包或单个html文件' : '选取' + labelText + '文件' }}</el-button>
|
|
|
</el-upload>
|
|
|
- <el-button size="small" type="primary" @click="uploadFiles">上传</el-button>
|
|
|
- <el-button size="small" type="primary" @click="useResource">使用资源</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="isEnable(projectResourcePopedom.is_can_upload)"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ @click="uploadFiles"
|
|
|
+ >
|
|
|
+ 上传
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="isEnable(projectResourcePopedom.is_can_use)" size="small" type="primary" @click="useResource">
|
|
|
+ 使用资源
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-divider v-if="showDivider" />
|
|
|
@@ -88,6 +97,7 @@
|
|
|
<script>
|
|
|
import { fileUpload } from '@/api/app';
|
|
|
import { conversionSize } from '@/utils/common';
|
|
|
+import { isEnable } from '@/views/book/courseware/data/common';
|
|
|
|
|
|
import FillDescribe from '../../common/FillDescribe.vue';
|
|
|
import SelectResource from './SelectResource.vue';
|
|
|
@@ -98,7 +108,7 @@ export default {
|
|
|
FillDescribe,
|
|
|
SelectResource,
|
|
|
},
|
|
|
- inject: ['property', 'courseware_id', 'project_id'],
|
|
|
+ inject: ['property', 'courseware_id', 'project_id', 'getProjectResourcePopedom'],
|
|
|
props: {
|
|
|
// 课件id
|
|
|
coursewareId: {
|
|
|
@@ -194,6 +204,7 @@ export default {
|
|
|
file_info: this.fileInfo,
|
|
|
},
|
|
|
visibleResource: false,
|
|
|
+ isEnable,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -212,6 +223,9 @@ export default {
|
|
|
}
|
|
|
return accept;
|
|
|
},
|
|
|
+ projectResourcePopedom() {
|
|
|
+ return this.getProjectResourcePopedom();
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
content: {
|