瀏覽代碼

修改gotype的储存方式

11wqe1 5 天之前
父節點
當前提交
30b86264c0

+ 1 - 1
src/components/pages/aiAddCourse/addCourse.vue

@@ -7819,7 +7819,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype: (window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       checkAll: false,
       checkAll2: false,
       chooseType: 1,

+ 1 - 1
src/components/pages/aiEasy/addCourse.vue

@@ -7261,7 +7261,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype: (window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       checkAll: false,
       checkAll2: false,
       chooseType: 1,

+ 1 - 1
src/components/pages/classroomObservation/index.vue

@@ -264,7 +264,7 @@ export default {
   },
   data() {
     return {
-      gotype: sessionStorage.getItem("gotype"),
+      gotype: (window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       loading: false,
       createTime: new Date().toLocaleString().replaceAll("/", "-"),
       tid: "",

+ 1 - 1
src/components/pages/course.vue

@@ -443,7 +443,7 @@ export default {
   mixins: [ myMixin ],
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       itemCount: 1,
       courseTitle: "",
       courseText: "",

+ 1 - 1
src/components/pages/easy/addCourse.vue

@@ -8324,7 +8324,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype: (window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       checkAll: false,
       chooseType: 1,
       checkedCities: [],

+ 1 - 1
src/components/pages/evaluation.vue

@@ -565,7 +565,7 @@ export default {
   },
   data() {
     return {
-        gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       data: {
         isLoading: false,
         meta: {

+ 14 - 2
src/components/pages/liyuan/CourseCon.vue

@@ -127,7 +127,14 @@ export default {
       this.getCourse();
     },
     lookMore(){
-        sessionStorage.setItem('gotype', this.$route.path);
+
+        try {
+          window.topU.gotype = this.$route.path
+        } catch (error) {
+          console.log(error);
+        }
+
+        // sessionStorage.setItem('gotype', this.$route.path);
         let to = `/pbl-student-table/dist/#/index?userid=${this.$route.query.userid}&oid=${this.$route.query.oid}&org=${this.$route.query.org}&role=${this.$route.query.role}&tType=${this.$route.query.tType}&cid=&screenType=3&gotype=1`
         let con = this.betaL =='beta'? 'https://beta.pbl.cocorobo.cn' : 'https://pbl.cocorobo.cn'
         console.log( `${con}${to}`);
@@ -265,7 +272,12 @@ export default {
        window.topU.postMessage({ cid: item.courseId, screenType: "3" }, "*");
     },
     goToCourse(courseId) {
-        sessionStorage.setItem('gotype', 'backCourseCon');
+        try {
+          window.topU.gotype = 'backCourseCon'
+        } catch (error) {
+          console.log(error);
+        }
+        // sessionStorage.setItem('gotype', 'backCourseCon');
 
         this.goToCourse4(courseId)
     },

+ 8 - 2
src/components/pages/liyuan/components/backPage.vue

@@ -23,8 +23,14 @@
         },
         methods:{
             backO(){
-                this.$router.push({ path: sessionStorage.getItem('gotype'), query: { userid: this.userid, oid: this.oid, org: this.org, role: this.role, gotype: 1,tType:this.tType } })
-                sessionStorage.removeItem('gotype');
+                // sessionStorage.removeItem('gotype');
+                try {
+                    this.$router.push({ path: (window.topU && window.topU.gotype) ?  window.topU.gotype : '', query: { userid: this.userid, oid: this.oid, org: this.org, role: this.role, gotype: 1,tType:this.tType } })
+                    window.topU.gotype = '' 
+                } catch (error) {
+                    this.$router.go(-1)
+                    console.log(error);
+                }
             }
         },
         mounted(){

+ 6 - 1
src/components/pages/liyuan/components/card.vue

@@ -38,7 +38,12 @@ export default {
     },
     methods: {
         goTo() {
-            sessionStorage.setItem('gotype', this.$route.path);
+            try {
+                window.topU.gotype = this.$route.path
+            } catch (error) {
+                console.log(err);
+            }
+            // sessionStorage.setItem('gotype', this.$route.path);
 
             if (this.type == 1) {    
                 this.$router.push({ path: this.to, query: { userid: this.userid, oid: this.oid, org: this.org, role: this.role,tType: this.tType, gotype: 1,sortId:this.sortId } })

+ 1 - 1
src/components/pages/liyuan/page/examine/index.vue

@@ -237,7 +237,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       pType: 2,
       allData: {
         type: 1,

+ 1 - 1
src/components/pages/liyuan/page/portrait/index.vue

@@ -228,7 +228,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       teachingActivityNum: 0,
       teachingAndResearchActivitiesNum: 0,
       trainingActivityNum: 0,

+ 1 - 1
src/components/pages/liyuan/page/student.vue

@@ -229,7 +229,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       tableHeight: "500px",
       isLoading: false,
       formLabelWidth: "100px",

+ 1 - 1
src/components/pages/newCourse/addCourse.vue

@@ -7607,7 +7607,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       checkAll: false,
       checkAll2: false,
       chooseType: 1,

+ 1 - 1
src/components/pages/pptEasy/addCourse.vue

@@ -2406,7 +2406,7 @@ export default {
   },
   data() {
     return {
-      gotype: sessionStorage.getItem("gotype"),
+      gotype: (window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       checkAll: false,
       chooseType: 1,
       checkedCities: [],

+ 1 - 1
src/components/pages/synergyCourse/course.vue

@@ -309,7 +309,7 @@ export default {
   components: { EditorBar,backPage },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       itemCount: 1,
       courseTitle: "",
       courseText: "",

+ 1 - 1
src/components/pages/sz/teacher.vue

@@ -321,7 +321,7 @@ export default {
     },
   data() {
     return {
-      gotype: sessionStorage.getItem('gotype'),
+      gotype: (window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       tableHeight: "500px",
       isLoading: false,
       formLabelWidth: "100px",

+ 1 - 1
src/components/pages/teacherOffice/index.vue

@@ -344,7 +344,7 @@ export default {
 
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       tableHeight: "500px",
       isLoading: false,
       formLabelWidth: "100px",

+ 1 - 1
src/components/pages/test/add/addTest.vue

@@ -73,7 +73,7 @@ export default {
     },
     data() {
         return {
-            gotype:sessionStorage.getItem('gotype'),
+            gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
             userid: this.$route.query.userid,
             oid: this.$route.query.oid,
             org: this.$route.query.org,

+ 1 - 1
src/components/pages/test/check/index.vue

@@ -2147,7 +2147,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       aiscoId:'',
       aiscoLoading:true,
       cueWord:{

+ 1 - 1
src/components/pages/test/examine/index.vue

@@ -102,7 +102,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       aArray: [],
       bArray: [],
       timeListA:[],

+ 1 - 1
src/components/pages/test/index.vue

@@ -443,7 +443,7 @@ export default {
     components: { EditorBar, CourseProblem, pie1, pie2, randar1, randar2, shareBox, examine, aggregate,backPage },
     data() {
         return {
-            gotype:sessionStorage.getItem('gotype'),
+            gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
             examineData: [],
             cutNumber: 0,
             itemCount: 1,

+ 1 - 1
src/components/pages/testStudent/view/preview.vue

@@ -69,7 +69,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       userid: this.$route.query.userid,
       oid: this.$route.query.oid,
       org: this.$route.query.org,

+ 1 - 1
src/components/pages/works.vue

@@ -552,7 +552,7 @@ export default {
   },
   data() {
     return {
-      gotype:sessionStorage.getItem('gotype'),
+      gotype:(window.topU && window.topU.gotype) ?  window.topU.gotype : '',
       worksDialog:false,
       exportW:0,
       digNum:0,