!19 feat(dq): 新增整改任务BPM审批界面及extendUrlParams权限控制架构
* feat(dq): 新增整改任务BPM审批界面及extendUrlParams权限控制架构 * feat(dq): 整改任务列表新增查询督办流程按钮并清理未使用导入 * style(dq): 优化整改任务表单为双列分区布局参考BgXiSpeakForm样式 * feat(dq): 整改任务列表新增FlowScheduleStartModal流程调度和弹窗式反馈查看 * feat(dq): 新增反馈查看弹窗组件并在进展列表中集成查看反馈按钮 * fix(dq): 修正巡视工作进展反馈查询接口地址并与Controller对齐 * fix(dq): 修正巡视工作进展反馈API地址与后端Controller对齐 * feat(dq): 新增整改任务列表发起流程和查看反馈按钮 * feat(dq): 新增巡视工作进展反馈页面
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/dqinspecttask/dqInspectTask/listDqInspectProgressByMainId',
|
||||
save='/dqinspecttask/dqInspectTask/addDqInspectProgress',
|
||||
edit='/dqinspecttask/dqInspectTask/editDqInspectProgress',
|
||||
deleteOne = '/dqinspecttask/dqInspectTask/deleteDqInspectProgress',
|
||||
deleteBatch = '/dqinspecttask/dqInspectTask/deleteBatchDqInspectProgress',
|
||||
importExcel = '/dqinspecttask/dqInspectTask/importDqInspectProgress',
|
||||
exportXls = '/dqinspecttask/dqInspectTask/exportDqInspectProgress',
|
||||
queryById = '/dqinspecttask/dqInspectTask/queryDqInspectProgressById',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询数据
|
||||
* @param id
|
||||
*/
|
||||
export const queryById = (id) => defHttp.get({ url: Api.queryById, params: { id } });
|
||||
@@ -0,0 +1,64 @@
|
||||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '反馈部门ID',
|
||||
align: "center",
|
||||
dataIndex: 'feedbackDeptId'
|
||||
},
|
||||
{
|
||||
title: '反馈部门名称',
|
||||
align: "center",
|
||||
dataIndex: 'feedbackDeptName'
|
||||
},
|
||||
{
|
||||
title: '反馈人ID',
|
||||
align: "center",
|
||||
dataIndex: 'feedbackPersonId'
|
||||
},
|
||||
{
|
||||
title: '反馈人姓名',
|
||||
align: "center",
|
||||
dataIndex: 'feedbackPersonName'
|
||||
},
|
||||
{
|
||||
title: '实际完成时间',
|
||||
align: "center",
|
||||
dataIndex: 'actualTime',
|
||||
customRender:({text}) =>{
|
||||
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '工作进展',
|
||||
align: "center",
|
||||
dataIndex: 'workProgress'
|
||||
},
|
||||
{
|
||||
title: '进展状态',
|
||||
align: "center",
|
||||
dataIndex: 'bpmStatus'
|
||||
},
|
||||
{
|
||||
title: '整改措施任务ID',
|
||||
align: "center",
|
||||
dataIndex: 'mainId'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
feedbackDeptId: {title: '反馈部门ID',order: 0,view: 'text', type: 'string',},
|
||||
feedbackDeptName: {title: '反馈部门名称',order: 1,view: 'text', type: 'string',},
|
||||
feedbackPersonId: {title: '反馈人ID',order: 2,view: 'text', type: 'string',},
|
||||
feedbackPersonName: {title: '反馈人姓名',order: 3,view: 'text', type: 'string',},
|
||||
actualTime: {title: '实际完成时间',order: 4,view: 'date', type: 'string',},
|
||||
workProgress: {title: '工作进展',order: 5,view: 'text', type: 'string',},
|
||||
bpmStatus: {title: '进展状态',order: 6,view: 'text', type: 'string',},
|
||||
mainId: {title: '整改措施任务ID',order: 8,view: 'text', type: 'string',},
|
||||
};
|
||||
@@ -0,0 +1,303 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24"> </a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'dqinspectprogress:dq_inspect_progress:add'" @click="handleAdd" preIcon="ant-design:plus-outlined">
|
||||
新增</a-button
|
||||
>
|
||||
<a-button type="primary" v-auth="'dqinspectprogress:dq_inspect_progress:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls">
|
||||
导出</a-button
|
||||
>
|
||||
<j-upload-button
|
||||
type="primary"
|
||||
v-auth="'dqinspectprogress:dq_inspect_progress: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="'dqinspectprogress:dq_inspect_progress:deleteBatch'"
|
||||
>批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }"> </template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<DqInspectProgressFeedbackViewModal ref="feedbackViewModalRef" />
|
||||
<DqInspectProgressModal ref="registerModal" @success="handleSuccess"></DqInspectProgressModal>
|
||||
<!-- 审批记录 -->
|
||||
<BpmPictureModal @register="registerBpmModal" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="dqinspectprogress-dqInspectProgress" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './DqInspectProgress.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './DqInspectProgress.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import DqInspectProgressModal from './components/DqInspectProgressModal.vue';
|
||||
import DqInspectProgressFeedbackViewModal from './components/DqInspectProgressFeedbackViewModal.vue';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { startProcess } from '/@/api/common/api';
|
||||
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const feedbackViewModalRef = ref();
|
||||
const userStore = useUserStore();
|
||||
const { createMessage } = useMessage();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '巡视工作进展',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 200,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: '巡视工作进展',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess,
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
|
||||
tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
sm: 4,
|
||||
xl: 6,
|
||||
xxl: 4,
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'dqinspectprogress:dq_inspect_progress:edit',
|
||||
},
|
||||
{
|
||||
label: '查看反馈',
|
||||
onClick: handleViewFeedback.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
let dropDownAction = [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'dqinspectprogress:dq_inspect_progress:delete',
|
||||
},
|
||||
{
|
||||
label: '审批进度',
|
||||
onClick: handlePreviewPic.bind(null, record),
|
||||
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
|
||||
},
|
||||
];
|
||||
if (record.bpmStatus == '1') {
|
||||
dropDownAction.push({
|
||||
label: '发起流程',
|
||||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
return dropDownAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交流程
|
||||
*/
|
||||
async function handleProcess(record) {
|
||||
let params = {
|
||||
flowCode: 'dev_dq_inspect_progress_001',
|
||||
id: record.id,
|
||||
formUrl: 'dqinspectprogress/components/DqInspectProgressForm',
|
||||
formUrlMobile: ''
|
||||
}
|
||||
await startProcess(params);
|
||||
handleSuccess();
|
||||
}
|
||||
/**
|
||||
* 查看反馈
|
||||
*/
|
||||
function handleViewFeedback(record) {
|
||||
feedbackViewModalRef.value.open(record.mainId || record.id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批进度
|
||||
*/
|
||||
async function handlePreviewPic(record) {
|
||||
bpmPicModal(true, {
|
||||
flowCode: 'dev_dq_inspect_progress_001',
|
||||
dataId: record.id,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
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%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,26 @@
|
||||
-- 注意:该页面对应的前台目录为views/dqinspectprogress文件夹下
|
||||
-- 如果你想更改到其他目录,请修改sql中component字段对应的值
|
||||
|
||||
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
||||
VALUES ('2026060411179740390', NULL, '巡视工作进展', '/dqinspectprogress/dqInspectProgressList', 'dqinspectprogress/DqInspectProgressList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2026-06-04 11:17:39', NULL, NULL, 0);
|
||||
|
||||
-- 权限控制sql
|
||||
-- 新增
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('2026060411179740391', '2026060411179740390', '添加巡视工作进展', NULL, NULL, 0, NULL, NULL, 2, 'dqinspectprogress:dq_inspect_progress:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-06-04 11:17:39', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 编辑
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('2026060411179740392', '2026060411179740390', '编辑巡视工作进展', NULL, NULL, 0, NULL, NULL, 2, 'dqinspectprogress:dq_inspect_progress:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-06-04 11:17:39', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 删除
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('2026060411179740393', '2026060411179740390', '删除巡视工作进展', NULL, NULL, 0, NULL, NULL, 2, 'dqinspectprogress:dq_inspect_progress:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-06-04 11:17:39', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 批量删除
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('2026060411179740394', '2026060411179740390', '批量删除巡视工作进展', NULL, NULL, 0, NULL, NULL, 2, 'dqinspectprogress:dq_inspect_progress:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-06-04 11:17:39', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 导出excel
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('2026060411179740395', '2026060411179740390', '导出excel_巡视工作进展', NULL, NULL, 0, NULL, NULL, 2, 'dqinspectprogress:dq_inspect_progress:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-06-04 11:17:39', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 导入excel
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('2026060411179740396', '2026060411179740390', '导入excel_巡视工作进展', NULL, NULL, 0, NULL, NULL, 2, 'dqinspectprogress:dq_inspect_progress:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-06-04 11:17:39', NULL, NULL, 0, 0, '1', 0);
|
||||
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="1000"
|
||||
:visible="visible"
|
||||
:okButtonProps="{ class: { 'jee-hidden': true } }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭"
|
||||
>
|
||||
<BasicTable
|
||||
size="small"
|
||||
rowKey="id"
|
||||
:canResize="false"
|
||||
:showIndexColumn="false"
|
||||
:showActionColumn="false"
|
||||
:showTableSetting="false"
|
||||
:clickToRowSelect="false"
|
||||
:columns="columns"
|
||||
:dataSource="feedbackTableData"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:bordered="false"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'attachments'">
|
||||
<SUploadFile
|
||||
v-if="record.id"
|
||||
class="feedback-view-attachment-list"
|
||||
:bussiness-id="record.id"
|
||||
:disabled="true"
|
||||
:multiple="true"
|
||||
/>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, defineExpose } from 'vue';
|
||||
import { BasicTable } from '/@/components/Table';
|
||||
import type { BasicColumn } from '/@/components/Table';
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import { list } from '../DqInspectProgress.api';
|
||||
|
||||
const visible = ref(false);
|
||||
const loading = ref(false);
|
||||
const feedbackTableData = ref<Recordable[]>([]);
|
||||
|
||||
const title = computed(() => {
|
||||
const count = loading.value ? '加载中' : `${feedbackTableData.value.length} 条`;
|
||||
return `反馈信息(${count})`;
|
||||
});
|
||||
|
||||
const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '反馈人',
|
||||
dataIndex: 'feedbackPersonName',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '反馈部门',
|
||||
dataIndex: 'feedbackDeptName',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
},
|
||||
{
|
||||
title: '工作进展',
|
||||
dataIndex: 'workProgress',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '实际完成时间',
|
||||
dataIndex: 'actualTime',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '进展状态',
|
||||
dataIndex: 'bpmStatus_dictText',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '附件',
|
||||
dataIndex: 'id',
|
||||
key: 'attachments',
|
||||
align: 'left',
|
||||
width: 280,
|
||||
},
|
||||
];
|
||||
|
||||
async function open(mainId: string) {
|
||||
visible.value = true;
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await list({ mainId, pageNo: 1, pageSize: 9999, column: 'createTime', order: 'desc' });
|
||||
feedbackTableData.value = Array.isArray(res) ? res : res?.records || [];
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({ open });
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.feedback-view-attachment-list {
|
||||
min-width: 240px;
|
||||
|
||||
:deep(.file-list-wrapper) {
|
||||
min-height: 40px;
|
||||
max-height: 120px;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
: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;
|
||||
padding: 4px 0;
|
||||
|
||||
.ant-empty-image {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ant-empty-description {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="DqInspectProgressForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="反馈部门ID" v-bind="validateInfos.feedbackDeptId" id="DqInspectProgressForm-feedbackDeptId" name="feedbackDeptId">
|
||||
<a-input v-model:value="formData.feedbackDeptId" placeholder="请输入反馈部门ID" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="反馈部门名称" v-bind="validateInfos.feedbackDeptName" id="DqInspectProgressForm-feedbackDeptName" name="feedbackDeptName">
|
||||
<a-input v-model:value="formData.feedbackDeptName" placeholder="请输入反馈部门名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="反馈人ID" v-bind="validateInfos.feedbackPersonId" id="DqInspectProgressForm-feedbackPersonId" name="feedbackPersonId">
|
||||
<a-input v-model:value="formData.feedbackPersonId" placeholder="请输入反馈人ID" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="反馈人姓名" v-bind="validateInfos.feedbackPersonName" id="DqInspectProgressForm-feedbackPersonName" name="feedbackPersonName">
|
||||
<a-input v-model:value="formData.feedbackPersonName" placeholder="请输入反馈人姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="实际完成时间" v-bind="validateInfos.actualTime" id="DqInspectProgressForm-actualTime" name="actualTime">
|
||||
<a-date-picker placeholder="请选择实际完成时间" v-model:value="formData.actualTime" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="工作进展" v-bind="validateInfos.workProgress" id="DqInspectProgressForm-workProgress" name="workProgress">
|
||||
<a-input v-model:value="formData.workProgress" placeholder="请输入工作进展" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="进展状态" v-bind="validateInfos.bpmStatus" id="DqInspectProgressForm-bpmStatus" name="bpmStatus">
|
||||
<a-input v-model:value="formData.bpmStatus" placeholder="请输入进展状态" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="整改措施任务ID" v-bind="validateInfos.mainId" id="DqInspectProgressForm-mainId" name="mainId">
|
||||
<a-input v-model:value="formData.mainId" placeholder="请输入整改措施任务ID" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col v-if="showFlowSubmitButton" :span="24" style="width: 100%;text-align: center;">
|
||||
<a-button preIcon="ant-design:check-outlined" style="width: 126px" type="primary" @click="submitForm">提 交</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../DqInspectProgress.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
const { isDisabledAuth, hasPermission, initBpmFormData } = usePermission();
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
feedbackDeptId: '',
|
||||
feedbackDeptName: '',
|
||||
feedbackPersonId: '',
|
||||
feedbackPersonName: '',
|
||||
actualTime: '',
|
||||
workProgress: '',
|
||||
bpmStatus: '',
|
||||
delFlag: '',
|
||||
mainId: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
onMounted(()=>{
|
||||
initBpmFormData(props.formData);
|
||||
initFormData();
|
||||
});
|
||||
//渲染流程表单数据
|
||||
const queryByIdUrl = '/dqinspecttask/dqInspectTask/queryDqInspectProgressById';
|
||||
async function initFormData(){
|
||||
if(props.formBpm === true){
|
||||
let params = {id: props.formData.dataId};
|
||||
const data = await defHttp.get({url: queryByIdUrl, params});
|
||||
//设置表单的值
|
||||
edit({...data});
|
||||
}
|
||||
}
|
||||
// 是否显示提交按钮
|
||||
const showFlowSubmitButton = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
});
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<DqInspectProgressForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></DqInspectProgressForm>
|
||||
<template #footer>
|
||||
<a-button @click="handleCancel">取消</a-button>
|
||||
<a-button :class="{ 'jee-hidden': disableSubmit }" type="primary" @click="handleOk">确认</a-button>
|
||||
</template>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import DqInspectProgressForm from './DqInspectProgressForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
const { createMessage } = useMessage();
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
@@ -0,0 +1,148 @@
|
||||
# DqInspectTask 整改任务流程审批界面权限控制
|
||||
|
||||
## 控制模型
|
||||
|
||||
- 基础信息区域始终可见,通过 `edit` 控制是否可编辑
|
||||
- 流程办理和反馈信息区域默认全关,逐级显式通过 `extendUrlParams` 传 `=1` 开启
|
||||
- 上级未开启时,下级传参不生效
|
||||
- 每个 UI 元素只受一个属性控制
|
||||
|
||||
## 控制树
|
||||
|
||||
```
|
||||
edit → 基础信息是否可编辑(1=可编辑, 缺省=只读)
|
||||
|
||||
showProcessHandle → 流程办理区域
|
||||
├── showSubApproveUser → 是否办结 + 部门经办人选人
|
||||
└── showSelnextUser → 指定下一步操作人(默认隐藏,=1 显示)
|
||||
|
||||
showFeedbackInfo → 反馈信息区域(表格 + 表头)
|
||||
├── showAddFeedback → 新增反馈按钮
|
||||
├── showEditFeedback → 编辑/删除操作列
|
||||
│ ├── jiJianFieldsReadonly → 弹窗内纪检字段只读(需 showEditFeedback=1 或 showAddFeedback=1)
|
||||
│ └── nonJiJianFieldsReadonly → 弹窗内非纪检字段只读(仅纪检字段可编辑,需 showEditFeedback=1 或 showAddFeedback=1)
|
||||
├── showDeptFeedback → 按部门过滤反馈数据
|
||||
└── showJiJianFields → 纪检字段列(检查情况/监督意见/措施数量)
|
||||
```
|
||||
|
||||
## 节点权限配置
|
||||
|
||||
> 格式:`| L1 属性 | L2 属性 | 值 | 说明 |`,缩进表示层级,L2 仅在 L1=1 时生效
|
||||
|
||||
---
|
||||
|
||||
## 整改任务审批流程
|
||||
|
||||
### 节点: <措施责任部门经办人发起流程>
|
||||
* taskDefKey: `<Task_initiator>`
|
||||
|
||||
* **edit** `1` —— 基础信息可编辑
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
|
||||
---
|
||||
|
||||
### 节点: <措施责任部门负责人审批>
|
||||
* taskDefKey: `<Task_dept_leader>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
|
||||
---
|
||||
|
||||
### 节点: <党群领导审批>
|
||||
* taskDefKey: `<Task_party_leader>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
|
||||
---
|
||||
|
||||
### 节点: <部门经办人填写进展反馈>
|
||||
* taskDefKey: `<Task_progress_fill>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `1` —— 反馈信息区域
|
||||
* **showAddFeedback** `1` —— 新增反馈按钮
|
||||
* **showEditFeedback** `1` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `1` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1&showDeptFeedback=1
|
||||
---
|
||||
|
||||
### 节点: <部门负责人审批进展>
|
||||
* taskDefKey: `<Task_progress_leader>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `1` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `1` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showDeptFeedback=1
|
||||
---
|
||||
|
||||
### 节点: <纪检经办人监察>
|
||||
* taskDefKey: `<Task_ji_jian>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `1` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `1` —— 编辑/删除操作列
|
||||
* **jiJianFieldsReadonly** `0` —— 弹窗内纪检字段只读
|
||||
* **nonJiJianFieldsReadonly** `1` —— 弹窗内非纪检字段只读
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `1` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showEditFeedback=1&nonJiJianFieldsReadonly=1&showJiJianFields=1
|
||||
---
|
||||
|
||||
### 节点: <纪检负责人审批>
|
||||
* taskDefKey: `<Task_ji_jian_leader>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `1` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `1` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showJiJianFields=1
|
||||
---
|
||||
|
||||
### 节点: <督办经办人确认整改完成>
|
||||
* taskDefKey: `<Task_confirm>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `1` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `1` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showJiJianFields=1
|
||||
---
|
||||
@@ -92,3 +92,13 @@ export const saveOrUpdate = (params, isUpdate) => {
|
||||
* @param params
|
||||
*/
|
||||
export const queryDataById = (id) => defHttp.get({url: Api.queryDataById, params:{ id }});
|
||||
|
||||
// ====================== BPM表单相关API ======================
|
||||
|
||||
export const saveBpmForm = (params) => {
|
||||
return defHttp.post({ url: '/dqinspecttask/dqInspectTask/saveBpmForm', params }, { isTransformResponse: false });
|
||||
};
|
||||
|
||||
export const saveSubApprove = (params) => {
|
||||
return defHttp.post({ url: '/dqinspecttask/dqInspectTask/saveSubApprove', params }, { isTransformResponse: false });
|
||||
};
|
||||
|
||||
@@ -4,16 +4,21 @@
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="improveMeasure">
|
||||
<template #label><span title="整改措施">整改措施</span></template>
|
||||
<JInput v-model:value="queryParam.improveMeasure"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="improveMeasure">
|
||||
<template #label><span title="整改措施">整改措施</span></template>
|
||||
<JInput v-model:value="queryParam.improveMeasure" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="measureResLeader">
|
||||
<template #label><span title="措施责任领导">措施责任</span></template>
|
||||
<j-select-user placeholder="请选择措施责任领导" v-model:value="queryParam.measureResLeader" @change="(value)=>handleFormJoinChange('measureResLeader',value)" allow-clear />
|
||||
<j-select-user
|
||||
placeholder="请选择措施责任领导"
|
||||
v-model:value="queryParam.measureResLeader"
|
||||
@change="(value) => handleFormJoinChange('measureResLeader', value)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
@@ -40,57 +45,67 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'dqinspecttask:dq_inspect_task:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'dqinspecttask:dq_inspect_task:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'dqinspecttask:dq_inspect_task: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="'dqinspecttask:dq_inspect_task:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
<a-button type="primary" v-auth="'dqinspecttask:dq_inspect_task:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'dqinspecttask:dq_inspect_task:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls">
|
||||
导出</a-button
|
||||
>
|
||||
<j-upload-button type="primary" v-auth="'dqinspecttask:dq_inspect_task: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="'dqinspecttask:dq_inspect_task:deleteBatch'"
|
||||
>批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
||||
</template>
|
||||
<!--字段回显插槽-->
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }"> </template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<DqInspectProgressFeedbackViewModal ref="feedbackViewModalRef" />
|
||||
<DqInspectTaskModal @register="registerModal" @success="handleSuccess"></DqInspectTaskModal>
|
||||
<!-- 审批记录 -->
|
||||
<BpmPictureModal @register="registerBpmModal" />
|
||||
<!-- 审批记录 -->
|
||||
<BpmPictureModal @register="registerBpmModal" />
|
||||
<FlowScheduleStartModal ref="flowScheduleModalRef" @confirm="handleFlowScheduleConfirm" />
|
||||
<BusinessProcessListModal ref="businessProcessListModalRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="dqinspecttask-dqInspectTask" setup>
|
||||
import {ref, reactive, computed, unref} from 'vue';
|
||||
import {BasicTable, useTable, TableAction} from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import {useModal} from '/@/components/Modal';
|
||||
import DqInspectTaskModal from './components/DqInspectTaskModal.vue'
|
||||
import {ledgerColumns, superQuerySchema} from './DqInspectTask.data';
|
||||
import {ledgerList, deleteOne, batchDelete, getImportUrl,getExportUrl} from './DqInspectTask.api';
|
||||
import {downloadFile} from '/@/utils/common/renderUtils';
|
||||
import { ref, reactive, computed, unref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import DqInspectTaskModal from './components/DqInspectTaskModal.vue';
|
||||
import DqInspectProgressFeedbackViewModal from '../inspectProgress/components/DqInspectProgressFeedbackViewModal.vue';
|
||||
import { ledgerColumns, superQuerySchema } from './DqInspectTask.data';
|
||||
import { ledgerList, deleteOne, batchDelete, getImportUrl, getExportUrl, saveOrUpdate } from './DqInspectTask.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
||||
import JSelectUser from '/@/components/Form/src/jeecg/components/JSelectUser.vue';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
import { startProcess } from '/@/api/common/api';
|
||||
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||
import { startProcessSchedules } from '/@/api/common/api';
|
||||
import FlowScheduleStartModal from '/src/components/semri/process/FlowScheduleStartModal.vue';
|
||||
import BusinessProcessListModal from '/src/components/semri/process/BusinessProcessListModal.vue';
|
||||
|
||||
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
@@ -98,40 +113,43 @@
|
||||
const queryParam = reactive<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
//注册model
|
||||
const [registerModal, {openModal}] = useModal();
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const feedbackViewModalRef = ref();
|
||||
const flowScheduleModalRef = ref();
|
||||
const businessProcessListModalRef = ref();
|
||||
const userStore = useUserStore();
|
||||
const { createMessage } = useMessage();
|
||||
//注册table数据
|
||||
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
|
||||
tableProps:{
|
||||
title: 'dq_inspect_task',
|
||||
api: ledgerList,
|
||||
columns: ledgerColumns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed:'right'
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
afterFetch: async (items) => {
|
||||
return calcLedgerRowSpan(items);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name:"dq_inspect_task",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
})
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'dq_inspect_task',
|
||||
api: ledgerList,
|
||||
columns: ledgerColumns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 240,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
afterFetch: async (items) => {
|
||||
return calcLedgerRowSpan(items);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: 'dq_inspect_task',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess,
|
||||
},
|
||||
});
|
||||
|
||||
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
@@ -146,53 +164,53 @@
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
showFooter: true,
|
||||
});
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
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);
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 只在当前页内计算台账合并行,避免跨页合并导致表格分页行为不可控。
|
||||
*/
|
||||
@@ -202,7 +220,11 @@
|
||||
}
|
||||
calcGroupRowSpan(items, (item) => item.categoryId || item.categoryName, '_categoryRowSpan');
|
||||
calcGroupRowSpan(items, (item) => `${item.categoryId || item.categoryName}_${item.surfaceId || item.surfaceName}`, '_surfaceRowSpan');
|
||||
calcGroupRowSpan(items, (item) => `${item.categoryId || item.categoryName}_${item.surfaceId || item.surfaceName}_${item.specificId || item.specificName}`, '_specificRowSpan');
|
||||
calcGroupRowSpan(
|
||||
items,
|
||||
(item) => `${item.categoryId || item.categoryName}_${item.surfaceId || item.surfaceName}_${item.specificId || item.specificName}`,
|
||||
'_specificRowSpan'
|
||||
);
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -226,83 +248,157 @@
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record){
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'dqinspecttask:dq_inspect_task:edit'
|
||||
}
|
||||
]
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record){
|
||||
let dropDownAction = [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record)
|
||||
},
|
||||
auth: 'dqinspecttask:dq_inspect_task:delete'
|
||||
},
|
||||
{
|
||||
label: '审批进度',
|
||||
onClick: handlePreviewPic.bind(null, record),
|
||||
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
|
||||
}
|
||||
];
|
||||
if(record.bpmStatus == '1' || !record.bpmStatus){
|
||||
dropDownAction.push({
|
||||
label: '发起流程',
|
||||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
return dropDownAction;
|
||||
}
|
||||
function getTableAction(record) {
|
||||
const actions = [
|
||||
{
|
||||
label: '查看反馈',
|
||||
onClick: handleViewFeedback.bind(null, record),
|
||||
},
|
||||
];
|
||||
if (record.bpmStatus == '1' || !record.bpmStatus) {
|
||||
actions.push({
|
||||
label: '发起流程',
|
||||
onClick: handleProcess.bind(null, record),
|
||||
});
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
let dropDownAction = [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '审批进度',
|
||||
onClick: handlePreviewPic.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '查询督办流程',
|
||||
onClick: handleQueryProcess.bind(null, record),
|
||||
},
|
||||
];
|
||||
return dropDownAction;
|
||||
}
|
||||
|
||||
const FLOW_CODE = 'inspect_flow_create_01';
|
||||
const FLOW_NAME = '整改任务';
|
||||
const BUSINESS_TABLE_NAME = 'dq_inspect_task';
|
||||
const FORM_URL = 'dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=0&showFeedbackInfo=1';
|
||||
|
||||
/**
|
||||
* 提交流程
|
||||
* 发起流程
|
||||
*/
|
||||
async function handleProcess(record) {
|
||||
let params = {
|
||||
flowCode: 'dev_dq_inspect_task_001',
|
||||
id: record.id,
|
||||
formUrl: 'dqinspecttask/components/DqInspectTaskForm',
|
||||
formUrlMobile: ''
|
||||
}
|
||||
await startProcess(params);
|
||||
function handleProcess(record) {
|
||||
flowScheduleModalRef.value?.open({
|
||||
title: '发起整改任务流程',
|
||||
payload: { record },
|
||||
deptOptions: getDeptOptions(record),
|
||||
showSuoleaderFields: true,
|
||||
isNeedAppro: record.isNeedAppro,
|
||||
supDeptleaderid: record.supDeptleaderid,
|
||||
supDeptleaderName: record.supDeptleaderid_dictText,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程调度确认
|
||||
*/
|
||||
async function handleFlowScheduleConfirm({ payload, options }) {
|
||||
const record = payload?.record || {};
|
||||
|
||||
const params = {
|
||||
intervalType: options.intervalType,
|
||||
startCount: options.startCount,
|
||||
taskTask: {
|
||||
triggerType: options.triggerType,
|
||||
startTime: options.intervalStartTime,
|
||||
flowCode: FLOW_CODE,
|
||||
formUrl: FORM_URL,
|
||||
flowName: FLOW_NAME,
|
||||
jsonData: { ...record },
|
||||
businessTablename: BUSINESS_TABLE_NAME,
|
||||
businessId: record.id,
|
||||
title: record.improveMeasure || '',
|
||||
content: record.improveMeasure || '',
|
||||
deptId: options.deptId || record.measureResDept || '',
|
||||
deptLeaderId: record.measureResLeader || '',
|
||||
},
|
||||
};
|
||||
|
||||
await startProcessSchedules(params);
|
||||
await saveOrUpdate({ id: record.id, problemId: record.problemId, bpmStatus: '2' }, true);
|
||||
createMessage.success('发起成功');
|
||||
handleSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询督办流程
|
||||
*/
|
||||
function handleQueryProcess(record) {
|
||||
businessProcessListModalRef.value?.open({
|
||||
title: '流程列表',
|
||||
businessId: record.id,
|
||||
columns: '',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析措施责任部门选项
|
||||
*/
|
||||
function getDeptOptions(record) {
|
||||
const deptIds = String(record.measureResDept || '')
|
||||
.split(/[,,]/)
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean);
|
||||
const deptNames = String(record.measureResDept_dictText || '')
|
||||
.split(/[,,]/)
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean);
|
||||
return deptIds.map((deptId, index) => ({
|
||||
value: deptId,
|
||||
label: deptNames[index] || deptId,
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看反馈
|
||||
*/
|
||||
function handleViewFeedback(record) {
|
||||
feedbackViewModalRef.value.open(record.id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批进度
|
||||
*/
|
||||
async function handlePreviewPic(record) {
|
||||
bpmPicModal(true, {
|
||||
flowCode: 'dev_dq_inspect_task_001',
|
||||
flowCode: 'inspect_flow_create_01',
|
||||
dataId: record.id,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ----------------------以下为原生查询需要添加的-------------------------- */
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
xs: 24,
|
||||
sm: 4,
|
||||
xl: 6,
|
||||
xxl: 4,
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
@@ -337,19 +433,20 @@
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
.query-group-cust {
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
.query-group-split-cust {
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
text-align: center;
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
.ant-form-item:not(.ant-form-item-with-help) {
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<JModal
|
||||
:title="isEdit ? '编辑反馈' : '新增反馈'"
|
||||
:width="820"
|
||||
:visible="visible"
|
||||
:confirmLoading="saving"
|
||||
okText="保存"
|
||||
cancelText="取消"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form ref="formRef" class="bpm-feedback-modal-form" :model="formData" :rules="formRules" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="反馈部门" name="feedbackDeptId">
|
||||
<j-select-dept v-model:value="formData.feedbackDeptId" :disabled="nonJiJianFieldsReadonly" checkStrictly allow-clear @change="handleDeptChange" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="反馈人">
|
||||
<a-input :value="formData.feedbackPersonName" disabled placeholder="自动填充当前用户" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="实际完成时间" name="actualTime">
|
||||
<a-date-picker v-model:value="formData.actualTime" value-format="YYYY-MM-DD" style="width: 100%" :disabled="nonJiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="进展状态" name="bpmStatus">
|
||||
<JDictSelectTag v-model:value="formData.bpmStatus" dictCode="super_status" placeholder="请选择进展状态" type="select" :disabled="nonJiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="工作进展" name="workProgress" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<a-textarea v-model:value="formData.workProgress" :rows="3" :disabled="nonJiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col v-if="showJiJianFields" :span="12">
|
||||
<a-form-item label="检查情况" name="inspectionStatus">
|
||||
<a-input v-model:value="formData.inspectionStatus" placeholder="填写监督检查情况" :disabled="jiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col v-if="showJiJianFields" :span="24">
|
||||
<a-form-item label="监督意见" name="supervisoryOpinion" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<a-textarea v-model:value="formData.supervisoryOpinion" placeholder="是否通过审核" :rows="3" :disabled="jiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col v-if="showJiJianFields" :span="12">
|
||||
<a-form-item label="措施数量" name="measureCount">
|
||||
<a-input-number v-model:value="formData.measureCount" placeholder="填写措施数量" style="width: 100%" :disabled="jiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="附件" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<SUploadFile
|
||||
:key="uploadKey"
|
||||
ref="uploadFileRef"
|
||||
:bussiness-id="formData.id"
|
||||
:multiple="true"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</JModal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, reactive, ref } from 'vue';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
import { saveOrUpdate as progressSaveOrUpdate } from '../../inspectProgress/DqInspectProgress.api';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { buildUUID } from '/@/utils/uuid';
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
const props = defineProps({
|
||||
showJiJianFields: { type: Boolean, default: false },
|
||||
jiJianFieldsReadonly: { type: Boolean, default: false },
|
||||
nonJiJianFieldsReadonly: { type: Boolean, default: false },
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const userStore = useUserStore();
|
||||
|
||||
const visible = ref(false);
|
||||
const saving = ref(false);
|
||||
const isEdit = ref(false);
|
||||
const formRef = ref();
|
||||
const uploadFileRef = ref<InstanceType<typeof SUploadFile> | null>(null);
|
||||
const uploadKey = ref(0);
|
||||
const labelCol = { xs: { span: 24 }, sm: { span: 7 } };
|
||||
const wrapperCol = { xs: { span: 24 }, sm: { span: 17 } };
|
||||
const wideLabelCol = { xs: { span: 24 }, sm: { span: 3 } };
|
||||
const wideWrapperCol = { xs: { span: 24 }, sm: { span: 21 } };
|
||||
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
feedbackDeptId: '',
|
||||
feedbackDeptName: '',
|
||||
feedbackPersonId: '',
|
||||
feedbackPersonName: '',
|
||||
actualTime: '',
|
||||
workProgress: '',
|
||||
bpmStatus: '',
|
||||
mainId: '',
|
||||
bpmProcessId: '',
|
||||
inspectionStatus: '',
|
||||
supervisoryOpinion: '',
|
||||
measureCount: undefined,
|
||||
});
|
||||
|
||||
const formRules = {
|
||||
workProgress: [{ required: true, message: '请输入工作进展' }],
|
||||
};
|
||||
|
||||
function resetForm(mainId = '', bpmProcessId = '') {
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if (key === 'measureCount') {
|
||||
formData[key] = undefined;
|
||||
} else {
|
||||
formData[key] = '';
|
||||
}
|
||||
});
|
||||
formData.mainId = mainId;
|
||||
formData.bpmProcessId = bpmProcessId;
|
||||
uploadKey.value += 1;
|
||||
nextTick(() => formRef.value?.clearValidate?.());
|
||||
}
|
||||
|
||||
function open(mainId: string, bpmProcessId = '', defaultDeptId = '', defaultDeptName = '') {
|
||||
resetForm(mainId, bpmProcessId);
|
||||
isEdit.value = false;
|
||||
if (defaultDeptId) {
|
||||
void applyCurrentUserFeedbackInfo(defaultDeptId, defaultDeptName);
|
||||
} else {
|
||||
void applyCurrentUserFeedbackInfo();
|
||||
}
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
function openEdit(record: Record<string, any>) {
|
||||
resetForm(record.mainId || '', record.bpmProcessId || '');
|
||||
isEdit.value = true;
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if (record[key] !== undefined) {
|
||||
formData[key] = record[key];
|
||||
}
|
||||
});
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
function getCurrentLoginDepart() {
|
||||
const userInfo = (userStore.getUserInfo || {}) as Record<string, any>;
|
||||
const loginInfo = (userStore.getLoginInfo || {}) as Record<string, any>;
|
||||
const departs = Array.isArray(loginInfo.departs) ? loginInfo.departs : [];
|
||||
if (userInfo.orgCode) {
|
||||
return departs.find((item) => item.orgCode === userInfo.orgCode);
|
||||
}
|
||||
return departs.length === 1 ? departs[0] : undefined;
|
||||
}
|
||||
|
||||
async function getCurrentDepartInfo() {
|
||||
const userInfo = (userStore.getUserInfo || {}) as Record<string, any>;
|
||||
const loginDepart = getCurrentLoginDepart();
|
||||
if (loginDepart) {
|
||||
return {
|
||||
id: loginDepart.id || '',
|
||||
departName: loginDepart.departName || '',
|
||||
};
|
||||
}
|
||||
return {
|
||||
id: userInfo.departIds || '',
|
||||
departName: userInfo.departIds_dictText || userInfo.orgCodeTxt || '',
|
||||
};
|
||||
}
|
||||
|
||||
async function applyCurrentUserFeedbackInfo(defaultDeptId = '', defaultDeptName = '') {
|
||||
const userInfo = (userStore.getUserInfo || {}) as Record<string, any>;
|
||||
formData.feedbackPersonId = userInfo.id || userInfo.userId || '';
|
||||
formData.feedbackPersonName = userInfo.realname || '';
|
||||
if (defaultDeptId) {
|
||||
formData.feedbackDeptId = defaultDeptId;
|
||||
formData.feedbackDeptName = defaultDeptName || '';
|
||||
} else {
|
||||
const departInfo = await getCurrentDepartInfo();
|
||||
formData.feedbackDeptId = departInfo.id;
|
||||
formData.feedbackDeptName = departInfo.departName;
|
||||
}
|
||||
}
|
||||
|
||||
function handleDeptChange(value, row) {
|
||||
if (row) {
|
||||
formData.feedbackDeptName = row.name || '';
|
||||
}
|
||||
}
|
||||
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
async function handleOk() {
|
||||
try {
|
||||
await formRef.value?.validate?.();
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
saving.value = true;
|
||||
try {
|
||||
if (!formData.id && uploadFileRef.value?.hasPendingFiles?.()) {
|
||||
formData.id = buildUUID();
|
||||
}
|
||||
const res = await progressSaveOrUpdate({ ...formData }, isEdit.value);
|
||||
if (res.success) {
|
||||
if (formData.id && uploadFileRef.value?.hasPendingFiles?.()) {
|
||||
await uploadFileRef.value.bindBussinessId(formData.id);
|
||||
}
|
||||
createMessage.success(res.message || '保存成功');
|
||||
visible.value = false;
|
||||
emit('success');
|
||||
} else {
|
||||
createMessage.warning(res.message || '保存失败');
|
||||
}
|
||||
} finally {
|
||||
saving.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
openEdit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.bpm-feedback-modal-form {
|
||||
padding: 14px;
|
||||
|
||||
:deep(.ant-form-item-label) {
|
||||
overflow: visible;
|
||||
white-space: normal;
|
||||
text-overflow: unset;
|
||||
text-align: left;
|
||||
|
||||
> label {
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,857 @@
|
||||
<template>
|
||||
<a-spin :spinning="loading">
|
||||
<div class="dq-inspect-task-bpm-form">
|
||||
<a-form
|
||||
class="main-form"
|
||||
:class="{ 'main-form-readonly': mainDisabled }"
|
||||
labelAlign="left"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:model="mainForm"
|
||||
>
|
||||
<div class="base-info-header section-toolbar">
|
||||
<div class="section-title">基础信息</div>
|
||||
<a-space class="section-actions">
|
||||
<a-button v-if="!mainDisabled" class="base-save-button" type="link" size="small" :loading="savingMain" @click="submitForm">
|
||||
<Icon icon="ant-design:save-outlined" />
|
||||
保存
|
||||
</a-button>
|
||||
<a-button
|
||||
class="section-action-button"
|
||||
:type="showBaseInfoDetail ? 'default' : 'link'"
|
||||
size="small"
|
||||
@click="showBaseInfoDetail = !showBaseInfoDetail"
|
||||
>
|
||||
<Icon :icon="showBaseInfoDetail ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||
{{ showBaseInfoDetail ? '收起基础信息' : '展开全部信息' }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
<a-row class="base-info-row" :gutter="[12, 4]">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="具体问题" name="problemId">
|
||||
<a-tree-select
|
||||
v-model:value="mainForm.problemId"
|
||||
:tree-data="problemTreeData"
|
||||
:loading="loadingProblemOptions"
|
||||
:disabled="mainDisabled"
|
||||
placeholder="请选择具体问题"
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
style="width: 100%"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="整改措施" name="improveMeasure">
|
||||
<a-textarea v-model:value="mainForm.improveMeasure" :auto-size="{ minRows: 1, maxRows: 4 }" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<template v-if="showBaseInfoDetail">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="密级" name="secretLevel">
|
||||
<j-dict-select-tag v-model:value="mainForm.secretLevel" dictCode="secret_level" placeholder="请选择密级" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="完成时限" name="deadline">
|
||||
<a-date-picker v-model:value="mainForm.deadline" value-format="YYYY-MM-DD" :disabled="mainDisabled" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="目标节点" name="targetNode">
|
||||
<a-input v-model:value="mainForm.targetNode" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="措施责任领导" name="measureResLeader">
|
||||
<j-select-user v-model:value="mainForm.measureResLeader" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="措施责任部门" name="measureResDept">
|
||||
<j-select-dept v-model:value="mainForm.measureResDept" :disabled="mainDisabled" :multiple="true" checkStrictly allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="整改交付成果" name="rectificationEvidence">
|
||||
<a-input v-model:value="mainForm.rectificationEvidence" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="成效评价标准" name="evaluationCriterion">
|
||||
<a-input v-model:value="mainForm.evaluationCriterion" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否需要党群领导审批" name="isNeedAppro">
|
||||
<j-dict-select-tag type="radio" v-model:value="mainForm.isNeedAppro" dictCode="yn" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="党群领导" name="supDeptleaderid">
|
||||
<j-select-user v-model:value="mainForm.supDeptleaderid" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="检查情况" name="inspectionStatus">
|
||||
<a-input v-model:value="mainForm.inspectionStatus" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="监督意见" name="supervisoryOpinion">
|
||||
<a-input v-model:value="mainForm.supervisoryOpinion" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</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-form-item label="整改状态" name="taskStatus">
|
||||
<a-input v-model:value="mainForm.taskStatus" :disabled="mainDisabled" allow-clear />
|
||||
</a-form-item>
|
||||
</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>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
||||
<a-divider />
|
||||
|
||||
<div class="feedback-header section-toolbar" v-if="showFeedbackInfo">
|
||||
<div class="section-title">反馈信息</div>
|
||||
<a-space class="section-actions">
|
||||
<a-button v-if="showAddFeedback" class="section-action-button feedback-add-button" type="primary" @click="openFeedbackModal">
|
||||
<Icon icon="ant-design:plus-outlined" />
|
||||
新增反馈
|
||||
</a-button>
|
||||
<a-button
|
||||
class="section-action-button"
|
||||
:type="showFeedbackDetail ? 'default' : 'link'"
|
||||
size="small"
|
||||
@click="showFeedbackDetail = !showFeedbackDetail"
|
||||
>
|
||||
<Icon :icon="showFeedbackDetail ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||
{{ showFeedbackDetail ? '收起反馈信息' : '展开反馈信息' }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
<a-table
|
||||
v-if="showFeedbackInfo && showFeedbackDetail"
|
||||
rowKey="id"
|
||||
size="small"
|
||||
bordered
|
||||
:columns="feedbackColumns"
|
||||
:data-source="feedbackList"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1200 }"
|
||||
>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.key === 'seq'">{{ index + 1 }}</template>
|
||||
<template v-if="column.key === 'attachments'">
|
||||
<SUploadFile v-if="record.id" class="feedback-attachment-list" :bussiness-id="record.id" :disabled="true" :multiple="true" />
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
<template v-if="column.key === 'feedbackAction'">
|
||||
<a-button type="link" size="small" @click="handleEditFeedback(record)">编辑</a-button>
|
||||
<a-popconfirm title="确定删除该反馈吗?" @confirm="handleDeleteFeedback(record)">
|
||||
<a-button type="link" size="small" danger>删除</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<DqInspectTaskBPMFeedbackModal
|
||||
ref="feedbackModalRef"
|
||||
:showJiJianFields="showJiJianFields"
|
||||
:jiJianFieldsReadonly="jiJianFieldsReadonly"
|
||||
:nonJiJianFieldsReadonly="nonJiJianFieldsReadonly"
|
||||
@success="loadFeedbackList"
|
||||
/>
|
||||
|
||||
<template v-if="showProcessHandle">
|
||||
<a-divider />
|
||||
<div class="process-header section-toolbar">
|
||||
<div class="section-title">流程办理</div>
|
||||
</div>
|
||||
<a-form v-if="showSubApproveUser" class="process-variable-form" labelAlign="left" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否办结" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<a-radio-group v-model:value="isEnd" :disabled="savingSubApproveUser">
|
||||
<a-radio :value="0">否(分配部门经办人)</a-radio>
|
||||
<a-radio :value="1">是(办结)</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col v-if="showSubApproveUserSelector" :span="12">
|
||||
<a-form-item label="部门经办人" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<j-select-user v-model:value="subApproveUser" :disabled="savingSubApproveUser" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<TaskHandleInnerContent
|
||||
:form-data="formData"
|
||||
:claim="claim"
|
||||
:showSelnextUser="showSelnextUser"
|
||||
:beforeHandle="saveMainFormBeforeProcessHandle"
|
||||
@success="handleProcessSuccess"
|
||||
@claimSuccess="handleClaimSuccess"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, reactive, ref, watch } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
||||
import JSelectUser from '/@/components/Form/src/jeecg/components/JSelectUser.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { saveBpmForm, saveSubApprove, specificProblemOptions } from '../DqInspectTask.api';
|
||||
import { list as progressList, deleteOne as progressDelete } from '../../inspectProgress/DqInspectProgress.api';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||
import DqInspectTaskBPMFeedbackModal from './DqInspectTaskBPMFeedbackModal.vue';
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
|
||||
const { initBpmFormData } = usePermission();
|
||||
const userStore = useUserStore();
|
||||
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({}) },
|
||||
formBpm: { type: Boolean, default: true },
|
||||
claim: { type: Boolean, default: false },
|
||||
});
|
||||
|
||||
initBpmFormData(props.formData);
|
||||
|
||||
const emit = defineEmits(['ok', 'success', 'claimSuccess']);
|
||||
const { createMessage } = useMessage();
|
||||
const queryByIdUrl = '/dqinspecttask/dqInspectTask/queryById';
|
||||
|
||||
const labelCol = { xs: { span: 24 }, sm: { span: 7 } };
|
||||
const wrapperCol = { xs: { span: 24 }, sm: { span: 17 } };
|
||||
const wideLabelCol = { xs: { span: 24 }, sm: { span: 3 } };
|
||||
const wideWrapperCol = { xs: { span: 24 }, sm: { span: 21 } };
|
||||
|
||||
const feedbackModalRef = ref();
|
||||
const loading = ref(false);
|
||||
const savingMain = ref(false);
|
||||
const savingSubApproveUser = ref(false);
|
||||
const showBaseInfoDetail = ref(true);
|
||||
const showFeedbackDetail = ref(true);
|
||||
const feedbackList = ref<any[]>([]);
|
||||
const subApproveUser = ref('');
|
||||
const isEnd = ref(0);
|
||||
const problemTreeData = ref<any[]>([]);
|
||||
const loadingProblemOptions = ref(false);
|
||||
|
||||
const mainForm = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
problemId: '',
|
||||
secretLevel: '',
|
||||
improveMeasure: '',
|
||||
deadline: '',
|
||||
targetNode: '',
|
||||
measureResLeader: '',
|
||||
measureResDept: '',
|
||||
rectificationEvidence: '',
|
||||
evaluationCriterion: '',
|
||||
isNeedAppro: '',
|
||||
supDeptleaderid: '',
|
||||
inspectionStatus: '',
|
||||
supervisoryOpinion: '',
|
||||
measureCount: undefined,
|
||||
bpmProcessId: '',
|
||||
bpmStatus: '',
|
||||
taskStatus: '',
|
||||
superviseCount: '',
|
||||
sortNo: undefined,
|
||||
});
|
||||
|
||||
const feedbackColumns = computed(() => {
|
||||
const cols: any[] = [
|
||||
{ title: '序号', key: 'seq', align: 'center', width: 60 },
|
||||
{ title: '反馈人', dataIndex: 'feedbackPersonName', align: 'center', width: 100 },
|
||||
{ title: '反馈部门', dataIndex: 'feedbackDeptName', align: 'center', width: 140 },
|
||||
{ title: '工作进展', dataIndex: 'workProgress', align: 'left', width: 240 },
|
||||
{ title: '实际完成时间', dataIndex: 'actualTime', align: 'center', width: 120 },
|
||||
{ title: '进展状态', dataIndex: 'bpmStatus_dictText', align: 'center', width: 100 },
|
||||
{ title: '附件', dataIndex: 'id', key: 'attachments', align: 'left', width: 280 },
|
||||
];
|
||||
if (showJiJianFields.value) {
|
||||
cols.push(
|
||||
{ title: '检查情况', dataIndex: 'inspectionStatus', align: 'left', width: 160 },
|
||||
{ title: '监督意见', dataIndex: 'supervisoryOpinion', align: 'left', width: 160 },
|
||||
{ title: '措施数量', dataIndex: 'measureCount', align: 'center', width: 100 }
|
||||
);
|
||||
}
|
||||
if (showEditFeedback.value) {
|
||||
cols.push({ title: '操作', dataIndex: 'id', key: 'feedbackAction', align: 'center', width: 120, fixed: 'right' });
|
||||
}
|
||||
return cols;
|
||||
});
|
||||
|
||||
const mainDisabled = computed(() => {
|
||||
if (props.formBpm) {
|
||||
return props.formData?.disabled !== false;
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
const showProcessHandle = computed(() => {
|
||||
const explicit = props.formData?.extendUrlParams?.showProcessHandle;
|
||||
if (explicit === '0') return false;
|
||||
if (explicit === '1') return true;
|
||||
return props.formBpm && !!props.formData?.taskId;
|
||||
});
|
||||
const showAddFeedback = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showAddFeedback ?? '') === '1'
|
||||
);
|
||||
const showFeedbackInfo = computed(() => {
|
||||
const p = props.formData?.extendUrlParams;
|
||||
const explicit = p?.showFeedbackInfo;
|
||||
if (explicit === '0') return false;
|
||||
if (explicit === '1') return true;
|
||||
return (
|
||||
String(p?.showAddFeedback ?? '') === '1' ||
|
||||
String(p?.showEditFeedback ?? '') === '1' ||
|
||||
String(p?.showDeptFeedback ?? '') === '1'
|
||||
);
|
||||
});
|
||||
const showEditFeedback = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showEditFeedback ?? '') === '1'
|
||||
);
|
||||
const showDeptFeedback = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showDeptFeedback ?? '') === '1'
|
||||
);
|
||||
const showJiJianFields = computed(() => String(props.formData?.extendUrlParams?.showJiJianFields ?? '') === '1');
|
||||
const jiJianFieldsReadonly = computed(() => String(props.formData?.extendUrlParams?.jiJianFieldsReadonly ?? '') === '1');
|
||||
const nonJiJianFieldsReadonly = computed(() => String(props.formData?.extendUrlParams?.nonJiJianFieldsReadonly ?? '') === '1');
|
||||
const showSelnextUser = computed(() => String(props.formData?.extendUrlParams?.showSelnextUser ?? '') === '1');
|
||||
const showSubApproveUser = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showSubApproveUser ?? '') === '1'
|
||||
);
|
||||
const showSubApproveUserSelector = computed(() => showSubApproveUser.value && String(isEnd.value) !== '1');
|
||||
|
||||
const processInfo = computed(() => ({
|
||||
taskId: props.formData?.taskId,
|
||||
taskDefKey: props.formData?.taskDefKey,
|
||||
processInstanceId:
|
||||
props.formData?.procInsId ||
|
||||
props.formData?.procInstId ||
|
||||
props.formData?.processInstanceId ||
|
||||
props.formData?.vars?.BPM_INST_ID ||
|
||||
props.formData?.vars?.JG_LOCAL_PROCESS_ID ||
|
||||
props.formData?.vars?.process_inst_id ||
|
||||
props.formData?.vars?.processInstanceId,
|
||||
processDataId: props.formData?.processDataId,
|
||||
processTableName: props.formData?.processTableName,
|
||||
}));
|
||||
|
||||
onMounted(() => {
|
||||
initFormData();
|
||||
});
|
||||
|
||||
watch([() => props.formData?.dataId, () => processInfo.value.processInstanceId], () => initFormData());
|
||||
|
||||
watch(showDeptFeedback, () => {
|
||||
loadFeedbackList();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.formData?.vars?.isEnd,
|
||||
(value) => {
|
||||
isEnd.value = String(value ?? '0') === '1' ? 1 : 0;
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
async function loadProblemTree() {
|
||||
loadingProblemOptions.value = true;
|
||||
try {
|
||||
const data = await specificProblemOptions();
|
||||
problemTreeData.value = Array.isArray(data) ? data : data?.result || [];
|
||||
} finally {
|
||||
loadingProblemOptions.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
async function initFormData() {
|
||||
const dataId = props.formData?.dataId;
|
||||
if (!dataId) return;
|
||||
showBaseInfoDetail.value = true;
|
||||
loading.value = true;
|
||||
try {
|
||||
await loadProblemTree();
|
||||
const data = await defHttp.get({ url: queryByIdUrl, params: { id: dataId } });
|
||||
setMainForm(data || {});
|
||||
await loadFeedbackList();
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function setMainForm(record: Record<string, any>) {
|
||||
Object.keys(mainForm).forEach((key) => {
|
||||
mainForm[key] = record[key] ?? '';
|
||||
});
|
||||
const approveInfo = record.approveInfo;
|
||||
const deptId = getCurrentUserDeptId();
|
||||
if (approveInfo && deptId && approveInfo[deptId]) {
|
||||
const detail = approveInfo[deptId];
|
||||
isEnd.value = detail.isEnd ?? 0;
|
||||
subApproveUser.value = detail.implWorker ?? '';
|
||||
}
|
||||
}
|
||||
|
||||
function getCurrentUserDeptId() {
|
||||
const userInfo = (userStore.getUserInfo || {}) as Record<string, any>;
|
||||
const loginInfo = (userStore.getLoginInfo || {}) as Record<string, any>;
|
||||
const departs = Array.isArray(loginInfo.departs) ? loginInfo.departs : [];
|
||||
if (userInfo.orgCode) {
|
||||
const dept = departs.find((item: any) => item.orgCode === userInfo.orgCode);
|
||||
return dept?.id || '';
|
||||
}
|
||||
return departs.length === 1 ? departs[0]?.id || '' : '';
|
||||
}
|
||||
|
||||
function getCurrentAssignee() {
|
||||
const userInfo = (userStore.getUserInfo || {}) as Record<string, any>;
|
||||
return userInfo.username || '';
|
||||
}
|
||||
|
||||
async function loadFeedbackList() {
|
||||
const bpmProcessId = processInfo.value.processInstanceId;
|
||||
if (!mainForm.id) {
|
||||
feedbackList.value = [];
|
||||
return;
|
||||
}
|
||||
const res = await progressList({ mainId: mainForm.id, pageNo: 1, pageSize: 999, column: 'createTime', order: 'desc' });
|
||||
let list = Array.isArray(res) ? res : res?.records || [];
|
||||
if (list.length && showDeptFeedback.value) {
|
||||
const deptId = getCurrentUserDeptId();
|
||||
if (deptId) {
|
||||
list = list.filter((item: any) => {
|
||||
const deptIds = String(item.feedbackDeptId || '').split(',').map((s: string) => s.trim());
|
||||
return deptIds.includes(String(deptId));
|
||||
});
|
||||
}
|
||||
}
|
||||
feedbackList.value = list;
|
||||
}
|
||||
|
||||
async function submitForm() {
|
||||
return saveMainForm();
|
||||
}
|
||||
|
||||
async function saveMainForm(options: { showMessage?: boolean; emitOk?: boolean } = {}) {
|
||||
const { showMessage = true, emitOk = true } = options;
|
||||
savingMain.value = true;
|
||||
try {
|
||||
const processInstanceId = processInfo.value.processInstanceId;
|
||||
const res = await saveBpmForm({
|
||||
processInstanceId,
|
||||
varField: 'json_data',
|
||||
formData: { ...mainForm },
|
||||
});
|
||||
if (res.success) {
|
||||
if (showMessage) createMessage.success(res.message || '保存成功');
|
||||
if (emitOk) emit('ok');
|
||||
return true;
|
||||
}
|
||||
createMessage.warning(res.message || '保存失败');
|
||||
return false;
|
||||
} catch {
|
||||
createMessage.warning('保存失败');
|
||||
return false;
|
||||
} finally {
|
||||
savingMain.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
async function saveMainFormBeforeProcessHandle() {
|
||||
if (!mainDisabled.value) {
|
||||
const mainSaved = await saveMainForm({ showMessage: false, emitOk: false });
|
||||
if (!mainSaved) return false;
|
||||
}
|
||||
if (showSubApproveUser.value) {
|
||||
return saveSubApproveUserVariable({ showSuccessMessage: false });
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function openFeedbackModal() {
|
||||
if (!mainForm.id) {
|
||||
createMessage.warning('主表数据不存在,无法新增反馈');
|
||||
return;
|
||||
}
|
||||
const processInstanceId = processInfo.value.processInstanceId;
|
||||
feedbackModalRef.value?.open(mainForm.id, processInstanceId);
|
||||
}
|
||||
|
||||
function handleEditFeedback(record) {
|
||||
feedbackModalRef.value?.openEdit(record);
|
||||
}
|
||||
|
||||
async function handleDeleteFeedback(record) {
|
||||
if (!record.id) {
|
||||
createMessage.warning('反馈记录ID不存在');
|
||||
return;
|
||||
}
|
||||
await progressDelete({ id: record.id }, loadFeedbackList);
|
||||
}
|
||||
|
||||
async function saveSubApproveUserVariable(options: { showSuccessMessage?: boolean } = {}) {
|
||||
const { showSuccessMessage = true } = options;
|
||||
const isEndValue = String(isEnd.value);
|
||||
const usernameValue = normalizeUsernameList(subApproveUser.value);
|
||||
const deptId = getCurrentUserDeptId();
|
||||
if (!mainForm.id) {
|
||||
createMessage.warning('主表ID不能为空');
|
||||
return false;
|
||||
}
|
||||
if (!deptId) {
|
||||
createMessage.warning('无法获取当前用户部门');
|
||||
return false;
|
||||
}
|
||||
if (isEndValue !== '1' && !usernameValue) {
|
||||
createMessage.warning('请选择部门经办人');
|
||||
return false;
|
||||
}
|
||||
|
||||
savingSubApproveUser.value = true;
|
||||
try {
|
||||
const params: Record<string, any> = {
|
||||
mainId: mainForm.id,
|
||||
deptId,
|
||||
isEnd: Number(isEndValue),
|
||||
};
|
||||
if (isEndValue === '1') {
|
||||
params.implWorker = getCurrentAssignee();
|
||||
} else {
|
||||
params.implUserNameList = usernameValue.split(',').filter(Boolean);
|
||||
}
|
||||
const res = await saveSubApprove(params);
|
||||
if (!res?.success) {
|
||||
createMessage.warning(res?.message || '保存失败');
|
||||
return false;
|
||||
}
|
||||
if (showSuccessMessage) createMessage.success('保存成功');
|
||||
return true;
|
||||
} catch {
|
||||
createMessage.warning('保存失败');
|
||||
return false;
|
||||
} finally {
|
||||
savingSubApproveUser.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function normalizeUsernameList(value: string) {
|
||||
return String(value || '')
|
||||
.split(',')
|
||||
.map((item) => item.trim())
|
||||
.filter(Boolean)
|
||||
.join(',');
|
||||
}
|
||||
|
||||
function handleProcessSuccess() {
|
||||
emit('success');
|
||||
}
|
||||
|
||||
function handleClaimSuccess() {
|
||||
emit('claimSuccess');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
submitForm,
|
||||
initFormData,
|
||||
loadFeedbackList,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.dq-inspect-task-bpm-form {
|
||||
padding: 8px 12px 14px;
|
||||
}
|
||||
|
||||
.main-form {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.main-form,
|
||||
.process-variable-form {
|
||||
:deep(.ant-form-item-label) {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
:deep(.ant-form-item-label > label) {
|
||||
justify-content: flex-start;
|
||||
color: #1f2937;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
:deep(.ant-form-item-control),
|
||||
:deep(.ant-form-item-control-input),
|
||||
:deep(.ant-form-item-control-input-content) {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.section-title {
|
||||
margin-bottom: 8px;
|
||||
padding-left: 8px;
|
||||
border-left: 3px solid #1677ff;
|
||||
color: #1f2937;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.section-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
padding: 6px 10px;
|
||||
background: #f6fbff;
|
||||
border: 1px solid #d6e8ff;
|
||||
border-radius: 6px;
|
||||
|
||||
.section-title {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.section-actions {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.section-action-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
min-width: 58px;
|
||||
justify-content: center;
|
||||
font-weight: 500;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.base-save-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
height: 24px;
|
||||
padding: 0 6px;
|
||||
color: #64748b;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.base-info-header {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.base-info-row {
|
||||
padding: 0 10px;
|
||||
|
||||
:deep(.ant-form-item) {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
:deep(.ant-form-item-label) {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
:deep(.ant-form-item-label > label) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.ant-input),
|
||||
:deep(.ant-input-number),
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-select-selector) {
|
||||
min-height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.main-form-readonly {
|
||||
:deep(.ant-input[disabled]),
|
||||
:deep(.ant-input-disabled),
|
||||
:deep(.ant-input-affix-wrapper-disabled),
|
||||
:deep(.ant-input-affix-wrapper-disabled.ant-input-outlined),
|
||||
:deep(.ant-input-affix-wrapper-disabled:hover),
|
||||
:deep(.ant-input-affix-wrapper-disabled:focus),
|
||||
:deep(.ant-input-affix-wrapper-disabled-focused),
|
||||
:deep(.ant-input-outlined[disabled]),
|
||||
:deep(.ant-input-outlined.ant-input-disabled),
|
||||
:deep(textarea.ant-input[disabled]),
|
||||
:deep(.ant-input-number-disabled),
|
||||
:deep(.ant-input-number-disabled:hover),
|
||||
:deep(.ant-input-number-disabled:focus),
|
||||
:deep(.ant-picker-disabled),
|
||||
:deep(.ant-select-disabled .ant-select-selector) {
|
||||
background: transparent !important;
|
||||
border-color: transparent !important;
|
||||
color: #1f2937 !important;
|
||||
box-shadow: none !important;
|
||||
cursor: default !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
:deep(.ant-input[disabled]),
|
||||
:deep(.ant-input-disabled),
|
||||
:deep(.ant-input-affix-wrapper-disabled),
|
||||
:deep(.ant-input-number-disabled),
|
||||
:deep(textarea.ant-input[disabled]) {
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.ant-input-affix-wrapper-disabled .ant-input) {
|
||||
background: transparent !important;
|
||||
color: #1f2937 !important;
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
:deep(.ant-input-number-disabled .ant-input-number-input) {
|
||||
background: transparent !important;
|
||||
color: #1f2937 !important;
|
||||
-webkit-text-fill-color: #1f2937 !important;
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
:deep(.ant-input[disabled]::placeholder),
|
||||
:deep(.ant-input-disabled::placeholder),
|
||||
:deep(.ant-input-affix-wrapper-disabled .ant-input::placeholder) {
|
||||
color: #9ca3af !important;
|
||||
}
|
||||
|
||||
:deep(.ant-picker-disabled input),
|
||||
:deep(.ant-select-disabled .ant-select-selection-item),
|
||||
:deep(.ant-select-disabled .ant-select-selection-item span),
|
||||
:deep(.ant-select-disabled .ant-select-selection-placeholder),
|
||||
:deep(.ant-select-disabled .ant-select-selection-placeholder span) {
|
||||
color: #1f2937 !important;
|
||||
-webkit-text-fill-color: #1f2937 !important;
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
:deep(.ant-picker-disabled),
|
||||
:deep(.ant-select-disabled .ant-select-selector) {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.ant-select-disabled),
|
||||
:deep(.ant-select-disabled *),
|
||||
:deep(.ant-select-disabled.ant-select-outlined),
|
||||
:deep(.ant-select-disabled.ant-select-outlined .ant-select-selector) {
|
||||
color: #1f2937 !important;
|
||||
-webkit-text-fill-color: #1f2937 !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
:deep(.ant-select-disabled .ant-select-arrow),
|
||||
:deep(.ant-picker-disabled .ant-picker-suffix),
|
||||
:deep(.ant-input-disabled .ant-input-clear-icon),
|
||||
:deep(.ant-input-affix-wrapper-disabled .ant-input-clear-icon),
|
||||
:deep(.ant-input-number-disabled .ant-input-number-handler-wrap),
|
||||
:deep(.ant-select-disabled .ant-select-clear) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.ant-radio-wrapper-disabled) {
|
||||
color: #1f2937 !important;
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
:deep(.ant-radio-wrapper-disabled:not(.ant-radio-wrapper-checked)) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.ant-radio-disabled .ant-radio-inner) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.feedback-header {
|
||||
margin-bottom: 8px;
|
||||
|
||||
.feedback-add-button {
|
||||
min-width: 104px;
|
||||
}
|
||||
}
|
||||
|
||||
.process-variable-form {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
:deep(.ant-divider-horizontal) {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.feedback-attachment-list {
|
||||
min-width: 240px;
|
||||
|
||||
:deep(.file-list-wrapper) {
|
||||
min-height: 36px;
|
||||
max-height: 130px;
|
||||
overflow-y: auto;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
: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;
|
||||
padding: 4px 0;
|
||||
|
||||
.ant-empty-image {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ant-empty-description {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,11 +2,13 @@
|
||||
<a-spin :spinning="loading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form v-bind="formItemLayout" name="DqInspectTaskForm" ref="formRef">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="具体问题" v-bind="validateInfos.problemId" id="DqInspectTaskForm-problemId" name="problemId">
|
||||
<a-tree-select
|
||||
<a-form ref="formRef" class="antd-modal-form" labelAlign="left" :labelCol="labelCol" :wrapperCol="wrapperCol" name="DqInspectTaskForm">
|
||||
<!-- 基本信息 -->
|
||||
<a-divider orientation="left" plain>基本信息</a-divider>
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="具体问题" v-bind="validateInfos.problemId" id="DqInspectTaskForm-problemId" name="problemId">
|
||||
<a-tree-select
|
||||
v-model:value="formData.problemId"
|
||||
:tree-data="problemTreeData"
|
||||
:loading="loadingProblemOptions"
|
||||
@@ -16,120 +18,130 @@
|
||||
tree-default-expand-all
|
||||
style="width: 100%"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="密级" v-bind="validateInfos.secretLevel" id="DqInspectTaskForm-secretLevel" name="secretLevel">
|
||||
<j-dict-select-tag v-model:value="formData.secretLevel" dictCode="secret_level" placeholder="请选择密级" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="整改措施" v-bind="validateInfos.improveMeasure" id="DqInspectTaskForm-improveMeasure" name="improveMeasure">
|
||||
<a-input v-model:value="formData.improveMeasure" placeholder="请输入整改措施" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="完成时限" v-bind="validateInfos.deadline" id="DqInspectTaskForm-deadline" name="deadline">
|
||||
<a-date-picker placeholder="请选择完成时限" v-model:value="formData.deadline" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="目标节点" v-bind="validateInfos.targetNode" id="DqInspectTaskForm-targetNode" name="targetNode">
|
||||
<a-input v-model:value="formData.targetNode" placeholder="请输入目标节点" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="措施责任领导" v-bind="validateInfos.measureResLeader" id="DqInspectTaskForm-measureResLeader" name="measureResLeader">
|
||||
<j-select-user v-model:value="formData.measureResLeader" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="措施责任部门" v-bind="validateInfos.measureResDept" id="DqInspectTaskForm-measureResDept" name="measureResDept">
|
||||
<j-select-dept v-model:value="formData.measureResDept" :multiple="true" checkStrictly allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="整改交付成果" v-bind="validateInfos.rectificationEvidence" id="DqInspectTaskForm-rectificationEvidence" name="rectificationEvidence">
|
||||
<a-input v-model:value="formData.rectificationEvidence" placeholder="请输入整改交付成果" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="成效评价标准" v-bind="validateInfos.evaluationCriterion" id="DqInspectTaskForm-evaluationCriterion" name="evaluationCriterion">
|
||||
<a-input v-model:value="formData.evaluationCriterion" placeholder="请输入成效评价标准" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否需要党群领导审批" v-bind="validateInfos.isNeedAppro" id="DqInspectTaskForm-isNeedAppro" name="isNeedAppro">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.isNeedAppro" dictCode="yn" placeholder="请选择是否需要党群领导审批" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="党群领导" v-bind="validateInfos.supDeptleaderid" id="DqInspectTaskForm-supDeptleaderid" name="supDeptleaderid">
|
||||
<j-select-user v-model:value="formData.supDeptleaderid" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="24">
|
||||
<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="24">
|
||||
<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="24">
|
||||
<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="24">
|
||||
<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="24">
|
||||
<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="24">
|
||||
<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="24">
|
||||
<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-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="密级" v-bind="validateInfos.secretLevel" id="DqInspectTaskForm-secretLevel" name="secretLevel">
|
||||
<j-dict-select-tag v-model:value="formData.secretLevel" dictCode="secret_level" placeholder="请选择密级" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="整改措施" v-bind="validateInfos.improveMeasure" id="DqInspectTaskForm-improveMeasure" name="improveMeasure">
|
||||
<a-input v-model:value="formData.improveMeasure" placeholder="请输入整改措施" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="完成时限" v-bind="validateInfos.deadline" id="DqInspectTaskForm-deadline" name="deadline">
|
||||
<a-date-picker placeholder="请选择完成时限" v-model:value="formData.deadline" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="目标节点" v-bind="validateInfos.targetNode" id="DqInspectTaskForm-targetNode" name="targetNode">
|
||||
<a-input v-model:value="formData.targetNode" placeholder="请输入目标节点" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</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.measureResLeader" id="DqInspectTaskForm-measureResLeader" name="measureResLeader">
|
||||
<j-select-user v-model:value="formData.measureResLeader" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="措施责任部门" v-bind="validateInfos.measureResDept" id="DqInspectTaskForm-measureResDept" name="measureResDept">
|
||||
<j-select-dept v-model:value="formData.measureResDept" :multiple="true" checkStrictly allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="整改交付成果" v-bind="validateInfos.rectificationEvidence" id="DqInspectTaskForm-rectificationEvidence" name="rectificationEvidence">
|
||||
<a-input v-model:value="formData.rectificationEvidence" placeholder="请输入整改交付成果" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="成效评价标准" v-bind="validateInfos.evaluationCriterion" id="DqInspectTaskForm-evaluationCriterion" name="evaluationCriterion">
|
||||
<a-input v-model:value="formData.evaluationCriterion" placeholder="请输入成效评价标准" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否需要党群领导审批" v-bind="validateInfos.isNeedAppro" id="DqInspectTaskForm-isNeedAppro" name="isNeedAppro">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.isNeedAppro" dictCode="yn" placeholder="请选择是否需要党群领导审批" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="党群领导" v-bind="validateInfos.supDeptleaderid" id="DqInspectTaskForm-supDeptleaderid" name="supDeptleaderid">
|
||||
<j-select-user v-model:value="formData.supDeptleaderid" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</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>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
|
||||
<!-- 子表单区域 -->
|
||||
<!-- <a-tabs v-model:activeKey="activeKey" animated style="overflow:hidden;">-->
|
||||
<!-- <a-tab-pane tab="工作进展反馈" key="dqInspectProgress" :forceRender="true">-->
|
||||
<!-- <j-vxe-table-->
|
||||
<!-- :keep-source="true"-->
|
||||
<!-- resizable-->
|
||||
<!-- ref="dqInspectProgressTableRef"-->
|
||||
<!-- :loading="dqInspectProgressTable.loading"-->
|
||||
<!-- :columns="dqInspectProgressTable.columns"-->
|
||||
<!-- :dataSource="dqInspectProgressTable.dataSource"-->
|
||||
<!-- :height="340"-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- :rowNumber="true"-->
|
||||
<!-- :rowSelection="true"-->
|
||||
<!-- :toolbar="true"/>-->
|
||||
<!-- </a-tab-pane>-->
|
||||
<!-- </a-tabs>-->
|
||||
<!-- 子表单区域 -->
|
||||
<!-- <a-tabs v-model:activeKey="activeKey" animated style="overflow:hidden;">-->
|
||||
<!-- <a-tab-pane tab="工作进展反馈" key="dqInspectProgress" :forceRender="true">-->
|
||||
<!-- <j-vxe-table-->
|
||||
<!-- :keep-source="true"-->
|
||||
<!-- resizable-->
|
||||
<!-- ref="dqInspectProgressTableRef"-->
|
||||
<!-- :loading="dqInspectProgressTable.loading"-->
|
||||
<!-- :columns="dqInspectProgressTable.columns"-->
|
||||
<!-- :dataSource="dqInspectProgressTable.dataSource"-->
|
||||
<!-- :height="340"-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- :rowNumber="true"-->
|
||||
<!-- :rowSelection="true"-->
|
||||
<!-- :toolbar="true"/>-->
|
||||
<!-- </a-tab-pane>-->
|
||||
<!-- </a-tabs>-->
|
||||
<div v-if="showFlowSubmitButton" :span="24" style="width: 100%;text-align: center;margin-top: 10px">
|
||||
<a-button preIcon="ant-design:check-outlined" style="width: 126px" type="primary" @click="submitForm">提 交</a-button>
|
||||
</div>
|
||||
@@ -142,7 +154,7 @@
|
||||
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
||||
import { queryDqInspectProgressListByMainId, queryDataById, saveOrUpdate, specificProblemOptions } from '../DqInspectTask.api';
|
||||
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
||||
import {dqInspectProgressColumns} from '../DqInspectTask.data';
|
||||
import { dqInspectProgressColumns } from '../DqInspectTask.data';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
||||
import JSelectUser from '/@/components/Form/src/jeecg/components/JSelectUser.vue';
|
||||
@@ -157,7 +169,7 @@
|
||||
JSelectDept,
|
||||
JSelectUser,
|
||||
JVxeTable,
|
||||
JFormContainer,
|
||||
JFormContainer,
|
||||
},
|
||||
props:{
|
||||
formDisabled:{
|
||||
@@ -204,16 +216,15 @@
|
||||
delFlag: '',
|
||||
});
|
||||
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 18 } });
|
||||
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
problemId: [{ required: true, message: '请选择具体问题' }],
|
||||
});
|
||||
const {resetFields, validate, validateInfos} = useForm(formData, validatorRules, {immediate: false});
|
||||
const dbData = {};
|
||||
const formItemLayout = {
|
||||
labelCol: {xs: {span: 24}, sm: {span: 5}},
|
||||
wrapperCol: {xs: {span: 24}, sm: {span: 16}},
|
||||
};
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
@@ -359,7 +370,8 @@
|
||||
formData,
|
||||
setFieldsValue,
|
||||
handleFormChange,
|
||||
formItemLayout,
|
||||
labelCol,
|
||||
wrapperCol,
|
||||
disabled,
|
||||
showFlowSubmitButton,
|
||||
getFormData,
|
||||
@@ -372,6 +384,22 @@
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
|
||||
:deep(.ant-form-item-label) {
|
||||
overflow: visible;
|
||||
white-space: normal;
|
||||
text-overflow: unset;
|
||||
text-align: left;
|
||||
|
||||
> label {
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-tabs-tabpane.sub-one-form {
|
||||
max-height: 340px;
|
||||
overflow: auto;
|
||||
|
||||
Reference in New Issue
Block a user