lsc 1 year ago
parent
commit
d5f86c89a2

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.fabac7de2e14bf5f94e010b7e0771a02.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.f1661c5ebfd33221b88f.js></script><script type=text/javascript src=./static/js/app.ad0e0323343f354468fc.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.a99661476c6d8a2c87d1f1e32a9eec05.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.f1661c5ebfd33221b88f.js></script><script type=text/javascript src=./static/js/app.3152988421af71c36e1a.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.a99661476c6d8a2c87d1f1e32a9eec05.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.a99661476c6d8a2c87d1f1e32a9eec05.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.3152988421af71c36e1a.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.3152988421af71c36e1a.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.ad0e0323343f354468fc.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 32 - 7
src/components/pages/teacherSource/dialog.vue

@@ -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();

+ 28 - 3
src/components/pages/teacherSource/index.vue

@@ -33,7 +33,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'
@@ -84,7 +84,7 @@
                                     ">{{ item.name }}</span>
                                 <el-checkbox-group v-model="courseTypeId2" v-if="CourseTypeJson[item.id].length > 0
                                     ">
-                                    <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id"
+                                    <el-checkbox v-for="item1 in ctype" :key="item1.id"
                                         :label="item1.id">{{ item1.name }}</el-checkbox>
                                 </el-checkbox-group>
                             </div>
@@ -157,6 +157,31 @@ export default {
     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: {
         check(url){
             window.open(url)
@@ -214,6 +239,7 @@ export default {
                 });
         },
         getCourse2(typeName, ftypeId, typeid, type) {
+            this.typeb = "";
             this.page = 1;
             if (typeName == "场景") {
                 if (type == 1) {
@@ -257,7 +283,6 @@ export default {
                 }
             }
             if(this.typea == "" && this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') == -1){
-                this.typeb = "";
                 this.typeE = []
             }
             this.getSource();

Some files were not shown because too many files changed in this diff