南昌市物联网技防平台-前端
zengh
2021-02-02 7ab21dcbd9ac533d8478f2bcb24f5ac9e61dce40
客户列表
1 files modified
58 ■■■■ changed files
src/views/clientManagement/clientManagement.vue 58 ●●●● patch | view | raw | blame | history
src/views/clientManagement/clientManagement.vue
@@ -51,11 +51,13 @@
            </el-tag>
          </template>
          <template slot-scope="{ row }" slot="jfzt">
            <el-tag>{{
              row.type == "0" ? "已缴费" : row.type == "1" ? "待缴费" : "无"
          <template slot-scope="{ row }" slot="expireTime">
            <span>
              {{
                row.expireTime
              }}
            </el-tag>
            </span>
            <i class="el-icon-warning" v-if="row.type == 1"></i>
          </template>
        </avue-crud>
@@ -75,7 +77,7 @@
</template>
<script>
  import {getList, remove, update, add, getclient, getDeptLazyTree,getAll} from "@/api/client/client";
  import {getList, remove, update, add, getclient, getDeptLazyTree, getAll} from "@/api/client/client";
  import {mapGetters} from "vuex";
  export default {
@@ -93,7 +95,7 @@
          total: 0
        },
        dialogTableVisible: false,
        gridData:null,
        gridData: null,
        selectionList: [],
        treeDeptId: '',
        treeData: [],
@@ -128,7 +130,7 @@
          labelWidth: '100',
          dialogWidth: 950,
          menuWidth: 160,
          size:"mini",
          size: "mini",
          tip: false,
          searchShow: true,
          searchMenuSpan: 4,
@@ -223,15 +225,8 @@
              label: "设备状态",
              prop: "dxzt",
              slot: true,
              addDisplay:false,
              editDisplay:false,
            }, {
              label: "缴费状态",
              prop: "jfzt",
              width: 100,
              addDisplay:false,
              editDisplay:false,
              slot: true,
              addDisplay: false,
              editDisplay: false,
            }, {
              label: "缴费信息",
              prop: "pay",
@@ -251,21 +246,22 @@
              label: "安装时间",
              prop: "stime",
              type: "datetime",
              format: "yyyy-MM-dd hh:mm:ss",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd hh:mm:ss",
              width: 130
            }, {
              label: "到期时间",
              prop: "expireTime",
              type: "datetime",
              format: "yyyy-MM-dd hh:mm:ss",
              slot: true,
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd hh:mm:ss",
              width: 130
              width: 150
            }, {
              label: "最后上传时间",
              prop: "heartbeat",
              type: "datetime",
              format: "yyyy-MM-dd hh:mm:ss",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd hh:mm:ss",
              width: 130
            },
@@ -411,7 +407,7 @@
            ...this.query
          };
          values.releaseTimeRange = null;
        }else{
        } else {
          values = {
            ...params,
            ...this.query
@@ -424,13 +420,13 @@
          var Dqdate = new Date().getTime();
          for(var i = 0;i< data.records.length;i++){
          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 == ""){
            } else if (data.records[i].heartbeat == "") {
              data.records[i].dxzt = 0;
            }else{
            } else {
              data.records[i].dxzt = 1;
            }
          }
@@ -439,7 +435,7 @@
          this.selectionClear();
        });
      }, rowStyle({row, column, rowIndex}) {
        if (row.heartbeat != null && row.heartbeat != "" ) {
        if (row.heartbeat != null && row.heartbeat != "") {
          var date = new Date(row.heartbeat).getTime();
          var Dqdate = new Date().getTime();
          if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) {
@@ -448,16 +444,16 @@
            };
          }
        }else if(row.heartbeat == ""){
        } else if (row.heartbeat == "") {
          return {
            color: "#fe1515"
          };
        }
      },
      payWin(){
      payWin() {
        var that = this;
        getAll().then(res => {
          var data =res.data.data;
          var data = res.data.data;
          var lists = [];
          var xb = 0;
          for (var i = 0; i < data.length; i++) {
@@ -467,7 +463,7 @@
              lists.push(data[i]);
            }
          }
          if (lists.length > 0){
          if (lists.length > 0) {
            that.gridData = lists;
            that.dialogTableVisible = true;
          }
@@ -479,12 +475,12 @@
</script>
<style>
  .payWin{
  .payWin {
    overflow-y: auto;
    height: 350px;
  }
  .payWin .el-dialog__body{
  .payWin .el-dialog__body {
    padding-top: 0px !important;
  }