|
@@ -11,11 +11,11 @@
|
|
|
<div class="sushe_san"></div>
|
|
<div class="sushe_san"></div>
|
|
|
<div class="sushe">{{date}}</div>
|
|
<div class="sushe">{{date}}</div>
|
|
|
<!-- 滚动 -->
|
|
<!-- 滚动 -->
|
|
|
- <el-carousel trigger="click" height="240px" style="height: 240px;width: 830px;margin: 67px 0 0 19px;">
|
|
|
|
|
|
|
+ <el-carousel trigger="click" height="240px" style="height: 240px;width: 830px;margin: 67px 0 0 19px;" v-if="listLength>0">
|
|
|
<el-carousel-item v-for="(list,index) in studentList" :key="index">
|
|
<el-carousel-item v-for="(list,index) in studentList" :key="index">
|
|
|
<div class="gun">
|
|
<div class="gun">
|
|
|
<div class="mokuai" v-for="(item,index2) in list" :key="index2">
|
|
<div class="mokuai" v-for="(item,index2) in list" :key="index2">
|
|
|
- <img class="moimg" :src="item.pictureUrl">
|
|
|
|
|
|
|
+ <img class="moimg" :src="item.pictureUrl" @click="previewImage(item.pictureUrl)">
|
|
|
<div class="moyuan">入</div>
|
|
<div class="moyuan">入</div>
|
|
|
<div class="moname">{{item.name}}</div>
|
|
<div class="moname">{{item.name}}</div>
|
|
|
<div class="motime">15:25:26</div>
|
|
<div class="motime">15:25:26</div>
|
|
@@ -25,36 +25,78 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-carousel-item>
|
|
</el-carousel-item>
|
|
|
</el-carousel>
|
|
</el-carousel>
|
|
|
|
|
+ <div class="queshen" v-else>
|
|
|
|
|
+ <img src="../assets//index/queshen.png" class="queshen2">
|
|
|
|
|
+ <div class="queshen3">暂无数据</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="preview">
|
|
|
|
|
+ <img-preview :src="src" :onClick="closeImgPreview" :onKeydown="keydownCloseImgPreview"></img-preview>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import imgPreview from "../common/img-preview.vue";
|
|
|
export default {
|
|
export default {
|
|
|
name: 'centerButtom',
|
|
name: 'centerButtom',
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
studentList:[],//进出人员
|
|
studentList:[],//进出人员
|
|
|
- date:new Date().toISOString().slice(0, 10),//当前日期
|
|
|
|
|
|
|
+ date:'',//当前日期
|
|
|
|
|
+ yestDay:'',//昨天
|
|
|
build:'',//楼栋
|
|
build:'',//楼栋
|
|
|
token:'',//请求头token
|
|
token:'',//请求头token
|
|
|
|
|
+ listLength:0,
|
|
|
|
|
+
|
|
|
|
|
+ preview: false,
|
|
|
|
|
+ src:""
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ components: {
|
|
|
|
|
+ "img-preview": imgPreview
|
|
|
|
|
+ },
|
|
|
props: {
|
|
props: {
|
|
|
msg: String
|
|
msg: String
|
|
|
},
|
|
},
|
|
|
created(){
|
|
created(){
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ beforeDestroy() {
|
|
|
|
|
+ // 页面关闭清除定时器
|
|
|
|
|
+ clearInterval(this.t5)
|
|
|
|
|
+ },
|
|
|
mounted(){
|
|
mounted(){
|
|
|
this.token=sessionStorage.getItem('token')
|
|
this.token=sessionStorage.getItem('token')
|
|
|
this.build=sessionStorage.getItem('build')
|
|
this.build=sessionStorage.getItem('build')
|
|
|
this.getJinchu()
|
|
this.getJinchu()
|
|
|
|
|
+ this.date=new Date().toISOString().slice(0, 10)
|
|
|
|
|
+ this.t5 = setInterval(function() {
|
|
|
|
|
+ this.date=new Date().toISOString().slice(0, 10)
|
|
|
|
|
+ this.getJinchu()
|
|
|
|
|
+ }, 43200000);
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
|
|
|
+ // 点击图片放大
|
|
|
|
|
+ previewImage(src) {
|
|
|
|
|
+ this.preview = true;
|
|
|
|
|
+ this.src = src;
|
|
|
|
|
+ },
|
|
|
|
|
+ keydownCloseImgPreview(e) {
|
|
|
|
|
+ if (e && e.keyCode == 27) {
|
|
|
|
|
+ this.preview = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ closeImgPreview() {
|
|
|
|
|
+ this.preview = false;
|
|
|
|
|
+ },
|
|
|
//进出人员
|
|
//进出人员
|
|
|
getJinchu(){
|
|
getJinchu(){
|
|
|
|
|
+ var aData=new Date()
|
|
|
|
|
+ this.yestDay=aData.getFullYear() + "-" +
|
|
|
|
|
+ (aData.getMonth() < 9 ? "0" + (aData.getMonth() + 1) : aData.getMonth() + 1) + "-" +
|
|
|
|
|
+ (aData.getDate() <= 9 ? "0" + (aData.getDate()-1) : (aData.getDate()-1))
|
|
|
this.studentList=[]
|
|
this.studentList=[]
|
|
|
- this.$axios.get('/auto/face-recognition/list?build='+this.build.split(",")[0]+'-'+this.build.split(",")[1]+'学生公寓进门&date=2023-06-15',
|
|
|
|
|
|
|
+ this.$axios.get('/auto/face-recognition/list?build='+this.build.split(",")[0]+'-'+this.build.split(",")[1]+'学生公寓进门&date='+this.yestDay,
|
|
|
// +this.date,
|
|
// +this.date,
|
|
|
{
|
|
{
|
|
|
headers: {
|
|
headers: {
|
|
@@ -63,6 +105,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
).then(res => {
|
|
).then(res => {
|
|
|
if (res.data.success) {
|
|
if (res.data.success) {
|
|
|
|
|
+ this.listLength=res.data.data.length
|
|
|
// 宿舍进出人员数据
|
|
// 宿舍进出人员数据
|
|
|
res.data.data.forEach(data => {
|
|
res.data.data.forEach(data => {
|
|
|
this.studentList.push(data)
|
|
this.studentList.push(data)
|
|
@@ -122,7 +165,8 @@ export default {
|
|
|
margin: 44px 0 0 685px;
|
|
margin: 44px 0 0 685px;
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
- color: rgba(255, 255, 255, 1);
|
|
|
|
|
|
|
+ // color: rgba(255, 255, 255, 1);
|
|
|
|
|
+ color: rgba(0, 218, 216, 1);
|
|
|
}
|
|
}
|
|
|
// 展示时间
|
|
// 展示时间
|
|
|
.sushe_san{
|
|
.sushe_san{
|
|
@@ -200,4 +244,42 @@ export default {
|
|
|
width: 145px;
|
|
width: 145px;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+//走马灯指示器样式
|
|
|
|
|
+::v-deep .el-carousel__indicators--horizontal {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ bottom: 0px;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ .el-carousel__indicator--horizontal button {
|
|
|
|
|
+ width: 6px; // 设置被选中前的样式
|
|
|
|
|
+ height: 6px;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ opacity: 0.5;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .el-carousel__indicator--horizontal.is-active button {
|
|
|
|
|
+ width: 0px; //设置被选中后的样式
|
|
|
|
|
+ height: 0px;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ opacity: 1;
|
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 缺省页
|
|
|
|
|
+ .queshen{
|
|
|
|
|
+ // margin: 58px 0 0 11px;
|
|
|
|
|
+ // height: 480px;
|
|
|
|
|
+}
|
|
|
|
|
+.queshen2{
|
|
|
|
|
+ margin: 88px 0 0 11px;
|
|
|
|
|
+ width: 210px;
|
|
|
|
|
+ height: 210px;
|
|
|
|
|
+}
|
|
|
|
|
+.queshen3{
|
|
|
|
|
+ margin: -38px 0 0 11px;
|
|
|
|
|
+ color: rgba(255, 255, 255, 0.5);
|
|
|
|
|
+ font-size: 22px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|