Commit d74e5f09 authored by 黄奎's avatar 黄奎

页面修改

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