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": { "dependencies": {
"axios": "^0.24.0", "axios": "^0.24.0",
"mobile-detect": "^1.4.5", "mobile-detect": "^1.4.5",
"static-extend": "^0.1.2",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-router": "^3.0.1" "vue-router": "^3.0.1"
}, },
@ -2316,6 +2317,14 @@
"run-queue": "^1.0.0" "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": { "node_modules/copy-webpack-plugin": {
"version": "4.6.0", "version": "4.6.0",
"resolved": "https://registry.npmmirror.com/copy-webpack-plugin/download/copy-webpack-plugin-4.6.0.tgz", "resolved": "https://registry.npmmirror.com/copy-webpack-plugin/download/copy-webpack-plugin-4.6.0.tgz",
@ -5658,8 +5667,7 @@
"node_modules/is-buffer": { "node_modules/is-buffer": {
"version": "1.1.6", "version": "1.1.6",
"resolved": "https://registry.nlark.com/is-buffer/download/is-buffer-1.1.6.tgz", "resolved": "https://registry.nlark.com/is-buffer/download/is-buffer-1.1.6.tgz",
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4="
"dev": true
}, },
"node_modules/is-callable": { "node_modules/is-callable": {
"version": "1.2.4", "version": "1.2.4",
@ -6978,6 +6986,84 @@
"node": ">=0.10.0" "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": { "node_modules/object-inspect": {
"version": "1.12.0", "version": "1.12.0",
"resolved": "https://registry.npmmirror.com/object-inspect/download/object-inspect-1.12.0.tgz", "resolved": "https://registry.npmmirror.com/object-inspect/download/object-inspect-1.12.0.tgz",
@ -11574,6 +11660,94 @@
"integrity": "sha1-UkKUktY8YuuYmATBFVLj0i53kwM=", "integrity": "sha1-UkKUktY8YuuYmATBFVLj0i53kwM=",
"dev": true "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": { "node_modules/statuses": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz", "resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz",
@ -15881,6 +16055,11 @@
"run-queue": "^1.0.0" "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": { "copy-webpack-plugin": {
"version": "4.6.0", "version": "4.6.0",
"resolved": "https://registry.npmmirror.com/copy-webpack-plugin/download/copy-webpack-plugin-4.6.0.tgz", "resolved": "https://registry.npmmirror.com/copy-webpack-plugin/download/copy-webpack-plugin-4.6.0.tgz",
@ -18675,8 +18854,7 @@
"is-buffer": { "is-buffer": {
"version": "1.1.6", "version": "1.1.6",
"resolved": "https://registry.nlark.com/is-buffer/download/is-buffer-1.1.6.tgz", "resolved": "https://registry.nlark.com/is-buffer/download/is-buffer-1.1.6.tgz",
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4="
"dev": true
}, },
"is-callable": { "is-callable": {
"version": "1.2.4", "version": "1.2.4",
@ -19744,6 +19922,67 @@
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true "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": { "object-inspect": {
"version": "1.12.0", "version": "1.12.0",
"resolved": "https://registry.npmmirror.com/object-inspect/download/object-inspect-1.12.0.tgz", "resolved": "https://registry.npmmirror.com/object-inspect/download/object-inspect-1.12.0.tgz",
@ -23570,6 +23809,76 @@
"integrity": "sha1-UkKUktY8YuuYmATBFVLj0i53kwM=", "integrity": "sha1-UkKUktY8YuuYmATBFVLj0i53kwM=",
"dev": true "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": { "statuses": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz", "resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz",

View File

@ -12,6 +12,7 @@
"dependencies": { "dependencies": {
"axios": "^0.24.0", "axios": "^0.24.0",
"mobile-detect": "^1.4.5", "mobile-detect": "^1.4.5",
"static-extend": "^0.1.2",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-router": "^3.0.1" "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 {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 img {width: 116px;height: 195px;margin-right: 36px;}
.nothing-box div {font-size: 24px;color: #3F3F3F;font-weight: bold;margin-top: 80px;} .nothing-box div {font-size: 24px;color: #3F3F3F;font-weight: bold;margin-top: 80px;}
.attendance-right>div{
width: 100%;
}
/* 宝宝相册 */ /* 宝宝相册 */
.babyalbum-box { .babyalbum-box {
padding: 35px 20px; padding: 35px 20px;
@ -575,6 +578,9 @@ img {
.baby-top-box img {width: 48px;height: 48px;} .baby-top-box img {width: 48px;height: 48px;}
.baby-name {font-size: 24px;font-weight: 800;color: #3F3F3F;} .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;} .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;} .baby-album-box > img {width: 58px;height: 58px;}
.introduce-img {display: flex;flex-wrap: wrap;} .introduce-img {display: flex;flex-wrap: wrap;}
.introduce-img img {margin: 10px 10px 0 0;} .introduce-img img {margin: 10px 10px 0 0;}
@ -625,4 +631,4 @@ img {
.meal-box div {font-size: 14px;line-height: 24px;} .meal-box div {font-size: 14px;line-height: 24px;}
.notice-time { margin-top: 10px;font-size: 14px;} .notice-time { margin-top: 10px;font-size: 14px;}
.main-center{width: auto;} .main-center{width: auto;}
} }

View File

@ -58,16 +58,32 @@
}, },
data() { data() {
return { return {
getuserattendanceinfoData:"",
} }
}, },
methods: { 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(){ backNews(){
this.$emit('backNews',false); this.$emit('backNews',false);
} }
}, },
mounted() { mounted() {
this.getuserattendanceinfo()
} }
} }
</script> </script>

View File

@ -10,7 +10,7 @@
</div> </div>
<div class="attendance-right"> <div class="attendance-right">
<div v-if="!showDetail" style="display: flex;flex-wrap: wrap;"> <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=""> <img :src="item.Head_Img" alt="">
<span>{{item.DisplayName}}</span> <span>{{item.DisplayName}}</span>
<div :style="{background:['#9C7CFA','#FF9393','#D3D3D3','#F4B52F'][item.CheckResult]}">{{['正常','未到校','离校','请假'][item.CheckResult]}}</div> <div :style="{background:['#9C7CFA','#FF9393','#D3D3D3','#F4B52F'][item.CheckResult]}">{{['正常','未到校','离校','请假'][item.CheckResult]}}</div>
@ -50,7 +50,7 @@
}, },
methods: { methods: {
goDetail(e){ goDetail(e){
console.log(e); localStorage.Id=e
this.showDetail = true; this.showDetail = true;
}, },
// //
@ -83,6 +83,7 @@
this.navArr[2].num = leftInfo.notSchoolNum; this.navArr[2].num = leftInfo.notSchoolNum;
this.navArr[3].num = leftInfo.leaveSchoolNum; this.navArr[3].num = leftInfo.leaveSchoolNum;
this.babyArr = leftInfo.list; this.babyArr = leftInfo.list;
this.cunArr = leftInfo.list; this.cunArr = leftInfo.list;
}, },
// //

View File

@ -14,7 +14,7 @@
<div class="swiper-container"> <div class="swiper-container">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item,index) in babyalbumList" :key="index" style="display: flex;justify-content: center;"> <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> </div>
</div> </div>
@ -100,6 +100,6 @@
width: 690px; width: 690px;
height: 515px; height: 515px;
background-color: #F5F5F5; 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> </style>

View File

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

View File

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