Commit 4eeb66d1 authored by 黄奎's avatar 黄奎

页面修改

parent 1b2f333b
......@@ -3,20 +3,12 @@
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ClassName"
label="班级名称" />
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.RoomName"
label="教室名称" />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName"
label="课程名称" />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.TeacherName"
label="讲师名称" />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.AssistName"
label="助教名称" />
<q-select @input="getList" standout="bg-primary text-white" option-value="SId" option-label="SName"
v-model="msg.School_Id" :options="schoolList" emit-value map-options label="关联校区" />
</div>
</div>
<div class="page-option">
......@@ -77,8 +69,8 @@
</template>
<script>
import {
getClassPage,
deleteClass
queryClassRoomPage,
getSchoolDropdown
} from '../../api/school/index'
import classForm from '../../components/school/classmanage/class-form'
export default {
......@@ -92,54 +84,17 @@
return {
currentUrl: "",
columns: [{
name: 'ClassName',
required: true,
label: '班级名称',
name: 'RoomName',
label: '教师名称',
align: 'left',
field: row => row.ClassName
field: 'RoomName',
},
{
name: 'CourseName',
label: '所属课程',
field: 'CourseName',
name: 'SchoolName',
label: '所属校区',
field: 'SchoolName',
align: 'left'
},
{
name: 'TeacherHead',
label: '',
field: 'TeacherHead',
align: 'left',
},
{
name: 'TeacherName',
label: '讲师',
field: 'TeacherName',
align: 'left',
},
{
name: 'AssistIcon',
label: '',
align: 'left',
field: 'AssistIcon'
},
{
name: 'AssistName',
label: '助教',
align: 'left',
field: 'AssistName'
},
{
name: 'StudentCount',
label: '学员数量',
align: 'left',
field: 'StudentCount'
},
{
name: 'JobCount',
label: '作业数量',
align: 'left',
field: 'JobCount'
},
{
name: 'CreateTimeStr',
label: '创建时间',
......@@ -158,24 +113,42 @@
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
ClassName: "",
CourseName: "",
AssistName: "",
TeacherName: "",
RoomName: "",
School_Id: 0, //校区编号
},
pageCount: 0,
isShowEditClassForm: false,
classOption: null,
schoolList:[],//校区列表
}
},
created() {
this.getSchool();
},
mounted() {
this.currentUrl = this.$route.path
this.queryClassPage()
this.getClassRoomPage()
},
methods: {
//获取校区列表
getSchool() {
getSchoolDropdown({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
if (!tempArray) {
tempArray = [];
}
tempArray.unshift({
SId: 0,
SName: "不限"
})
this.schoolList = tempArray;
}
})
},
resetSearch() {
this.msg.pageIndex = 1;
this.queryClassPage();
this.getClassRoomPage();
},
//删除班级
deleteClass(obj) {
......@@ -206,21 +179,22 @@
message: '操作成功',
position: 'top'
})
that.queryClassPage();
that.getClassRoomPage();
}
})
});
},
changePage(val) {
this.msg.pageIndex = val;
this.queryClassPage();
this.getClassRoomPage();
},
queryClassPage() {
getClassRoomPage() {
this.loading = true
getClassPage(this.msg).then(res => {
queryClassRoomPage(this.msg).then(res => {
this.loading = false
this.data = res.Data.PageData
this.pageCount = res.Data.PageCount
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
console.log("this.data ", this.data);
}).catch(() => {
this.loading = false
})
......@@ -233,7 +207,7 @@
this.msg.AssistName = "";
this.msg.TeacherName = "";
}
this.queryClassPage()
this.getClassRoomPage()
},
EditClass(obj) {
if (obj) {
......
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