添加活动列表导出

master
fanluyan 2 years ago
parent d8fe678fca
commit dfb7cf29cb

@ -77,7 +77,12 @@
:close-on-click-modal="false"
width="50%"
>
<el-button class="exportBtn" type="primary" @click="handleExport"
>导出活动列表</el-button
>
<el-table
ref="activityTable"
id="activityTable"
:data="termsData"
style="width: 100%"
:header-cell-style="{ 'text-align': 'center' }"
@ -106,7 +111,9 @@
</template>
<script>
import { updActivityApi, getqueryActivityApi } from "@/utils/api/index";
import htmlToExcel from "@/utils/htmlToExcel";
import { saveAs } from "file-saver";
import XLSX from "xlsx";
export default {
name: "activity",
components: {},
@ -142,6 +149,10 @@ export default {
this.getactivityList();
},
methods: {
//
handleExport() {
htmlToExcel.getExcel("#activityTable", "设备活动列表");
},
//
getactivityList() {
this.activityloading = true;
@ -310,9 +321,25 @@ export default {
top: 50%;
transform: translate(-50%, -50%);
}
.exportBtn {
position: absolute;
z-index: 1;
top: 16px;
right: 66px;
}
.el-dialog__body {
padding: 12px;
}
}
}
.el-dialog__headerbtn {
top: 18px;
.el-dialog__close {
font-size: 26px;
&:hover {
background: #e2e2e2;
}
}
}
</style>

@ -98,6 +98,9 @@
</el-table-column>
<el-table-column label="运维" prop="in_maintain" width="100" sortable>
<template slot="header" slot-scope="scope">
<p :class="ywNumber != 0 ? 'redClass' : 'noClass'">
{{ ywNumber }}<span> / {{ tableData.length }}</span>
</p>
<span @click.stop>
<el-checkbox
v-model="checkAllYW"
@ -123,6 +126,9 @@
</el-table-column>
<el-table-column label="快心跳" prop="quick_hb" width="108" sortable>
<template slot="header" slot-scope="scope">
<p :class="ywNumber != 0 ? 'redClass' : 'noClass'">
{{ kxtNumber }}<span> / {{ tableData.length }}</span>
</p>
<span @click.stop>
<el-checkbox
v-model="checkAllKXT"
@ -1528,6 +1534,19 @@ export default {
th.el-table__cell {
background: #d3d3d3;
}
.noClass {
color: #333;
font-size: 12px;
line-height: 12px;
}
.redClass {
color: red;
font-weight: 700;
line-height: 12px;
span {
color: #333;
}
}
thead.is-group th.el-table__cell {
background: #d3d3d3;
}

@ -580,4 +580,13 @@ export default {
}
}
}
.el-dialog__headerbtn {
top: 18px;
.el-dialog__close {
font-size: 26px;
&:hover {
background: #e2e2e2;
}
}
}
</style>

@ -188,13 +188,7 @@ export default {
});
this.getUpgradeList();
})
.catch(() => {
this.$message({
type: "info",
showClose: true,
message: "已取消删除",
});
});
.catch(() => {});
})
.catch((err) => {});
},
@ -314,4 +308,13 @@ export default {
}
}
}
.el-dialog__headerbtn {
top: 18px;
.el-dialog__close {
font-size: 26px;
&:hover {
background: #e2e2e2;
}
}
}
</style>

Loading…
Cancel
Save