!102 fix(xispeak): BgXiSpeakBPMForm 补全 defaultCc 默认抄送机制
Merge pull request !102 from wsm/fix/20260716
This commit is contained in:
@@ -21,7 +21,7 @@ enum Api {
|
|||||||
deletePendingTask = '/tasktask/taskTask/deletePendingTask',
|
deletePendingTask = '/tasktask/taskTask/deletePendingTask',
|
||||||
updateTitleAndDeadline = '/tasktask/taskTask/updateTitleAndDeadline',
|
updateTitleAndDeadline = '/tasktask/taskTask/updateTitleAndDeadline',
|
||||||
currentNodeInfo = '/act/task/currentNodeInfo',
|
currentNodeInfo = '/act/task/currentNodeInfo',
|
||||||
getBusinessStatus = '/tasktask/taskTask/getBusinessStatus',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -210,11 +210,6 @@ export const updateTitleAndDeadline = (params) => {
|
|||||||
*/
|
*/
|
||||||
export const queryCurrentNodeInfo = (params) => defHttp.get({ url: Api.currentNodeInfo, params });
|
export const queryCurrentNodeInfo = (params) => defHttp.get({ url: Api.currentNodeInfo, params });
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询业务状态(单条)
|
|
||||||
* @param params { businessId: string }
|
|
||||||
*/
|
|
||||||
export const getBusinessStatus = (params) => defHttp.get({ url: Api.getBusinessStatus, params });
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【用于评论功能】自定义文件上传-方法
|
* 【用于评论功能】自定义文件上传-方法
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
import { ref } from 'vue';
|
||||||
|
import { getUserList } from '/@/api/common/api';
|
||||||
|
|
||||||
|
function normalizeCommaList(value: string): string {
|
||||||
|
return String(value || '')
|
||||||
|
.split(',')
|
||||||
|
.map((s) => s.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeDisplayNames(value: string): string {
|
||||||
|
return String(value || '')
|
||||||
|
.split(/[,,;;、]/)
|
||||||
|
.map((s) => s.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('、');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门经办人选人 + 名称解析,统一 BgXiSpeak / DqInspectTask 等 BPM 表单的
|
||||||
|
* username → realname 转换逻辑。
|
||||||
|
*
|
||||||
|
* - `usernames`: 原始 username(逗号分隔),绑定 sz-dept-user-modal 的 v-model
|
||||||
|
* - `displayNames`: 真实姓名(顿号分隔),用于审批意见模板和 formScope
|
||||||
|
* - `setDisplayNames`: modal @confirm 已携带 realname 时直接设置(同步,无 API)
|
||||||
|
* - `initFromData`: 从已保存数据初始化时,通过 API 一次性解析 username → realname
|
||||||
|
*/
|
||||||
|
export function useSubApproveUserResolver() {
|
||||||
|
const usernames = ref('');
|
||||||
|
const displayNames = ref('');
|
||||||
|
|
||||||
|
/** modal @confirm 回调直接设置已携带的 realname */
|
||||||
|
function setDisplayNames(userIds: string, realnames: string) {
|
||||||
|
usernames.value = normalizeCommaList(userIds);
|
||||||
|
displayNames.value = normalizeDisplayNames(realnames);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 从已保存数据初始化(需 API 解析 username → realname) */
|
||||||
|
async function initFromData(rawUsernames: string) {
|
||||||
|
usernames.value = normalizeCommaList(rawUsernames);
|
||||||
|
if (!usernames.value) {
|
||||||
|
displayNames.value = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await getUserList({
|
||||||
|
username: usernames.value,
|
||||||
|
isMultiTranslate: 'true',
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 999,
|
||||||
|
});
|
||||||
|
const records = res?.records || res?.result?.records || res || [];
|
||||||
|
const nameMap: Record<string, string> = {};
|
||||||
|
for (const item of records) {
|
||||||
|
const u = String(item?.username || '').trim();
|
||||||
|
const r = String(item?.realname || item?.name || '').trim();
|
||||||
|
if (u && r) nameMap[u] = r;
|
||||||
|
}
|
||||||
|
const resolved = usernames.value
|
||||||
|
.split(',')
|
||||||
|
.map((u) => nameMap[u.trim()] || u.trim())
|
||||||
|
.filter(Boolean);
|
||||||
|
displayNames.value = normalizeDisplayNames(resolved.join(','));
|
||||||
|
} catch {
|
||||||
|
// 解析失败,保持空
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { usernames, displayNames, setDisplayNames, initFromData };
|
||||||
|
}
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { showImportValidationErrors } from '/@/utils/helper/importError';
|
import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||||
import { startProcessSchedules, getBusinessStatus } from '/@/api/common/api';
|
import { startProcessSchedules } from '/@/api/common/api';
|
||||||
import { dateUtil } from '/@/utils/dateUtil';
|
import { dateUtil } from '/@/utils/dateUtil';
|
||||||
|
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
@@ -360,7 +360,6 @@ import { defHttp } from '/@/utils/http/axios';
|
|||||||
if (result && result.length > 0) {
|
if (result && result.length > 0) {
|
||||||
record.children = getDataByResult(result);
|
record.children = getDataByResult(result);
|
||||||
await refreshFeedbackCounts(record.children);
|
await refreshFeedbackCounts(record.children);
|
||||||
await refreshBusinessStatus(record.children);
|
|
||||||
// 触发表格重新渲染
|
// 触发表格重新渲染
|
||||||
updateTableDataRecord(record.id, { ...record });
|
updateTableDataRecord(record.id, { ...record });
|
||||||
} else {
|
} else {
|
||||||
@@ -443,40 +442,6 @@ import { defHttp } from '/@/utils/http/axios';
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量查询业务状态并更新到 records 中
|
|
||||||
*/
|
|
||||||
async function refreshBusinessStatus(records) {
|
|
||||||
const ids = collectAllIds(records);
|
|
||||||
if (ids.length === 0) return;
|
|
||||||
try {
|
|
||||||
const results = await Promise.all(
|
|
||||||
ids.map((id) =>
|
|
||||||
getBusinessStatus({ businessId: id }).catch(() => null)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
const statusMap: Record<string, string> = {};
|
|
||||||
for (const item of results) {
|
|
||||||
if (item?.businessId) {
|
|
||||||
statusMap[item.businessId] = item.status_dictText || '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const updateFn = (list) => {
|
|
||||||
if (!list) return;
|
|
||||||
for (const item of list) {
|
|
||||||
const status = statusMap[item.id];
|
|
||||||
if (status !== undefined) {
|
|
||||||
item.status_dictText = status;
|
|
||||||
}
|
|
||||||
if (item.children) updateFn(item.children);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
updateFn(records);
|
|
||||||
} catch (e) {
|
|
||||||
// 静默处理查询异常
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口请求成功后回调
|
* 接口请求成功后回调
|
||||||
*/
|
*/
|
||||||
@@ -484,8 +449,7 @@ import { defHttp } from '/@/utils/http/axios';
|
|||||||
getDataByResult(result.items) && loadDataByExpandedRows();
|
getDataByResult(result.items) && loadDataByExpandedRows();
|
||||||
if (result.items && result.items.length > 0) {
|
if (result.items && result.items.length > 0) {
|
||||||
await refreshFeedbackCounts(result.items);
|
await refreshFeedbackCounts(result.items);
|
||||||
await refreshBusinessStatus(result.items);
|
// 触发表格重新渲染以显示更新后的 implCount / closedCount
|
||||||
// 触发表格重新渲染以显示更新后的 implCount / closedCount / businessStatus
|
|
||||||
setTableData([...getDataSource()]);
|
setTableData([...getDataSource()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,7 +246,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-if="showSubApproveUserSelector" :span="12">
|
<a-col v-if="showSubApproveUserSelector" :span="12">
|
||||||
<a-form-item label="部门经办人" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
<a-form-item label="部门经办人" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||||
<sz-dept-user-modal v-model:value="subApproveUser" :disabled="savingSubApproveUser" />
|
<sz-dept-user-modal v-model:value="subApproveUser" :disabled="savingSubApproveUser" @confirm="setDisplayNames" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -257,6 +257,7 @@
|
|||||||
:showSelnextUser="showSelnextUser"
|
:showSelnextUser="showSelnextUser"
|
||||||
:beforeHandle="saveMainFormBeforeProcessHandle"
|
:beforeHandle="saveMainFormBeforeProcessHandle"
|
||||||
:defaultReason="defaultHandleReason"
|
:defaultReason="defaultHandleReason"
|
||||||
|
:defaultCc="defaultCcUsers"
|
||||||
@success="handleProcessSuccess"
|
@success="handleProcessSuccess"
|
||||||
@claimSuccess="handleClaimSuccess"
|
@claimSuccess="handleClaimSuccess"
|
||||||
/>
|
/>
|
||||||
@@ -278,7 +279,7 @@
|
|||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { bgXiSpeakFeedbackList, bgXiSpeakFeedbackDelete, saveBpmForm, saveSubApprove, getProcessVariable } from '../BgXiSpeak.api';
|
import { bgXiSpeakFeedbackList, bgXiSpeakFeedbackDelete, saveBpmForm, saveSubApprove, getProcessVariable } from '../BgXiSpeak.api';
|
||||||
import { getUserList } from '/@/api/common/api';
|
import { useSubApproveUserResolver } from '/@/composables/useSubApproveUserResolver';
|
||||||
import { usePermission } from '/@/hooks/web/usePermission';
|
import { usePermission } from '/@/hooks/web/usePermission';
|
||||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||||
import BgXiSpeakBPMFeedbackModal from './BgXiSpeakBPMFeedbackModal.vue';
|
import BgXiSpeakBPMFeedbackModal from './BgXiSpeakBPMFeedbackModal.vue';
|
||||||
@@ -328,10 +329,9 @@ import {
|
|||||||
const showBaseInfoDetail = ref(false);
|
const showBaseInfoDetail = ref(false);
|
||||||
const showFeedbackDetail = ref(true);
|
const showFeedbackDetail = ref(true);
|
||||||
const feedbackList = ref<any[]>([]);
|
const feedbackList = ref<any[]>([]);
|
||||||
const subApproveUser = ref('');
|
const { usernames: subApproveUser, displayNames: subApproveUserNameText, setDisplayNames, initFromData } = useSubApproveUserResolver();
|
||||||
const subApproveUserNameText = ref('');
|
|
||||||
const userResolveVersion = ref(0);
|
|
||||||
const isEnd = ref(0);
|
const isEnd = ref(0);
|
||||||
|
const defaultCcUsers = ref<Array<{ username: string; realname: string }>>([]);
|
||||||
|
|
||||||
const mainForm = reactive<Record<string, any>>({
|
const mainForm = reactive<Record<string, any>>({
|
||||||
id: '',
|
id: '',
|
||||||
@@ -429,6 +429,7 @@ import {
|
|||||||
() => String(props.formData?.extendUrlParams?.showSubApproveUser ?? props.formData?.extendUrlParams?.selectuser ?? '') === '1'
|
() => String(props.formData?.extendUrlParams?.showSubApproveUser ?? props.formData?.extendUrlParams?.selectuser ?? '') === '1'
|
||||||
);
|
);
|
||||||
const showSubApproveUserSelector = computed(() => showSubApproveUser.value && String(isEnd.value) !== '1');
|
const showSubApproveUserSelector = computed(() => showSubApproveUser.value && String(isEnd.value) !== '1');
|
||||||
|
const showDefaultCc = computed(() => String(props.formData?.extendUrlParams?.defaultCc ?? '') === '1');
|
||||||
|
|
||||||
const processInfo = computed(() => ({
|
const processInfo = computed(() => ({
|
||||||
taskId: props.formData?.taskId,
|
taskId: props.formData?.taskId,
|
||||||
@@ -469,9 +470,10 @@ import {
|
|||||||
Task_0jrgrzs: buildDeptHandlerFeedbackReason,
|
Task_0jrgrzs: buildDeptHandlerFeedbackReason,
|
||||||
Task_12vdqzv: buildDeptHandlerFeedbackReason,
|
Task_12vdqzv: buildDeptHandlerFeedbackReason,
|
||||||
// 部门负责人接受任务并分配
|
// 部门负责人接受任务并分配
|
||||||
Task_1v9ce78: () => buildDeptLeaderAssignReason(
|
Task_1v9ce78: () => {
|
||||||
normalizeDeptNames(subApproveUserNameText.value || subApproveUser.value),
|
if (isEnd.value === 1) return '';
|
||||||
),
|
return buildDeptLeaderAssignReason(normalizeDeptNames(subApproveUserNameText.value));
|
||||||
|
},
|
||||||
// 部门负责人直接反馈
|
// 部门负责人直接反馈
|
||||||
Task_0sialna: buildDeptLeaderDirectFeedbackReason,
|
Task_0sialna: buildDeptLeaderDirectFeedbackReason,
|
||||||
// 督办部门经办人确认全部反馈事项
|
// 督办部门经办人确认全部反馈事项
|
||||||
@@ -525,11 +527,35 @@ import {
|
|||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
watch(isEnd, (val) => {
|
||||||
|
const vars = props.formData?.vars;
|
||||||
|
if (vars) {
|
||||||
|
vars.is_end = String(val);
|
||||||
|
vars.isEnd = String(val);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
async function fetchDefaultCcUsers() {
|
||||||
|
try {
|
||||||
|
const res = await defHttp.get({
|
||||||
|
url: '/sys/user/queryUserRoleComponentData',
|
||||||
|
params: { departId: PARTY_COMMITTEE_DEPT_ID, roleId: SDW_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||||
|
});
|
||||||
|
const records = res?.records || res?.result?.records || [];
|
||||||
|
defaultCcUsers.value = records.sort((a, b) => (a.sortno ?? Infinity) - (b.sortno ?? Infinity));
|
||||||
|
} catch {
|
||||||
|
defaultCcUsers.value = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
subApproveUser,
|
() => showDefaultCc.value,
|
||||||
(value) => {
|
() => {
|
||||||
resolveSubApproveUserName(value);
|
if (showDefaultCc.value) {
|
||||||
|
fetchDefaultCcUsers();
|
||||||
|
} else {
|
||||||
|
defaultCcUsers.value = [];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
@@ -560,7 +586,7 @@ import {
|
|||||||
if (approveInfo && deptId && approveInfo[deptId]) {
|
if (approveInfo && deptId && approveInfo[deptId]) {
|
||||||
const detail = approveInfo[deptId];
|
const detail = approveInfo[deptId];
|
||||||
isEnd.value = detail.isEnd ?? 0;
|
isEnd.value = detail.isEnd ?? 0;
|
||||||
subApproveUser.value = detail.implWorker ?? '';
|
initFromData(detail.implWorker ?? '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -771,42 +797,6 @@ import {
|
|||||||
.join(',');
|
.join(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function resolveSubApproveUserName(value: any) {
|
|
||||||
const resolveVersion = ++userResolveVersion.value;
|
|
||||||
const usernames = normalizeUsernameList(value);
|
|
||||||
if (!usernames) {
|
|
||||||
subApproveUserNameText.value = '';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
subApproveUserNameText.value = normalizeDeptNames(usernames);
|
|
||||||
try {
|
|
||||||
const res = await getUserList({ username: usernames, isMultiTranslate: 'true', pageNo: 1, pageSize: 999 });
|
|
||||||
if (resolveVersion !== userResolveVersion.value) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const records = res?.records || res?.result?.records || res || [];
|
|
||||||
const userNameMap = Array.isArray(records)
|
|
||||||
? records.reduce((cache: Record<string, string>, item: any) => {
|
|
||||||
const username = String(item?.username || '').trim();
|
|
||||||
const realname = String(item?.realname || item?.name || '').trim();
|
|
||||||
if (username && realname) {
|
|
||||||
cache[username] = realname;
|
|
||||||
}
|
|
||||||
return cache;
|
|
||||||
}, {})
|
|
||||||
: {};
|
|
||||||
const names = usernames
|
|
||||||
.split(',')
|
|
||||||
.map((username) => userNameMap[username] || username)
|
|
||||||
.filter(Boolean);
|
|
||||||
subApproveUserNameText.value = normalizeDeptNames(names.join(','));
|
|
||||||
} catch {
|
|
||||||
if (resolveVersion === userResolveVersion.value) {
|
|
||||||
subApproveUserNameText.value = normalizeDeptNames(usernames);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleProcessSuccess() {
|
function handleProcessSuccess() {
|
||||||
emit('success');
|
emit('success');
|
||||||
|
|||||||
@@ -92,11 +92,11 @@
|
|||||||
<a-input v-model:value="formData.reportFeedbackStatus" placeholder="请输入" allow-clear></a-input>
|
<a-input v-model:value="formData.reportFeedbackStatus" placeholder="请输入" allow-clear></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<!-- <a-col :span="12">-->
|
||||||
<a-form-item label="完成状态" v-bind="validateInfos.completionStatus" id="BgXiSpeakForm-completionStatus" name="completionStatus">
|
<!-- <a-form-item label="完成状态" v-bind="validateInfos.completionStatus" id="BgXiSpeakForm-completionStatus" name="completionStatus">-->
|
||||||
<JDictSelectTag v-model:value="formData.completionStatus" dictCode="db_status" placeholder="请选择完成状态" type="radio" :stringToNumber="true" />
|
<!-- <JDictSelectTag v-model:value="formData.completionStatus" dictCode="db_status" placeholder="请选择完成状态" type="radio" :stringToNumber="true" />-->
|
||||||
</a-form-item>
|
<!-- </a-form-item>-->
|
||||||
</a-col>
|
<!-- </a-col>-->
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="截止日期" v-bind="validateInfos.deadline" id="BgXiSpeakForm-deadline" name="deadline">
|
<a-form-item label="截止日期" v-bind="validateInfos.deadline" id="BgXiSpeakForm-deadline" name="deadline">
|
||||||
<a-date-picker placeholder="请选择截止日期" v-model:value="formData.deadline" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
<a-date-picker placeholder="请选择截止日期" v-model:value="formData.deadline" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||||
@@ -107,17 +107,17 @@
|
|||||||
<a-input-number v-model:value="formData.supervisionCount" placeholder="每次发起督办流程自动加1" style="width: 100%" disabled />
|
<a-input-number v-model:value="formData.supervisionCount" placeholder="每次发起督办流程自动加1" style="width: 100%" disabled />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<!-- <a-col :span="12">-->
|
||||||
<a-form-item label="流程阶段" name="completedStage">
|
<!-- <a-form-item label="流程阶段" name="completedStage">-->
|
||||||
<a-select v-model:value="formData.completedStage" placeholder="请选择流程阶段" allow-clear>
|
<!-- <a-select v-model:value="formData.completedStage" placeholder="请选择流程阶段" allow-clear>-->
|
||||||
<a-select-option :value="0">未发起流程</a-select-option>
|
<!-- <a-select-option :value="0">未发起流程</a-select-option>-->
|
||||||
<a-select-option :value="1">正在落实措施收集流程</a-select-option>
|
<!-- <a-select-option :value="1">正在落实措施收集流程</a-select-option>-->
|
||||||
<a-select-option :value="2">落实措施收集流程结束</a-select-option>
|
<!-- <a-select-option :value="2">落实措施收集流程结束</a-select-option>-->
|
||||||
<a-select-option :value="3">正在经办人执行反馈流程</a-select-option>
|
<!-- <a-select-option :value="3">正在经办人执行反馈流程</a-select-option>-->
|
||||||
<a-select-option :value="4">经办人执行反馈流程结束</a-select-option>
|
<!-- <a-select-option :value="4">经办人执行反馈流程结束</a-select-option>-->
|
||||||
</a-select>
|
<!-- </a-select>-->
|
||||||
</a-form-item>
|
<!-- </a-form-item>-->
|
||||||
</a-col>
|
<!-- </a-col>-->
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
<a-col v-if="showFlowSubmitButton" :span="24" style="width: 100%; text-align: center; margin-top: 16px;">
|
<a-col v-if="showFlowSubmitButton" :span="24" style="width: 100%; text-align: center; margin-top: 16px;">
|
||||||
@@ -205,7 +205,7 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
|
|||||||
implMeasures: [{ required: true, message: '请输入贯彻落实措施' }],
|
implMeasures: [{ required: true, message: '请输入贯彻落实措施' }],
|
||||||
numberOfResolutions: [{ required: true, message: '请输入会议决策数' }],
|
numberOfResolutions: [{ required: true, message: '请输入会议决策数' }],
|
||||||
reportFeedbackStatus: [{ required: true, message: '请输入报告反馈情况' }],
|
reportFeedbackStatus: [{ required: true, message: '请输入报告反馈情况' }],
|
||||||
completionStatus: [{ required: true, message: '请选择完成状态' }],
|
// completionStatus: [{ required: true, message: '请选择完成状态' }],
|
||||||
deadline: [{ required: true, message: '请选择截止日期' }],
|
deadline: [{ required: true, message: '请选择截止日期' }],
|
||||||
implDept: [{ required: true, message: '请选择牵头部门' }],
|
implDept: [{ required: true, message: '请选择牵头部门' }],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -157,7 +157,7 @@
|
|||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
import SzSelectDept from '/@/components/Form/src/jeecg/components/SzSelectDept.vue';
|
import SzSelectDept from '/@/components/Form/src/jeecg/components/SzSelectDept.vue';
|
||||||
import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserModal.vue';
|
import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserModal.vue';
|
||||||
import { startProcessSchedules, getBusinessStatus } from '/@/api/common/api';
|
import { startProcessSchedules } from '/@/api/common/api';
|
||||||
import { dateUtil } from '/@/utils/dateUtil';
|
import { dateUtil } from '/@/utils/dateUtil';
|
||||||
import FlowScheduleStartModal from './components/DqInspectTaskFlowScheduleStartModal.vue';
|
import FlowScheduleStartModal from './components/DqInspectTaskFlowScheduleStartModal.vue';
|
||||||
import BusinessProcessListModal from '/src/components/semri/process/BusinessProcessListModal.vue';
|
import BusinessProcessListModal from '/src/components/semri/process/BusinessProcessListModal.vue';
|
||||||
@@ -403,24 +403,24 @@
|
|||||||
onClick: handleQueryProcess.bind(null, record),
|
onClick: handleQueryProcess.bind(null, record),
|
||||||
});
|
});
|
||||||
// if (!record.bpmStatus || record.bpmStatus == '1') {
|
// if (!record.bpmStatus || record.bpmStatus == '1') {
|
||||||
list.push({
|
// list.push({
|
||||||
text: '调整为未发起巡视整改流程状态',
|
// text: '调整为未发起巡视整改流程状态',
|
||||||
icon: 'ant-design:rollback-outlined',
|
// icon: 'ant-design:rollback-outlined',
|
||||||
event: 'adj0',
|
// event: 'adj0',
|
||||||
onClick: () => adjustCompletedStage(record, 0),
|
// onClick: () => adjustCompletedStage(record, 0),
|
||||||
});
|
// });
|
||||||
list.push({
|
// list.push({
|
||||||
text: '调整为未发起销号流程状态',
|
// text: '调整为未发起销号流程状态',
|
||||||
icon: 'ant-design:check-circle-outlined',
|
// icon: 'ant-design:check-circle-outlined',
|
||||||
event: 'adj2',
|
// event: 'adj2',
|
||||||
onClick: () => adjustCompletedStage(record, 2),
|
// onClick: () => adjustCompletedStage(record, 2),
|
||||||
});
|
// });
|
||||||
list.push({
|
// list.push({
|
||||||
text: '调整为已完成销号流程状态',
|
// text: '调整为已完成销号流程状态',
|
||||||
icon: 'ant-design:check-circle-outlined',
|
// icon: 'ant-design:check-circle-outlined',
|
||||||
event: 'adj4',
|
// event: 'adj4',
|
||||||
onClick: () => adjustCompletedStage(record, 4),
|
// onClick: () => adjustCompletedStage(record, 4),
|
||||||
});
|
// });
|
||||||
//}
|
//}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -610,30 +610,8 @@
|
|||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function refreshBusinessStatus(records) {
|
|
||||||
if (!records || records.length === 0) return;
|
|
||||||
try {
|
|
||||||
const results = await Promise.all(records.map((item) => getBusinessStatus({ businessId: item.id }).catch(() => null)));
|
|
||||||
const statusMap: Record<string, string> = {};
|
|
||||||
for (const item of results) {
|
|
||||||
if (item?.businessId) {
|
|
||||||
statusMap[item.businessId] = item.status_dictText || '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (const item of records) {
|
|
||||||
const status = statusMap[item.id];
|
|
||||||
if (status !== undefined) {
|
|
||||||
item.status_dictText = status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
// 静默处理查询异常
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onFetchSuccess(result) {
|
async function onFetchSuccess(result) {
|
||||||
if (result?.items?.length > 0) {
|
if (result?.items?.length > 0) {
|
||||||
await refreshBusinessStatus(result.items);
|
|
||||||
setTableData([...getDataSource()]);
|
setTableData([...getDataSource()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,6 +245,8 @@ import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserMod
|
|||||||
import { usePermission } from '/@/hooks/web/usePermission';
|
import { usePermission } from '/@/hooks/web/usePermission';
|
||||||
import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervision';
|
import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervision';
|
||||||
import { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
|
import { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
|
||||||
|
import { useSubApproveUserResolver } from '/@/composables/useSubApproveUserResolver';
|
||||||
|
import { buildDeptLeaderAssignReason, normalizeDeptNames } from '/@/composables/useDefaultApprovalReason';
|
||||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||||
import DqInspectTaskBPMFeedbackModal from './DqInspectTaskBPMFeedbackModal.vue';
|
import DqInspectTaskBPMFeedbackModal from './DqInspectTaskBPMFeedbackModal.vue';
|
||||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||||
@@ -279,8 +281,7 @@ import { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
|
|||||||
const showBaseInfoDetail = ref(false);
|
const showBaseInfoDetail = ref(false);
|
||||||
const showFeedbackDetail = ref(true);
|
const showFeedbackDetail = ref(true);
|
||||||
const feedbackList = ref<any[]>([]);
|
const feedbackList = ref<any[]>([]);
|
||||||
const subApproveUser = ref('');
|
const { usernames: subApproveUser, displayNames: subApproveUserNames, setDisplayNames } = useSubApproveUserResolver();
|
||||||
const subApproveUserNames = ref('');
|
|
||||||
const isEnd = ref(0);
|
const isEnd = ref(0);
|
||||||
const problemTreeData = ref<any[]>([]);
|
const problemTreeData = ref<any[]>([]);
|
||||||
const loadingProblemOptions = ref(false);
|
const loadingProblemOptions = ref(false);
|
||||||
@@ -408,6 +409,22 @@ import { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
|
|||||||
processTableName: props.formData?.processTableName,
|
processTableName: props.formData?.processTableName,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// ==================== 默认审批意见 ====================
|
||||||
|
// 仅覆盖需要动态内容(人名)的节点,其余节点走后端节点配置
|
||||||
|
const handleReasonTemplateMap: Record<string, () => string> = {
|
||||||
|
// 责任部门领导接受任务并分配
|
||||||
|
Task_1c64uvl: () => {
|
||||||
|
if (isEnd.value === 1) return '';
|
||||||
|
return buildDeptLeaderAssignReason(normalizeDeptNames(subApproveUserNames.value));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const defaultHandleReason = computed(() => {
|
||||||
|
const builder = handleReasonTemplateMap[String(processInfo.value.taskDefKey || '')];
|
||||||
|
return builder ? builder() : '';
|
||||||
|
});
|
||||||
|
|
||||||
|
provide('formDefaultReason', defaultHandleReason);
|
||||||
provide('extraVars', formScope);
|
provide('extraVars', formScope);
|
||||||
provide('flowVars', computed(() => props.formData?.vars || {}));
|
provide('flowVars', computed(() => props.formData?.vars || {}));
|
||||||
|
|
||||||
@@ -613,7 +630,7 @@ import { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onSubApproveUserConfirm(userIds: string, realnames: string) {
|
function onSubApproveUserConfirm(userIds: string, realnames: string) {
|
||||||
subApproveUserNames.value = realnames || '';
|
setDisplayNames(userIds, realnames);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveSubApproveUserVariable(options: { showSuccessMessage?: boolean } = {}) {
|
async function saveSubApproveUserVariable(options: { showSuccessMessage?: boolean } = {}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user