pull/135/head
孙萌 2024-03-15 14:58:46 +08:00
parent ba3c63e15c
commit ac71d3e339
2 changed files with 36 additions and 20 deletions

View File

@ -131,15 +131,13 @@ export default {
}, 0);
},
downloadImage(url, filename) {
console.log(filename);
const link = document.createElement('a');
link.href = url;
link.download = filename;
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
link.click();
},
download() {
async download() {
// this.loading = this.$loading({
// lock: true,
// text: '',
@ -149,22 +147,39 @@ export default {
var store = this.$store.state
var index = store.equipmentIndex;
var data = {
deviceId: store.equipmentList[index - 1].deviceId,
startTime: this.getTime(this.dateRange[0]),
endTime: this.getTime(this.dateRange[1]),
page: this.currentPage,
pageSize: this.pageSize,
}
// var data = {
// deviceId: store.equipmentList[index - 1].deviceId,
// startTime: this.getTime(this.dateRange[0]),
// endTime: this.getTime(this.dateRange[1]),
// page: this.currentPage,
// pageSize: this.pageSize,
// }
// this.api.imageUploadImage(data).then(res=>{
// console.log(res,111);
// })
this.tableData.forEach((item, index) => {
const pictureUrl = item.pictureUrl;
const filename = `image_${item.updateTime}.jpg`;
var index = 0
// const pictureUrl = this.tableData[index].pictureUrl;
// const filename = `image_${this.tableData[index].updateTime}.jpg`;
// this.downloadImage(pictureUrl, filename);
const timer =setInterval(() => {
index += 1
if (index <= this.tableData.length) {
console.log(index, this.tableData,this.tableData.length);
const pictureUrl = this.tableData[index-1].pictureUrl;
const filename = `image_${this.tableData[index-1].updateTime}.jpg`;
this.downloadImage(pictureUrl, filename);
});
}else{
clearInterval(timer);
}
}, 501);
// this.tableData.forEach((item, index) => {
// const pictureUrl = item.pictureUrl;
// const filename = `image_${item.updateTime}.jpg`;
// this.downloadImage(pictureUrl, filename);
// });
// this.api.loadHistorydata(data).then(res => {
// // blob
// this.loading.close()

View File

@ -247,7 +247,7 @@
</div>
</div>
<div class="status-true-charts"
v-if="item.type == 6 || item.type == 5 || item.type == 2 || item.type == 15 || item.type == 14 || item.type == 13 || item.type == 12">
v-if="item.type == 6 || item.type == 5 || item.type == 2 || item.type == 15 || item.type == 14 || item.type == 13 || item.type == 12|| item.type == 16">
<img src="../../assets/img/status-true-charts-icon.png" alt="">
<div :id="'statusCharts' + index"></div>
</div>
@ -716,10 +716,11 @@ export default {
// simple-; standard-; security-; voice-; GitHub
template: 'security',
useHardDev: true,// 7.7.x 2023.11.7 7.7.6
// plugin: ["talk"], // talk-
plugin: ["talk"], // talk-
width: divW, // 1920 px
height: divH, // 1080 px
})
},
getIcon(item) {
var index = item.index
@ -1430,7 +1431,7 @@ export default {
setTimeout(() => {
this.statusList.forEach((el, index) => {
if (el.open != 0 && (el.type == 6 || el.type == 5 || el.type == 2 || el.type == 15 || el.type == 14 || el.type == 13 || el.type == 12)) {
if (el.open != 0 && (el.type == 6 || el.type == 5 || el.type == 2 || el.type == 15 || el.type == 14 ||el.type == 16 || el.type == 13 || el.type == 12)) {
setTimeout(() => {
statusCharts(`statusCharts${index}`, el.progress)