add 带模板导入、人员信息(部分完成)

This commit is contained in:
赵霄
2023-09-04 16:09:35 +08:00
parent 83a55d9d29
commit 3ec511e114
9 changed files with 561 additions and 110 deletions
+3
View File
@@ -440,6 +440,9 @@ export const ConfigurableTableMixin = {
},
onClearSelected () {
this.selectedRowKeys = []
},
handleImportByFileId (fileId) {
// TODO 完善通过文件id上传文件的方法
}
}
}
+16 -7
View File
@@ -4,7 +4,7 @@
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
*/
import { filterObj } from '@/utils/util'
import { downFile, getAction, getFileAccessHttpUrl, postAction } from '@/api/manage'
import { downFile, downloadFile, getAction, getFileAccessHttpUrl, postAction } from '@/api/manage'
import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
import store from '@/store'
@@ -293,7 +293,7 @@ export const JeroListMixin = {
// 加一个大的提示
const modalLoading = this.$info({
title: '提示',
content: <span>正在导出请稍候 <a-spin size="small"/></span>,
content: <span>正在导出请稍候 <a-spin size="small" /></span>,
keyboard: false
})
// 把知道了这个按钮去掉
@@ -329,7 +329,7 @@ export const JeroListMixin = {
if (!this.loading) {
importModalLoading = this.$info({
title: '提示',
content: <span>正在导入请稍候 <a-spin size="small"/></span>,
content: <span>正在导入请稍候 <a-spin size="small" /></span>,
keyboard: false
})
}
@@ -353,9 +353,9 @@ export const JeroListMixin = {
this.$warning({
title: message,
content: (<div>
<span>{msg}</span><br/>
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
</div>
<span>{msg}</span><br />
<span>具体详情请 <a href={href} target="_blank" download={fileName}>点击下载</a> </span>
</div>
)
})
} else {
@@ -410,7 +410,16 @@ export const JeroListMixin = {
}
const url = getFileAccessHttpUrl(text)
window.open(url)
},
// 下载导入模板
downTemplate (fileName) {
if (!fileName || typeof fileName !== 'string') {
fileName = '模板文件'
}
downloadFile(this.url.downTemplateUrl, fileName + '.xlsx')
},
handleImportByFileId (fileId) {
// TODO 完善通过文件id上传文件的方法
}
}
}