!23 Merge remote-tracking branch 'origin/dev' into dev
Merge pull request !23 from new_new_new/dev
This commit is contained in:
@@ -4,6 +4,7 @@ node_modules
|
||||
/dist/
|
||||
dist-electron
|
||||
.cache
|
||||
localDoc
|
||||
|
||||
tests/server/static
|
||||
tests/server/static/upload
|
||||
|
||||
@@ -36,7 +36,27 @@
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="所党委领导">
|
||||
<j-select-user v-model:value="formData.supDeptleaderid" :disabled="String(formData.isNeedAppro) !== '1'" allow-clear />
|
||||
<a-input
|
||||
v-model:value="supDeptleaderName"
|
||||
placeholder="请选择所党委领导"
|
||||
:disabled="String(formData.isNeedAppro) !== '1'"
|
||||
readonly
|
||||
allow-clear
|
||||
@click="openSdwLeaderModal"
|
||||
@clear="handleClearSdwLeader"
|
||||
>
|
||||
<template #suffix>
|
||||
<SearchOutlined @click="openSdwLeaderModal" />
|
||||
</template>
|
||||
</a-input>
|
||||
<SzUserSelectByDeptRoleSecurityModal
|
||||
v-model:open="sdwLeaderModalOpen"
|
||||
title="请选择所党委领导"
|
||||
:deptId="sdwLeaderDeptId"
|
||||
:roleId="sdwLeaderRoleId"
|
||||
:securityValue="sdwLeaderSecurityValue"
|
||||
@confirm="handleSdwLeaderConfirm"
|
||||
/>
|
||||
</a-form-item>
|
||||
</template>
|
||||
|
||||
@@ -79,7 +99,9 @@
|
||||
import JModal from '/src/components/Modal/src/JModal/JModal.vue';
|
||||
import JDictSelectTag from '/src/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
|
||||
import JSelectUser from '/src/components/Form/src/jeecg/components/JSelectUser.vue';
|
||||
import SzUserSelectByDeptRoleSecurityModal from '/src/components/semri/userComponent/modal/SzUserSelectByDeptRoleSecurityModal.vue';
|
||||
import { SearchOutlined } from '@ant-design/icons-vue';
|
||||
import { getUserList } from '/src/api/common/api';
|
||||
import { useMessage } from '/src/hooks/web/useMessage';
|
||||
|
||||
interface ModalPayload {
|
||||
@@ -89,6 +111,7 @@
|
||||
showSuoleaderFields?: boolean;
|
||||
isNeedAppro?: string | number;
|
||||
supDeptleaderid?: string | string[];
|
||||
supDeptleaderName?: string;
|
||||
showDeadlineField?: boolean;
|
||||
deadline?: string | Date;
|
||||
}
|
||||
@@ -107,6 +130,44 @@
|
||||
const deptOptions = ref<DeptOption[]>([]);
|
||||
const showSuoleaderFields = ref(false);
|
||||
const showDeadlineField = ref(false);
|
||||
|
||||
// 所党委领导选人弹窗
|
||||
const sdwLeaderModalOpen = ref(false);
|
||||
const supDeptleaderName = ref('');
|
||||
const sdwLeaderDeptId = ref('2044677562460508161');
|
||||
const sdwLeaderRoleId = ref('2044676455280570370');
|
||||
const sdwLeaderSecurityValue = ref(5);
|
||||
|
||||
function openSdwLeaderModal() {
|
||||
if (String(formData.isNeedAppro) !== '1') return;
|
||||
sdwLeaderModalOpen.value = true;
|
||||
}
|
||||
|
||||
function handleClearSdwLeader() {
|
||||
formData.supDeptleaderid = '';
|
||||
supDeptleaderName.value = '';
|
||||
}
|
||||
|
||||
function handleSdwLeaderConfirm(rows: Array<{ id: string; realname: string }>) {
|
||||
if (rows && rows.length > 0) {
|
||||
formData.supDeptleaderid = rows.map((r) => r.username).join(',');
|
||||
supDeptleaderName.value = rows.map((r) => r.realname).join(',');
|
||||
} else {
|
||||
formData.supDeptleaderid = '';
|
||||
supDeptleaderName.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
async function resolveSdwLeaderNames(ids: string) {
|
||||
try {
|
||||
const res = await getUserList({ username: ids, pageSize: 999 });
|
||||
const records = res?.records || res?.result?.records || [];
|
||||
supDeptleaderName.value = records.map((u: any) => u.realname).join(',');
|
||||
} catch {
|
||||
supDeptleaderName.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
const formData = reactive({
|
||||
triggerMode: 'immediate',
|
||||
intervalType: undefined as number | string | undefined,
|
||||
@@ -126,6 +187,7 @@
|
||||
formData.deptIds = [];
|
||||
formData.isNeedAppro = '0';
|
||||
formData.supDeptleaderid = '';
|
||||
supDeptleaderName.value = '';
|
||||
formData.deadline = undefined;
|
||||
deptOptions.value = [];
|
||||
showSuoleaderFields.value = false;
|
||||
@@ -169,6 +231,10 @@
|
||||
showSuoleaderFields.value = !!data.showSuoleaderFields;
|
||||
formData.isNeedAppro = String(data.isNeedAppro ?? '0');
|
||||
formData.supDeptleaderid = data.supDeptleaderid || '';
|
||||
supDeptleaderName.value = data.supDeptleaderName || '';
|
||||
if (!supDeptleaderName.value && formData.supDeptleaderid) {
|
||||
resolveSdwLeaderNames(formData.supDeptleaderid as string);
|
||||
}
|
||||
showDeadlineField.value = !!data.showDeadlineField;
|
||||
formData.deadline = normalizeDeadlineValue(data.deadline);
|
||||
if (String(formData.isNeedAppro) !== '1') {
|
||||
@@ -228,6 +294,7 @@
|
||||
(value) => {
|
||||
if (String(value) !== '1') {
|
||||
formData.supDeptleaderid = '';
|
||||
supDeptleaderName.value = '';
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<a-modal :open="open" title="选择用户(部门+角色+密级)" :width="1000" :mask-closable="false" @cancel="handleCancel" @ok="handleOk" destroyOnClose>
|
||||
<BasicForm @register="registerForm" />
|
||||
<a-modal :open="open" :title="title" :width="1000" :mask-closable="false" @cancel="handleCancel" @ok="handleOk" destroyOnClose>
|
||||
<BasicForm v-if="!hasFixedParams" @register="registerForm" />
|
||||
|
||||
<a-table
|
||||
ref="tableRef"
|
||||
@@ -18,7 +18,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch, nextTick } from 'vue';
|
||||
import { ref, reactive, computed, watch, nextTick } from 'vue';
|
||||
import { BasicForm, useForm } from '@/components/Form/index';
|
||||
import { queryDepartRoleUserPageList } from '../api/user';
|
||||
|
||||
@@ -29,10 +29,13 @@
|
||||
deptId: { type: String, default: null },
|
||||
roleId: { type: String, default: null },
|
||||
securityValue: { type: Number, default: null },
|
||||
title: { type: String, default: '选择用户(部门+角色+密级)' },
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:open', 'confirm']);
|
||||
|
||||
const hasFixedParams = computed(() => !!(props.deptId && props.roleId && props.securityValue));
|
||||
|
||||
// --- 状态定义 ---
|
||||
const loading = ref(false);
|
||||
const userList = ref([]);
|
||||
@@ -99,8 +102,8 @@
|
||||
});
|
||||
|
||||
const columns = [
|
||||
{ title: '用户名', dataIndex: 'username', key: 'username', width: 120 },
|
||||
{ title: '真实姓名', dataIndex: 'realname', key: 'realname', width: 120 },
|
||||
{ title: '工号', dataIndex: 'username', key: 'username', width: 120 },
|
||||
{ title: '姓名', dataIndex: 'realname', key: 'realname', width: 120 },
|
||||
{ title: '部门', dataIndex: 'orgCodeTxt', key: 'orgCodeTxt', width: 200 },
|
||||
{ title: '密级', dataIndex: 'userSecurityLevel_dictText', key: 'userSecurityLevel', width: 100 },
|
||||
];
|
||||
@@ -109,12 +112,19 @@
|
||||
async function loadData() {
|
||||
loading.value = true;
|
||||
try {
|
||||
const values = getFieldsValue() || {};
|
||||
const params = {
|
||||
...values,
|
||||
let params;
|
||||
if (hasFixedParams.value) {
|
||||
params = {
|
||||
departId: props.deptId,
|
||||
roleId: props.roleId,
|
||||
searchSecurityLevel: props.securityValue,
|
||||
pageNo: pagination.current,
|
||||
pageSize: pagination.pageSize,
|
||||
};
|
||||
} else {
|
||||
const values = getFieldsValue() || {};
|
||||
params = { ...values, pageNo: pagination.current, pageSize: pagination.pageSize };
|
||||
}
|
||||
|
||||
const res = await queryDepartRoleUserPageList(params);
|
||||
|
||||
@@ -174,12 +184,13 @@
|
||||
() => props.open,
|
||||
async (val) => {
|
||||
if (val) {
|
||||
// 必须在 nextTick 后执行,确保 BasicForm 实例已挂载,getFieldsValue 可用
|
||||
await nextTick();
|
||||
loadData();
|
||||
await loadData();
|
||||
} else {
|
||||
// 弹窗关闭时建议重置表单和选中项
|
||||
if (!hasFixedParams.value) {
|
||||
resetFields();
|
||||
}
|
||||
selectedRowKeys.value = [];
|
||||
selectedRows.value = [];
|
||||
}
|
||||
|
||||
@@ -13,12 +13,14 @@
|
||||
edit → 基础信息是否可编辑(1=可编辑, 缺省=只读)
|
||||
|
||||
showProcessHandle → 流程办理区域
|
||||
└── showSubApproveUser → 是否办结 + 部门经办人选人
|
||||
├── showSubApproveUser → 是否办结 + 部门经办人选人
|
||||
└── showSelnextUser → 指定下一步操作人(默认隐藏,=1 显示)
|
||||
|
||||
showFeedbackInfo → 反馈信息区域(表格 + 表头)
|
||||
├── showAddFeedback → 新增反馈按钮
|
||||
├── showEditFeedback → 编辑/删除操作列
|
||||
│ └── jiJianFieldsReadonly → 弹窗内纪检字段只读(需 showEditFeedback=1 或 showAddFeedback=1)
|
||||
│ ├── jiJianFieldsReadonly → 弹窗内纪检字段只读(需 showEditFeedback=1 或 showAddFeedback=1)
|
||||
│ └── nonJiJianFieldsReadonly → 弹窗内非纪检字段只读(仅纪检字段可编辑,需 showEditFeedback=1 或 showAddFeedback=1)
|
||||
├── showDeptFeedback → 按部门过滤反馈数据
|
||||
└── showJiJianFields → 纪检字段列(检查情况/监督意见/措施数量)
|
||||
```
|
||||
@@ -79,12 +81,12 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
|
||||
* **edit** `0` —— 基础信息可编辑
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `1` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showFeedbackInfo** `1` —— 反馈信息区域
|
||||
* **showAddFeedback** `1` —— 新增反馈按钮
|
||||
* **showEditFeedback** `1` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `1` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=1&showSubApproveUser=1
|
||||
* bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=1&showSubApproveUser=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1&showDeptFeedback=1
|
||||
---
|
||||
|
||||
### 节点: <收集流程部门经办人填写>
|
||||
@@ -195,9 +197,10 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `1` —— 编辑/删除操作列
|
||||
* **jiJianFieldsReadonly** `0` —— 弹窗内纪检字段只读
|
||||
* **nonJiJianFieldsReadonly** `1` —— 弹窗内非纪检字段只读
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `1` —— 纪检字段列
|
||||
* bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=1&showFeedbackInfo=1&showEditFeedback=1&showJiJianFields=1
|
||||
* bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=1&showFeedbackInfo=1&showEditFeedback=1&nonJiJianFieldsReadonly=1&showJiJianFields=1
|
||||
---
|
||||
|
||||
### 节点: <反馈流程纪检负责人审批>
|
||||
@@ -212,7 +215,7 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
|
||||
* **jiJianFieldsReadonly** `0` —— 弹窗内纪检字段只读
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `1` —— 纪检字段列
|
||||
* bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=1&showFeedbackInfo=1&showEditFeedback=1&showJiJianFields=1
|
||||
* bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=1&showFeedbackInfo=1&showJiJianFields=1
|
||||
---
|
||||
|
||||
### 节点: <督办部门经办人确认全部反馈事项>
|
||||
@@ -299,9 +302,10 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `1` —— 编辑/删除操作列
|
||||
* **jiJianFieldsReadonly** `0` —— 弹窗内纪检字段只读
|
||||
* **nonJiJianFieldsReadonly** `1` —— 弹窗内非纪检字段只读
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `1` —— 纪检字段列
|
||||
* bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=1&showFeedbackInfo=1&showEditFeedback=1&showJiJianFields=1
|
||||
* bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=1&showFeedbackInfo=1&showEditFeedback=1&nonJiJianFieldsReadonly=1&showJiJianFields=1
|
||||
---
|
||||
|
||||
|
||||
@@ -319,3 +323,19 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
|
||||
* **showJiJianFields** `1` —— 纪检字段列
|
||||
* bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=1&showFeedbackInfo=1&showJiJianFields=1
|
||||
---
|
||||
|
||||
### 节点: <部门负责人直接反馈>
|
||||
* taskDefKey: `<Task_0sialna>`
|
||||
|
||||
* **edit** `0` —— 基础信息可编辑
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `1` —— 反馈信息区域
|
||||
* **showAddFeedback** `1` —— 新增反馈按钮
|
||||
* **showEditFeedback** `1` —— 编辑/删除操作列
|
||||
* **jiJianFieldsReadonly** `1` —— 弹窗内纪检字段只读
|
||||
* **showDeptFeedback** `1` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `1` —— 纪检字段列
|
||||
* bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1&showDeptFeedback=1&jiJianFieldsReadonly=1&showJiJianFields=1
|
||||
---
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
const FLOW_NAME = '习总书记重要讲话指示批示';
|
||||
const FLOW_CODE_JBR = 'bg_xi_speak_fb_01';
|
||||
const BUSINESS_TABLE_NAME = 'bg_xi_speak';
|
||||
const FORM_URL = 'bg/xispeak/components/BgXiSpeakBPMForm';
|
||||
const FORM_URL = 'bg/xispeak/components/BgXiSpeakBPMForm?showProcessHandle=0&showFeedbackInfo=1&showJiJianFields=1';
|
||||
|
||||
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
|
||||
const { createMessage } = useMessage();
|
||||
@@ -575,6 +575,7 @@
|
||||
showSuoleaderFields: true,
|
||||
isNeedAppro: record?.needSdwApproval,
|
||||
supDeptleaderid: record?.sdwLeaderList,
|
||||
supDeptleaderName: record?.sdwLeaderList_dictText,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -586,6 +587,7 @@
|
||||
showSuoleaderFields: true,
|
||||
isNeedAppro: record?.needSdwApproval,
|
||||
supDeptleaderid: record?.sdwLeaderList,
|
||||
supDeptleaderName: record?.sdwLeaderList_dictText,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="反馈部门" name="responDeptid">
|
||||
<j-select-dept v-model:value="formData.responDeptid" :multiple="true" checkStrictly allow-clear @change="handleDeptChange" />
|
||||
<j-select-dept v-model:value="formData.responDeptid" :multiple="true" :disabled="nonJiJianFieldsReadonly" checkStrictly allow-clear @change="handleDeptChange" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@@ -29,33 +29,33 @@
|
||||
|
||||
<a-col :span="24">
|
||||
<a-form-item label="具体措施" name="method" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<a-textarea v-model:value="formData.method" :rows="3" allow-clear />
|
||||
<a-textarea v-model:value="formData.method" :rows="3" :disabled="nonJiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="完成期限" name="deadline">
|
||||
<a-date-picker v-model:value="formData.deadline" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
|
||||
<a-date-picker v-model:value="formData.deadline" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="nonJiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="成果形式" name="outcomeForm">
|
||||
<a-input v-model:value="formData.outcomeForm" allow-clear />
|
||||
<a-input v-model:value="formData.outcomeForm" :disabled="nonJiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="完成状态" name="completionStatus">
|
||||
<JDictSelectTag v-model:value="formData.completionStatus" dictCode="measure_complete_status" placeholder="请选择完成状态" type="select" allow-clear />
|
||||
<JDictSelectTag v-model:value="formData.completionStatus" dictCode="measure_complete_status" placeholder="请选择完成状态" type="select" :disabled="nonJiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否有报送上级报告" name="isReportedToHigher">
|
||||
<JDictSelectTag v-model:value="formData.isReportedToHigher" dictCode="need_report_higher" placeholder="请选择" type="select" allow-clear />
|
||||
<JDictSelectTag v-model:value="formData.isReportedToHigher" dictCode="need_report_higher" placeholder="请选择" type="select" :stringToNumber="true" :disabled="nonJiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<a-form-item label="进展情况" name="progress" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<a-textarea v-model:value="formData.progress" :rows="3" allow-clear />
|
||||
<a-textarea v-model:value="formData.progress" :rows="3" :disabled="nonJiJianFieldsReadonly" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="24">-->
|
||||
@@ -114,6 +114,7 @@
|
||||
const props = defineProps({
|
||||
showJiJianFields: { type: Boolean, default: false },
|
||||
jiJianFieldsReadonly: { type: Boolean, default: false },
|
||||
nonJiJianFieldsReadonly: { type: Boolean, default: false },
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const userStore = useUserStore();
|
||||
|
||||
@@ -85,16 +85,16 @@
|
||||
<a-input-number v-model:value="mainForm.numberOfResolutions" :disabled="mainDisabled" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="落实条数" name="implCount">
|
||||
<a-input-number v-model:value="mainForm.implCount" :disabled="mainDisabled" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="已闭环数量" name="closedCount">
|
||||
<a-input-number v-model:value="mainForm.closedCount" :disabled="mainDisabled" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-item label="落实条数" name="implCount">-->
|
||||
<!-- <a-input-number v-model:value="mainForm.implCount" :disabled="mainDisabled" style="width: 100%" />-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-item label="已闭环数量" name="closedCount">-->
|
||||
<!-- <a-input-number v-model:value="mainForm.closedCount" :disabled="mainDisabled" style="width: 100%" />-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<a-col :span="12">
|
||||
<a-form-item label="完成状态" name="completionStatus">
|
||||
<JDictSelectTag
|
||||
@@ -141,7 +141,27 @@
|
||||
</a-col>
|
||||
<a-col v-if="mainForm.needSdwApproval === 1" :span="12">
|
||||
<a-form-item label="督导领导列表" name="sdwLeaderList">
|
||||
<j-select-user v-model:value="mainForm.sdwLeaderList" :disabled="mainDisabled" :multiple="true" allow-clear />
|
||||
<a-input
|
||||
v-model:value="sdwLeaderNames"
|
||||
placeholder="请选择督导领导"
|
||||
:disabled="mainDisabled"
|
||||
readonly
|
||||
allow-clear
|
||||
@click="openSdwLeaderModal"
|
||||
@clear="handleClearSdwLeader"
|
||||
>
|
||||
<template #suffix>
|
||||
<SearchOutlined @click="openSdwLeaderModal" />
|
||||
</template>
|
||||
</a-input>
|
||||
<SzUserSelectByDeptRoleSecurityModal
|
||||
v-model:open="sdwLeaderModalOpen"
|
||||
title="请选择所党委领导"
|
||||
:deptId="sdwLeaderDeptId"
|
||||
:roleId="sdwLeaderRoleId"
|
||||
:securityValue="sdwLeaderSecurityValue"
|
||||
@confirm="handleSdwLeaderConfirm"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="12">-->
|
||||
@@ -225,6 +245,7 @@
|
||||
ref="feedbackModalRef"
|
||||
:showJiJianFields="showJiJianFields"
|
||||
:jiJianFieldsReadonly="jiJianFieldsReadonly"
|
||||
:nonJiJianFieldsReadonly="nonJiJianFieldsReadonly"
|
||||
@success="loadFeedbackList"
|
||||
/>
|
||||
|
||||
@@ -254,6 +275,7 @@
|
||||
<TaskHandleInnerContent
|
||||
:form-data="formData"
|
||||
:claim="claim"
|
||||
:showSelnextUser="showSelnextUser"
|
||||
:beforeHandle="saveMainFormBeforeProcessHandle"
|
||||
@success="handleProcessSuccess"
|
||||
@claimSuccess="handleClaimSuccess"
|
||||
@@ -266,6 +288,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, reactive, ref, watch } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { getUserList } from '/@/api/common/api';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
||||
@@ -284,6 +307,8 @@
|
||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||
import BgXiSpeakBPMFeedbackModal from './BgXiSpeakBPMFeedbackModal.vue';
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import SzUserSelectByDeptRoleSecurityModal from '/src/components/semri/userComponent/modal/SzUserSelectByDeptRoleSecurityModal.vue';
|
||||
import { SearchOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
const { isDisabledAuth, hasPermission, initBpmFormData } = usePermission();
|
||||
const userStore = useUserStore();
|
||||
@@ -320,6 +345,42 @@
|
||||
const subApproveUser = ref('');
|
||||
const isEnd = ref(0);
|
||||
|
||||
// 督导领导选人弹窗
|
||||
const sdwLeaderModalOpen = ref(false);
|
||||
const sdwLeaderNames = ref('');
|
||||
const sdwLeaderDeptId = ref('2044677562460508161');
|
||||
const sdwLeaderRoleId = ref('2044676455280570370');
|
||||
const sdwLeaderSecurityValue = ref(5);
|
||||
|
||||
function openSdwLeaderModal() {
|
||||
sdwLeaderModalOpen.value = true;
|
||||
}
|
||||
|
||||
function handleClearSdwLeader() {
|
||||
mainForm.sdwLeaderList = '';
|
||||
sdwLeaderNames.value = '';
|
||||
}
|
||||
|
||||
function handleSdwLeaderConfirm(rows: Array<{ id: string; realname: string }>) {
|
||||
if (rows && rows.length > 0) {
|
||||
mainForm.sdwLeaderList = rows.map((r) => r.username).join(',');
|
||||
sdwLeaderNames.value = rows.map((r) => r.realname).join(',');
|
||||
} else {
|
||||
mainForm.sdwLeaderList = '';
|
||||
sdwLeaderNames.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
async function resolveSdwLeaderNames(ids: string) {
|
||||
try {
|
||||
const res = await getUserList({ username: ids, pageSize: 999 });
|
||||
const records = res?.records || res?.result?.records || [];
|
||||
sdwLeaderNames.value = records.map((u: any) => u.realname).join(',');
|
||||
} catch {
|
||||
sdwLeaderNames.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
const mainForm = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
pid: '',
|
||||
@@ -409,6 +470,8 @@
|
||||
);
|
||||
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 showDeptFields = computed(() => String(props.formData?.extendUrlParams?.deptfields ?? '') === '1');
|
||||
const showSubApproveUser = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showSubApproveUser ?? props.formData?.extendUrlParams?.selectuser ?? '') === '1'
|
||||
@@ -468,6 +531,10 @@
|
||||
Object.keys(mainForm).forEach((key) => {
|
||||
mainForm[key] = record[key] ?? '';
|
||||
});
|
||||
sdwLeaderNames.value = record.sdwLeaderList_dictText || '';
|
||||
if (!sdwLeaderNames.value && mainForm.sdwLeaderList) {
|
||||
resolveSdwLeaderNames(mainForm.sdwLeaderList);
|
||||
}
|
||||
// 从 approveInfo JSON 初始化当前部门的 isEnd 和 subApproveUser
|
||||
const approveInfo = record.approveInfo;
|
||||
const deptId = getCurrentUserDeptId();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form class="antd-modal-form" v-bind="formItemLayout" ref="formRef" :model="formData" :rules="validatorRules" name="BgXiSpeakFeedbackForm">
|
||||
<a-form class="antd-modal-form" labelAlign="left" :labelCol="formItemLayout.labelCol" :wrapperCol="formItemLayout.wrapperCol" ref="formRef" :model="formData" :rules="validatorRules" name="BgXiSpeakFeedbackForm">
|
||||
<!-- 基本信息 -->
|
||||
<a-divider orientation="left" plain>基本信息</a-divider>
|
||||
<a-row :gutter="[16, 0]">
|
||||
@@ -42,6 +42,8 @@
|
||||
<a-textarea v-model:value="formData.method" placeholder="请输入措施内容" :rows="3" allow-clear></a-textarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="完成期限" name="deadline">
|
||||
<a-date-picker
|
||||
@@ -58,6 +60,8 @@
|
||||
<a-input v-model:value="formData.outcomeForm" placeholder="请输入成果形式" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="进展情况" v-bind="validateInfos.progress" name="progress">
|
||||
<a-textarea v-model:value="formData.progress" placeholder="请输入进展情况" :rows="3" allow-clear></a-textarea>
|
||||
@@ -83,6 +87,8 @@
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否报送上级报告" name="isReportedToHigher">
|
||||
<JDictSelectTag
|
||||
@@ -90,6 +96,7 @@
|
||||
dictCode="need_report_higher"
|
||||
placeholder="请选择"
|
||||
type="select"
|
||||
:stringToNumber="true"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -99,11 +106,15 @@
|
||||
<a-input v-model:value="formData.checkStatus" placeholder="请输入检查情况" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="落实计划" name="completionPlan">
|
||||
<a-textarea v-model:value="formData.completionPlan" placeholder="请输入落实计划" :rows="3" allow-clear></a-textarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="总措施号" name="sumMethodNum">
|
||||
<a-input v-model:value="formData.sumMethodNum" placeholder="请输入总措施号" allow-clear></a-input>
|
||||
@@ -114,6 +125,8 @@
|
||||
<a-input-number v-model:value="formData.measureNum" placeholder="请输入措施数量" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="监督意见" name="inspectionAdvice">
|
||||
<a-textarea v-model:value="formData.inspectionAdvice" placeholder="请输入监督意见" :rows="3" allow-clear></a-textarea>
|
||||
@@ -212,8 +225,6 @@
|
||||
startTime: '',
|
||||
});
|
||||
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({
|
||||
completionStatus: [{ required: true, message: '请选择完成状态' }],
|
||||
|
||||
@@ -67,8 +67,27 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col v-if="formData.needSdwApproval === 1" :span="12">
|
||||
<a-form-item label="督办领导列表" v-bind="validateInfos.sdwLeaderList" id="BgXiSpeakForm-sdwLeaderList" name="sdwLeaderList">
|
||||
<j-select-user v-model:value="formData.sdwLeaderList" :multiple="true" allow-clear placeholder="请选择督办领导" />
|
||||
<a-form-item label="督办领导列表" id="BgXiSpeakForm-sdwLeaderList" name="sdwLeaderList">
|
||||
<a-input
|
||||
v-model:value="sdwLeaderNames"
|
||||
placeholder="请选择督办领导"
|
||||
readonly
|
||||
allow-clear
|
||||
@click="openSdwLeaderModal"
|
||||
@clear="handleClearSdwLeader"
|
||||
>
|
||||
<template #suffix>
|
||||
<SearchOutlined @click="openSdwLeaderModal" />
|
||||
</template>
|
||||
</a-input>
|
||||
<SzUserSelectByDeptRoleSecurityModal
|
||||
v-model:open="sdwLeaderModalOpen"
|
||||
title="请选择所党委领导"
|
||||
:deptId="sdwLeaderDeptId"
|
||||
:roleId="sdwLeaderRoleId"
|
||||
:securityValue="sdwLeaderSecurityValue"
|
||||
@confirm="handleSdwLeaderConfirm"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -78,12 +97,12 @@
|
||||
<a-row :gutter="[16, 0]">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="指定落实措施条数" v-bind="validateInfos.implCount" id="BgXiSpeakForm-implCount" name="implCount">
|
||||
<a-input-number v-model:value="formData.implCount" placeholder="每增加一条反馈数量加1" style="width: 100%" />
|
||||
<a-input-number v-model:value="formData.implCount" placeholder="每增加一条反馈数量加1" style="width: 100%" disabled />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="措施已闭环数量" v-bind="validateInfos.closedCount" id="BgXiSpeakForm-closedCount" name="closedCount">
|
||||
<a-input-number v-model:value="formData.closedCount" placeholder="完成反馈全流程后增加" style="width: 100%" />
|
||||
<a-input-number v-model:value="formData.closedCount" placeholder="完成反馈全流程后增加" style="width: 100%" disabled />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@@ -103,7 +122,7 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="督办次数" v-bind="validateInfos.supervisionCount" id="BgXiSpeakForm-supervisionCount" name="supervisionCount">
|
||||
<a-input-number v-model:value="formData.supervisionCount" placeholder="每次发起督办流程自动加1" style="width: 100%" />
|
||||
<a-input-number v-model:value="formData.supervisionCount" placeholder="每次发起督办流程自动加1" style="width: 100%" disabled />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -125,6 +144,9 @@
|
||||
import JSelectUser from '/@/components/Form/src/jeecg/components/JSelectUser.vue';
|
||||
import JTreeSelect from '/@/components/Form/src/jeecg/components/JTreeSelect.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import SzUserSelectByDeptRoleSecurityModal from '/src/components/semri/userComponent/modal/SzUserSelectByDeptRoleSecurityModal.vue';
|
||||
import { SearchOutlined } from '@ant-design/icons-vue';
|
||||
import { getUserList } from '/@/api/common/api';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { loadTreeData, saveOrUpdateDict } from '../BgXiSpeak.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
@@ -174,6 +196,42 @@
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 18 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
|
||||
// 督办领导选人弹窗
|
||||
const sdwLeaderModalOpen = ref(false);
|
||||
const sdwLeaderNames = ref('');
|
||||
const sdwLeaderDeptId = ref('2044677562460508161');
|
||||
const sdwLeaderRoleId = ref('2044676455280570370');
|
||||
const sdwLeaderSecurityValue = ref(5);
|
||||
|
||||
function openSdwLeaderModal() {
|
||||
sdwLeaderModalOpen.value = true;
|
||||
}
|
||||
|
||||
function handleClearSdwLeader() {
|
||||
formData.sdwLeaderList = '';
|
||||
sdwLeaderNames.value = '';
|
||||
}
|
||||
|
||||
function handleSdwLeaderConfirm(rows: Array<{ id: string; realname: string }>) {
|
||||
if (rows && rows.length > 0) {
|
||||
formData.sdwLeaderList = rows.map((r) => r.username).join(',');
|
||||
sdwLeaderNames.value = rows.map((r) => r.realname).join(',');
|
||||
} else {
|
||||
formData.sdwLeaderList = '';
|
||||
sdwLeaderNames.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
async function resolveSdwLeaderNames(ids: string) {
|
||||
try {
|
||||
const res = await getUserList({ username: ids, pageSize: 999 });
|
||||
const records = res?.records || res?.result?.records || [];
|
||||
sdwLeaderNames.value = records.map((u: any) => u.realname).join(',');
|
||||
} catch {
|
||||
sdwLeaderNames.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
const validatorRules = reactive({
|
||||
speakStatus: [{ required: true, message: '请输入重要讲话指示批示情况' }],
|
||||
time: [{ required: true, message: '请选择时间' }],
|
||||
@@ -254,6 +312,10 @@
|
||||
});
|
||||
|
||||
Object.assign(formData, tmpData);
|
||||
sdwLeaderNames.value = data.sdwLeaderList_dictText || '';
|
||||
if (!sdwLeaderNames.value && formData.sdwLeaderList) {
|
||||
resolveSdwLeaderNames(formData.sdwLeaderList);
|
||||
}
|
||||
model = { ...tmpData };
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
import {defHttp} from "/@/utils/http/axios";
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/dj/inspectimprove/djInspectImprove/rootList',
|
||||
save='/dj/inspectimprove/djInspectImprove/add',
|
||||
edit='/dj/inspectimprove/djInspectImprove/edit',
|
||||
deleteDjInspectImprove = '/dj/inspectimprove/djInspectImprove/delete',
|
||||
importExcel = '/dj/inspectimprove/djInspectImprove/importExcel',
|
||||
exportXls = '/dj/inspectimprove/djInspectImprove/exportXls',
|
||||
loadTreeData = '/dj/inspectimprove/djInspectImprove/loadTreeRoot',
|
||||
getChildList = '/dj/inspectimprove/djInspectImprove/childList',
|
||||
getChildListBatch = '/dj/inspectimprove/djInspectImprove/getChildListBatch',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
/**
|
||||
* 导入api
|
||||
* @param params
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) =>
|
||||
defHttp.get({url: Api.list, params});
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export const deleteDjInspectImprove = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteDjInspectImprove, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
*/
|
||||
export const batchDeleteDjInspectImprove = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteDjInspectImprove, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
*/
|
||||
export const saveOrUpdateDict = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({url: url, params});
|
||||
}
|
||||
/**
|
||||
* 查询全部树形节点数据
|
||||
* @param params
|
||||
*/
|
||||
export const loadTreeData = (params) =>
|
||||
defHttp.get({url: Api.loadTreeData,params});
|
||||
/**
|
||||
* 查询子节点数据
|
||||
* @param params
|
||||
*/
|
||||
export const getChildList = (params) =>
|
||||
defHttp.get({url: Api.getChildList, params});
|
||||
/**
|
||||
* 批量查询子节点数据
|
||||
* @param params
|
||||
*/
|
||||
export const getChildListBatch = (params) =>
|
||||
defHttp.get({url: Api.getChildListBatch, params},{isTransformResponse:false});
|
||||
@@ -1,252 +0,0 @@
|
||||
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';
|
||||
import { filterDictTextByCache } from '/@/utils/dict/JDictSelectUtil';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '树形表单父id',
|
||||
align: 'center',
|
||||
dataIndex: 'pid'
|
||||
},
|
||||
{
|
||||
title: '问题分类',
|
||||
align: 'center',
|
||||
dataIndex: 'questionCategory',
|
||||
customRender: ({text}) => filterDictTextByCache('inspect_improve_type', text),
|
||||
},
|
||||
{
|
||||
title: '面上问题',
|
||||
align: 'center',
|
||||
dataIndex: 'mianshangQuestion'
|
||||
},
|
||||
{
|
||||
title: '具体问题',
|
||||
align: 'left',
|
||||
dataIndex: 'specicalQuestion'
|
||||
},
|
||||
{
|
||||
title: '巡视建议',
|
||||
align: 'center',
|
||||
dataIndex: 'inspectAdvice'
|
||||
},
|
||||
{
|
||||
title: '整改措施',
|
||||
align: 'center',
|
||||
dataIndex: 'improveMeasure'
|
||||
},
|
||||
{
|
||||
title: '完成时限',
|
||||
align: 'center',
|
||||
dataIndex: 'deadline',
|
||||
customRender:({text}) =>{
|
||||
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
return text;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '目标节点',
|
||||
align: 'center',
|
||||
dataIndex: 'targetNode'
|
||||
},
|
||||
{
|
||||
title: '问题责任领导',
|
||||
align: 'center',
|
||||
dataIndex: 'questionResLeader'
|
||||
},
|
||||
{
|
||||
title: '问题责任部门',
|
||||
align: 'center',
|
||||
dataIndex: 'questionResDept'
|
||||
},
|
||||
{
|
||||
title: '措施责任领导',
|
||||
align: 'center',
|
||||
dataIndex: 'measureResLeader'
|
||||
},
|
||||
{
|
||||
title: '措施责任部门',
|
||||
align: 'center',
|
||||
dataIndex: 'measureResDept'
|
||||
},
|
||||
{
|
||||
title: '整改交付成果',
|
||||
align: 'center',
|
||||
dataIndex: 'rectificationEvidence'
|
||||
},
|
||||
{
|
||||
title: '成效评价标准',
|
||||
align: 'center',
|
||||
dataIndex: 'evaluationCriterion'
|
||||
},
|
||||
{
|
||||
title: '工作进展',
|
||||
align: 'center',
|
||||
dataIndex: 'workProgress'
|
||||
},
|
||||
{
|
||||
title: '检查情况',
|
||||
align: 'center',
|
||||
dataIndex: 'inspectionStatus'
|
||||
},
|
||||
{
|
||||
title: '监督意见',
|
||||
align: 'center',
|
||||
dataIndex: 'supervisoryOpinion'
|
||||
},
|
||||
{
|
||||
title: '措施数量',
|
||||
align: 'center',
|
||||
dataIndex: 'measureCount'
|
||||
},
|
||||
];
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
];
|
||||
//表单数据
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
label: '树形表单父id',
|
||||
field: 'pid',
|
||||
component: 'JTreeSelect',
|
||||
componentProps: {
|
||||
dict: "dj_inspect_improve,specical_question,id",
|
||||
pidField: "pid",
|
||||
pidValue: "0",
|
||||
hasChildField: "has_child",
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '问题分类',
|
||||
field: 'questionCategory',
|
||||
component: 'JDictSelectTag',
|
||||
componentProps: {
|
||||
dictCode: 'inspect_improve_type',
|
||||
stringToNumber: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '面上问题',
|
||||
field: 'mianshangQuestion',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '具体问题',
|
||||
field: 'specicalQuestion',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '巡视建议',
|
||||
field: 'inspectAdvice',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '整改措施',
|
||||
field: 'improveMeasure',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '完成时限',
|
||||
field: 'deadline',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
valueFormat: 'YYYY-MM-DD'
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '目标节点',
|
||||
field: 'targetNode',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '问题责任领导',
|
||||
field: 'questionResLeader',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '问题责任部门',
|
||||
field: 'questionResDept',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '措施责任领导',
|
||||
field: 'measureResLeader',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '措施责任部门',
|
||||
field: 'measureResDept',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '整改交付成果',
|
||||
field: 'rectificationEvidence',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '成效评价标准',
|
||||
field: 'evaluationCriterion',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '工作进展',
|
||||
field: 'workProgress',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '检查情况',
|
||||
field: 'inspectionStatus',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '监督意见',
|
||||
field: 'supervisoryOpinion',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '措施数量',
|
||||
field: 'measureCount',
|
||||
component: 'InputNumber',
|
||||
},
|
||||
// TODO 主键隐藏字段,目前写死为ID
|
||||
{
|
||||
label: '',
|
||||
field: 'id',
|
||||
component: 'Input',
|
||||
show: false
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
pid: {title: '树形表单父id',order: 0,view: 'text', type: 'string',},
|
||||
questionCategory: {title: '问题分类',order: 1,view: 'number', type: 'number',},
|
||||
mianshangQuestion: {title: '面上问题',order: 2,view: 'text', type: 'string',},
|
||||
specicalQuestion: {title: '具体问题',order: 3,view: 'text', type: 'string',},
|
||||
inspectAdvice: {title: '巡视建议',order: 4,view: 'text', type: 'string',},
|
||||
improveMeasure: {title: '整改措施',order: 5,view: 'text', type: 'string',},
|
||||
deadline: {title: '完成时限',order: 6,view: 'date', type: 'string',},
|
||||
targetNode: {title: '目标节点',order: 7,view: 'text', type: 'string',},
|
||||
questionResLeader: {title: '问题责任领导',order: 8,view: 'text', type: 'string',},
|
||||
questionResDept: {title: '问题责任部门',order: 9,view: 'text', type: 'string',},
|
||||
measureResLeader: {title: '措施责任领导',order: 10,view: 'text', type: 'string',},
|
||||
measureResDept: {title: '措施责任部门',order: 11,view: 'text', type: 'string',},
|
||||
rectificationEvidence: {title: '整改交付成果',order: 12,view: 'text', type: 'string',},
|
||||
evaluationCriterion: {title: '成效评价标准',order: 13,view: 'text', type: 'string',},
|
||||
workProgress: {title: '工作进展',order: 14,view: 'text', type: 'string',},
|
||||
inspectionStatus: {title: '检查情况',order: 15,view: 'text', type: 'string',},
|
||||
supervisoryOpinion: {title: '监督意见',order: 16,view: 'text', type: 'string',},
|
||||
measureCount: {title: '措施数量',order: 17,view: 'number', type: 'number',},
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 流程表单调用这个方法获取formSchema
|
||||
* @param param
|
||||
*/
|
||||
export function getBpmFormSchema(_formData): FormSchema[]{
|
||||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
||||
return formSchema;
|
||||
}
|
||||
@@ -1,336 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" :expandedRowKeys="expandedRowKeys" @expand="handleExpand" @fetch-success="onFetchSuccess">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'dj.inspectimprove:dj_inspect_improve:add'" @click="handleCreate" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'dj.inspectimprove:dj_inspect_improve:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'dj.inspectimprove:dj_inspect_improve: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="'dj.inspectimprove:dj_inspect_improve:deleteBatch'">批量操作
|
||||
<Icon icon="ant-design:down-outlined"></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>
|
||||
<!--字典弹窗-->
|
||||
<DjInspectImproveModal @register="registerModal" @success="handleSuccess"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="dj.inspectimprove-djInspectImprove" setup>
|
||||
//ts语法
|
||||
import {ref, reactive, computed, unref, toRaw, nextTick} from 'vue';
|
||||
import {BasicTable, TableAction} from '/@/components/Table';
|
||||
import {useModal} from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import DjInspectImproveModal from './components/DjInspectImproveModal.vue';
|
||||
import {columns, searchFormSchema, superQuerySchema} from './DjInspectImprove.data';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import {list, deleteDjInspectImprove, batchDeleteDjInspectImprove, getExportUrl,getImportUrl, getChildList,getChildListBatch} from './DjInspectImprove.api';
|
||||
const { createMessage } = useMessage();
|
||||
const queryParam = reactive<any>({});
|
||||
const expandedRowKeys = ref([]);
|
||||
//字典model
|
||||
const [registerModal, {openModal}] = useModal();
|
||||
//注册table数据
|
||||
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
|
||||
tableProps:{
|
||||
api: list,
|
||||
title: '巡视整改台账',
|
||||
columns,
|
||||
canResize:false,
|
||||
isTreeTable: true,
|
||||
formConfig: {
|
||||
//labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter:true,
|
||||
showAdvancedButton:true,
|
||||
fieldMapToNumber: [
|
||||
],
|
||||
fieldMapToTime: [
|
||||
],
|
||||
},
|
||||
actionColumn: {
|
||||
width: 240,
|
||||
fixed:'right'
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.hasQuery = "true";
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name:"巡视整改台账",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: importSuccess
|
||||
},
|
||||
})
|
||||
|
||||
const [registerTable, {reload, collapseAll, updateTableDataRecord, findTableDataRecord,getDataSource},{ rowSelection, selectedRowKeys }] = tableContext
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
async function handleEdit(record) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
async function handleDetail(record) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
hideFooter: true,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteDjInspectImprove({id: record.id}, importSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
const ids = selectedRowKeys.value.filter(item => !item.includes('loadChild'))
|
||||
await batchDeleteDjInspectImprove({id: ids}, importSuccess);
|
||||
}
|
||||
/**
|
||||
* 导入
|
||||
*/
|
||||
function importSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 添加下级
|
||||
*/
|
||||
function handleAddSub(record) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
async function handleSuccess({isUpdate, values, expandedArr, changeParent}) {
|
||||
if (isUpdate) {
|
||||
if (changeParent) {
|
||||
reload();
|
||||
} else {
|
||||
let data = await list({ id: values.id, pageSize: 1, pageNo: 1, pid: values['pid'] });
|
||||
if (data && data.records && data.records.length > 0) {
|
||||
// 编辑回调
|
||||
updateTableDataRecord(values.id, data.records[0]);
|
||||
}else{
|
||||
updateTableDataRecord(values.id, values);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(!values['id'] || !values['pid']){
|
||||
//新增根节点
|
||||
reload();
|
||||
}else{
|
||||
//新增子集
|
||||
expandedRowKeys.value = [];
|
||||
for (let key of unref(expandedArr)) {
|
||||
await expandTreeNode(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 接口请求成功后回调
|
||||
*/
|
||||
function onFetchSuccess(result) {
|
||||
getDataByResult(result.items)&&loadDataByExpandedRows();
|
||||
}
|
||||
/**
|
||||
* 根据已展开的行查询数据(用于保存后刷新时异步加载子级的数据)
|
||||
*/
|
||||
async function loadDataByExpandedRows() {
|
||||
if (unref(expandedRowKeys).length > 0) {
|
||||
const res = await getChildListBatch({ parentIds: unref(expandedRowKeys).join(',')});
|
||||
if (res.success && res.result.records.length>0) {
|
||||
//已展开的数据批量子节点
|
||||
let records = res.result.records
|
||||
const listMap = new Map();
|
||||
for (let item of records) {
|
||||
let pid = item['pid'];
|
||||
if (unref(expandedRowKeys).includes(pid)) {
|
||||
let mapList = listMap.get(pid);
|
||||
if (mapList == null) {
|
||||
mapList = [];
|
||||
}
|
||||
mapList.push(item);
|
||||
listMap.set(pid, mapList);
|
||||
}
|
||||
}
|
||||
let childrenMap = listMap;
|
||||
let fn = (list) => {
|
||||
if(list) {
|
||||
list.forEach(data => {
|
||||
if (unref(expandedRowKeys).includes(data.id)) {
|
||||
data.children = getDataByResult(childrenMap.get(data.id))
|
||||
fn(data.children)
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
fn(getDataSource())
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 处理数据集
|
||||
*/
|
||||
function getDataByResult(result){
|
||||
if(result && result.length>0){
|
||||
return result.map(item=>{
|
||||
//判断是否标记了带有子节点
|
||||
if(item["hasChild"]=='1'){
|
||||
let loadChild = { id: item.id+'_loadChild', name: 'loading...', isLoading: true }
|
||||
item.children = [loadChild]
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
}
|
||||
/**
|
||||
*树节点展开合并
|
||||
* */
|
||||
async function handleExpand(expanded, record) {
|
||||
// 判断是否是展开状态,展开状态(expanded)并且存在子集(children)并且未加载过(isLoading)的就去查询子节点数据
|
||||
if (expanded) {
|
||||
expandedRowKeys.value.push(record.id)
|
||||
if (record.children.length > 0 && !!record.children[0].isLoading) {
|
||||
let result = await getChildList({pid: record.id});
|
||||
result=result.records?result.records:result;
|
||||
if (result && result.length > 0) {
|
||||
record.children = getDataByResult(result);
|
||||
} else {
|
||||
record.children = null
|
||||
record.hasChild = '0'
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let keyIndex = expandedRowKeys.value.indexOf(record.id)
|
||||
if (keyIndex >= 0) {
|
||||
expandedRowKeys.value.splice(keyIndex, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*操作表格后处理树节点展开合并
|
||||
* */
|
||||
async function expandTreeNode(key) {
|
||||
let record = findTableDataRecord(key)
|
||||
expandedRowKeys.value.push(key);
|
||||
let result = await getChildList({pid: key});
|
||||
if (result && result.length > 0) {
|
||||
record.children = getDataByResult(result);
|
||||
} else {
|
||||
record.children = null
|
||||
record.hasChild = '0'
|
||||
}
|
||||
updateTableDataRecord(key, record);
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'dj.inspectimprove:dj_inspect_improve:edit'
|
||||
},
|
||||
{
|
||||
label: '添加下级',
|
||||
onClick: handleAddSub.bind(null, {pid: record.id}),
|
||||
}
|
||||
]
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record){
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '确定删除吗?',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft'
|
||||
},
|
||||
auth: 'dj.inspectimprove:dj_inspect_improve:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,70 +0,0 @@
|
||||
<template>
|
||||
<div style="min-height: 400px">
|
||||
<BasicForm @register="registerForm"></BasicForm>
|
||||
<div style="width: 100%;text-align: center" v-if="!formDisabled">
|
||||
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||
import {computed, defineComponent} from 'vue';
|
||||
import {defHttp} from '/@/utils/http/axios';
|
||||
import { propTypes } from '/@/utils/propTypes';
|
||||
import {getBpmFormSchema} from '../DjInspectImprove.data';
|
||||
import {saveOrUpdateDict} from '../DjInspectImprove.api';
|
||||
|
||||
export default defineComponent({
|
||||
name: "DjInspectImproveForm",
|
||||
components:{
|
||||
BasicForm
|
||||
},
|
||||
props:{
|
||||
formData: propTypes.object.def({}),
|
||||
formBpm: propTypes.bool.def(true),
|
||||
},
|
||||
setup(props){
|
||||
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
|
||||
labelWidth: 150,
|
||||
schemas: getBpmFormSchema(props.formData),
|
||||
showActionButtonGroup: false,
|
||||
baseColProps: {span: 24},
|
||||
});
|
||||
|
||||
const formDisabled = computed(()=>{
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
let formData = {};
|
||||
const queryByIdUrl = '/dj/inspectimprove/djInspectImprove/queryById';
|
||||
async function initFormData(){
|
||||
let params = {id: props.formData.dataId};
|
||||
const data = await defHttp.get({url: queryByIdUrl, params});
|
||||
formData = {...data}
|
||||
//设置表单的值
|
||||
await setFieldsValue(formData);
|
||||
//默认是禁用
|
||||
await setProps({disabled: formDisabled.value})
|
||||
}
|
||||
|
||||
async function submitForm() {
|
||||
let data = getFieldsValue();
|
||||
let params = Object.assign({}, formData, data);
|
||||
console.log('表单数据', params)
|
||||
await saveOrUpdateDict(params, true)
|
||||
}
|
||||
|
||||
initFormData();
|
||||
|
||||
return {
|
||||
registerForm,
|
||||
formDisabled,
|
||||
submitForm,
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1,119 +0,0 @@
|
||||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :width="800" :title="getTitle" @ok="handleSubmit">
|
||||
<BasicForm @register="registerForm" name="DjInspectImproveForm" />
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import {ref, computed, unref} from 'vue';
|
||||
import {BasicModal, useModalInner} from '/@/components/Modal';
|
||||
import {BasicForm, useForm} from '/@/components/Form';
|
||||
import {formSchema} from '../DjInspectImprove.data';
|
||||
import {loadTreeData, saveOrUpdateDict} from '../DjInspectImprove.api';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
const { createMessage } = useMessage();
|
||||
// 获取emit
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const isUpdate = ref(true);
|
||||
const isDetail = ref(false);
|
||||
const expandedRowKeys = ref([]);
|
||||
const treeData = ref([]);
|
||||
// 当前编辑的数据
|
||||
let model:Nullable<Recordable> = null;
|
||||
//表单配置
|
||||
const [registerForm, { setProps,resetFields, setFieldsValue, validate, updateSchema, scrollToField }] = useForm({
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
baseColProps: {span: 24},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 18 },
|
||||
},
|
||||
});
|
||||
//表单赋值
|
||||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||
//重置表单
|
||||
await resetFields();
|
||||
expandedRowKeys.value = [];
|
||||
setModalProps({confirmLoading: false, minHeight: 80 ,showOkBtn: !!!data?.hideFooter});
|
||||
isUpdate.value = !!data?.isUpdate;
|
||||
isDetail.value = !!data?.showFooter;
|
||||
if (data?.record) {
|
||||
model = data.record;
|
||||
//表单赋值
|
||||
await setFieldsValue({
|
||||
...data.record,
|
||||
});
|
||||
} else {
|
||||
model = null;
|
||||
}
|
||||
//父级节点树信息
|
||||
treeData.value = await loadTreeData({'async': false,'pcode':''});
|
||||
// 隐藏底部时禁用整个表单
|
||||
setProps({ disabled: !!data?.hideFooter })
|
||||
});
|
||||
//设置标题
|
||||
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : !unref(isDetail) ? '详情' : '编辑'));
|
||||
|
||||
/**
|
||||
* 根据pid获取展开的节点
|
||||
* @param pid
|
||||
* @param arr
|
||||
*/
|
||||
function getExpandKeysByPid(pid,arr){
|
||||
if(pid && arr && arr.length>0){
|
||||
for(let i=0;i<arr.length;i++){
|
||||
if(arr[i].key==pid && unref(expandedRowKeys).indexOf(pid)<0){
|
||||
expandedRowKeys.value.push(arr[i].key);
|
||||
getExpandKeysByPid(arr[i]['parentId'],unref(treeData))
|
||||
}else{
|
||||
getExpandKeysByPid(pid,arr[i].children)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//表单提交事件
|
||||
async function handleSubmit() {
|
||||
try {
|
||||
let values = await validate();
|
||||
setModalProps({confirmLoading: true});
|
||||
//提交表单
|
||||
await saveOrUpdateDict(values, isUpdate.value);
|
||||
//关闭弹窗
|
||||
closeModal();
|
||||
//展开的节点信息
|
||||
await getExpandKeysByPid(values['pid'],unref(treeData))
|
||||
//刷新列表(isUpdate:是否编辑;values:表单信息;expandedArr:展开的节点信息)
|
||||
emit('success', {
|
||||
isUpdate: unref(isUpdate),
|
||||
values: {...values},
|
||||
expandedArr: unref(expandedRowKeys).reverse(),
|
||||
// 是否更改了父级节点
|
||||
changeParent: model != null && (model['pid'] != values['pid']),
|
||||
});
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
} finally {
|
||||
setModalProps({confirmLoading: false});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
/** 时间和数字输入框样式 */
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.ant-calendar-picker) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -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,127 @@
|
||||
# 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_1c64uvl>`
|
||||
|
||||
* **edit** `1` —— 基础信息可编辑
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `1` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `1` —— 反馈信息区域
|
||||
* **showAddFeedback** `1` —— 新增反馈按钮
|
||||
* **showEditFeedback** `1` —— 编辑/删除操作列
|
||||
* dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showSubApproveUser=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1
|
||||
---
|
||||
|
||||
### 节点: <部门经办人反馈完成情况并上传附件>
|
||||
* taskDefKey: `<Task_0mbr735>`
|
||||
|
||||
* **edit** `1` —— 基础信息可编辑
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `1` —— 反馈信息区域
|
||||
* **showAddFeedback** `1` —— 新增反馈按钮
|
||||
* **showEditFeedback** `1` —— 编辑/删除操作列
|
||||
* dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1
|
||||
---
|
||||
### 节点: <责任部门领导审批>
|
||||
* taskDefKey: `<Task_0mxtg05>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
|
||||
---
|
||||
|
||||
### 节点: <党群经办人审查>
|
||||
* taskDefKey: `<Task_14226iy>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
|
||||
---
|
||||
|
||||
### 节点: <党群负责人审批>
|
||||
* taskDefKey: `<Task_0ixi1rs>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
|
||||
---
|
||||
|
||||
### 节点: <分管所领导审批>
|
||||
* taskDefKey: `<Task_0l5ik22>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
|
||||
---
|
||||
|
||||
### 节点: <所党委书记审批>
|
||||
* taskDefKey: `<Task_0g8sc6n>`
|
||||
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
|
||||
---
|
||||
@@ -92,3 +92,17 @@ 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 });
|
||||
};
|
||||
|
||||
export const setProcessVariable = (params) => {
|
||||
return defHttp.post({ url: '/act/process/setProcessVariable', params }, { isTransformResponse: false });
|
||||
};
|
||||
|
||||
@@ -7,13 +7,18 @@
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="improveMeasure">
|
||||
<template #label><span title="整改措施">整改措施</span></template>
|
||||
<JInput v-model:value="queryParam.improveMeasure"/>
|
||||
<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">
|
||||
@@ -44,8 +49,12 @@
|
||||
<!--插槽: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-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>
|
||||
@@ -55,7 +64,8 @@
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'dqinspecttask:dq_inspect_task:deleteBatch'">批量操作
|
||||
<a-button v-auth="'dqinspecttask:dq_inspect_task:deleteBatch'"
|
||||
>批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
@@ -64,33 +74,38 @@
|
||||
</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" />
|
||||
<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,20 +113,23 @@
|
||||
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:{
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'dq_inspect_task',
|
||||
api: ledgerList,
|
||||
columns: ledgerColumns,
|
||||
canResize:false,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed:'right'
|
||||
width: 240,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
@@ -121,17 +139,17 @@
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name:"dq_inspect_task",
|
||||
name: 'dq_inspect_task',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
success: handleSuccess,
|
||||
},
|
||||
})
|
||||
});
|
||||
|
||||
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
@@ -179,13 +197,13 @@
|
||||
* 删除事件
|
||||
*/
|
||||
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);
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
@@ -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 [
|
||||
function getTableAction(record) {
|
||||
const actions = [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'dqinspecttask:dq_inspect_task:edit'
|
||||
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){
|
||||
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)
|
||||
confirm: handleDelete.bind(null, record),
|
||||
},
|
||||
auth: 'dqinspecttask:dq_inspect_task:delete'
|
||||
},
|
||||
{
|
||||
label: '审批进度',
|
||||
onClick: handlePreviewPic.bind(null, record),
|
||||
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '查询督办流程',
|
||||
onClick: handleQueryProcess.bind(null, record),
|
||||
},
|
||||
];
|
||||
if(record.bpmStatus == '1' || !record.bpmStatus){
|
||||
dropDownAction.push({
|
||||
label: '发起流程',
|
||||
popConfirm: {
|
||||
title: '确认提交流程吗?',
|
||||
confirm: handleProcess.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
})
|
||||
}
|
||||
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: ''
|
||||
function handleProcess(record) {
|
||||
flowScheduleModalRef.value?.open({
|
||||
title: '发起整改任务流程',
|
||||
payload: { record },
|
||||
deptOptions: getDeptOptions(record),
|
||||
showSuoleaderFields: true,
|
||||
isNeedAppro: record.isNeedAppro,
|
||||
supDeptleaderid: record.supDeptleaderid,
|
||||
supDeptleaderName: record.supDeptleaderid_dictText,
|
||||
});
|
||||
}
|
||||
await startProcess(params);
|
||||
|
||||
/**
|
||||
* 流程调度确认
|
||||
*/
|
||||
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) {
|
||||
formData.id = buildUUID();
|
||||
}
|
||||
const res = await progressSaveOrUpdate({ ...formData }, isEdit.value);
|
||||
if (res.success) {
|
||||
if (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,854 @@
|
||||
<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="chargeLeaderId">
|
||||
<j-select-user v-model:value="mainForm.chargeLeaderId" :disabled="mainDisabled" 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, setProcessVariable, 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: '',
|
||||
chargeLeaderId: '',
|
||||
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] ?? '';
|
||||
});
|
||||
}
|
||||
|
||||
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 || '' : '';
|
||||
}
|
||||
|
||||
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 processInstanceId = processInfo.value.processInstanceId;
|
||||
const isEndValue = String(isEnd.value);
|
||||
const usernameValue = normalizeUsernameList(subApproveUser.value);
|
||||
if (!processInstanceId) {
|
||||
createMessage.warning('流程实例ID不能为空');
|
||||
return false;
|
||||
}
|
||||
if (isEndValue !== '1' && !usernameValue) {
|
||||
createMessage.warning('请选择部门经办人');
|
||||
return false;
|
||||
}
|
||||
|
||||
savingSubApproveUser.value = true;
|
||||
try {
|
||||
const isEndResult = await saveProcessVariable('is_end', isEndValue);
|
||||
if (!isEndResult?.success) {
|
||||
createMessage.warning(isEndResult.message || '保存失败');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isEndValue !== '1') {
|
||||
const subApproveUserResult = await saveProcessVariable('sub_approve_user', usernameValue);
|
||||
if (!subApproveUserResult?.success) {
|
||||
createMessage.warning(subApproveUserResult.message || '保存失败');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (showSuccessMessage) createMessage.success('保存成功');
|
||||
return true;
|
||||
} catch {
|
||||
createMessage.warning('保存失败');
|
||||
return false;
|
||||
} finally {
|
||||
savingSubApproveUser.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function saveProcessVariable(varField: string, varVal: any) {
|
||||
return setProcessVariable({
|
||||
processInstanceId: processInfo.value.processInstanceId,
|
||||
local: false,
|
||||
varField,
|
||||
varVal,
|
||||
});
|
||||
}
|
||||
|
||||
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,8 +2,10 @@
|
||||
<a-spin :spinning="loading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form v-bind="formItemLayout" name="DqInspectTaskForm" ref="formRef">
|
||||
<a-row>
|
||||
<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
|
||||
@@ -18,92 +20,107 @@
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="24">
|
||||
<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-input v-model:value="formData.improveMeasure" placeholder="请输入整改措施" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="24">
|
||||
<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-input v-model:value="formData.targetNode" placeholder="请输入目标节点" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
</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="24">
|
||||
<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="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="分管所领导" v-bind="validateInfos.chargeLeaderId" id="DqInspectTaskForm-chargeLeaderId" name="chargeLeaderId">
|
||||
<j-select-user v-model:value="formData.chargeLeaderId" 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-input v-model:value="formData.rectificationEvidence" placeholder="请输入整改交付成果" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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-input v-model:value="formData.evaluationCriterion" placeholder="请输入成效评价标准" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="24">
|
||||
<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-col :span="24">
|
||||
</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-input v-model:value="formData.inspectionStatus" placeholder="请输入检查情况" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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-input v-model:value="formData.supervisoryOpinion" placeholder="请输入监督意见" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="24">
|
||||
<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-input v-model:value="formData.bpmProcessId" placeholder="请输入流程实例ID" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="24">
|
||||
<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-input v-model:value="formData.taskStatus" placeholder="请输入整改状态" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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-input v-model:value="formData.superviseCount" placeholder="请输入督办次数" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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>
|
||||
@@ -114,22 +131,22 @@
|
||||
</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 +159,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';
|
||||
@@ -189,6 +206,7 @@
|
||||
targetNode: '',
|
||||
measureResLeader: '',
|
||||
measureResDept: '',
|
||||
chargeLeaderId: '',
|
||||
rectificationEvidence: '',
|
||||
evaluationCriterion: '',
|
||||
isNeedAppro: '',
|
||||
@@ -204,16 +222,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 +376,8 @@
|
||||
formData,
|
||||
setFieldsValue,
|
||||
handleFormChange,
|
||||
formItemLayout,
|
||||
labelCol,
|
||||
wrapperCol,
|
||||
disabled,
|
||||
showFlowSubmitButton,
|
||||
getFormData,
|
||||
@@ -372,6 +390,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;
|
||||
|
||||
+5
-1
@@ -14,7 +14,7 @@
|
||||
:historyList="historyList"
|
||||
:turnbackTaskId="turnbackTaskId"
|
||||
:branchList="branchList"
|
||||
:selnextUserStatus="selnextUserStatus"
|
||||
:selnextUserStatus="showSelnextUser ? selnextUserStatus : false"
|
||||
:ccStatus="ccStatus"
|
||||
:allowAddSign="allowAddSign"
|
||||
:allowCounterSignAddUser="allowCounterSignAddUser"
|
||||
@@ -60,6 +60,10 @@
|
||||
beforeHandle: {
|
||||
type: Function,
|
||||
default: undefined
|
||||
},
|
||||
showSelnextUser: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
}
|
||||
},
|
||||
emits: ['success', 'claimSuccess'],
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export const ROLE_SCOPE_CONFIG = {
|
||||
DEFAULT_PERMESSION_IDS: '2035916880060223489,2026041610467690430,2026051809451730260',
|
||||
DEFAULT_PERMESSION_IDS: '2035916880060223489,2026041610467690430,2026051809451730260,2059539469575110657',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user