!143 fix(fixcontact): 修复前端页面 QA 审查发现的问题
Merge pull request !143 from wsm/fix/fix_contact_qa
This commit is contained in:
@@ -9,7 +9,6 @@ enum Api {
|
||||
edit = '/bg/fixcontact/fixedContact20260730/edit',
|
||||
deleteOne = '/bg/fixcontact/fixedContact20260730/delete',
|
||||
deleteBatch = '/bg/fixcontact/fixedContact20260730/deleteBatch',
|
||||
importExcel = '/bg/fixcontact/fixedContact20260730/importExcel',
|
||||
exportXls = '/bg/fixcontact/fixedContact20260730/exportXls',
|
||||
exportXlsHeaders = '/bg/fixcontact/fixedContact20260730/exportXlsHeaders',
|
||||
importExcelByEasyExcel = '/bg/fixcontact/fixedContact20260730/importExcelByEasyExcel',
|
||||
@@ -20,7 +19,6 @@ enum Api {
|
||||
}
|
||||
|
||||
export const getExportUrl = Api.exportXls;
|
||||
export const getImportUrl = Api.importExcel;
|
||||
export const getExportXlsHeadersUrl = Api.exportXlsHeaders;
|
||||
export const getImportExcelByEasyExcelUrl = Api.importExcelByEasyExcel;
|
||||
export const getCheckExcelByEasyExcelUrl = Api.checkExcelByEasyExcel;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<template #label>
|
||||
<a-tooltip title="支持模糊查询">表单编号</a-tooltip>
|
||||
</template>
|
||||
<a-tooltip title="支持模糊查询"><JInput v-model:value="queryParam.formNo" type="like" placeholder="请输入表单编号" allow-clear trim @update:value="searchQuery" /></a-tooltip>
|
||||
<a-tooltip title="支持模糊查询"><JInput v-model:value="queryParam.formNo" type="like" placeholder="请输入表单编号" allow-clear trim @update:value="debouncedSearchQuery" /></a-tooltip>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="6" :md="8" :sm="12">
|
||||
@@ -99,7 +99,6 @@
|
||||
<template #tableTitle>
|
||||
<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>
|
||||
<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>
|
||||
@@ -202,8 +201,9 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { startProcessSchedules } from '/@/api/common/api';
|
||||
import { dateUtil } from '/@/utils/dateUtil';
|
||||
import { useDebounceFn } from '@vueuse/core';
|
||||
import { columns, superQuerySchema, fixedContactFeedbackColumns } from './FixedContact20260730.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getExportXlsHeadersUrl, getImportExcelByEasyExcelUrl, getCheckExcelByEasyExcelUrl, fixedContactFeedbackList, saveOrUpdate, withDrawFixContact, statusStats } from './FixedContact20260730.api';
|
||||
import { list, deleteOne, batchDelete, getExportUrl, getExportXlsHeadersUrl, getImportExcelByEasyExcelUrl, getCheckExcelByEasyExcelUrl, fixedContactFeedbackList, saveOrUpdate, withDrawFixContact, statusStats } from './FixedContact20260730.api';
|
||||
import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||
|
||||
function expandIcon({ expanded, onExpand, record }: { expanded: boolean; onExpand: Function; record: Recordable }) {
|
||||
@@ -252,7 +252,7 @@ import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||
|
||||
const feedbackExpandColumns: BasicColumn[] = [...fixedContactFeedbackColumns];
|
||||
|
||||
const { tableContext, onExportXls, onImportXls } = useListPage({
|
||||
const { tableContext, onExportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '定点联系单',
|
||||
api: list,
|
||||
@@ -280,10 +280,6 @@ import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||
name: '定点联系单',
|
||||
url: getExportUrl,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess,
|
||||
},
|
||||
});
|
||||
|
||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
@@ -385,6 +381,9 @@ import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||
fetchStatusStats();
|
||||
}
|
||||
|
||||
// 输入框逐字触发的查询做防抖,查询按钮/回车仍走未防抖的 searchQuery
|
||||
const debouncedSearchQuery = useDebounceFn(searchQuery, 500);
|
||||
|
||||
function clearQueryParams() {
|
||||
Object.keys(queryParam).forEach((key) => {
|
||||
delete queryParam[key];
|
||||
@@ -618,7 +617,12 @@ import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||
},
|
||||
};
|
||||
|
||||
await startProcessSchedules(params);
|
||||
try {
|
||||
await startProcessSchedules(params);
|
||||
} catch (e) {
|
||||
createMessage.error('发起流程失败,请稍后重试');
|
||||
return;
|
||||
}
|
||||
await saveOrUpdate({ id: record.id, bpmStatus: '2', superviseCount: nextSuperviseCount, isNeedAppro: options.isNeedAppro ?? record.isNeedAppro ?? '0', supDeptleaderid: options.supDeptleaderid ?? record.supDeptleaderid ?? '' }, true);
|
||||
createMessage.success('发起成功');
|
||||
reload();
|
||||
@@ -637,10 +641,16 @@ import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||
});
|
||||
|
||||
async function handleDownloadTemplate() {
|
||||
const data = await defHttp.get(
|
||||
{ url: getExportXlsHeadersUrl, params: {}, responseType: 'blob', timeout: 60000 },
|
||||
{ isTransformResponse: false },
|
||||
);
|
||||
let data;
|
||||
try {
|
||||
data = await defHttp.get(
|
||||
{ url: getExportXlsHeadersUrl, params: {}, responseType: 'blob', timeout: 60000 },
|
||||
{ isTransformResponse: false },
|
||||
);
|
||||
} catch (e) {
|
||||
createMessage.error('模板下载失败,请稍后重试');
|
||||
return;
|
||||
}
|
||||
if (!data) {
|
||||
createMessage.warning('文件下载失败');
|
||||
return;
|
||||
|
||||
@@ -168,6 +168,16 @@
|
||||
relatedLeader: [{ required: true, message: '请选择相关分管所领导' }],
|
||||
applicant: [{ required: true, message: '请选择申请人' }],
|
||||
hostDept: [{ required: true, message: '请选择主办部门' }],
|
||||
supDeptleaderid: [
|
||||
{
|
||||
validator: async (_rule, value) => {
|
||||
if (formData.isNeedAppro === '1' && !value) {
|
||||
return Promise.reject('请选择所办领导');
|
||||
}
|
||||
return Promise.resolve();
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
const formRef = ref();
|
||||
|
||||
Reference in New Issue
Block a user