Эх сурвалжийг харах

fix:学期默认选中当前学期

zhangjie 2 жил өмнө
parent
commit
4f7978bb6d

+ 5 - 0
src/components/base/CollegeSelect.vue

@@ -76,6 +76,11 @@ export default {
         const res = await unitQueryByType({}, "COLLEGE");
         const res = await unitQueryByType({}, "COLLEGE");
         this.optionList = res;
         this.optionList = res;
       }
       }
+      const defaultCollege = this.optionList.find(item => item.inUsed);
+      if (defaultCollege) {
+        this.selected = defaultCollege.id;
+        this.select();
+      }
     },
     },
     select() {
     select() {
       this.$emit("input", this.selected);
       this.$emit("input", this.selected);