添加活动列表导出

master
fanluyan 2 years ago
parent d8fe678fca
commit dfb7cf29cb

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

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

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

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

Loading…
Cancel
Save