完善设备id,网络监听

master
chen 2022-01-08 17:37:07 +08:00
parent 9ec2bd6b74
commit 481c483043
16 changed files with 1350 additions and 187 deletions

View File

@ -53,30 +53,39 @@ img {
padding: 0 60px;
}
.header-box .logo-box {
display: flex;
justify-content: center;
align-items: center;
background: url(../../../static/img/home/logo-bottom.png) no-repeat;
background-size: 100% 100%;
width: 177px;
height: 162px;
margin-left: 16%;
margin-top: 20px;
/* display: flex; */
/* justify-content: center; */
/* align-items: center; */
/* background: url(../../../static/img/home/logo-bottom.png) no-repeat; */
/* background-size: 100% 100%; */
/* width: 177px; */
max-width: 500px;
/* height: 162px; */
/* margin-left: 16%; */
/* margin-top: 20px; */
margin-right: 3%;
}
.header-box .logo {
display: flex;
justify-content: center;
/* justify-content: center; */
/* justify-content: space-between; */
align-items: center;
flex-direction: column;
/* flex-direction: column; */
max-width: 430px;
}
.logo img {
width: 76px;
/* object-fit: cover; */
min-width: 76px;
height: 76px;
border-radius: 100%;
background-color: #9c7cfa;
margin-right: 10px;
}
.logo div {
color: #b7cc56;
font-size: 12.5px;
margin-top: 6px;
/* font-size: 12.5px; */
/* margin-top: 6px; */
flex-shrink: 0;
}
.header-box .title-box {
display: flex;
@ -236,10 +245,12 @@ img {
height: 767px;
}
.img-box {
margin: 76px 83px 0px 74px;
margin: 64px 76px 0px 72px;
position: relative;}
.swiper-pagination {position: absolute;left: 50%;transform: translateX(-60%);bottom: 120px;z-index: -1;}
.home-slide{height: 430px;}
/* .swiper-container{border-radius: 10px;border: 5px solid #9c7cfa;height: 460px;} */
.home-swiper {border-radius: 10px;border: 5px solid #9c7cfa;height: 460px;}
.swiper-pagination {position: absolute;left: 50%;transform: translateX(-60%);bottom: 120px;}
.home-slide{height: 445px;overflow: hidden;}
.swiper-pagination .swiper-pagination-bullet {margin: 0 6px;}
.swiper-pagination .swiper-pagination-bullet-active {background-color: #9c7cfa;}
.remind-box {display: flex;justify-content: center;margin-top: -30px;}
@ -253,14 +264,14 @@ img {
display: inline-block;
width: 390px;
/* height: 900px; */
height:767px;
height:800px;
flex-shrink: 0;
background: url(../../../static/img/home/right-back.png) no-repeat;
background-size: 100% 100%;
}
.img-box img{
position: relative;
z-index: -1;
overflow: hidden;
}
.right-content {color: #7557CC;text-align: center;
height: 90%;
@ -319,7 +330,7 @@ overflow: hidden;overflow-y: scroll;}
font-size: 36px;
margin: 0;
/* height: 66px; */
height: 56px;
height: 60px;
display: flex;
align-items: center;
flex-shrink: 0;
@ -350,7 +361,8 @@ overflow: hidden;overflow-y: scroll;}
background-color: #f7f7f7;
border-radius: 0px 0px 15px 15px;
padding: 7px;
margin-top: 5px;
/* margin-top: 5px; */
margin-top: 0px;
}
.baby-content-box::-webkit-scrollbar {
display: none;
@ -590,6 +602,7 @@ overflow: hidden;overflow-y: scroll;}
font-weight: bold;
color: #3F3F3F;
text-align: center;
height: 31px;
}
.yiqing-content {
height: 680px;
@ -700,7 +713,7 @@ overflow: hidden;overflow-y: scroll;}
.attenddetail-ring{display: flex;width: 100%;margin-left: 40px;font-size: 16px;color: #666666;}
.top-row {display: flex;align-items: center;}
.attenddetail-ring >div{margin-right: 90px;}
.attenddetail-ring >div{margin-right: 70px;}
.attenddetail-ring >div div:last-child{margin-top: 20px;}
.attendance-con{
font-size: 16px;
@ -711,10 +724,15 @@ overflow: hidden;overflow-y: scroll;}
margin-top: 15px;
margin-bottom: 78px;
}
.attendance-con:last-child{
margin-bottom: 0;
}
.attendance-jian-item{width: 50%;margin-bottom: 20px;padding-bottom: 20px; border-bottom: 1px solid #d3d3d3;}
.attendance-jian-item:nth-last-child(1),.attendance-jian-item:nth-last-child(2){border-bottom: 1px solid #FFFFFF;}
.baby-img01{width: 119px;height: 119px;background: #D3D3D3;border: 5px solid #ECE6FF;border-radius: 50%;object-fit: cover;}
.baby-img02{width: 245px;height: 154px;object-fit: cover; border-radius: 10px;display: flex;justify-content: center;align-items: center;background-color: #F3F3F3;margin-right: 20px;}
.attend-title {text-align: left;padding-right: 50px;width: 100%;}
.chengjian{display: flex;margin-top: 5px;font-size: 16px;color: #666666;}
.chengjian{display: flex;margin-top: 5px;font-size: 16px;color: #666666;justify-content: space-between;flex-wrap: wrap;}
.chengjian>div{display: flex;align-items: flex-end;width: 50%;line-height: 30px;}
.wellcome-img{position: fixed;z-index: 100;top: 0;left: 0;right: 0;bottom: 0;}
.erro-box{position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 9999999;display: flex;justify-content: center;align-items: center;background-color: #FFFFFF;}

1020
src/common.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<template>
<div style="width: 100%;">
<div class="yiqing-title attend-title">{{dataObj.First_Guarder}}</div>
<div class="yiqing-title attend-title">{{dataObj.StuName}}</div>
<img src="../../static/img/kindergartenIntroduce/icon-back.png" class="back-img" @click="backNews">
<div class="attendance-con">
<div class="top-row">
@ -12,10 +12,10 @@
</div>
<div class="flex-s0">
<div>生日{{dataObj.Born}}</div>
<div>考勤卡{{dataObj.IdCarld}}</div>
<div>考勤卡{{dataObj.AttendanceNum}}</div>
</div>
<div class="flex-s0">
<div>家长{{dataObj.Relation}} {{dataObj.StuName}}</div>
<div>家长{{dataObj.Relation}} {{dataObj.First_Guarder}}</div>
<div>电话号码{{dataObj.First_GuarderTel}}</div>
</div>
</div>
@ -24,32 +24,32 @@
<div class="yiqing-title attend-title">今日晨检考勤</div>
<div class="attendance-con">
<div class="chengjian" v-if="dataArr.length!=0">
<!-- <div v-for="(item,index) in dataArr" :key="index">
<div v-for="(item,index) in dataArr" :key="index" class="attendance-jian-item">
<img v-if="item.CheckDate!=null || item.CheckTime!=null" class="baby-img02" :src="dataObj.Head_Img" >
<div v-else class="baby-img02" >
<img src="../../static/img/attendancedetail/icon-wu.png" style="width: 156px;height: 106px;" >
</div>
<div>
<div v-if="item.CheckType=='OnDuty'"></div>
<div v-else></div>
<div v-if="item.CheckType=='OnDuty'"></div>
<div v-else></div>
<div v-if="item.CheckType=='OnDuty'">
<div v-if="item.CheckDate!=null">{{item.CheckDate}}</div>
<div v-if="item.CheckDate!=null">{{item.CheckFullTime}}</div>
<div v-else></div>
</div>
<div v-else>
<div v-if="item.CheckTime!=null">{{item.CheckTime}}</div>
<div v-if="item.CheckTime!=null">{{item.CheckFullTime}}</div>
<div v-else></div>
</div>
</div>
</div> -->
<div>
</div>
<!-- <div>
<img v-if="dataArr[0].CheckDate!=null" class="baby-img02" :src="dataObj.Head_Img" >
<div v-else class="baby-img02" >
<img src="../../static/img/attendancedetail/icon-wu.png" style="width: 156px;height: 106px;" >
</div>
<div>
<div>时间</div>
<div v-if="dataArr[0].CheckDate!=null">{{dataArr[0].CheckDate}}</div>
<div>时间</div>
<div v-if="dataArr[0].CheckDate!=null">{{dataArr[0].CheckFullTime}}</div>
<div v-else></div>
</div>
</div>
@ -59,11 +59,11 @@
<img src="../../static/img/attendancedetail/icon-wu.png" style="width: 156px;height: 106px;" >
</div>
<div>
<div>时间</div>
<div v-if="dataArr[1].CheckDate!=null">{{dataArr[0].CheckDate}}</div>
<div>时间</div>
<div v-if="dataArr[1].CheckDate!=null">{{dataArr[1].CheckFullTime}}</div>
<div v-else></div>
</div>
</div>
</div> -->
</div>
<div class="chengjian" v-else>
<div>
@ -71,7 +71,7 @@
<img src="../../static/img/attendancedetail/icon-wu.png" style="width: 156px;height: 106px;" >
</div>
<div>
<div>时间</div>
<div>时间</div>
<div>暂无数据展示</div>
</div>
</div>
@ -80,12 +80,16 @@
<img src="../../static/img/attendancedetail/icon-wu.png" style="width: 156px;height: 106px;" >
</div>
<div>
<div>时间</div>
<div>时间</div>
<div>暂无数据展示</div>
</div>
</div>
</div>
</div>
<div v-if="checkResult==4">
<div class="yiqing-title attend-title">请假原因</div>
<div class="attendance-con">{{dataObj.Contents}}</div>
</div>
</div>
</template>
@ -96,7 +100,7 @@
dataObj:{
type:Object,
default:()=>{
return ''
return {}
}
},
dataArr:{
@ -104,6 +108,10 @@
default:()=>{
return []
}
},
checkResult:{
type:Number,
default:0
}
},
data() {
@ -121,7 +129,7 @@
url: this.$https.getuserattendanceinfo,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
UserGuid
},
});

View File

@ -13,15 +13,15 @@
<div v-if="!showDetail" style="display: flex;flex-wrap: wrap;">
<div v-if="isNothing" class="attendance-right-item-box" @click="goDetail(index)" v-for="(item,index) in babyArr" :key="index">
<img :src="item.Head_Img" alt="">
<span>{{item.DisplayName}}</span>
<div :style="{background:['#9C7CFA','#FF9393','#D3D3D3','#F4B52F'][item.CheckResult]}">{{['正常','未到校','离校','请假'][item.CheckResult]}}</div>
<span>{{item.StuName}}</span>
<div :style="{background:['','#9C7CFA','#D3D3D3','#FF9393','#F4B52F'][item.CheckResult]}">{{['','正常','离校','未到校','请假'][item.CheckResult]}}</div>
</div>
<div v-if="!isNothing" class="nothing-box">
<img src="../../static/img/attendancedetail/icon-nothing.png">
<div>{{['没有出勤','暂无离校','暂无未到校','没有请假'][navIndex]}}的宝宝</div>
</div>
</div>
<attendanceBabuDetail v-if="showDetail" :dataObj="dataObj" @backNews="backNews" :dataArr="dataArr"></attendanceBabuDetail>
<attendanceBabuDetail v-if="showDetail" :dataObj="dataObj" @backNews="backNews" :dataArr="dataArr" :checkResult="checkResult"></attendanceBabuDetail>
<loading :isShow="showLoading"></loading>
</div>
</div>
@ -51,7 +51,8 @@
dataArr:[],
stuIndex:0,
showLoading:true,
showError:false
showError:false,
checkResult:''
}
},
methods: {
@ -62,6 +63,7 @@
if(this.$storage.get('network')){
this.showLoading = true;
this.stuIndex = e;
this.checkResult = this.babyArr[e].CheckResult;
//
this.getupdatestudentlistEv(this.babyArr[e].StuGuid);
} else {
@ -74,10 +76,14 @@
},
chooseNavEv(e){
this.navIndex = e;
let newType = 0;
if(e==1) newType = 2;
if(e==2) newType = 3;
if(e==3) newType = 4;
if(e==0){
this.babyArr = this.cunArr;
} else {
this.babyArr = this.cunArr.filter(item=>item.CheckResult===e);
this.babyArr = this.cunArr.filter(item=>item.CheckResult===newType);
}
this.babyArr.length ? this.isNothing = true : this.isNothing = false
this.showDetail = false;
@ -91,14 +97,18 @@
url: this.$https.getstudentattendanceinfo,
methods: "get",
params: {
EquipmentGuid: "yaohaotest001"
EquipmentGuid: this.$storage.get('EquipmentID')
},
});
if(data.data.data!=undefined){
let leftInfo = data.data.data;
//
this.navArr[0].num = leftInfo.outSchoolNum + leftInfo.notSchoolNum + leftInfo.leaveSchoolNum;
//
this.navArr[1].num = leftInfo.outSchoolNum;
//
this.navArr[2].num = leftInfo.notSchoolNum;
//
this.navArr[3].num = leftInfo.leaveSchoolNum;
this.babyArr = leftInfo.list;
this.cunArr = leftInfo.list;

View File

@ -20,6 +20,7 @@
<div v-for="(item,index) in teatherArr" :key="index">
<img :src="item.AvatarUrl" >
<span>{{item.TeacherName}}</span>
<!-- <label @click="goDetail(index)" style="font-size: 14px;margin-top: 10px;color: #9c7cfa;">查看详情</label> -->
</div>
</div>
</div>
@ -37,8 +38,10 @@
</div>
<!-- 右侧 -->
<div class="class-main-right">
<div v-if="!showDetail">
<div class="class-left-title">
<div class="pultitle" >宝宝课表第{{weekNum}}{{dateTime}}</div>
<!-- <div class="pultitle" >宝宝课表第{{weekNum}}{{dateTime}}</div> -->
<div class="pultitle" >宝宝课表第{{weekNum}}</div>
</div>
<div class="baby-content-box">
<div class="time-title-box">
@ -65,11 +68,19 @@
<loading :isShow="showLoading_right"></loading>
</div>
</div>
<div v-if="showDetail" style="background-color: #FFFFFF;border: 3px solid #7240c5;width: 100%;height: 100%;border-radius: 20px;overflow: hidden;">
<teacherStyleDetail :teacherInfo="teacherInfo" @backstyle="backstyle"></teacherStyleDetail>
</div>
</div>
</div>
</div>
</template>
<script>
import teacherStyleDetail from '@/components/teacherStyleDetail.vue';
export default {
components:{
teacherStyleDetail
},
name: 'babyActivity',
data() {
return {
@ -83,10 +94,47 @@
dangArr:[],
timer:null,
showLoading_right:true,
showError:false
showError:false,
showDetail:false,
teacherInfo:{}
}
},
methods: {
//
goDetail(e){
if(this.$storage.get('network')){
this.teacherInfo = this.teatherArr[e];
console.log(this.teatherArr[e]);
// this.showLoading = true;
this.getteachers_demeanor_detailEv(this.teacherInfo.TeacherGuid);
} else {
this.showError = true;
}
},
//
backstyle(){
this.showDetail = false;
},
async getteachers_demeanor_detailEv(guid) {
console.log(guid,'guid');
if(this.$storage.get('network')){
let data = await this.$axios({
// serviceAPI
url: this.$https.getteachers_demeanor_detail,
methods: "get",
params: {
Guid:guid,
OrgGuid:this.$storage.get('orgGuid')
},
});
this.teacherInfo = data.data.data;
this.$storage.set('teacherInfo',this.teacherInfo);
} else {
this.teacherInfo = this.$storage.get('teacherInfo');
}
this.showDetail = true;
// this.showLoading = false;
},
closeError(){
this.showError = false;
},
@ -98,7 +146,7 @@
url: this.$https.getbabycourse,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
},
});
if(data.data.data!=undefined){
@ -131,7 +179,7 @@
url: this.$https.schedulingWeb,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
},
});
if(data.data.data!=undefined){
@ -158,7 +206,7 @@
url: this.$https.classStatus,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
},
});
if(data.data.data!=undefined){

View File

@ -6,7 +6,7 @@
<div v-if="!showDetail" class="babyalbum-box">
<div v-if="isNothing" class="babyalbum-item-box" @click="goDetail(index)" v-for="(item,index) in babyArr" :key="index">
<img :src="item.Head_Img" alt="">
<span>{{item.StuName}}的相册</span>
<span>{{item.StuName}}</span>
<div :style="{background:'#9C7CFA'}">{{item.PhotoCount}}张图</div>
</div>
<div v-if="!isNothing" class="nothing-box" style="width: 100%;">
@ -60,7 +60,7 @@
url: this.$https.babyphoto,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
},
});
if(data.data.data!=undefined){

View File

@ -39,7 +39,7 @@
paginationClickable: true,
autoplay: 3000,
autoplayDisableOnInteraction: false,
loop: true,
// loop: true,
coverflow: {
rotate: 0,//
stretch: 140,

View File

@ -5,8 +5,11 @@
<!-- logo -->
<div class="logo-box">
<div class="logo">
<img src="../../static/img/home/logo.png">
<div>都江堰市机关幼儿园</div>
<img v-if="logoImg!=''" :src="logoImg" style="object-fit: cover;">
<div style="display: flex;flex-direction: column;">
<span style="font-size: 33.8px;">都江堰市机关幼儿园</span>
<span style="font-size: 16px;">DOU JANG YAN JI GUAN YOU ER YUAN</span>
</div>
</div>
</div>
<!-- 文本导航 -->
@ -76,7 +79,6 @@
控制操作
<div class="refresh-btn" @click="refreshEv"></div>
<div class="back-btn" @click="backHomeEv"></div>
<div>{{newnaem}}</div>
</div>
</div>
<img v-if="wellcomeFlag" @click="closeWellcome" src="../../static/img/babyalbum/wellcome-baby.png" class="wellcome-img" >
@ -107,7 +109,7 @@
name: 'v-header',
data() {
return {
titleArr: ['首页', '幼儿园介绍', '宝宝活动', '出勤详情', '宝宝相册', '疫情管理'],
titleArr: ['首页', '幼儿园介绍', '宝宝活动', '出勤详情', '宝宝相册', '疫情防控'],
activeIndex: 0,
cunIndex:0,
modeArr: [{
@ -124,7 +126,7 @@
},
],
modeIndex:'-1',
wellcomeFlag:false,
wellcomeFlag:false,//
onLine: navigator.onLine,
list: [],
city: '',
@ -138,8 +140,7 @@
isNetwork:false,
weather:'',
OrgGuid:'',
newnaem:'',
monitorTimer:null
logoImg:'',
}
},
methods: {
@ -179,13 +180,12 @@
type
} = e;
this.onLine = type === 'online';
if (this.onLine) {
this.refreshEv();
this.weatherEv();
this.isNetwork = false;
} else {
this.isNetwork = true;
// this.isNetwork = true;
}
},
//
@ -219,7 +219,7 @@
url: this.$https.weather,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
},
});
if(data.data.code==200) {
@ -340,34 +340,33 @@
url: this.$https.classcardById,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
},
});
let modeObj = data.data.data;
if(modeObj!=null){
this.clearChoose();
if(modeObj.Mode==1){
this.modeArr[0].isActive = true;
this.wellcomeFlag = true;
this.$storage.set('modeArr0',this.modeArr[0].isActive);
} else if(modeObj.Mode==2 || modeObj.Mode==0){
this.modeArr[1].isActive = true;
this.$storage.set('modeArr1',this.modeArr[1].isActive);
this.wellcomeFlag = false;
} else if(modeObj.Mode==4){
this.modeArr[2].isActive = true;
this.$storage.set('modeArr2',this.modeArr[2].isActive);
this.wellcomeFlag = false;
window.location.href = `./averydaydata/wisdomMedic.html`;
}
this.$storage.set('wellcomeFlag',this.wellcomeFlag);
} else {
this.modeArr[1].isActive = true;
}
} else {
this.modeArr[0].isActive = this.$storage.get('modeArr0');
this.modeArr[1].isActive = this.$storage.get('modeArr1');
this.modeArr[2].isActive = this.$storage.get('modeArr2');
this.modeArr[1].isActive = true;
if(this.$storage.get('wellcomeFlag')!=undefined){
this.wellcomeFlag = this.$storage.get('wellcomeFlag');
}
}
},
//
@ -387,73 +386,81 @@
},
// (id)
obtainEv(){
// mobile-detect
var MobileDetect = require('../utils/mobile-detect.js');
//
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
// console.log("");
} else {
// console.log("");
}
var device_type = navigator.userAgent; //userAgent
var md = new MobileDetect(navigator.userAgent);
var os = md.os(); //
var model = "";
if (os == "iOS") { //ios
model = md.mobile();
} else if (os == "AndroidOS") { //Android
var sss = device_type.split(";");
model = sss[2].substring(0, sss[2].indexOf("Build/"));
}
this.$storage.set('EquipmentID',model);
this.weatherEv();
this.introduce();
this.classcardByIdEv();
setTimeout(()=>{
setInterval(()=>{
this.classcardByIdEv();
},1000*180)
// window.addEventListener('online', this.updateOnlineStatus); //
// window.addEventListener('offline', this.updateOnlineStatus); //
},1000*60)
},
plusReady(){
var that = this;
//
// this.$storage.set('EquipmentID',plus.device.imei);
this.$storage.set('EquipmentID','yaohaotest001');
that.obtainEv();
if(plus.networkinfo.getCurrentType()!=1){
that.$storage.set('network',true);
that.onLine = true;
} else {
that.onLine = false;
}
//
// window.addEventListener('online', this.updateOnlineStatus); //
// window.addEventListener('offline', this.updateOnlineStatus); //
//
document.addEventListener( "netchange", function() {
document.addEventListener( "netchange", function(res) {
var network = plus.networkinfo.getCurrentType();
if(network == 1) {
// that.isNetwork = true;
that.$storage.set('network',false);
that.isNetwork = true;
that.onLine = false;
that.monitorEv();
plus.nativeUI.toast('您的网络已断开');
// plus.nativeUI.toast('');
}else {
that.activeIndex = '-1';
setTimeout(()=>{
that.activeIndex = that.cunIndex;
},100)
that.isNetwork = false;
that.onLine = true;
that.obtainEv();
that.$storage.set('network',true);
clearInterval(that.monitorTimer);
plus.nativeUI.toast('您的网络已连接');
that.obtainEv();
that.onLine = true;
// plus.nativeUI.toast('');
}
})
},
monitorEv(){
this.monitorTimer = setInterval(()=>{
this.plusReady();
},3000)
// logo
async introduce() {
if(this.$storage.get('network')){
this.showError = false;
let data = await this.$axios({
// serviceAPI
url: this.$https.mechanism,
methods: "get",
params: {
EquipmentID: this.$storage.get('EquipmentID'),
},
});
if(data.data.data!=undefined){
this.logoImg = data.data.data.Img_Url;
this.$storage.set('logoImg',this.logoImg);
}
} else {
this.logoImg = this.$storage.get('logoImg');
}
},
},
mounted() {
this.obtainEv();
var that = this;
that.obtainEv();
if (window.plus) {
that.plusReady();
} else {
document.addEventListener("plusready", that.plusReady, false);
}
setTimeout(()=>{
that.plusReady();
},1000)
}
}
</script>

View File

@ -2,7 +2,7 @@
<div>
<error-page v-if="showError" @closeError="closeError"></error-page>
<!-- 主体内容 -->
<div v-if="!showError" class="main-box">
<div class="main-box" v-else>
<!-- 左侧 -->
<div class="main-left">
<!-- 班级详情 -->
@ -31,7 +31,7 @@
<div class="left-one flex-s0">
<div class="left-content">
<div class="left-title">
<div class="pultitle">宝宝食谱</div>
<div class="pultitle">今日食谱</div>
</div>
<div v-if="threeMeals.length!=0">
<div class="eat-three">
@ -58,11 +58,11 @@
<div class="pultitle">通知公告</div>
</div>
<div class="second-title">{{className}}</div>
<div class="line" v-if="noticeObj!=''"></div>
<div class="three-content left-notice" v-if="noticeObj!=''">
<div class="line" v-if="noticeObj.Content!=''"></div>
<div class="three-content left-notice" v-if="noticeObj.Content!=''">
<div class="clips2">{{noticeObj.Content}}</div>
</div>
<div class="notice-time" v-if="noticeObj!=''">
<div class="notice-time" v-if="noticeObj.Content!=''">
<div>{{noticeObj.PublishTime}}</div>
<div><img src="../../static/img/home/slices.png" />{{noticeObj.BroweTotal}}</div>
</div>
@ -76,7 +76,7 @@
<div class="center-img-box">
<div class="center-title">班级动态</div>
<div class="img-box">
<swiper :options="swiperOption" style="z-index: -1;position: relative;">
<swiper class="home-swiper" v-if="classImgArr.length" :options="swiperOption" style="position: relative;">
<swiper-slide v-for="(item,index) in classImgArr" :key="index" class="home-slide" style="">
<img :src="item" style="object-fit: cover;width: 100%;height: 100%;">
</swiper-slide>
@ -95,10 +95,6 @@
<div>宝宝提醒</div>
<div v-if="babyNotice!=0">{{babyNotice}}</div>
</div>
<div class="msg-box">
<div>生日提醒</div>
<div v-if="remindData!=0">{{remindData}}</div>
</div>
<div class="msg-box">
<div >生日提醒</div>
<div v-if="babyBirthdayData!=0">{{babyBirthdayData}}</div>
@ -143,7 +139,6 @@
noonArr: [],
moId:"",
model:"",
remindData:"",
className:'',//
teacherName:'',//
classNum:'',//
@ -154,7 +149,10 @@
showLoading_three:true,
showLoading_four:true,
showLoading_five:true,
noticeObj:'',
noticeObj:{
PublishTime:'',
Content:''
},
classGuid:'',
timer:null,
@ -172,7 +170,8 @@
slideShadows : true
  }
},
showError:false
showError:false,
monitorTimer:null
};
},
methods: {
@ -191,7 +190,7 @@
url: this.$https.babyRecipe,
methods: "get",
params: {
EquipmentID: "yaohaotest001"
EquipmentID: this.$storage.get('EquipmentID')
},
});
if(data.data.data!=undefined){
@ -199,8 +198,10 @@
this.$storage.set('threeMeals',this.threeMeals);
}
} else {
if(this.$storage.get('threeMeals')!=undefined){
this.threeMeals = this.$storage.get('threeMeals');
}
}
this.showLoading_two = false;
},
@ -212,7 +213,7 @@
url: this.$https.notice,
methods: "get",
params: {
EquipmentID: "yaohaotest001"
EquipmentID: this.$storage.get('EquipmentID')
},
});
if(data.data.data!=null){
@ -226,9 +227,11 @@
}
} else {
this.noticeData = this.$storage.get('noticeData');
if(this.$storage.get('noticeObj')!=undefined){
this.noticeObj = this.$storage.get('noticeObj');
this.noticeObj.PublishTime = this.$storage.get('PublishTime');
}
}
this.showLoading_three = false;
},
//
@ -239,7 +242,7 @@
url: this.$https.schedulingWeb,
methods: "get",
params: {
EquipmentID: "yaohaotest001"
EquipmentID: this.$storage.get('EquipmentID')
},
});
if(data.data.data!=undefined){
@ -264,7 +267,7 @@
url: this.$https.babyBirthday,
methods: "get",
params: {
EquipmentGuid: "yaohaotest001"
EquipmentGuid: this.$storage.get('EquipmentID')
},
});
this.babyBirthdayData = data.data.count;
@ -282,7 +285,7 @@
url: this.$https.dynamicPicture,
methods: "post",
params: {
EquipmentID: "yaohaotest001"
EquipmentID: this.$storage.get('EquipmentID')
},
});
if(data.data.data!=null){
@ -290,8 +293,10 @@
this.$storage.set('classImgArr',this.classImgArr);
}
} else {
if(this.$storage.get('classImgArr')!=undefined){
this.classImgArr = this.$storage.get('classImgArr');
}
}
this.showLoading_four = false;
},
//
@ -302,7 +307,7 @@
url: this.$https.classStatus,
methods: "get",
params: {
EquipmentID: "yaohaotest001"
EquipmentID: this.$storage.get('EquipmentID')
},
});
if(data.data.code==200){
@ -333,14 +338,23 @@
this.remindEv();
}
} else {
if(this.$storage.get('className')!=undefined){
this.className = this.$storage.get('className');
this.teacherName = this.$storage.get('teacherName');
this.classNum = this.$storage.get('classNum');
this.daoArr = this.$storage.get('daoArr');
this.classGuid = this.$storage.get('classGuid');
if(this.className==undefined){
} else {
this.showError = true;
}
if(this.$storage.get('teacherName')!=undefined){
this.teacherName = this.$storage.get('teacherName');
}
if(this.$storage.get('classNum')!=undefined){
this.classNum = this.$storage.get('classNum');
}
if(this.$storage.get('daoArr')!=undefined){
this.daoArr = this.$storage.get('daoArr');
}
if(this.$storage.get('classGuid')!=undefined){
this.classGuid = this.$storage.get('classGuid');
}
}
this.showLoading_one = false;
},
@ -352,7 +366,7 @@
url: this.$https.remind,
methods: "post",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
page:1,
limit:100,
ClassGuid:this.classGuid
@ -364,14 +378,60 @@
this.babyNotice = this.$storage.get('babyNotice');
}
},
plusReady(){
var that = this;
//
// this.$storage.set('EquipmentID',plus.device.imei);
this.$storage.set('EquipmentID','yaohaotest001');
if(plus.networkinfo.getCurrentType()!=1){
that.$storage.set('network',true);
}
this.requestEv();
//
// window.addEventListener('online', this.updateOnlineStatus); //
// window.addEventListener('offline', this.updateOnlineStatus); //
//
document.addEventListener( "netchange", function(res) {
var network = plus.networkinfo.getCurrentType();
if(network == 1) {
that.isNetwork = true;
that.$storage.set('network',false);
that.onLine = false;
// plus.nativeUI.toast('');
}else {
that.activeIndex = '-1';
setTimeout(()=>{
that.activeIndex = that.cunIndex;
},100)
that.isNetwork = false;
that.$storage.set('network',true);
that.onLine = true;
// plus.nativeUI.toast('');
}
})
},
mounted() {
requestEv(){
//
this.classStatusEv();
this.babyRecipeEv();
this.schedulingWeb();
this.babyBirthday();
this.dynamicPicture();
//
this.classStatusEv();
this.notice();
}
},
mounted() {
setTimeout(()=>{
this.plusReady();
},500)
let newTimer = setInterval(()=>{
if(this.$storage.get('network')){
setTimeout(()=>{
this.requestEv();
clearInterval(newTimer);
},1000)
}
},1000)
setTimeout(()=>{
this.timer = setInterval(()=>{
//
@ -385,14 +445,6 @@
},
destroyed(){
clearInterval(this.timer);
this.babyBirthday()
this.dynamicPicture()
//
this.classStatusEv();
},
created() {
this.notice();
},
};
</script>

View File

@ -71,7 +71,7 @@
url: this.$https.getnews,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
},
});
if(data.data.data!=undefined){
@ -106,7 +106,7 @@
url: this.$https.classnewsdetails,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
Guid:guid
},
});

