Commit 09f70246 authored by zhengke's avatar zhengke

修改

parent ef0faced
...@@ -40,8 +40,9 @@ ...@@ -40,8 +40,9 @@
</style> </style>
<template> <template>
<div class="page-content"> <div class="page-content">
<q-table no-data-label="暂无相关数据" flat class="sticky-column-table sticky-right-column-table" separator="none" <q-table :pagination="pageMsg" no-data-label="暂无相关数据" flat
:data="data" :columns="columns" row-key="name"> class="sticky-column-table sticky-right-column-table no-bottom-table" separator="none" :data="data"
:columns="columns" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">班级信息</div> <div class="col-2 q-table__title">班级信息</div>
<q-space /> <q-space />
...@@ -141,37 +142,43 @@ ...@@ -141,37 +142,43 @@
<q-item-label>收支明细</q-item-label> <q-item-label>收支明细</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup @click="removeClass(props.row,1)" v-if="props.row.Status==0"> <q-item clickable v-close-popup @click="removeClass(props.row,1)"
v-if="props.row.Status==0&&AuthorityObj.isShowDelBtn">
<q-item-section> <q-item-section>
<q-item-label>删除</q-item-label> <q-item-label>删除</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup @click="removeClass(props.row,0)" v-if="props.row.Status==1"> <q-item clickable v-close-popup @click="removeClass(props.row,0)"
v-if="props.row.Status==1&&AuthorityObj.isShowRestoreBtn">
<q-item-section> <q-item-section>
<q-item-label>恢复</q-item-label> <q-item-label>恢复</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup @click="showOtherCourse(props.row)"> <q-item clickable v-close-popup @click="showOtherCourse(props.row)"
v-if="AuthorityObj.isShowOtherCourseBtn">
<q-item-section> <q-item-section>
<q-item-label>关联其他课程</q-item-label> <q-item-label>关联其他课程</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup @click="gomonthLessonCost(props.row)"> <q-item clickable v-close-popup @click="gomonthLessonCost(props.row)"
v-if="AuthorityObj.isShowLessonCost">
<q-item-section> <q-item-section>
<q-item-label>月度课耗</q-item-label> <q-item-label>月度课耗</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup v-if="props.row.ClassStatus!=3" @click.stop="getClassItem(props.row)"> <q-item clickable v-close-popup v-if="props.row.ClassStatus!=3&&AuthorityObj.isShowStatusChange"
@click.stop="getClassItem(props.row)">
<q-item-section> <q-item-section>
<q-item-label>状态变更</q-item-label> <q-item-label>状态变更</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup @click.stop="goStudent(props.row)"> <q-item clickable v-close-popup @click.stop="goStudent(props.row)" v-if="AuthorityObj.isShowStudentMenu">
<q-item-section> <q-item-section>
<q-item-label>未完成学员名单</q-item-label> <q-item-label>未完成学员名单</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item v-if="props.row.ClassStatus!=3" clickable v-close-popup @click="classApply(props.row)"> <q-item v-if="props.row.ClassStatus!=3&&AuthorityObj.isShowApply" clickable v-close-popup
@click="classApply(props.row)">
<q-item-section> <q-item-section>
<q-item-label>调课申请</q-item-label> <q-item-label>调课申请</q-item-label>
</q-item-section> </q-item-section>
...@@ -197,7 +204,6 @@ ...@@ -197,7 +204,6 @@
</template> </template>
<script> <script>
//获取校区列表 //获取校区列表
import { import {
...@@ -219,6 +225,10 @@ ...@@ -219,6 +225,10 @@
type: Array, type: Array,
default: null default: null
}, },
authObj: {
type: Object,
default: null
}
}, },
components: { components: {
classForm, classForm,
...@@ -313,16 +323,54 @@ ...@@ -313,16 +323,54 @@
TeacherList: [], TeacherList: [],
isShowStatusChange: false, //是否显示修改状态弹窗 isShowStatusChange: false, //是否显示修改状态弹窗
isShowTiaoke: false, //是否显示调课申请 isShowTiaoke: false, //是否显示调课申请
pageMsg: {
rowsPerPage: 12,
},
//权限显示对象
AuthorityObj: {
isShowDelBtn: true, //显示删除
isShowRestoreBtn: true, //显示恢复
isShowOtherCourseBtn: true, //显示关联其他课程
isShowLessonCost: true, //显示月度课耗
isShowStatusChange: true, //显示状态变更
isShowStudentMenu: true, //显示未完成学员名单
isShowApply: true //显示调课申请
},
} }
}, },
created() { created() {
console.log("this.data", this.data); this.initAuth();
}, },
mounted() { mounted() {
}, },
methods: { methods: {
//初始化权限信息
initAuth() {
if (this.authObj) {
if (this.authObj.isShowDelBtn != null && this.authObj.isShowDelBtn) {
this.AuthorityObj.isShowDelBtn = this.authObj.isShowDelBtn;
}
if (this.authObj.isShowRestoreBtn != null && this.authObj.isShowRestoreBtn) {
this.AuthorityObj.isShowRestoreBtn = this.authObj.isShowRestoreBtn;
}
if (this.authObj.isShowOtherCourseBtn != null && this.authObj.isShowOtherCourseBtn) {
this.AuthorityObj.isShowOtherCourseBtn = this.authObj.isShowOtherCourseBtn;
}
if (this.authObj.isShowLessonCost != null && this.authObj.isShowLessonCost) {
this.AuthorityObj.isShowLessonCost = this.authObj.isShowLessonCost;
}
if (this.authObj.isShowStatusChange != null && this.authObj.isShowStatusChange) {
this.AuthorityObj.isShowStatusChange = this.authObj.isShowStatusChange;
}
if (this.authObj.isShowStudentMenu != null && this.authObj.isShowStudentMenu) {
this.AuthorityObj.isShowStudentMenu = this.authObj.isShowStudentMenu;
}
if (this.authObj.isShowApply != null && this.authObj.isShowApply) {
this.AuthorityObj.isShowApply = this.authObj.isShowApply;
}
}
},
//删除班级 //删除班级
removeClass(item, status) { removeClass(item, status) {
let delMsg = { let delMsg = {
...@@ -395,6 +443,11 @@ ...@@ -395,6 +443,11 @@
}, },
//刷新页面 //刷新页面
refreshPage() { refreshPage() {
this.isShowClassForm = false;
this.isShowClassInfo = false;
this.IsShowOtherCourse = false;
this.isShowStatusChange = false;
this.isShowTiaoke = false;
//调用父页面成功方法 //调用父页面成功方法
this.$emit('success'); this.$emit('success');
}, },
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<classlist :data="data" @success="refreshPage"></classlist> <classlist :data="data" :authObj="authObj" @success="refreshPage"></classlist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" /> :input="true" @input="changePage" />
</div> </div>
...@@ -112,6 +112,16 @@ ...@@ -112,6 +112,16 @@
classStatusList: [], //班级状态列表 classStatusList: [], //班级状态列表
schoolList: [], //校区列表 schoolList: [], //校区列表
pageCount: 0, pageCount: 0,
//权限判断
authObj: {
isShowDelBtn: true, //显示删除
isShowRestoreBtn: true, //显示恢复
isShowOtherCourseBtn: true, //显示关联其他课程
isShowLessonCost: true, //显示月度课耗
isShowStatusChange: true, //显示状态变更
isShowStudentMenu: true, //显示未完成学员名单
isShowApply:true //显示调课申请
}
} }
}, },
created() { created() {
......
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