疯狂的狮子Li
2023-07-07 64b0748bf1116b3622d9144c5d4fcdb7cc9a070e
ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
@@ -145,7 +145,7 @@
      <el-form ref="${businessName}FormRef" :model="form" :rules="rules" label-width="80px">
#foreach($column in $columns)
#set($field=$column.javaField)
#if($column.insert && !$column.pk)
#if(($column.insert || $column.edit) && !$column.pk)
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
@@ -467,7 +467,7 @@
/** 提交按钮 */
const submitForm = () => {
  ${businessName}FormRef.value.validate((valid: boolean) => {
  ${businessName}FormRef.value.validate(async (valid: boolean) => {
    if (valid) {
      buttonLoading.value = true;
#foreach ($column in $columns)
@@ -476,9 +476,9 @@
#end
#end
      if (form.value.${pkColumn.javaField}) {
        update${BusinessName}(form.value).finally(() => buttonLoading.value = false);
        await update${BusinessName}(form.value).finally(() => buttonLoading.value = false);
      } else {
        add${BusinessName}(form.value).finally(() => buttonLoading.value = false);
        await add${BusinessName}(form.value).finally(() => buttonLoading.value = false);
      }
      proxy?.#[[$modal]]#.msgSuccess("操作成功");
      dialog.visible = false;