From 7aaf04ba3668a8b4f5cebfd9991a8f531cb99a8b Mon Sep 17 00:00:00 2001 From: wangchengming <15110151257@163.com> Date: Thu, 3 Jul 2025 23:10:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5ESC=20=E5=9F=B9=E8=AE=AD?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qualification/myQualifications.js | 11 +++++ src/api/system/dependency.js | 9 ++++ src/api/system/section.js | 9 ++++ src/views/forgetPassword.vue | 4 +- src/views/qualification/escApproval/index.vue | 35 ++++++++++++++-- .../qualification/trainApproval/index.vue | 39 +++++++++++++++--- src/views/register.vue | 8 ++-- src/views/system/userApproval/index.vue | 41 +++++++++++-------- 8 files changed, 125 insertions(+), 31 deletions(-) diff --git a/src/api/qualification/myQualifications.js b/src/api/qualification/myQualifications.js index 247c9d5..453fa8c 100644 --- a/src/api/qualification/myQualifications.js +++ b/src/api/qualification/myQualifications.js @@ -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({ diff --git a/src/api/system/dependency.js b/src/api/system/dependency.js index 8f559ad..987f3f1 100644 --- a/src/api/system/dependency.js +++ b/src/api/system/dependency.js @@ -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({ diff --git a/src/api/system/section.js b/src/api/system/section.js index db238aa..561ad5c 100644 --- a/src/api/system/section.js +++ b/src/api/system/section.js @@ -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({ diff --git a/src/views/forgetPassword.vue b/src/views/forgetPassword.vue index 49ad7ba..c0971f7 100644 --- a/src/views/forgetPassword.vue +++ b/src/views/forgetPassword.vue @@ -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 => { diff --git a/src/views/qualification/escApproval/index.vue b/src/views/qualification/escApproval/index.vue index e0b27bf..46765ec 100644 --- a/src/views/qualification/escApproval/index.vue +++ b/src/views/qualification/escApproval/index.vue @@ -50,7 +50,7 @@
- + 导出 @@ -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) + // a标签里有download属性可以自定义文件名 + a.setAttribute( + 'download', + downFileName + ) + document.body.appendChild(a) + a.click(); + document.body.removeChild(a) + proxy.$modal.msgSuccess("导出成功") + }) } const handleView = (record) => { diff --git a/src/views/qualification/trainApproval/index.vue b/src/views/qualification/trainApproval/index.vue index 0dad3c3..021e92e 100644 --- a/src/views/qualification/trainApproval/index.vue +++ b/src/views/qualification/trainApproval/index.vue @@ -50,7 +50,7 @@
- + 导出 @@ -71,10 +71,8 @@ @@ -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) + // a标签里有download属性可以自定义文件名 + a.setAttribute( + 'download', + downFileName + ) + document.body.appendChild(a) + a.click(); + document.body.removeChild(a) + proxy.$modal.msgSuccess("导出成功") + }) } const handleView = (record) => { diff --git a/src/views/register.vue b/src/views/register.vue index 6b02147..0aba93f 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -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 => { diff --git a/src/views/system/userApproval/index.vue b/src/views/system/userApproval/index.vue index 1303317..fb55d89 100644 --- a/src/views/system/userApproval/index.vue +++ b/src/views/system/userApproval/index.vue @@ -11,8 +11,7 @@ @change="handleDateChange" start-placeholder="开始日期" end-placeholder="结束日期" /> - + @@ -56,29 +55,29 @@ {{ scope.$index + 1 }} - - - - - - + + + + + + - + - + @@ -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 }