|
@@ -28,7 +28,7 @@
|
|
|
:class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''">
|
|
|
全部
|
|
|
</div>
|
|
|
- <div v-for="(item1, index1) in CourseTypeJson[item.id]" :key="index + '-' + index1"
|
|
|
+ <div v-for="(item1, index1) in ctype(item.id)" :key="index + '-' + index1"
|
|
|
:label="item1.id" @click="getCourse2(item.name, item.id, item1.id, 2)">
|
|
|
<div class="cName" :class="typea == item1.id || typeb == item1.id
|
|
|
? 'isCType'
|
|
@@ -151,21 +151,46 @@ export default {
|
|
|
s_url: "",
|
|
|
s_detail: "",
|
|
|
s_label: [],
|
|
|
- sourceData:{}
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
this.selectAllType();
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ctype() {
|
|
|
+ return function (tid) {
|
|
|
+ if(tid == 'e4cb3395-5602-4441-801c-f380e8935a74'){
|
|
|
+ return this.CourseTypeJson[tid]
|
|
|
+ }else{
|
|
|
+ if(this.typea == 'b107f98f-1dc4-4ede-80b4-178ba22b6a59'){
|
|
|
+ return this.CourseTypeJson[tid].filter(e => {
|
|
|
+ return ['备课资源','作业资源' ].indexOf(e.name) != -1
|
|
|
+ })
|
|
|
+ }else if(this.typea == '3b12e8d9-866f-46bb-aa22-76cb3b7788b3'){
|
|
|
+ return this.CourseTypeJson[tid].filter(e => {
|
|
|
+ return ['语文','科学','英语','历史','化学'].indexOf(e.name) != -1
|
|
|
+ })
|
|
|
+ }else if(this.typea == 'd760341a-5ab7-417f-bfc8-0fd3f183408a'){
|
|
|
+ return this.CourseTypeJson[tid].filter(e => {
|
|
|
+ return ['优质课例'].indexOf(e.name) != -1
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ return this.CourseTypeJson[tid]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
checka(item){
|
|
|
- if(this.sourceData[item.id]){
|
|
|
- delete this.sourceData[item.id]
|
|
|
+ let _sourceData = this.sourceData
|
|
|
+ if(_sourceData[item.id]){
|
|
|
+ delete _sourceData[item.id]
|
|
|
}else{
|
|
|
- this.sourceData[item.id] = item
|
|
|
+ _sourceData[item.id] = item
|
|
|
}
|
|
|
this.$forceUpdate()
|
|
|
- this.$emit("update:sourceData",this.sourceData)
|
|
|
+ this.$emit("update:sourceData",_sourceData)
|
|
|
},
|
|
|
check(url){
|
|
|
window.open(url)
|
|
@@ -223,6 +248,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getCourse2(typeName, ftypeId, typeid, type) {
|
|
|
+ this.typeb = "";
|
|
|
this.page = 1;
|
|
|
if (typeName == "场景") {
|
|
|
if (type == 1) {
|
|
@@ -266,7 +292,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if(this.typea == "" && this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') == -1){
|
|
|
- this.typeb = "";
|
|
|
this.typeE = []
|
|
|
}
|
|
|
this.getSource();
|