南昌市物联网技防平台-前端
zengh
2021-02-02 d35a98807edc441af16c9d3c5cb4948f4e0e69da
客户列表
2 files modified
70 ■■■■ changed files
src/views/clientManagement/clientManagement.vue 67 ●●●● patch | view | raw | blame | history
src/views/realTimePolice/real.vue 3 ●●●● patch | view | raw | blame | history
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"
          };
        }
      },
src/views/realTimePolice/real.vue
@@ -314,6 +314,7 @@
        indexLabel: "序号",
        calcHeight: 30,
        labelWidth: "100",
        size:"mini",
        menuWidth: 240,
        dialogWidth: 950,
        tip: false,
@@ -748,7 +749,7 @@
        };
      } else {
        return {
          color: "#ff7627"
          color: "#ff2727"
        };
      }
    },