View File

@ -59,7 +59,7 @@
url: this.$https.getnotice,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
},
});
if(data.data.data!=undefined){
@ -81,7 +81,7 @@
url: this.$https.classnewsdetails,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
Guid:guid
},
});

View File

@ -37,7 +37,7 @@
url: this.$https.mechanism,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
},
});
if(data.data.data!=undefined){

View File

@ -58,8 +58,7 @@
url: this.$https.getteachers_demeanor,
methods: "get",
params: {
// EquipmentID: this.$storage.get('EquipmentID'),
EquipmentID: "yaohaotest001",
EquipmentID: this.$storage.get('EquipmentID'),
},
});
if(data.data.data!=undefined){
@ -81,7 +80,6 @@
url: this.$https.getteachers_demeanor_detail,
methods: "get",
params: {
// EquipmentID: "yaohaotest001",
Guid:guid,
OrgGuid:this.$storage.get('orgGuid')
},

View File

@ -16,7 +16,7 @@
teacherInfo:{
type:Object,
default:()=>{
return ''
return {}
}
}
},

View File

@ -40,6 +40,7 @@
let cuo = yy_mm_dd.getTime() + '000';
let cuo1 = cuo.slice(0,7);
let cuo2 = cuo.slice(7);
console.log(cuo1,cuo2,storage.get('orgGuid'));
let data = await this.$axios.post(
// serviceAPI
'http://47.109.29.153:50014/api/kindergarten/epidemicmanagementinfo/getdatalistbyorgguid',
@ -71,6 +72,7 @@
},
},
mounted() {
this.getdatalistbyorgguidStyle();
}
}
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 KiB