master
tangyi 2021-12-27 17:34:37 +08:00
parent 5b13e3dc14
commit 36e6fcd678
8 changed files with 661 additions and 255 deletions

317
package-lock.json generated
View File

@ -10,6 +10,7 @@
"dependencies": {
"axios": "^0.24.0",
"mobile-detect": "^1.4.5",
"static-extend": "^0.1.2",
"vue": "^2.5.2",
"vue-router": "^3.0.1"
},
@ -2316,6 +2317,14 @@
"run-queue": "^1.0.0"
}
},
"node_modules/copy-descriptor": {
"version": "0.1.1",
"resolved": "https://registry.nlark.com/copy-descriptor/download/copy-descriptor-0.1.1.tgz",
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/copy-webpack-plugin": {
"version": "4.6.0",
"resolved": "https://registry.npmmirror.com/copy-webpack-plugin/download/copy-webpack-plugin-4.6.0.tgz",
@ -5658,8 +5667,7 @@
"node_modules/is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.nlark.com/is-buffer/download/is-buffer-1.1.6.tgz",
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=",
"dev": true
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4="
},
"node_modules/is-callable": {
"version": "1.2.4",
@ -6978,6 +6986,84 @@
"node": ">=0.10.0"
}
},
"node_modules/object-copy": {
"version": "0.1.0",
"resolved": "https://registry.nlark.com/object-copy/download/object-copy-0.1.0.tgz",
"integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
"dependencies": {
"copy-descriptor": "^0.1.0",
"define-property": "^0.2.5",
"kind-of": "^3.0.3"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-copy/node_modules/define-property": {
"version": "0.2.5",
"resolved": "https://registry.nlark.com/define-property/download/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"dependencies": {
"is-descriptor": "^0.1.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-copy/node_modules/is-accessor-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"dependencies": {
"kind-of": "^3.0.2"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-copy/node_modules/is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"dependencies": {
"kind-of": "^3.0.2"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-copy/node_modules/is-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.nlark.com/is-descriptor/download/is-descriptor-0.1.6.tgz",
"integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=",
"dependencies": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
"kind-of": "^5.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": {
"version": "5.1.0",
"resolved": "https://registry.nlark.com/kind-of/download/kind-of-5.1.0.tgz",
"integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-copy/node_modules/kind-of": {
"version": "3.2.2",
"resolved": "https://registry.nlark.com/kind-of/download/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dependencies": {
"is-buffer": "^1.1.5"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-inspect": {
"version": "1.12.0",
"resolved": "https://registry.npmmirror.com/object-inspect/download/object-inspect-1.12.0.tgz",
@ -11574,6 +11660,94 @@
"integrity": "sha1-UkKUktY8YuuYmATBFVLj0i53kwM=",
"dev": true
},
"node_modules/static-extend": {
"version": "0.1.2",
"resolved": "https://registry.nlark.com/static-extend/download/static-extend-0.1.2.tgz",
"integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
"dependencies": {
"define-property": "^0.2.5",
"object-copy": "^0.1.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/static-extend/node_modules/define-property": {
"version": "0.2.5",
"resolved": "https://registry.nlark.com/define-property/download/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"dependencies": {
"is-descriptor": "^0.1.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/static-extend/node_modules/is-accessor-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"dependencies": {
"kind-of": "^3.0.2"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": {
"version": "3.2.2",
"resolved": "https://registry.nlark.com/kind-of/download/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dependencies": {
"is-buffer": "^1.1.5"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/static-extend/node_modules/is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"dependencies": {
"kind-of": "^3.0.2"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": {
"version": "3.2.2",
"resolved": "https://registry.nlark.com/kind-of/download/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dependencies": {
"is-buffer": "^1.1.5"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/static-extend/node_modules/is-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.nlark.com/is-descriptor/download/is-descriptor-0.1.6.tgz",
"integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=",
"dependencies": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
"kind-of": "^5.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/static-extend/node_modules/kind-of": {
"version": "5.1.0",
"resolved": "https://registry.nlark.com/kind-of/download/kind-of-5.1.0.tgz",
"integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/statuses": {
"version": "1.5.0",
"resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz",
@ -15881,6 +16055,11 @@
"run-queue": "^1.0.0"
}
},
"copy-descriptor": {
"version": "0.1.1",
"resolved": "https://registry.nlark.com/copy-descriptor/download/copy-descriptor-0.1.1.tgz",
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
},
"copy-webpack-plugin": {
"version": "4.6.0",
"resolved": "https://registry.npmmirror.com/copy-webpack-plugin/download/copy-webpack-plugin-4.6.0.tgz",
@ -18675,8 +18854,7 @@
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.nlark.com/is-buffer/download/is-buffer-1.1.6.tgz",
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=",
"dev": true
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4="
},
"is-callable": {
"version": "1.2.4",
@ -19744,6 +19922,67 @@
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
},
"object-copy": {
"version": "0.1.0",
"resolved": "https://registry.nlark.com/object-copy/download/object-copy-0.1.0.tgz",
"integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
"requires": {
"copy-descriptor": "^0.1.0",
"define-property": "^0.2.5",
"kind-of": "^3.0.3"
},
"dependencies": {
"define-property": {
"version": "0.2.5",
"resolved": "https://registry.nlark.com/define-property/download/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
},
"is-accessor-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"requires": {
"kind-of": "^3.0.2"
}
},
"is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"requires": {
"kind-of": "^3.0.2"
}
},
"is-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.nlark.com/is-descriptor/download/is-descriptor-0.1.6.tgz",
"integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=",
"requires": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
"kind-of": "^5.0.0"
},
"dependencies": {
"kind-of": {
"version": "5.1.0",
"resolved": "https://registry.nlark.com/kind-of/download/kind-of-5.1.0.tgz",
"integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0="
}
}
},
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.nlark.com/kind-of/download/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
}
}
},
"object-inspect": {
"version": "1.12.0",
"resolved": "https://registry.npmmirror.com/object-inspect/download/object-inspect-1.12.0.tgz",
@ -23570,6 +23809,76 @@
"integrity": "sha1-UkKUktY8YuuYmATBFVLj0i53kwM=",
"dev": true
},
"static-extend": {
"version": "0.1.2",
"resolved": "https://registry.nlark.com/static-extend/download/static-extend-0.1.2.tgz",
"integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
"requires": {
"define-property": "^0.2.5",
"object-copy": "^0.1.0"
},
"dependencies": {
"define-property": {
"version": "0.2.5",
"resolved": "https://registry.nlark.com/define-property/download/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
},
"is-accessor-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.nlark.com/kind-of/download/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
}
}
},
"is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.nlark.com/kind-of/download/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
}
}
},
"is-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.nlark.com/is-descriptor/download/is-descriptor-0.1.6.tgz",
"integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=",
"requires": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
"kind-of": "^5.0.0"
}
},
"kind-of": {
"version": "5.1.0",
"resolved": "https://registry.nlark.com/kind-of/download/kind-of-5.1.0.tgz",
"integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0="
}
}
},
"statuses": {
"version": "1.5.0",
"resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz",

View File

@ -12,6 +12,7 @@
"dependencies": {
"axios": "^0.24.0",
"mobile-detect": "^1.4.5",
"static-extend": "^0.1.2",
"vue": "^2.5.2",
"vue-router": "^3.0.1"
},

View File

@ -432,6 +432,9 @@ img {
.nothing-box {width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;box-sizing: border-box;}
.nothing-box img {width: 116px;height: 195px;margin-right: 36px;}
.nothing-box div {font-size: 24px;color: #3F3F3F;font-weight: bold;margin-top: 80px;}
.attendance-right>div{
width: 100%;
}
/* 宝宝相册 */
.babyalbum-box {
padding: 35px 20px;
@ -575,6 +578,9 @@ img {
.baby-top-box img {width: 48px;height: 48px;}
.baby-name {font-size: 24px;font-weight: 800;color: #3F3F3F;}
.baby-album-box {padding: 97px 0 126px 0;height: 100%; display: flex;align-items: center;justify-content: space-between;box-sizing: border-box;position: relative;}
.babyalbum-detail-box .swiper-container{
padding: 20px 0px;
}
.baby-album-box > img {width: 58px;height: 58px;}
.introduce-img {display: flex;flex-wrap: wrap;}
.introduce-img img {margin: 10px 10px 0 0;}
@ -625,4 +631,4 @@ img {
.meal-box div {font-size: 14px;line-height: 24px;}
.notice-time { margin-top: 10px;font-size: 14px;}
.main-center{width: auto;}
}
}

View File

@ -58,16 +58,32 @@
},
data() {
return {
getuserattendanceinfoData:"",
}
},
methods: {
async getuserattendanceinfo() {
let UserGuid=""
UserGuid=localStorage.Id
let data = await this.$axios({
// serviceAPI
url: this.$https.getuserattendanceinfo,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
UserGuid
},
});
console.log(data.data,"1232");
},
backNews(){
this.$emit('backNews',false);
}
},
mounted() {
this.getuserattendanceinfo()
}
}
</script>

View File

@ -10,7 +10,7 @@
</div>
<div class="attendance-right">
<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">
<div v-if="!isNothing" class="attendance-right-item-box" @click="goDetail(item.StuGuid)" 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>
@ -50,7 +50,7 @@
},
methods: {
goDetail(e){
console.log(e);
localStorage.Id=e
this.showDetail = true;
},
//
@ -83,6 +83,7 @@
this.navArr[2].num = leftInfo.notSchoolNum;
this.navArr[3].num = leftInfo.leaveSchoolNum;
this.babyArr = leftInfo.list;
this.cunArr = leftInfo.list;
},
//

View File

@ -14,7 +14,7 @@
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item,index) in babyalbumList" :key="index" style="display: flex;justify-content: center;">
<img :src="item.Url" style="width: 100%;object-fit: cover">
<img class="boxS" :src="item.Url" style="width: 100%;object-fit: cover">
</div>
</div>
</div>
@ -100,6 +100,6 @@
width: 690px;
height: 515px;
background-color: #F5F5F5;
box-shadow: 10px 10px 10px 10px rgba(134, 105, 220, 0.2);
box-shadow: 0 10px 20px rgba(195, 174, 255,0.7);;
}
</style>

