You need to sign in or sign up before continuing.
hookehuyr

放开数据提交功能

<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-01-09 13:47:56
* @LastEditTime: 2023-01-09 13:55:29
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
......@@ -360,20 +360,19 @@ const onSubmit = async (values) => {
postData.value = _.assign(postData.value, rest_data);
// 检查非表单输入项
if (validOther().status) {
console.warn(postData.value);
// // 编辑模式不能提交数据
// if (model === 'edit') return false;
// // 通过验证
// const result = await addFormDataAPI({
// form_code: $route.query.code,
// data: postData.value,
// });
// if (result.code) {
// showSuccessToast("提交成功");
// $router.push({
// path: "/success",
// });
// }
// 编辑模式不能提交数据
if (model === 'edit') return false;
// 通过验证
const result = await addFormDataAPI({
form_code: $route.query.code,
data: postData.value,
});
if (result.code) {
showSuccessToast("提交成功");
$router.push({
path: "/success",
});
}
} else {
console.warn(validOther().key + "不通过验证");
// // 图片上传控件报错提示
......