mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-02-07 13:00:05 +08:00
代码生成:vue2 代码模拟格式调整
This commit is contained in:
parent
6d228828f4
commit
5ebebf1579
@ -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
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
@ -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)
|
||||
@ -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 {}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user