Commit c3a1a855 authored by zhengke's avatar zhengke

修改

parent 9a52fd4b
......@@ -9,7 +9,7 @@
<div class="row wrap">
<q-select filled stack-label option-value="SId" option-label="SName" v-model="objOption.School_Id"
ref="School_Id" :options="schoolList" label="所属校区" :dense="false" class="col-12 q-pb-lg" emit-value
map-options :rules="[val => !!val || '请选择所属校区']" />
map-options/>
</div>
<div class="row wrap">
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.RoomName" ref="RoomName"
......@@ -157,7 +157,7 @@
}
var obj = {
SName: '不限',
SId: 0
SId: -1
}
tempArray.unshift(obj);
this.schoolList = tempArray;
......@@ -184,16 +184,20 @@
})
return
}
this.saveLoading = true
this.$refs.School_Id.validate()
if(this.objOption.School_Id==-1){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择所属校区`
})
return
}
this.$refs.RoomName.validate()
if (
!this.$refs.School_Id.hasError &&
!this.$refs.RoomName.hasError
) {
if (!this.$refs.RoomName.hasError) {
if (!Array.isArray(this.objOption.RoomPicList)) {
this.objOption.RoomPicList=[this.objOption.RoomPicList]
}
this.saveLoading = true
saveClassRoom(this.objOption).then(res => {
this.saveLoading = false
this.$q.notify({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment