|
|
@@ -1,64 +1,31 @@
|
|
|
<template>
|
|
|
<div id="mainPage">
|
|
|
- <appHeader @goNewpage="onGoNewPage" :title="this.pagetitle"></appHeader>
|
|
|
- <bottomTab :curTab="thisTab"></bottomTab>
|
|
|
- <div class="goPage goTitle" @click="goPage('runtime')">
|
|
|
- <span>{{"Real-time monitoring"}}</span>
|
|
|
- <mu-icon value="keyboard_arrow_right"></mu-icon>
|
|
|
- </div>
|
|
|
- <div class="mapContainer">
|
|
|
- <mapDrag :curheight="310" :divcontainer="'js-container1'"></mapDrag>
|
|
|
- </div>
|
|
|
- <div class="goPage goTitle" @click="goPage('record')">
|
|
|
- <span>{{"Detection record")}</span>
|
|
|
- <mu-icon value="keyboard_arrow_right"></mu-icon>
|
|
|
- </div>
|
|
|
- <div class="runDate">
|
|
|
- <div class="box4">
|
|
|
- <div class="border4">
|
|
|
+ <img src="../static/images/main/banner.png" height="121" width="414"/>
|
|
|
+ <span class="shopNum">
|
|
|
+ 俱乐部场馆共 {{shopNum}} 处
|
|
|
+ </span>
|
|
|
+ <ul class="list">
|
|
|
+ <li v-for="l in list" @click="goAppoint(l)">
|
|
|
+ <img src="../static/images/main/771.png" height="133" width="130"/>
|
|
|
+ <div class="rt">
|
|
|
+ <h5>{{l.name}}</h5>
|
|
|
+ <span>今日预约名额剩余{{l.Recovered}}人</span>
|
|
|
+ <em class="green" v-if="l.Status == 1">点击预约</em>
|
|
|
+ <em class="red" v-else>不可预约</em>
|
|
|
</div>
|
|
|
- <span class="sum"><em>{{"Record"}}</em><s>{{recordNum}} {{"item"}}</s></span>
|
|
|
- </div>
|
|
|
- <div class="basic">
|
|
|
- <ul>
|
|
|
- <mu-row gutter>
|
|
|
- <mu-col span="4">
|
|
|
- <li @click="goPage('runtime')">
|
|
|
- <em :class="{'red':Dannum > 0}">{{Dannum}}</em>
|
|
|
- <s>{{"Suspicious device"}}</s>
|
|
|
- </li>
|
|
|
- </mu-col>
|
|
|
- <mu-col span="4">
|
|
|
- <li @click="goPage('detector')">
|
|
|
- <em>{{GetDetectorNum}}</em>
|
|
|
- <s>{{"Detection equipment"}}</s>
|
|
|
- </li>
|
|
|
- </mu-col>
|
|
|
- <mu-col span="4">
|
|
|
- <li @click="goPage('enterprisemanage')">
|
|
|
- <em>{{GetHotelCounts}}</em>
|
|
|
- <s>{{"Supervision quantity"}}</s>
|
|
|
- </li>
|
|
|
- </mu-col>
|
|
|
- </mu-row>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="goPage" @click="goPage('statis')">
|
|
|
- <span>{{"Statistical report forms"}}</span>
|
|
|
- <mu-icon value="keyboard_arrow_right"></mu-icon>
|
|
|
- </div>
|
|
|
- <div class="chartContaienr">
|
|
|
- <statischart></statischart>
|
|
|
- </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <bottomTab :curTab="thisTab"></bottomTab>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import appHeader from '../components/appHeader'
|
|
|
+ import {
|
|
|
+ testSelect,
|
|
|
+ testTable,
|
|
|
+ } from '../api/getApiRes.js'
|
|
|
+
|
|
|
import bottomTab from '../components/bottomTab'
|
|
|
- import mapDrag from '../components/mapDrag'
|
|
|
- import statischart from '../components/statischart'
|
|
|
import axios from 'axios';
|
|
|
|
|
|
let qs = require('qs');
|
|
|
@@ -67,79 +34,61 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- pagetitle: 'Wireless device detection system management',
|
|
|
- thisTab: 'System home page',
|
|
|
+ thisTab: '预约课程',
|
|
|
+ shopNum: 0,
|
|
|
recordNum: 0,
|
|
|
Dannum: 0,
|
|
|
GetHotelCounts: 0,
|
|
|
GetDetectorNum: 0,
|
|
|
+ list: [],
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.GetStaticinfo();
|
|
|
- this.GetUserProv();
|
|
|
- this.timer = setInterval(() => {
|
|
|
- this.GetStaticinfo();
|
|
|
- }, 5000);
|
|
|
+ this.getList();
|
|
|
},
|
|
|
destroyed() {
|
|
|
- clearInterval(this.timer);
|
|
|
},
|
|
|
methods: {
|
|
|
- onGoNewPage(path) {
|
|
|
- this.$router.push({path: '/' + path});
|
|
|
- },
|
|
|
- goPage(pages) {
|
|
|
- this.$router.push({path: pages});
|
|
|
- },
|
|
|
- // 获得数据
|
|
|
- GetStaticinfo() {
|
|
|
- const that = this;
|
|
|
- let url = headapi + 'v1/Company/GetStaticinfo';
|
|
|
+ getList() {
|
|
|
+ let that = this;
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- axios.post(url, postdata).then(function (data) {
|
|
|
- let json = data.data;
|
|
|
+ testTable(postdata).then(res => {
|
|
|
+ let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
- that.recordNum = json.Rs.Decrsnum;
|
|
|
- that.Dannum = json.Rs.Danwifinum;
|
|
|
- that.GetHotelCounts = json.Rs.Comnum;
|
|
|
- that.GetDetectorNum = json.Rs.Detectornum;
|
|
|
- } else {
|
|
|
- if (json.Code == 1010) {
|
|
|
- that.$router.push({path: '/login'});
|
|
|
- return false
|
|
|
+ that.list = json.Rs;
|
|
|
+ if (that.list) {
|
|
|
+ that.shopNum = json.Rs.length;
|
|
|
}
|
|
|
+ } else {
|
|
|
+ that.$message.error(json.Memo);
|
|
|
}
|
|
|
- }, function (response) {
|
|
|
- console.info(response);
|
|
|
})
|
|
|
},
|
|
|
- GetUserProv() {
|
|
|
- let url = headapi + 'v1/User/GetUserBytoken';
|
|
|
- let param = {
|
|
|
- token: localStorage.token
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- axios.post(url, postdata).then(function (data) {
|
|
|
- let json = data.data;
|
|
|
- if (json.Code == 0) {
|
|
|
- // todo 改写用vuex
|
|
|
- localStorage.defaultProv = json.Rs.Insprov;
|
|
|
- localStorage.defaultCity = json.Rs.Inscity;
|
|
|
- localStorage.defaultArea = json.Rs.Insarea;
|
|
|
- localStorage.Comid = json.Rs.Comid;
|
|
|
- }
|
|
|
- }, function (response) {
|
|
|
- console.info(response);
|
|
|
- })
|
|
|
+ onGoNewPage(path) {
|
|
|
+ this.$router.push({path: '/' + path});
|
|
|
+ },
|
|
|
+ goPage(pages) {
|
|
|
+ this.$router.push({path: pages});
|
|
|
+ },
|
|
|
+ goAppoint(row) {
|
|
|
+ let that = this;
|
|
|
+ if (row.Status == 2) {
|
|
|
+ that.Toast(row.name + '不可预约');
|
|
|
+ return false
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/appoint', query: {
|
|
|
+ shopId: row.id
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
components: {
|
|
|
- appHeader, bottomTab, mapDrag, statischart
|
|
|
+ bottomTab
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
@@ -198,120 +147,91 @@
|
|
|
max-height: 317px;
|
|
|
}
|
|
|
|
|
|
- .runDate {
|
|
|
- width: 100%;
|
|
|
- overflow: hidden;
|
|
|
- display: block;
|
|
|
- margin: 0 auto;
|
|
|
- }
|
|
|
-
|
|
|
- .runDate span.sum {
|
|
|
- position: relative;
|
|
|
- /*bottom: 80px;*/
|
|
|
+ .shopNum {
|
|
|
width: 100%;
|
|
|
overflow: hidden;
|
|
|
display: block;
|
|
|
margin: 0 auto;
|
|
|
+ font-family: "PingFang SC";
|
|
|
+ font-weight: 300;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #909090;
|
|
|
text-align: center;
|
|
|
- line-height: 80px;
|
|
|
- }
|
|
|
-
|
|
|
- .runDate span.sum em {
|
|
|
- font-size: 18px;
|
|
|
- color: #333;
|
|
|
- padding-right: 10px;
|
|
|
- }
|
|
|
-
|
|
|
- .runDate .sum s {
|
|
|
- font-size: 28px;
|
|
|
- color: #FFA200;
|
|
|
}
|
|
|
|
|
|
- .box4 {
|
|
|
- position: relative;
|
|
|
- width: 100%;
|
|
|
- height: 75px;
|
|
|
- display: block;
|
|
|
- margin: 0 auto;
|
|
|
- overflow: hidden;
|
|
|
- }
|
|
|
-
|
|
|
- .border4 {
|
|
|
- position: absolute;
|
|
|
- top: 0px;
|
|
|
- left: 0px;
|
|
|
- /*width: 1400px;*/
|
|
|
- /*-webkit-animation: scrollText2 3s infinite cubic-bezier(1, 0, 0.5, 0);*/
|
|
|
- /*animation: scrollText2 3s infinite cubic-bezier(1, 0, 0.5, 0);*/
|
|
|
- width: 100%;
|
|
|
- height: 100px;
|
|
|
+ .list {
|
|
|
+ width: 96%;
|
|
|
overflow: hidden;
|
|
|
display: block;
|
|
|
margin: 0 auto;
|
|
|
- background: url("../static/images/main/11.gif") top center no-repeat;
|
|
|
- background-size: 100%;
|
|
|
+ padding-left: 2%;
|
|
|
+ padding-right: 2%;
|
|
|
+ margin-top: 10px;
|
|
|
}
|
|
|
|
|
|
- .basic {
|
|
|
+ .list li {
|
|
|
width: 100%;
|
|
|
+ height: 133px;
|
|
|
+ background: transparent;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ border-radius: 13px;
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
|
|
|
overflow: hidden;
|
|
|
- display: block;
|
|
|
- margin: 0 auto;
|
|
|
- padding: 5px 0;
|
|
|
}
|
|
|
|
|
|
- .basic ul {
|
|
|
- width: 100%;
|
|
|
- overflow: hidden;
|
|
|
- display: block;
|
|
|
- margin: 0 auto;
|
|
|
- padding: 0;
|
|
|
+ .list img {
|
|
|
+ float: left;
|
|
|
}
|
|
|
|
|
|
- .basic li {
|
|
|
- width: 100%;
|
|
|
- min-height: 110px;
|
|
|
- /*width: 120px;*/
|
|
|
- overflow: hidden;
|
|
|
- padding-bottom: 5px;
|
|
|
+ .list .rt {
|
|
|
+ width: 60%;
|
|
|
float: left;
|
|
|
- background: #fff;
|
|
|
- text-align: center;
|
|
|
+ padding-left: 15px;
|
|
|
}
|
|
|
|
|
|
- .col {
|
|
|
- padding-left: 3px;
|
|
|
- padding-right: 3px;
|
|
|
+ .list .rt h5 {
|
|
|
+ font-family: "PingFang SC";
|
|
|
+ font-weight: normal;
|
|
|
+ font-size: 18px;
|
|
|
+ text-align: left;
|
|
|
+ color: #3b3b3b;
|
|
|
+ margin: 0;
|
|
|
+ margin-top: 18px;
|
|
|
+ margin-bottom: 7px;
|
|
|
}
|
|
|
|
|
|
- .basic li em {
|
|
|
+ .list .rt span {
|
|
|
width: 100%;
|
|
|
overflow: hidden;
|
|
|
display: block;
|
|
|
margin: 0 auto;
|
|
|
- margin-top: 9px;
|
|
|
- font-size: 36px;
|
|
|
- color: #000;
|
|
|
- }
|
|
|
-
|
|
|
- .basic li s {
|
|
|
- font-size: 14px;
|
|
|
- color: #888888;
|
|
|
- text-decoration: none;
|
|
|
+ font-family: "PingFang SC";
|
|
|
+ font-weight: normal;
|
|
|
+ font-size: 12px;
|
|
|
+ text-align: left;
|
|
|
+ color: #909090;
|
|
|
}
|
|
|
|
|
|
- .chartContaienr {
|
|
|
+ .list .rt em {
|
|
|
width: 100%;
|
|
|
overflow: hidden;
|
|
|
display: block;
|
|
|
margin: 0 auto;
|
|
|
- background: #fff;
|
|
|
- margin-top: 2px;
|
|
|
- padding-top: 15px;
|
|
|
- padding-bottom: 40px;
|
|
|
+ font-family: "PingFang SC";
|
|
|
+ font-weight: normal;
|
|
|
+ font-size: 16px;
|
|
|
+ padding-right: 31px;
|
|
|
+ margin-top: 20px;
|
|
|
+ float: right;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ .list .rt em.green {
|
|
|
+ color: #37cb00;
|
|
|
}
|
|
|
|
|
|
- .basic li em.red {
|
|
|
- color: red;
|
|
|
+ .list .rt em.red {
|
|
|
+ color: #F8847F;
|
|
|
}
|
|
|
</style>
|