|
@@ -61,6 +61,7 @@ |
|
|
value-format="yyyy-MM-dd" |
|
|
value-format="yyyy-MM-dd" |
|
|
start-placeholder="开始日期" |
|
|
start-placeholder="开始日期" |
|
|
end-placeholder="结束日期" |
|
|
end-placeholder="结束日期" |
|
|
|
|
|
:picker-options="pickerOptions" |
|
|
> |
|
|
> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
<div style="margin-left: 10px; margin-top: 8px"> |
|
|
<div style="margin-left: 10px; margin-top: 8px"> |
|
@@ -85,6 +86,7 @@ |
|
|
placeholder="选择日期" |
|
|
placeholder="选择日期" |
|
|
format="yyyy - MM - dd " |
|
|
format="yyyy - MM - dd " |
|
|
value-format="yyyy-MM-dd" |
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
|
:picker-options="pickerOptions" |
|
|
> |
|
|
> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
</div> |
|
|
</div> |
|
@@ -631,6 +633,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import * as echarts from "echarts"; |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@@ -658,6 +661,12 @@ export default { |
|
|
imei: "", |
|
|
imei: "", |
|
|
total:10, |
|
|
total:10, |
|
|
recording: "", |
|
|
recording: "", |
|
|
|
|
|
}, |
|
|
|
|
|
pickerOptions: { |
|
|
|
|
|
disabledDate(time) { |
|
|
|
|
|
//根据当前日期 --- 禁止选中之后的日期 |
|
|
|
|
|
return time.getTime() > Date.now(); |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
details: { |
|
|
details: { |
|
|
equipmentQuantity: "", |
|
|
equipmentQuantity: "", |
|
@@ -724,7 +733,7 @@ export default { |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
return; |
|
|
|
|
|
|
|
|
// return; |
|
|
let theRequest=this.$route.query |
|
|
let theRequest=this.$route.query |
|
|
// console.log(theRequest,'123') //此时的theRequest就是我们需要的参数; |
|
|
// console.log(theRequest,'123') //此时的theRequest就是我们需要的参数; |
|
|
if (theRequest.houseId) { |
|
|
if (theRequest.houseId) { |
|
@@ -733,6 +742,7 @@ export default { |
|
|
this.timeType = theRequest.timeType; |
|
|
this.timeType = theRequest.timeType; |
|
|
} else { |
|
|
} else { |
|
|
this.flag = false; |
|
|
this.flag = false; |
|
|
|
|
|
// console.log(1); |
|
|
this.timeType = 4; |
|
|
this.timeType = 4; |
|
|
} |
|
|
} |
|
|
if (theRequest.startDate) { |
|
|
if (theRequest.startDate) { |
|
@@ -749,19 +759,11 @@ export default { |
|
|
// this.getTableList() |
|
|
// this.getTableList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
//情空时间选择器 |
|
|
|
|
|
clearTime() { |
|
|
|
|
|
// let str='' |
|
|
|
|
|
if (this.selectTime1) { |
|
|
|
|
|
this.$refs.time.valueOnOpen = ""; |
|
|
|
|
|
console.log(this.$refs.time); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
radioChange() { |
|
|
radioChange() { |
|
|
this.clearTime(); |
|
|
|
|
|
this.selectTime = ""; |
|
|
this.selectTime = ""; |
|
|
this.selectTime1 = ""; |
|
|
this.selectTime1 = ""; |
|
|
this.compareList = []; |
|
|
this.compareList = []; |
|
|
|
|
|
this.$set(this, "time", null); |
|
|
}, |
|
|
}, |
|
|
goinfo(row, idx) { |
|
|
goinfo(row, idx) { |
|
|
console.log(row, "信息"); |
|
|
console.log(row, "信息"); |
|
@@ -775,7 +777,7 @@ export default { |
|
|
// "&flag=" + |
|
|
// "&flag=" + |
|
|
// idx; |
|
|
// idx; |
|
|
this.$router.push({ |
|
|
this.$router.push({ |
|
|
url:'', |
|
|
|
|
|
|
|
|
path:'/Equipment/equipmentOnlineRecordList', |
|
|
query:{ |
|
|
query:{ |
|
|
houseId:this.houseId, |
|
|
houseId:this.houseId, |
|
|
startDate: row.createTime, |
|
|
startDate: row.createTime, |
|
@@ -943,19 +945,21 @@ export default { |
|
|
}, |
|
|
}, |
|
|
//获取楼盘数据 |
|
|
//获取楼盘数据 |
|
|
getHouseList() { |
|
|
getHouseList() { |
|
|
axios({ |
|
|
|
|
|
url: `${jypath}/equipment/onlinerecord/findAllProperties`, |
|
|
|
|
|
method: "get", |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
|
|
|
this.$api.api |
|
|
|
|
|
.findHouseByUser({ |
|
|
|
|
|
orgType: localStorage.getItem("orgType"), |
|
|
|
|
|
}) |
|
|
|
|
|
.then((res) => { |
|
|
// console.log(res.data.obj) |
|
|
// console.log(res.data.obj) |
|
|
if (res.data.res == 1) { |
|
|
|
|
|
this.houseList = res.data.obj; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.houseList = res.data; |
|
|
if (!this.flag) { |
|
|
if (!this.flag) { |
|
|
// console.log(this.flag.'12') |
|
|
|
|
|
this.houseId = res.data.obj[0].id; |
|
|
|
|
|
|
|
|
console.log(this.flag,'12') |
|
|
|
|
|
this.houseId = res.data[0].id; |
|
|
} |
|
|
} |
|
|
// console.log(this.flag,'12') |
|
|
// console.log(this.flag,'12') |
|
|
this.tabtimetap(this.timeType); |
|
|
this.tabtimetap(this.timeType); |
|
|
|
|
|
// return |
|
|
this.getTableList(); |
|
|
this.getTableList(); |
|
|
// this.getdetail() |
|
|
// this.getdetail() |
|
|
// res.data.obj.results.forEach((item,index)=>{ |
|
|
// res.data.obj.results.forEach((item,index)=>{ |
|
@@ -963,7 +967,7 @@ export default { |
|
|
// }) |
|
|
// }) |
|
|
// this.tableData=res.data.obj.results; |
|
|
// this.tableData=res.data.obj.results; |
|
|
// this.page.total = res.data.obj.totalRecord; |
|
|
// this.page.total = res.data.obj.totalRecord; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
handleSizeChange(val) { |
|
|
handleSizeChange(val) { |
|
@@ -990,24 +994,25 @@ export default { |
|
|
getcompare() { |
|
|
getcompare() { |
|
|
this.compareFlag = 0; |
|
|
this.compareFlag = 0; |
|
|
let obj = { |
|
|
let obj = { |
|
|
pageSize: this.pageSize, |
|
|
|
|
|
pageNum: this.pageNum, |
|
|
|
|
|
|
|
|
current: this.pageNum, |
|
|
|
|
|
pageSize: this.pageNum, |
|
|
startDate: this.page.openTime, |
|
|
startDate: this.page.openTime, |
|
|
endDate: this.page.closeTime, |
|
|
endDate: this.page.closeTime, |
|
|
houseId: this.houseId, |
|
|
houseId: this.houseId, |
|
|
timeType: this.timeType, |
|
|
timeType: this.timeType, |
|
|
contrastStartDate: this.selectTime, |
|
|
contrastStartDate: this.selectTime, |
|
|
contrastEndDate: this.selectTime1, |
|
|
contrastEndDate: this.selectTime1, |
|
|
|
|
|
orgType: localStorage.getItem("orgType"), |
|
|
}; |
|
|
}; |
|
|
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); |
|
|
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); |
|
|
axios({ |
|
|
axios({ |
|
|
url: `${jypath}/zk/equipment/detail/usageTrendContrast`, |
|
|
|
|
|
|
|
|
url: `autoSR/zk/equipment/detail/usageTrendContrast`, |
|
|
method: "get", |
|
|
method: "get", |
|
|
params: obj, |
|
|
params: obj, |
|
|
}) |
|
|
}) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
// console.log(res) |
|
|
// console.log(res) |
|
|
this.total = res.data.obj.first.totalRecord; |
|
|
|
|
|
|
|
|
this.total = res.data.first.totalRecord; |
|
|
// 数据处理 |
|
|
// 数据处理 |
|
|
let arr = []; |
|
|
let arr = []; |
|
|
if (this.pageNum == 1) { |
|
|
if (this.pageNum == 1) { |
|
@@ -1015,22 +1020,22 @@ export default { |
|
|
name: "项目合计", |
|
|
name: "项目合计", |
|
|
first: this.details, |
|
|
first: this.details, |
|
|
second: this.details1, |
|
|
second: this.details1, |
|
|
contrast: res.data.obj.total, |
|
|
|
|
|
|
|
|
contrast: res.data.total, |
|
|
// time:'', |
|
|
// time:'', |
|
|
// time1:'' |
|
|
// time1:'' |
|
|
}; |
|
|
}; |
|
|
arr.push(obj1); |
|
|
arr.push(obj1); |
|
|
} |
|
|
} |
|
|
res.data.obj.first.results.map((item, index) => { |
|
|
|
|
|
|
|
|
res.data.first.records.map((item, index) => { |
|
|
let obj = {}; |
|
|
let obj = {}; |
|
|
//当他为0的时候 |
|
|
//当他为0的时候 |
|
|
obj.name = |
|
|
obj.name = |
|
|
res.data.obj.first.results[index].createTime.substring(5, 10) + |
|
|
|
|
|
|
|
|
res.data.first.records[index].createTime.substring(5, 10) + |
|
|
"VS" + |
|
|
"VS" + |
|
|
res.data.obj.second.results[index].createTime.substring(5, 10); |
|
|
|
|
|
obj.first = res.data.obj.first.results[index]; |
|
|
|
|
|
obj.second = res.data.obj.second.results[index]; |
|
|
|
|
|
obj.contrast = res.data.obj.contrast[index]; |
|
|
|
|
|
|
|
|
res.data.second.records[index].createTime.substring(5, 10); |
|
|
|
|
|
obj.first = res.data.first.records[index]; |
|
|
|
|
|
obj.second = res.data.second.records[index]; |
|
|
|
|
|
obj.contrast = res.data.contrast[index]; |
|
|
// obj.time='' |
|
|
// obj.time='' |
|
|
// obj.time1='' |
|
|
// obj.time1='' |
|
|
arr.push(obj); |
|
|
arr.push(obj); |
|
@@ -1110,19 +1115,20 @@ export default { |
|
|
timeType: this.timeType, |
|
|
timeType: this.timeType, |
|
|
contrastStartDate: this.selectTime, |
|
|
contrastStartDate: this.selectTime, |
|
|
contrastEndDate: this.selectTime1, |
|
|
contrastEndDate: this.selectTime1, |
|
|
|
|
|
orgType: localStorage.getItem("orgType"), |
|
|
}; |
|
|
}; |
|
|
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); |
|
|
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); |
|
|
axios({ |
|
|
axios({ |
|
|
url: `${jypath}/zk/equipment/detail/usageTrend`, |
|
|
|
|
|
|
|
|
url: `autoSR/zk/equipment/detail/usageTrend`, |
|
|
method: "get", |
|
|
method: "get", |
|
|
params: obj, |
|
|
params: obj, |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
// console.log(res) |
|
|
// console.log(res) |
|
|
if (res.data.res == 1) { |
|
|
|
|
|
this.details = res.data.obj.first; |
|
|
|
|
|
if (res.data.obj.second) { |
|
|
|
|
|
this.details1 = res.data.obj.second; |
|
|
|
|
|
this.compare = res.data.obj.contrast; |
|
|
|
|
|
|
|
|
if (res.code == 0) { |
|
|
|
|
|
this.details = res.data.first; |
|
|
|
|
|
if (res.data.second) { |
|
|
|
|
|
this.details1 = res.data.second; |
|
|
|
|
|
this.compare = res.data.contrast; |
|
|
} |
|
|
} |
|
|
let itemobj = { |
|
|
let itemobj = { |
|
|
objopts: [ |
|
|
objopts: [ |
|
@@ -1217,26 +1223,27 @@ export default { |
|
|
var url = ""; |
|
|
var url = ""; |
|
|
this.tableData = []; |
|
|
this.tableData = []; |
|
|
let obj = { |
|
|
let obj = { |
|
|
pageNum: this.page.pageNum, |
|
|
|
|
|
|
|
|
current: this.page.pageNum, |
|
|
pageSize: this.page.pageSize, |
|
|
pageSize: this.page.pageSize, |
|
|
startDate: this.page.openTime, |
|
|
startDate: this.page.openTime, |
|
|
endDate: this.page.closeTime, |
|
|
endDate: this.page.closeTime, |
|
|
houseId: this.houseId, |
|
|
houseId: this.houseId, |
|
|
timeType: this.timeType, |
|
|
timeType: this.timeType, |
|
|
|
|
|
orgType: localStorage.getItem("orgType"), |
|
|
}; |
|
|
}; |
|
|
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); |
|
|
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); |
|
|
axios({ |
|
|
axios({ |
|
|
url: `${jypath}/zk/equipment/detail/equipmentCountDetail`, |
|
|
|
|
|
|
|
|
url: `autoSR/zk/equipment/detail/equipmentCountDetail`, |
|
|
method: "get", |
|
|
method: "get", |
|
|
params: obj, |
|
|
params: obj, |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
// console.log(res) |
|
|
// console.log(res) |
|
|
if (res.data.res == 1) { |
|
|
|
|
|
res.data.obj.results.forEach((item, index) => { |
|
|
|
|
|
|
|
|
if (res.code == 0) { |
|
|
|
|
|
res.data.records.forEach((item, index) => { |
|
|
item.index = index + 1; |
|
|
item.index = index + 1; |
|
|
}); |
|
|
}); |
|
|
this.tableData = res.data.obj.results; |
|
|
|
|
|
this.page.total = res.data.obj.totalRecord; |
|
|
|
|
|
|
|
|
this.tableData = res.data.records; |
|
|
|
|
|
this.page.total = res.data.totalRecord; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|