Commit 2474dc99 authored by 黄奎's avatar 黄奎

页面修改

parent b399b1db
<template> <template>
<div class="b2bcustomer"> <div class="b2bcustomer">
<div class="full-width flex no-wrap items-center q-mb-sm"> <div class="full-width flex no-wrap items-center q-mb-sm">
<q-tabs <q-tabs v-model="msg.StuStage" active-color="primary" dense outside-arrows align="left" style="width:70%"
v-model="msg.StuStage" @input="getStudent">
active-color="primary" <q-tab v-for="(item, index) in stagelist" :key="index" :name="item.StuStage">
dense
outside-arrows
align="left"
style="width:70%"
@input="getStudent"
>
<q-tab
v-for="(item, index) in stagelist"
:key="index"
:name="item.StuStage"
>
{{ item.StuStageName }}({{ item.StuNum }}) {{ item.StuStageName }}({{ item.StuNum }})
</q-tab> </q-tab>
</q-tabs> </q-tabs>
<q-input <q-input outlined dense v-model="msg.StuName" label="昵称" @input="getStudent" />
outlined
dense
v-model="msg.StuName"
label="昵称"
@input="getStudent"
/>
</div> </div>
<q-table <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
:pagination="msg" separator="none" :data="list" :columns="columns" row-key="Id">
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-tow-column-table"
separator="none"
:data="list"
:columns="columns"
row-key="Id"
>
<!-- <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.StuName.substring(0, 1) }}</q-avatar
>
</q-td>
</template> -->
<template v-slot:body-cell-StuName="props"> <template v-slot:body-cell-StuName="props">
<q-td :props="props"> <q-td :props="props">
<div class="text-blue cursor-pointer" @click="getStuRight(props.row)"> <div class="text-blue cursor-pointer" @click="getStuRight(props.row)">
...@@ -61,49 +21,32 @@ ...@@ -61,49 +21,32 @@
</template> </template>
<template v-slot:body-cell-StuSex="props"> <template v-slot:body-cell-StuSex="props">
<q-td :props="props"> <q-td :props="props">
<q-badge <q-badge :color="props.value == 1 ? 'negative' : 'primary'" :label="props.value == 1 ? '女' : '男'" />
:color="props.value == 1 ? 'negative' : 'primary'"
:label="props.value == 1 ? '女' : '男'"
/>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td :props="props"> <q-td :props="props">
<q-toggle <q-toggle size="md" color="primary" :false-value="1" :true-value="0" v-model="props.row.Status"
size="md" title="注意:关闭后,学员将无法正常使用." @input="deleteStudentInfo(props.row)" />
color="primary"
:false-value="1"
:true-value="0"
v-model="props.row.Status"
title="注意:关闭后,学员将无法正常使用."
@input="deleteStudentInfo(props.row)"
/>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
class="full-width justify-end" :input="true" @input="changePage" />
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template> </template>
</q-table> </q-table>
<stuDetail <stuDetail v-if="isShowStuRight" :save-obj="stuOption" @close="closeStuForm"></stuDetail>
v-if="isShowStuRight"
:save-obj="stuOption"
@close="closeStuForm"
></stuDetail>
</div> </div>
</template> </template>
<script> <script>
import { getStudentPage } from "../../../api/school"; import {
import { getCustomerStuStageStatistics } from "../../../api/sale/peemanagement"; getStudentPage
import stuDetail from "../../../components/school/student/studentRight-form"; } from "../../../api/school";
export default { import {
getCustomerStuStageStatistics
} from "../../../api/sale/peemanagement";
import stuDetail from "../../../components/school/student/studentRight-form";
export default {
components: { components: {
stuDetail stuDetail
}, },
...@@ -119,12 +62,6 @@ export default { ...@@ -119,12 +62,6 @@ export default {
list: [], list: [],
pageCount: 0, pageCount: 0,
columns: [ columns: [
// {
// name: "StuIcon",
// label: "",
// field: "StuIcon",
// align: "left"
// },
{ {
name: "StuName", name: "StuName",
required: true, required: true,
...@@ -168,12 +105,6 @@ export default { ...@@ -168,12 +105,6 @@ export default {
field: "CreateTimeStr", field: "CreateTimeStr",
align: "left" align: "left"
} }
// {
// name: "CreateByName",
// label: "负责人",
// align: "left",
// field: "CreateByName"
// }
], ],
msg: { msg: {
pageIndex: 1, pageIndex: 1,
...@@ -193,7 +124,7 @@ export default { ...@@ -193,7 +124,7 @@ export default {
}, },
methods: { methods: {
getStudent() { getStudent() {
this.msg.CustomerId = this.Id; this.msg.CategoryId = this.Id;
this.loading = true; this.loading = true;
getStudentPage(this.msg) getStudentPage(this.msg)
.then(res => { .then(res => {
...@@ -206,7 +137,9 @@ export default { ...@@ -206,7 +137,9 @@ export default {
}); });
}, },
getStage() { getStage() {
getCustomerStuStageStatistics({ CustomerId: this.Id }).then(res => { getCustomerStuStageStatistics({
CategoryId: this.Id
}).then(res => {
this.stagelist = res.Data; this.stagelist = res.Data;
const total = res.Data.reduce((pre, cur) => { const total = res.Data.reduce((pre, cur) => {
return cur.StuNum + pre; return cur.StuNum + pre;
...@@ -240,25 +173,29 @@ export default { ...@@ -240,25 +173,29 @@ export default {
this.getStudent(); this.getStudent();
this.getStage(); this.getStage();
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.b2bcustomer ::-webkit-scrollbar { .b2bcustomer ::-webkit-scrollbar {
width: 5px; width: 5px;
height: 5px; height: 5px;
} }
.b2bcustomer ::-webkit-scrollbar-track {
.b2bcustomer ::-webkit-scrollbar-track {
background: #fff; background: #fff;
border-radius: 2px; border-radius: 2px;
} }
.b2bcustomer ::-webkit-scrollbar-thumb {
.b2bcustomer ::-webkit-scrollbar-thumb {
background: #444; background: #444;
border-radius: 10px; border-radius: 10px;
} }
.b2bcustomer ::-webkit-scrollbar-thumb:hover {
.b2bcustomer ::-webkit-scrollbar-thumb:hover {
background: #999; background: #999;
} }
.b2bcustomer ::-webkit-scrollbar-corner {
.b2bcustomer ::-webkit-scrollbar-corner {
background: #204754; background: #204754;
} }
</style> </style>
\ No newline at end of file
This diff is collapsed.
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
"QQ", "QQ",
"WeChatNo", "WeChatNo",
], ],
tabCheck: 1, tabCheck: 2,
//审核状态列表 //审核状态列表
ApproveStateList: [ ApproveStateList: [
{ {
......
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