ソースを参照

large.json.config

wangtao 2 年 前
コミット
3ede7156ef

+ 26 - 26
src/assets/scss/common.scss

@@ -1,27 +1,27 @@
-.headerBox {
-    height: 44px;
-    width: 100%;
-    position: fixed;
-    top: 0;
-    left: 0;
-    box-sizing: border-box;
-    background: rgba(242, 46, 60, 1);
-    text-align: center;
-    line-height: 44px;
-    color: #FFF;
-    font-size: 18px;
-    padding: 0 10px;
-    z-index: 1;
-    .van-icon {
-        float: left;
-        line-height: 44px;
-    }
-    .img {
-        margin: 4px auto;
-        float: left;
-        img {
-            width: 35px;
-            height: 35px;
-        }
-    }
+.headerBox {
+    height: 44px;
+    width: 100%;
+    position: fixed;
+    top: 0;
+    left: 0;
+    box-sizing: border-box;
+    background: rgba(242, 46, 60, 1);
+    text-align: center;
+    line-height: 44px;
+    color: #FFF;
+    font-size: 18px;
+    padding: 0 10px;
+    z-index: 100;
+    .van-icon {
+        float: left;
+        line-height: 44px;
+    }
+    .img {
+        margin: 4px auto;
+        float: left;
+        img {
+            width: 35px;
+            height: 35px;
+        }
+    }
 }

+ 43 - 40
src/components/record/energy/index.vue

@@ -1,40 +1,43 @@
-<template>
-    <van-row class="recordList" style="margin-top:38px">
-      <van-row class="titleWrap">
-        <span class="line"></span>
-        <span class="title">能耗管理</span>
-      </van-row>
-      <van-row class="type">
-        <van-col span="11" class="bgc1">
-            <van-row class="textTop">165</van-row>
-            <van-row class="textBottom">当日能耗(kW.h)</van-row>
-        </van-col>
-        <van-col span="11" class="bgc2" offset="2">
-            <van-row class="textTop">3421</van-row>
-            <van-row class="textBottom">当月能耗(kW.h)</van-row>
-        </van-col>
-      </van-row>
-       <van-row class="type">
-        <van-col span="11" class="bgc3">
-            <van-row class="textTop">158</van-row>
-            <van-row class="textBottom">昨日能耗(kW.h)</van-row>
-        </van-col>
-        <van-col span="11" class="bgc4" offset="2">
-            <van-row class="textTop">3671</van-row>
-            <van-row class="textBottom">上月能耗(kW.h)</van-row>
-        </van-col>
-      </van-row>
-    </van-row>
-</template>
-<script>
-export default {
-  data() {
-    return {};
-  },
-
-  mounted() {},
-  methods: {},
-};
-</script>
-
-<style lang="scss" scoped></style>
+<template>
+    <van-row class="recordList" style="margin-top:58px">
+      <van-row class="titleWrap">
+        <span class="line"></span>
+        <span class="title">能耗管理</span>
+      </van-row>
+      <van-row class="type">
+        <van-col span="11" class="bgc1">
+            <van-row class="textTop">{{data.dangri}}</van-row>
+            <van-row class="textBottom">当日能耗(kW.h)</van-row>
+        </van-col>
+        <van-col span="11" class="bgc2" offset="2">
+            <van-row class="textTop">{{data.dangyue}}</van-row>
+            <van-row class="textBottom">当月能耗(kW.h)</van-row>
+        </van-col>
+      </van-row>
+       <van-row class="type">
+        <van-col span="11" class="bgc3">
+            <van-row class="textTop">{{data.zuori}}</van-row>
+            <van-row class="textBottom">昨日能耗(kW.h)</van-row>
+        </van-col>
+        <van-col span="11" class="bgc4" offset="2">
+            <van-row class="textTop">{{data.shangyu}}</van-row>
+            <van-row class="textBottom">上月能耗(kW.h)</van-row>
+        </van-col>
+      </van-row>
+    </van-row>
+</template>
+<script>
+export default {
+  props:["resInfo"],
+  data() {
+    return {
+      data:{},
+    };
+  },
+  watch:{
+    resInfo(val,old){
+      this.data = val
+    }
+  },
+};
+</script>

+ 127 - 127
src/components/record/equipment/index.vue

@@ -1,127 +1,127 @@
-<template>
-    <van-row class="recordList">
-      <van-row class="titleWrap">
-        <span class="line"></span>
-        <span class="title">设备告警信息</span>
-      </van-row>
-      <el-table ref="initList" :data="initList"  height="180px"  highlight-current-row :header-cell-style="{background:'#F5F5F5',color:'#000','font-weight':'400'}" class="table">
-      <el-table-column label="告警时间"  prop="alarmTime"  show-overflow-tooltip  min-width="35%" />
-      <el-table-column label="告警内容"  prop="property"  show-overflow-tooltip min-width="25%" />
-      <el-table-column label="告警类型"  prop="deviceTypeName"  show-overflow-tooltip min-width="25%" />
-      <el-table-column label="状态"  prop="alarmStatus"  show-overflow-tooltip min-width="15%" >
-        <template slot-scope="scope">
-          <span :class="scope.row.alarmStatus == '1' ? 'color8' : 'color1'">{{scope.row.alarmStatus == "1"  ? "已处理" : "未处理"}}</span>
-        </template>
-      </el-table-column>
-    </el-table>
-    </van-row>
-</template>
-<script>
-import axios from 'axios'
-import { YearMonthDate } from "@/assets/js/dataFormate.js";
-export default {
-  data() {
-    return {
-      initList:[
-        // {alarmTime:'2022-05-10 12:33:53',property:'故障',deviceType:1,deviceTypeName:'1层监控室用户信息传输装置',deviceId:'74869'},
-        // {alarmTime:'2022-05-08 00:30:40',property:'故障',deviceType:1,deviceTypeName:'1层监控室用户信息传输装置',deviceId:'74869'},
-        // {alarmTime:'2022-03-13 08:06:01',property:'故障',deviceType:1,deviceTypeName:'1层监控室用户信息传输装置',deviceId:'74869'},
-        // {alarmTime:'2022-03-10 19:41:23',property:'故障',deviceType:1,deviceTypeName:'1层监控室用户信息传输装置',deviceId:'74869'},
-        // {alarmTime:'2022-03-05 03:12:21',property:'故障',deviceType:1,deviceTypeName:'1层监控室用户信息传输装置',deviceId:'74869'}
-      ],
-      table_interval:null,
-    };
-  },
-  created(){
-    this.initData();
-  },
-
-  mounted() {},
-  methods: {
-    //初始化数据
-    initData() {
-      // 
-      axios({
-        method: 'post',
-        url: 'https://smartpark.caih.com/dmapi/tbAlarm/page',
-        timeout: 3000,
-        data:{
-          startTime:YearMonthDate().split(" ")[0] + " 00:00:00",
-          endTime:YearMonthDate(),
-          current:1,
-          size:500,
-          type:1
-        }
-      }).then(res =>{
-          this.initList = res.data.data.records
-      })
-      let that = this
-      let num = 0
-      if ("WebSocket" in window) {
-				this.ws = new WebSocket("ws://10.21.39.1:8084/dm/alarmPush");
-				this.ws.onopen = ()=> {
-				// console.log("websocket连接成功");
-				this.sendWs({agentid:'admin'});
-				};
-				this.ws.onmessage = (res) => { //接收websocket消息
-					let warningInfo = JSON.parse(res.data)
-          if(warningInfo.property != "火警" && warningInfo.property != "故障"){
-            that.initList.push(warningInfo)
-          }
-          if(num == '0'){
-            if(that.initList.length>2){
-              that.dataScrolling();
-              num = 1
-            }
-          }
-				};
-				this.ws.onclose = ()=> { //关闭websocket
-					// 关闭 websocket
-					//console.log("连接已关闭...");
-					//断线重新连接
-					setTimeout(() => {
-						this.initData();
-					}, 2000);
-				}
-			} else {
-				// 浏览器不支持 WebSocket
-				alert("您的浏览器不支持 WebSocket!");
-			}
-      // that.dataScrolling();
-    },
-    sendWs(val){
-			if (this.ws && this.ws.readyState == 1) {
-				this.ws.send(JSON.stringify(val));
-				// console.log('发送成功')
-			} else {
-				setTimeout(() => {
-				  this.sendWs(val);
-				}, 100);
-			}
-		},
-    //数据滚动
-    dataScrolling:function(){
-        let top=this.$refs.initList.bodyWrapper;
-        
-        this.table_interval=setInterval(() => {
-            top.scrollTop+=1;
-            if(top.clientHeight+top.scrollTop==top.scrollHeight){
-              top.scrollTop=0;
-            }
-        }, 100);
-    },
-    //鼠标进入,停止滚动
-    mouseEnter:function(){
-        clearInterval(this.table_interval);
-        this.table_interval=null;
-    },
-    timing(){
-      setInterval(() =>{
-        this.initList = []
-      },1000 * 60 * 10)
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped></style>
+<template>
+    <van-row class="recordList">
+      <van-row class="titleWrap">
+        <span class="line"></span>
+        <span class="title">设备告警信息</span>
+      </van-row>
+      <el-table ref="initList" :data="initList"  height="180px"  highlight-current-row :header-cell-style="{background:'#F5F5F5',color:'#000','font-weight':'400'}" class="table">
+      <el-table-column label="告警时间"  prop="alarmTime"  show-overflow-tooltip  min-width="35%" />
+      <el-table-column label="告警内容"  prop="property"  show-overflow-tooltip min-width="25%" />
+      <el-table-column label="告警类型"  prop="deviceTypeName"  show-overflow-tooltip min-width="25%" />
+      <!-- <el-table-column label="状态"  prop="alarmStatus"  show-overflow-tooltip min-width="15%" >
+        <template slot-scope="scope">
+          <span :class="scope.row.alarmStatus == '1' ? 'color8' : 'color1'">{{scope.row.alarmStatus == "1"  ? "已处理" : "未处理"}}</span>
+        </template>
+      </el-table-column> -->
+    </el-table>
+    </van-row>
+</template>
+<script>
+import axios from 'axios'
+import { YearMonthDate } from "@/assets/js/dataFormate.js";
+export default {
+  data() {
+    return {
+      initList:[
+        // {alarmTime:'2022-05-10 12:33:53',property:'故障',deviceType:1,deviceTypeName:'1层监控室用户信息传输装置',deviceId:'74869'},
+        // {alarmTime:'2022-05-08 00:30:40',property:'故障',deviceType:1,deviceTypeName:'1层监控室用户信息传输装置',deviceId:'74869'},
+        // {alarmTime:'2022-03-13 08:06:01',property:'故障',deviceType:1,deviceTypeName:'1层监控室用户信息传输装置',deviceId:'74869'},
+        // {alarmTime:'2022-03-10 19:41:23',property:'故障',deviceType:1,deviceTypeName:'1层监控室用户信息传输装置',deviceId:'74869'},
+        // {alarmTime:'2022-03-05 03:12:21',property:'故障',deviceType:1,deviceTypeName:'1层监控室用户信息传输装置',deviceId:'74869'}
+      ],
+      table_interval:null,
+    };
+  },
+  created(){
+    this.initData();
+  },
+
+  mounted() {},
+  methods: {
+    //初始化数据
+    initData() {
+      // 
+      axios({
+        method: 'post',
+        url: 'https://smartpark.caih.com/dmapi/tbAlarm/page',
+        timeout: 3000,
+        data:{
+          startTime:YearMonthDate().split(" ")[0] + " 00:00:00",
+          endTime:YearMonthDate(),
+          current:1,
+          size:500,
+          type:1
+        }
+      }).then(res =>{
+          this.initList = res.data.data.records
+      })
+      let that = this
+      let num = 0
+      if ("WebSocket" in window) {
+				this.ws = new WebSocket("ws://10.21.39.1:8084/dm/alarmPush");
+				this.ws.onopen = ()=> {
+				// console.log("websocket连接成功");
+				this.sendWs({agentid:'admin'});
+				};
+				this.ws.onmessage = (res) => { //接收websocket消息
+					let warningInfo = JSON.parse(res.data)
+          if(warningInfo.property != "火警" && warningInfo.property != "故障"){
+            that.initList.push(warningInfo)
+          }
+          if(num == '0'){
+            if(that.initList.length>2){
+              that.dataScrolling();
+              num = 1
+            }
+          }
+				};
+				this.ws.onclose = ()=> { //关闭websocket
+					// 关闭 websocket
+					//console.log("连接已关闭...");
+					//断线重新连接
+					setTimeout(() => {
+						this.initData();
+					}, 2000);
+				}
+			} else {
+				// 浏览器不支持 WebSocket
+				alert("您的浏览器不支持 WebSocket!");
+			}
+      // that.dataScrolling();
+    },
+    sendWs(val){
+			if (this.ws && this.ws.readyState == 1) {
+				this.ws.send(JSON.stringify(val));
+				// console.log('发送成功')
+			} else {
+				setTimeout(() => {
+				  this.sendWs(val);
+				}, 100);
+			}
+		},
+    //数据滚动
+    dataScrolling:function(){
+        let top=this.$refs.initList.bodyWrapper;
+        
+        this.table_interval=setInterval(() => {
+            top.scrollTop+=1;
+            if(top.clientHeight+top.scrollTop==top.scrollHeight){
+              top.scrollTop=0;
+            }
+        }, 100);
+    },
+    //鼠标进入,停止滚动
+    mouseEnter:function(){
+        clearInterval(this.table_interval);
+        this.table_interval=null;
+    },
+    timing(){
+      setInterval(() =>{
+        this.initList = []
+      },1000 * 60 * 10)
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 69 - 67
src/components/record/fireControl/index.vue

@@ -1,67 +1,69 @@
-<template>
-    <van-row class="recordList">
-      <van-row class="titleWrap">
-        <span class="line"></span>
-        <span class="title">消防隐患</span>
-      </van-row>
-      <el-table ref="initList" :data="initList"  height="180px"  highlight-current-row :header-cell-style="{background:'#F5F5F5',color:'#000','font-weight':'400'}" class="table">
-        <el-table-column label="时间" align="left" prop="alarmTime"  show-overflow-tooltip min-width="35%"   />
-        <el-table-column label="内容" align="left" prop="property"  show-overflow-tooltip min-width="25%"/>
-        <el-table-column label="名称" align="left" prop="deviceName"  show-overflow-tooltip min-width="25%"/>
-        <el-table-column label="地点" align="left" prop="unitInfo"  show-overflow-tooltip min-width="15%"/>
-      </el-table>
-    </van-row>
-</template>
-<script>
-import axios from 'axios'
-export default {
-  data() {
-    return {
-      initList:[],
-      table_interval:null,
-    };
-  },
-  created(){
-    this.initData();
-  },
-  mounted() {},
-  methods: {
-    //初始化数据
-    initData() {
-      axios({
-            method: 'post',
-            url: 'https://smartpark.caih.com/dmapi/tbAlarm/page',
-            data:{
-              current: 1,
-              size: 100,
-            },
-            timeout: 3000,
-        }).then(res =>{
-            if(res.data.data.records){
-                let data = res.data.data.records
-                this.initList = data
-            }
-        }).catch(err =>{
-        })
-    },
-    //数据滚动
-    dataScrolling:function(){
-        let top=this.$refs.initList.bodyWrapper;
-        this.table_interval=setInterval(() => {
-            top.scrollTop+=1;
-            if(top.clientHeight+top.scrollTop==top.scrollHeight){
-              top.scrollTop=0;
-            }
-        }, 100);
-    },
-    timing(){
-      setInterval(() =>{
-        this.initList = []
-      },1000 * 60)
-    },
-    
-  },
-};
-</script>
-
-<style lang="scss" scoped></style>
+<template>
+    <van-row class="recordList">
+      <van-row class="titleWrap">
+        <span class="line"></span>
+        <span class="title">消防隐患</span>
+      </van-row>
+      <el-table ref="initList" :data="initList"  height="180px"  highlight-current-row :header-cell-style="{background:'#F5F5F5',color:'#000','font-weight':'400'}" class="table">
+        <el-table-column label="时间" align="left" prop="alarmTime"  show-overflow-tooltip min-width="35%"   />
+        <el-table-column label="内容" align="left" prop="property"  show-overflow-tooltip min-width="25%"/>
+        <el-table-column label="名称" align="left" prop="deviceName"  show-overflow-tooltip min-width="25%"/>
+        <el-table-column label="地点" align="left" prop="unitInfo"  show-overflow-tooltip min-width="15%"/>
+      </el-table>
+    </van-row>
+</template>
+<script>
+import axios from 'axios'
+export default {
+  data() {
+    return {
+      initList:[],
+      table_interval:null,
+    };
+  },
+  created(){
+    this.initData();
+  },
+  mounted() {},
+  methods: {
+    //初始化数据
+    initData() {
+      axios({
+            method: 'post',
+            url: 'https://smartpark.caih.com/dmapi/tbAlarm/page',
+            data:{
+              current: 1,
+              size: 100,
+              type:1,
+              status:0
+            },
+            timeout: 3000,
+        }).then(res =>{
+            if(res.data.data.records){
+                let data = res.data.data.records
+                this.initList = data
+            }
+        }).catch(err =>{
+        })
+    },
+    //数据滚动
+    dataScrolling:function(){
+        let top=this.$refs.initList.bodyWrapper;
+        this.table_interval=setInterval(() => {
+            top.scrollTop+=1;
+            if(top.clientHeight+top.scrollTop==top.scrollHeight){
+              top.scrollTop=0;
+            }
+        }, 100);
+    },
+    timing(){
+      setInterval(() =>{
+        this.initList = []
+      },1000 * 60)
+    },
+    
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 117 - 117
src/components/record/flow/index.vue

@@ -1,117 +1,117 @@
-<template>
-    <van-row class="recordList" v-loading="loading">
-      <van-row class="titleWrap">
-        <span class="line"></span>
-        <span class="title">今日人流量统计</span>
-      </van-row>
-      <van-row class="type3">
-        <van-row class="data">
-          <van-row>今日人流量统计:
-            <van-row class="list">
-              <van-row v-for="(item,index) in data.total" :key="index">
-                <el-image
-                class="img"
-                :src="img"
-                ></el-image>
-                <van-row class="num color3">{{item}}</van-row>
-              </van-row>
-            </van-row>
-          </van-row>
-        </van-row>
-        <lineT v-if="status" :resData="data.data"/>
-      </van-row>
-    </van-row>
-</template>
-<script>
-import axios from 'axios'
-import lineT from "@/components/record/flow/line";
-export default {
-  components: {
-  	lineT,
-  },
-  data() {
-    return {
-      img:require('@/assets/image/矩形5@3x.png'),
-      data: {
-        //今日流量
-          total: undefined,
-          data: [
-            [],[]
-          ],
-      },
-      loading:true,
-      status:false,
-    };
-  },
-  created(){
-    this.init()
-    this.timing()
-  },
-  methods: {
-    init(){
-      axios({
-        method: 'get',
-        url: 'https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/yunUserRequest',
-        timeout: 100000,
-      }).then(res =>{
-          let total = 0
-          if(res.data){
-            this.data.data.total = 0
-            this.data.data[0] = []
-            this.data.data[1] = []
-            for(let i = 0; i<res.data.length; i++){
-              this.data.data[0].push(res.data[i].access_time)
-              this.data.data[1].push(res.data[i].card_number)
-              total += res.data[i].card_number
-            }
-            this.data.total = (total.toString()).split("")
-            setTimeout(()=>{
-              this.status = true
-              this.loading = false
-            },20)
-          }
-      }).catch(err =>{
-      })
-    },
-    timing(){
-      setInterval(() =>{
-        this.init()
-      },1000 * 60 * 5)
-    }
-    
-  },
-};
-</script>
-<style lang="scss" scopet>
-.type3{
-  margin-top:10px !important;
-  text-align: right;
-  .data{
-    margin-top:0px !important;
-    font-size: 16px;
-    color:#000;
-    .van-row{
-      display: inline-block;
-      vertical-align: middle;
-      .list{
-        .van-row{
-          position: relative;
-          width:26px;
-          margin-left:8px;
-          .num{
-            font-size: 24px;
-            text-align: center;
-            line-height: 35px;
-            position: absolute;
-            left:-8px;
-
-          }
-        }
-      }
-      
-      
-    }
-  }
-}
-
-</style>
+<template>
+    <van-row class="recordList" v-loading="loading">
+      <van-row class="titleWrap">
+        <span class="line"></span>
+        <span class="title">今日人流量统计</span>
+      </van-row>
+      <van-row class="type3">
+        <van-row class="data">
+          <van-row>今日人流量统计:
+            <van-row class="list">
+              <van-row v-for="(item,index) in data.total" :key="index">
+                <el-image
+                class="img"
+                :src="img"
+                ></el-image>
+                <van-row class="num color3">{{item}}</van-row>
+              </van-row>
+            </van-row>
+          </van-row>
+        </van-row>
+        <lineT v-if="status" :resData="data.data"/>
+      </van-row>
+    </van-row>
+</template>
+<script>
+import axios from 'axios'
+import lineT from "@/components/record/flow/line";
+export default {
+  components: {
+  	lineT,
+  },
+  data() {
+    return {
+      img:require('@/assets/image/矩形5@3x.png'),
+      data: {
+        //今日流量
+          total: undefined,
+          data: [
+            [],[]
+          ],
+      },
+      loading:true,
+      status:false,
+    };
+  },
+  created(){
+    this.init()
+    this.timing()
+  },
+  methods: {
+    init(){
+      axios({
+        method: 'get',
+        url: 'https://smartpark.caih.com/ykt/api/thirdparty/v1/openInterface/yunUserRequest',
+        timeout: 100000,
+      }).then(res =>{
+          let total = 0
+          if(res.data){
+            this.data.data.total = 0
+            this.data.data[0] = []
+            this.data.data[1] = []
+            for(let i = 0; i<res.data.length; i++){
+              this.data.data[0].push(res.data[i].access_time)
+              this.data.data[1].push(res.data[i].card_number)
+              total += res.data[i].card_number
+            }
+            this.data.total = (total.toString()).split("")
+            setTimeout(()=>{
+              this.status = true
+              this.loading = false
+            },20)
+          }
+      }).catch(err =>{
+      })
+    },
+    timing(){
+      setInterval(() =>{
+        this.init()
+      },1000 * 60 * 5)
+    }
+    
+  },
+};
+</script>
+<style lang="scss" scopet>
+.type3{
+  margin-top:10px !important;
+  text-align: right;
+  .data{
+    margin-top:0px !important;
+    font-size: 14px;
+    color:#000;
+    .van-row{
+      display: inline-block;
+      vertical-align: middle;
+      .list{
+        .van-row{
+          position: relative;
+          width:26px;
+          margin-left:8px;
+          .num{
+            font-size: 24px;
+            text-align: center;
+            line-height: 32px;
+            position: absolute;
+            left:-8px;
+
+          }
+        }
+      }
+      
+      
+    }
+  }
+}
+
+</style>

+ 185 - 162
src/components/record/index.vue

@@ -1,162 +1,185 @@
-<template>
-    <van-row class="record">
-        <energy alt="能源" />
-        <restaurant alt="餐饮" />
-        <printing alt="文印" />
-        <parking alt="停车位" />
-        <flow alt="人流量" />
-        <meeting alt="会议" />
-        <videoSS alt="实时视频" @videoMsg="videoMsg" v-if="videoStatus" :info = "info"/>
-        <networkCard alt="互联网卡" />
-        <intrusion alt="入侵告警" />
-        <equipment alt="设备告警" />
-        <fireControl alt="消防隐患" />
-        <equipmentStatus alt="设备状态" />
-        <keepWatch alt="巡更告警" />
-    </van-row>
-</template>
-<script>
-import energy from "@/components/record/energy";
-import restaurant from "@/components/record/restaurant";
-import printing from "@/components/record/printing";
-import parking from "@/components/record/parking";
-import flow from "@/components/record/flow";
-import meeting from "@/components/record/meeting";
-import videoSS from "@/components/record/videoSS";
-import networkCard from "@/components/record/networkCard";
-import intrusion from "@/components/record/intrusion";
-import equipment from "@/components/record/equipment";
-import fireControl from "@/components/record/fireControl";
-import equipmentStatus from "@/components/record/equipmentStatus";
-import keepWatch from "@/components/record/keepWatch";
-export default {
-  components: {
-		energy,restaurant,printing,parking,flow,meeting,videoSS,networkCard,
-        intrusion,equipment,fireControl,equipmentStatus,keepWatch
-        
-  },
-  data() {
-    return {
-        videoStatus:true,
-        info:undefined,
-    };
-  },
-
-  mounted() {
-    
-  },
-  methods: {
-    videoMsg(id){
-        this.videoStatus = false
-        setTimeout(()=>{
-            this.videoStatus = true
-            this.info = id
-        })
-    }
-  }
-};
-</script>
-
-<style lang="scss" >
-.record{
-    margin-top:-35px;
-    .recordList{
-        padding:15px 3%;
-        margin-top:10px;
-        box-sizing: border-box;
-        background-color: #fff;
-        .titleWrap{
-            font-size: 18px;
-            color:#000;
-            position: relative;
-            
-            .line{
-                width:3px;
-                height:16px;
-                display: inline-block;
-                background-color: #F22E3C;
-                position: absolute;
-                top:4px;
-                left:0;
-            }
-            .title{
-               vertical-align: middle;
-               margin-left:10px;
-
-            }
-        }
-        .type{
-            margin-top:16px;
-            color:#fff;
-            .van-col{
-                text-align: center;
-                padding:10px 0;
-                border-radius: 6px;
-                font-size: 15px;
-            }
-            .textBottom{
-                margin-top:10px;
-            }
-            
-        }
-    }
-}
-.bgc1{
-    background-color: #58D5C1;
-}
-.bgc2{
-    background-color: #E9BC5C;
-}
-.bgc3{
-    background-color: #F8A256;
-}
-.bgc4{
-    background-color:#67B4FB;
-}
-.bgc5{
-    background-color: #BA7FF3;
-}
-.bgc6{
-    background-color: #58D5C1;
-}
-.bgc7{
-    background-color: #E65F8A;
-}
-.bgc8{
-    background-color: #C87E91;
-}
-
-.bgcJB1{
-    background-image: linear-gradient(to right, #03C2F4 , #117ADC);
-}
-.bgcJB2{
-    background-image: linear-gradient(to right, #F18738 , #E79151);
-}
-.color1{
-    color:#F74847;
-}
-.color2{
-    color:#DBCA3D;
-}
-.color3{
-    color:#70D0CC;
-}
-.color4{
-    color:#F8BE00;
-}
-.color5{
-    color:#F07E32;
-}
-.color6{
-    color:#49E3FF;
-}
-.color7{
-    color:#40FF00;
-}
-.color8{
-    color:#3EBE3D
-}
-.table{
-    margin-top:15px;
-}
-</style>
+<template>
+    <van-row class="record">
+        <energy alt="能源" :resInfo="data.nenghao"/>
+        <restaurant alt="餐饮" :resInfo="data.canyin"/>
+        <printing alt="文印" :resInfo="data.wenyin"/>
+        <parking alt="停车位" :resInfo="data.tingche"/>
+        <flow alt="人流量" />
+        <meeting alt="会议" :resInfo="data.huiyi"/>
+        <videoSS alt="实时视频" @videoMsg="videoMsg" v-if="videoStatus" :info = "info"/>
+        <networkCard alt="互联网卡" />
+        <intrusion alt="入侵告警" />
+        <equipment alt="设备告警" />
+        <fireControl alt="消防隐患" />
+        <equipmentStatus alt="设备状态" />
+        <keepWatch alt="巡更告警" />
+    </van-row>
+</template>
+<script>
+import energy from "@/components/record/energy";
+import restaurant from "@/components/record/restaurant";
+import printing from "@/components/record/printing";
+import parking from "@/components/record/parking";
+import flow from "@/components/record/flow";
+import meeting from "@/components/record/meeting";
+import videoSS from "@/components/record/videoSS";
+import networkCard from "@/components/record/networkCard";
+import intrusion from "@/components/record/intrusion";
+import equipment from "@/components/record/equipment";
+import fireControl from "@/components/record/fireControl";
+import equipmentStatus from "@/components/record/equipmentStatus";
+import keepWatch from "@/components/record/keepWatch";
+export default {
+  components: {
+		energy,restaurant,printing,parking,flow,meeting,videoSS,networkCard,
+        intrusion,equipment,fireControl,equipmentStatus,keepWatch
+        
+  },
+  data() {
+    return {
+        videoStatus:true,
+        info:undefined,
+        //数据
+        data:{
+            tingche:{},
+            huiyi:{},
+            nenghao:{},
+            canyin:{},
+            wenyin:{}
+        }
+    };
+  },
+
+  mounted() {
+    axios({
+        method: 'get',
+        url: 'https://smartpark.caih.com/dxapi/system/config/configKey/large.json.config',
+        timeout: 10000,
+    }).then(res =>{
+      this.data = JSON.parse(res.data.data)
+    })
+    setInterval(()=>{
+      axios({
+          method: 'get',
+          url: 'https://smartpark.caih.com/dxapi/system/config/configKey/large.json.config',
+          timeout: 10000,
+      }).then(res =>{
+        this.data = JSON.parse(res.data.data)
+      })
+    },1000*60*10)
+  },
+  methods: {
+    videoMsg(id){
+        this.videoStatus = false
+        setTimeout(()=>{
+            this.videoStatus = true
+            this.info = id
+        })
+    }
+  }
+};
+</script>
+
+<style lang="scss" >
+.record{
+    margin-top:-35px;
+    .recordList{
+        padding:15px 3%;
+        margin-top:10px;
+        box-sizing: border-box;
+        background-color: #fff;
+        .titleWrap{
+            font-size: 16px;
+            color:#000;
+            position: relative;
+            
+            .line{
+                width:3px;
+                height:16px;
+                display: inline-block;
+                background-color: #F22E3C;
+                position: absolute;
+                top:4px;
+                left:0;
+            }
+            .title{
+               vertical-align: middle;
+               margin-left:10px;
+
+            }
+        }
+        .type{
+            margin-top:16px;
+            color:#fff;
+            .van-col{
+                text-align: center;
+                padding:10px 0;
+                border-radius: 6px;
+                font-size: 15px;
+            }
+            .textBottom{
+                margin-top:10px;
+            }
+            
+        }
+    }
+}
+.bgc1{
+    background-color: #58D5C1;
+}
+.bgc2{
+    background-color: #E9BC5C;
+}
+.bgc3{
+    background-color: #F8A256;
+}
+.bgc4{
+    background-color:#67B4FB;
+}
+.bgc5{
+    background-color: #BA7FF3;
+}
+.bgc6{
+    background-color: #58D5C1;
+}
+.bgc7{
+    background-color: #E65F8A;
+}
+.bgc8{
+    background-color: #C87E91;
+}
+
+.bgcJB1{
+    background-image: linear-gradient(to right, #03C2F4 , #117ADC);
+}
+.bgcJB2{
+    background-image: linear-gradient(to right, #F18738 , #E79151);
+}
+.color1{
+    color:#F74847;
+}
+.color2{
+    color:#DBCA3D;
+}
+.color3{
+    color:#70D0CC;
+}
+.color4{
+    color:#F8BE00;
+}
+.color5{
+    color:#F07E32;
+}
+.color6{
+    color:#49E3FF;
+}
+.color7{
+    color:#40FF00;
+}
+.color8{
+    color:#3EBE3D
+}
+.table{
+    margin-top:15px;
+}
+</style>

+ 106 - 95
src/components/record/meeting/index.vue

@@ -1,95 +1,106 @@
-<template>
-    <van-row class="recordList" style="padding-bottom:40px;">
-      <van-row class="titleWrap">
-        <span class="line"></span>
-        <span class="title">会议室统计</span>
-      </van-row>
-      <van-row class="meeting">
-        <van-row class="tip ">会议室昨日使用情况</van-row>
-        <pie />
-        <van-row class="data">
-          <van-row>
-            <van-col span="13">会议室总数:</van-col>
-            <van-col span="11" class="bgcJB1">21间</van-col>
-          </van-row>
-          <van-row>
-            <van-col span="13">在用会议室:</van-col>
-            <van-col span="11" class="bgcJB2">0间</van-col>
-          </van-row>
-        </van-row>
-      </van-row>
-    </van-row>
-</template>
-<script>
-import axios from 'axios'
-import pie from "@/components/record/meeting/pie";
-import * as echarts from "echarts";
-export default {
-  components: {
-  	pie,
-  },
-  data() {
-    return {
-      data:{
-        roomInUse: undefined,
-        attendeeIsSign: undefined,
-        attendeeTotal: undefined,
-        roomTotal: undefined
-      }
-    };
-  },
-  mounted() {
-    // this.getData()
-  },
-  methods: {
-    init(){
-      // axios({
-      //   method: 'get',
-      //   url: 'https://smartpark.caih.com/hyxt/api/thirdparty/meetingRoom/summary',
-      //   timeout: 3000,
-      // }).then(res =>{
-      //   if(res.data){
-      //     this.data = res.data
-      //   }
-      // }).catch(err =>{
-      // })
-    },
-    
-  },
-};
-</script>
-<style lang="scss" scopet>
-.meeting{
-  margin-top:0px !important;
-  .data{
-    width:50%;
-    float:right;
-    margin-top:25px !important;
-    display: inline-block;
-    vertical-align: top;
-    font-size: 14px;
-    color:#000;
-    .van-row{
-      margin-top:10px;
-      .van-col{
-        padding:6px 10px !important;
-        box-sizing: border-box;
-      }
-      .van-col:nth-child(1){
-        text-align: right !important;
-      }
-      .van-col:nth-child(2){
-        text-align: center !important;
-        color:#fff;
-        border-radius: 20px;
-      }
-      
-    }
-  }
-}
-.tip{
-  margin-top:6px;
-  color:#03C2F4;
-  
-}
-</style>
+<template>
+    <van-row class="recordList" style="padding-bottom:40px;">
+      <van-row class="titleWrap">
+        <span class="line"></span>
+        <span class="title">会议室统计</span>
+      </van-row>
+      <van-row class="meeting">
+        <van-row class="tip ">会议室昨日使用情况</van-row>
+        <pie :resData="list.pie" />
+        <van-row class="data">
+          <van-row>
+            <van-col span="13">会议室总数:</van-col>
+            <van-col span="11" class="bgcJB1">{{data.roomTotal}}间</van-col>
+          </van-row>
+          <van-row>
+            <van-col span="13">在用会议室:</van-col>
+            <van-col span="11" class="bgcJB2">{{data.roomInUse}}间</van-col>
+          </van-row>
+        </van-row>
+      </van-row>
+    </van-row>
+</template>
+<script>
+import axios from 'axios'
+import pie from "@/components/record/meeting/pie";
+import * as echarts from "echarts";
+export default {
+  components: {
+  	pie,
+  },
+  props:["resInfo"],
+  data() {
+    return {
+      data:{
+        roomInUse: undefined,
+        attendeeIsSign: undefined,
+        attendeeTotal: undefined,
+        roomTotal: undefined
+      },
+      list:{}
+    };
+  },
+  watch:{
+    resInfo(val,old){
+      this.list = val
+    }
+  },
+  mounted() {
+    this.init()
+    setInterval(()=>{
+      this.init()
+    },1000*60*10)
+  },
+  methods: {
+    init(){
+      axios({
+        method: 'get',
+        url: 'https://smartpark.caih.com/hyxt/api/thirdparty/meetingRoom/summary',
+        timeout: 30000,
+      }).then(res =>{
+        if(res.data){
+          this.data = res.data
+        }
+      }).catch(err =>{
+      })
+    },
+    
+  },
+};
+</script>
+<style lang="scss" scopet>
+.meeting{
+  margin-top:0px !important;
+  padding-bottom:10px;
+  .data{
+    width:50%;
+    float:right;
+    margin-top:25px !important;
+    display: inline-block;
+    vertical-align: top;
+    font-size: 12px;
+    color:#000;
+    .van-row{
+      margin-top:10px;
+      .van-col{
+        padding:6px 10px !important;
+        box-sizing: border-box;
+      }
+      .van-col:nth-child(1){
+        text-align: right !important;
+      }
+      .van-col:nth-child(2){
+        text-align: center !important;
+        color:#fff;
+        border-radius: 20px;
+      }
+      
+    }
+  }
+}
+.tip{
+  margin-top:6px;
+  color:#03C2F4;
+  
+}
+</style>

+ 103 - 107
src/components/record/meeting/pie.vue

@@ -1,107 +1,103 @@
-<template>
-  <el-row style="display: inline-block;">
-    <div
-      id="meeting"
-      style="width:300px;height:300px; position: absolute;
-  top:-90px;
-  left:-60px;"
-    ></div>
-  </el-row>
-</template>
-<script>
-import * as echarts from "echarts";
-export default {
-  props: ["resData"],
-  data() {
-    return {
-    };
-  },
-  watch: {
-    resData() {
-      this.getData();
-    },
-  },
-  mounted() {
-    this.getData();
-  },
-  methods: {
-    getData() {
-      let myChart = echarts.init(document.getElementById("meeting"));
-      let option = {
-         color: [
-            '#03C2F4',
-            '#F18738',
-        ],
-        title: {
-          //text: data.attendeeIsSign,
-          text: '79%',
-          textStyle: {
-            color: '#03C2F4',
-            fontSize: 22
-          },
-          subtext: '使用率',
-          subtextStyle: {
-            color: '#03C2F4',
-            fontSize: 12
-          },
-          itemGap: 10, // 主副标题距离
-          left: 'center',
-          top: '42%'
-        },
-        // tooltip: {
-        //   trigger: 'item'
-        // },
-        // legend: {
-        //   top: '70%',
-        //   left: 'center',
-        //   textStyle: {
-        //     color: "#FFF"
-        //   }
-        // },
-        series: [
-          {
-            name: '',
-            type: 'pie',
-            radius: ['30%', '40%'],
-            avoidLabelOverlap: false,
-            label: {
-              show: false,
-              position: 'center'
-            },
-            emphasis: {
-              // label: {
-              //   show: true,
-              //   fontSize: '40',
-              //   fontWeight: 'bold'
-              // }
-            },
-            labelLine: {
-              show: false
-            },
-            data: [
-              { value: 79, name: '使用时长' },
-              { value: 21, name: '未使用时长' },
-            ]
-          }
-        ]
-      };
-    
-      myChart.setOption(option);
-      option && myChart.setOption(option);
-      setTimeout(function () {
-        window.onresize = function () {
-          myChart.resize();
-        };
-      }, 200);
-    },
-  },
-};
-</script>
-<style>
-.cc{
-  position: absolute;
-  top:0;
-  left:0;
-}
-</style>
-
+<template>
+  <el-row style="display: inline-block;">
+    <div
+      id="meeting"
+      style="width:300px;height:300px; position: absolute;
+  top:-90px;
+  left:-60px;"
+    ></div>
+  </el-row>
+</template>
+<script>
+import * as echarts from "echarts";
+export default {
+  props: ["resData"],
+  data() {
+    return {
+      data:[]
+    };
+  },
+  watch: {
+    resData(val,old){
+      this.data = val
+      this.getData()
+    }
+  },
+  methods: {
+    getData() {
+      let myChart = echarts.init(document.getElementById("meeting"));
+      let option = {
+         color: [
+            '#F18738',
+            '#ccc',
+        ],
+        title: {
+          //text: data.attendeeIsSign,
+          text: this.data[0].value + '%',
+          textStyle: {
+            color: '#03C2F4',
+            fontSize: 22
+          },
+          subtext: '使用率',
+          subtextStyle: {
+            color: '#03C2F4',
+            fontSize: 12
+          },
+          itemGap: 10, // 主副标题距离
+          left: 'center',
+          top: '42%'
+        },
+        tooltip: {
+          trigger: 'item'
+        },
+        legend: {
+          top: '70%',
+          left: 'center',
+          textStyle: {
+            color: "#000"
+          }
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            radius: ['30%', '40%'],
+            avoidLabelOverlap: false,
+            label: {
+              show: false,
+              position: 'center'
+            },
+            emphasis: {
+              // label: {
+              //   show: true,
+              //   fontSize: '40',
+              //   fontWeight: 'bold'
+              // }
+            },
+            labelLine: {
+              show: false
+            },
+            data:this.data
+          }
+        ]
+      };
+    
+      myChart.setOption(option);
+      option && myChart.setOption(option);
+      setTimeout(function () {
+        window.onresize = function () {
+          myChart.resize();
+        };
+      }, 200);
+    },
+  },
+};
+</script>
+<style>
+.cc{
+  position: absolute;
+  top:0;
+  left:0;
+}
+</style>
+

+ 132 - 124
src/components/record/parking/index.vue

@@ -1,124 +1,132 @@
-<template>
-    <van-row class="recordList" >
-      <van-row class="titleWrap">
-        <span class="line"></span>
-        <span class="title">停车位</span>
-      </van-row>
-      <van-row class="type2">
-        <!-- <pie /> -->
-        <van-row class="parking">
-          <van-col class="num">217<span> 辆/次</span></van-col>
-          <van-col class="name">今日出入车辆</van-col>
-        </van-row>
-        <van-row class="data">
-          <van-row>
-            <van-col span="16">车位总数:</van-col>
-            <van-col span="8" class="color2">160个</van-col>
-          </van-row>
-          <van-row>
-            <van-col span="16">已停车位:</van-col>
-            <van-col span="8" class="color3">160个</van-col>
-          </van-row>
-          <van-row>
-            <van-col span="16">剩余车位:</van-col>
-            <van-col span="8" class="color4">0个</van-col>
-          </van-row>
-        </van-row>
-      </van-row>
-    </van-row>
-</template>
-<script>
-import axios from 'axios'
-import pie from "@/components/record/parking/pie";
-import * as echarts from "echarts";
-export default {
-  components: {
-  	pie,
-  },
-  data() {
-    return {
-      data:{
-        roomInUse: undefined,
-        attendeeIsSign: undefined,
-        attendeeTotal: undefined,
-        roomTotal: undefined
-      }
-    };
-  },
-  mounted() {
-    // this.getData()
-  },
-  methods: {
-    init(){
-      // axios({
-      //   method: 'get',
-      //   url: 'https://smartpark.caih.com/hyxt/api/thirdparty/meetingRoom/summary',
-      //   timeout: 3000,
-      // }).then(res =>{
-      //   if(res.data){
-      //     this.data = res.data
-      //   }
-      // }).catch(err =>{
-      // })
-    },
-    
-  },
-};
-</script>
-<style lang="scss" scopet>
-.type2{
-  margin-top:15x !important;
-  font-size: 14px;
-  .data{
-    width:40%;
-    margin-left:20px;
-    margin-top:0px !important;
-    display: inline-block;
-    vertical-align: top;
-    font-size: 12px;
-    color:#000;
-    float:right;
-    .van-row{
-      margin-top:10px;
-      border:1px solid #F0F0F0;
-      .van-col{
-        padding:10px  5px !important;
-        box-sizing: border-box;
-      }
-      .van-col:nth-child(1){
-        text-align: right !important;
-      }
-      .van-col:nth-child(2){
-        text-align: left !important;
-      }
-      
-    }
-  }
-}
-.parking {
-  width: 30%;
-  text-align: center;
-  float:left;
-  .num {
-    font-size: 30px;
-    font-weight: 700;
-    width: 100%;
-    text-align: center;
-    margin-top: 30px;
-    margin-left: 14px;
-    background: linear-gradient(180deg, #f4f8ff 0%, #a3b3cc 100%);
-    -webkit-background-clip: text;
-    -webkit-text-fill-color: transparent;
-    span{
-      font-size: 20px;
-    }
-  }
-  .name {
-    font-size: 16px;
-    margin: 15px 12px 0;
-    width: 100%;
-    color:#000;
-  }
-}
-
-</style>
+<template>
+    <van-row class="recordList" >
+      <van-row class="titleWrap">
+        <span class="line"></span>
+        <span class="title">停车位</span>
+      </van-row>
+      <van-row class="type2">
+        <!-- <pie /> -->
+        <van-row class="parking">
+          <van-col class="num">{{list.churu}}<span> 辆/次</span></van-col>
+          <van-col class="name">今日出入车辆</van-col>
+        </van-row>
+        <van-row class="data">
+          <van-row>
+            <van-col span="16">车位总数:</van-col>
+            <van-col span="8" class="color2">{{list.zongshu}}个</van-col>
+          </van-row>
+          <van-row>
+            <van-col span="16">已停车位:</van-col>
+            <van-col span="8" class="color3">{{list.zongshu - list.shengyu}}个</van-col>
+          </van-row>
+          <van-row>
+            <van-col span="16">剩余车位:</van-col>
+            <van-col span="8" class="color4">{{list.shengyu}}个</van-col>
+          </van-row>
+        </van-row>
+      </van-row>
+    </van-row>
+</template>
+<script>
+import axios from 'axios'
+import pie from "@/components/record/parking/pie";
+import * as echarts from "echarts";
+export default {
+  components: {
+  	pie,
+  },
+  props:["resInfo"],
+  data() {
+    return {
+      data:{
+        roomInUse: undefined,
+        attendeeIsSign: undefined,
+        attendeeTotal: undefined,
+        roomTotal: undefined,
+        data:{}
+      },
+      list:{}
+    };
+  },
+  watch:{
+    resInfo(val,old){
+      this.list = val
+    }
+  },
+  mounted() {
+    // this.getData()
+  },
+  methods: {
+    init(){
+      // axios({
+      //   method: 'get',
+      //   url: 'https://smartpark.caih.com/hyxt/api/thirdparty/meetingRoom/summary',
+      //   timeout: 3000,
+      // }).then(res =>{
+      //   if(res.data){
+      //     this.data = res.data
+      //   }
+      // }).catch(err =>{
+      // })
+    },
+    
+  },
+};
+</script>
+<style lang="scss" scopet>
+.type2{
+  margin-top:15x !important;
+  font-size: 14px;
+  .data{
+    width:40%;
+    margin-left:20px;
+    margin-top:0px !important;
+    display: inline-block;
+    vertical-align: top;
+    font-size: 12px;
+    color:#000;
+    float:right;
+    .van-row{
+      margin-top:10px;
+      border:1px solid #F0F0F0;
+      .van-col{
+        padding:10px  5px !important;
+        box-sizing: border-box;
+      }
+      .van-col:nth-child(1){
+        text-align: right !important;
+      }
+      .van-col:nth-child(2){
+        text-align: left !important;
+      }
+      
+    }
+  }
+}
+.parking {
+  width: 30%;
+  text-align: center;
+  float:left;
+  .num {
+    font-size: 30px;
+    font-weight: 700;
+    width: 100%;
+    text-align: center;
+    margin-top: 30px;
+    margin-left: 14px;
+    background: linear-gradient(180deg, #f4f8ff 0%, #a3b3cc 100%);
+    -webkit-background-clip: text;
+    -webkit-text-fill-color: transparent;
+    span{
+      font-size: 14px;
+    }
+  }
+  .name {
+    font-size: 14px;
+    margin: 15px 12px 0;
+    width: 100%;
+    color:#000;
+  }
+}
+
+</style>

+ 104 - 102
src/components/record/printing/index.vue

@@ -1,102 +1,104 @@
-<template>
-    <van-row class="recordList">
-      <van-row class="titleWrap">
-        <span class="line"></span>
-        <span class="title">文印助手</span>
-      </van-row>
-      <van-row class="type">
-        <van-col  class="bgc1 num1">
-          <van-row class="textTop">11份</van-row>
-          <van-row class="textBottom">打印总数</van-row>
-        </van-col>
-        <van-col  class="bgc2 num2">
-          <van-row class="textTop">13份</van-row>
-          <van-row class="textBottom">工作状态数</van-row>
-        </van-col>
-        <van-col  class="bgc4 num3">
-          <van-row class="textTop">67份</van-row>
-          <van-row class="textBottom">任务列表数</van-row>
-        </van-col>
-      </van-row>
-      <van-row class="printing1">
-        <van-col span="5" class="bgc8 left">
-          <van-row class="text">文件名</van-row>
-        </van-col>
-        <van-col span="19" class="printingList right" >
-          <div class="listWrap">
-            <van-col>****版本.docx</van-col>
-            <van-col>****合同.pdf</van-col>
-            <van-col>****02.docx</van-col>
-            <van-col>****V2.docx</van-col>
-          </div>
-        </van-col>
-      </van-row>
-      
-    </van-row>
-</template>
-<script>
-export default {
-  data() {
-    return {
-        img1:require('@/assets/image/组41@3x.png'),
-        img2:require('@/assets/image/组41拷贝@3x.png'),
-        img3:require('@/assets/image/组41拷贝2@3x.png'),
-    };
-  },
-
-  mounted() {},
-  methods: {},
-};
-</script>
-
-<style lang="scss" scoped>
-.num1,.num2,.num3{
-  width:31%
-}
-.num2,.num3{
-  margin-left:3.5%;
-}
-.printing1{
-  margin-top:15px;
-  font-size: 14px;
-  .left{
-        height:60px;
-        border-radius: 6px;
-        color:#fff;
-        .text{
-            width:100%;
-            text-align: center;
-            letter-spacing: 2px;
-            display: block;
-            line-height: 25px;
-            margin: 0 auto; /*水平居中*/
-            position: relative;
-            top: 50%; /*偏移*/
-            margin-top: -15px;
-            
-        }
-    }
-    .right{
-        height:60px;
-        border:1px solid #F0F0F0;
-        .listWrap{
-          height:50px;
-          margin-top:5px;
-          overflow-y: scroll;
-          overflow-x: hidden;
-          box-sizing: border-box;
-          .van-col{
-            color:#000;
-            margin-left:15px;
-            display: block;
-            width:100%;
-            padding:1px 0 2px;
-          }
-        }
-        
-        
-    }
-}
-    
-
-</style>
+<template>
+    <van-row class="recordList">
+      <van-row class="titleWrap">
+        <span class="line"></span>
+        <span class="title">文印助手</span>
+      </van-row>
+      <van-row class="type">
+        <van-col  class="bgc1 num1">
+          <van-row class="textTop">{{data.countSum}}份</van-row>
+          <van-row class="textBottom">打印总数</van-row>
+        </van-col>
+        <van-col  class="bgc2 num2">
+          <van-row class="textTop">{{data.countYun}}份</van-row>
+          <van-row class="textBottom">工作状态数</van-row>
+        </van-col>
+        <van-col  class="bgc4 num3">
+          <van-row class="textTop">{{data.countRequest}}份</van-row>
+          <van-row class="textBottom">任务列表数</van-row>
+        </van-col>
+      </van-row>
+      <van-row class="printing1">
+        <van-col span="5" class="bgc8 left">
+          <van-row class="text">文件名</van-row>
+        </van-col>
+        <van-col span="19" class="printingList right" >
+          <div class="listWrap">
+            <van-col v-for="(item,index) in data.list" :key="index">{{item}}</van-col>
+          </div>
+        </van-col>
+      </van-row>
+      
+    </van-row>
+</template>
+<script>
+export default {
+  props:["resInfo"],
+  data() {
+    return {
+      data:{
+        countRequest: 0,
+        countSum: 0,
+        countYun: 0,
+      },
+    };
+  },
+   watch:{
+    resInfo(val,old){
+      this.data = val
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.num1,.num2,.num3{
+  width:31%
+}
+.num2,.num3{
+  margin-left:3.5%;
+}
+.printing1{
+  margin-top:15px;
+  font-size: 14px;
+  .left{
+        height:60px;
+        border-radius: 6px;
+        color:#fff;
+        .text{
+            width:100%;
+            text-align: center;
+            letter-spacing: 2px;
+            display: block;
+            line-height: 25px;
+            margin: 0 auto; /*水平居中*/
+            position: relative;
+            top: 50%; /*偏移*/
+            margin-top: -15px;
+            
+        }
+    }
+    .right{
+        height:60px;
+        border:1px solid #F0F0F0;
+        .listWrap{
+          height:50px;
+          margin-top:5px;
+          overflow-y: scroll;
+          overflow-x: hidden;
+          box-sizing: border-box;
+          .van-col{
+            color:#000;
+            margin-left:15px;
+            display: block;
+            width:100%;
+            padding:1px 0 2px;
+          }
+        }
+        
+        
+    }
+}
+    
+
+</style>

+ 132 - 123
src/components/record/restaurant/index.vue

@@ -1,123 +1,132 @@
-<template>
-    <van-row class="recordList">
-      <van-row class="titleWrap">
-        <span class="line"></span>
-        <span class="title">餐饮管理</span>
-      </van-row>
-      <van-row class="type">
-        <van-col span="11" class="bgc5">
-          <van-row class="textTop" v-loading="loading">{{ data.nowIncome || 0 }}</van-row>
-          <van-row class="textBottom">今日营业额(元)</van-row>
-        </van-col>
-        <van-col span="11" class="bgc6" offset="2">
-          <van-row class="textTop" v-loading="loading">{{ data.consumerNowNumber || 0 }}</van-row>
-          <van-row class="textBottom">今日销售人/次</van-row>
-        </van-col>
-      </van-row>
-      <van-row class="dishes">
-        <van-col span="5" class="bgc7 left">
-          <van-row class="text">最受欢迎菜品</van-row>
-        </van-col>
-        <van-col span="19" class="dishesList right" v-loading="loading">
-          <van-row class="one" v-for="(item,index) in data.countTheTopThree" :key="index">
-              <van-col span="4" class="img" >
-                    <el-image
-                    :src="item.img"
-                    ></el-image>
-              </van-col>
-              <van-col span="20" class="name" >{{item.name}}<span :class=" index == '0' ? 'color1' : index == '1' ? 'color2' : 'color3' " id="num">{{item.countPid}}份</span></van-col>
-          </van-row>
-        </van-col>
-      </van-row>
-      
-    </van-row>
-</template>
-<script>
-import { getWeekDate } from "@/assets/js/dataFormate.js";
-import Cookies from "js-cookie";
-export default {
-  data() {
-    return {
-        loading:true,
-        num1:require('@/assets/image/组41@3x.png'),
-        num2:require('@/assets/image/组41拷贝@3x.png'),
-        num3:require('@/assets/image/组41拷贝2@3x.png'),
-        data:[]//真实数据
-    };
-  },
-  created(){
-    this.init()
-  },
-  mounted() {},
-  methods: {
-    init(){
-      this.loading = true
-      axios({
-        method: 'get',
-        url: 'https://smartpark.caih.com/zhcy/api/thirdparty/v1/open/getCanYinData',
-        timeout: 3000,
-      }).then(res =>{
-        this.data = res.data.data
-        if(this.data.countTheTopThree.length>0){
-          this.data.countTheTopThree[0].img= this.num1
-          this.data.countTheTopThree[1].img= this.num2
-          this.data.countTheTopThree[2].img= this.num3
-        }else{
-          this.data.countTheTopThree[0] = {img:this.num1,name:"暂未营业",countPid:0}
-          this.data.countTheTopThree[1] = {img:this.num2,name:"暂未营业",countPid:0}
-          this.data.countTheTopThree[2] = {img:this.num3,name:"暂未营业",countPid:0}
-        }
-        this.loading= false
-      })
-    },
-    timing(){
-      setInterval(() =>{
-        this.init()
-      },1000 * 60 * 5)
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.dishes{
-    font-size: 14px;
-    margin-top:15px;
-    .left{
-        height:100px;
-        border-radius: 6px;
-        color:#fff;
-        .text{
-            width:50%;
-            text-align: center;
-            letter-spacing: 2px;
-            display: block;
-            line-height: 25px;
-            margin: 0 auto; /*水平居中*/
-            position: relative;
-            top: 50%; /*偏移*/
-            margin-top: -40px;
-        }
-    }
-    .right{
-        height:100px;
-        border:1px solid #F0F0F0;
-        padding-top:15px;
-        .van-row{
-            margin: -6px 0 15px 15px;
-            .img{
-                width:18px;
-                vertical-align: middle;
-            }
-            .name{
-                color:#000;
-                margin-left:15px;
-                margin-top:-2px;
-                #num{
-                    margin-left:15px;
-                }
-            }
-        }
-    }
-}
-</style>
+<template>
+    <van-row class="recordList">
+      <van-row class="titleWrap">
+        <span class="line"></span>
+        <span class="title">餐饮管理</span>
+      </van-row>
+      <van-row class="type">
+        <van-col span="11" class="bgc5">
+          <van-row class="textTop" v-loading="loading">{{ data.yingyee || 0 }}</van-row>
+          <van-row class="textBottom">今日营业额(元)</van-row>
+        </van-col>
+        <van-col span="11" class="bgc6" offset="2">
+          <van-row class="textTop" v-loading="loading">{{ data.renci || 0 }}</van-row>
+          <van-row class="textBottom">今日销售人/次</van-row>
+        </van-col>
+      </van-row>
+      <van-row class="dishes">
+        <van-col span="5" class="bgc7 left">
+          <van-row class="text">最受欢迎菜品</van-row>
+        </van-col>
+        <van-col span="19" class="dishesList right" v-loading="loading">
+          <van-row class="one" v-for="(item,index) in data.zuori" :key="index">
+              <van-col span="4" class="img" >
+                    <el-image
+                    :src="item.img"
+                    ></el-image>
+              </van-col>
+              <van-col span="20" class="name" >{{item.name}}<span :class=" index == '0' ? 'color1' : index == '1' ? 'color2' : 'color3' " id="num">{{item.countPid}}份</span></van-col>
+          </van-row>
+        </van-col>
+      </van-row>
+      
+    </van-row>
+</template>
+<script>
+import { getWeekDate } from "@/assets/js/dataFormate.js";
+export default {
+  props:["resInfo"],
+  data() {
+    return {
+        loading:true,
+        num1:require('@/assets/image/组41@3x.png'),
+        num2:require('@/assets/image/组41拷贝@3x.png'),
+        num3:require('@/assets/image/组41拷贝2@3x.png'),
+        data:[]
+    };
+  },
+  created(){
+    //this.init()
+  },
+  watch:{
+    resInfo(val,old){
+      val.zuori[0].img = this.num1
+      val.zuori[1].img = this.num2
+      val.zuori[2].img = this.num3
+      this.data = val
+      this.loading= false
+    }
+  },
+  mounted() {},
+  methods: {
+    init(){
+      this.loading = true
+      axios({
+        method: 'get',
+        url: 'https://smartpark.caih.com/zhcy/api/thirdparty/v1/open/getCanYinData',
+        timeout: 3000,
+      }).then(res =>{
+        this.data = res.data.data
+        if(this.data.countTheTopThree.length>0){
+          this.data.countTheTopThree[0].img= this.num1
+          this.data.countTheTopThree[1].img= this.num2
+          this.data.countTheTopThree[2].img= this.num3
+        }else{
+          this.data.countTheTopThree[0] = {img:this.num1,name:"暂未营业",countPid:0}
+          this.data.countTheTopThree[1] = {img:this.num2,name:"暂未营业",countPid:0}
+          this.data.countTheTopThree[2] = {img:this.num3,name:"暂未营业",countPid:0}
+        }
+        this.loading= false
+      })
+    },
+    timing(){
+      setInterval(() =>{
+        this.init()
+      },1000 * 60 * 5)
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dishes{
+    font-size: 14px;
+    margin-top:15px;
+    .left{
+        height:100px;
+        border-radius: 6px;
+        color:#fff;
+        .text{
+            width:50%;
+            text-align: center;
+            letter-spacing: 2px;
+            display: block;
+            line-height: 25px;
+            margin: 0 auto; /*水平居中*/
+            position: relative;
+            top: 50%; /*偏移*/
+            margin-top: -40px;
+        }
+    }
+    .right{
+        height:100px;
+        border:1px solid #F0F0F0;
+        padding-top:15px;
+        .van-row{
+            margin: -6px 0 15px 15px;
+            .img{
+                width:18px;
+                vertical-align: middle;
+            }
+            .name{
+                color:#000;
+                margin-left:15px;
+                margin-top:-2px;
+                #num{
+                    margin-left:15px;
+                }
+            }
+        }
+    }
+}
+</style>

+ 163 - 166
src/components/weather/index.vue

@@ -1,166 +1,163 @@
-<template>
-  <el-row class="wrape">
-    <el-image
-    class="bgc"
-    :src="img3"
-    ></el-image>
-    <el-row class="bgcPad">
-        <el-row class="top">
-            <el-row class="add">
-                <el-image
-                class="img1"
-                :src="img1"
-                ></el-image>
-                <el-row class="addName">广西</el-row>
-            </el-row>
-            <el-row class="weather" v-if="data">
-                <div class="weatherImg">
-                    <el-image
-                    class="img2"
-                    :src="data.weather_pic"
-                    ></el-image>
-                </div>
-                <div class="wd">
-                    <el-row class="wdDX">{{data.temperature}}℃ <span class="weatherText">{{data.weather}}</span></el-row>
-                </div>
-            </el-row>
-        </el-row>
-        <el-row class="bottom">
-            <span class="sd">
-                湿度:{{data.sd}}RH
-            </span>
-            <span class="ph" v-if="data.aqiDetail">
-                PM2.5:{{data.aqiDetail.pm2_5}}ug/m3
-            </span>
-        </el-row>
-    </el-row>
-  </el-row>
-</template>
-<script>
-import axios from 'axios'
-export default {
-  data() {
-    return {
-        img1:require('@/assets/image/图层5@3x.png'),
-        img2:require('@/assets/image/图层6@3x.png'),
-        img3:require('@/assets/image/矩形 5 拷贝@3x.png'),
-        data:[]
-    };
-  },
-
-  created(){
-      this.initData()
-  },
-  methods: {
-    //初始化数据
-    initData() {
-      axios({
-            method: 'get',
-            url: 'https://smartpark.caih.com/dxapi/aliWeather?area=广西',
-            timeout: 3000,
-        }).then(res =>{
-            this.data = res.data.showapi_res_body.now
-            console.log(this.data.weather_pic)
-        }).catch(err =>{
-        })
-    },
-  }
-};
-
-</script>
-
-<style lang="scss" scoped>
-.wrape{
-
-    padding:20px 3% 0;
-    box-sizing: border-box;
-    background-color: #fff;
-    .bgc{
-        width:94%;
-        position: absolute;
-        z-index: 0;
-    }
-    .bgcPad{
-        padding:16px 14px;
-        color:#fff;
-        .top{
-            padding-bottom:2px;
-            border-bottom:1px solid #fff;
-            .add{
-                width:112px;
-                height:52px;
-                margin:7px 0 0 0px;
-                background-color: #E67877;
-                border-radius:26px;
-                position: relative;
-                display: inline-block;
-                .img1{
-                    width:21px;
-                    margin:15px 0 0 20px;
-                    display: inline-block;
-                    vertical-align: top;
-                }
-                .addName{
-                    display: inline-block;
-                    font-size: 22px;
-                    margin:10px 0 0 2px;
-                    letter-spacing: 4px;
-                }
-            }
-            .weather{
-                margin-left:51px;
-                top:-16px;
-                display: inline-block;
-                .weatherImg{
-                    width:60px;
-                    vertical-align: middle;
-                    float:left;
-                    .img2{
-                        width:100%;
-                    }
-                } 
-                .wd{
-                    vertical-align: middle;
-                    margin-left:8px;
-                    display: inline-block;
-                    width:calc(100% - 231px);
-                    margin-top:8px;
-                    .wdDX{
-                        display: inline-block;
-                        font-size: 22px;
-                        width:90px;
-                        letter-spacing: 2px;
-                        font-weight: 700;
-                        margin-top:15px;
-                        .weatherText{
-                            font-size: 9px;
-                            font-weight: 400;
-                            display: inline-block;
-                            
-                        }
-                    }
-                    .wdD-wdG{
-                        margin-top:8px;
-                        width:90px;
-                        letter-spacing: 2px;
-                    }
-                }
-            }
-             
-        }
-        .bottom{
-            font-size: 12px;
-            margin:16px 0 0;
-            letter-spacing: 2px;
-            .sd{
-
-            }
-            .ph{
-                margin-left:50px;
-                
-            }
-        }
-        
-    }
-}
-</style>
+<template>
+  <el-row class="wrape">
+    <el-image
+    class="bgc"
+    :src="img3"
+    ></el-image>
+    <el-row class="bgcPad">
+        <el-row class="top">
+            <el-row class="add">
+                <el-image
+                class="img1"
+                :src="img1"
+                ></el-image>
+                <el-row class="addName">广西</el-row>
+            </el-row>
+            <el-row class="weather" v-if="data">
+                <div class="weatherImg">
+                    <img :src="data.weather_pic" alt="" class="img2">
+                </div>
+                <div class="wd">
+                    <el-row class="wdDX">{{data.temperature}}℃ <span class="weatherText">{{data.weather}}</span></el-row>
+                </div>
+            </el-row>
+        </el-row>
+        <el-row class="bottom">
+            <span class="sd">
+                湿度:{{data.sd}}RH
+            </span>
+            <span class="ph" v-if="data.aqiDetail">
+                PM2.5:{{data.aqiDetail.pm2_5}}ug/m3
+            </span>
+        </el-row>
+    </el-row>
+  </el-row>
+</template>
+<script>
+import axios from 'axios'
+export default {
+  data() {
+    return {
+        img1:require('@/assets/image/图层5@3x.png'),
+        img2:require('@/assets/image/图层6@3x.png'),
+        img3:require('@/assets/image/矩形 5 拷贝@3x.png'),
+        data:{}
+    };
+  },
+
+  created(){
+      this.initData()
+  },
+  methods: {
+    //初始化数据
+    initData() {
+      axios({
+            method: 'get',
+            url: 'https://smartpark.caih.com/dxapi/aliWeather?area=广西',
+            timeout: 3000,
+        }).then(res =>{
+            this.data = res.data.showapi_res_body.now
+            console.log(this.data.weather_pic)
+        }).catch(err =>{
+        })
+    },
+  }
+};
+
+</script>
+
+<style lang="scss" scoped>
+.wrape{
+
+    padding:20px 3% 0;
+    box-sizing: border-box;
+    background-color: #fff;
+    .bgc{
+        width:94%;
+        position: absolute;
+        z-index: 0;
+    }
+    .bgcPad{
+        padding:16px 14px;
+        color:#fff;
+        .top{
+            padding-bottom:2px;
+            border-bottom:1px solid #fff;
+            .add{
+                width:112px;
+                height:52px;
+                margin:7px 0 0 0px;
+                background-color: #E67877;
+                border-radius:26px;
+                position: relative;
+                display: inline-block;
+                .img1{
+                    width:21px;
+                    margin:15px 0 0 20px;
+                    display: inline-block;
+                    vertical-align: top;
+                }
+                .addName{
+                    display: inline-block;
+                    font-size: 22px;
+                    margin:10px 0 0 2px;
+                    letter-spacing: 4px;
+                }
+            }
+            .weather{
+                margin-left:51px;
+                top:-16px;
+                display: inline-block;
+                .weatherImg{
+                    width:60px;
+                    vertical-align: middle;
+                    float:left;
+                    .img2{
+                        width:100%;
+                    }
+                } 
+                .wd{
+                    vertical-align: middle;
+                    margin-left:8px;
+                    display: inline-block;
+                    width:calc(100% - 231px);
+                    margin-top:8px;
+                    .wdDX{
+                        display: inline-block;
+                        font-size: 22px;
+                        width:90px;
+                        letter-spacing: 2px;
+                        font-weight: 700;
+                        margin-top:15px;
+                        .weatherText{
+                            font-size: 9px;
+                            font-weight: 400;
+                            display: inline-block;
+                            
+                        }
+                    }
+                    .wdD-wdG{
+                        margin-top:8px;
+                        width:90px;
+                        letter-spacing: 2px;
+                    }
+                }
+            }
+             
+        }
+        .bottom{
+            font-size: 12px;
+            margin:16px 0 0;
+            letter-spacing: 2px;
+            .sd{
+
+            }
+            .ph{
+                margin-left:50px;
+                
+            }
+        }
+        
+    }
+}
+</style>

+ 163 - 156
src/views/index/index.vue

@@ -1,156 +1,163 @@
-<template>
-  <div class="mianBox" >
-    <van-row class="headerBox">
-      运营中心
-    </van-row>
-    <van-row class="contentBox" v-if="loadingErp">
-      <weather alt="天气" />
-      <record alt="记录" />
-    </van-row>
-    <van-row class="mask" v-if="!loadingErp">
-      <loadingSZ />
-    </van-row>
-  </div>
-</template>
-
-<script>
-import axios from "axios";
-import { Toast } from "vant";
-import Cookies from "js-cookie";
-import { encrypt, encrypt2, decrypt } from "../../utils/jsencrypt";
-import weather from "@/components/weather";
-import record from "@/components/record";
-import loadingSZ from "@/components/loadingSZ";
-export default {
-  components: {
-    weather,
-    record,
-    loadingSZ
-  },
-  data() {
-    return {
-      loadingErp:false
-    };
-  },
-  created() {
-    var url = window.location.href;
-    if (url.indexOf("token") > 1) {
-      //("app进入")
-      if (this.getQueryVariable("token")) {
-        this.userQuery();
-      } else {
-        //console.log("app进入")
-        Toast(this.getQueryVariable("无token传入!"));
-      }
-    }else if(Cookies.get("token58")){
-      this.userQuery()
-    }else{
-      this.$router.push({ path: "/login"})
-    }
-  },
-  mounted() {},
-  methods: {
-    getQueryVariable(variable){//参数获取
-      //window.location.search.substring(1);
-      var query = window.location.hash.substring(3);
-      var vars = query.split("&");
-      for (var i=0;i<vars.length;i++) {
-        let pair = vars[i].split("=");
-        return pair[1];
-      }
-      return(false);
-    },
-    //用户查询
-    userQuery(){
-      let token = undefined
-      if(this.getQueryVariable("token")){
-        token = this.getQueryVariable("token")
-      }else{
-        token = Cookies.get("token58")
-      }
-      axios({//查询信息
-        method: 'get',
-        url: 'https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/getZkUserByCipher?cipher=' + token,
-        timeout: 10000,
-      }).then(res =>{
-        if(res.data?.data?.id){
-          this.loadingErp = true
-        }
-      }).catch(err =>{
-        this.loadingErp = false
-        this.userNoAlert()
-        this.$router.push({ path: "/login"})
-      });
-    },
-    userNoAlert(){
-      Toast("当前账户初始流程中,请耐心等待或联系管理人员查询")
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-html,
-body {
-  color: #fff;
-}
-.mask{
-  width:100%;
-  height:100%;
-  position: fixed;
-  z-index: 1;
-}
-.mianBox {
-  height: 100%;
-  width: 100%;
-  background-color: rgba(0, 0, 0, 0.01);
-  padding-top: 40px;
-  // box-sizing: border-box;
-  position: fixed;
-  overflow-y: scroll;
-  padding-bottom: 40px;
-
-  .contentBox {
-    width: 100%;
-    height: auto;
-    .record {
-      .recordList {
-        margin-top: 10px;
-        padding: 10px;
-        box-sizing: border-box;
-        background-color: #fff;
-        .listTitle {
-          font-size: 14px;
-          color: #000;
-          span {
-            width: 4px;
-            height: 14px;
-            display: inline-block;
-            background-color: #f22e3c;
-            margin-right: 4px;
-          }
-        }
-      }
-    }
-  }
-}
-.el-table th > .cell {
-  font-size: 11px;
-}
-</style>
-<style>
-.el-table td,
-.el-table th {
-  padding: 4px 0 !important;
-}
-.el-loading-mask {
-  background-color: transparent !important;
-}
-
-.el-table .cell {
-  padding-right: 0;
-}
-.tableScroll {
-  overflow-x: scroll;
-}
-</style>
+<template>
+  <div class="mianBox" >
+    <van-row class="headerBox">
+      运营中心
+    </van-row>
+    <van-row class="contentBox" v-if="loadingErp">
+      <weather alt="天气" />
+      <record alt="记录" />
+    </van-row>
+    <van-row class="mask" v-if="!loadingErp">
+      <loadingSZ />
+    </van-row>
+  </div>
+</template>
+
+<script>
+import axios from "axios";
+import { Toast } from "vant";
+import Cookies from "js-cookie";
+import { encrypt, encrypt2, decrypt } from "../../utils/jsencrypt";
+import weather from "@/components/weather";
+import record from "@/components/record";
+import loadingSZ from "@/components/loadingSZ";
+export default {
+  components: {
+    weather,
+    record,
+    loadingSZ
+  },
+  data() {
+    return {
+      loadingErp:false
+    };
+  },
+  created() {
+    var url = window.location.href;
+    if (url.indexOf("token") > 1) {
+      //("app进入")
+      if (this.getQueryVariable("token")) {
+        this.userQuery();
+      } else {
+        //console.log("app进入")
+        Toast(this.getQueryVariable("无token传入!"));
+      }
+    }else if(Cookies.get("tokenMT")){
+      this.userQuery()
+    }else{
+      this.$router.push({ path: "/login"})
+    }
+  },
+  mounted() {},
+  methods: {
+    getQueryVariable(variable){//参数获取
+      //window.location.search.substring(1);
+      var query = window.location.hash.substring(3);
+      var vars = query.split("&");
+      for (var i=0;i<vars.length;i++) {
+        let pair = vars[i].split("=");
+        return pair[1];
+      }
+      return(false);
+    },
+    //用户查询
+    userQuery(){
+      let token = undefined
+      if(this.getQueryVariable("token")){
+        token = this.getQueryVariable("token")
+      }else{
+        token = Cookies.get("tokenMT")
+      }
+      axios({//查询信息
+        method: 'get',
+        url: 'https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/getZkUserByCipher?cipher=' + token,
+        timeout: 10000,
+      }).then(res =>{
+        if(res.data?.data?.id){
+          this.loadingErp = true
+        }
+      }).catch(err =>{
+        Cookies.remove("usernameMT");
+        Cookies.remove("rememberMeMT");
+        Cookies.remove("passwordMT");
+        Cookies.remove("userIdMT");
+        Cookies.remove("tokenMT");
+        Cookies.remove("nonceMT");
+        Cookies.remove("timestampMT");
+        this.loadingErp = false
+        this.userNoAlert(err.response.data.message)
+        this.$router.push({ path: "/login"})
+      });
+    },
+    userNoAlert(msg){
+      Toast(msg)
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+html,
+body {
+  color: #fff;
+}
+.mask{
+  width:100%;
+  height:100%;
+  position: fixed;
+  z-index: 1;
+}
+.mianBox {
+  height: 100%;
+  width: 100%;
+  background-color: rgba(0, 0, 0, 0.01);
+  padding-top: 40px;
+  // box-sizing: border-box;
+  position: fixed;
+  overflow-y: scroll;
+  padding-bottom: 40px;
+
+  .contentBox {
+    width: 100%;
+    height: auto;
+    .record {
+      .recordList {
+        margin-top: 10px;
+        padding: 10px;
+        box-sizing: border-box;
+        background-color: #fff;
+        .listTitle {
+          font-size: 14px;
+          color: #000;
+          span {
+            width: 4px;
+            height: 14px;
+            display: inline-block;
+            background-color: #f22e3c;
+            margin-right: 4px;
+          }
+        }
+      }
+    }
+  }
+}
+.el-table th > .cell {
+  font-size: 11px;
+}
+</style>
+<style>
+.el-table td,
+.el-table th {
+  padding: 4px 0 !important;
+}
+.el-loading-mask {
+  background-color: transparent !important;
+}
+
+.el-table .cell {
+  padding-right: 0;
+}
+.tableScroll {
+  overflow-x: scroll;
+}
+</style>

+ 294 - 313
src/views/login/index.vue

@@ -1,314 +1,295 @@
-<template>
-  <div class="mianBox" >
-    <el-form class="login-form" auto-complete="on"  ref="loginForm" :model="loginForm" :rules="loginRules" v-if="login" :class="login?'opa1':'opa0'">
-      <img src="../../assets/image/login/login.png" alt="" class="login">
-      <el-form-item prop="username" width="460px">
-        <el-input v-model="loginForm.username"
-          ref="username"
-          placeholder="请输入用户名"
-          name="username"
-          @keyup.enter.native="login_info()"
-          type="text" auto-complete="off" >
-          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
-        </el-input>
-      </el-form-item>
-      <el-form-item prop="password" style="position: relative;width:100%">
-        <el-input
-          class="inputs"
-          ref="password"
-          placeholder="请输入密码"
-          name="password"
-          @keyup.enter.native="login_info()"
-          :type="passwordtxt"
-          v-model="loginForm.password"
-         >
-          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
-          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon eye"    @click="eyeTab" v-show="passwordtxt =='password'" />
-          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon  eye"   @click="eyeTab" v-show="passwordtxt =='text'" />
-        </el-input>
-      </el-form-item>
-      <!-- <el-form-item prop="code">
-        <el-input
-          v-model="loginForm.code"
-          auto-complete="off"
-          placeholder="验证码"
-          style="width: 63%"
-        >
-          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
-        </el-input>
-        <div class="login-code">
-          <img :src="codeUrl" @click="getCode" class="login-code-img"/>
-        </div>
-      </el-form-item> -->
-      <el-checkbox v-model="loginForm.rememberMe"  style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
-      <el-button
-        type="primary"
-        @click.native.prevent="login_info()"
-        @keyup.enter = "login_info()"
-        >
-        <span v-if="!loading" >登 录</span>
-        <span v-else>登 录 中...</span></el-button
-      >
-    </el-form>
-    <van-loading
-      size="24px"
-      v-if="loading"
-      color="#fff"
-      vertical
-      style="z-index: 2; position: fixed; top: 40%; left: 0; right: 0"
-      >登录中...</van-loading
-    >
-    <van-overlay :show="loading" style="z-index: 1; position: fixed;background-color: rgba(0,0,0,0.6);" />
-  </div>
-</template>
-<script>
-import { Toast } from "vant";
-import axios from "axios";
-import Cookies from "js-cookie";
-import { encrypt, decrypt } from '../../utils/jsencrypt';
-export default {
-  data() {
-    return {
-      login:false,
-      loading:false,
-      passwordtxt:"password",
-      codeUrl: "",
-      cookiePassword: "",
-      show_num:[],
-      // 验证码开关
-        // captchaOnOff: true,
-      loginForm: {
-        username: "",
-        password: "",
-        rememberMe: false,
-        code: "",
-        uuid: ""
-      },
-      loginRules: {
-        username: [
-          { required: true, trigger: "blur", message: "请输入您的账号" }
-        ],
-        password: [
-          { required: true, trigger: "blur", message: "请输入您的密码" }
-        ],
-        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
-      },
-      appid:"wxd64360a4b8c50006",
-      secret:"b758e45c89162542610509dafd9db7c3",
-      code:undefined,
-    };
-  },
-  mounted() {
-    if(Cookies.get('rememberMe58')){
-      this.loginForm.rememberMe = Boolean(Cookies.get('rememberMe58'))
-    }
-    if(Cookies.get("username58")){
-      this.loginForm.username = Cookies.get("username58")
-    }
-    if(Cookies.get("password58")){
-      this.loginForm.password = decrypt(Cookies.get("password58"))
-    }
-    if(Cookies.get("username58") && Cookies.get("password58")){
-      this.loginForm.username = Cookies.get("username58")
-      this.loginForm.password = decrypt(Cookies.get("password58"))
-      this.login = false
-      this.login_info()
-    }else{
-      this.login = true
-    }
-    
-  },
-  methods: {
-
-    eyeTab(){//密码显示开关
-      if(this.passwordtxt == "password"){
-        this.passwordtxt = "text"
-      }else{
-        this.passwordtxt = "password"
-      }
-    },
-    getCookie() {//缓存数据
-      const username = Cookies.get("username58");
-      const password = Cookies.get("password58");
-      const rememberMe = Cookies.get('rememberMe58')
-      this.loginForm = {
-        username: username === undefined ? this.loginForm.username : username,
-        password: password === undefined ? this.loginForm.password : decrypt(password),
-        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
-      };
-    },
-    login_info() {
-      if(Cookies.get("username58") && Cookies.get("password58")){
-        this.$router.push({ path: "/index"})
-      }else{
-        this.$refs.loginForm.validate(valid => {
-        if (valid) {
-          this.loading = true;
-          axios.get(`https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/appLogin?name=${this.loginForm.username}&pass=${this.loginForm.password}`).then(res => {
-            if (res?.data?.data?.data?.cipher) {
-              let data = res.data.data.data
-              //人员种类(00-正式人员、01-外协单位、02-租户)
-              if(data.user.dmUser.type == "00"){
-                //Toast('请使用"中国东信APP查看功能"')
-                  Cookies.set("username58", this.loginForm.username, { expires: 300 });
-                  Cookies.set("rememberMe58", this.loginForm.rememberMe, { expires: 300 });
-                  Cookies.set("password58", encrypt(this.loginForm.password), { expires: 300 });
-                  Cookies.set("userId58", data.user.id, { expires: 300 });
-                  Cookies.set("token58", data.cipher, { expires: 300 });
-                  Cookies.set("nonce58", data.nonce, { expires: 300 });
-                  Cookies.set("timestamp58", data.timestamp, { expires: 300 });
-                  this.$router.push({ path: "/index"})
-
-              }else if(data.user.dmUser.type == "01"){
-                if(data.user.dmUser.status == false){
-                  Toast("离职人员,暂无权限")
-                  return
-                }else{
-                  Cookies.set("username58", this.loginForm.username, { expires: 300 });
-                  Cookies.set("rememberMe58", this.loginForm.rememberMe, { expires: 300 });
-                  Cookies.set("password58", encrypt(this.loginForm.password), { expires: 300 });
-                  Cookies.set("userId58", data.user.id, { expires: 300 });
-                  Cookies.set("token58", data.token, { expires: 300 });
-                  Cookies.set("nonce58", data.nonce, { expires: 300 });
-                  Cookies.set("timestamp58", data.timestamp, { expires: 300 });
-                  this.$router.push({ path: "/index"})
-                }
-              }else if(data.user.dmUser.type == "02"){
-                Toast("暂无权限")
-              }else{
-
-              }
-            } 
-          }).catch(err =>{
-            Toast(err.response.data.message)
-          })
-          setTimeout(()=>{
-            this.loading = false
-          },2000)
-        }
-      });
-      }
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.mianBox{
-    color: #000;
-    position: fixed;
-    top:0;
-    left:0;
-    width:100%;
-    height:100%;
-    overflow: hidden;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    background-color: #fff;
-}
-.opa1{
-  opacity: 1;
-}
-.opa0{
-  opacity: 0;
-}
-.login-form {
-  border-radius: 6px;
-  background: #ffffff;
-  width: 90%;
-  position: absolute;
-  top:8%;
-  left:5%;
-  .login{
-    width:60%;
-    margin:10% 20%;
-  }
-  .el-form-item__content{
-    height:40px;
-  }
-  .login-tip {
-    font-size: 13px;
-    text-align: center;
-    color: #bfbfbf;
-  }
-  .login-code {
-    width: 33%;
-    height: 38px;
-    float: right;
-    margin-top:-2px;
-    text-align: right;
-    img {
-      cursor: pointer;
-      vertical-align: middle;
-    }
-  }
-  .el-login-footer {
-    height: 40px;
-    line-height: 40px;
-    position: fixed;
-    bottom: 0;
-    width: 100%;
-    text-align: center;
-    color: #fff;
-    font-family: Arial;
-    font-size: 12px;
-    letter-spacing: 1px;
-  }
-  .login-code-img {
-    height: 38px;
-  }
-
-  .el-button--primary{
-    width:100%;
-    margin-top:10px;
-    color: #fff;
-    background-color: rgba(242, 46, 60, 1);;
-    border-color: rgba(242, 46, 60, 1);;
-    border-radius: 4px;
-  }
-
-  .eye{
-    position: absolute;
-    top:12px;
-    
-  }
-  @media screen and (min-width: 300px) and (max-width: 330px){
-    .eye{
-      left:250px;
-    }
-  }
-  @media screen and (min-width: 340px) and (max-width: 365px){
-    .eye{
-      left:290px;
-    }
-  }
-  @media screen and (min-width: 365px) and (max-width: 380px){
-    .eye{
-      left:300px;
-    }
-  }
-  @media screen and (min-width: 381px) and (max-width: 400px){
-    .eye{
-      left:320px;
-    }
-  }
-  @media screen and (min-width: 401px) and (max-width: 420px){
-    .eye{
-      left:330px;
-    }
-  }
-  @media screen and (min-width: 421px) and (max-width: 440px){
-    .eye{
-      left:350px;
-    }
-  }
-  .el-input__inner{
-    padding-left:30px
-  }
-  .el-input__prefix{
-    left:8px !important;
-  }
-    
-}
+<template>
+  <div class="mianBox" >
+    <el-form class="login-form" auto-complete="on"  ref="loginForm" :model="loginForm" :rules="loginRules" v-if="login" :class="login?'opa1':'opa0'">
+      <img src="../../assets/image/login/login.png" alt="" class="login">
+      <el-form-item prop="username" width="460px">
+        <el-input v-model="loginForm.username"
+          ref="username"
+          placeholder="请输入用户名"
+          name="username"
+          @keyup.enter.native="login_info()"
+          type="text" auto-complete="off" >
+          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password" style="position: relative;width:100%">
+        <el-input
+          ref="password"
+          placeholder="请输入密码"
+          name="password"
+          @keyup.enter.native="login_info()"
+          :type="passwordtxt"
+          v-model="loginForm.password"
+         >
+          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+          
+        </el-input>
+        <div class="eyeWrap ">
+          <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon eye"    @click="eyeTab" v-show="passwordtxt =='password'" />
+          <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon  eye"   @click="eyeTab" v-show="passwordtxt =='text'" />
+        </div>
+        
+      </el-form-item>
+      <!-- <el-form-item prop="code">
+        <el-input
+          v-model="loginForm.code"
+          auto-complete="off"
+          placeholder="验证码"
+          style="width: 63%"
+        >
+          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+        </el-input>
+        <div class="login-code">
+          <img :src="codeUrl" @click="getCode" class="login-code-img"/>
+        </div>
+      </el-form-item> -->
+      <el-checkbox v-model="loginForm.rememberMe"  style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
+      <el-button
+        type="primary"
+        @click.native.prevent="login_info()"
+        @keyup.enter = "login_info()"
+        >
+        <span v-if="!loading" >登 录</span>
+        <span v-else>登 录 中...</span></el-button
+      >
+    </el-form>
+    <van-loading
+      size="24px"
+      v-if="loading"
+      color="#fff"
+      vertical
+      style="z-index: 2; position: fixed; top: 40%; left: 0; right: 0"
+      >登录中...</van-loading
+    >
+    <van-overlay :show="loading" style="z-index: 1; position: fixed;background-color: rgba(0,0,0,0.6);" />
+  </div>
+</template>
+<script>
+import { Toast } from "vant";
+import axios from "axios";
+import Cookies from "js-cookie";
+import { encrypt, decrypt } from '../../utils/jsencrypt';
+export default {
+  data() {
+    return {
+      login:false,
+      loading:false,
+      passwordtxt:"password",
+      codeUrl: "",
+      cookiePassword: "",
+      show_num:[],
+      // 验证码开关
+        // captchaOnOff: true,
+      loginForm: {
+        username: "",
+        password: "",
+        rememberMe: false,
+        code: "",
+        uuid: ""
+      },
+      loginRules: {
+        username: [
+          { required: true, trigger: "blur", message: "请输入您的账号" }
+        ],
+        password: [
+          { required: true, trigger: "blur", message: "请输入您的密码" }
+        ],
+        code: [{ required: true, trigger: "change", message: "请输入验证码" }]
+      },
+      appid:"wxd64360a4b8c50006",
+      secret:"b7MTe45c89162542610509dafd9db7c3",
+      code:undefined,
+    };
+  },
+  mounted() {
+    if(Cookies.get('rememberMeMT')){
+      this.loginForm.rememberMe = Boolean(Cookies.get('rememberMeMT'))
+    }
+    if(Cookies.get("usernameMT")){
+      this.loginForm.username = Cookies.get("usernameMT")
+    }
+    if(Cookies.get("passwordMT")){
+      this.loginForm.password = decrypt(Cookies.get("passwordMT"))
+    }
+    if(Cookies.get("usernameMT") && Cookies.get("passwordMT")){
+      this.loginForm.username = Cookies.get("usernameMT")
+      this.loginForm.password = decrypt(Cookies.get("passwordMT"))
+      this.login = false
+      this.login_info()
+    }else{
+      this.login = true
+    }
+    
+  },
+  methods: {
+
+    eyeTab(){//密码显示开关
+      if(this.passwordtxt == "password"){
+        this.passwordtxt = "text"
+      }else{
+        this.passwordtxt = "password"
+      }
+    },
+    getCookie() {//缓存数据
+      const username = Cookies.get("usernameMT");
+      const password = Cookies.get("passwordMT");
+      const rememberMe = Cookies.get('rememberMeMT')
+      this.loginForm = {
+        username: username === undefined ? this.loginForm.username : username,
+        password: password === undefined ? this.loginForm.password : decrypt(password),
+        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
+      };
+    },
+    login_info() {
+      if(Cookies.get("usernameMT") && Cookies.get("passwordMT")){
+        this.$router.push({ path: "/index"})
+      }else{
+        this.$refs.loginForm.validate(valid => {
+        if (valid) {
+          this.loading = true;
+          axios.get(`https://smartpark.caih.com/zkxt/api/thirdparty/v1/user/appLogin?name=${this.loginForm.username}&pass=${this.loginForm.password}`).then(res => {
+            if (res?.data?.data?.data?.cipher) {
+              let data = res.data.data.data
+              //人员种类(00-正式人员、01-外协单位、02-租户)
+              if(data.user.dmUser.type == "00"){
+                //Toast('请使用"中国东信APP查看功能"')
+                  Cookies.set("usernameMT", this.loginForm.username, { expires: 300 });
+                  Cookies.set("rememberMeMT", this.loginForm.rememberMe, { expires: 300 });
+                  Cookies.set("passwordMT", encrypt(this.loginForm.password), { expires: 300 });
+                  Cookies.set("userIdMT", data.user.id, { expires: 300 });
+                  Cookies.set("tokenMT", data.cipher, { expires: 300 });
+                  Cookies.set("nonceMT", data.nonce, { expires: 300 });
+                  Cookies.set("timestampMT", data.timestamp, { expires: 300 });
+                  this.$router.push({ path: "/index"})
+
+              }else if(data.user.dmUser.type == "01"){
+                if(data.user.dmUser.status == false){
+                  Toast("离职人员,暂无权限")
+                  return
+                }else{
+                  Cookies.set("usernameMT", this.loginForm.username, { expires: 300 });
+                  Cookies.set("rememberMeMT", this.loginForm.rememberMe, { expires: 300 });
+                  Cookies.set("passwordMT", encrypt(this.loginForm.password), { expires: 300 });
+                  Cookies.set("userIdMT", data.user.id, { expires: 300 });
+                  Cookies.set("tokenMT", data.token, { expires: 300 });
+                  Cookies.set("nonceMT", data.nonce, { expires: 300 });
+                  Cookies.set("timestampMT", data.timestamp, { expires: 300 });
+                  this.$router.push({ path: "/index"})
+                }
+              }else if(data.user.dmUser.type == "02"){
+                Toast("暂无权限")
+              }else{
+
+              }
+            } 
+          }).catch(err =>{
+            Toast(err.response.data.message)
+          })
+          setTimeout(()=>{
+            this.loading = false
+          },2000)
+        }
+      });
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.mianBox{
+    color: #000;
+    position: fixed;
+    top:0;
+    left:0;
+    width:100%;
+    height:100%;
+    overflow: hidden;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background-color: #fff;
+}
+.opa1{
+  opacity: 1;
+}
+.opa0{
+  opacity: 0;
+}
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 90%;
+  position: absolute;
+  top:8%;
+  left:5%;
+  .login{
+    width:60%;
+    margin:10% 20%;
+  }
+  .el-form-item__content{
+    height:40px;
+  }
+  .login-tip {
+    font-size: 13px;
+    text-align: center;
+    color: #bfbfbf;
+  }
+  .login-code {
+    width: 33%;
+    height: 38px;
+    float: right;
+    margin-top:-2px;
+    text-align: right;
+    img {
+      cursor: pointer;
+      vertical-align: middle;
+    }
+  }
+  .el-login-footer {
+    height: 40px;
+    line-height: 40px;
+    position: fixed;
+    bottom: 0;
+    width: 100%;
+    text-align: center;
+    color: #fff;
+    font-family: Arial;
+    font-size: 12px;
+    letter-spacing: 1px;
+  }
+  .login-code-img {
+    height: 38px;
+  }
+
+  .el-button--primary{
+    width:100%;
+    margin-top:10px;
+    color: #fff;
+    background-color: rgba(242, 46, 60, 1);;
+    border-color: rgba(242, 46, 60, 1);;
+    border-radius: 4px;
+  }
+.eyeWrap {
+  position: relative;
+  width:10%;
+  right:0;
+  height:2.5rem !important;
+  margin:-2.5rem 0 0 90%;;
+
+}
+.eye {
+  position: absolute;
+  right: 0.5rem;
+  top: 0.8rem;
+  fill: #ccc;
+}
+  .el-input__inner{
+    padding-left:30px
+  }
+  .el-input__prefix{
+    left:8px !important;
+  }
+    
+}
 </style>