@steedos-labs/plugin-workflow 3.0.81 → 3.0.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  waitForThing(window, 'antd').then(function(){
2
- var v = '3.0.81';
2
+ var v = '3.0.82';
3
3
  loadJs('/amis-renderer/amis-renderer.js?v=' + v);
4
4
  loadCss('/amis-renderer/amis-renderer.css?v=' + v)
5
5
  })
@@ -1408,12 +1408,13 @@ UUFlowManager.getApproveValues = async function (approve_values, permissions, fo
1408
1408
  }
1409
1409
  }
1410
1410
  } else if (field.type === "table" && !field.formula && (permissions[field.code] === null || permissions[field.code] !== "editable")) {
1411
- // Handle table fields: if the table itself is not editable, check if any child has editable permission
1411
+ // 子表字段处理:子表本身无编辑权限时,检查是否有子字段具有编辑权限
1412
1412
  const childFields = field.fields || [];
1413
1413
  const hasEditableChild = childFields.some(c => permissions[c.code] === "editable");
1414
1414
  if (hasEditableChild && Array.isArray(approve_values[field.code])) {
1415
- // Keep only children that have editable permission (plus _id for row identity)
1416
- const editableChildCodes = new Set(childFields.filter(c => permissions[c.code] === "editable").map(c => c.code));
1415
+ // 保留可编辑子字段及公式子字段。公式字段为计算值(非用户输入),其结果依赖其他字段,
1416
+ // 必须随依赖字段一并持久化,否则保存后刷新会回退。与第1432行顶层字段 !field.formula 保护逻辑对称一致。
1417
+ const editableChildCodes = new Set(childFields.filter(c => c.formula || permissions[c.code] === "editable").map(c => c.code));
1417
1418
  editableChildCodes.add('_id');
1418
1419
  approve_values[field.code] = approve_values[field.code].map(row => {
1419
1420
  const filtered = {};
@@ -1425,11 +1426,11 @@ UUFlowManager.getApproveValues = async function (approve_values, permissions, fo
1425
1426
  return filtered;
1426
1427
  });
1427
1428
  } else {
1428
- // No editable children delete entire table
1429
+ // 无可编辑子字段整表删除
1429
1430
  delete approve_values[field.code];
1430
1431
  }
1431
1432
  } else if (!field.formula && (permissions[field.code] === null || permissions[field.code] !== "editable")) {
1432
- // Handle regular fields
1433
+ // 普通字段:无编辑权限且非公式字段则删除
1433
1434
  delete approve_values[field.code];
1434
1435
  }
1435
1436
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/plugin-workflow",
3
- "version": "3.0.81",
3
+ "version": "3.0.82",
4
4
  "main": "package.service.js",
5
5
  "license": "MIT",
6
6
  "files": [