|
@@ -37,7 +37,7 @@
|
|
|
icon="ibps-icon-sign-out"
|
|
icon="ibps-icon-sign-out"
|
|
|
@click="handleActionEvent('exportData')"
|
|
@click="handleActionEvent('exportData')"
|
|
|
>
|
|
>
|
|
|
- 导出模板
|
|
|
|
|
|
|
+ 导出数据
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
:key="4"
|
|
:key="4"
|
|
@@ -387,11 +387,43 @@ export default {
|
|
|
this.showImportTable = true
|
|
this.showImportTable = true
|
|
|
break
|
|
break
|
|
|
case 'exportData':
|
|
case 'exportData':
|
|
|
- this.handleExport(
|
|
|
|
|
- this.getColumns(),
|
|
|
|
|
- [],
|
|
|
|
|
- '参加外部质量评价活动计划项目详情(模板)'
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ this.$confirm('选择导出类型', '提示', {
|
|
|
|
|
+ confirmButtonText: '导出全部数据',
|
|
|
|
|
+ cancelButtonText: '导出模板',
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ const exportData =
|
|
|
|
|
+ JSON.parse(JSON.stringify(this.sjzlpjjhxData)) || []
|
|
|
|
|
+ const { userList = [] } = this.$store.getters || {}
|
|
|
|
|
+ for (let i of exportData) {
|
|
|
|
|
+ if (i.canYuRenYuan) {
|
|
|
|
|
+ const userNames = []
|
|
|
|
|
+ for (let j of i.canYuRenYuan.split(',')) {
|
|
|
|
|
+ const result = userList.find(
|
|
|
|
|
+ (a) => a.userId.trim() == j.trim()
|
|
|
|
|
+ )
|
|
|
|
|
+ userNames.push(result?.userName)
|
|
|
|
|
+ }
|
|
|
|
|
+ i.canYuRenYuan = userNames.join(',')
|
|
|
|
|
+ console.log(i.canYuRenYuan, 'qqqqqqqqq')
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.handleExport(
|
|
|
|
|
+ this.getColumns(),
|
|
|
|
|
+ exportData,
|
|
|
|
|
+ '参加外部质量评价活动计划项目详情'
|
|
|
|
|
+ )
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ this.handleExport(
|
|
|
|
|
+ this.getColumns(),
|
|
|
|
|
+ [],
|
|
|
|
|
+ '参加外部质量评价活动计划项目详情(模板)'
|
|
|
|
|
+ )
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
break
|
|
break
|
|
|
case 'copy':
|
|
case 'copy':
|
|
|
if (this.multipleSelection.length > 0) {
|
|
if (this.multipleSelection.length > 0) {
|