| | |
| | | </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> |
| | |
| | | labelWidth: '100', |
| | | dialogWidth: 950, |
| | | menuWidth: 160, |
| | | size:"mini", |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 4, |
| | |
| | | ] |
| | | }, { |
| | | 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", |
| | |
| | | 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 |
| | | }, |
| | | |
| | |
| | | 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(); |
| | |
| | | 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" |
| | | }; |
| | | } |
| | | }, |
| | |
| | | indexLabel: "序号", |
| | | calcHeight: 30, |
| | | labelWidth: "100", |
| | | size:"mini", |
| | | menuWidth: 240, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | |
| | | }; |
| | | } else { |
| | | return { |
| | | color: "#ff7627" |
| | | color: "#ff2727" |
| | | }; |
| | | } |
| | | }, |