Commit d74e5f09 authored by 黄奎's avatar 黄奎

页面修改

parent add352d7
......@@ -3,20 +3,18 @@
<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.AssistName"
label="学员名称" />
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.StuName" label="学员名称" />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.AssistTel"
label="学员电话" />
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.StuTel" label="学员电话" />
</div>
<div class="col-3">
<q-select @input="resetSearch" clearable filled stack-label option-value="SId" option-label="SName"
v-model="schoolTemp" ref="School_Id" :options="schoolList" label="所属校区" :dense="false" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.AuditStatus" :options="AuditOpts"
emit-value map-options label="审核状态" />
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="AuditOpts"
emit-value map-options label="状态" />
</div>
</div>
<div class="page-option">
......@@ -39,42 +37,27 @@
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-right-column-table sticky-tow-column-table" separator="none" title="学员" :data="data"
class="sticky-right-column-table sticky-tow-column-table" separator="none" title="学员信息" :data="data"
:columns="columns" row-key="name">
<template v-slot:body-cell-AssistIcon="props">
<template v-slot:body-cell-StuIcon="props">
<q-td auto-width :props="props">
<q-avatar size="md" v-if="props.value">
<img :src="props.value" />
</q-avatar>
<q-avatar size="md" color="teal-10" text-color="white" v-if="!props.value">
{{props.row.AssistName.substring(0,1)}}</q-avatar>
{{props.row.StuName}}</q-avatar>
</q-td>
</template>
<template v-slot:body-cell-AssistName="props">
<template v-slot:body-cell-StuName="props">
<q-td :props="props">
<div class="text-blue cursor-pointer">{{props.value}}</div>
</q-td>
</template>
<template v-slot:body-cell-AuditStatus="props">
<template v-slot:body-cell-IsDisable="props">
<q-td :props="props">
<q-badge v-if="props.value==1" color="dark" label="审核中" />
<div v-if="props.value==3">
<q-badge color="warning" class="cursor-pointer" label="审核不通过" />
<q-popup-proxy>
<q-banner class="bg-dark text-white">
{{props.row.Remark}}
</q-banner>
</q-popup-proxy>
</div>
<div v-if="props.value==2">
<q-badge v-if="props.value==2" class="cursor-pointer" color="primary" label="审核通过" />
<q-popup-proxy>
<q-banner class="bg-dark text-white">
{{props.row.Remark}}
</q-banner>
</q-popup-proxy>
</div>
<q-toggle size="md" color="primary" :false-value="0" :true-value="1" v-model="props.row.IsDisable"
title="注意:关闭后,学员将无法正常使用." />
<!--@input="DeleteMenu(props.row)"-->
</q-td>
</template>
<template v-slot:bottom>
......@@ -106,7 +89,7 @@
<script>
import {
getAssistPage,
getStudentPage,
getSchoolDropdown,
deleteAssist
} from '../../api/school/index'
......@@ -127,22 +110,22 @@
return {
currentUrl: "",
columns: [{
name: 'AssistIcon',
name: 'StuIcon',
label: '',
field: 'AssistIcon',
field: 'StuIcon',
align: 'left',
},
{
name: 'AssistName',
name: 'StuName',
required: true,
label: '助教名称',
label: '学员昵称',
align: 'left',
field: row => row.AssistName
field: row => row.StuName
},
{
name: 'AssistTel',
label: '助教电话',
field: 'AssistTel',
name: 'StuTel',
label: '手机号码',
field: 'StuTel',
align: 'left'
},
{
......@@ -152,32 +135,20 @@
align: 'left',
},
{
name: 'AuditStatus',
label: '审核状态',
align: 'left',
field: 'AuditStatus'
},
{
name: 'ClassCount',
label: '带班数量',
name: 'IsDisable',
label: '状态',
field: 'IsDisable',
align: 'left',
field: 'ClassCount'
},
{
name: 'OnlineClassCount',
label: '网课产品',
name: 'CreateByName',
label: '创建人',
align: 'left',
field: 'OnlineClassCount'
},
{
name: 'OnlineOrderCount',
label: '网课订单',
align: 'left',
field: 'OnlineOrderCount'
field: 'CreateByName'
},
{
name: 'CreateTimeStr',
label: '入时间',
label: '入时间',
align: 'left',
field: 'CreateTimeStr'
},
......@@ -194,32 +165,28 @@
value: '-1'
},
{
label: '审核中',
value: '1'
label: '正常',
value: '0'
},
{
label: '审核通过',
value: '2'
label: '禁用',
value: '1'
},
{
label: '审核不通过',
value: '3'
}
],
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
AssistName: "",
AssistTel: "",
AuditStatus: "-1",
StuName: "",
StuTel: "",
Status: "-1",
School_Id: 0
},
schoolTemp: "",
pageCount: 0,
persistent: false,
objOption: null,
schoolList: [],
schoolTemp: null,
persistentExamine: false,
resetLoading: false
}
......@@ -231,9 +198,7 @@
},
methods: {
resetSearch() {
this.pageIndex = 1
//this.pageCount = 0
this.loading = true
this.msg.pageIndex = 1;
if (this.schoolTemp) {
this.msg.School_Id = this.schoolTemp.SId
} else {
......@@ -310,26 +275,19 @@
});
},
changePage(val) {
this.msg.Status = this.StatusTemp ? this.StatusTemp.value : '-1'
this.msg.pageIndex = 1
this.loading = true
this.getAssistant()
this.msg.pageIndex = val;
this.getAssistant();
},
getSchool() {
getSchoolDropdown({}).then(res => {
this.schoolList = res.Data
if (this.msg.School_Id != 0) {
this.schoolTemp = this.schoolList.filter(x => {
if (this.objOption.School_Id == x.SId) {
return x
}
})[0]
}
this.schoolList = res.Data;
})
},
getAssistant() {
getAssistPage(this.msg).then(res => {
this.loading = false
this.loading = true;
getStudentPage(this.msg).then(res => {
this.loading = false;
console.log("res.Data.PageData", res.Data.PageData);
this.data = res.Data.PageData
this.pageCount = res.Data.PageCount
}).catch(() => {
......@@ -338,15 +296,11 @@
},
addAfterQuery() {
if (!this.objOption) {
this.msg = {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
TeacherName: "",
TeacherTel: "",
AuditStatus: "-1",
IsShow: "-1"
}
this.msg.pageIndex = 1;
this.msg.StuName = "";
this.msg.StuTel = "";
this.msg.Status = "-1";
this.msg.School_Id = 0;
}
this.getAssistant()
},
......
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