yxk-20260507-发起督办时,选择督办部门,默认是责任部门
This commit is contained in:
@@ -84,6 +84,11 @@
|
||||
const businessProcessListModalRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const processColumns = taskTaskColumns;
|
||||
|
||||
interface DeptOption {
|
||||
label: string;
|
||||
value: string;
|
||||
}
|
||||
//注册table数据
|
||||
const { tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps:{
|
||||
@@ -236,9 +241,29 @@
|
||||
flowScheduleModalRef.value?.open({
|
||||
title: '发起流程',
|
||||
payload: { record },
|
||||
deptOptions: getResponsibleDeptOptions(record),
|
||||
});
|
||||
}
|
||||
|
||||
function splitDeptValue(value) {
|
||||
if (Array.isArray(value)) {
|
||||
return value.map((item) => String(item || '').trim()).filter(Boolean);
|
||||
}
|
||||
return String(value || '')
|
||||
.split(/[,\uFF0C]/)
|
||||
.map((item) => item.trim())
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
||||
function getResponsibleDeptOptions(record): DeptOption[] {
|
||||
const deptIds = splitDeptValue(record?.responDeptid);
|
||||
const deptNames = splitDeptValue(record?.responDeptid_dictText || record?.responDeptname);
|
||||
return deptIds.map((deptId, index) => ({
|
||||
value: deptId,
|
||||
label: deptNames[index] || deptId,
|
||||
}));
|
||||
}
|
||||
|
||||
function handleQueryProcess(record) {
|
||||
businessProcessListModalRef.value?.open({
|
||||
title: '流程列表',
|
||||
@@ -272,7 +297,7 @@
|
||||
title: record.title,
|
||||
content: record.content,
|
||||
urgencyLevel: record.urgencyLevel,
|
||||
deptId: record.responDeptid,
|
||||
deptId: options.deptId || record.responDeptid,
|
||||
deptLeaderId: record.responDeptid,
|
||||
requireFinishDate: formatDate(record.deadline, 'YYYY-MM-DD'),
|
||||
deadline: formatDate(record.deadline, 'YYYY-MM-DD HH:mm:ss'),
|
||||
|
||||
Reference in New Issue
Block a user