对接ESC 培训中心导出

This commit is contained in:
wangchengming 2025-07-03 23:10:31 +08:00
parent 26876e499e
commit 7aaf04ba36
8 changed files with 125 additions and 31 deletions

View File

@ -62,6 +62,17 @@ export function getBusUserQualification(query) {
data: query
})
}
// ESC/培训中心资质申请记录导出
export function exportBusUserQualification(query) {
return request({
url: '/admin/busUserQualification/export',
method: 'post',
responseType: 'blob',
data: query
})
}
// 提交资质申请记录
export function submitBusUserQualification(query) {
return request({

View File

@ -9,6 +9,15 @@ export function getBusDependencyPage(query) {
})
}
// 查询属地列表 白名单
export function getCustomerBusDependencyPage(query) {
return request({
url: '/fe/getBusDependencyPage',
method: 'post',
data: query
})
}
// 查询属地详细
export function getBusDependency(busDependencyId) {
return request({

View File

@ -9,6 +9,15 @@ export function getSysSectionPage(query) {
})
}
// 查询科室 白名单
export function getCustomerSysSectionPage(query) {
return request({
url: '/fe/getSysSectionPage',
method: 'post',
data: query
})
}
// 查询详细
export function getSysSection(sectionId) {
return request({

View File

@ -51,7 +51,7 @@ import { onMounted, ref } from 'vue'
import { ElMessageBox } from "element-plus"
import systemlogo from '@/assets/logo/systemLogo.png'
import { resetPwd } from "@/api/system/user"
import { getBusDependencyPage } from "@/api/system/dependency"
import { getCustomerBusDependencyPage } from "@/api/system/dependency"
const router = useRouter()
const { proxy } = getCurrentInstance()
@ -95,7 +95,7 @@ onMounted(() => {
const busDependencyData = ref([])
//
const getBusDependencyData = () => {
getBusDependencyPage({
getCustomerBusDependencyPage({
pageIndex: 1,
pageSize: 100,
}).then(response => {

View File

@ -50,7 +50,7 @@
</el-form>
<div class="optionBtn">
<el-button type="primary" class="qualificationApplyBtn" @click="handleOpenApplyForm">
<el-button type="primary" class="qualificationApplyBtn" @click="handleExportExcel">
<img :src="exprotIcon" class="custom-icon" />
导出
</el-button>
@ -99,7 +99,7 @@ import { useRouter } from 'vue-router'
import Breadcrumb from '@/components/Breadcrumb'
import exprotIcon from '@/assets/images/exprotIcon.png'
import { deptTreeSelect, listUser } from "@/api/system/user"
import { getBusUserQualification } from "@/api/qualification/myQualifications"
import { getBusUserQualification, exportBusUserQualification } from "@/api/qualification/myQualifications"
const { proxy } = getCurrentInstance()
const router = useRouter()
@ -200,8 +200,37 @@ const resetQuery = () => {
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 handleOpenApplyForm = () => {
const handleExportExcel = () => {
exportBusUserQualification(queryParams.value).then(res => {
console.log('导出结果', res)
var downFileName = getCurrentTime()
// a
const a = document.createElement('a')
a.href = URL.createObjectURL(res)
// adownload
a.setAttribute(
'download',
downFileName
)
document.body.appendChild(a)
a.click();
document.body.removeChild(a)
proxy.$modal.msgSuccess("导出成功")
})
}
const handleView = (record) => {

View File

@ -50,7 +50,7 @@
</el-form>
<div class="optionBtn">
<el-button type="primary" class="qualificationApplyBtn" @click="handleOpenApplyForm">
<el-button type="primary" class="qualificationApplyBtn" @click="handleExportExcel">
<img :src="exprotIcon" class="custom-icon" />
导出
</el-button>
@ -71,10 +71,8 @@
<el-table-column prop="qualificationName" label="目标资质" width="130" />
<el-table-column prop="state" label="状态" width="160">
<template #default="scope">
<el-text v-if="scope.row.state == 1 && scope.row.node == 0" type="info"
class="infoinfoText">待审核</el-text>
<el-text v-if="scope.row.state == 1 && scope.row.node == 2" type="info"
class="infoinfoText">培训中心审核</el-text>
class="infoinfoText">待审核</el-text>
<el-text v-if="scope.row.state == 2" type="success" class="successText">通过</el-text>
<el-text v-if="scope.row.state == 9" type="danger" class="dangerText">驳回</el-text>
</template>
@ -99,7 +97,7 @@ import { useRouter } from 'vue-router'
import Breadcrumb from '@/components/Breadcrumb'
import exprotIcon from '@/assets/images/exprotIcon.png'
import { deptTreeSelect, listUser } from "@/api/system/user"
import { getBusUserQualification } from "@/api/qualification/myQualifications"
import { getBusUserQualification, exportBusUserQualification } from "@/api/qualification/myQualifications"
const { proxy } = getCurrentInstance()
const router = useRouter()
@ -200,8 +198,37 @@ const resetQuery = () => {
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 handleOpenApplyForm = () => {
const handleExportExcel = () => {
exportBusUserQualification(queryParams.value).then(res => {
console.log('导出结果', res)
var downFileName = getCurrentTime()
// a
const a = document.createElement('a')
a.href = URL.createObjectURL(res)
// adownload
a.setAttribute(
'download',
downFileName
)
document.body.appendChild(a)
a.click();
document.body.removeChild(a)
proxy.$modal.msgSuccess("导出成功")
})
}
const handleView = (record) => {

View File

@ -71,9 +71,9 @@ import { onMounted, ref } from 'vue'
import { ElMessageBox } from "element-plus"
import { register } from "@/api/login"
import systemlogo from '@/assets/logo/systemLogo.png'
import { getBusDependencyPage } from "@/api/system/dependency"
import { getCustomerBusDependencyPage } from "@/api/system/dependency"
import { customerDeptTreeSelect } from "@/api/system/user"
import { getSysSectionPage } from "@/api/system/section"
import { getCustomerSysSectionPage } from "@/api/system/section"
const router = useRouter()
const { proxy } = getCurrentInstance()
@ -129,7 +129,7 @@ onMounted(() => {
const sectionData = ref([])
//
const getSysSectionData = () => {
getSysSectionPage({
getCustomerSysSectionPage({
pageIndex: 1,
pageSize: 100,
}).then(res => {
@ -143,7 +143,7 @@ const getSysSectionData = () => {
const busDependencyData = ref([])
//
const getBusDependencyData = () => {
getBusDependencyPage({
getCustomerBusDependencyPage({
pageIndex: 1,
pageSize: 100,
}).then(response => {

View File

@ -11,8 +11,7 @@
@change="handleDateChange" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item>
<el-form-item label="属地">
<el-select v-model="queryParams.dependencyId" filterable placeholder="请选择属地"
@change="selectChanged">
<el-select v-model="queryParams.dependencyId" filterable placeholder="请选择属地" style="width: 200px">
<el-option v-for="item in busDependencyData" :key="item.id" :label="item.dependencyName"
:value="item.id" />
</el-select>
@ -56,29 +55,29 @@
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="localityName" label="属地" />
<el-table-column prop="departmentName" label="部门" />
<el-table-column prop="officeName" label="科室" />
<el-table-column prop="jobNumber" label="工号" />
<el-table-column prop="name" label="员工姓名" />
<el-table-column prop="status" label="状态" width="120">
<el-table-column prop="dependencyName" align="left" label="属地" :show-overflow-tooltip="true" />
<el-table-column prop="dept.deptName" align="left" label="部门" :show-overflow-tooltip="true"/>
<el-table-column prop="sectionName" align="left" label="科室" :show-overflow-tooltip="true"/>
<el-table-column prop="workNo" width="100" align="right" label="工号" />
<el-table-column prop="nickName" width="130" align="center" label="员工姓名" />
<el-table-column prop="status" label="状态" align="center" width="120">
<template #default="scope">
<el-text v-if="scope.row.status == 0" type="info" class="infoinfoText">待审核</el-text>
<el-text v-if="scope.row.status == 1" type="success" class="successText">通过</el-text>
<el-text v-if="scope.row.status == 2" type="danger" class="dangerText">驳回</el-text>
<el-text v-if="scope.row.status == 0" type="success" class="successText">通过</el-text>
<el-text v-if="scope.row.status == 3" type="danger" class="dangerText">驳回</el-text>
<el-text v-if="scope.row.status == 2" type="info" class="infoinfoText">待审核</el-text>
</template>
</el-table-column>
<el-table-column prop="expireTime" label="注册日期" width="130">
<el-table-column prop="createTime" align="center" label="注册日期" width="210">
<template #default="scope">
<span v-if="scope.row.expireTime && scope.row.certificate"> {{ scope.row.expireTime }}</span>
<span v-if="scope.row.createTime"> {{ scope.row.createTime }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" width="150">
<el-table-column label="操作" align="center" width="100">
<template #default="scope">
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.status != 0"
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.status != 2"
@click="handleView">查看</el-button>
<el-button type="primary" v-if="scope.row.status == 0" text class="replayTextBtn"
<el-button type="primary" v-if="scope.row.status == 2" text class="replayTextBtn"
@click="handleApproval">审批</el-button>
</template>
</el-table-column>
@ -95,6 +94,7 @@ import Breadcrumb from '@/components/Breadcrumb'
import { deptTreeSelect, listUser, checkRegisterUserList } from "@/api/system/user"
import { getBusDependencyPage } from "@/api/system/dependency"
const { proxy } = getCurrentInstance()
const router = useRouter()
const loading = ref(true)
const total = ref(0)
@ -177,6 +177,15 @@ const getcheckRegisterUserPageList = () => {
})
}
//
const handleDateChange = (val) => {
console.log('选择的日期范围:', val);
dateRange.value = val
if (val.length > 0) {
queryParams.value.startTime = val[0]
queryParams.value.endTime = val[1]
}
};
const handleFlod = () => {
unfoldFlag.value = !unfoldFlag.value
}