|
|
@ -34,6 +34,7 @@ |
|
|
: "" }} |
|
|
: "" }} |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
<!-- |
|
|
<el-table-column label="操作" align="center"> |
|
|
<el-table-column label="操作" align="center"> |
|
|
<template> |
|
|
<template> |
|
|
<el-tag class="move" style=" |
|
|
<el-tag class="move" style=" |
|
|
@ -45,6 +46,7 @@ |
|
|
</el-tag> |
|
|
</el-tag> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
--> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
<!--按钮--> |
|
|
<!--按钮--> |
|
|
@ -58,6 +60,10 @@ |
|
|
<div style="margin-top: 5px"> |
|
|
<div style="margin-top: 5px"> |
|
|
<el-button class="deleteButton" @click="btnDel">删除</el-button> |
|
|
<el-button class="deleteButton" @click="btnDel">删除</el-button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div style="margin-top: 5px"> |
|
|
|
|
|
<el-button class="commonbutton" @click="handleExport('commonTables')">导出</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- |
|
|
<div style="margin-top: 5px"> |
|
|
<div style="margin-top: 5px"> |
|
|
<el-button class="commonbutton" @click="btnSetTopOrBottom(1)">置顶</el-button> |
|
|
<el-button class="commonbutton" @click="btnSetTopOrBottom(1)">置顶</el-button> |
|
|
</div> |
|
|
</div> |
|
|
@ -67,6 +73,7 @@ |
|
|
<div style="margin-top: 5px"> |
|
|
<div style="margin-top: 5px"> |
|
|
<el-button class="commonbutton" @click="btnSort" :disabled="!isDrag">保存排序</el-button> |
|
|
<el-button class="commonbutton" @click="btnSort" :disabled="!isDrag">保存排序</el-button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
--> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -82,6 +89,7 @@ |
|
|
<script> |
|
|
<script> |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
import Sortable from "sortablejs"; |
|
|
import Sortable from "sortablejs"; |
|
|
|
|
|
import FileSaver from 'file-saver'; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { mapState } from "vuex"; |
|
|
import { mapState } from "vuex"; |
|
|
import { |
|
|
import { |
|
|
@ -157,6 +165,26 @@ export default { |
|
|
dddw, |
|
|
dddw, |
|
|
deepCopy, |
|
|
deepCopy, |
|
|
|
|
|
|
|
|
|
|
|
// 通用导出 |
|
|
|
|
|
handleExport(elId) { |
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
// let refsTable = this.$refs[elId] //.cloneNode(true) true |
|
|
|
|
|
let table = document.getElementById(elId) |
|
|
|
|
|
// console.log('table,refsTable', table, refsTable) |
|
|
|
|
|
|
|
|
|
|
|
let tableData = table.innerHTML |
|
|
|
|
|
let fileName = moment(new Date()).format('yyyyMMDDHHmmss') |
|
|
|
|
|
|
|
|
|
|
|
let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" }); |
|
|
|
|
|
|
|
|
|
|
|
FileSaver.saveAs(blob, fileName + '.xls'); |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 多列初始化 |
|
|
// 多列初始化 |
|
|
commonTableColsInit() { |
|
|
commonTableColsInit() { |
|
|
// console.log('refParams', this.refParams) |
|
|
// console.log('refParams', this.refParams) |
|
|
|