Commit 4a29064f authored by 黄奎's avatar 黄奎

页面修改

parent 32f66037
<template> <template>
<div class="page-body"> <div class="page-body">
<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.TeacherName" label="教师名称" /> <q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.TeacherName"
label="教师名称" />
</div> </div>
<div class="col-3"> <div class="col-3">
<!--<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.TeacherTel" label="教师电话" />--> <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.IsShow" :options="ShowOpts" emit-value map-options label="显示状态" /> <q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.IsShow" :options="ShowOpts"
emit-value map-options label="显示状态" />
</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" emit-value map-options label="审核状态" /> <q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.AuditStatus" :options="AuditOpts"
emit-value map-options label="审核状态" />
</div> </div>
</div> </div>
<div class="page-option"> <div class="page-option">
...@@ -37,7 +40,9 @@ ...@@ -37,7 +40,9 @@
</div> </div>
</div> </div>
<div class="page-content"> <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" :columns="columns" row-key="name"> <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-right-column-table sticky-tow-column-table" separator="none" title="教师信息" :data="data"
:columns="columns" row-key="name">
<template v-slot:body-cell-IsShow="props"> <template v-slot:body-cell-IsShow="props">
<q-td :props="props"> <q-td :props="props">
<q-badge :color="props.value==0?'negative':'primary'" :label="props.value==0?'隐藏':'显示'" /> <q-badge :color="props.value==0?'negative':'primary'" :label="props.value==0?'隐藏':'显示'" />
...@@ -57,7 +62,7 @@ ...@@ -57,7 +62,7 @@
</template> </template>
<template v-slot:body-cell-IsRecommend="props"> <template v-slot:body-cell-IsRecommend="props">
<q-td :props="props"> <q-td :props="props">
<q-icon v-if="props==1" name="iconfont icon-good" color="negative" size="16px" /> <q-badge :color="props.value==0?'negative':'primary'" :label="props.value==0?'不推荐':'推荐'" />
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-TeachTag="props"> <template v-slot:body-cell-TeachTag="props">
...@@ -84,41 +89,46 @@ ...@@ -84,41 +89,46 @@
</q-banner> </q-banner>
</q-popup-proxy> </q-popup-proxy>
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" :input="true" @input="changePage" /> <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<div style="min-width:190px;width:100%"> <div style="min-width:190px;width:100%">
<q-btn v-if="props.row.AuditStatus==1" flat size="xs" icon="iconfont icon-shenhe" color="info" style="font-weight:400" class="q-mr-xs" label="审核" @click="showExamine(props.row)" /> <q-btn v-if="props.row.AuditStatus==1" flat size="xs" icon="iconfont icon-shenhe" color="info"
<q-btn v-if="props.row.AuditStatus==2" flat size="xs" icon="iconfont icon-ziyuan" color="warning" style="font-weight:400" class="q-mr-xs" label="重置密码" @click="resetPw(props.row.TId)" /> style="font-weight:400" class="q-mr-xs" label="审核" @click="showExamine(props.row)" />
<q-btn v-if="props.row.AuditStatus==3" flat size="xs" icon="iconfont icon-shanchu" color="negative" style="font-weight:400" class="q-mr-xs" label="删除" @click="deleteUser(props.row.TId)" /> <q-btn v-if="props.row.AuditStatus==2" flat size="xs" icon="iconfont icon-ziyuan" color="warning"
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" @click="addObj(props.row)" /> style="font-weight:400" class="q-mr-xs" label="重置密码" @click="resetPw(props.row.TId)" />
<q-btn v-if="props.row.AuditStatus==3" flat size="xs" icon="iconfont icon-shanchu" color="negative"
style="font-weight:400" class="q-mr-xs" label="删除" @click="deleteUser(props.row.TId)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="addObj(props.row)" />
</div> </div>
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<teacher-form v-if="persistent" :save-obj="objOption" @close="closeSaveForm" @success="addAfterQuery"></teacher-form> <teacher-form v-if="persistent" :save-obj="objOption" @close="closeSaveForm" @success="addAfterQuery">
<teacher-shenhe v-if="persistentExamine" :show-obj="objOption" @close="closeSaveForm" @success="addAfterQuery"></teacher-shenhe> </teacher-form>
<teacher-shenhe v-if="persistentExamine" :show-obj="objOption" @close="closeSaveForm" @success="addAfterQuery">
</teacher-shenhe>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import { import {
getTeacherPage, getTeacherPage,
getSchoolDropdown, getSchoolDropdown,
deleteTeacher deleteTeacher
} from '../../api/school/index' } from '../../api/school/index'
import { import {
resetPassword resetPassword
} from '../../api/users/user.js' } from '../../api/users/user.js'
import teacherForm from '../../components/school/teacher/teacher-form' import teacherForm from '../../components/school/teacher/teacher-form'
import teacherShenhe from '../../components/school/teacher/teacher-shenhe' import teacherShenhe from '../../components/school/teacher/teacher-shenhe'
export default { export default {
meta: { meta: {
title: "教师管理" title: "教师管理"
}, },
...@@ -266,8 +276,7 @@ export default { ...@@ -266,8 +276,7 @@ export default {
}, },
methods: { methods: {
resetSearch() { resetSearch() {
this.pageIndex = 1 this.msg.pageIndex = 1
//this.pageCount = 0
this.loading = true this.loading = true
if (this.schoolTemp) { if (this.schoolTemp) {
this.msg.School_Id = this.schoolTemp.SId this.msg.School_Id = this.schoolTemp.SId
...@@ -346,9 +355,9 @@ export default { ...@@ -346,9 +355,9 @@ export default {
}, },
changePage(val) { changePage(val) {
this.msg.Status = this.StatusTemp ? this.StatusTemp.value : '-1' this.msg.Status = this.StatusTemp ? this.StatusTemp.value : '-1'
this.msg.pageIndex = 1 this.msg.pageIndex = val;
this.loading = true this.loading = true;
this.getTeacher() this.getTeacher();
}, },
getSchool() { getSchool() {
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
...@@ -402,9 +411,11 @@ export default { ...@@ -402,9 +411,11 @@ export default {
this.persistentExamine = false this.persistentExamine = false
} }
}, },
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass'); @import url('~assets/css/table.sass');
</style> </style>
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