!27 refactor(xispeak): 改造列表页搜索框为表单式搜索区域

* refactor(xispeak): 改造列表页搜索框为表单式搜索区域
* Merge branch 'master' into feature/20260610
* fix(inspectTask): BPM表单移除措施数量/流程实例ID/流程状态/督办次数/排序字段,调整具体问题和整改措施label宽度对齐
* refactor(inspectTask): 合并基本信息与状态与统计为一个区域
* fix(inspectTask): 台账列表移除措施数量/流程状态/督办次数/排序列
* fix(inspectTask): 移除反馈数量和督办次数字段,措施数量/督办次数设为不可编辑
* fix(inspectTask): 党群领导条件显示,移除流程实例ID/流程状态/排序字段
* fix(inspectTask): 修复编辑时子表数据未回传导致反馈记录被清空
This commit is contained in:
new_new_new
2026-06-10 08:31:25 +00:00
parent 2b61314ae8
commit 67b60231ba
5 changed files with 121 additions and 139 deletions
+85 -39
View File
@@ -1,5 +1,34 @@
<template> <template>
<div> <div class="p-2 erpNativeList">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6" :md="8" :sm="12">
<a-form-item label="重要讲话指示批示情况" name="speakStatus">
<JInput v-model:value="queryParam.speakStatus" type="like" placeholder="请输入重要讲话指示批示情况" allow-clear trim />
</a-form-item>
</a-col>
<a-col :lg="5" :md="8" :sm="12">
<a-form-item label="牵头部门" name="implDept">
<j-select-dept v-model:value="queryParam.implDept" placeholder="选择牵头部门" allow-clear style="width: 100%" />
</a-form-item>
</a-col>
<a-col :lg="4" :md="6" :sm="8">
<a-form-item label="完成状态" name="completionStatus">
<JDictSelectTag v-model:value="queryParam.completionStatus" dictCode="db_status" placeholder="请选择完成状态" allow-clear @change="searchQuery" />
</a-form-item>
</a-col>
<a-col :lg="4" :md="8" :sm="12">
<span class="table-page-search-submitButtons">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button preIcon="ant-design:reload-outlined" style="margin-left: 8px" @click="searchReset">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<div class="content">
<BasicTable <BasicTable
@register="registerTable" @register="registerTable"
:rowSelection="rowSelection" :rowSelection="rowSelection"
@@ -30,9 +59,6 @@
</a-dropdown> </a-dropdown>
<!-- 高级查询 --> <!-- 高级查询 -->
<super-query :config="superQueryConfig" @search="handleSuperQuery" /> <super-query :config="superQueryConfig" @search="handleSuperQuery" />
<div class="table-title-search">
<j-select-dept v-model:value="searchDeptIds" placeholder="选择牵头部门" allow-clear style="width: 100%" @change="handleDeptSearch" />
</div>
</template> </template>
<!--操作栏--> <!--操作栏-->
@@ -42,6 +68,7 @@
<!--字段回显插槽--> <!--字段回显插槽-->
<template v-slot:bodyCell="{ column, record, index, text }"> </template> <template v-slot:bodyCell="{ column, record, index, text }"> </template>
</BasicTable> </BasicTable>
</div>
<BgXiSpeakFeedbackViewModal ref="feedbackViewModalRef" /> <BgXiSpeakFeedbackViewModal ref="feedbackViewModalRef" />
<!-- 表单区域 --> <!-- 表单区域 -->
@@ -63,6 +90,8 @@
import { startProcessSchedules } from '/@/api/common/api'; import { startProcessSchedules } from '/@/api/common/api';
import { dateUtil } from '/@/utils/dateUtil'; import { dateUtil } from '/@/utils/dateUtil';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue'; import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
import BgXiSpeakModal from './components/BgXiSpeakModal.vue'; import BgXiSpeakModal from './components/BgXiSpeakModal.vue';
@@ -83,7 +112,6 @@
updateLaunchType, updateLaunchType,
saveOrUpdateDict, saveOrUpdateDict,
withDrawXiSpeak, withDrawXiSpeak,
getRootListWithDept,
bgXiSpeakFeedbackList, bgXiSpeakFeedbackList,
} from './BgXiSpeak.api'; } from './BgXiSpeak.api';
@@ -95,9 +123,9 @@
const [registerBpmModal, { openModal: bpmPicModal }] = useModal(); const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const formRef = ref();
const expandedRowKeys = ref([]); const expandedRowKeys = ref([]);
const queryParams = ref<any>({}); const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref(); const registerModal = ref();
const flowScheduleModalRef = ref(); const flowScheduleModalRef = ref();
const feedbackViewModalRef = ref(); const feedbackViewModalRef = ref();
@@ -144,35 +172,17 @@
const mainId = computed(() => (unref(selectedRowKeys).length > 0 ? unref(selectedRowKeys)[0] : '')); const mainId = computed(() => (unref(selectedRowKeys).length > 0 ? unref(selectedRowKeys)[0] : ''));
provide('mainId', mainId); provide('mainId', mainId);
const searchDeptIds = ref([]);
const isDeptSearching = ref(false);
async function handleDeptSearch(value) {
if (!value || (Array.isArray(value) && value.length === 0)) {
isDeptSearching.value = false;
reload();
return;
}
const deptIds = Array.isArray(value) ? value.join(',') : value;
try {
const res = await getRootListWithDept(deptIds);
isDeptSearching.value = true;
const records = res?.records || res || [];
setTableData(records);
} catch (e) {
createMessage.error('按部门查询失败');
}
}
const labelCol = reactive({ const labelCol = reactive({
xs: 24, xs: 24,
sm: 4, sm: 8,
xl: 6, xl: 10,
xxl: 4, xxl: 8,
}); });
const wrapperCol = reactive({ const wrapperCol = reactive({
xs: 24, xs: 24,
sm: 20, sm: 16,
xl: 14,
xxl: 16,
}); });
// 高级查询配置 // 高级查询配置
@@ -717,20 +727,27 @@
feedbackViewModalRef.value.open(record); feedbackViewModalRef.value.open(record);
} }
function clearQueryParams() {
Object.keys(queryParam.value).forEach((key) => {
delete queryParam.value[key];
});
}
/** /**
* 查询 * 查询
*/ */
function searchQuery() { function searchQuery() {
reload(); reload({ page: 1 });
} }
/** /**
* 重置 * 重置
*/ */
function searchReset() { function searchReset() {
queryParam.value = {}; formRef.value?.resetFields();
clearQueryParams();
selectedRowKeys.value = []; selectedRowKeys.value = [];
reload(); reload({ page: 1 });
} }
/** /**
@@ -744,10 +761,39 @@
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.table-title-search { .jeecg-basic-table-form-container {
display: inline-flex; padding: 0;
align-items: center; .table-page-search-submitButtons {
margin-left: 8px; display: block;
width: 280px; margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center;
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
.erpNativeList {
height: 100%;
.content {
background-color: #fff;
height: 100%;
}
} }
</style> </style>
@@ -68,7 +68,7 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
* **showEditFeedback** `0` —— 编辑/删除操作列 * **showEditFeedback** `0` —— 编辑/删除操作列
* **showDeptFeedback** `0` —— 按部门过滤反馈 * **showDeptFeedback** `0` —— 按部门过滤反馈
* **showJiJianFields** `0` —— 纪检字段列 * **showJiJianFields** `0` —— 纪检字段列
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1 * dq/inspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
--- ---
### 节点: <党群经办人审查> ### 节点: <党群经办人审查>
@@ -82,7 +82,7 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
* **showEditFeedback** `0` —— 编辑/删除操作列 * **showEditFeedback** `0` —— 编辑/删除操作列
* **showDeptFeedback** `0` —— 按部门过滤反馈 * **showDeptFeedback** `0` —— 按部门过滤反馈
* **showJiJianFields** `0` —— 纪检字段列 * **showJiJianFields** `0` —— 纪检字段列
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1 * dq/inspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1
* 可驳回 * 可驳回
--- ---
@@ -98,7 +98,7 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
* **showEditFeedback** `0` —— 编辑/删除操作列 * **showEditFeedback** `0` —— 编辑/删除操作列
* **showDeptFeedback** `0` —— 按部门过滤反馈 * **showDeptFeedback** `0` —— 按部门过滤反馈
* **showJiJianFields** `0` —— 纪检字段列 * **showJiJianFields** `0` —— 纪检字段列
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showIsNeedLeaderApprove=1&showSelnextUser=1 * dq/inspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showIsNeedLeaderApprove=1&showSelnextUser=1
--- ---
### 节点: <分管所领导审批> ### 节点: <分管所领导审批>
@@ -112,7 +112,7 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
* **showEditFeedback** `0` —— 编辑/删除操作列 * **showEditFeedback** `0` —— 编辑/删除操作列
* **showDeptFeedback** `0` —— 按部门过滤反馈 * **showDeptFeedback** `0` —— 按部门过滤反馈
* **showJiJianFields** `0` —— 纪检字段列 * **showJiJianFields** `0` —— 纪检字段列
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1 * dq/inspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
--- ---
### 节点: <所党委书记审批> ### 节点: <所党委书记审批>
@@ -126,5 +126,5 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
* **showEditFeedback** `0` —— 编辑/删除操作列 * **showEditFeedback** `0` —— 编辑/删除操作列
* **showDeptFeedback** `0` —— 按部门过滤反馈 * **showDeptFeedback** `0` —— 按部门过滤反馈
* **showJiJianFields** `0` —— 纪检字段列 * **showJiJianFields** `0` —— 纪检字段列
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1 * dq/inspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
--- ---
@@ -290,29 +290,9 @@ export const ledgerColumns: BasicColumn[] = [
align:"center", align:"center",
dataIndex: 'supervisoryOpinion' dataIndex: 'supervisoryOpinion'
}, },
{
title: '措施数量',
align:"center",
dataIndex: 'measureCount'
},
{
title: '流程状态',
align:"center",
dataIndex: 'bpmStatus_dictText'
},
{ {
title: '整改状态', title: '整改状态',
align:"center", align:"center",
dataIndex: 'taskStatus' dataIndex: 'taskStatus'
}, },
{
title: '督办次数',
align:"center",
dataIndex: 'superviseCount'
},
{
title: '排序',
align:"center",
dataIndex: 'sortNo'
},
]; ];
@@ -29,7 +29,7 @@
</div> </div>
<a-row class="base-info-row" :gutter="[12, 4]"> <a-row class="base-info-row" :gutter="[12, 4]">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="具体问题" name="problemId"> <a-form-item label="具体问题" name="problemId" :labelCol="{ xs: { span: 24 }, sm: { span: 4 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 20 } }">
<a-tree-select <a-tree-select
v-model:value="mainForm.problemId" v-model:value="mainForm.problemId"
:tree-data="problemTreeData" :tree-data="problemTreeData"
@@ -43,7 +43,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="整改措施" name="improveMeasure"> <a-form-item label="整改措施" name="improveMeasure" :labelCol="{ xs: { span: 24 }, sm: { span: 4 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 20 } }">
<a-textarea v-model:value="mainForm.improveMeasure" :auto-size="{ minRows: 1, maxRows: 4 }" :disabled="mainDisabled" allow-clear /> <a-textarea v-model:value="mainForm.improveMeasure" :auto-size="{ minRows: 1, maxRows: 4 }" :disabled="mainDisabled" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -109,36 +109,11 @@
<a-input v-model:value="mainForm.supervisoryOpinion" :disabled="mainDisabled" allow-clear /> <a-input v-model:value="mainForm.supervisoryOpinion" :disabled="mainDisabled" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-item label="措施数量" name="measureCount">
<a-input-number v-model:value="mainForm.measureCount" :disabled="mainDisabled" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="流程实例ID" name="bpmProcessId">
<a-input v-model:value="mainForm.bpmProcessId" :disabled="mainDisabled" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="流程状态" name="bpmStatus">
<j-dict-select-tag v-model:value="mainForm.bpmStatus" dictCode="super_status" placeholder="请选择流程状态" :disabled="mainDisabled" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="整改状态" name="taskStatus"> <a-form-item label="整改状态" name="taskStatus">
<a-input v-model:value="mainForm.taskStatus" :disabled="mainDisabled" allow-clear /> <a-input v-model:value="mainForm.taskStatus" :disabled="mainDisabled" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-item label="督办次数" name="superviseCount">
<a-input v-model:value="mainForm.superviseCount" :disabled="mainDisabled" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="排序" name="sortNo">
<a-input-number v-model:value="mainForm.sortNo" :disabled="mainDisabled" style="width: 100%" />
</a-form-item>
</a-col>
</template> </template>
</a-row> </a-row>
</a-form> </a-form>
@@ -40,6 +40,21 @@
<a-input v-model:value="formData.targetNode" placeholder="请输入目标节点" allow-clear></a-input> <a-input v-model:value="formData.targetNode" placeholder="请输入目标节点" allow-clear></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-item label="检查情况" v-bind="validateInfos.inspectionStatus" id="DqInspectTaskForm-inspectionStatus" name="inspectionStatus">
<a-input v-model:value="formData.inspectionStatus" placeholder="请输入检查情况" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="监督意见" v-bind="validateInfos.supervisoryOpinion" id="DqInspectTaskForm-supervisoryOpinion" name="supervisoryOpinion">
<a-input v-model:value="formData.supervisoryOpinion" placeholder="请输入监督意见" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="整改状态" v-bind="validateInfos.taskStatus" id="DqInspectTaskForm-taskStatus" name="taskStatus">
<a-input v-model:value="formData.taskStatus" placeholder="请输入整改状态" allow-clear></a-input>
</a-form-item>
</a-col>
</a-row> </a-row>
<!-- 责任与监督 --> <!-- 责任与监督 -->
@@ -75,57 +90,12 @@
<j-dict-select-tag type='radio' v-model:value="formData.isNeedAppro" dictCode="yn" placeholder="请选择是否需要党群领导审批" allow-clear /> <j-dict-select-tag type='radio' v-model:value="formData.isNeedAppro" dictCode="yn" placeholder="请选择是否需要党群领导审批" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col v-if="formData.isNeedAppro === '1'" :span="12">
<a-form-item label="党群领导" v-bind="validateInfos.supDeptleaderid" id="DqInspectTaskForm-supDeptleaderid" name="supDeptleaderid"> <a-form-item label="党群领导" v-bind="validateInfos.supDeptleaderid" id="DqInspectTaskForm-supDeptleaderid" name="supDeptleaderid">
<j-select-user v-model:value="formData.supDeptleaderid" allow-clear /> <j-select-user v-model:value="formData.supDeptleaderid" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<!-- 状态与统计 -->
<a-divider orientation="left" plain>状态与统计</a-divider>
<a-row :gutter="[16, 0]">
<a-col :span="12">
<a-form-item label="检查情况" v-bind="validateInfos.inspectionStatus" id="DqInspectTaskForm-inspectionStatus" name="inspectionStatus">
<a-input v-model:value="formData.inspectionStatus" placeholder="请输入检查情况" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="监督意见" v-bind="validateInfos.supervisoryOpinion" id="DqInspectTaskForm-supervisoryOpinion" name="supervisoryOpinion">
<a-input v-model:value="formData.supervisoryOpinion" placeholder="请输入监督意见" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="措施数量" v-bind="validateInfos.measureCount" id="DqInspectTaskForm-measureCount" name="measureCount">
<a-input-number v-model:value="formData.measureCount" placeholder="请输入措施数量" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="流程实例ID" v-bind="validateInfos.bpmProcessId" id="DqInspectTaskForm-bpmProcessId" name="bpmProcessId">
<a-input v-model:value="formData.bpmProcessId" placeholder="请输入流程实例ID" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="流程状态" v-bind="validateInfos.bpmStatus" id="DqInspectTaskForm-bpmStatus" name="bpmStatus">
<j-dict-select-tag v-model:value="formData.bpmStatus" dictCode="super_status" placeholder="请选择流程状态" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="整改状态" v-bind="validateInfos.taskStatus" id="DqInspectTaskForm-taskStatus" name="taskStatus">
<a-input v-model:value="formData.taskStatus" placeholder="请输入整改状态" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="督办次数" v-bind="validateInfos.superviseCount" id="DqInspectTaskForm-superviseCount" name="superviseCount">
<a-input v-model:value="formData.superviseCount" placeholder="请输入督办次数" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="排序" v-bind="validateInfos.sortNo" id="DqInspectTaskForm-sortNo" name="sortNo">
<a-input-number v-model:value="formData.sortNo" placeholder="请输入排序" style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
</a-form> </a-form>
</template> </template>
</JFormContainer> </JFormContainer>
@@ -336,8 +306,19 @@
async function submitForm() { async function submitForm() {
const mainData = await getFormData(); const mainData = await getFormData();
// 工作进展子表当前未渲染时 ref 为空,提交主表即可;后续恢复子表时仍走原校验取数逻辑。 // 工作进展子表当前未渲染时 ref 为空,此时需回查已有子表数据一并提交,
const subData = dqInspectProgressTableRef.value ? await getSubFormAndTableData() : {}; // 否则后端 updateMain 的 deleteByMainId + re-insert 模式会清空全部反馈记录及附件。
let subData: Record<string, any> = {};
if (dqInspectProgressTableRef.value) {
subData = await getSubFormAndTableData();
} else if (formData.id) {
try {
const existingList = await queryDqInspectProgressListByMainId(formData.id);
if (existingList && existingList.length > 0) {
subData = { dqInspectProgressList: existingList };
}
} catch {}
}
const values = Object.assign({}, dbData, mainData, subData); const values = Object.assign({}, dbData, mainData, subData);
console.log('表单提交数据', values) console.log('表单提交数据', values)
const isUpdate = values.id ? true : false const isUpdate = values.id ? true : false