瀏覽代碼

修改我的考勤(学生),我的课表(学生)

新疆警官学校中职
lb01 2 年之前
父節點
當前提交
bdbbf4906c
共有 3 個檔案被更改,包括 405 行新增294 行删除
  1. +371
    -268
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentCheck/list.vue
  2. +32
    -25
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/leaveFrom.vue
  3. +2
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/list.vue

+ 371
- 268
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentCheck/list.vue 查看文件

@@ -9,38 +9,45 @@
<text class="text-xxl cuIcon cuIcon-back" @click="timeTap(1)"></text>
<text>{{todayWeek.Monday}}</text>
-
<text>{{todayWeek.Sunday}}</text>
<text class="text-xxl cuIcon cuIcon-right" @click="timeTap(2)"></text>
<text>{{todayWeek.Sunday}} </text>
<text class="text-xxl cuIcon cuIcon-right" @click="timeTap(2)"></text>
</view>
</view>
<view class="timeTable_sec2">
<view class="tSec2Top2">
<view v-for="(item, ind) in weekArr" :key="item.en" @click="liTap(ind)" :class="ind == num? 'active' : ''">
<text>{{ item.en }}</text>
<text>{{ item.cn }}</text>
<view class="tSec2TopUl">
<view class="tSec2TopLi" v-for="(item, ind) in weekArr" :key="item.en" @click="liTap(ind)"
:class="ind == num? 'active' : ''">
<text>{{ item.en }}</text>
<text>{{ item.cn }}</text>
</view>
</view>
</view>
<view class="tSec2Box2">
<view class="tSec2Con2" v-for="(items, ind) in dataArr" :key="items.num" v-show="ind == num">
<view class="studCheckList">
<view class="studCheckLi" v-for="(k, index) in items.weekList" :key="k.LessonDate" v-if="items.weekList.length != 0">
<view class="studCheckT">
<view class="studCheckLi" v-for="(k, index) in items.weekList" :key="index"
v-if="items.weekList.length != 0">
<view class="studCheckT">
<image mode="widthFix" src="~@/common/images/book.png"></image>
{{ k.LessonName }}
</view>
<view class="studCheckTxt">
<view class="studCheckTxt">
<image src="~@/common/images/time.png" mode="widthFix"></image>
{{ k.LessonDate }}
<image style="margin:0 5px 0 30px" src="~@/common/images/person.png" mode="widthFix"></image>
<image style="margin:0 5px 0 30px" src="~@/common/images/person.png" mode="widthFix">
</image>
<text>
{{ k.Teacher }}
</text>
<image style="margin:0 5px 0 30px" src="~@/common/images/location.png" mode="widthFix"></image>
<image style="margin:0 5px 0 30px" src="~@/common/images/location.png" mode="widthFix">
</image>
{{ k.ClassRoomName }}
</view>
<view class="studCheckStatue" :class="k.Sort == '迟到'? 'studCheckStatue2' : k.Sort == '早退'? 'studCheckStatue2' : k.Sort == '病假'? 'studCheckStatue4' : k.Sort == '事假'? 'studCheckStatue2' : k.Sort == '准时'? 'studCheckStatue1' : 'studCheckStatue3' ">
</view>
<view class="studCheckStatue"
:class="k.Sort == '迟到'? 'studCheckStatue2' : k.Sort == '早退'? 'studCheckStatue2' : k.Sort == '病假'? 'studCheckStatue4' : k.Sort == '事假'? 'studCheckStatue2' : k.Sort == '准时'? 'studCheckStatue1' : 'studCheckStatue3' ">
<text></text> {{ k.Sort }}
</view>
</view>
</view>
<view class="noHtml" v-if="items.weekList.length == 0">
该时间段没有数据
@@ -53,268 +60,364 @@
</template>

