Commit 792fc6a6 authored by 黄奎's avatar 黄奎

页面修改

parent 2cad488e
...@@ -49,113 +49,10 @@ ...@@ -49,113 +49,10 @@
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <classlist :data="data" :authObj="authObj" @success="refreshPage"></classlist>
class="sticky-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
row-key="name"> :input="true" @input="changePage" />
<template v-slot:top="props">
<div class="col-2 q-table__title">班级信息</div>
<q-space />
</template>
<template v-slot:body-cell-ClassName="props">
<q-td auto-width :props="props">
<div style="display: flex;align-items: center;">
<q-avatar size="md" style="background:#d4dfff;color:#2961FE;font-weight:bold;" v-if="props.row.ClassName">
{{GetFirst(props.row.ClassName)}}</q-avatar>
<div>
<span style="color:#2961FE;margin-left:10px;cursor:pointer;" @click="getClassInfo(props.row)"
title="点击查看详情">{{props.row.ClassName}}</span>
<div style="margin-left: 10px;">{{props.row.ClassNo}}</div>
</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-OtherCourseName="props">
<q-td auto-width :props="props">
<template v-if="props.row.OtherCourseList">
<template v-if="props.row.OtherCourseList.length==1">
{{props.row.OtherCourseList[0].CourseName}}{{props.row.OtherCourseList[0].ClassHours}}课时】
</template>
<template v-if="props.row.OtherCourseList.length>1">
{{props.row.OtherCourseList[0].CourseName}}
<span class="OtherCourseNum">
{{props.row.OtherCourseList.length}}
<q-popup-proxy>
<q-banner>
<table class="OCourseTable" style="border-collapse:collapse;">
<tr>
<th>课程名称</th>
<th>课时数</th>
</tr>
<tr v-for="(sItem,sIndex) in props.row.OtherCourseList"
style="border-bottom:1px dashed #d1d1d1;">
<td>{{sItem.CourseName}}</td>
<td>{{sItem.ClassHours}}</td>
</tr>
</table>
</q-banner>
</q-popup-proxy>
</span>
</template>
<template v-if="props.row.OtherCourseList.length==0">
</template>
</template>
</q-td>
</template>
<template v-slot:body-cell-TeacherName="props">
<q-td auto-width :props="props">
<span style="color:#3FC4FF;">{{props.row.TeacherName}}</span>
</q-td>
</template>
<template v-slot:body-cell-CourseId="props">
<q-td auto-width :props="props">
<span style="color:blue;cursor:pointer;" @click="goChapter(props.row.CouseId)">详情</span>
</q-td>
</template>
<template v-slot:body-cell-CompleteProgress="props">
<q-td auto-width :props="props">
{{props.row.UsePlanNum}}/{{props.row.TotalPlanNum}}
</q-td>
</template>
<!--班级状态-->
<template v-slot:body-cell-ClassStatusStr="props">
<q-td>
<span>{{props.row.ClassStatusStr}}</span>&nbsp;
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
<q-list>
<q-item clickable v-close-popup @click="gotoOrder(props.row)">
<q-item-section>
<q-item-label>订单中心</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="goPayment(props.row)">
<q-item-section>
<q-item-label>收支明细</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="gomonthLessonCost(props.row)">
<q-item-section>
<q-item-label>月度课耗</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
</template>
</q-table>
<classinfo-form v-if="isShowClassInfo" :seting-obj="classObjOption" :isShowEditBtn="1" @close="closeClassSaveForm"
@success="refreshPage">
</classinfo-form>
</div> </div>
</div> </div>
</template> </template>
...@@ -170,86 +67,17 @@ ...@@ -170,86 +67,17 @@
import { import {
getSchoolDropdown, getSchoolDropdown,
} from '../../api/school/index'; } from '../../api/school/index';
import classinfoForm from '../../components/course/classinfo-form'; import classlist from '../../components/course/classlist';
export default { export default {
meta: { meta: {
title: "班级管理" title: "班级管理"
}, },
components: { components: {
classlist,
classinfoForm,
}, },
data() { data() {
return { return {
columns: [{
name: 'ClassName',
label: '班级名称',
field: 'ClassName',
align: 'left'
},
{
name: 'SchoolName',
label: '校区',
field: 'SchoolName',
align: 'left',
},
{
name: 'CourseName',
label: '课程',
field: 'CourseName',
align: 'left'
},
{
name: 'OtherCourseName',
label: '关联其他课程',
field: 'OtherCourseName',
align: 'left'
},
{
name: 'CourseId',
label: '课程大纲',
field: 'CourseId',
align: 'left'
},
{
name: 'TeacherName',
label: '带班老师',
field: 'TeacherName',
align: 'left'
},
{
name: 'OpenTime',
label: '开班时间',
field: 'OpenTime',
align: 'left'
},
{
name: 'FinishTimeStr',
label: '预计结束时间',
field: 'FinishTimeStr',
align: 'left'
},
{
name: 'CompleteProgress',
label: '课程进度',
field: 'CompleteProgress',
align: 'left'
},
{
name: 'ClassStatusStr',
label: '状态',
align: 'left',
field: 'ClassStatusStr'
},
{
name: 'optioned',
label: '操作',
field: 'CourseId'
}
],
data: [], data: [],
loading: false,
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
...@@ -266,13 +94,10 @@ ...@@ -266,13 +94,10 @@
//关联校区列表 //关联校区列表
schoolList: [], schoolList: [],
pageCount: 0, pageCount: 0,
classObjOption: null, //权限判断
isShowEdit: false, authObj: {
statusMsg: { isShowLessonCost: true, //显示月度课耗
ClassId: 0, }
ClassStatus: 0
},
isShowClassInfo: false, //是否显示课程信息
} }
}, },
created() { created() {
...@@ -288,29 +113,6 @@ ...@@ -288,29 +113,6 @@
this.getClassList(); this.getClassList();
}, },
methods: { methods: {
//当前点击的班级
getClassItem(item) {
this.isShowEdit = true;
var Obj = JSON.parse(JSON.stringify(item));
this.statusMsg.ClassStatus = Obj.ClassStatus;
this.statusMsg.ClassId = Obj.ClassId;
},
gotoOrder(item) {
this.OpenNewUrl('/course/classorder', {
ClassId: item.ClassId,
isFromMyclass: 1,
});
},
//跳转到收支明细
goPayment(item) {
this.OpenNewUrl('/course/paymentDetail', {
ClassId: item.ClassId,
School_Id: item.School_Id,
ClassName: encodeURI(item.ClassName),
isFromMyClass: 1,
});
},
//获取校区列表 //获取校区列表
getSchool() { getSchool() {
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
...@@ -333,7 +135,7 @@ ...@@ -333,7 +135,7 @@
if (res.Code == 1) { if (res.Code == 1) {
this.classStatusList = res.Data; this.classStatusList = res.Data;
} }
}).catch(() => {}) })
}, },
//翻页 //翻页
changePage(val) { changePage(val) {
...@@ -353,40 +155,8 @@ ...@@ -353,40 +155,8 @@
}, },
//刷新页面 //刷新页面
refreshPage() { refreshPage() {
this.isShowClassInfo = false;
this.getClassList(); this.getClassList();
}, },
//关闭弹窗
closeClassSaveForm() {
this.isShowClassInfo = false;
},
GetFirst(val) {
if (val) {
return val.substr(0, 1);
}
},
//点击班级名称
getClassInfo(obj) {
this.classObjOption = null;
this.isShowClassInfo = false;
this.classObjOption = obj;
this.isShowClassInfo = true;
},
gomonthLessonCost(row) {
let ClassName = encodeURI(row.ClassName)
this.OpenNewUrl('teachMonthLessonCost', {
ClassId: row.ClassId,
ClassName: ClassName,
});
},
//跳转到课程大纲
goChapter(CouseId) {
this.OpenNewUrl('/course/chapter', {
CourseId: CouseId
});
}
} }
} }
......
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