|
@@ -52,7 +52,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div class="jp-table top" style="">
|
|
<div class="jp-table top" style="">
|
|
- <vxe-toolbar :refresh="{query: refreshList}" custom>
|
|
|
|
|
|
+ <vxe-toolbar :refresh="{query: refreshList}" ref="toolbarRef" export custom>
|
|
<template #buttons>
|
|
<template #buttons>
|
|
<el-button v-if="hasPermission('cw_work_client:info:add')" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
|
|
<el-button v-if="hasPermission('cw_work_client:info:add')" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -69,7 +69,6 @@
|
|
</vxe-toolbar>
|
|
</vxe-toolbar>
|
|
<div style="height: calc(100% - 90px)">
|
|
<div style="height: calc(100% - 90px)">
|
|
<vxe-table
|
|
<vxe-table
|
|
- :key="tableKey"
|
|
|
|
border="inner"
|
|
border="inner"
|
|
auto-resize
|
|
auto-resize
|
|
resizable
|
|
resizable
|
|
@@ -79,6 +78,15 @@
|
|
show-header-overflow
|
|
show-header-overflow
|
|
show-overflow
|
|
show-overflow
|
|
highlight-hover-row
|
|
highlight-hover-row
|
|
|
|
+ :print-config="{}"
|
|
|
|
+ :export-config="{
|
|
|
|
+ remote: true,
|
|
|
|
+ filename: `报告作废信息${moment(new Date()).format('YYYY-MM-DD')}`,
|
|
|
|
+ sheetName: '报告作废信息',
|
|
|
|
+ exportMethod: exportMethod,
|
|
|
|
+ types: ['xlsx'],
|
|
|
|
+ modes: ['current', 'selected', 'all']
|
|
|
|
+ }"
|
|
:menu-config="{}"
|
|
:menu-config="{}"
|
|
@sort-change="sortChangeHandle"
|
|
@sort-change="sortChangeHandle"
|
|
:sort-config="{remote:true}"
|
|
:sort-config="{remote:true}"
|
|
@@ -167,7 +175,8 @@
|
|
createBy: '',
|
|
createBy: '',
|
|
contractDates: [],
|
|
contractDates: [],
|
|
projectMasterName: '', // 项目经理1
|
|
projectMasterName: '', // 项目经理1
|
|
- projectMaster2Name: '' // 项目经理2
|
|
|
|
|
|
+ projectMaster2Name: '', // 项目经理2
|
|
|
|
+
|
|
},
|
|
},
|
|
dataList: [],
|
|
dataList: [],
|
|
tablePage: {
|
|
tablePage: {
|
|
@@ -176,7 +185,6 @@
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
orders: []
|
|
orders: []
|
|
},
|
|
},
|
|
- tableKey: '',
|
|
|
|
loading: false,
|
|
loading: false,
|
|
processDefinitionAuditId: '',
|
|
processDefinitionAuditId: '',
|
|
procDefAuditKey: '',
|
|
procDefAuditKey: '',
|
|
@@ -204,6 +212,12 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ //将表格和工具栏进行关联
|
|
|
|
+ const $table = this.$refs.clientTable;
|
|
|
|
+ const $toolbar = this.$refs.toolbarRef;
|
|
|
|
+ $table.connect($toolbar);
|
|
|
|
+ })
|
|
this.refreshList()
|
|
this.refreshList()
|
|
},
|
|
},
|
|
activated () {
|
|
activated () {
|
|
@@ -261,7 +275,6 @@
|
|
}).then((data) => {
|
|
}).then((data) => {
|
|
this.dataList = data.records
|
|
this.dataList = data.records
|
|
this.tablePage.total = data.total
|
|
this.tablePage.total = data.total
|
|
- this.tableKey = Math.random()
|
|
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
this.checkIsAdmin()
|
|
this.checkIsAdmin()
|
|
@@ -464,7 +477,34 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return false
|
|
return false
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 自定义服务端导出
|
|
|
|
+ exportMethod ({ options }) {
|
|
|
|
+ // 传给服务端的参数
|
|
|
|
+ const params = {
|
|
|
|
+ 'current': this.tablePage.currentPage,
|
|
|
|
+ 'size': this.tablePage.pageSize,
|
|
|
|
+ 'orders': this.tablePage.orders,
|
|
|
|
+ ...this.searchForm,
|
|
|
|
+ filename: options.filename,
|
|
|
|
+ sheetName: options.sheetName,
|
|
|
|
+ isHeader: options.isHeader,
|
|
|
|
+ original: options.original,
|
|
|
|
+ mode: options.mode,
|
|
|
|
+ selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
|
|
|
|
+ exportFields: options.columns.map(column => column.property)
|
|
|
|
+ }
|
|
|
|
+ console.log(111)
|
|
|
|
+ return this.reportCancellApplyService.exportExcel(params).then((res) => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
|
+ this.$utils.downloadExcel(res, options.filename)
|
|
|
|
+ }).catch(function (err) {
|
|
|
|
+ if (err.response) {
|
|
|
|
+ // console.log(err.response)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|