添加告警导出

jc1.0
fanluyan 1 year ago
parent fdc1a31676
commit 2ad4f5dd68

@ -39,6 +39,13 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit"></el-button> <el-button type="primary" @click="onSubmit"></el-button>
<el-button
type="primary"
icon="el-icon-document"
class="exportBtn"
@click="exportWarn"
>导出数据</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -240,6 +247,21 @@ export default {
handleClose() { handleClose() {
this.dialogVisible = false; this.dialogVisible = false;
}, },
//
exportWarn() {
this.formdata.starttime = this.$moment(this.formdata.starttime).format(
"YYYY-MM-DD HH:mm:ss"
);
this.formdata.endtime = this.$moment(this.formdata.endtime).format(
"YYYY-MM-DD HH:mm:ss"
);
window.location.href =
"/cac-api/warning/export?" +
"startTime=" +
this.formdata.starttime +
"&endTime=" +
this.formdata.endtime;
},
}, },
}; };
</script> </script>

@ -68,7 +68,7 @@
<li>告警等级</li> <li>告警等级</li>
</ul> </ul>
<div class="marquee"> <div class="marquee">
<ul class="scrollUl"> <ul class="scrollUl" v-if="tableData.length !== 0">
<li v-for="(item, index) in tableData" :key="index"> <li v-for="(item, index) in tableData" :key="index">
<span>{{ item.warnTime }}</span> <span>{{ item.warnTime }}</span>
<span>{{ item.zsbName }}</span> <span>{{ item.zsbName }}</span>
@ -83,6 +83,7 @@
> >
</li> </li>
</ul> </ul>
<div v-else class="empty">暂无告警</div>
</div> </div>
</div> </div>
<warnDialog ref="warnRef"></warnDialog> <warnDialog ref="warnRef"></warnDialog>
@ -194,7 +195,7 @@ export default {
} }
.cardContent { .cardContent {
margin-top: 10px; margin-top: 10px;
height: 100%; height: calc(100% - 54px);
.warntitle { .warntitle {
width: 100%; width: 100%;
@ -232,7 +233,7 @@ export default {
} }
} }
.marquee { .marquee {
height: calc(100% - 80px); height: calc(100% - 26px);
display: flex; display: flex;
overflow: hidden; overflow: hidden;
margin-top: 2px; margin-top: 2px;
@ -277,6 +278,13 @@ export default {
} }
} }
} }
.empty {
text-align: center;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
} }
@keyframes scrollTop { @keyframes scrollTop {

Loading…
Cancel
Save