|
|
|
|
@ -999,32 +999,14 @@ export default {
|
|
|
|
|
authGroups.push({
|
|
|
|
|
node,
|
|
|
|
|
auths,
|
|
|
|
|
authIdSet: new Set(
|
|
|
|
|
auths
|
|
|
|
|
.map((a) => String(a.department_id || ""))
|
|
|
|
|
.filter(Boolean)
|
|
|
|
|
),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const commonDepartmentIds = [...authGroups[0].authIdSet].filter((departmentId) =>
|
|
|
|
|
authGroups.every((group) => group.authIdSet.has(departmentId))
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (commonDepartmentIds.length === 0) {
|
|
|
|
|
this.selectionError = "多条预算来源不存在交叉授权科室";
|
|
|
|
|
this.$message.warning(this.selectionError);
|
|
|
|
|
this.selectedBudgetIds = [...this.lastValidBudgetIds];
|
|
|
|
|
this.setCheckedIds(this.lastValidBudgetIds);
|
|
|
|
|
this.selectionError = "";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const rows = [];
|
|
|
|
|
authGroups.forEach(({ node, auths }) => {
|
|
|
|
|
auths.forEach((a) => {
|
|
|
|
|
const departmentId = String(a.department_id || "");
|
|
|
|
|
if (!commonDepartmentIds.includes(departmentId)) return;
|
|
|
|
|
if (!departmentId) return;
|
|
|
|
|
const key = `${String(node.id)}:${departmentId}`;
|
|
|
|
|
rows.push({
|
|
|
|
|
budget_data_id: node.id,
|
|
|
|
|
|