<script>
import common from '@/common/js/common.js'
export default {
data() {
return {
semester: '',
num: 0,
weekDayTime: 0,
todayWeek: {},
dataArr: [],
weekArr: [
{
en: 'MON',
cn: '星期一'
},
{
en: 'TUE',
cn: '星期二'
},
{
en: 'WED',
cn: '星期三'
},
{
en: 'THU',
cn: '星期四'
import common from '@/common/js/common.js'
export default {
data() {
return {
semester: '',
num: 0,
user: null,
weekDayTime: 0,
noClassTime: 0,
todayWeek: {
Monday:'',
Sunday:''
},
{
en: 'FRI',
cn: '星期五'
},
{
en: 'SAT',
cn: '星期六'
},
{
en: 'SUN',
cn: '星期日'
}
]
};
},
methods: {
async init() {
let _this = this;
_this.todayWeek = common.weekday();
_this.semester = common.judgeDate();
_this.weekDayTime = 7 * common.oneDayTime();
_this.studentCheckData(_this.todayWeek.Monday, _this.todayWeek.Sunday);
dataArr: [],
itemcs:'',
weekArr: [{
en: 'ONE',
cn: '星期一'
},
{
en: 'TWO',
cn: '星期二'
},
{
en: 'THREE',
cn: '星期三'
},
{
en: 'FOUR',
cn: '星期四'
},
{
en: 'FIVE',
cn: '星期五'
},
{
en: 'SIX',
cn: '星期六'
},
{
en: 'SEVEN',
cn: '星期七'
},
{
en: 'EIGHT',
cn: '星期八'
},
{
en: 'NINE',
cn: '星期九'
},
{
en: 'TEN',
cn: '星期十'
}
]
// weekArr: [
// {
// en: 'MON',
// cn: '星期一'
// },
// {
// en: 'TUE',
// cn: '星期二'
// },
// {
// en: 'WED',
// cn: '星期三'
// },
// {
// en: 'THU',
// cn: '星期四'
// },
// {
// en: 'FRI',
// cn: '星期五'
// },
// {
// en: 'SAT',
// cn: '星期六'
// },
// {
// en: 'SUN',
// cn: '星期日'
// }
// ]
};
},
studentCheckData(Monday, Sunday) {
// var studCheckList = $('.studCheckList');
let _this = this;
_this.LOADING('加载数据中…')
_this.HTTP_GET(
'learun/adms/timetable/StuLessonInfo',
{StartDate:Monday, EndDate:Sunday},
'加载数据时出错'
).then( res => {
_this.HIDE_LOADING()
//console.log(res)
_this.dataArr.length = 0;
for(let j = 1; j < 8; j++){
let dataFlag = true;
var num = Math.floor(Math.random() * 100000000);
res.forEach((n, i) => {
if(n.week == j){
n.num = num;
_this.dataArr.push(n);
dataFlag = false;
return
methods: {
async init() {
let _this = this;
// _this.todayWeek = common.weekday();
// _this.semester = common.judgeDate();
_this.weekDayTime = 14 * common.oneDayTime();
_this.noClassTime = 4 * common.oneDayTime();
_this.studentCheckData();
},
liTap(ind) {
this.num = ind;
},
timeTap(num) {
let _this = this;
if (num == 1) {
_this.todayWeek.MondayTime = _this.todayWeek.MondayTime - _this.weekDayTime;
_this.todayWeek.SundayTime = _this.todayWeek.SundayTime - _this.weekDayTime;
} else {
_this.todayWeek.MondayTime = _this.todayWeek.MondayTime + _this.weekDayTime;
_this.todayWeek.SundayTime = _this.todayWeek.SundayTime + _this.weekDayTime;
}
_this.num = 0;
_this.todayWeek.Sunday = common.fmtDate(_this.todayWeek.SundayTime);
_this.todayWeek.Monday = common.fmtDate(_this.todayWeek.MondayTime);
// _this.semester = common.judgeDate(_this.todayWeek.SundayTime);
_this.studentCheckData(_this.todayWeek.Monday, _this.todayWeek.Sunday);
},
studentCheckData(start, end) {
// var studCheckList = $('.studCheckList');
let _this = this;
_this.LOADING('加载数据中…')
_this.HTTP_GET(
'learun/adms/timetable/StuLessonInfo', {
StartDate: start,
EndDate: end
},
'加载数据时出错'
).then(res => {
_this.HIDE_LOADING()
_this.semester = res.semester
// 回显日期
if (!start) {
_this.todayWeek.MondayTime = new Date(res.startDate).valueOf();
_this.todayWeek.SundayTime = new Date(res.endDate).valueOf() + _this.noClassTime;
_this.num = 0;
_this.todayWeek.Monday = common.fmtDate(_this.todayWeek.MondayTime);
_this.todayWeek.Sunday = common.fmtDate(_this.todayWeek.SundayTime);
}
console.log(res)
_this.dataArr.length = 0;
for(let j = 1; j < 8; j++){
let dataFlag = true;
var num = Math.floor(Math.random() * 100000000);
res.results.forEach((n, i) => {
if(n.week == j){
n.num = num;
_this.dataArr.push(n);
dataFlag = false;
return
}
})
if(dataFlag){
_this.dataArr.push({
week: j,
num: num,
weekList: []
});
}
})
if(dataFlag){
_this.dataArr.push({
week: j,
num: num,
weekList: []
});
}
}
})
},
liTap(ind) {
this.num = ind;
})
},
},
timeTap(num) {
let _this = this;
if (num == 1) {
_this.todayWeek.MondayTime = _this.todayWeek.MondayTime - _this.weekDayTime;
_this.todayWeek.SundayTime = _this.todayWeek.SundayTime - _this.weekDayTime;
} else {
_this.todayWeek.MondayTime = _this.todayWeek.MondayTime + _this.weekDayTime;
_this.todayWeek.SundayTime = _this.todayWeek.SundayTime + _this.weekDayTime;
}
_this.todayWeek.Monday = common.fmtDate(_this.todayWeek.MondayTime);
_this.todayWeek.Sunday = common.fmtDate(_this.todayWeek.SundayTime);
_this.semester = common.judgeDate(_this.todayWeek.SundayTime);
_this.studentCheckData(_this.todayWeek.Monday, _this.todayWeek.Sunday);
created() {
this.user = this.GET_GLOBAL('loginUser');
this.init()
}
},
created() {
this.init()
}
};

};
</script>

<style lang="less" scoped>
* {
box-sizing: border-box;
}
.timeTable_sec1 {
padding: 14px 12px;
text-align: center;
background: #0075c4;
color: #94d4ff;
font-size: 0;
}
.tSec1Box > * {
display: inline-block;
vertical-align: middle;
}
.tSec1Line {
height: 13px;
width: 1px;
background: #94d4ff;
margin: 0 10px;
}
.tSec1Box {
font-size: 15px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
#semester2 {
margin-bottom: 10px;
}

#weekTime2 text {
margin: 0 10px;
}
.tSec1Box > text {
width: auto;
text-align: center;
line-height: 22px;
}
.tSec1Box image {
width: 15px;
margin-right: 2px;
}

.tSec1Box text:after {
display: none;
}
.timeTable_sec2 {
margin-bottom: 30px;
}
.tSec2Top2 {
padding: 0 12px;
background: #0075c4;
height: 55px;
text-align: center;
overflow: hidden;
}
.tSec2Top2 view {
width: 14.285714%;
float: left;
line-height: 18px;
padding: 9px 0 9px;
color: #fff;
font-size: 13px;
border-right: 1px solid #1084d2;
border-top: 1px solid #1084d2;
}
.tSec2Top2 view:first-child {
border-left: 1px solid #1084d2;
}
.tSec2Top2 view.active {
color: #0075c4;
background: #fff;
border-color: #fff;
}
.tSec2Top2 view text {
display: block;
}

.tSec2Top2 view text:first-child {
letter-spacing: 2px;
text-transform: uppercase;
}
.tSec2Box2 {
background: #fff;
}

.studCheckLi {
border-bottom: 1px solid #d5eaf7;
padding: 8px 12px;
font-size: 15px;
}
.studCheckT {
font-size: 15px;
color: #6e6e6e;
}
.studCheckT image {
width: 11px;
position: relative;
margin-right: 5px;
}
.studCheckTxt {
font-size: 13px;
color: #9d9e9e;
margin: 7px 0;
}
.studCheckTxt text {
// margin: 0 30px;
}
.studCheckTxt image {
width: 12px;
position: relative;
margin-right: 3px;
top: 1px;
}
.studCheckStatue {
font-size: 13px;
}
.studCheckStatue text {
display: inline-block;
width: 8px;
height: 8px;
position: relative;
margin-right: 5px;
vertical-align: middle;
top: -2px;
}
.studCheckStatue1 {
color: #0089fe;
}
.studCheckStatue1 text {
background: #0089fe;
}
.studCheckStatue2 {
color: #f2b60a;
}
.studCheckStatue2 text {
background: #f2b60a;
}
.studCheckStatue3 {
color: #e24545;
}
.studCheckStatue3 text {
background: #e24545;
}
.studCheckStatue4 {
color: #29cf41;
}
.studCheckStatue4 text {
background: #29cf41;
}
.noHtml {
height: 100%;
line-height: 60px;
text-align: center;
font-size: 14px;
}
* {
box-sizing: border-box;
}

.timeTable_sec1 {
padding: 14px 12px;
text-align: center;
background: #0075c4;
color: #94d4ff;
font-size: 0;
}

.tSec1Box>* {
display: inline-block;
vertical-align: middle;
}

.tSec1Line {
height: 13px;
width: 1px;
background: #94d4ff;
margin: 0 10px;
}

.tSec1Box {
font-size: 15px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

#semester2 {
margin-bottom: 10px;
}

#weekTime2 text {
margin: 0 10px;
}

.tSec1Box>text {
width: auto;
text-align: center;
line-height: 22px;
}

.tSec1Box image {
width: 15px;
margin-right: 2px;
}

.tSec1Box text:after {
display: none;
}

.timeTable_sec2 {
margin-bottom: 30px;
}

.tSec2Top2 {
padding: 0 12px;
background: #0075c4;
height: 55px;
text-align: center;
overflow: auto;
}

.tSec2TopUl {
width: 800px;
}

.tSec2TopLi {
width: 10%;
float: left;
line-height: 18px;
padding: 9px 0 9px;
color: #fff;
font-size: 13px;
border-right: 1px solid #1084d2;
border-top: 1px solid #1084d2;
}

.tSec2TopLi:first-child {
border-left: 1px solid #1084d2;
}

.tSec2TopLi.active {
color: #0075c4;
background: #fff;
border-color: #fff;
}

.tSec2TopLi text {
display: block;
}

.tSec2TopLi text:first-child {
letter-spacing: 2px;
text-transform: uppercase;
}

.tSec2Box2 {
background: #fff;
}

.studCheckLi {
border-bottom: 1px solid #d5eaf7;
padding: 8px 12px;
font-size: 15px;
}

.studCheckT {
font-size: 15px;
color: #6e6e6e;
}

.studCheckT image {
width: 11px;
position: relative;
margin-right: 5px;
}

.studCheckTxt {
font-size: 13px;
color: #9d9e9e;
margin: 7px 0;
}

.studCheckTxt text {
// margin: 0 30px;
}

.studCheckTxt image {
width: 12px;
position: relative;
margin-right: 3px;
top: 1px;
}

.studCheckStatue {
font-size: 13px;
}

.studCheckStatue text {
display: inline-block;
width: 8px;
height: 8px;
position: relative;
margin-right: 5px;
vertical-align: middle;
top: -2px;
}

.studCheckStatue1 {
color: #0089fe;
}

.studCheckStatue1 text {
background: #0089fe;
}

.studCheckStatue2 {
color: #f2b60a;
}

.studCheckStatue2 text {
background: #f2b60a;
}

.studCheckStatue3 {
color: #e24545;
}

.studCheckStatue3 text {
background: #e24545;
}

.studCheckStatue4 {
color: #29cf41;
}

.studCheckStatue4 text {
background: #29cf41;
}

.noHtml {
height: 100%;
line-height: 60px;
text-align: center;
font-size: 14px;
}
</style>

+ 32
- 25
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/leaveFrom.vue 查看文件

@@ -14,10 +14,10 @@
<l-input title="班级名称" placeholder="请填写班级名称" :value="queryData.ClassName" disabled right />
<l-input hidden title="课程号" placeholder="请填写课程号" :value="queryData.LessonNo" disabled right />
<l-input title="课程名称" placeholder="请填写课程名称" :value="queryData.LessonName" disabled right />
<l-input hidden title="课程类别码" placeholder="请填写课程类别码" :value="queryData.LessonSortNo" disabled right />
<l-input hidden title="课程类别码" placeholder="请填写课程类别码" :value="queryData.lessonSortNo" disabled right />
<l-input title="课程类别" placeholder="请填写课程类别" :value="queryData.LessonSortName" disabled right />
<l-input hidden title="教室码" placeholder="请填写教室码" :value="queryData.ClassRoomNo" disabled right />
<l-input hidden title="教室码" placeholder="请填写教室码" :value="queryData.classRoomNo" disabled right />
<l-input title="教室名称" placeholder="请填写教室名称" :value="queryData.ClassroomName" disabled right />
<l-input title="原上课日期" placeholder="请填写原上课日期" :value="queryData.LessonDate" disabled right />
<l-input title="上课时间" placeholder="请填写上课时间" :value="queryData.LessonTime" disabled right />
@@ -61,12 +61,12 @@ export default {
dataSource: '1',
dataSourceId: 'BaseUser,f_realname,f_userid'
},
LessonSortNo: {
lessonSortNo: {
type: 'select',
dataSource: '1',
dataSourceId: 'BaseUser,f_realname,f_userid'
},
ClassRoomNo: {
classRoomNo: {
type: 'select',
dataSource: '1',
dataSourceId: 'BaseUser,f_realname,f_userid'
@@ -77,8 +77,8 @@ export default {
MajorNo: [],
ClassNo: [],
LessonNo: [],
LessonSortNo: [],
ClassRoomNo: [],
lessonSortNo: [],
classRoomNo: [],
LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({ value: t.value, text: t.text }))
},
pageInfo: null,
@@ -99,9 +99,9 @@ export default {
ClassName: '',
LessonNo: '',
LessonName: '',
LessonSortNo: '',
lessonSortNo: '',
LessonSortName: '',
ClassRoomNo: '',
classRoomNo: '',
ClassroomName: '',
LessonDate: '',
LessonTime: '',
@@ -143,22 +143,24 @@ export default {
}));
}),
this.FETCH_DATASOURCE('CdLessonSort').then(data => {
// console.log(data)
this.dataSource.LessonSortNo = data.data.map(t => ({
console.log(data)
return this.dataSource.lessonSortNo = data.data.map(t => ({
text: t.lessonsortname,
value: t.lessonsortno
}));
}),
this.FETCH_DATASOURCE('ClassRoomInfo').then(data => {
// console.log(data)
this.dataSource.ClassRoomNo = data.data.map(t => ({
this.dataSource.classRoomNo = data.data.map(t => ({
text: t.classroomname,
value: t.classroomno
value: t.classRoomNo
}));
}),
() => {}
]);
]).then(res=>{
console.log(res)
});
this.userinfo = this.GET_GLOBAL('loginUser'); //获取登录信息
this.pageInfo = this.GET_PARAM(); //获取页面传递参数
@@ -170,12 +172,12 @@ export default {
this.HIDE_LOADING();
this.data = res;
// console.log(res)
this.queryData.AcademicYearNo = this.pageInfo.AcademicYear;
this.queryData.Semester = this.pageInfo.Semester;
this.queryData.AcademicYearNo = this.pageInfo.academicyear;
this.queryData.Semester = this.pageInfo.semester;
this.queryData.StuNo = res.StuNo;
this.queryData.StuName = res.StuName;
this.queryData.Grade = res.Grade;
this.queryData.EmpNo = res.EmpNo;
this.queryData.EmpNo = this.pageInfo.empno;
this.queryData.DeptNo = res.DeptNo;
this.queryData.DeptName = this.displayListItem(res, 'DeptNo');
this.queryData.MajorNo = res.MajorNo;
@@ -185,16 +187,18 @@ export default {
this.queryData.Remark = res.Remark;
this.queryData.LeaveType = '1';
this.queryData.LessonNo = this.pageInfo.LessonNo;
this.queryData.LessonName = this.displayListItem(this.pageInfo, 'LessonNo');
this.queryData.LessonNo = this.pageInfo.lessonNo;
// this.queryData.LessonName = this.displayListItem(this.pageInfo, 'LessonNo');
this.queryData.LessonName =this.pageInfo.curriculum;
this.queryData.lessonSortNo = this.pageInfo.lessonSortNo;
this.queryData.LessonSortName = this.displayListItem(this.pageInfo, 'lessonSortNo');
this.queryData.LessonSortNo = this.pageInfo.LessonSortNo;
this.queryData.LessonSortName = this.displayListItem(this.pageInfo, 'LessonSortNo');
this.queryData.classRoomNo = this.pageInfo.classRoomNo;
// this.queryData.ClassroomName = this.displayListItem(this.pageInfo, 'classRoomNo');
this.queryData.ClassroomName = this.pageInfo.classRoom;
this.queryData.ClassRoomNo = this.pageInfo.ClassRoomNo;
this.queryData.ClassroomName = this.displayListItem(this.pageInfo, 'ClassRoomNo');
this.queryData.LessonDate = this.pageInfo.LessonDate;
this.queryData.LessonTime = this.pageInfo.LessonTime;
this.queryData.LessonDate = this.pageInfo.lessonDate;
this.queryData.LessonTime = this.pageInfo.lessonTime;
// console.log(res);
// console.log(this.pageInfo);
console.log(this.queryData);
@@ -220,7 +224,10 @@ export default {
displayListItem(item, field) {
const fieldItem = this.scheme[field];
const value = item[field];
switch (fieldItem.type) {
case 'currentInfo':
case 'organize':


+ 2
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/list.vue 查看文件

@@ -186,7 +186,8 @@
return courseCateByDay;
},
classTap(data) {
return ""
// return ""
console.log(data)
let _this = this;
// console.log(_this.user)
if (_this.user.Description == "教师") {


Loading…
取消
儲存