-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
子表数据的处理方式问题 #553
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
版本号:
3.5.1 vue3
问题描述:
在vue3的主子表默认风格下,在编辑保存数据时,子表数据的处理方式为先删除(delete)然后再新增(insert),从而造成如下比较严重而且麻烦的问题:(相关问题在#436 #364中有描述和回复)
当一个子表数据来自于其它,而本项目中想要作为某主表的附表数据,且只用于浏览查看其中部分数据(不修改)时
1、子表的每一个字段必须配置为显示,不然保存数据时库表中该字段的数据将会被清空,因为删除后重新insert时,没有配置为显示的字段将不会处理,于是只能写入null值。
2、即便子表明细数据只是浏览查看,但只要主表数据修改而确定保存时,就会把明细数据全部删除重新新增一遍。一来浪费系统资源,二来库表中原有的主键值将会全部更新,而本来这些数据就没想去动的,只是看看而已。
希望这个能予以优化。
截图&代码:
友情提示(为了提高issue处理效率):
The text was updated successfully, but these errors were encountered: