diff --git a/src/assets/css/electron.css b/src/assets/css/electron.css index 60ae875..a675bd9 100644 --- a/src/assets/css/electron.css +++ b/src/assets/css/electron.css @@ -246,7 +246,7 @@ img { } .img-box {margin: 3.5rem 4.375rem 0px 4.0625rem;position: relative;} /* .swiper-container{border-radius: 10px;border: 5px solid #9c7cfa;height: 460px;} */ -.home-swiper {border-radius: 0.625rem;border: 0.3125rem solid #9c7cfa;height: 29.125rem;} +.home-swiper {border-radius: 0.625rem;border: 0.3125rem solid #9c7cfa;height: 29.125rem;background-color: #000000;} .swiper-pagination {position: absolute;left: 50%;transform: translateX(-60%);bottom: 7.5rem;} .home-slide{height: 29.125rem;overflow: hidden;} .home-slide img{object-fit: cover;width: 100%;height: 100%;} diff --git a/src/components/attendanceDetail.vue b/src/components/attendanceDetail.vue index af3ed8b..f4cc2cf 100644 --- a/src/components/attendanceDetail.vue +++ b/src/components/attendanceDetail.vue @@ -36,6 +36,12 @@ attendanceBabuDetail }, name: 'babyActivity', + props:{ + current:{ + type:Number, + default:0 + } + }, data() { return { navArr:[ @@ -72,9 +78,25 @@ if(this.$storage.get('network')){ this.showLoading = true; this.stuIndex = e; - this.checkResult = this.babyArr[e].CheckResult; + let stuguid = ''; + if(this.type==0) { + this.checkResult = this.babyList1[e].CheckResult; + stuguid = this.babyList1[e].StuGuid; + } else if(this.type==1){ + this.checkResult = this.babyList2[e].CheckResult; + stuguid = this.babyList2[e].StuGuid; + } else if(this.type==2){ + this.checkResult = this.babyList3[e].CheckResult; + stuguid = this.babyList3[e].StuGuid; + } else if(this.type==3){ + this.checkResult = this.babyList4[e].CheckResult; + stuguid = this.babyList4[e].StuGuid; + } else if(this.type==4){ + this.checkResult = this.babyList5[e].CheckResult; + stuguid = this.babyList5[e].StuGuid; + } // 获取当前学生信息 - this.getupdatestudentlistEv(this.babyArr[e].StuGuid); + this.getupdatestudentlistEv(stuguid); } else { this.showError = true; } @@ -100,6 +122,7 @@ async checkAttendanceNum(){ if(this.$storage.get('network')){ this.showError = false; + console.log(this.type); let data = await this.$axios({ // 调用 serviceAPI url: this.$https.getstudentattendanceinfo, @@ -144,8 +167,8 @@ this.$storage.set('babyList5',this.babyList5); // this.$storage.set('cunArr',this.cunArr); } else { - this.babyArr = []; - this.$storage.set('babyArr',this.babyArr); + // this.babyArr = []; + // this.$storage.set('babyArr',this.babyArr); } } else { this.navArr[0].num = this.$storage.get('num0'); @@ -168,7 +191,7 @@ // 获取 async getupdatestudentlistEv(Guid){ if(this.$storage.get('network')){ - this.getuserattendanceinfoEv(this.babyArr[this.stuIndex].StuGuid); + this.getuserattendanceinfoEv(Guid); let data = await this.$axios({ // 调用 serviceAPI url:this.$https.getupdatestudentlist, @@ -201,6 +224,8 @@ }, }, mounted() { + this.navIndex = this.current; + this.type = this.current; // 获取出勤数据 this.checkAttendanceNum(); } diff --git a/src/components/babyActivity.vue b/src/components/babyActivity.vue index 69a4ec4..0d76d83 100644 --- a/src/components/babyActivity.vue +++ b/src/components/babyActivity.vue @@ -27,12 +27,12 @@
- - @@ -354,7 +354,7 @@ } }, touchMonthEv(){ - if(this.monthObj!=''){ + if(this.monthObj!='' && this.monthObj!=undefined){ this.isMonth = true; } else { this.monthText = '查询数据为空'; @@ -517,16 +517,10 @@ ); if(data.data.data!=undefined){ this.dayArr = data.data.data.list; - // this.teatherArr = data.data.data.Teachers; - // this.className = data.data.data.ClassName; this.$storage.set('dayArr',this.dayArr); - // this.$storage.set('teatherArracti',this.teatherArr); - // this.$storage.set('classNameactu',this.className); } } else { this.dayArr = this.$storage.get('dayArr'); - // this.teatherArr = this.$storage.get('teatherArracti'); - // this.className = this.$storage.get('classNameactu'); } }, // 月计划 @@ -553,8 +547,6 @@ } } else { this.monthObj = this.$storage.set('monthObj',this.monthObj); - // this.teatherArr = this.$storage.get('teatherArracti'); - // this.className = this.$storage.get('classNameactu'); } }, }, diff --git a/src/components/header.vue b/src/components/header.vue index b2044d1..56a1331 100644 --- a/src/components/header.vue +++ b/src/components/header.vue @@ -7,8 +7,9 @@
@@ -38,13 +39,13 @@ - + - + @@ -116,6 +117,7 @@ data() { return { titleArr: ['首页', '幼儿园介绍', '宝宝活动', '出勤详情', '宝宝相册', '疫情防控'], + className:'',//班级名称 activeIndex: 0, cunIndex: 0, modeArr: [{ @@ -153,7 +155,8 @@ ver: 0, s: '', newwidth:document.body.clientWidth, - newheight:document.body.clientHeight + newheight:document.body.clientHeight, + currentIndex:0 } }, // metaInfo: { @@ -164,6 +167,11 @@ // ], // }, methods: { + numEv(e){ + // console.log(e,168); + this.chooseTitle(3); + this.currentIndex = e; + }, // 关闭欢迎模式 closeWellcome() { this.wellcomeFlag = false; @@ -424,6 +432,7 @@ let serial = Build.SERIAL; this.$storage.set('EquipmentID',Build.SERIAL); // this.$storage.set('EquipmentID','B520P2RXM0'); + // this.$storage.set('EquipmentID','ZSX100873'); this.classCardId = this.$storage.get('EquipmentID'); this.weatherEv(); this.introduce(); @@ -468,6 +477,7 @@ if (this.$storage.get('network')) { this.showError = false; this.logoImg = this.$storage.get('logoImg'); + this.className = this.$storage.get('className'); let data = await this.$axios({ // 调用 serviceAPI url: this.$https.mechanism, @@ -479,9 +489,12 @@ if (data.data.data != undefined) { this.logoImg = data.data.data.Img_Url; this.$storage.set('logoImg', this.logoImg); + this.className = data.data.data.OrganName; + this.$storage.set('className', this.className); } } else { this.logoImg = this.$storage.get('logoImg'); + this.className = this.$storage.get('className'); } }, }, diff --git a/src/components/homepage.vue b/src/components/homepage.vue index bb9a42b..907b8a8 100644 --- a/src/components/homepage.vue +++ b/src/components/homepage.vue @@ -19,7 +19,7 @@
-
+
{{item.num}}
{{item.title}}
@@ -78,12 +78,13 @@
班级动态
- + + -
+
@@ -202,7 +203,8 @@ classCardId:'', diffHeight:'', isNotice:false, - classTimer:null//班级人数心跳事件 + classTimer:null,//班级人数心跳事件 + videoSrc:''//视频地址 }; }, destroyed() { @@ -214,6 +216,43 @@ clearInterval(this.classTimer); }, methods: { + // 获取班级动态视频或图片列表 + async getVideo(){ + if(this.$storage.get('network')){ + let data = await this.$axios({ + // 调用 serviceAPI + url: this.$https.getVideo, + methods: "GET", + params: { + EquipmentID: this.$storage.get('EquipmentID') + }, + }); + if(data.data.data.VideoUrls!=undefined){ + this.videoSrc = data.data.data.VideoUrls; + this.$storage.set('videoSrc',this.videoSrc); + } + if(data.data.data.PictureUrls.length){ + this.classImgArr = data.data.data.PictureUrls; + this.$storage.set('classImgArr',this.classImgArr); + } + } else { + if(this.$storage.get('videoSrc')!=undefined){ + this.videoSrc = this.$storage.get('videoSrc'); + } + if(this.$storage.get('classImgArr')!=undefined){ + this.classImgArr = this.$storage.get('classImgArr'); + } + } + this.showLoading_four = false; + }, + // 跳转 + chooseIndex(index){ + let current = ''; + if(index==0) current = 1; + if(index==1) current = 3; + if(index==2) current = 4; + this.$emit('numEv',current) + }, // 手指滑动事件 touchEv(){ this.isNotice = true; @@ -358,14 +397,14 @@ EquipmentID: this.$storage.get('EquipmentID') }, }); - if(data.data.data!=null){ - this.classImgArr = data.data.data.PictureUrls; - this.$storage.set('classImgArr',this.classImgArr); - } + // if(data.data.data!=null){ + // this.classImgArr = data.data.data.PictureUrls; + // this.$storage.set('classImgArr',this.classImgArr); + // } } else { - if(this.$storage.get('classImgArr')!=undefined){ - this.classImgArr = this.$storage.get('classImgArr'); - } + // if(this.$storage.get('classImgArr')!=undefined){ + // this.classImgArr = this.$storage.get('classImgArr'); + // } } this.showLoading_four = false; }, @@ -499,6 +538,8 @@ },1000*60) setTimeout(()=>{ this.plusReady(); + // 视频 + this.getVideo(); },500) setTimeout(()=>{ this.timer = setInterval(()=>{ diff --git a/src/config.js b/src/config.js index dc8254f..8bb83ff 100644 --- a/src/config.js +++ b/src/config.js @@ -32,6 +32,7 @@ const url = { getMonth:host + '/api/kindergarten/course_term_run/getdatalistbyorgguid',//月计划 // getDay:host + '/api/kindergarten/course_term_run/getweektermist',//周计划 getDay:host + '/api/kindergarten/course_term_run/getweekplan',//周计划 + getVideo:host + '/api/admin/electronicclasscard/getpicurlsnew',//首页视频 } diff --git a/static/img/home/logo01.png b/static/img/home/logo01.png new file mode 100644 index 0000000..8a4186f Binary files /dev/null and b/static/img/home/logo01.png differ