Commit da545ee1 authored by 黄奎's avatar 黄奎

页面修改

parent 68b4882f
......@@ -3,25 +3,25 @@
<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 filled v-model="msg.LessonName" label="课程名称"
@clear="resetSearch" maxlength="30" />
<q-input @input="resetSearch" clearable filled v-model="msg.LessonName" label="课程名称" @clear="resetSearch"
maxlength="30" />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table no-bottom-table" separator="none" :data="dataList" :columns="columns" row-key="name">
<template v-slot:top="props">
<template v-slot:top>
<div class="col-2 q-table__title">试听课程管理</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增试听课" @click="addObj(null)" />
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增试听课" @click="addObj(null)" />
</div>
</template>
<template v-slot:body-cell-CalculateType="props">
<q-td>
{{props.row.CalculateType==1?'单次':'按月'}}
</q-td>
<q-td>
{{props.row.CalculateType==1?'单次':'按月'}}
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="pageCount"
......@@ -60,52 +60,67 @@
data() {
return {
columns: [{
name: 'LessonName',
label: '试听课程名称',
field: 'LessonName',
align: 'left'
}, {
name: 'TeacherId',
label: '试听课主讲老师',
align: 'left',
field: 'TeacherId'
}, {
name: 'ClassHourFee',
label: '课时费',
align: 'left',
field: 'ClassHourFee'
}, {
name: 'CalculateType',
label: '核算方式',
align: 'left',
field: 'CalculateType'
}, {
name: 'Id',
label: '操作',
field: 'Id'
}],
name: 'LessonName',
label: '试听课程名称',
field: 'LessonName',
align: 'left'
},
{
name: 'TeacherName',
label: '试听课主讲老师',
align: 'left',
field: 'TeacherName'
}, {
name: 'ClassHourFee',
label: '课时费',
align: 'left',
field: 'ClassHourFee'
}, {
name: 'CalculateType',
label: '核算方式',
align: 'left',
field: 'CalculateType'
},
{
name: 'CreateByName',
label: '创建人',
align: 'left',
field: 'CreateByName'
},
{
name: 'CreateTimeStr',
label: '创建时间',
align: 'left',
field: 'CreateTimeStr'
},
{
name: 'Id',
label: '操作',
field: 'Id'
}
],
msg: {
PageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
pageSize: 1,
rowsPerPage: 1,
LessonName: ""
},
dataList: [],
loading: true,
isShowListenForm: false,
customObj: {},
pageCount:0
pageCount: 0
}
},
mounted() {
this.getList()
},
methods: {
resetSearch(){
resetSearch() {
this.msg.PageIndex = 1;
this.getList();
},
changePage(val){
changePage(val) {
this.msg.PageIndex = val;
this.getList();
},
......@@ -164,10 +179,8 @@
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
</style>
\ No newline at end of file
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