From 8f73dc70d203a5be14c74fa99d5906abcbe332fc Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 02 Feb 2021 17:16:10 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/jfpt-Vue

---
 src/views/clientManagement/clientManagement.vue |   67 +++++++++++++++++++++++----------
 1 files changed, 47 insertions(+), 20 deletions(-)

diff --git a/src/views/clientManagement/clientManagement.vue b/src/views/clientManagement/clientManagement.vue
index f5254a7..0309872 100644
--- a/src/views/clientManagement/clientManagement.vue
+++ b/src/views/clientManagement/clientManagement.vue
@@ -44,9 +44,16 @@
             </el-tag>
           </template>
 
-          <template slot-scope="{ row }" slot="dtype">
+          <template slot-scope="{ row }" slot="dxzt">
             <el-tag>{{
-              row.dtype == "0" ? "掉线" : row.dtype == "1" ? "在线" : "无"
+              row.dxzt == "0" ? "掉线" : row.dxzt == "1" ? "在线" : "无"
+              }}
+            </el-tag>
+          </template>
+
+          <template slot-scope="{ row }" slot="jfzt">
+            <el-tag>{{
+              row.type == "0" ? "已缴费" : row.type == "1" ? "待缴费" : "无"
               }}
             </el-tag>
           </template>
@@ -121,6 +128,7 @@
           labelWidth: '100',
           dialogWidth: 950,
           menuWidth: 160,
+          size:"mini",
           tip: false,
           searchShow: true,
           searchMenuSpan: 4,
@@ -213,20 +221,20 @@
               ]
             }, {
               label: "设备状态",
-              prop: "dtype",
-              search: true,
+              prop: "dxzt",
               slot: true,
-              type: "select",
-              dicData: [
-                {
-                  label: "掉线",
-                  value: "0"
-                },
-                {
-                  label: "在线",
-                  value: "1"
-                }
-              ]
+              addDisplay:false,
+              editDisplay:false,
+            }, {
+              label: "缴费状态",
+              prop: "jfzt",
+              width: 100,
+              addDisplay:false,
+              editDisplay:false,
+              slot: true,
+            }, {
+              label: "缴费信息",
+              prop: "pay",
             }, {
               label: "设备类型",
               prop: "deviceType",
@@ -240,19 +248,25 @@
               prop: "street",
               width: 150
             }, {
-              label: "缴费信息",
-              prop: "pay",
-            }, {
               label: "安装时间",
               prop: "stime",
+              type: "datetime",
+              format: "yyyy-MM-dd hh:mm:ss",
+              valueFormat: "yyyy-MM-dd hh:mm:ss",
               width: 130
             }, {
               label: "到期时间",
               prop: "expireTime",
+              type: "datetime",
+              format: "yyyy-MM-dd hh:mm:ss",
+              valueFormat: "yyyy-MM-dd hh:mm:ss",
               width: 130
             }, {
               label: "最后上传时间",
               prop: "heartbeat",
+              type: "datetime",
+              format: "yyyy-MM-dd hh:mm:ss",
+              valueFormat: "yyyy-MM-dd hh:mm:ss",
               width: 130
             },
 
@@ -407,6 +421,19 @@
         getList(page.currentPage, page.pageSize, values, this.treeDeptId).then(res => {
           const data = res.data.data;
           this.page.total = data.total;
+
+          var Dqdate = new Date().getTime();
+
+          for(var i = 0;i< data.records.length;i++){
+            var date = new Date(data.records[i].heartbeat).getTime();
+            if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) {
+              data.records[i].dxzt = 0;
+            }else if(data.records[i].heartbeat == ""){
+              data.records[i].dxzt = 0;
+            }else{
+              data.records[i].dxzt = 1;
+            }
+          }
           this.data = data.records;
           this.loading = false;
           this.selectionClear();
@@ -417,13 +444,13 @@
           var Dqdate = new Date().getTime();
           if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) {
             return {
-              color: "#15a2fe"
+              color: "#fe1515"
             };
           }
 
         }else if(row.heartbeat == ""){
           return {
-            color: "#15a2fe"
+            color: "#fe1515"
           };
         }
       },

--
Gitblit v1.9.3