代码生成:vue2 代码模拟格式调整

This commit is contained in:
puhui999 2023-11-27 21:05:41 +08:00
parent 6d228828f4
commit 5ebebf1579
5 changed files with 38 additions and 39 deletions

View File

@ -89,7 +89,7 @@
</template> </template>
<script> <script>
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}' import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}';
#if ($hasImageUploadColumn) #if ($hasImageUploadColumn)
import ImageUpload from '@/components/ImageUpload'; import ImageUpload from '@/components/ImageUpload';
#end #end

View File

@ -221,7 +221,7 @@
</template> </template>
<script> <script>
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}' import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}';
#if ($hasImageUploadColumn) #if ($hasImageUploadColumn)
import ImageUpload from '@/components/ImageUpload'; import ImageUpload from '@/components/ImageUpload';
#end #end

View File

@ -61,9 +61,9 @@
</template> </template>
<script> <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) #if ($table.templateType == 11)
import ${subSimpleClassName}Form from './${subSimpleClassName}Form.vue' import ${subSimpleClassName}Form from './${subSimpleClassName}Form.vue';
#end #end
export default { export default {
name: "${subSimpleClassName}List", name: "${subSimpleClassName}List",

View File

@ -107,7 +107,7 @@
</template> </template>
<script> <script>
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}' import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}';
#if ($hasImageUploadColumn) #if ($hasImageUploadColumn)
import ImageUpload from '@/components/ImageUpload'; import ImageUpload from '@/components/ImageUpload';
#end #end
@ -212,7 +212,7 @@
this.title = "新增${table.classComment}"; this.title = "新增${table.classComment}";
## 特殊:树表专属逻辑 ## 特殊:树表专属逻辑
#if ( $table.templateType == 2 ) #if ( $table.templateType == 2 )
this.get${simpleClassName}Tree(); await this.get${simpleClassName}Tree();
#end #end
}, },
/** 提交按钮 */ /** 提交按钮 */

View File

@ -1,6 +1,5 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
#foreach($column in $columns) #foreach($column in $columns)
@ -183,7 +182,7 @@ import Editor from '@/components/Editor';
#if ( $table.templateType != 10 ) #if ( $table.templateType != 10 )
#if ( $subTables && $subTables.size() > 0 ) #if ( $subTables && $subTables.size() > 0 )
#foreach ($subSimpleClassName in $subSimpleClassNames) #foreach ($subSimpleClassName in $subSimpleClassNames)
import ${subSimpleClassName}List from './components/${subSimpleClassName}List.vue' import ${subSimpleClassName}List from './components/${subSimpleClassName}List.vue';
#end #end
#end #end
#end #end
@ -298,7 +297,7 @@ export default {
await this.#[[$modal]]#.confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?') await this.#[[$modal]]#.confirm('是否确认删除${table.classComment}编号为"' + ${primaryColumn.javaField} + '"的数据项?')
try { try {
await ${simpleClassName}Api.delete${simpleClassName}(${primaryColumn.javaField}); await ${simpleClassName}Api.delete${simpleClassName}(${primaryColumn.javaField});
this.getList(); await this.getList();
this.#[[$modal]]#.msgSuccess("删除成功"); this.#[[$modal]]#.msgSuccess("删除成功");
} catch {} } catch {}
}, },