对接标签申请记录导出
This commit is contained in:
parent
6abfa39b6b
commit
784a8fb2c9
|
|
@ -115,4 +115,14 @@ export function getUserLabels() {
|
|||
url: '/admin/busUserLabel/getUserLabels',
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
// 标签审核员标签申请记录导出
|
||||
export function exportBusUserLabel(query) {
|
||||
return request({
|
||||
url: '/admin/busUserLabel/export',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
|
@ -61,6 +61,11 @@
|
|||
<img :src="importIcon" class="custom-icon" />
|
||||
导入复训记录
|
||||
</el-button>
|
||||
<el-button type="primary" class="qualificationApplyBtn"
|
||||
v-hasPermi="['labelManage:adminApproval:export']" @click="handleExportExcel">
|
||||
<img :src="exprotIcon" class="custom-icon" />
|
||||
导出
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="borderLine"></div>
|
||||
<el-table v-loading="loading" :data="tableData" height="calc(100% - 220px)" style="width: 100%">
|
||||
|
|
@ -112,8 +117,9 @@ import { onMounted, ref } from 'vue'
|
|||
import { useRouter } from 'vue-router'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import importIcon from '@/assets/images/ImportIcon.png'
|
||||
import exprotIcon from '@/assets/images/exprotIcon.png'
|
||||
import { customerDeptTreeSelect, listUser } from "@/api/system/user"
|
||||
import { getUserLabelPageList, deleteBusUserLabel } from "@/api/labelManage/labelManage"
|
||||
import { getUserLabelPageList, deleteBusUserLabel, exportBusUserLabel } from "@/api/labelManage/labelManage"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { bus_label } = proxy.useDict("bus_label")
|
||||
|
|
@ -218,7 +224,38 @@ const resetQuery = () => {
|
|||
proxy.resetForm("queryRef")
|
||||
handleQuery()
|
||||
}
|
||||
const getCurrentTime = () => {
|
||||
//获取当前时间并打印
|
||||
var getTime = new Date().getTime(); //获取到当前时间戳
|
||||
var time = new Date(getTime); //创建一个日期对象
|
||||
var year = time.getFullYear(); // 年
|
||||
var month = (time.getMonth() + 1).toString().padStart(2, '0'); // 月
|
||||
var date = time.getDate().toString().padStart(2, '0'); // 日
|
||||
var hour = time.getHours().toString().padStart(2, '0'); // 时
|
||||
var minute = time.getMinutes().toString().padStart(2, '0'); // 分
|
||||
var second = time.getSeconds().toString().padStart(2, '0'); // 秒
|
||||
var gettime = year + month + date + hour + minute + second
|
||||
return gettime
|
||||
}
|
||||
// 导出
|
||||
const handleExportExcel = () => {
|
||||
exportBusUserLabel(queryParams.value).then(res => {
|
||||
var downFileName = getCurrentTime()
|
||||
// 通过a标签打开新页面下载文件
|
||||
const a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(res)
|
||||
// a标签里有download属性可以自定义文件名
|
||||
a.setAttribute(
|
||||
'download',
|
||||
downFileName
|
||||
)
|
||||
document.body.appendChild(a)
|
||||
a.click();
|
||||
document.body.removeChild(a)
|
||||
proxy.$modal.msgSuccess("导出成功")
|
||||
})
|
||||
|
||||
}
|
||||
// 删除
|
||||
const handleDetele = (record) => {
|
||||
const rowId = record.id
|
||||
|
|
|
|||
|
|
@ -55,7 +55,12 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div class="optionBtn" v-hasPermi="['labelManage:labelEscApproval:export']">
|
||||
<el-button type="primary" class="qualificationApplyBtn" @click="handleExportExcel">
|
||||
<img :src="exprotIcon" class="custom-icon" />
|
||||
导出
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="borderLine"></div>
|
||||
<el-table v-loading="loading" :data="tableData" height="calc(100% - 176px)" style="width: 100%">
|
||||
<el-table-column label="序号" width="60">
|
||||
|
|
@ -105,8 +110,9 @@
|
|||
import { onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import exprotIcon from '@/assets/images/exprotIcon.png'
|
||||
import { customerDeptTreeSelect, listUser } from "@/api/system/user"
|
||||
import { getUserLabelPageList, deleteBusUserLabel } from "@/api/labelManage/labelManage"
|
||||
import { getUserLabelPageList, deleteBusUserLabel, exportBusUserLabel } from "@/api/labelManage/labelManage"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { bus_label } = proxy.useDict("bus_label")
|
||||
|
|
@ -211,6 +217,38 @@ const resetQuery = () => {
|
|||
proxy.resetForm("queryRef")
|
||||
handleQuery()
|
||||
}
|
||||
const getCurrentTime = () => {
|
||||
//获取当前时间并打印
|
||||
var getTime = new Date().getTime(); //获取到当前时间戳
|
||||
var time = new Date(getTime); //创建一个日期对象
|
||||
var year = time.getFullYear(); // 年
|
||||
var month = (time.getMonth() + 1).toString().padStart(2, '0'); // 月
|
||||
var date = time.getDate().toString().padStart(2, '0'); // 日
|
||||
var hour = time.getHours().toString().padStart(2, '0'); // 时
|
||||
var minute = time.getMinutes().toString().padStart(2, '0'); // 分
|
||||
var second = time.getSeconds().toString().padStart(2, '0'); // 秒
|
||||
var gettime = year + month + date + hour + minute + second
|
||||
return gettime
|
||||
}
|
||||
// 导出
|
||||
const handleExportExcel = () => {
|
||||
exportBusUserLabel(queryParams.value).then(res => {
|
||||
var downFileName = getCurrentTime()
|
||||
// 通过a标签打开新页面下载文件
|
||||
const a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(res)
|
||||
// a标签里有download属性可以自定义文件名
|
||||
a.setAttribute(
|
||||
'download',
|
||||
downFileName
|
||||
)
|
||||
document.body.appendChild(a)
|
||||
a.click();
|
||||
document.body.removeChild(a)
|
||||
proxy.$modal.msgSuccess("导出成功")
|
||||
})
|
||||
|
||||
}
|
||||
// 删除
|
||||
const handleDetele = (record) => {
|
||||
const rowId = record.id
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user