Commit f0d4aeea authored by 罗超's avatar 罗超
parents f1fe3797 d3c4cfd5
......@@ -158,6 +158,24 @@
line-height: 41px;
text-align: center;
}
.classFlictTable {
width: 500px;
text-align: center;
}
.classFlictTable tr td {
height: 40px;
color: #000;
}
.classFlictTable tr th {
height: 40px;
background-color: rgb(238, 238, 239);
}
.resStyle{
color:red;
}
</style>
<template>
......@@ -226,9 +244,7 @@
<template v-slot:body-cell-TimeList="props">
<q-td auto-width :props="props">
<div v-for="(item, index) in props.row.TimeList" class="lessForm_Class">
{{ index + 1 }}节课 {{ item.StartTime }}-{{
item.EndTime
}}
{{ index + 1 }}节课 {{ item.StartTime }}-{{item.EndTime}}
</div>
</q-td>
</template>
......@@ -246,9 +262,7 @@
<template v-slot:body-cell-TargetTimeList="props">
<q-td auto-width :props="props">
<div v-for="(item, index) in props.row.NewPlan.TimeList" class="lessForm_Class">
{{ index + 1 }}节课 {{ item.StartTime }}-{{
item.EndTime
}}
{{ index + 1 }}节课 {{ item.StartTime }}-{{item.EndTime}}
</div>
<q-popup-edit :validate="proteinRangeValidation" persistent v-model="props.row.NewPlan.TimeList"
title="变更时间" buttons label-set="确认" label-cancel="取消">
......@@ -507,7 +521,7 @@
</div>
<q-input filled type="textarea" :rows="3" style="margin-top: 20px" stack-label maxlength="2000"
v-model="msg.Remarks" :dense="false" class="col-12 q-pb-lg" label="备注" />
<div class="row">
<div class="row" style="display:none;">
<div class="col-12 q-mt-md text-grey-6">
上传附件:<span class="fj-tip" style="font-size: 10px; color: #f00">*单文件限制5M内</span>
</div>
......@@ -569,6 +583,62 @@
</div>
</div>
</div>
<q-table no-data-label="暂无相关数据" :data="conflictData" v-if="conflictData.length>0" :columns="columns3" flat style="max-height: 300px"
:pagination="pages" class="sticky-column-table no-bottom-table" separator="none" row-key="ClassPlanId">
<template v-slot:top="props">
<div class="text-caption q-px-md text-grey-6 col">
冲突数据
</div>
<q-space />
</template>
<template v-slot:body-cell-PlanTimeList="props">
<q-td>
<div v-for="(item,index) in props.row.PlanTimeList" :key="index">
{{item.StartTime}}-{{item.EndTime}}
</div>
</q-td>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<span>
<q-btn flat size="xs" icon="iconfont icon-View" color="accent" style="font-weight:400" label="查看" />
<q-popup-proxy>
<q-banner>
<table class="classFlictTable" style="border-collapse:collapse;">
<tr>
<th>班级</th>
<th>日期</th>
<th>老师</th>
<th>教室</th>
<th>上课时段</th>
</tr>
<tr v-for="(subItem,subIndex) in props.row.PlanRepeatList" :key="subIndex">
<td style="width:180px;text-align:left;">
{{subItem.ClassName}}
</td>
<td>{{subItem.ClassDate}}</td>
<td><span :class="{'resStyle':props.row.TeacherId==subItem.TeacherId}">
{{subItem.TeacherName}}</span>
</td>
<td>
<span
:class="{'resStyle':props.row.ClassRoomId==subItem.ClassRoomId}">{{subItem.RoomName}}</span>
</td>
<td>
<template v-if="subItem.PlanTimeList&&subItem.PlanTimeList.length>0">
<div v-for="(cItem,cIndex) in subItem.PlanTimeList" :key="cIndex">
{{cItem.StartTime}}-{{cItem.EndTime}}
</div>
</template>
</td>
</tr>
</table>
</q-banner>
</q-popup-proxy>
</span>
</q-td>
</template>
</q-table>
</q-scroll-area>
</q-card-section>
......@@ -840,6 +910,37 @@
picIsShow: false,
picObj: [],
initialIndex: 0,
columns3: [{
name: "ClassDate",
label: "日期",
field: "ClassDate",
align: "left"
},
{
name: "TeacherName",
label: "老师",
field: "TeacherName",
align: "left"
},
{
name: "RoomName",
label: "教室",
field: "RoomName",
align: "left"
},
{
name: "PlanTimeList",
label: "上课时段",
field: "PlanTimeList",
align: "left",
},
{
name: "optioned",
label: "操作",
field: "CourseId"
}
],
conflictData: [],
};
},
created() {
......@@ -910,7 +1011,11 @@
if (month < 10) {
month = "0" + month;
}
var toDay = myDate.getFullYear() + "/" + month + "/" + myDate.getDate();
let day = myDate.getDate();
if(day < 10){
day = "0" + day
}
var toDay = myDate.getFullYear() + "/" + month + "/" + day;
return date >= toDay;
},
//保存修改
......@@ -1099,6 +1204,11 @@
position: "top",
});
}
}).catch((e) => {
if (e.Code == 0) {
//注释 不要删
this.conflictData = e.Data;
}
});
})
.onCancel(() => {});
......@@ -1184,7 +1294,7 @@
this.classList.unshift(obj);
if (this.msg.ClassId > 0 && isClear == 0) {
this.currentClass = this.classList.find((x) => {
return x.ClassId == this.msg.ClassId ;
return x.ClassId == this.msg.ClassId;
}).PlanList;
}
}
......
......@@ -47,8 +47,8 @@
</div>
<q-list style="width:180px;overflow:hidden">
<template v-for="(x,i) in secondNavs">
<q-item :to="x.MenuUrl" clickable v-ripple :active="currentPath==x.MenuUrl" v-if="x.SubList.length==0"
:key="i">
<q-item :to="x.MenuUrl" clickable v-ripple :active="currentPath==x.MenuUrl"
v-if="x.SubList&&x.SubList.length==0" :key="i">
<q-item-section avatar style="min-width:30px;">
<q-icon :name="x.MenuIcon" size="20px" />
</q-item-section>
......@@ -68,7 +68,8 @@
</div>
</div>
<div class="col" style="background: #f2f4f7;">
<q-scroll-area :thumb-style="thumbStyle" :bar-style="barStyle" visible class="fit content-scroll full-width full-height">
<q-scroll-area :thumb-style="thumbStyle" :bar-style="barStyle" visible
class="fit content-scroll full-width full-height">
<router-view />
</q-scroll-area>
</div>
......@@ -119,7 +120,7 @@
isExpend: false,
IsShowLeft: true,
userCenterMenuList: [], //用户中心菜单
socektArr:[], //消息数组
socektArr: [], //消息数组
}
},
components: {
......@@ -153,7 +154,8 @@
handler: function (newVal) {
let i = this.tab.split('_')[1];
if (newVal && newVal.MenuList) {
this.secondNavs = newVal.MenuList.length > 0 ? newVal.MenuList[i].SubList : [];
this.secondNavs = newVal.MenuList.length > 0 ? (newVal.MenuList[i] && newVal.MenuList[i].SubList ? newVal
.MenuList[i].SubList : []) : [];
}
if (newVal && newVal.UserCenterList) {
this.userCenterMenuList = newVal.UserCenterList;
......@@ -176,11 +178,11 @@
}
this.tab = `navs_${i}`
if (this.userInfo && this.userInfo.MenuList) {
this.secondNavs = this.userInfo.MenuList.length > 0 ? this.userInfo.MenuList[i].SubList : []
this.secondNavs = this.userInfo.MenuList.length > 0 ? (this.userInfo.MenuList[i] && this.userInfo.MenuList[i]
.SubList ? this.userInfo.MenuList[i].SubList : []) : []
}
this.$root.$on("goworkobj", (data)=>{
// this.setNavs(0)
this.secondNavs=[]
this.$root.$on("goworkobj", (data) => {
this.secondNavs = []
});
this.getLogList();
this.getMsg();
......@@ -213,7 +215,7 @@
})
},
//获取日志列表
getLogList(){
getLogList() {
GetMsgLogList().then(res => {
if (res.Code == 1) {
this.socektArr = res.Data;
......@@ -231,8 +233,8 @@
getDataFunc(e) {
if (e.data) {
var newData = JSON.parse(e.data)
if(newData.length>0){
for(var i=0;i<newData.length;i++){
if (newData.length > 0) {
for (var i = 0; i < newData.length; i++) {
this.socektArr.unshift(newData[i])
}
}
......@@ -274,7 +276,7 @@
};
// 定义通知错误事件
notify.onerror = function () {
};
// 定义通知显示事件 可以设置多少秒之后关闭 也可以不设置关闭
notify.onshow = function () {
......
......@@ -341,7 +341,7 @@
ClassName: '', //班级名称
StartTime: '', //开始时间
EndTime: '', //结束时间
School_Id: 0, //关联校区
School_Id: '', //关联校区
CouseId: 0, //课程id
Teacher_Id: 0, //教师id
Q_CanApply: "0", //是否可以报名 1是
......@@ -407,10 +407,6 @@
if (!tempArray) {
tempArray = [];
}
tempArray.unshift({
SId: 0,
SName: "不限"
})
this.schoolList = tempArray;
}
})
......
<style>
._addUpload_stu {
display: block;
margin-top: 15px;
}
._addUpload_stu img {
width: 100%;
}
._addUpload_stu > div {
display:inline-block;
width: 138px;
height: 92px;
border: 1px dashed rgba(210, 210, 210, 1);
border-radius: 2px;
cursor: pointer;
margin-bottom: 10px;
padding: 5px;
margin-right: 10px;
position: relative;
}
._addUpload_stu > div:hover {
background-color: #f5f5f5;
}
.stuCard .el-upload-dragger {
font-size: 28px;
color: #8c939d;
width: 126px;
height: 80px;
line-height: 41px;
text-align: center;
}
._addUpload_stu .icon-guanbi1 {
font-size: 12px;
color: white;
display: inline-block;
margin-left: 15px;
position: absolute;
right: -6px;
top: -9px;
background-color: #f56c6c;
border-radius: 50%;
height: 20px;
width: 20px;
text-align: center;
line-height: 20px;
}
</style>
<template>
<div class="page-body">
<div class="page-content">
......@@ -49,7 +98,7 @@
</q-table>
</div>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;">
<q-card style="width: 800px;max-width:900px;" class="stuCard">
<q-card-section>
<div class="text-h6">{{addMsg.Id==0?'新增学员':'修改学员'}}</div>
</q-card-section>
......@@ -152,6 +201,41 @@
<q-input filled stack-label :dense="false" v-model="addMsg.StudyRemark" type="textarea" class="col-12"
label="备注" maxlength="300" />
</div>
<div class="row wrap" style="margin:0 20px;">
<q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.GuestContractNo" label="合同编号" />
<q-select class="col-6 q-pb-lg" ref="ContractType" @input="resetContractArr" standout="bg-primary text-white"
option-value="Id" option-label="Name" v-model="addMsg.ContractType" :options="ContractTypeList" emit-value map-options label="上传类型"
use-input new-value-mode="add-unique" />
</div>
<div class="row wrap" style="margin:0 20px;">
<div class="col-12 text-grey-6">
上传附件:<span class="fj-tip" style="font-size: 10px; color: #f00"></span>
</div>
</div>
<div>
<div class="_addUpload_stu" style="margin:15px 0 0 20px;min-height:100px;">
<template v-for="(file, fIndex) in saveMsg">
<div v-if="file.Type == 2">
<div style="width: 100%; height: 100%; overflow: hidden">
<img :src="file.Url ? file.Url : file.Content" @click="showUpLoadFile(file)" />
</div>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</div>
<div v-if="file.Type == 1" style="float:left;">
<div class="iconfont icon-pdf" style="font-size:38px;color:green;text-align:center;line-height:75px;" @click="showUpLoadFile(file)"></div>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</div>
</template>
<div class="_pic_upload">
<el-upload drag :http-request="uploadFileBtn" :multiple="true" :show-file-list="false" action="">
<i class="el-icon-plus avatar-uploader-icon"></i>
<div class="el-upload__text">
{{ $t("active.ld_djscwj") }}
</div>
</el-upload>
</div>
</div>
</div>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
......@@ -160,6 +244,23 @@
</q-card-actions>
</q-card>
</q-dialog>
<div v-if="picIsShow" class="_show_img_box" @click="(picIsShow = false), (picObj = [])">
<div style="
position: absolute;
width: 800px;
height: 600px;
left: 50%;
top: 50%;
margin-left: -400px;
margin-top: -300px;
">
<el-carousel :initial-index="initialIndex" height="600px" :interval="5000" trigger="click">
<el-carousel-item style="height: 600px; overflow: auto" v-for="(item, index) in picObj" :key="index">
<img :src="item" style="" />
</el-carousel-item>
</el-carousel>
</div>
</div>
</div>
</template>
......@@ -323,7 +424,10 @@
StudyRemark: "", //留学就业备注
BirthDate: "", //出生日期
TotalHours: 0, //总课时
StuIcon: '' //头像
StuIcon: '', //头像
GuestContractNo: '', //合同编号
ContractType: 1, //上传类型 1-PDF 2图片
ContractUrl: [] //合同链接
},
GBList: [], //日语基础列表
GEList: [], //学历列表
......@@ -335,6 +439,17 @@
visibleColumns: [
], //可见列
saveMsg: [],
picObj: [],
picIsShow:false,
initialIndex: 0,
ContractTypeList:[{
Name:'PDF',
Id:1
},{
Name:'图片',
Id:2
}]
}
},
created() {
......@@ -375,6 +490,117 @@
this.getGuestPage();
},
methods: {
resetContractArr(){
this.saveMsg = [];
this.addMsg.ContractUrl = [];
},
showUpLoadFile(i) {
// 预览上传文件
if (i.Type == 3) {
this.picObj.push(i.Url);
// this.imgList.push(i.Url)
this.picIsShow = true;
} else {
if (
i.Content.substring(
i.Content.lastIndexOf(".") + 1,
i.Content.length
).toUpperCase() == "PDF" ||
i.Content.substring(
i.Content.lastIndexOf(".") + 1,
i.Content.length
).toUpperCase() == "TXT"
) {
this.previewPDF(i.Url);
} else {
window.open(
"https://view.officeapps.live.com/op/view.aspx?src=" + i.Url
);
}
}
},
deleteUploadFile(i) {
// 删除上传文件
this.saveMsg.splice(i, 1);
this.addMsg.ContractUrl.splice(i, 1);
},
uploadFileBtn(file) {
// 1 文档 2 数据 3 图片,4压缩包,5视频
let typeArr = [{
stringArr: "GIF|JPG|JPEG|PNG|BMP|WEBP",
type: 2,
},
{
stringArr: "PDF|pdf",
type: 1,
},
];
let ft = file.file.name
.substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length)
.toUpperCase();
let fileTypeNumber = 2;
typeArr.forEach((x) => {
if (x.stringArr.indexOf(ft) != "-1") {
fileTypeNumber = x.type;
}
});
if(this.addMsg.ContractType==1){
if(fileTypeNumber!=1){
this.$q.notify({
type: 'negative',
position: "top",
message: `请上传pdf文件`
})
return
}
}
if(this.addMsg.ContractType==2){
if(fileTypeNumber!=2){
this.$q.notify({
type: 'negative',
position: "top",
message: `请上传图片`
})
return
}
}
this.$message.info(this.$t("tips.shangchuanzhong"));
UploadSelfFile(
"Temporary",
file.file,
(x) => {
if (x.Code == 1) {
if(this.addMsg.ContractType==1){
if(this.addMsg.ContractUrl.length<1){
this.saveMsg.push({
Content: x.FileUrl,
ID: 0,
Type: fileTypeNumber,
Url: x.FileUrl,
});
this.addMsg.ContractUrl.push(x.FileUrl);
}else{
this.$q.notify({
type: 'negative',
position: "top",
message: `只能上传一个PDF文件`
})
}
}else{
this.saveMsg.push({
Content: x.FileUrl,
ID: 0,
Type: fileTypeNumber,
Url: x.FileUrl,
});
this.addMsg.ContractUrl.push(x.FileUrl);
}
this.$message.success(this.$t("tips.scchenggong"));
}
},
1
);
},
getOrderInfo() {
var qMsg = {
ClassId: this.msg.ClassId,
......@@ -516,7 +742,7 @@
VolunteerMajor: "", //志愿专业
Price: 0, //价格
StudyRemark: "", //留学就业备注
TotalHours:this.CourseClassHourse,
TotalHours: this.CourseClassHourse,
}
},
//新增学员弹窗
......@@ -552,6 +778,20 @@
}
this.addMsg.TotalHours = item.TotalHours;
this.addMsg.StuIcon = item.StuIcon;
this.addMsg.ContractType = item.ContractType;
this.addMsg.GuestContractNo = item.GuestContractNo;
this.addMsg.ContractUrl = item.ContractUrlList;
this.saveMsg=[];
if(this.addMsg.ContractUrl&&this.addMsg.ContractUrl.length>0){
this.addMsg.ContractUrl.forEach(x=>{
this.saveMsg.push({
Content: x,
ID: 0,
Type: this.addMsg.ContractType,
Url: x
});
})
}
this.persistent = true;
},
//删除学员
......
......@@ -114,9 +114,8 @@
// if(endTime){
// return Date.now() - 8.64e7>time.getTime()>=new Date(endTime).getTime()- 8.64e7
// }else{
return time.getTime() < Date.now() - 8.64e7
// return time.getTime() < Date.now() - 8.64e7
// }
}
},
pickerEnd: {
......@@ -127,7 +126,6 @@
} else {
return time.getTime() < Date.now() - 8.64e7
}
}
}
};
......@@ -138,12 +136,9 @@
}
let date = new Date();
let today = date.getFullYear() + '-' + (date.getMonth() < 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) +
'-' + (date.getDate() < 10 ? '0' + date.getDate() < 10 : date.getDate())
'-' + (date.getDate() < 10 ? '0' + date.getDate() : date.getDate())
this.msg.StartTime = today
this.tabMsg.StartTime = today
// let userinfo = this.getLocalStorage();
// this.msg.TeacherId = userinfo.AccountId;
// this.tabMsg.TeacherId = userinfo.AccountId;
this.getClassRoomList();
},
mounted() {
......@@ -235,7 +230,7 @@
</script>
<style lang="scss">
.xg .el-input--prefix .el-input__inner {
.xg .el-input--prefix .el-input__inner {
padding-left: 50px;
}
......
<template>
<div class="page-body MainPlan xg">
<div class="col row wrap q-col-gutter-md">
<div class="col-2 flex">
<el-select
v-model="msg.TeacherId"
style="width: 100%"
placeholder="教师"
size="small"
@change="getTableList()"
>
<el-option
v-for="item in TeacherList"
:key="item.TeacherName"
:label="item.TeacherName"
:value="item.TId"
>
<div class="col-2">
<el-select v-model="msg.TeacherId" style="width: 100%" placeholder="教师" size="small"
@change="getTypeWay()">
<el-option v-for="item in TeacherList" :key="item.TeacherName" :label="item.TeacherName" :value="item.TId">
</el-option>
<div
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
<div slot="prefix" class="full-height flex items-center" style="color: #000; padding-right: 10px">
教师:
</div>
</el-select>
</div>
<div class="col-2">
<el-select
v-model="msg.ClassRoomId"
style="width: 100%"
placeholder="教室"
size="small"
@change="getTypeWay()"
>
<el-option
v-for="item in ClassRoomList"
:key="item.RoomName"
:label="item.RoomName"
:value="item.RoomId"
>
<el-select v-model="msg.ClassRoomId" style="width: 100%" placeholder="教室" size="small" @change="getTypeWay()">
<el-option v-for="item in ClassRoomList" :key="item.RoomName" :label="item.RoomName" :value="item.RoomId">
</el-option>
<div
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
<div slot="prefix" class="full-height flex items-center" style="color: #000; padding-right: 10px">
教室:
</div>
</el-select>
</div>
<div class="col-2">
<el-date-picker
v-model="msg.StartTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="开始日期"
size="small"
style="width: 100%"
@change="getTypeWay()"
:picker-options="picker"
:clearable="false"
>
<el-date-picker v-model="msg.StartTime" type="date" value-format="yyyy-MM-dd" placeholder="开始日期" size="small"
style="width: 100%" @change="getTypeWay()" :picker-options="picker" :clearable="false">
</el-date-picker>
</div>
<div class="col-2">
<el-date-picker
v-model="msg.EndTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="结束日期"
size="small"
style="width: 100%"
@change="getTypeWay()"
clear-icon="iconfont icon-guanbi"
:picker-options="pickerEnd"
:clearable="false"
>
<el-date-picker v-model="msg.EndTime" type="date" value-format="yyyy-MM-dd" placeholder="结束日期" size="small"
style="width: 100%" @change="getTypeWay()" clear-icon="iconfont icon-guanbi" :picker-options="pickerEnd"
:clearable="false">
</el-date-picker>
</div>
<div class="col-2">
<el-select
v-model="msg.ClassType"
style="width: 100%"
placeholder="类型"
size="small"
@change="getTypeWay()"
>
<el-select v-model="msg.ClassType" style="width: 100%" placeholder="类型" size="small" @change="getTypeWay()">
<el-option :key="0" label="全部" :value="0"> </el-option>
<el-option :key="1" label="正常" :value="1"> </el-option>
<el-option :key="2" label="试听课" :value="2"> </el-option>
<div
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
<div slot="prefix" class="full-height flex items-center" style="color: #000; padding-right: 10px">
状态:
</div>
</el-select>
</div>
<div class="col-2">
<!-- <q-btn
color="accent"
size="sm"
class="q-mr-md"
style="margin-top: 2px"
@click="exchangeType"
:label="typeName"
/> -->
<!-- <q-btn
color="negative"
size="sm"
label="调课申请"
@click="openForm"
></q-btn> -->
</div>
</div>
<!-- <classmateForm :dataList="dataList" v-if="commonType == 1"></classmateForm> -->
<!-- <change-class-form
v-if="persistent"
@close="closeSaveForm"
@success="refreshPage"
></change-class-form> -->
<teachTable
v-if="commonType == 2"
:tableData="tableData"
:PageCount="PageCount"
:setMsg="tabMsg"
:showCZ="true"
@getChange="getChange"
></teachTable>
<teachTable v-if="commonType == 2" :tableData="tableData" :PageCount="PageCount" :setMsg="tabMsg" :showCZ="true"
@getChange="getChange"></teachTable>
</div>
</template>
<script>
import {
getTeacherDropDownList,
queryClassRoomList,
} from "../../api/school/index";
import {
GetClassPlanStatistical,
GetClassPlanStatisticalPage,
} from "../../api/teacher/index";
import classmateForm from "../../components/course/classmate-form";
import teachTable from "../teacher/components/teachTable";
import changeClassForm from "../../components/teacher/changeClassForm.vue";
export default {
meta: {
title: "我的课表",
},
components: {
classmateForm,
teachTable,
changeClassForm,
},
data() {
return {
persistent: false,
TeacherList: [], //教师团队
ClassRoomList: [], //
StartTime: "",
EndTime: "",
TeacherId: 0,
ClassRoomId: 0,
dataList: {},
activeNames: [1],
msg: {
StartTime: "",
EndTime: "",
TeacherId: 0,
ClassRoomId: 0,
ClassType: 0,
},
commonType: 2, //1日历模式 2列表模式
typeName: "列表模式",
tabMsg: {
PageIndex: 1,
PageSize: 12,
rowsPerPage: 12,
import {
getTeacherDropDownList,
queryClassRoomList,
} from "../../api/school/index";
import {
GetClassPlanStatistical,
GetClassPlanStatisticalPage,
} from "../../api/teacher/index";
import classmateForm from "../../components/course/classmate-form";
import teachTable from "../teacher/components/teachTable";
import changeClassForm from "../../components/teacher/changeClassForm.vue";
export default {
meta: {
title: "我的课表",
},
components: {
classmateForm,
teachTable,
changeClassForm,
},
data() {
return {
persistent: false,
TeacherList: [], //教师团队
ClassRoomList: [], //
StartTime: "",
EndTime: "",
TeacherId: 0,
ClassRoomId: 0,
ClassType: 0,
OrderBy: 1,
},
tableData: [], //表格数据
PageCount: 0,
picker: {
disabledDate: (time) => {
let endTime = this.msg.EndTime;
if (endTime) {
return time.getTime() >= new Date(endTime).getTime() - 8.64e6;
} else {
return time.getTime() >= Date.now() - 8.64e6;
}
dataList: {},
msg: {
StartTime: "",
EndTime: "",
TeacherId: 0,
ClassRoomId: 0,
ClassType: 0,
},
},
pickerEnd: {
disabledDate: (time) => {
return time.getTime() >= Date.now() - 8.64e6;
commonType: 2, //1日历模式 2列表模式
typeName: "列表模式",
tabMsg: {
PageIndex: 1,
PageSize: 12,
rowsPerPage: 12,
StartTime: "",
EndTime: "",
TeacherId: 0,
ClassRoomId: 0,
ClassType: 0,
OrderBy: 1,
},
},
today: "",
};
},
created() {
if (this.$route.query && this.$route.query.ClassType) {
this.msg.ClassType = this.$route.query.ClassType;
}
let date = new Date();
let today =
date.getFullYear() +
"-" +
(date.getMonth() < 9
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) +
"-" +
(date.getDate() < 10 ? "0" + date.getDate() < 10 : date.getDate());
this.today = today;
this.msg.StartTime = today;
this.tabMsg.StartTime = today;
this.msg.EndTime = today;
this.tabMsg.EndTime = today;
// let userinfo = this.getLocalStorage();
// this.msg.TeacherId = userinfo.AccountId;
// this.tabMsg.TeacherId = userinfo.AccountId;
this.getClassRoomList();
},
mounted() {
this.GetTeacherList();
this.getTableList();
},
methods: {
refreshPage() {
this.getPlanList();
tableData: [], //表格数据
PageCount: 0,
picker: {
disabledDate: (time) => {
if (this.msg.EndTime == null) {
return false;
} else {
let endTime = new Date(this.msg.EndTime);
return endTime.getTime() < time.getTime();
}
},
},
pickerEnd: {
disabledDate: (time) => {
let startTime = new Date(this.msg.StartTime);
return startTime.getTime() >= time.getTime();
},
},
today: "",
};
},
openForm() {
this.persistent = true;
created() {
if (this.$route.query && this.$route.query.ClassType) {
this.msg.ClassType = this.$route.query.ClassType;
}
let date = new Date();
let today =
date.getFullYear() +
"-" +
(date.getMonth() < 9 ?
"0" + (date.getMonth() + 1) :
date.getMonth() + 1) +
"-" +
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate());
this.today = today;
this.msg.StartTime = today;
this.tabMsg.StartTime = today;
this.msg.EndTime = today;
this.tabMsg.EndTime = today;
this.getClassRoomList();
},
closeSaveForm() {
this.persistent = false;
mounted() {
this.GetTeacherList();
this.getTableList();
},
// 获取校区教室导航列表
getPlanList() {
GetClassPlanStatistical(this.msg)
.then((res) => {
methods: {
refreshPage() {
this.getPlanList();
},
openForm() {
this.persistent = true;
},
closeSaveForm() {
this.persistent = false;
},
// 获取校区教室导航列表
getPlanList() {
GetClassPlanStatistical(this.msg)
.then((res) => {
if (res.Code == 1) {
this.dataList = res.Data;
}
})
.catch(() => {});
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then((res) => {
if (res.Code == 1) {
this.dataList = res.Data;
this.TeacherList = res.Data;
var obj = {
TeacherName: "请选择",
TId: 0,
};
this.TeacherList.unshift(obj);
}
})
.catch(() => {});
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then((res) => {
if (res.Code == 1) {
this.TeacherList = res.Data;
var obj = {
TeacherName: "请选择",
TId: 0,
};
this.TeacherList.unshift(obj);
});
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then((res) => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
var obj = {
RoomName: "请选择",
RoomId: 0,
};
this.ClassRoomList.unshift(obj);
}
});
},
exchangeType() {
if (this.commonType == 1) {
this.commonType = 2;
this.typeName = "日历模式";
this.getTableList();
} else {
this.commonType = 1;
this.typeName = "列表模式";
this.getPlanList();
}
});
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then((res) => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
var obj = {
RoomName: "请选择",
RoomId: 0,
};
this.ClassRoomList.unshift(obj);
},
getTableList() {
if (Date.parse(this.msg.StartTime) > Date.parse(this.msg.EndTime)) {
this.msg.StartTime = "";
}
});
},
exchangeType() {
if (this.commonType == 1) {
this.commonType = 2;
this.typeName = "日历模式";
this.tabMsg.StartTime = this.msg.StartTime;
this.tabMsg.EndTime = this.msg.EndTime;
this.tabMsg.ClassRoomId = this.msg.ClassRoomId;
this.tabMsg.ClassType = this.msg.ClassType;
this.tabMsg.TeacherId=this.msg.TeacherId;
GetClassPlanStatisticalPage(this.tabMsg).then((res) => {
if (res.Code == 1) {
this.tableData = res.Data.PageData;
this.PageCount = res.Data.PageCount;
}
});
},
getChange(val) {
this.tabMsg.PageIndex = val;
this.getTableList();
} else {
this.commonType = 1;
this.typeName = "列表模式";
this.getPlanList();
}
},
getTableList() {
if (Date.parse(this.msg.StartTime) > Date.parse(this.msg.EndTime)) {
this.msg.StartTime = "";
}
this.tabMsg.StartTime = this.msg.StartTime;
this.tabMsg.EndTime = this.msg.EndTime;
this.tabMsg.ClassRoomId = this.msg.ClassRoomId;
this.tabMsg.ClassType = this.msg.ClassType;
GetClassPlanStatisticalPage(this.tabMsg).then((res) => {
if (res.Code == 1) {
this.tableData = res.Data.PageData;
this.PageCount = res.Data.PageCount;
},
getTypeWay() {
if (this.commonType == 2) {
this.getTableList();
} else {
this.getPlanList();
}
});
},
getChange(val) {
this.tabMsg.PageIndex = val;
this.getTableList();
},
getTypeWay() {
if (this.commonType == 2) {
this.getTableList();
} else {
this.getPlanList();
}
},
},
},
};
};
</script>
<style lang="scss">
.xg .el-input--prefix .el-input__inner {
padding-left: 50px;
}
.xg .el-input--prefix .el-input__inner {
padding-left: 50px;
}
</style>
<style>
li {
list-style-type: none;
}
li {
list-style-type: none;
}
.stuList ul {
padding: 0px;
}
.stuList ul {
padding: 0px;
}
.stuList li {
background: rgba(221, 222, 224, 0.2);
border-radius: 4px;
margin-top: 15px;
}
.stuList li {
background: rgba(221, 222, 224, 0.2);
border-radius: 4px;
margin-top: 15px;
}
.stuList li .dline {
display: table;
width: 100%;
display: flex;
flex-direction: row;
}
.stuList li .dline {
display: table;
width: 100%;
display: flex;
flex-direction: row;
}
.stuList li .d1,
.stuList li .d2,
.stuList li .d3,
.stuList li .d4,
.stuList li .d5 {
width: 18%;
padding: 20px 20px 10px;
}
.stuList li .d1,
.stuList li .d2,
.stuList li .d3,
.stuList li .d4,
.stuList li .d5 {
width: 18%;
padding: 20px 20px 10px;
}
.stuList li .d7 {
flex: 1;
width: 1px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.stuList li .d7 {
flex: 1;
width: 1px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.stuList li .d1 .di-title {
font-size: 16px;
color: #111111;
}
.stuList li .d1 .di-title {
font-size: 16px;
color: #111111;
}
.stuList li .d1 .di-c {
font-size: 14px;
display: flex;
line-height: 28px;
color: #111111;
}
.stuList li .d1 .di-c {
font-size: 14px;
display: flex;
line-height: 28px;
color: #111111;
}
.stuList li .d6 {
padding: 10px 20px;
width: 100%;
height: inherit;
position: relative;
border-top: 1px solid #dddee0;
}
.stuList li .d6 {
padding: 10px 20px;
width: 100%;
height: inherit;
position: relative;
border-top: 1px solid #dddee0;
}
.stuList li .d6 .progress {
width: 100%;
height: 5px;
position: absolute;
left: 0;
bottom: 0;
}
.stuList li .d6 .progress {
width: 100%;
height: 5px;
position: absolute;
left: 0;
bottom: 0;
}
.stuList li .d2 div {
margin: 2px 0;
font-size: 14px;
color: #111111;
}
.stuList li .d2 div {
margin: 2px 0;
font-size: 14px;
color: #111111;
}
.stuList li .d2-n {
font-size: 12px;
color: #999999;
margin-right: 20px;
}
.stuList li .d2-n {
font-size: 12px;
color: #999999;
margin-right: 20px;
}
.stuList li .d3 .d3-s {
color: var(--q-color-negative);
font-weight: bold;
}
.stuList li .d3 .d3-s {
color: var(--q-color-negative);
font-weight: bold;
}
.stuList li .d3 div {
margin: 2px 0;
font-size: 14px;
}
.stuList li .d3 div {
margin: 2px 0;
font-size: 14px;
}
.stuList li .d4 div {
font-size: 14px;
color: #111111;
margin: 2px 0;
}
.stuList li .d4 div {
font-size: 14px;
color: #111111;
margin: 2px 0;
}
.stuList li .d5 div {
font-size: 14px;
color: #111111;
margin: 2px 0;
}
.stuList li .d5 div {
font-size: 14px;
color: #111111;
margin: 2px 0;
}
.stuList .myCourseNName {
width: 25px;
height: 25px;
border-radius: 50%;
color: #fff !important;
text-align: center;
line-height: 25px;
background-color: #004d40;
}
.stuList .myCourseNName {
width: 25px;
height: 25px;
border-radius: 50%;
color: #fff !important;
text-align: center;
line-height: 25px;
background-color: #004d40;
}
.stuList .app-image {
background-position: center center;
width: 50px;
height: 50px;
border-radius: 0%;
float: left;
margin-right: 8px;
}
.stuList .app-image {
background-position: center center;
width: 50px;
height: 50px;
border-radius: 0%;
float: left;
margin-right: 8px;
}
.Sysuser_Date .el-input {
width: 100%;
border: none;
background-color: transparent;
}
.Sysuser_Date .el-input {
width: 100%;
border: none;
background-color: transparent;
}
.Sysuser_Date .el-input__inner {
width: 100%;
border: none;
background-color: transparent;
}
.Sysuser_Date .el-input__inner {
width: 100%;
border: none;
background-color: transparent;
}
.Sysuser_Date .el-range-editor .el-range-input {
width: 100%;
border: none;
background-color: transparent;
}
.Sysuser_Date .el-range-editor .el-range-input {
width: 100%;
border: none;
background-color: transparent;
}
.el-picker-panel {
z-index: 99999 !important;
}
.el-picker-panel {
z-index: 99999 !important;
}
.syster_qDropdown .q-btn__wrapper {
padding: 0 3px;
min-height: 0 !important;
}
.syster_qDropdown .q-btn__wrapper {
padding: 0 3px;
min-height: 0 !important;
}
.editOrderDrawerTop {
width: 100%;
height: 50px;
display: flex;
justify-content: space-between;
background-color: #f0f5fb;
padding: 5px 10px;
align-items: center;
}
.editOrderDrawerTop {
width: 100%;
height: 50px;
display: flex;
justify-content: space-between;
background-color: #f0f5fb;
padding: 5px 10px;
align-items: center;
}
</style>
<template>
<div class="page-body stuList">
<div class="row q-mb-md">
<q-space></q-space>
<!-- <el-badge :value="11" style="float:right"> -->
<div style="position: relative">
<q-btn
color="accent"
label="高级查询"
@click="IsShowQuery = true"
></q-btn>
<q-btn color="accent" label="高级查询" @click="IsShowQuery = true"></q-btn>
<q-badge floating rounded color="red">{{ queryNum }}</q-badge>
</div>
<!-- </el-badge> -->
</div>
<div class="page-search row items-center flex">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select
@input="changeSchool"
standout="bg-primary text-white"
v-model="msg.School_Id"
class="col-6"
option-label="SName"
option-value="SId"
:options="SchoolList"
emit-value
map-options
label="校区"
/>
<q-select @input="changeSchool" standout="bg-primary text-white" v-model="msg.School_Id" class="col-6"
option-label="SName" option-value="SId" :options="SchoolList" emit-value map-options label="校区" />
</div>
<div class="col-3">
<q-select
@input="changeCourse"
standout="bg-primary text-white"
v-model="msg.CourseId"
class="col-6"
option-label="CourseName"
option-value="CourseId"
use-input
:options="CourseList"
@filter="filterCourse"
emit-value
map-options
label="课程"
clearable
>
<q-select @input="changeCourse" standout="bg-primary text-white" v-model="msg.CourseId" class="col-6"
option-label="CourseName" option-value="CourseId" use-input :options="CourseList" @filter="filterCourse"
emit-value map-options label="课程" clearable>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
......@@ -214,30 +186,16 @@ li {
</q-select>
</div>
<div class="col-3">
<q-select
@input="resetSearch"
standout="bg-primary text-white"
v-model="msg.ClassId"
class="col-6"
use-input
@filter="filterClass"
option-label="ClassName"
option-value="ClassId"
:options="classList"
emit-value
map-options
label="班级"
clearable
>
<template
v-slot:option="{
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.ClassId" class="col-6" use-input
@filter="filterClass" option-label="ClassName" option-value="ClassId" :options="classList" emit-value
map-options label="班级" clearable>
<template v-slot:option="{
itemProps,
itemEvents,
opt,
selected,
toggleOption,
}"
>
}">
<q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section>
<q-item-label v-html="opt.ClassName"></q-item-label>
......@@ -257,129 +215,84 @@ li {
</q-select>
</div>
<div class="col-3">
<q-input
@input="resetSearch"
clearable
standout="bg-primary text-white"
v-model="msg.GuestName"
label="学员姓名"
@clear="resetSearch"
maxlength="20"
/>
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.GuestName" label="学员姓名"
@clear="resetSearch" maxlength="20" />
</div>
</div>
</div>
<div class="page-content">
<q-table
:pagination="msg"
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-tow-column-table sticky-right-column-table"
separator="none"
:data="data"
:columns="columns"
row-key="name"
>
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-tow-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns"
row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">学员名单</div>
</template>
<template v-slot:body-cell-ContractNo="props">
<q-td :props="props">
<div
style="color: #f00; cursor: pointer"
@click="seeContract(props.row)"
>
<div style="color: #f00; cursor: pointer" @click="seeContract(props.row)">
{{ props.row.ContractNo }}
</div>
</q-td>
</template>
<template v-slot:body-cell-ClassName="props">
<q-td :props="props">
<div
style="color: #f00; cursor: pointer"
@click="seeClassDetail(props.row)"
>
<div style="color: #f00; cursor: pointer" @click="seeClassDetail(props.row)">
{{ props.row.ClassName }}
</div>
</q-td>
</template>
<template v-slot:body-cell-OrderId="props">
<q-td :props="props">
<div
style="color: #f00; cursor: pointer"
@click="showOrderDetail(props.row, 1)"
>
<div style="color: #f00; cursor: pointer" @click="showOrderDetail(props.row, 1)">
{{ props.row.OrderId }}
</div>
</q-td>
</template>
<template v-slot:body-cell-Income="props">
<q-td :props="props">
<div
style="color: #f00; cursor: pointer"
@click="showOrderDetail(props.row, 4)"
>
<div style="color: #f00; cursor: pointer" @click="showOrderDetail(props.row, 4)">
{{ props.row.Income }}
</div>
</q-td>
</template>
<template v-slot:body-cell-Refund="props">
<q-td :props="props">
<div
style="color: #f00; cursor: pointer"
@click="showOrderDetail(props.row, 4)"
>
<div style="color: #f00; cursor: pointer" @click="showOrderDetail(props.row, 4)">
{{ props.row.Refund }}
</div>
</q-td>
</template>
<template v-slot:body-cell-CompleteHours="props">
<q-td :props="props">
<div
style="color: #f00; cursor: pointer"
@click="seeStudentsClassUse(props.row)"
>
<div style="color: #f00; cursor: pointer" @click="seeStudentsClassUse(props.row)">
{{ props.row.CompleteHours }}
</div>
</q-td>
</template>
<template v-slot:body-cell-MakeUpHours="props">
<q-td :props="props">
<div
style="color: #f00; cursor: pointer"
@click="showList(props.row, 1)"
>
<div style="color: #f00; cursor: pointer" @click="showList(props.row, 1)">
{{ props.row.MakeUpHours }}
</div>
</q-td>
</template>
<template v-slot:body-cell-AbsenceNum="props">
<q-td :props="props">
<div
style="color: #f00; cursor: pointer"
@click="showList(props.row, 2)"
>
<div style="color: #f00; cursor: pointer" @click="showList(props.row, 2)">
{{ props.row.AbsenceNum }}
</div>
</q-td>
</template>
<template v-slot:body-cell-LeaveNum="props">
<q-td :props="props">
<div
style="color: #f00; cursor: pointer"
@click="showList(props.row, 3)"
>
<div style="color: #f00; cursor: pointer" @click="showList(props.row, 3)">
{{ props.row.LeaveNum }}
</div>
</q-td>
</template>
<template v-slot:body-cell-EventlogNum="props">
<q-td :props="props">
<div
style="color: #f00; cursor: pointer"
@click="showEventLog(props.row)"
>
<div style="color: #f00; cursor: pointer" @click="showEventLog(props.row)">
{{ props.row.EventlogNum }}
</div>
</q-td>
......@@ -387,37 +300,13 @@ li {
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<div>
<q-btn
flat
size="xs"
color="accent"
style="font-weight: 400"
label="停课"
v-if="props.row.GuestState === 1"
@click="ShowStopLesson(props.row)"
/>
<q-btn
flat
size="xs"
color="accent"
style="font-weight: 400"
label="转班"
v-if="props.row.GuestState === 1"
@click="transferClass(props.row, 1)"
/>
<q-btn-dropdown
flat
size="xs"
color="dark"
label="更多"
style="margin-left: 10px"
>
<q-btn flat size="xs" color="accent" style="font-weight: 400" label="停课" v-if="props.row.GuestState === 1"
@click="ShowStopLesson(props.row)" />
<q-btn flat size="xs" color="accent" style="font-weight: 400" label="转班" v-if="props.row.GuestState === 1"
@click="transferClass(props.row, 1)" />
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left: 10px">
<q-list>
<q-item
clickable
v-close-popup
@click="showAddEvent(props.row)"
>
<q-item clickable v-close-popup @click="showAddEvent(props.row)">
<q-item-section>
<q-item-label>添加事件</q-item-label>
</q-item-section>
......@@ -428,565 +317,519 @@ li {
</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"
/>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
</q-table>
</div>
<!-- 高级查询 -->
<MoreQuery
v-if="IsShowQuery"
:typeEnum="typeEnum"
:warnEnum="warnEnum"
:saveQuery="msg"
@close="closeHandle"
@success="morequery"
>
<MoreQuery v-if="IsShowQuery" :typeEnum="typeEnum" :warnEnum="warnEnum" :saveQuery="msg" @close="closeHandle"
@success="morequery">
</MoreQuery>
<!-- 停课申请 -->
<StopLesson-form
v-if="isShowStopLesson"
:setObj="stuObj"
@success="resetSearch"
@close="closeHandle"
/>
<StopLesson-form v-if="isShowStopLesson" :setObj="stuObj" @success="resetSearch" @close="closeHandle" />
<!-- 转班申请 -->
<transferclass-form
v-if="isShowTransferClass"
:save-obj="orderObj"
:ChangeType="ChangeType"
@close="closeHandle"
@success="resetSearch"
></transferclass-form>
<transferclass-form v-if="isShowTransferClass" :save-obj="orderObj" :ChangeType="ChangeType" @close="closeHandle"
@success="resetSearch"></transferclass-form>
<!-- 添加事件 -->
<AddEvent-form
v-if="isShowAddEvent"
:setObj="eventObj"
@success="resetSearch"
@close="closeHandle"
/>
<AddEvent-form v-if="isShowAddEvent" :setObj="eventObj" @success="resetSearch" @close="closeHandle" />
<!-- 班级详情 -->
<classinfo-form
v-if="isShowClassInfo"
:seting-obj="eventObj"
@close="closeHandle"
@success="refreshPage"
/>
<classinfo-form v-if="isShowClassInfo" :seting-obj="eventObj" @close="closeHandle" @success="refreshPage" />
<!-- 订单详情 -->
<myOrder-form
v-if="isShowmyorderForm"
:save-obj="eventObj"
@close="closeHandle"
></myOrder-form>
<myOrder-form v-if="isShowmyorderForm" :save-obj="eventObj" @close="closeHandle"></myOrder-form>
<!-- 可补课课时,缺勤次数,请假次数 -->
<list
v-if="isShowList"
:type="showType"
:set-obj="eventObj"
@close="closeHandle"
/>
<list v-if="isShowList" :type="showType" :set-obj="eventObj" @close="closeHandle" />
<!-- 事件记录 -->
<eventLog
v-if="isShowEventLog"
:set-obj="eventObj"
@modify="modifyEvent"
@close="closeHandle"
/>
<eventLog v-if="isShowEventLog" :set-obj="eventObj" @modify="modifyEvent" @close="closeHandle" />
</div>
</template>
<script>
import {
getSchoolDropdown,
getClassDropDownList,
} from "../../api/school/index";
import { queryCourseDropdownList } from "../../api/course/index";
import {
getStuList,
getEarlyWarningEnum,
getTypeEnum,
} from "../../api/stuMan/index.js";
import MoreQuery from "../../components/stuMan/moreQuery.vue";
import StopLessonForm from "../../components/teacher/stopLessonForm";
import transferclassForm from "../../components/sale/transferclass-form"; //转班信息
import AddEventForm from "../../components/stuMan/addEvent-form.vue"; //转班信息
import classinfoForm from "../../components/course/classinfo-form"; //班级详情
import myOrderForm from "../../components/sale/myOrder-form"; //订单详情
import list from "../../components/stuMan/makeUpHours.vue"; //可补课课时,缺勤次数,请假次数
import eventLog from "../../components/stuMan/eventRecord.vue"; //事件记录
export default {
meta: {
title: "学员名单",
},
components: {
MoreQuery,
StopLessonForm,
transferclassForm,
AddEventForm,
classinfoForm,
myOrderForm,
list,
eventLog,
},
data() {
return {
IsShowQuery: false,
data: [],
loading: false,
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
School_Id: -1, //校区
CourseId: 0, //课程
ClassId: 0, //班级
GuestName: "", //学生姓名
ClassNo: "", //班号
OrderId: 0, //订单号
EnterID: 0, //业务员
EffectStatus: "", //状态
JoinType: 0, //类型
EarlyWarning: 0, //预警
OrderTime: "", //下单时间
EndOrderTime: "", //下单结束时间
},
pageCount: 0,
columns: [
{
name: "Id",
label: "编号",
field: "Id",
align: "left",
required: true,
},
{
name: "GuestName",
label: "姓名",
align: "left",
field: "GuestName",
required: true,
},
{
name: "Mobile",
label: "电话",
align: "left",
field: "Mobile",
},
{
name: "ContractNo",
label: "合同编号",
align: "left",
field: "ContractNo",
},
{
name: "ClassName",
label: "班级",
align: "left",
field: "ClassName",
},
{
name: "CourseName",
label: "课程",
align: "left",
field: "CourseName",
},
{
name: "TeacherName",
label: "老师",
align: "left",
field: "TeacherName",
},
{
name: "OrderId",
label: "订单号",
align: "left",
field: "OrderId",
},
{
name: "OrderTime",
label: "报名时间",
align: "left",
field: "OrderTime",
},
{
name: "EnterName",
label: "业务员",
field: "EnterName",
align: "left",
},
{
name: "PreferPrice",
label: "应收金额",
field: "PreferPrice",
align: "left",
},
{
name: "Income",
label: "实收金额",
field: "Income",
align: "left",
},
{
name: "Refund",
label: "退款金额",
field: "Refund",
align: "left",
},
{
name: "TotalHours",
label: "课程总课时",
field: "TotalHours",
align: "left",
},
{
name: "ValidClassHours",
label: "有效课时",
field: "ValidClassHours",
align: "left",
},
{
name: "CompleteHours",
label: "消耗课时",
field: "CompleteHours",
align: "left",
},
{
name: "SurplusHours",
label: "剩余课时",
field: "SurplusHours",
align: "left",
},
{
name: "MakeUpHours",
label: "可补课课时",
field: "MakeUpHours",
align: "left",
},
{
name: "AbsenceNum",
label: "缺勤次数",
field: "AbsenceNum",
align: "left",
},
{
name: "LeaveNum",
label: "请假次数",
field: "LeaveNum",
align: "left",
},
{
name: "EventlogNum",
label: "事件记录",
field: "EventlogNum",
align: "left",
},
{
name: "GuestStateStr",
label: "状态",
field: "GuestStateStr",
align: "left",
},
{
name: "JoinTypeStr",
label: "类型",
field: "JoinTypeStr",
align: "left",
},
{
name: "optioned",
label: "操作",
required: true,
align: "left",
},
],
SchoolList: [],
CourseList: [],
AllCourseList: [],
classList: [],
AllClassList: [],
queryClass: {
CourseId: 0,
IsAddDefault: 1,
SchoolId: -1,
Teacher_Id: 0,
MoreStatus: "1,2,3",
IsQuerySurplusPlan: 0,
},
typeEnum: [],
warnEnum: [],
queryNum: 0, //高级查询个数
isShowStopLesson: false,
stuObj: {}, //停课
isShowTransferClass: false, //是否显示转班
orderObj: {}, //转班
ChangeType: 1, //1-转班 2-分拆
isShowAddEvent: false, //是否显示添加事件
eventObj: {},
isShowClassInfo: false, //是否显示班级详情
isShowmyorderForm: false, //是否显示订单详情
isShowList: false, //是否显示可补课课时,缺勤次数,请假次数
showType: 1,
isShowEventLog: false, //是否显示事件记录
};
},
mounted() {
this.getSchool();
this.getCourseList();
this.getClass();
this.getTypeEnum();
this.getEarlyWarningEnum();
this.getList();
},
methods: {
//获取校区下拉
getSchool() {
getSchoolDropdown({}).then((res) => {
if (res.Code == 1) {
this.SchoolList = res.Data;
var obj = {
SName: "不限",
SId: -1,
};
this.SchoolList.unshift(obj);
}
});
import {
getSchoolDropdown,
getClassDropDownList,
} from "../../api/school/index";
import {
queryCourseDropdownList
} from "../../api/course/index";
import {
getStuList,
getEarlyWarningEnum,
getTypeEnum,
} from "../../api/stuMan/index.js";
import MoreQuery from "../../components/stuMan/moreQuery.vue";
import StopLessonForm from "../../components/teacher/stopLessonForm";
import transferclassForm from "../../components/sale/transferclass-form"; //转班信息
import AddEventForm from "../../components/stuMan/addEvent-form.vue"; //转班信息
import classinfoForm from "../../components/course/classinfo-form"; //班级详情
import myOrderForm from "../../components/sale/myOrder-form"; //订单详情
import list from "../../components/stuMan/makeUpHours.vue"; //可补课课时,缺勤次数,请假次数
import eventLog from "../../components/stuMan/eventRecord.vue"; //事件记录
export default {
meta: {
title: "学员名单",
},
//获取课程
getCourseList() {
queryCourseDropdownList({}).then((res) => {
if (res.Code == 1) {
var tempArray = res.Data;
if (!tempArray) {
tempArray = [];
}
tempArray.unshift({
CourseId: 0,
CourseName: "不限",
});
this.CourseList = tempArray;
this.AllCourseList = tempArray;
}
});
components: {
MoreQuery,
StopLessonForm,
transferclassForm,
AddEventForm,
classinfoForm,
myOrderForm,
list,
eventLog,
},
// 筛选课程
filterCourse(val, update) {
update(() => {
if (val === "") {
this.CourseList = JSON.parse(JSON.stringify(this.AllCourseList));
} else {
const needle = val.toLowerCase();
this.CourseList = this.AllCourseList.filter(
(v) => v.CourseName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//获取班级
getClass() {
getClassDropDownList(this.queryClass).then((res) => {
this.classList = [];
this.msg.ClassId = 0;
if (res.Code == 1) {
this.classList = res.Data;
this.AllClassList = res.Data;
var obj = {
ClassName: "不限",
ClassId: 0,
};
this.classList.unshift(obj);
}
});
},
//筛选班级
filterClass(val, update) {
update(() => {
if (val === "") {
this.classList = JSON.parse(JSON.stringify(this.AllClassList));
} else {
const needle = val.toLowerCase();
this.classList = this.AllClassList.filter(
(v) => v.ClassName.toLowerCase().indexOf(needle) > -1
);
}
});
},
changeSchool(val) {
this.queryClass.SchoolId = val;
this.getClass();
this.resetSearch();
data() {
return {
IsShowQuery: false,
data: [],
loading: false,
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
School_Id: '', //校区
CourseId: 0, //课程
ClassId: 0, //班级
GuestName: "", //学生姓名
ClassNo: "", //班号
OrderId: 0, //订单号
EnterID: 0, //业务员
EffectStatus: "", //状态
JoinType: 0, //类型
EarlyWarning: 0, //预警
OrderTime: "", //下单时间
EndOrderTime: "", //下单结束时间
},
pageCount: 0,
columns: [{
name: "Id",
label: "编号",
field: "Id",
align: "left",
required: true,
},
{
name: "GuestName",
label: "姓名",
align: "left",
field: "GuestName",
required: true,
},
{
name: "Mobile",
label: "电话",
align: "left",
field: "Mobile",
},
{
name: "ContractNo",
label: "合同编号",
align: "left",
field: "ContractNo",
},
{
name: "ClassName",
label: "班级",
align: "left",
field: "ClassName",
},
{
name: "CourseName",
label: "课程",
align: "left",
field: "CourseName",
},
{
name: "TeacherName",
label: "老师",
align: "left",
field: "TeacherName",
},
{
name: "OrderId",
label: "订单号",
align: "left",
field: "OrderId",
},
{
name: "OrderTime",
label: "报名时间",
align: "left",
field: "OrderTime",
},
{
name: "EnterName",
label: "业务员",
field: "EnterName",
align: "left",
},
{
name: "PreferPrice",
label: "应收金额",
field: "PreferPrice",
align: "left",
},
{
name: "Income",
label: "实收金额",
field: "Income",
align: "left",
},
{
name: "Refund",
label: "退款金额",
field: "Refund",
align: "left",
},
{
name: "TotalHours",
label: "课程总课时",
field: "TotalHours",
align: "left",
},
{
name: "ValidClassHours",
label: "有效课时",
field: "ValidClassHours",
align: "left",
},
{
name: "CompleteHours",
label: "消耗课时",
field: "CompleteHours",
align: "left",
},
{
name: "SurplusHours",
label: "剩余课时",
field: "SurplusHours",
align: "left",
},
{
name: "MakeUpHours",
label: "可补课课时",
field: "MakeUpHours",
align: "left",
},
{
name: "AbsenceNum",
label: "缺勤次数",
field: "AbsenceNum",
align: "left",
},
{
name: "LeaveNum",
label: "请假次数",
field: "LeaveNum",
align: "left",
},
{
name: "EventlogNum",
label: "事件记录",
field: "EventlogNum",
align: "left",
},
{
name: "GuestStateStr",
label: "状态",
field: "GuestStateStr",
align: "left",
},
{
name: "JoinTypeStr",
label: "类型",
field: "JoinTypeStr",
align: "left",
},
{
name: "optioned",
label: "操作",
required: true,
align: "left",
},
],
SchoolList: [],
CourseList: [],
AllCourseList: [],
classList: [],
AllClassList: [],
queryClass: {
CourseId: 0,
IsAddDefault: 1,
SchoolId: '',
Teacher_Id: 0,
MoreStatus: "1,2,3",
IsQuerySurplusPlan: 0,
},
typeEnum: [],
warnEnum: [],
queryNum: 0, //高级查询个数
isShowStopLesson: false,
stuObj: {}, //停课
isShowTransferClass: false, //是否显示转班
orderObj: {}, //转班
ChangeType: 1, //1-转班 2-分拆
isShowAddEvent: false, //是否显示添加事件
eventObj: {},
isShowClassInfo: false, //是否显示班级详情
isShowmyorderForm: false, //是否显示订单详情
isShowList: false, //是否显示可补课课时,缺勤次数,请假次数
showType: 1,
isShowEventLog: false, //是否显示事件记录
};
},
changeCourse(val) {
this.queryClass.CourseId = val;
mounted() {
this.getSchool();
this.getCourseList();
this.getClass();
this.resetSearch();
this.getTypeEnum();
this.getEarlyWarningEnum();
this.getList();
},
getList() {
this.loading = true;
getStuList(this.msg)
.then((res) => {
this.loading = false;
if (res.Code === 1) {
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
methods: {
//获取校区下拉
getSchool() {
getSchoolDropdown({}).then((res) => {
if (res.Code == 1) {
this.SchoolList = res.Data;
}
})
.catch((err) => {
this.loading = false;
});
},
//显示停课弹窗
ShowStopLesson(item) {
this.isShowStopLesson = true;
this.stuObj = item;
},
},
//获取课程
getCourseList() {
queryCourseDropdownList({}).then((res) => {
if (res.Code == 1) {
var tempArray = res.Data;
if (!tempArray) {
tempArray = [];
}
tempArray.unshift({
CourseId: 0,
CourseName: "不限",
});
this.CourseList = tempArray;
this.AllCourseList = tempArray;
}
});
},
// 筛选课程
filterCourse(val, update) {
update(() => {
if (val === "") {
this.CourseList = JSON.parse(JSON.stringify(this.AllCourseList));
} else {
const needle = val.toLowerCase();
this.CourseList = this.AllCourseList.filter(
(v) => v.CourseName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//获取班级
getClass() {
getClassDropDownList(this.queryClass).then((res) => {
this.classList = [];
this.msg.ClassId = 0;
if (res.Code == 1) {
this.classList = res.Data;
this.AllClassList = res.Data;
var obj = {
ClassName: "不限",
ClassId: 0,
};
this.classList.unshift(obj);
}
});
},
//筛选班级
filterClass(val, update) {
update(() => {
if (val === "") {
this.classList = JSON.parse(JSON.stringify(this.AllClassList));
} else {
const needle = val.toLowerCase();
this.classList = this.AllClassList.filter(
(v) => v.ClassName.toLowerCase().indexOf(needle) > -1
);
}
});
},
changeSchool(val) {
this.queryClass.SchoolId = val;
this.getClass();
this.resetSearch();
},
changeCourse(val) {
this.queryClass.CourseId = val;
this.getClass();
this.resetSearch();
},
getList() {
this.loading = true;
getStuList(this.msg)
.then((res) => {
this.loading = false;
if (res.Code === 1) {
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
.catch((err) => {
this.loading = false;
});
},
//显示停课弹窗
ShowStopLesson(item) {
this.isShowStopLesson = true;
this.stuObj = item;
},
// 高级查询
morequery(val) {
this.IsShowQuery = false;
this.queryNum = val.chooseNum;
this.msg.ClassNo = val.ClassNo;
this.msg.OrderId = val.OrderId;
this.msg.EnterID = val.EnterID;
this.msg.EffectStatus = val.EffectStatus;
this.msg.JoinType = val.JoinType;
this.msg.EarlyWarning = val.EarlyWarning;
this.msg.OrderTime = val.OrderTime;
this.msg.EndOrderTime = val.EndOrderTime;
this.resetSearch();
},
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getList();
},
//关闭弹窗
closeHandle() {
this.IsShowQuery = false;
this.isShowStopLesson = false;
this.isShowTransferClass = false;
this.isShowAddEvent = false;
this.isShowClassInfo = false;
this.isShowmyorderForm = false;
this.isShowList = false;
this.isShowEventLog = false;
this.isShowEventLog = false;
},
//刷新页面
refreshPage() {
this.closeHandle();
this.getList();
},
goUrl(url, item) {
if (item) {
// 高级查询
morequery(val) {
this.IsShowQuery = false;
this.queryNum = val.chooseNum;
this.msg.ClassNo = val.ClassNo;
this.msg.OrderId = val.OrderId;
this.msg.EnterID = val.EnterID;
this.msg.EffectStatus = val.EffectStatus;
this.msg.JoinType = val.JoinType;
this.msg.EarlyWarning = val.EarlyWarning;
this.msg.OrderTime = val.OrderTime;
this.msg.EndOrderTime = val.EndOrderTime;
this.resetSearch();
},
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getList();
},
//关闭弹窗
closeHandle() {
this.IsShowQuery = false;
this.isShowStopLesson = false;
this.isShowTransferClass = false;
this.isShowAddEvent = false;
this.isShowClassInfo = false;
this.isShowmyorderForm = false;
this.isShowList = false;
this.isShowEventLog = false;
this.isShowEventLog = false;
},
//刷新页面
refreshPage() {
this.closeHandle();
this.getList();
},
goUrl(url, item) {
if (item) {
this.$router.push({
path: url,
query: {
Id: item.Id,
},
});
} else {
this.$router.push({
path: url,
query: {
Id: 0,
},
});
}
},
goUrl1(url, item) {
this.$router.push({
path: url,
query: {
Id: item.Id,
name: item.ActivityName,
},
});
} else {
this.$router.push({
path: url,
query: {
Id: 0,
},
},
getTypeEnum() {
getTypeEnum({}).then((res) => {
if (res.Code === 1) {
res.Data.unshift({
Name: "不限",
Id: 0,
});
this.typeEnum = res.Data;
}
});
}
},
goUrl1(url, item) {
this.$router.push({
path: url,
query: {
Id: item.Id,
name: item.ActivityName,
},
});
},
getTypeEnum() {
getTypeEnum({}).then((res) => {
if (res.Code === 1) {
res.Data.unshift({
Name: "不限",
Id: 0,
});
this.typeEnum = res.Data;
}
});
},
getEarlyWarningEnum() {
getEarlyWarningEnum({}).then((res) => {
if (res.Code === 1) {
this.warnEnum = res.Data;
}
});
},
//转班
transferClass(item, type) {
this.orderObj = item;
this.ChangeType = type;
this.isShowTransferClass = true;
},
//显示添加事件
showAddEvent(item) {
let newitem = JSON.parse(JSON.stringify(item));
// Id和修改的Id冲突 自定义学生id=STUID
newitem.STUID = newitem.Id;
newitem.Id = 0;
this.eventObj = newitem;
this.isShowAddEvent = true;
},
//查看合同
seeContract(item) {
this.OpenNewUrl("/contractView", { ContractId: item.ContractId });
},
//查看课时消耗
seeStudentsClassUse(item) {
let obj = {
StudentId: item.Id,
TeacherId: item.Teacher_Id,
ClassId: item.ClassId,
};
this.OpenNewUrl("/teacher/studentsClassSee", obj);
},
//查看班级详情
seeClassDetail(item) {
this.eventObj = item;
this.isShowClassInfo = true;
},
//查看订单详情
showOrderDetail(item, tab) {
item.tab = tab;
this.eventObj = item;
this.isShowmyorderForm = true;
},
showList(item, type) {
this.eventObj = item;
this.showType = type;
this.isShowList = true;
},
showEventLog(item) {
this.eventObj = item;
this.isShowEventLog = true;
},
// 修改事件
modifyEvent(val) {
this.closeHandle();
this.eventObj = val;
this.isShowAddEvent = true;
},
getEarlyWarningEnum() {
getEarlyWarningEnum({}).then((res) => {
if (res.Code === 1) {
this.warnEnum = res.Data;
}
});
},
//转班
transferClass(item, type) {
this.orderObj = item;
this.ChangeType = type;
this.isShowTransferClass = true;
},
//显示添加事件
showAddEvent(item) {
let newitem = JSON.parse(JSON.stringify(item));
// Id和修改的Id冲突 自定义学生id=STUID
newitem.STUID = newitem.Id;
newitem.Id = 0;
this.eventObj = newitem;
this.isShowAddEvent = true;
},
//查看合同
seeContract(item) {
this.OpenNewUrl("/contractView", {
ContractId: item.ContractId
});
},
//查看课时消耗
seeStudentsClassUse(item) {
let obj = {
StudentId: item.Id,
TeacherId: item.Teacher_Id,
ClassId: item.ClassId,
};
this.OpenNewUrl("/teacher/studentsClassSee", obj);
},
//查看班级详情
seeClassDetail(item) {
this.eventObj = item;
this.isShowClassInfo = true;
},
//查看订单详情
showOrderDetail(item, tab) {
item.tab = tab;
this.eventObj = item;
this.isShowmyorderForm = true;
},
showList(item, type) {
this.eventObj = item;
this.showType = type;
this.isShowList = true;
},
showEventLog(item) {
this.eventObj = item;
this.isShowEventLog = true;
},
// 修改事件
modifyEvent(val) {
this.closeHandle();
this.eventObj = val;
this.isShowAddEvent = true;
},
},
},
};
};
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
@import url('~assets/css/table.sass')
</style>
......@@ -254,8 +254,8 @@
}
],
msg: {
StartDate: '2021-07-20',
School_Id: -1,
StartDate: '',
School_Id: '',
CouseId: 0,
ClassId: 0,
OrderGuestId: '',
......@@ -332,10 +332,6 @@
if (!tempArray) {
tempArray = [];
}
tempArray.unshift({
SId: -1,
SName: "不限"
})
this.schoolList = tempArray;
}
})
......
<template>
<div class="page-body visitorRecord">
<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 @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.KeyWords" label="关键字"
@clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" clearable
option-label="EmployeeName" v-model="msg.CreateBy" :options="EmployeeList" emit-value map-options label="业务员" use-input @filter="filterFn2"/>
</div>
<div class="col-3">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList2" @change="resetSearch()" value-format="yyyy-MM-dd" type="daterange" style="border:none;" :picker-options="option"
 range-separator="至"  start-placeholder="开班开始时间"  end-placeholder="开班结束时间">
 </el-date-picker>       
</template>
</q-field>
</div>
<div class="page-body visitorRecord">
<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 @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.KeyWords" label="关键字"
@clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" clearable
option-label="EmployeeName" v-model="msg.CreateBy" :options="EmployeeList" emit-value map-options
label="业务员" use-input @filter="filterFn2" />
</div>
<div class="col-3">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList2" @change="resetSearch()" value-format="yyyy-MM-dd" type="daterange" style="border:none;"
:picker-options="option"  range-separator="至"  start-placeholder="开班开始时间"  end-placeholder="开班结束时间">
 </el-date-picker>       
</template>
</q-field>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">访问记录</div>
<q-space />
</template>
<template v-slot:body-cell-VisitorStatus="props">
<q-td :props="props">
<img v-if="props.row.VisitorStatus==1" title="正常" src="../../assets/images/normal.png" />
<img v-if="props.row.VisitorStatus==2" title="贵宾" src="../../assets/images/vip.png" />
<img v-if="props.row.VisitorStatus==3" title="黑名单" src="../../assets/images/blackList.png" />
</q-td>
</template>
<template v-slot:body-cell-Evaluate="props">
<q-td :props="props">
{{getRemarks(props.row.Evaluate)}}
</q-td>
</template>
<template v-slot:body-cell-Remark="props">
<q-td :props="props">
{{getRemarks(props.row.Remark)}}
</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>
</q-table>
</div>
</div>
</template>
<script>
import {
getVisitorAllPageList,
} from '../../api/stuMan/index'
import { queryEmployee } from '../../api/users/user';
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">访问记录</div>
<q-space />
export default {
meta: {
title: "访问记录"
},
data() {
return {
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
KeyWords: "",
CreateBy:'',
StartTime:'',
EndTime:'',
</template>
<template v-slot:body-cell-Name="props">
<q-td>
<span style="color:#2961FE;cursor:pointer;" @click="getDetail(props.row)">{{props.row.Name}}</span>
</q-td>
</template>
<template v-slot:body-cell-VisitorStatus="props">
<q-td :props="props">
<img v-if="props.row.VisitorStatus==1" title="正常" src="../../assets/images/normal.png" />
<img v-if="props.row.VisitorStatus==2" title="贵宾" src="../../assets/images/vip.png" />
<img v-if="props.row.VisitorStatus==3" title="黑名单" src="../../assets/images/blackList.png" />
</q-td>
</template>
<template v-slot:body-cell-Evaluate="props">
<q-td :props="props">
{{getRemarks(props.row.Evaluate)}}
</q-td>
</template>
<template v-slot:body-cell-Remark="props">
<q-td :props="props">
{{getRemarks(props.row.Remark)}}
</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>
</q-table>
</div>
<schedulFanke v-if="isShowDetail" @close="closeDetail" :save-obj="sendObj"></schedulFanke>
</div>
</template>
<script>
import {
getVisitorAllPageList,
} from '../../api/stuMan/index'
import {
queryEmployee
} from '../../api/users/user';
import schedulFanke from '../../components/schedul/schedul-fanke'
export default {
meta: {
title: "访问记录"
},
components: {
schedulFanke
},
data() {
return {
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
KeyWords: "",
CreateBy: '',
StartTime: '',
EndTime: '',
},
pageCount: 0,
dataList: [],
dateList2: [],
loading: false,
columns: [{
name: 'Name',
label: '姓名',
required: true,
field: 'Name',
align: 'left'
},
{
name: 'Age',
field: 'Age',
label: '年龄',
align: 'left',
},
{
name: 'Tel',
field: 'Tel',
label: '电话',
align: 'left',
},
{
name: 'WeChatNum',
field: 'WeChatNum',
label: '微信',
align: 'left'
},
pageCount: 0,
dataList: [],
dateList2:[],
loading: false,
columns: [{
name: 'Name',
label: '姓名',
required: true,
field: 'Name',
align: 'left'
},
{
name: 'Age',
field: 'Age',
label: '年龄',
align: 'left',
},
{
name: 'Tel',
field: 'Tel',
label: '电话',
align: 'left',
},
{
name: 'WeChatNum',
field: 'WeChatNum',
label: '微信',
align: 'left'
},
{
name: 'CourseName',
label: '兴趣课程',
field: 'CourseName',
align: 'left'
},
{
name: 'StudyTime',
label: '学习时间',
field: 'StudyTime',
align: 'left'
},
{
name: 'LevelType',
label: '当前水平',
field: 'LevelType',
align: 'left'
},
{
name: 'CreateByName',
label: '关联人员',
field: 'CreateByName',
align: 'left'
},
{
name: 'VisitorStatus',
label: '状态',
field: 'VisitorStatus',
align: 'left'
},
{
name: 'Evaluate',
label: '意向评估',
field: 'Evaluate',
align: 'left'
},
{
name: 'CreateTimeStr',
label: '到访时间',
field: 'CreateTimeStr',
align: 'left'
},
{
name: 'VisitTimes',
label: '到访次数',
field: 'VisitTimes',
align: 'left'
},
{
name: 'Remark',
label: '备注',
field: 'Remark',
align: 'left'
},
],
option:{
disabledDate:(time)=> {
return time.getTime() > Date.now()
}
{
name: 'CourseName',
label: '兴趣课程',
field: 'CourseName',
align: 'left'
},
EmployeeList:[],//业务员
AllemployeeList:[],
{
name: 'StudyTime',
label: '学习时间',
field: 'StudyTime',
align: 'left'
},
{
name: 'LevelType',
label: '当前水平',
field: 'LevelType',
align: 'left'
},
{
name: 'CreateByName',
label: '关联人员',
field: 'CreateByName',
align: 'left'
},
{
name: 'VisitorStatus',
label: '状态',
field: 'VisitorStatus',
align: 'left'
},
{
name: 'Evaluate',
label: '意向评估',
field: 'Evaluate',
align: 'left'
},
{
name: 'CreateTimeStr',
label: '到访时间',
field: 'CreateTimeStr',
align: 'left'
},
{
name: 'VisitTimes',
label: '到访次数',
field: 'VisitTimes',
align: 'left'
},
{
name: 'Remark',
label: '备注',
field: 'Remark',
align: 'left'
},
],
option: {
disabledDate: (time) => {
return time.getTime() > Date.now()
}
},
EmployeeList: [], //业务员
AllemployeeList: [],
isShowDetail:false,
sendObj: {},
}
},
mounted() {
this.getList();
this.getEmployee()
},
created() {
},
methods: {
//关闭
closeDetail() {
this.isShowDetail = false;
},
//获取详情
getDetail(obj) {
this.sendObj = obj;
this.isShowDetail = true;
},
getList() {
this.loading = true;
if (this.dateList2 && this.dateList2.length > 0) {
this.msg.StartTime = this.dateList2[0];
this.msg.EndTime = this.dateList2[1];
} else {
this.msg.StartTime = '';
this.msg.EndTime = '';
}
getVisitorAllPageList(this.msg).then(res => {
this.loading = false;
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}).catch(() => {
this.loading = false;
})
},
mounted() {
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
this.getEmployee()
},
created() {
changePage(val) {
this.msg.pageIndex = val;
this.getList();
},
methods: {
getList() {
this.loading = true;
if (this.dateList2 && this.dateList2.length > 0) {
this.msg.StartTime = this.dateList2[0];
this.msg.EndTime = this.dateList2[1];
} else {
this.msg.StartTime = '';
this.msg.EndTime = '';
//过滤备注显示
getRemarks(remark) {
if (remark.length > 10) {
return remark.substring(0, 10) + '...';
} else {
return remark;
}
},
//业务员
getEmployee(id) {
var qMsg = {
Dept_Id: 0
}
qMsg.Dept_Id = id;
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
let obj = {
Id: "",
EmployeeName: "不限"
}
getVisitorAllPageList(this.msg).then(res => {
this.loading = false;
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}).catch(() => {
this.loading = false;
})
},
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
},
changePage(val) {
this.msg.pageIndex = val;
this.getList();
},
//过滤备注显示
getRemarks(remark) {
if (remark.length > 10) {
return remark.substring(0, 10) + '...';
this.EmployeeList.unshift(obj)
this.AllemployeeList = JSON.parse(JSON.stringify(this.EmployeeList));
}
}).catch(() => {
})
},
//筛选业务员
filterFn2(val, update) {
update(() => {
if (val === '') {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
return remark;
const needle = val.toLowerCase()
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1)
}
},
//业务员
getEmployee(id) {
var qMsg = {
Dept_Id: 0
}
qMsg.Dept_Id=id;
queryEmployee(qMsg).then(res => {
if(res.Code==1){
this.EmployeeList = res.Data;
let obj={
Id:"",
EmployeeName:"不限"
}
this.EmployeeList.unshift(obj)
this.AllemployeeList = JSON.parse(JSON.stringify(this.EmployeeList));
}
}).catch(() => {
})
},
})
},
//筛选业务员
filterFn2(val, update) {
update(() => {
if (val === '') {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
const needle = val.toLowerCase()
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1)
}
})
},
}
}
</script>
<style >
.visitorRecord .border-bottom {
border-bottom: 1px dashed #EEE;
padding-bottom: 5px;
margin-bottom: 5px;
}
.visitorRecord .el-input {
}
</script>
<style>
.visitorRecord .border-bottom {
border-bottom: 1px dashed #EEE;
padding-bottom: 5px;
margin-bottom: 5px;
}
.visitorRecord .el-input {
width: 100%;
border: none;
background-color: transparent;
......@@ -271,15 +295,13 @@
border: none;
background-color: transparent;
}
.visitorRecord .el-range-input {
.visitorRecord .el-range-input {
background-color: transparent !important;
}
</style>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
</style>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
......@@ -177,7 +177,7 @@
DeptName: "", //部门名称
DeptId: 0, //部门编号
Status: "-1",
School_Id: 0,
School_Id: -1,
DeptTier: "",
ParentId: "",
},
......@@ -229,7 +229,7 @@
tempSchoolArray = [];
}
tempSchoolArray.unshift({
SId: 0,
SId: -1,
SName: "不限"
});
this.schoolList = tempSchoolArray;
......
......@@ -49,7 +49,7 @@
</div>
</div>
<div class="page-content">
<classlist :data="data" :authObj="authObj" @success="refreshPage"></classlist>
<classlist :data="data" :authObj="authObj" :loading="loading" @success="refreshPage"></classlist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
......@@ -97,7 +97,8 @@
//权限判断
authObj: {
isShowLessonCost: true, //显示月度课耗
}
},
loading:false
}
},
created() {
......
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