diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/form_sub_erp.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/form_sub_erp.vue.vm index eb32690b4..99aa91af1 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/form_sub_erp.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/form_sub_erp.vue.vm @@ -89,7 +89,7 @@ </template> <script> - import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}' + import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}'; #if ($hasImageUploadColumn) import ImageUpload from '@/components/ImageUpload'; #end diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/form_sub_normal.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/form_sub_normal.vue.vm index d8051d545..48a404a3b 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/form_sub_normal.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/form_sub_normal.vue.vm @@ -8,12 +8,12 @@ <div class="app-container"> #if ( $subTable.subJoinMany )## 情况一:一对多,table + form <el-form - ref="formRef" - :model="formData" - :rules="formRules" - v-loading="formLoading" - label-width="0px" - :inline-message="true" + ref="formRef" + :model="formData" + :rules="formRules" + v-loading="formLoading" + label-width="0px" + :inline-message="true" > <el-table :data="formData" class="-mt-10px"> <el-table-column label="序号" type="index" width="100" /> @@ -137,11 +137,11 @@ </el-row> #else## 情况二:一对一,form <el-form - ref="formRef" - :model="formData" - :rules="formRules" - label-width="100px" - v-loading="formLoading" + ref="formRef" + :model="formData" + :rules="formRules" + label-width="100px" + v-loading="formLoading" > #foreach($column in $subColumns) #if ($column.createOperation || $column.updateOperation) @@ -221,7 +221,7 @@ </template> <script> - import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}' + import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}'; #if ($hasImageUploadColumn) import ImageUpload from '@/components/ImageUpload'; #end diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/list_sub_erp.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/list_sub_erp.vue.vm index c08e53032..589736b6e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/list_sub_erp.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/components/list_sub_erp.vue.vm @@ -61,9 +61,9 @@ </template> <script> - import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}' + import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}'; #if ($table.templateType == 11) - import ${subSimpleClassName}Form from './${subSimpleClassName}Form.vue' + import ${subSimpleClassName}Form from './${subSimpleClassName}Form.vue'; #end export default { name: "${subSimpleClassName}List", diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/form.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/form.vue.vm index 27911acf2..634d05d3b 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/form.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/form.vue.vm @@ -12,10 +12,10 @@ #if ( $table.templateType == 2 && $column.id == $treeParentColumn.id ) <el-form-item label="${comment}" prop="${javaField}"> <TreeSelect - v-model="formData.${javaField}" - :options="${classNameVar}Tree" - :normalizer="normalizer" - placeholder="请选择${comment}" + v-model="formData.${javaField}" + :options="${classNameVar}Tree" + :normalizer="normalizer" + placeholder="请选择${comment}" /> </el-form-item> #elseif ($column.htmlType == "input" && !$column.primaryKey)## 忽略主键,不用在表单里 @@ -107,7 +107,7 @@ </template> <script> - import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}' + import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}'; #if ($hasImageUploadColumn) import ImageUpload from '@/components/ImageUpload'; #end @@ -212,7 +212,7 @@ this.title = "新增${table.classComment}"; ## 特殊:树表专属逻辑 #if ( $table.templateType == 2 ) - this.get${simpleClassName}Tree(); + await this.get${simpleClassName}Tree(); #end }, /** 提交按钮 */ @@ -263,7 +263,7 @@ this.#[[$modal]]#.msgSuccess("新增成功"); this.dialogVisible = false; this.#[[$]]#emit('success'); - }finally { + } finally { this.formLoading = false; } }, diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm index 1e55d6b16..2328007a0 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm @@ -1,6 +1,5 @@ <template> <div class="app-container"> - <!-- 搜索工作栏 --> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> #foreach($column in $columns) @@ -68,24 +67,24 @@ ## 特殊:主子表专属逻辑 #if ( $table.templateType == 11 && $subTables && $subTables.size() > 0 ) <el-table - v-loading="loading" - :data="list" - :stripe="true" - :highlight-current-row="true" - :show-overflow-tooltip="true" - @current-change="handleCurrentChange" + v-loading="loading" + :data="list" + :stripe="true" + :highlight-current-row="true" + :show-overflow-tooltip="true" + @current-change="handleCurrentChange" > ## 特殊:树表专属逻辑 #elseif ( $table.templateType == 2 ) <el-table - v-loading="loading" - :data="list" - :stripe="true" - :show-overflow-tooltip="true" - v-if="refreshTable" - row-key="id" - :default-expand-all="isExpandAll" - :tree-props="{children: 'children', hasChildren: 'hasChildren'}" + v-loading="loading" + :data="list" + :stripe="true" + :show-overflow-tooltip="true" + v-if="refreshTable" + row-key="id" + :default-expand-all="isExpandAll" + :tree-props="{children: 'children', hasChildren: 'hasChildren'}" > #else <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> @@ -183,7 +182,7 @@ import Editor from '@/components/Editor'; #if ( $table.templateType != 10 ) #if ( $subTables && $subTables.size() > 0 ) #foreach ($subSimpleClassName in $subSimpleClassNames) - import ${subSimpleClassName}List from './components/${subSimpleClassName}List.vue' + import ${subSimpleClassName}List from './components/${subSimpleClassName}List.vue'; #end #end #end @@ -298,7 +297,7 @@ export default { await this.#[[$modal]]#.confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?') try { await ${simpleClassName}Api.delete${simpleClassName}(${primaryColumn.javaField}); - this.getList(); + await this.getList(); this.#[[$modal]]#.msgSuccess("删除成功"); } catch {} },