Commit c16bed96 authored by zhengke's avatar zhengke

修改

parent d2d70a3a
<template>
<div class="page-content">
<q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns"
class="sticky-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns" :visible-columns="visibleColumns"
row-key="name">
<template v-slot:top="props">
<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="editVisitor(null)" />
<q-btn color="accent" v-if="authObj&&authObj.isShowEdit" size="sm" class="q-mr-md" icon="add" label="添加试听" @click="editVisitor(null)" />
</div>
</template>
<template v-slot:body-cell-TeacherName="props">
......@@ -39,7 +39,7 @@
</q-td>
</template>
<template v-slot:body-cell-JoinNum="props">
<q-td auto-width :props="props" style="width:25%">
<q-td auto-width :props="props">
<span style="color:red;cursor:pointer"
:class="{'underLine':(props.row.VisitorList&&props.row.VisitorList.length>0)}">
{{props.row.JoinNum}}
......@@ -59,11 +59,30 @@
</template>
<template v-slot:body-cell-TeacherId="props">
<q-td :props="props">
<q-btn flat size="xs" color="accent" @click="goUrl(props.row)" style="font-weight:400" label="学员名单" />
<q-btn flat size="xs" icon="edit" color="accent" @click="editVisitor(props.row)" style="font-weight:400"
label="修改" />
<q-btn flat size="xs" icon="delete" @click="deleteReserve(props.row)" color="negative" style="font-weight:400"
label="删除" />
<q-btn-dropdown v-if="authObj&&authObj.isShowEdit" flat size="xs" color="dark" label="更多">
<q-list>
<q-item clickable v-close-popup @click="goUrl(props.row)">
<q-item-section>
<q-item-label>学员名单</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="goAuditPayment(props.row)">
<q-item-section>
<q-item-label>收支明细</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="editVisitor(props.row)">
<q-item-section>
<q-item-label>修改</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="deleteReserve(props.row)">
<q-item-section>
<q-item-label>删除</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
</template>
<template v-slot:bottom>
......@@ -89,12 +108,16 @@
default: null
},
loading: {
type:Boolean,
type: Boolean,
default: null
},
authObj: {
type: Object,
default: null
}
},
components: {
reserveForm
reserveForm
},
data() {
return {
......@@ -116,7 +139,6 @@
align: 'left',
field: 'ClassTime',
},
{
name: 'RoomName',
label: '教室',
......@@ -135,6 +157,12 @@
align: 'left',
field: 'JoinNum',
},
{
name: 'ClassContent',
label: '试讲内容',
align: 'left',
field: 'ClassContent',
},
{
name: 'CreateByName',
label: '创建人',
......@@ -147,6 +175,10 @@
field: 'TeacherId'
}
],
//表格可见列
visibleColumns: [
'TeacherName', 'ClassDateStr', 'ClassTime', 'RoomName', 'LessonName', 'JoinNum', 'ClassContent', 'CreateByName', 'TeacherId'
], //可见列
reserveObj: {},
isShowReserve: false,
pageMsg: {
......@@ -155,7 +187,9 @@
}
},
created() {
if (this.authObj && !this.authObj.isShowEdit) {
this.visibleColumns.splice(this.visibleColumns.length - 1, 1);
}
},
mounted() {
......@@ -174,7 +208,7 @@
closeReserveForm() {
this.isShowReserve = false
},
refreshPage(){
refreshPage() {
this.$emit('success');
},
goUrl(i) {
......@@ -186,6 +220,12 @@
}
this.OpenNewUrl(path, queryObj)
},
//跳转收支明细
goAuditPayment(obj){
this.OpenNewUrl('../../sale/AudiopaymentDetail', {
Id: 0
})
},
//删除试听课
deleteReserve(item) {
let delMsg = {
......
This diff is collapsed.
<style>
.Sysuser_Date .el-input__inner {
background: transparent !important;
border: 0 !important;
}
</style>
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<div class="col-4 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="msg.StartClassDate" value-format="yyyy-MM-dd" type="date" placeholder="开始时间"
size="small" style="width:47%;" @change="resetSearch" clear-icon="iconfont icon-guanbi">
</el-date-picker>
<el-date-picker v-model="msg.EndClassDate" value-format="yyyy-MM-dd" type="date" placeholder="结束时间"
size="small" style="width:47%;" @change="resetSearch" clear-icon="iconfont icon-guanbi">
</el-date-picker>
</template>
</q-field>
</div>
</div>
<div class="col-3">
<q-select @input="resetSearch" filled option-value="TId" option-label="TeacherName" v-model="msg.TeacherId"
:options="TeacherList" emit-value map-options label="老师" clearable />
</div>
<div class="col-3">
<q-select @input="resetSearch" filled stack-label option-value="RoomId" option-label="RoomName"
v-model="msg.ClassRoomId" ref="ClassRoomId" :options="ClassRoomList" label="关联教室" clearable :dense="false"
class="col-6 q-pb-lg" emit-value map-options />
</div>
<div class="col-3">
<q-input @input="resetSearch" clearable filled v-model="msg.LessonName"
label="试听课程名称" @clear="resetSearch" maxlength="20" />
</div>
</div>
</div>
<reservelist :data="dataList" :authObj="authObj" :loading="loading" @success="refreshPage"></reservelist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="PageCount"
:input="true" @input="changePage" />
</div>
</template>
<script>
import {
GetReserveClassPage
} from '../../api/scheduling/schedu'
import {
getTeacherDropDownList,
queryClassRoomList
} from "../../api/school/index";
import reservelist from '../../components/schedul/reservelist'
export default {
meta: {
title: "试听课管理"
},
components: {
reservelist
},
data() {
return {
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
StartClassDate: "", //开始时间
EndClassDate: "", //结束时间
TeacherId: "", //教师编号
ClassRoomId: "", //教室编号
LessonName:'' //课程名称
},
dataList: [],
loading: false,
PageCount: 0,
TeacherList: [],
ClassRoomList: [],
authObj:{
isShowEdit:false
}
}
},
mounted() {
let nowDay = new Date();
var year = nowDay.getFullYear(); //年
var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate(); //日
this.msg.StartClassDate = year + '-' + month + '-' + day
this.GetTeacherList();
this.getClassRoomList();
this.getList()
},
methods: {
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
},
changePage(val) {
this.msg.pageIndex = val;
this.getList()
},
//获取课程系列分页列表
getList() {
GetReserveClassPage(this.msg).then(res => {
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.PageCount = res.Data.PageCount;
}
})
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({
IsQLeave: 0
}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
}
});
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
}
})
},
//刷新页面
refreshPage() {
this.getList();
},
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
......@@ -8,7 +8,7 @@
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-4">
<div class="col-3">
<div class="col-4 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
......@@ -31,9 +31,13 @@
v-model="msg.ClassRoomId" ref="ClassRoomId" :options="ClassRoomList" label="关联教室" clearable :dense="false"
class="col-6 q-pb-lg" emit-value map-options />
</div>
<div class="col-3">
<q-input @input="resetSearch" clearable filled v-model="msg.LessonName"
label="试听课程名称" @clear="resetSearch" maxlength="20" />
</div>
</div>
</div>
<reservelist :data="dataList" :loading="loading" @success="refreshPage"></reservelist>
<reservelist :data="dataList" :authObj="authObj" :loading="loading" @success="refreshPage"></reservelist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="PageCount"
:input="true" @input="changePage" />
</div>
......@@ -67,6 +71,7 @@
EndClassDate: "", //结束时间
TeacherId: "", //教师编号
ClassRoomId: "", //教室编号
LessonName:'' //课程名称
},
dataList: [],
loading: false,
......@@ -74,6 +79,9 @@
TeacherList: [],
ClassRoomList: [],
authObj: {
isShowEdit:true
}
}
},
mounted() {
......
......@@ -1004,6 +1004,16 @@ const routes = [{
component: () =>
import("pages/sale/mystu.vue")
},
{
path: "/sale/auditionList", //试听列表
component: () =>
import("pages/sale/auditionList.vue")
},
{
path: "/sale/AudiopaymentDetail", //试听-收支明细
component: () =>
import("pages/sale/AudiopaymentDetail.vue")
},
{
path: "/activity/activeType", //活动 活动类型
component: () =>
......
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