若衣導入多檔案和字段的問題
- ry-ui.js裡有 importExcel: 的自定義功能函數,
formData.append("file", $('#file')[0].files[0]);
formData.append("updateSupport", $("input[name='updateSupport']").is(':checked'));
是以在對應的controller裡隻能接受到單個檔案和有updateSupport變量。
2.隻需要在ry-ui.js裡加入你自己定義的id,使用layero.find 就可以找的檔案了,
3.擷取表單裡的值是用
$.form.selectSelects("camera_location"))
這是擷取下拉選擇框,别的也類似。然後使用formData.append方法,加載後面,後端就可以擷取了
4.在controller裡用 MultipartFile 類型就可以接受了