View File

@ -1,247 +1,314 @@
<template>
<div>
<!-- 头部导航 start -->
<div class="header-box">
<!-- logo -->
<div class="logo-box">
<div class="logo">
<img src="../../static/img/home/logo.png">
<div>都江堰市机关幼儿园</div>
</div>
</div>
<!-- 文本导航 -->
<div class="title-box">
<div class="title-item" :class="activeIndex==index?activeTitle:''" v-for="(item,index) in titleArr"
:key="index" @click="chooseTitle(index)">{{item}}</div>
</div>
<!-- 天气 -->
<div class="weather-box">
<img :src="weather" style="margin-right: 10px;">
<div>
<div style="color: #FF9393;">{{date}}</div>
<div class="weather-three">
<div>{{temperature}}</div>
<div>{{time}}</div>
<div>{{week}}</div>
</div>
</div>
</div>
<!-- 功能图标 -->
<div><img @click="clickFun" src="../../static/img/home/icon-set.png"></div>
</div>
<!-- 头部导航 end -->
<!-- 首页 -->
<homepage v-if="activeIndex==0"></homepage>
<!-- 幼儿园介绍 -->
<kindIntroduction v-if="activeIndex==1"></kindIntroduction>
<!-- 宝宝活动 -->
<babyActivity v-if="activeIndex==2"></babyActivity>
<!-- 出勤详情 -->
<attendanceDetail v-if="activeIndex==3"></attendanceDetail>
<!-- 宝宝相册 -->
<babyAlbum v-if="activeIndex==4"></babyAlbum>
<!-- 疫情管理 -->
<yiqingmanagement v-if="activeIndex==5"></yiqingmanagement>
<!-- 底部 -->
<div class="footer">
<img src="../../static/img/home/foot-icon.png">
<img v-if="activeIndex==1" src="../../static/img/kindergartenIntroduce/chahua-01.png" >
<img v-if="activeIndex==2" src="../../static/img/home/baby-foot.png">
<img v-if="activeIndex==3" src="../../static/img/attendancedetail/chah.png">
<img v-if="activeIndex==4 || activeIndex==5" src="../../static/img/babyalbum/chah.png">
</div>
<!-- 网络弹框 -->
<div v-if="isNetwork" class="popu-box">
<div class="item-row">班排设备ID*******</div>
<div class="item-row">网络链接状态网络监测{{onLine?'已连接':'已断开'}}<img v-if="onLine"
src="../../static/img/home/icon-link.png" style="width: 20px;"></div>
<div class="item-row">
<span style="flex-shrink: 0;">班牌显示模式</span>
<div class="mode-box">
<div v-for="(item,index) in modeArr" :key="index" @click="chooseMode(index)">
<div class="radio-box">
<span v-if="item.isActive"></span>
</div>
{{item.title}}
</div>
</div>
</div>
<div class="item-row">
控制操作
<div class="refresh-btn" @click="refreshEv"></div>
<div class="back-btn" @click="backHomeEv"></div>
</div>
</div>
</div>
<div>
<!-- 头部导航 start -->
<div class="header-box">
<!-- logo -->
<div class="logo-box">
<div class="logo">
<img src="../../static/img/home/logo.png" />
<div>都江堰市机关幼儿园</div>
</div>
</div>
<!-- 文本导航 -->
<div class="title-box">
<div
class="title-item"
:class="activeIndex == index ? activeTitle : ''"
v-for="(item, index) in titleArr"
:key="index"
@click="chooseTitle(index)"
>
{{ item }}
</div>
</div>
<!-- 天气 -->
<div class="weather-box">
<img :src="weather" style="margin-right: 10px" />
<div>
<div style="color: #ff9393">{{ date }}</div>
<div class="weather-three">
<div>{{ temperature }}</div>
<div>{{ time }}</div>
<div>{{ week }}</div>
</div>
</div>
</div>
<!-- 功能图标 -->
<div>
<img @click="clickFun" src="../../static/img/home/icon-set.png" />
</div>
</div>
<!-- 头部导航 end -->
<!-- 首页 -->
<homepage v-if="activeIndex == 0"></homepage>
<!-- 幼儿园介绍 -->
<kindIntroduction v-if="activeIndex == 1"></kindIntroduction>
<!-- 宝宝活动 -->
<babyActivity v-if="activeIndex == 2"></babyActivity>
<!-- 出勤详情 -->
<attendanceDetail v-if="activeIndex == 3"></attendanceDetail>
<!-- 宝宝相册 -->
<babyAlbum v-if="activeIndex == 4"></babyAlbum>
<!-- 疫情管理 -->
<yiqingmanagement v-if="activeIndex == 5"></yiqingmanagement>
<!-- 底部 -->
<div class="footer">
<img src="../../static/img/home/foot-icon.png" />
<img
v-if="activeIndex == 1"
src="../../static/img/kindergartenIntroduce/chahua-01.png"
/>
<img v-if="activeIndex == 2" src="../../static/img/home/baby-foot.png" />
<img
v-if="activeIndex == 3"
src="../../static/img/attendancedetail/chah.png"
/>
<img
v-if="activeIndex == 4 || activeIndex == 5"
src="../../static/img/babyalbum/chah.png"
/>
</div>
<!-- 网络弹框 -->
<div v-if="isNetwork" class="popu-box">
<div class="item-row">班排设备ID*******</div>
<div class="item-row">
网络链接状态网络监测{{ onLine ? "已连接" : "已断开" }}<img
v-if="onLine"
src="../../static/img/home/icon-link.png"
style="width: 20px"
/>
</div>
<div class="item-row">
<span style="flex-shrink: 0">班牌显示模式</span>
<div class="mode-box">
<div
v-for="(item, index) in modeArr"
:key="index"
@click="chooseMode(index)"
>
<div class="radio-box">
<span v-if="item.isActive"></span>
</div>
{{ item.title }}
</div>
</div>
</div>
<div class="item-row">
控制操作
<div class="refresh-btn" @click="refreshEv"></div>
<div class="back-btn" @click="backHomeEv"></div>
</div>
</div>
</div>
</template>
<script>
//
import homepage from '@/components/homepage.vue';
//
import kindIntroduction from '@/components/kindIntroduction.vue';
//
import babyActivity from '@/components/babyActivity.vue';
//
import attendanceDetail from '@/components/attendanceDetail.vue';
//
import babyAlbum from '@/components/babyAlbum.vue';
//
import yiqingmanagement from '@/components/yiqingmanagement.vue';
export default {
components:{
homepage,
kindIntroduction,
babyActivity,
attendanceDetail,
babyAlbum,
yiqingmanagement
},
name: 'v-header',
data() {
return {
titleArr: ['首页', '幼儿园介绍', '宝宝活动', '出勤详情', '宝宝相册', '疫情管理'],
activeIndex: 0,
cunIndex:0,
modeArr: [{
isActive: true,
title: '欢迎模式'
},
{
isActive: false,
title: '班牌模式'
},
{
isActive: false,
title: '大数据模式'
},
],
onLine: navigator.onLine,
list: [],
city: '',
date: '', //2021-12-19
week: '', //
temperature: '', //
time: '', //
timer: null,
currentTemper:1,//
activeTitle: 'activeTitle',
isNetwork:false,
weather:''
}
},
methods: {
//
chooseMode(e) {
this.modeArr.forEach(item => {
item.isActive = false
})
this.modeArr[e].isActive = true;
},
//
chooseTitle(e) {
this.cunIndex = this.activeIndex = e;
e == 0 ? this.activeTitle = 'activeTitle' : this.activeTitle = 'activeTitle2';
},
//
updateOnlineStatus(e) {
const {
type
} = e;
this.onLine = type === 'online';
if (this.onLine) {
this.weatherEv();
}
},
//
// weatherEv() {
// //
// this.dateEv();
// this.timer = setInterval(() => {
// this.dateEv();
// }, 1000)
// var that = this;
// this.$axios.get('http://wthrcdn.etouch.cn/weather_mini?city=' + '').then((res) => {
// let weatherList = res.data.data.forecast;
// //
// this.week = weatherList[0].date.slice(weatherList[0].date.indexOf('') + 1);
// //
// this.temperature = `${weatherList[0].low.slice(2,-1)} -${weatherList[0].high.slice(2)}`
// }).catch((err) => {
// console.log(err);
// })
// },
//
async weatherEv() {
let data = await this.$axios({
// serviceAPI
url: this.$https.weather,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
},
});
console.log(data.data.data);
if(data.data.code==200) {
//
this.dateEv();
this.timer = setInterval(() => {
this.dateEv();
}, 1000)
//
this.week = data.data.data.week;
let newtempera = data.data.data.weather.result.forecasts[0];
//
this.temperature = `${newtempera.low}-${newtempera.high}°C`;
}
},
//
dateEv() {
let date = new Date();
//
let year = date.getFullYear();
//
let month = date.getMonth() + 1;
//
let day = date.getDate();
this.date = `${year}-${month}-${day}`;
//
let hour = date.getHours();
//
let minute = date.getMinutes();
//
this.time = `${hour < 10 ? '0'+hour : hour}:${minute < 10 ? '0'+minute : minute}`;
},
//
clickFun(){
this.isNetwork = true;
},
refreshEv(){
this.activeIndex = '-1';
setTimeout(()=>{
this.activeIndex = this.cunIndex;
this.isNetwork = false;
},100)
},
backHomeEv(){
this.activeIndex = '-1';
setTimeout(()=>{
this.activeIndex = 0;
this.isNetwork = false;
},100)
},
},
mounted() {
this.weather = require(`../../static/img/weather/2.png`);
this.weatherEv();
window.addEventListener('online', this.updateOnlineStatus); //
window.addEventListener('offline', this.updateOnlineStatus); //
}
}
//
import homepage from "@/components/homepage.vue";
//
import kindIntroduction from "@/components/kindIntroduction.vue";
//
import babyActivity from "@/components/babyActivity.vue";
//
import attendanceDetail from "@/components/attendanceDetail.vue";
//
import babyAlbum from "@/components/babyAlbum.vue";
//
import yiqingmanagement from "@/components/yiqingmanagement.vue";
export default {
components: {
homepage,
kindIntroduction,
babyActivity,
attendanceDetail,
babyAlbum,
yiqingmanagement,
},
name: "v-header",
data() {
return {
titleArr: [
"首页",
"幼儿园介绍",
"宝宝活动",
"出勤详情",
"宝宝相册",
"疫情管理",
],
activeIndex: 0,
cunIndex: 0,
modeArr: [
{
isActive: true,
title: "欢迎模式",
},
{
isActive: false,
title: "班牌模式",
},
{
isActive: false,
title: "大数据模式",
},
],
onLine: navigator.onLine,
list: [],
city: "",
date: "", //2021-12-19
week: "", //
temperature: "", //
time: "", //
timer: null,
currentTemper: 1, //
activeTitle: "activeTitle",
isNetwork: false,
weather: "",
};
},
methods: {
//
chooseMode(e) {
this.modeArr.forEach((item) => {
item.isActive = false;
});
this.modeArr[e].isActive = true;
},
//
chooseTitle(e) {
this.cunIndex = this.activeIndex = e;
e == 0
? (this.activeTitle = "activeTitle")
: (this.activeTitle = "activeTitle2");
},
//
updateOnlineStatus(e) {
const { type } = e;
this.onLine = type === "online";
if (this.onLine) {
this.weatherEv();
}
},
//
// weatherEv() {
// //
// this.dateEv();
// this.timer = setInterval(() => {
// this.dateEv();
// }, 1000)
// var that = this;
// this.$axios.get('http://wthrcdn.etouch.cn/weather_mini?city=' + '').then((res) => {
// let weatherList = res.data.data.forecast;
// //
// this.week = weatherList[0].date.slice(weatherList[0].date.indexOf('') + 1);
// //
// this.temperature = `${weatherList[0].low.slice(2,-1)} -${weatherList[0].high.slice(2)}`
// }).catch((err) => {
// console.log(err);
// })
// },
//
async weatherEv() {
let data = await this.$axios({
// serviceAPI
url: this.$https.weather,
methods: "get",
params: {
EquipmentID: "yaohaotest001",
},
});
console.log(data.data.data);
if (data.data.code == 200) {
//
this.dateEv();
this.timer = setInterval(() => {
this.dateEv();
}, 1000);
//
this.week = data.data.data.week;
let newtempera = data.data.data.weather.result.forecasts[0];
//
this.temperature = `${newtempera.low}-${newtempera.high}°C`;
let text = data.data.data.weather.result.now.text;
if (
text == "阵雨" ||
text == "小雨" ||
text == "中雨" ||
text == "大雨" ||
text == "暴雨" ||
text == "大暴雨" ||
text == "特大暴雨" ||
text == "小雨转中雨" ||
text == "中雨转大雨" ||
text == "大雨转暴雨" ||
text == "暴雨转大暴雨" ||
text == "大暴雨转特大暴雨"
) {
this.weather = require(`../../static/img/weather/2.png`); //
} else if (text == "阴") {
this.weather = require(`../../static/img/weather/1.png`); //
} else if (text == "多云") {
this.weather = require(`../../static/img/weather/3.png`); //
} else if (text == "雷阵雨" || text == "雷阵雨伴有冰雹") {
this.weather = require(`../../static/img/weather/4.png`); //
} else if (text == "晴") {
this.weather = require(`../../static/img/weather/5.png`); //
} else if (
text == "雨夹雪" ||
text == "小雪" ||
text == "中雪" ||
text == "大雪" ||
text == "暴雪"
) {
this.weather = require(`../../static/img/weather/9.png`); //
}
}
// if () {
// }
},
//
dateEv() {
let date = new Date();
//
let year = date.getFullYear();
//
let month = date.getMonth() + 1;
//
let day = date.getDate();
this.date = `${year}-${month}-${day}`;
//
let hour = date.getHours();
//
let minute = date.getMinutes();
//
this.time = `${hour < 10 ? "0" + hour : hour}:${
minute < 10 ? "0" + minute : minute
}`;
},
//
clickFun() {
this.isNetwork = true;
},
refreshEv() {
this.activeIndex = "-1";
setTimeout(() => {
this.activeIndex = this.cunIndex;
this.isNetwork = false;
}, 100);
},
backHomeEv() {
this.activeIndex = "-1";
setTimeout(() => {
this.activeIndex = 0;
this.isNetwork = false;
}, 100);
},
},
mounted() {
this.weatherEv();
window.addEventListener("online", this.updateOnlineStatus); //
window.addEventListener("offline", this.updateOnlineStatus); //
},
};
</script>

View File

@ -6,6 +6,7 @@
<div class="main-left">
<!-- 班级详情 -->
<div class="left-one">
<div class="left-content" v-if="className!=''">
<div class="left-title">
<div class="pultitle">班级详情</div>
@ -124,6 +125,8 @@
babyBirthdayData: "",
dynamicPictureData: "",
noonArr: [],
moId:"",
model:"",
className:'',//
teacherName:'',//
classNum:'',//
@ -247,6 +250,7 @@
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
// this.is_telephone = "";
console.log("是手机");
} else {
// this.is_telephone = "";
console.log("不是手机");
@ -292,6 +296,8 @@
// this.device_network_type = networkType;
console.log(networkType, '网络类型');
var os = md.os(); //
this.moId= md.os()
var model = "";
if (os == "iOS") { //ios
model = md.mobile();
@ -303,7 +309,7 @@
}
}
console.log(model, '手机型号');
this.model=model
},
created() {
this.notice();