|
@@ -87,10 +87,25 @@
|
|
<FormItem :label="$t('stuAccount.stuName')" prop="name">
|
|
<FormItem :label="$t('stuAccount.stuName')" prop="name">
|
|
<Input v-model="studentInfo.name" :placeholder="$t('stuAccount.stuNameHolder')"></Input>
|
|
<Input v-model="studentInfo.name" :placeholder="$t('stuAccount.stuNameHolder')"></Input>
|
|
</FormItem>
|
|
</FormItem>
|
|
|
|
+ <!-- 學制、學級 -->
|
|
|
|
+ <div style="display:flex;justify-content: space-between;">
|
|
|
|
+ <!-- 學制 -->
|
|
|
|
+ <FormItem :label="$t('學制')" style="width:45%">
|
|
|
|
+ <Select v-model="searchPeriod" style="width: 100%;" :placeholder="$t('stuAccount.periodHolder')" clearable >
|
|
|
|
+ <Option v-for="(item, index) in periods" :value="item.id" :key="index">{{ item.name }}</Option>
|
|
|
|
+ </Select>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <!-- 學級 -->
|
|
|
|
+ <FormItem :label="$t('學級')" style="width:45%">
|
|
|
|
+ <Select v-model="searchGrade" style="width: 100%; margin-left: 5px" :placeholder="$t('stuAccount.gradeHolder')" not-found-text="请先选择学段" clearable>
|
|
|
|
+ <Option v-for="(item, index) in filterGrades" :value="item.id" :key="index">{{ item.name }}</Option>
|
|
|
|
+ </Select>
|
|
|
|
+ </FormItem>
|
|
|
|
+ </div>
|
|
<!-- 教室資訊 -->
|
|
<!-- 教室資訊 -->
|
|
<FormItem :label="$t('stuAccount.classroomInfo')" prop="classId">
|
|
<FormItem :label="$t('stuAccount.classroomInfo')" prop="classId">
|
|
<Select filterable style="width:100%" :placeholder="$t('stuAccount.classroomInfoHolder')" v-model="studentInfo.classId" clearable>
|
|
<Select filterable style="width:100%" :placeholder="$t('stuAccount.classroomInfoHolder')" v-model="studentInfo.classId" clearable>
|
|
- <Option v-for="(item,index) in classes.filter((item)=>{ return item.openType == '1'})" :value="item.id" :key="index" @click.native="setCurrentClassDetail(item)">{{ item.name }}</Option>
|
|
|
|
|
|
+ <Option v-for="(item,index) in filterClasses" :value="item.id" :key="index" @click.native="setCurrentClassDetail(item)">{{ item.name }}</Option>
|
|
</Select>
|
|
</Select>
|
|
<span style="float:right;color:#6DE2C4;cursor:pointer;text-decoration:underline;font-size:12px;" @click="createClassroom">{{$t('stuAccount.newClassroom')}}</span>
|
|
<span style="float:right;color:#6DE2C4;cursor:pointer;text-decoration:underline;font-size:12px;" @click="createClassroom">{{$t('stuAccount.newClassroom')}}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
@@ -246,7 +261,9 @@
|
|
{ validator: validateclassId, trigger: 'blur' },
|
|
{ validator: validateclassId, trigger: 'blur' },
|
|
]
|
|
]
|
|
},
|
|
},
|
|
- modal_loading: false
|
|
|
|
|
|
+ modal_loading: false,
|
|
|
|
+ searchPeriod: '',
|
|
|
|
+ searchGrade: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -256,6 +273,30 @@
|
|
classes: 'user/getClasses', // 教室ID,
|
|
classes: 'user/getClasses', // 教室ID,
|
|
students: 'schoolBaseInfo/getStudent', // 學生List
|
|
students: 'schoolBaseInfo/getStudent', // 學生List
|
|
}),
|
|
}),
|
|
|
|
+ filterGrades: function() {
|
|
|
|
+ var data = this.grades
|
|
|
|
+ if (this.searchPeriod) {
|
|
|
|
+ let periodId = this.searchPeriod
|
|
|
|
+ data = data.filter(function(item) {
|
|
|
|
+ return item.periodId == periodId
|
|
|
|
+ })
|
|
|
|
+ return data
|
|
|
|
+ } else {
|
|
|
|
+ return []
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ filterClasses: function() {
|
|
|
|
+ var data = this.classes
|
|
|
|
+ if (this.searchGrade) {
|
|
|
|
+ let gradeId = this.searchGrade
|
|
|
|
+ data = data.filter(function(item) {
|
|
|
|
+ return item.gradeId == gradeId && item.openType == '1'
|
|
|
|
+ })
|
|
|
|
+ return data
|
|
|
|
+ } else {
|
|
|
|
+ return []
|
|
|
|
+ }
|
|
|
|
+ },
|
|
show: {
|
|
show: {
|
|
get() {
|
|
get() {
|
|
// if (this.bizType == 2 && this.isShow == true) {
|
|
// if (this.bizType == 2 && this.isShow == true) {
|