Showing
1 changed file
with
4 additions
and
25 deletions
| ... | @@ -1118,8 +1118,9 @@ export default { | ... | @@ -1118,8 +1118,9 @@ export default { |
| 1118 | 1118 | ||
| 1119 | // 修改缓存树的字段权限 | 1119 | // 修改缓存树的字段权限 |
| 1120 | if (state.node_tree[state.detailModel?.id]) { | 1120 | if (state.node_tree[state.detailModel?.id]) { |
| 1121 | - state.node_tree[state.detailModel.id].field = _.cloneDeep(state.field_auths); | 1121 | + state.node_tree[state.detailModel.id].field_auths = _.cloneDeep(state.field_auths); |
| 1122 | } | 1122 | } |
| 1123 | + | ||
| 1123 | } | 1124 | } |
| 1124 | 1125 | ||
| 1125 | /** | 1126 | /** |
| ... | @@ -1335,7 +1336,7 @@ export default { | ... | @@ -1335,7 +1336,7 @@ export default { |
| 1335 | state.field_auths = state.node_tree[state.detailModel.id].field_auths; | 1336 | state.field_auths = state.node_tree[state.detailModel.id].field_auths; |
| 1336 | state.more_attr = state.node_tree[state.detailModel.id].property; | 1337 | state.more_attr = state.node_tree[state.detailModel.id].property; |
| 1337 | 1338 | ||
| 1338 | - // 初始化表单数据比较结构 | 1339 | + // 把表单数据同步到提交数据(后端需要的字段和表单不是一个) |
| 1339 | state.field_extend.forEach(ele => { | 1340 | state.field_extend.forEach(ele => { |
| 1340 | state.field_auths.forEach(auth => { | 1341 | state.field_auths.forEach(auth => { |
| 1341 | if (ele.field_id === auth.field_id) { | 1342 | if (ele.field_id === auth.field_id) { |
| ... | @@ -1391,17 +1392,6 @@ export default { | ... | @@ -1391,17 +1392,6 @@ export default { |
| 1391 | 1392 | ||
| 1392 | state.more_attr = data.property; // 更多属性 | 1393 | state.more_attr = data.property; // 更多属性 |
| 1393 | 1394 | ||
| 1394 | - // 初始化表单数据比较结构 | ||
| 1395 | - state.field_extend.forEach(ele => { | ||
| 1396 | - state.field_auths.forEach(auth => { | ||
| 1397 | - if (ele.field_id === auth.field_id) { | ||
| 1398 | - ele.field_extend.visibled = auth.visible.checked; | ||
| 1399 | - ele.field_extend.editabled = auth.editable.checked; | ||
| 1400 | - ele.field_extend.readonly = auth.editable.disabled; | ||
| 1401 | - } | ||
| 1402 | - }) | ||
| 1403 | - }); | ||
| 1404 | - | ||
| 1405 | editor.openModel(); | 1395 | editor.openModel(); |
| 1406 | 1396 | ||
| 1407 | // 临时保存树信息 | 1397 | // 临时保存树信息 |
| ... | @@ -1556,7 +1546,7 @@ export default { | ... | @@ -1556,7 +1546,7 @@ export default { |
| 1556 | const batchSaveForm = async () => { // 批量保存节点信息 | 1546 | const batchSaveForm = async () => { // 批量保存节点信息 |
| 1557 | for (const key in state.node_tree) { | 1547 | for (const key in state.node_tree) { |
| 1558 | const element = state.node_tree[key]; | 1548 | const element = state.node_tree[key]; |
| 1559 | - // 调整数据结构 | 1549 | + // 把表单数据同步到提交数据(后端需要的字段和表单不是一个) |
| 1560 | element.field_extend.forEach(ele => { | 1550 | element.field_extend.forEach(ele => { |
| 1561 | element.field_auths.forEach(auth => { | 1551 | element.field_auths.forEach(auth => { |
| 1562 | if (ele.field_id === auth.field_id) { | 1552 | if (ele.field_id === auth.field_id) { |
| ... | @@ -1820,17 +1810,6 @@ export default { | ... | @@ -1820,17 +1810,6 @@ export default { |
| 1820 | } | 1810 | } |
| 1821 | }); | 1811 | }); |
| 1822 | 1812 | ||
| 1823 | - // 初始化表单数据比较结构 | ||
| 1824 | - field_extend.forEach(ele => { | ||
| 1825 | - field_auths.forEach(auth => { | ||
| 1826 | - if (ele.field_id === auth.field_id) { | ||
| 1827 | - ele.field_extend.visibled = auth.visible.checked; | ||
| 1828 | - ele.field_extend.editabled = auth.editable.checked; | ||
| 1829 | - ele.field_extend.readonly = auth.editable.disabled; | ||
| 1830 | - } | ||
| 1831 | - }) | ||
| 1832 | - }); | ||
| 1833 | - | ||
| 1834 | state.node_tree[model.id] = { | 1813 | state.node_tree[model.id] = { |
| 1835 | name: node_name, | 1814 | name: node_name, |
| 1836 | user: userTags, // 开始节点没有负责人 | 1815 | user: userTags, // 开始节点没有负责人 | ... | ... |
-
Please register or login to post a comment