|
@@ -4,7 +4,7 @@
|
|
|
<el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
|
|
<el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item :to="{ path: '/oilsupplier/technologyservice' }">技术服务类资质对照表</el-breadcrumb-item>
|
|
<el-breadcrumb-item :to="{ path: '/oilsupplier/technologyservice' }">技术服务类资质对照表</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
</el-breadcrumb>
|
|
|
- <el-card class="box-card" style="height: calc(100vh - 115px);">
|
|
|
|
|
|
|
+ <el-card class="box-card" style="height: calc(100vh - 115px);" v-loading="loading">
|
|
|
<div slot="header">
|
|
<div slot="header">
|
|
|
<span>
|
|
<span>
|
|
|
<i class="icon icon-table2"></i> 技术服务类资质对照表
|
|
<i class="icon icon-table2"></i> 技术服务类资质对照表
|
|
@@ -261,6 +261,7 @@
|
|
|
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ loading: false,
|
|
|
codeeditshow: false,
|
|
codeeditshow: false,
|
|
|
classid: '',
|
|
classid: '',
|
|
|
deptsetVisible: false,
|
|
deptsetVisible: false,
|
|
@@ -468,38 +469,63 @@
|
|
|
this.dynamicTableColumns = res.data.items
|
|
this.dynamicTableColumns = res.data.items
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- exportExcel() {
|
|
|
|
|
- this.size = this.currentItemCount; //表格长度变长
|
|
|
|
|
- this.initDatas()
|
|
|
|
|
- this.$nextTick(function () {
|
|
|
|
|
- /* generate workbook object from table */
|
|
|
|
|
- let table = document.querySelector("#rebateSetTable").cloneNode(true); //克隆备份(原table不动)
|
|
|
|
|
- // 因为element-ui的表格的fixed属性导致多出一个table,会下载重复内容,这里删除掉
|
|
|
|
|
- table.removeChild(table.querySelector(".el-table__fixed-right")) //删掉备份的子节点
|
|
|
|
|
- let wb = XLSX.utils.table_to_book(table, {
|
|
|
|
|
- raw: true
|
|
|
|
|
- });
|
|
|
|
|
- /* get binary string as output */
|
|
|
|
|
- let wbout = XLSX.write(wb, {
|
|
|
|
|
- bookType: "xlsx",
|
|
|
|
|
- bookSST: true,
|
|
|
|
|
- type: "array"
|
|
|
|
|
- });
|
|
|
|
|
- try {
|
|
|
|
|
- FileSaver.saveAs(
|
|
|
|
|
- new Blob([wbout], {
|
|
|
|
|
- type: "application/octet-stream"
|
|
|
|
|
- }),
|
|
|
|
|
- "Technology.xlsx"
|
|
|
|
|
- );
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- if (typeof console !== "undefined") console.log(e, wbout);
|
|
|
|
|
- }
|
|
|
|
|
- this.size = '10'; //表格还原
|
|
|
|
|
- this.initDatas()
|
|
|
|
|
- return wbout
|
|
|
|
|
|
|
+ // exportExcel() {
|
|
|
|
|
+ // this.size = this.currentItemCount; //表格长度变长
|
|
|
|
|
+ // this.initDatas()
|
|
|
|
|
+ // this.$nextTick(function () {
|
|
|
|
|
+ // /* generate workbook object from table */
|
|
|
|
|
+ // let table = document.querySelector("#rebateSetTable").cloneNode(true); //克隆备份(原table不动)
|
|
|
|
|
+ // // 因为element-ui的表格的fixed属性导致多出一个table,会下载重复内容,这里删除掉
|
|
|
|
|
+ // table.removeChild(table.querySelector(".el-table__fixed-right")) //删掉备份的子节点
|
|
|
|
|
+ // let wb = XLSX.utils.table_to_book(table, {
|
|
|
|
|
+ // raw: true
|
|
|
|
|
+ // });
|
|
|
|
|
+ // /* get binary string as output */
|
|
|
|
|
+ // let wbout = XLSX.write(wb, {
|
|
|
|
|
+ // bookType: "xlsx",
|
|
|
|
|
+ // bookSST: true,
|
|
|
|
|
+ // type: "array"
|
|
|
|
|
+ // });
|
|
|
|
|
+ // try {
|
|
|
|
|
+ // FileSaver.saveAs(
|
|
|
|
|
+ // new Blob([wbout], {
|
|
|
|
|
+ // type: "application/octet-stream"
|
|
|
|
|
+ // }),
|
|
|
|
|
+ // "Technology.xlsx"
|
|
|
|
|
+ // );
|
|
|
|
|
+ // } catch (e) {
|
|
|
|
|
+ // if (typeof console !== "undefined") console.log(e, wbout);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.size = '10'; //表格还原
|
|
|
|
|
+ // this.initDatas()
|
|
|
|
|
+ // return wbout
|
|
|
|
|
+ // })
|
|
|
|
|
+ //
|
|
|
|
|
+ // },
|
|
|
|
|
+ exportExcel () {
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ // 显示列
|
|
|
|
|
+ let showcolumn = this.tableColumns.concat(this.dynamicTableColumns)
|
|
|
|
|
+ let showcolumnarr = []
|
|
|
|
|
+ let showcolumnnamearr = []
|
|
|
|
|
+
|
|
|
|
|
+ for (var i = 0; i < showcolumn.length; i++) {
|
|
|
|
|
+ showcolumnarr.push(showcolumn[i].label)
|
|
|
|
|
+ showcolumnnamearr.push(showcolumn[i].prop.replace(/,/g, ','))
|
|
|
|
|
+ }
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ _currentPage: this.currentPage,
|
|
|
|
|
+ _size: this.size,
|
|
|
|
|
+ Order: this.Column.Order,
|
|
|
|
|
+ Prop: this.Column.Prop,
|
|
|
|
|
+ Edition: '2',
|
|
|
|
|
+ showcolumnarr: showcolumnarr + '',
|
|
|
|
|
+ showcolumnnamearr: showcolumnnamearr + ''
|
|
|
|
|
+ }
|
|
|
|
|
+ api.exportExcelAll(params, this.$axios).then(res => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ window.location = 'http://' + res.data
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
Name1Change(val) {
|
|
Name1Change(val) {
|
|
|
this.formData.Code2 = this.formData.Code2.replace(/^(\w{0})\w{2}(.*)$/, '$1' + val + '$2')
|
|
this.formData.Code2 = this.formData.Code2.replace(/^(\w{0})\w{2}(.*)$/, '$1' + val + '$2')
|