Browse Source

app 学生考勤打卡 教师考勤打卡修改

黑艺新账号
yxq 1 year ago
parent
commit
dd82bd9090
4 changed files with 47 additions and 41 deletions
  1. +20
    -21
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/list.vue
  2. +1
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/single.vue
  3. +25
    -18
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardStudent/list.vue
  4. +1
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardStudent/single.vue

+ 20
- 21
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/list.vue View File

@@ -150,12 +150,12 @@
// }else { // }else {
// this.imgsrc=dkred; // this.imgsrc=dkred;
// } // }
// 保存原打卡状态
this.resInfo = {
AttendanceType:this.info.AttendanceType,
AttendanceTypeString:this.info.AttendanceTypeString,
}
if (![5].includes(this.info.AttendanceType)) { if (![5].includes(this.info.AttendanceType)) {
// 保存原打卡状态,改为外勤
this.resInfo = {
AttendanceType:this.info.AttendanceType,
AttendanceTypeString:this.info.AttendanceTypeString,
}
this.$set(this.info, 'AttendanceType', 4) this.$set(this.info, 'AttendanceType', 4)
this.$set(this.info, 'AttendanceTypeString', '外勤打卡') this.$set(this.info, 'AttendanceTypeString', '外勤打卡')
this.$set(this.postData, 'AIsOut', 1) this.$set(this.postData, 'AIsOut', 1)
@@ -287,23 +287,24 @@
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
} }
.content { .content {
width: 48%;
width: 100%;
height: 50%; height: 50%;
position: absolute; position: absolute;
top: 15%; top: 15%;
left: 50%; left: 50%;
transform: translate(-50%, 10%); transform: translate(-50%, 10%);
text-align: center;
} }
.title { .title {
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
color: #333; color: #333;
margin-top: 8px; margin-top: 8px;
} }
.rules { .rules {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -311,33 +312,31 @@
padding: 15px; padding: 15px;
line-height: 24px; line-height: 24px;
} }
.rules>* { .rules>* {
width: 49%; width: 49%;
background-color: #BDE4FF; background-color: #BDE4FF;
padding: 8px; padding: 8px;
border-radius: 8px 12px; border-radius: 8px 12px;
} }
.rules>*>*:first-child { .rules>*>*:first-child {
color: #333; color: #333;
} }
#show { #show {
text-align: center; text-align: center;
height: 200rpx; height: 200rpx;
font-size: 56rpx; font-size: 56rpx;
} }
.pen { .pen {
// height: 48%;
width: 48%;
display: inline-block;
border-radius: 50%; border-radius: 50%;
background-color: #e7f5ff; background-color: #e7f5ff;
display: flex;
align-items: center;
justify-content: center;
} }
.pen2 { .pen2 {
width: 91%; width: 91%;
height: 91%; height: 91%;
@@ -347,7 +346,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.pen3 { .pen3 {
width: 84%; width: 84%;
height: 84%; height: 84%;
@@ -360,7 +359,7 @@
justify-content: center; justify-content: center;
color: #ffff; color: #ffff;
} }
.footer { .footer {
width: 100%; width: 100%;
position: fixed; position: fixed;
@@ -368,7 +367,7 @@
bottom: 0; bottom: 0;
overflow: hidden; overflow: hidden;
} }
.gray { .gray {
-webkit-filter: grayscale(100%); -webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%); -moz-filter: grayscale(100%);


+ 1
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/single.vue View File

@@ -130,7 +130,7 @@
console.log(postData) console.log(postData)
let strEntity = JSON.parse(postData.strEntity) let strEntity = JSON.parse(postData.strEntity)
let strEntity_ = {...strEntity,...this.params} let strEntity_ = {...strEntity,...this.params}
this.HTTP_POST('learun/adms/attendance/clockin', {strEntity:JSON.stringify(strEntity_)}, '打卡失败').then(success => {
this.HTTP_POST('learun/adms/attendance/clockin', JSON.stringify(strEntity_), '打卡失败').then(success => {
this.HIDE_LOADING() this.HIDE_LOADING()
if (!success) { if (!success) {
this.TOAST('打卡失败') this.TOAST('打卡失败')


+ 25
- 18
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardStudent/list.vue View File

@@ -15,7 +15,7 @@
下课 {{info.EndTime}} 下课 {{info.EndTime}}
</view> </view>
<view class=""> <view class="">
{{info.UserCloseTime?info.UserCloseTime.split(' ')[1]+' 打卡':'未打卡'}}
{{info.UserCloseTime?info.UserCloseTime.split(' ')[1]+' 打卡':'--'}}
</view> </view>
</view> </view>
</view> </view>
@@ -25,16 +25,20 @@
<img :class="{gray:info.AttendanceType != 1}" id="attimg" :src="imgsrc" alt="" width="100%"> <img :class="{gray:info.AttendanceType != 1}" id="attimg" :src="imgsrc" alt="" width="100%">
</view> </view>
<view class="title"> <view class="title">
<text>{{resInfo.AttendanceTypeString}}</text> <text>{{resInfo.AttendanceTypeString}}</text>
<text>{{postData.AIsOut== 1 ? ' | ' + info.AttendanceTypeString:''}}</text>
<text>{{postData.AIsOut == 1 ? ' | ' + info.AttendanceTypeString:''}}</text>
<view style="color: #666;"> <view style="color: #666;">
{{postData.ClockPlace}}
<view class="">
{{info.LessonSortNo == 1?'必修:':info.LessonSortNo == 2?'选修:':''}} {{info.LessonName}}
<view>
{{info.Classroom?'教室:'+info.Classroom:''}}
</view>
<view>
{{info.LessonName}} {{info.LessonSortNo == 1?'必修':info.LessonSortNo == 2?'选修':''}}
</view> </view>
<view class="">
教师:{{info.EmpName}}
<view>
{{info.EmpName?'教师:'+info.EmpName:''}}
</view>
<view>
{{postData.ClockPlace}}
</view> </view>
</view> </view>
</view> </view>
@@ -117,6 +121,10 @@
async action(type) { async action(type) {
switch (type) { switch (type) {
case 'dk': case 'dk':
if (this.info.UserWorkTime) {
this.TOAST('已打卡,不可再次打卡')
return
}
if ([5].includes(this.info.AttendanceType)) { if ([5].includes(this.info.AttendanceType)) {
return return
} }
@@ -161,12 +169,12 @@
// }else { // }else {
// this.imgsrc=dkred; // this.imgsrc=dkred;
// } // }
// 保存原打卡状态
this.resInfo = {
AttendanceType:this.info.AttendanceType,
AttendanceTypeString:this.info.AttendanceTypeString,
}
if (![5].includes(this.info.AttendanceType)) { if (![5].includes(this.info.AttendanceType)) {
// 保存原打卡状态,改为外勤
this.resInfo = {
AttendanceType:this.info.AttendanceType,
AttendanceTypeString:this.info.AttendanceTypeString,
}
this.$set(this.info, 'AttendanceType', 4) this.$set(this.info, 'AttendanceType', 4)
this.$set(this.info, 'AttendanceTypeString', '外勤打卡') this.$set(this.info, 'AttendanceTypeString', '外勤打卡')
this.$set(this.postData, 'AIsOut', 1) this.$set(this.postData, 'AIsOut', 1)
@@ -304,12 +312,13 @@
} }


.content { .content {
width: 48%;
width: 100%;
height: 50%; height: 50%;
position: absolute; position: absolute;
top: 15%; top: 15%;
left: 50%; left: 50%;
transform: translate(-50%, 10%); transform: translate(-50%, 10%);
text-align: center;
} }


.title { .title {
@@ -345,12 +354,10 @@
} }


.pen { .pen {
// height: 48%;
width: 48%;
display: inline-block;
border-radius: 50%; border-radius: 50%;
background-color: #e7f5ff; background-color: #e7f5ff;
display: flex;
align-items: center;
justify-content: center;
} }


.pen2 { .pen2 {


+ 1
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCardStudent/single.vue View File

@@ -130,7 +130,7 @@
console.log(postData) console.log(postData)
let strEntity = JSON.parse(postData.strEntity) let strEntity = JSON.parse(postData.strEntity)
let strEntity_ = {...strEntity,...this.params} let strEntity_ = {...strEntity,...this.params}
this.HTTP_POST('learun/adms/attendance/clockinStudent', {strEntity:JSON.stringify(strEntity_)}, '打卡失败').then(success => {
this.HTTP_POST('learun/adms/attendance/clockinStudent', JSON.stringify(strEntity_), '打卡失败').then(success => {
this.HIDE_LOADING() this.HIDE_LOADING()
if (!success) { if (!success) {
this.TOAST('打卡失败') this.TOAST('打卡失败')


Loading…
Cancel
Save