Explorar o código

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

zhangjie %!s(int64=2) %!d(string=hai) anos
pai
achega
4f7978bb6d
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/components/base/CollegeSelect.vue

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

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