|
@@ -2,7 +2,7 @@
|
|
|
import { onMounted, ref, getCurrentInstance } from "vue"
|
|
|
import Search from '@/components/icon/search.vue'
|
|
|
import Warning from '@/components/icon/warning.vue'
|
|
|
-import { get, _delete } from '../../../utils/request'
|
|
|
+import { get, _delete, downLoad} from '../../../utils/request'
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
const tableData = ref([])
|
|
@@ -52,12 +52,21 @@ function getManageTeamList() {
|
|
|
}
|
|
|
// 团队管理列表导出
|
|
|
function exportManageTeamList() {
|
|
|
- get('http://81.68.234.235:8032/pdf-tech/vppTeam/exportManageTeamList', {
|
|
|
- teamId: teamId.value,
|
|
|
- keyword: search.value
|
|
|
- }).then((res) => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+ let teamIds = teamId.value||null
|
|
|
+ let searchs = search.value||null
|
|
|
+ get('http://81.68.234.235:8032/pdf-tech/vppTeam/exportManageTeamList?teamId='+
|
|
|
+ teamIds +
|
|
|
+ '&' +
|
|
|
+ 'keyword=' +
|
|
|
+ searchs).then((res) => {
|
|
|
+ const link = document.createElement("a") //创建a标签
|
|
|
+ let blob = new Blob([res], { type: "application/vnd.ms-excel" }) // response就是接口返回的文件流
|
|
|
+ let objectUrl = URL.createObjectURL(blob)
|
|
|
+ link.href = objectUrl
|
|
|
+ link.download = "团队" // 自定义文件名
|
|
|
+ link.click() // 下载文件
|
|
|
+ URL.revokeObjectURL(objectUrl) // 释放内存
|
|
|
+ })
|
|
|
}
|
|
|
// 删除
|
|
|
function handleDelete() {
|