Bladeren bron

班级信息

reloaded 4 jaren geleden
bovenliggende
commit
93543a530d
2 gewijzigde bestanden met toevoegingen van 0 en 47 verwijderingen
  1. 0 25
      src/layout/class/classInfo.vue
  2. 0 22
      src/views/class/info/classInfo.vue

+ 0 - 25
src/layout/class/classInfo.vue

@@ -103,9 +103,6 @@
 <script>
 import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: classes } = createNamespacedHelpers('classes');
-const { mapActions: location } = createNamespacedHelpers('location');
-const { mapActions: teacher } = createNamespacedHelpers('teacher');
-const { mapActions: director } = createNamespacedHelpers('director');
 export default {
   name: 'classInfo',
   props: {},
@@ -121,30 +118,8 @@ export default {
   },
   methods: {
     ...classes(['fetch']),
-    ...location({ locationFetch: 'fetch' }),
-    ...teacher({ teaFetch: 'fetch' }),
-    ...director({ dirFetch: 'fetch' }),
     async search() {
       const classinfo = (await this.fetch(this.classid)).data;
-      if (classinfo.yclocationid) {
-        classinfo.yclocation = (await this.locationFetch(classinfo.yclocationid)).data.name;
-      }
-      if (classinfo.kzjhlocationid) {
-        classinfo.kzjhlocation = (await this.locationFetch(classinfo.kzjhlocationid)).data.name;
-      }
-      if (classinfo.kbyslocationid) {
-        classinfo.kbyslocation = (await this.locationFetch(classinfo.kbyslocationid)).data.name;
-      }
-      if (classinfo.jslocationid) {
-        classinfo.jslocation = (await this.locationFetch(classinfo.jslocationid)).data.name;
-      }
-      if (classinfo.lyteacherid) {
-        let res = await this.teaFetch(classinfo.lyteacherid);
-        if (!res.data) {
-          res = await this.dirFetch(classinfo.lyteacherid);
-        }
-        classinfo.lyteacher = res.data.name;
-      }
       this.$set(this, `classinfo`, classinfo);
     },
   },

+ 0 - 22
src/views/class/info/classInfo.vue

@@ -117,30 +117,8 @@ export default {
   },
   methods: {
     ...classes(['fetch']),
-    ...location({ locationFetch: 'fetch' }),
-    ...teacher({ teaFetch: 'fetch' }),
-    ...director({ dirFetch: 'fetch' }),
     async search() {
       const classinfo = (await this.fetch(this.classid)).data;
-      if (classinfo.yclocationid) {
-        classinfo.yclocation = (await this.locationFetch(classinfo.yclocationid)).data.name;
-      }
-      if (classinfo.kzjhlocationid) {
-        classinfo.kzjhlocation = (await this.locationFetch(classinfo.kzjhlocationid)).data.name;
-      }
-      if (classinfo.kbyslocationid) {
-        classinfo.kbyslocation = (await this.locationFetch(classinfo.kbyslocationid)).data.name;
-      }
-      if (classinfo.jslocationid) {
-        classinfo.jslocation = (await this.locationFetch(classinfo.jslocationid)).data.name;
-      }
-      if (classinfo.lyteacherid) {
-        let res = await this.teaFetch(classinfo.lyteacherid);
-        if (res.length < 1) {
-          res = await this.dirFetch(classinfo.lyteacherid);
-        }
-        classinfo.lyteacher = res.data.name;
-      }
       this.$set(this, `classinfo`, classinfo);
     },
   },