yxk-20260609-我为四所把把脉列表
1、在 BgTakepulseList.vue 中复用党委会列表的交互模式:点击“四所把把脉”任一事项行,展开该事项下的全部反馈记录,并以内嵌只读表格展示反馈与附件。 2、去除多选批量操作的按钮
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<!--查询区域-->
|
<!--查询区域-->
|
||||||
<div class="jeecg-basic-table-form-container">
|
<div class="jeecg-basic-table-form-container">
|
||||||
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item name="year">
|
<a-form-item name="year">
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
|
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||||
<a-button preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
<a-button preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||||
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
|
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
|
||||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||||
@@ -52,35 +52,66 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
<BasicTable @register="registerTable" :expandedRowKeys="expandedRowKeys" @expand="handleExpand">
|
||||||
<!--插槽:table标题-->
|
<!--插槽:table标题-->
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" v-auth="'bqtakepulse:bg_takepulse:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
<a-button type="primary" v-auth="'bqtakepulse:bg_takepulse:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
<a-button type="primary" v-auth="'bqtakepulse:bg_takepulse:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
<a-button type="primary" v-auth="'bqtakepulse:bg_takepulse:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||||
<j-upload-button type="primary" v-auth="'bqtakepulse:bg_takepulse:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
<j-upload-button type="primary" v-auth="'bqtakepulse:bg_takepulse:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
||||||
<template #overlay>
|
|
||||||
<a-menu>
|
|
||||||
<a-menu-item key="1" @click="batchHandleDelete">
|
|
||||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
|
||||||
删除
|
|
||||||
</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</template>
|
|
||||||
<a-button v-auth="'bqtakepulse:bg_takepulse:deleteBatch'">批量操作
|
|
||||||
<Icon icon="mdi:chevron-down"></Icon>
|
|
||||||
</a-button>
|
|
||||||
</a-dropdown>
|
|
||||||
<!-- 高级查询 -->
|
<!-- 高级查询 -->
|
||||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||||
</template>
|
</template>
|
||||||
<!--操作栏-->
|
<!--操作栏-->
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
<TableAction stopButtonPropagation :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||||
</template>
|
</template>
|
||||||
<!--字段回显插槽-->
|
<!--字段回显插槽-->
|
||||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||||
</template>
|
</template>
|
||||||
|
<!-- 嵌套反馈信息表,仅展示当前事项下的执行情况反馈记录。 -->
|
||||||
|
<template #expandedRowRender="{ record }">
|
||||||
|
<div class="feedback-expand-table">
|
||||||
|
<div class="feedback-expand-header">
|
||||||
|
<div class="feedback-expand-title">
|
||||||
|
<span class="feedback-expand-icon">
|
||||||
|
<Icon icon="ant-design:message-outlined" />
|
||||||
|
</span>
|
||||||
|
<span>反馈信息</span>
|
||||||
|
<a-tag class="feedback-expand-count" color="processing">
|
||||||
|
{{ getFeedbackTableLoading(record) ? '加载中' : `${getFeedbackCount(record)} 条` }}
|
||||||
|
</a-tag>
|
||||||
|
</div>
|
||||||
|
<div class="feedback-expand-desc">当前事项的执行情况反馈记录</div>
|
||||||
|
</div>
|
||||||
|
<BasicTable
|
||||||
|
class="feedback-inner-table"
|
||||||
|
bordered
|
||||||
|
size="small"
|
||||||
|
rowKey="id"
|
||||||
|
:canResize="false"
|
||||||
|
:showIndexColumn="false"
|
||||||
|
:showActionColumn="false"
|
||||||
|
:showTableSetting="false"
|
||||||
|
:clickToRowSelect="false"
|
||||||
|
:columns="feedbackExpandColumns"
|
||||||
|
:dataSource="getFeedbackTableData(record)"
|
||||||
|
:loading="getFeedbackTableLoading(record)"
|
||||||
|
:pagination="false"
|
||||||
|
:scroll="{ x: 1320 }"
|
||||||
|
>
|
||||||
|
<template #feedbackAttachments="{ record: feedbackRecord }">
|
||||||
|
<SUploadFile
|
||||||
|
v-if="feedbackRecord.id"
|
||||||
|
class="feedback-attachment-list"
|
||||||
|
:bussiness-id="feedbackRecord.id"
|
||||||
|
:disabled="true"
|
||||||
|
:multiple="true"
|
||||||
|
/>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<!-- 表单区域 -->
|
<!-- 表单区域 -->
|
||||||
<BgTakepulseModal @register="registerModal" @success="handleSuccess"></BgTakepulseModal>
|
<BgTakepulseModal @register="registerModal" @success="handleSuccess"></BgTakepulseModal>
|
||||||
@@ -94,17 +125,20 @@
|
|||||||
<script lang="ts" name="bqtakepulse-bgTakepulse" setup>
|
<script lang="ts" name="bqtakepulse-bgTakepulse" setup>
|
||||||
import {ref, reactive} from 'vue';
|
import {ref, reactive} from 'vue';
|
||||||
import {BasicTable, TableAction} from '/@/components/Table';
|
import {BasicTable, TableAction} from '/@/components/Table';
|
||||||
|
import type { BasicColumn } from '/@/components/Table';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage'
|
import { useListPage } from '/@/hooks/system/useListPage'
|
||||||
import {useModal} from '/@/components/Modal';
|
import {useModal} from '/@/components/Modal';
|
||||||
import BgTakepulseModal from './components/BgTakepulseModal.vue'
|
import BgTakepulseModal from './components/BgTakepulseModal.vue'
|
||||||
import {columns, superQuerySchema} from './BgTakepulse.data';
|
import {columns, superQuerySchema} from './BgTakepulse.data';
|
||||||
import {list, deleteOne, batchDelete, getImportUrl, getExportUrl, saveOrUpdate} from './BgTakepulse.api';
|
import {list, deleteOne, getImportUrl, getExportUrl, saveOrUpdate, bgTakepulseFeedbackList} from './BgTakepulse.api';
|
||||||
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
||||||
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
||||||
|
import Icon from '/@/components/Icon/index';
|
||||||
import { startProcessSchedules } from '/@/api/common/api';
|
import { startProcessSchedules } from '/@/api/common/api';
|
||||||
import { dateUtil } from '/@/utils/dateUtil';
|
import { dateUtil } from '/@/utils/dateUtil';
|
||||||
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 SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||||
|
|
||||||
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
|
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
|
||||||
const FLOW_CODE = 'dev_task_task_001';
|
const FLOW_CODE = 'dev_task_task_001';
|
||||||
@@ -114,6 +148,9 @@
|
|||||||
|
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
|
const expandedRowKeys = ref<Array<string | number>>([]);
|
||||||
|
const feedbackTableData = reactive<Record<string, Recordable[]>>({});
|
||||||
|
const feedbackTableLoading = reactive<Record<string, boolean>>({});
|
||||||
//注册model
|
//注册model
|
||||||
const [registerModal, {openModal}] = useModal();
|
const [registerModal, {openModal}] = useModal();
|
||||||
const flowScheduleModalRef = ref();
|
const flowScheduleModalRef = ref();
|
||||||
@@ -126,6 +163,7 @@
|
|||||||
columns,
|
columns,
|
||||||
canResize:false,
|
canResize:false,
|
||||||
useSearchForm: false,
|
useSearchForm: false,
|
||||||
|
expandRowByClick: true,
|
||||||
actionColumn: {
|
actionColumn: {
|
||||||
width: 120,
|
width: 120,
|
||||||
fixed:'right'
|
fixed:'right'
|
||||||
@@ -145,16 +183,97 @@
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
const [registerTable, {reload}] = tableContext
|
||||||
|
|
||||||
interface DeptOption {
|
interface DeptOption {
|
||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 反馈展开区只读展示子表数据,列配置与 BPM 办理页保持同一组核心反馈字段。
|
||||||
|
const feedbackExpandColumns: BasicColumn[] = [
|
||||||
|
{ title: '责任部门名称', dataIndex: 'responDeptname', align: 'center', width: 160 },
|
||||||
|
{ title: '反馈人姓名', dataIndex: 'responPersonname', align: 'center', width: 140 },
|
||||||
|
{ title: '实际执行情况', dataIndex: 'actualExect', align: 'left', width: 280 },
|
||||||
|
{ title: '实际完成时间', dataIndex: 'actualTime', align: 'center', width: 180 },
|
||||||
|
{ title: '调整落实措施及执行情况', dataIndex: 'actSt', align: 'left', width: 260 },
|
||||||
|
{
|
||||||
|
title: '完成状态',
|
||||||
|
dataIndex: 'bpmStatus',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
customRender: ({ record }) => record?.bpmStatus_dictText || record?.bpmStatus,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '附件下载',
|
||||||
|
dataIndex: 'id',
|
||||||
|
key: 'attachments',
|
||||||
|
align: 'left',
|
||||||
|
width: 340,
|
||||||
|
slots: { customRender: 'feedbackAttachments' },
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
// 高级查询配置
|
// 高级查询配置
|
||||||
const superQueryConfig = reactive(superQuerySchema);
|
const superQueryConfig = reactive(superQuerySchema);
|
||||||
|
|
||||||
|
function getFeedbackKey(record: Recordable) {
|
||||||
|
return String(record?.id ?? '');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFeedbackTableData(record: Recordable) {
|
||||||
|
return feedbackTableData[getFeedbackKey(record)] || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFeedbackCount(record: Recordable) {
|
||||||
|
return getFeedbackTableData(record).length;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFeedbackTableLoading(record: Recordable) {
|
||||||
|
return !!feedbackTableLoading[getFeedbackKey(record)];
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearFeedbackTableData() {
|
||||||
|
Object.keys(feedbackTableData).forEach((key) => {
|
||||||
|
delete feedbackTableData[key];
|
||||||
|
});
|
||||||
|
Object.keys(feedbackTableLoading).forEach((key) => {
|
||||||
|
delete feedbackTableLoading[key];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetFeedbackExpand() {
|
||||||
|
expandedRowKeys.value = [];
|
||||||
|
clearFeedbackTableData();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loadFeedbackTableData(mainId: string | number) {
|
||||||
|
const key = String(mainId);
|
||||||
|
feedbackTableLoading[key] = true;
|
||||||
|
try {
|
||||||
|
const res = await bgTakepulseFeedbackList({
|
||||||
|
mainId,
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 9999,
|
||||||
|
column: 'createTime',
|
||||||
|
order: 'desc',
|
||||||
|
});
|
||||||
|
feedbackTableData[key] = Array.isArray(res) ? res : res?.records || res?.result?.records || [];
|
||||||
|
} finally {
|
||||||
|
feedbackTableLoading[key] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleExpand(expanded: boolean, record: Recordable) {
|
||||||
|
const mainId = record?.id;
|
||||||
|
expandedRowKeys.value = [];
|
||||||
|
if (!expanded || mainId === undefined || mainId === null || mainId === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
expandedRowKeys.value = [mainId];
|
||||||
|
await loadFeedbackTableData(mainId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 高级查询事件
|
* 高级查询事件
|
||||||
*/
|
*/
|
||||||
@@ -162,7 +281,12 @@
|
|||||||
Object.keys(params).map((k) => {
|
Object.keys(params).map((k) => {
|
||||||
queryParam[k] = params[k];
|
queryParam[k] = params[k];
|
||||||
});
|
});
|
||||||
reload();
|
searchQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchQuery() {
|
||||||
|
resetFeedbackExpand();
|
||||||
|
reload({ page: 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -200,17 +324,12 @@
|
|||||||
async function handleDelete(record) {
|
async function handleDelete(record) {
|
||||||
await deleteOne({id: record.id}, handleSuccess);
|
await deleteOne({id: record.id}, handleSuccess);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 批量删除事件
|
|
||||||
*/
|
|
||||||
async function batchHandleDelete() {
|
|
||||||
await batchDelete({ids: selectedRowKeys.value},handleSuccess);
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 成功回调
|
* 成功回调
|
||||||
*/
|
*/
|
||||||
function handleSuccess() {
|
function handleSuccess() {
|
||||||
(selectedRowKeys.value = []) && reload();
|
resetFeedbackExpand();
|
||||||
|
reload();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 操作栏
|
* 操作栏
|
||||||
@@ -421,9 +540,9 @@
|
|||||||
*/
|
*/
|
||||||
function searchReset() {
|
function searchReset() {
|
||||||
formRef.value.resetFields();
|
formRef.value.resetFields();
|
||||||
selectedRowKeys.value = [];
|
resetFeedbackExpand();
|
||||||
//刷新数据
|
//刷新数据
|
||||||
reload();
|
reload({ page: 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -461,4 +580,121 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.feedback-expand-table {
|
||||||
|
margin: 4px 10px 12px 42px;
|
||||||
|
padding: 12px 14px 14px;
|
||||||
|
background: #f6fbff;
|
||||||
|
border: 1px solid #d6e8ff;
|
||||||
|
border-left: 4px solid #1677ff;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
|
||||||
|
|
||||||
|
.feedback-expand-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-expand-title {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
min-width: 0;
|
||||||
|
color: #1f2937;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-expand-icon {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
margin-right: 8px;
|
||||||
|
color: #1677ff;
|
||||||
|
background: #e6f4ff;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-expand-count {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-expand-desc {
|
||||||
|
color: #64748b;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 22px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.jeecg-basic-table) {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.feedback-inner-table .ant-table-wrapper) {
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.feedback-inner-table .ant-table-thead > tr > th) {
|
||||||
|
background: #eef6ff;
|
||||||
|
color: #334155;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.feedback-inner-table .ant-table-tbody > tr > td) {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.feedback-inner-table .ant-table-tbody > tr:hover > td) {
|
||||||
|
background: #f8fbff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feedback-attachment-list {
|
||||||
|
min-width: 300px;
|
||||||
|
|
||||||
|
:deep(.file-list-wrapper) {
|
||||||
|
min-height: 0 !important;
|
||||||
|
padding: 4px 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-spin-nested-loading),
|
||||||
|
:deep(.ant-spin-container) {
|
||||||
|
min-height: 0 !important;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.file-list-header) {
|
||||||
|
margin-bottom: 6px;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.file-list .file-item) {
|
||||||
|
padding: 8px;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-empty) {
|
||||||
|
margin: 0 !important;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 20px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-empty-image) {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-empty-description) {
|
||||||
|
color: #94a3b8;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user