feat(fixcontact): 筛选区域改造及模板导入导出按钮
- 筛选区:定点联系所领导/相关分管所领导改用 DeptRoleUserSelectDropDown 按角色部门筛选 - 筛选区:新增联系单位(部门)、主办部门、协办部门筛选项(SzSelectDept) - 筛选区:移除联系时间、申请人筛选项 - 操作区:新增下载模板、模板校验、模板导入按钮 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -11,22 +11,43 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="4" :lg="6" :md="8" :sm="12">
|
<a-col :xl="4" :lg="6" :md="8" :sm="12">
|
||||||
<a-form-item label="定点联系所领导" name="contactLeader">
|
<a-form-item label="定点联系所领导" name="contactLeader">
|
||||||
<SzSelectUser v-model:value="queryParam.contactLeader" placeholder="请选择定点联系所领导" allow-clear style="width: 100%" @change="searchQuery" />
|
<DeptRoleUserSelectDropDown
|
||||||
|
v-model:value="queryParam.contactLeader"
|
||||||
|
:deptId="PARTY_COMMITTEE_DEPT_ID"
|
||||||
|
:roleId="CHARGE_LEADER_ROLE_ID"
|
||||||
|
placeholder="请选择定点联系所领导"
|
||||||
|
allow-clear
|
||||||
|
style="width: 100%"
|
||||||
|
@change="searchQuery"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="4" :lg="6" :md="8" :sm="12">
|
<a-col :xl="4" :lg="6" :md="8" :sm="12">
|
||||||
<a-form-item label="联系时间" name="contactTime">
|
<a-form-item label="联系单位(部门)" name="contactDept">
|
||||||
<a-date-picker v-model:value="queryParam.contactTime" value-format="YYYY-MM-DD" placeholder="请选择联系时间" allow-clear style="width: 100%" @change="searchQuery" />
|
<SzSelectDept v-model:value="queryParam.contactDept" placeholder="请选择联系单位" allow-clear style="width: 100%" @change="searchQuery" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="4" :lg="6" :md="8" :sm="12">
|
||||||
|
<a-form-item label="主办部门" name="hostDept">
|
||||||
|
<SzSelectDept v-model:value="queryParam.hostDept" placeholder="请选择主办部门" allow-clear style="width: 100%" @change="searchQuery" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-if="toggleSearchStatus" :xl="4" :lg="6" :md="8" :sm="12">
|
<a-col v-if="toggleSearchStatus" :xl="4" :lg="6" :md="8" :sm="12">
|
||||||
<a-form-item label="相关分管所领导" name="relatedLeader">
|
<a-form-item label="相关分管所领导" name="relatedLeader">
|
||||||
<SzSelectUser v-model:value="queryParam.relatedLeader" placeholder="请选择相关分管所领导" allow-clear style="width: 100%" @change="searchQuery" />
|
<DeptRoleUserSelectDropDown
|
||||||
|
v-model:value="queryParam.relatedLeader"
|
||||||
|
:deptId="PARTY_COMMITTEE_DEPT_ID"
|
||||||
|
:roleId="CHARGE_LEADER_ROLE_ID"
|
||||||
|
placeholder="请选择相关分管所领导"
|
||||||
|
allow-clear
|
||||||
|
style="width: 100%"
|
||||||
|
@change="searchQuery"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-if="toggleSearchStatus" :xl="4" :lg="6" :md="8" :sm="12">
|
<a-col v-if="toggleSearchStatus" :xl="4" :lg="6" :md="8" :sm="12">
|
||||||
<a-form-item label="申请人" name="applicant">
|
<a-form-item label="协办部门" name="coDept">
|
||||||
<SzSelectUser v-model:value="queryParam.applicant" placeholder="请选择申请人" allow-clear style="width: 100%" @change="searchQuery" />
|
<SzSelectDept v-model:value="queryParam.coDept" placeholder="请选择协办部门" allow-clear style="width: 100%" @change="searchQuery" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="4" :lg="6" :md="8" :sm="12">
|
<a-col :xl="4" :lg="6" :md="8" :sm="12">
|
||||||
@@ -50,6 +71,9 @@
|
|||||||
<a-button type="primary" v-auth="actionAuth.add" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
<a-button type="primary" v-auth="actionAuth.add" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
<a-button type="primary" v-auth="actionAuth.exportXls" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
<a-button type="primary" v-auth="actionAuth.exportXls" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||||
<j-upload-button type="primary" v-auth="actionAuth.importExcel" preIcon="ant-design:import-outlined" @click="onImportXls"> 导入</j-upload-button>
|
<j-upload-button type="primary" v-auth="actionAuth.importExcel" preIcon="ant-design:import-outlined" @click="onImportXls"> 导入</j-upload-button>
|
||||||
|
<a-button type="primary" v-auth="actionAuth.exportXls" preIcon="ant-design:download-outlined" @click="handleDownloadTemplate">下载模板</a-button>
|
||||||
|
<j-upload-button type="primary" v-auth="actionAuth.importExcel" preIcon="ant-design:check-outlined" @click="handleCheckExcel">模板校验</j-upload-button>
|
||||||
|
<j-upload-button type="primary" v-auth="actionAuth.importExcel" preIcon="ant-design:import-outlined" @click="handleImportByTemplate">模板导入</j-upload-button>
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu>
|
<a-menu>
|
||||||
@@ -135,14 +159,18 @@
|
|||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||||
import SzUserSelect from '/@/components/semri/userComponent/SzUserSelect.vue';
|
import DeptRoleUserSelectDropDown from '/@/components/semri/userComponent/DeptRoleUserSelectDropDown.vue';
|
||||||
|
import SzSelectDept from '/@/components/Form/src/jeecg/components/SzSelectDept.vue';
|
||||||
|
import { PARTY_COMMITTEE_DEPT_ID, CHARGE_LEADER_ROLE_ID } from '/@/constant/supervision';
|
||||||
import FixedContact20260730Modal from './components/FixedContact20260730Modal.vue';
|
import FixedContact20260730Modal from './components/FixedContact20260730Modal.vue';
|
||||||
import FlowScheduleStartModalForBG from '/src/components/semri/process/FlowScheduleStartModalForBG.vue';
|
import FlowScheduleStartModalForBG from '/src/components/semri/process/FlowScheduleStartModalForBG.vue';
|
||||||
import BusinessProcessListModal from '/src/components/semri/process/BusinessProcessListModal.vue';
|
import BusinessProcessListModal from '/src/components/semri/process/BusinessProcessListModal.vue';
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { startProcessSchedules } from '/@/api/common/api';
|
import { startProcessSchedules } from '/@/api/common/api';
|
||||||
import { dateUtil } from '/@/utils/dateUtil';
|
import { dateUtil } from '/@/utils/dateUtil';
|
||||||
import { columns, superQuerySchema, fixedContactFeedbackColumns } from './FixedContact20260730.data';
|
import { columns, superQuerySchema, fixedContactFeedbackColumns } from './FixedContact20260730.data';
|
||||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, fixedContactFeedbackList, saveOrUpdate, withDrawFixContact } from './FixedContact20260730.api';
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getExportXlsHeadersUrl, getImportExcelByEasyExcelUrl, getCheckExcelByEasyExcelUrl, fixedContactFeedbackList, saveOrUpdate, withDrawFixContact } from './FixedContact20260730.api';
|
||||||
|
import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||||
|
|
||||||
function expandIcon({ expanded, onExpand, record }: { expanded: boolean; onExpand: Function; record: Recordable }) {
|
function expandIcon({ expanded, onExpand, record }: { expanded: boolean; onExpand: Function; record: Recordable }) {
|
||||||
const iconCls = expanded
|
const iconCls = expanded
|
||||||
@@ -558,6 +586,63 @@
|
|||||||
sm: 20,
|
sm: 20,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
async function handleDownloadTemplate() {
|
||||||
|
const data = await defHttp.get(
|
||||||
|
{ url: getExportXlsHeadersUrl, params: {}, responseType: 'blob', timeout: 60000 },
|
||||||
|
{ isTransformResponse: false },
|
||||||
|
);
|
||||||
|
if (!data) {
|
||||||
|
createMessage.warning('文件下载失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const blob = new Blob([data]);
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = URL.createObjectURL(blob);
|
||||||
|
link.download = '定点联系单-导入模板.xls';
|
||||||
|
link.click();
|
||||||
|
URL.revokeObjectURL(link.href);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleImportByTemplate(data) {
|
||||||
|
const isReturn = (fileInfo) => {
|
||||||
|
try {
|
||||||
|
if (fileInfo.code === 500 || fileInfo.code === 510) {
|
||||||
|
if (fileInfo.result && Array.isArray(fileInfo.result) && fileInfo.result.length > 0) {
|
||||||
|
showImportValidationErrors(fileInfo.message || `${data.file.name} 导入失败`, fileInfo.result);
|
||||||
|
} else {
|
||||||
|
createMessage.error(fileInfo.message || `${data.file.name} 导入失败`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
createMessage.success(fileInfo.message || `${data.file.name} 导入成功`);
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// ignore
|
||||||
|
} finally {
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
await defHttp.uploadFile({ url: getImportExcelByEasyExcelUrl }, { file: data.file }, { success: isReturn });
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleCheckExcel(data) {
|
||||||
|
const isReturn = (fileInfo) => {
|
||||||
|
try {
|
||||||
|
if (fileInfo.code === 500 || fileInfo.code === 510) {
|
||||||
|
if (fileInfo.result && Array.isArray(fileInfo.result) && fileInfo.result.length > 0) {
|
||||||
|
showImportValidationErrors(fileInfo.message || `${data.file.name} 校验失败`, fileInfo.result);
|
||||||
|
} else {
|
||||||
|
createMessage.error(fileInfo.message || `${data.file.name} 校验失败`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
createMessage.success(fileInfo.message || `${data.file.name} 校验通过`);
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
};
|
||||||
|
await defHttp.uploadFile({ url: getCheckExcelByEasyExcelUrl }, { file: data.file }, { success: isReturn });
|
||||||
|
}
|
||||||
|
|
||||||
function searchReset() {
|
function searchReset() {
|
||||||
formRef.value?.resetFields();
|
formRef.value?.resetFields();
|
||||||
clearQueryParams();
|
clearQueryParams();
|
||||||
|
|||||||
Reference in New Issue
Block a user