From f07191437e4aa859ad642b0e61c95f3ab33feb26 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 19 Mar 2023 01:17:26 +0800 Subject: [PATCH 01/27] =?UTF-8?q?=E6=94=B9=E9=80=A0=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=99=A8=EF=BC=8C=E6=94=AF=E6=8C=81=E5=A4=9A?= =?UTF-8?q?=E7=A7=8D=E5=89=8D=E7=AB=AF=E6=A8=A1=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enums/codegen/CodegenFrontTypeEnum.java | 26 +++++++++ .../codegen/config/CodegenProperties.java | 9 ++++ .../service/codegen/inner/CodegenEngine.java | 54 +++++++++++++------ .../src/main/resources/application.yaml | 1 + 4 files changed, 74 insertions(+), 16 deletions(-) create mode 100644 yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/enums/codegen/CodegenFrontTypeEnum.java diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/enums/codegen/CodegenFrontTypeEnum.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/enums/codegen/CodegenFrontTypeEnum.java new file mode 100644 index 000000000..5dfc61e26 --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/enums/codegen/CodegenFrontTypeEnum.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.infra.enums.codegen; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 代码生成的前端类型枚举 + * + * @author 芋道源码 + */ +@AllArgsConstructor +@Getter +public enum CodegenFrontTypeEnum { + + VUE2(10), // Vue2 Element UI 标准模版 + VUE3(20), // Vue3 Element Plus 标准模版 + VUE3_SCHEMA(21), // Vue3 Element Plus Schema 模版 + VUE3_VXE(22), // Vue3 VXE 模版 + ; + + /** + * 类型 + */ + private final Integer type; + +} diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/codegen/config/CodegenProperties.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/codegen/config/CodegenProperties.java index a8649dc23..d9daabb7f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/codegen/config/CodegenProperties.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/codegen/config/CodegenProperties.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.infra.framework.codegen.config; +import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.validation.annotation.Validated; @@ -25,4 +26,12 @@ public class CodegenProperties { @NotEmpty(message = "数据库不能为空") private Collection dbSchemas; + /** + * 代码生成的前端类型 + * + * 枚举 {@link CodegenFrontTypeEnum#getType()} + */ + @NotNull(message = "代码生成的前端类型不能为空") + private Integer frontType; + } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java index 85f70f8c7..20fd7e67d 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java @@ -23,9 +23,12 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenColumnDO; import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO; +import cn.iocoder.yudao.module.infra.enums.codegen.CodegenFrontTypeEnum; import cn.iocoder.yudao.module.infra.enums.codegen.CodegenSceneEnum; import cn.iocoder.yudao.module.infra.framework.codegen.config.CodegenProperties; +import com.google.common.collect.ImmutableTable; import com.google.common.collect.Maps; +import com.google.common.collect.Table; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; @@ -50,11 +53,12 @@ import static cn.hutool.core.text.CharSequenceUtil.*; public class CodegenEngine { /** - * 模板配置 + * 后端的模板配置 + * * key:模板在 resources 的地址 * value:生成的路径 */ - private static final Map TEMPLATES = MapUtil.builder(new LinkedHashMap<>()) // 有序 + private static final Map SERVER_TEMPLATES = MapUtil.builder(new LinkedHashMap<>()) // 有序 // Java module-biz Main .put(javaTemplatePath("controller/vo/baseVO"), javaModuleImplVOFilePath("BaseVO")) .put(javaTemplatePath("controller/vo/createReqVO"), javaModuleImplVOFilePath("CreateReqVO")) @@ -80,23 +84,33 @@ public class CodegenEngine { javaModuleImplTestFilePath("service/${table.businessName}/${table.className}ServiceImplTest")) // Java module-api Main .put(javaTemplatePath("enums/errorcode"), javaModuleApiMainFilePath("enums/ErrorCodeConstants_手动操作")) - // Vue2 - .put(vueTemplatePath("views/index.vue"), - vueFilePath("views/${table.moduleName}/${classNameVar}/index.vue")) - .put(vueTemplatePath("api/api.js"), - vueFilePath("api/${table.moduleName}/${classNameVar}.js")) - // Vue3 - .put(vue3TemplatePath("views/index.vue"), - vue3FilePath("views/${table.moduleName}/${classNameVar}/index.vue")) - .put(vue3TemplatePath("views/data.ts"), - vue3FilePath("views/${table.moduleName}/${classNameVar}/${classNameVar}.data.ts")) - .put(vue3TemplatePath("api/api.ts"), - vue3FilePath("api/${table.moduleName}/${classNameVar}/index.ts")) // SQL .put("codegen/sql/sql.vm", "sql/sql.sql") .put("codegen/sql/h2.vm", "sql/h2.sql") .build(); + /** + * 后端的配置模版 + * + * key1:UI 模版的类型 {@link CodegenFrontTypeEnum#getType()} + * key2:模板在 resources 的地址 + * value:生成的路径 + */ + private static final Table FRONT_TEMPLATES = ImmutableTable.builder() + // Vue2 + .put(CodegenFrontTypeEnum.VUE2.getType(), vueTemplatePath("views/index.vue"), + vueFilePath("views/${table.moduleName}/${classNameVar}/index.vue")) + .put(CodegenFrontTypeEnum.VUE2.getType(), vueTemplatePath("api/api.js"), + vueFilePath("api/${table.moduleName}/${classNameVar}.js")) + // Vue3 + .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/index.vue"), + vue3FilePath("views/${table.moduleName}/${classNameVar}/index.vue")) + .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/data.ts"), + vue3FilePath("views/${table.moduleName}/${classNameVar}/${classNameVar}.data.ts")) + .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("api/api.ts"), + vue3FilePath("api/${table.moduleName}/${classNameVar}/index.ts")) + .build(); + @Resource private CodegenProperties codegenProperties; @@ -165,8 +179,9 @@ public class CodegenEngine { bindingMap.put("permissionPrefix", table.getModuleName() + ":" + simpleClassNameStrikeCase); // 执行生成 - final Map result = Maps.newLinkedHashMapWithExpectedSize(TEMPLATES.size()); // 有序 - TEMPLATES.forEach((vmPath, filePath) -> { + Map templates = getTemplates(); + Map result = Maps.newLinkedHashMapWithExpectedSize(templates.size()); // 有序 + templates.forEach((vmPath, filePath) -> { filePath = formatFilePath(filePath, bindingMap); String content = templateEngine.getTemplate(vmPath).render(bindingMap); result.put(filePath, content); @@ -174,6 +189,13 @@ public class CodegenEngine { return result; } + private Map getTemplates() { + Map templates = new LinkedHashMap<>(); + templates.putAll(SERVER_TEMPLATES); + templates.putAll(FRONT_TEMPLATES.row(codegenProperties.getFrontType())); + return templates; + } + private String formatFilePath(String filePath, Map bindingMap) { filePath = StrUtil.replace(filePath, "${basePackage}", getStr(bindingMap, "basePackage").replaceAll("\\.", "/")); diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 6b2a08a01..6dfe1d86c 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -125,6 +125,7 @@ yudao: codegen: base-package: ${yudao.info.base-package} db-schemas: ${spring.datasource.dynamic.datasource.master.name} + front-type: 20 error-code: # 错误码相关配置项 constants-class-list: - cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants From d15995e7f9ed2eb0b16023df89cba7f2364bd973 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 19 Mar 2023 20:57:55 +0800 Subject: [PATCH 02/27] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=EF=BC=9A=E6=94=AF=E6=8C=81=20Vue3=20=E6=A0=87=E5=87=86?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E7=9A=84=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/codegen/inner/CodegenEngine.java | 4 +- .../main/resources/codegen/vue3/api/api.ts.vm | 41 +-- .../resources/codegen/vue3/views/form.vue.vm | 165 +++++++++ .../resources/codegen/vue3/views/index.vue.vm | 348 +++++++++++------- .../resources/codegen/vue3_vxe/api/api.ts.vm | 74 ++++ .../{vue3 => vue3_vxe}/views/data.ts.vm | 0 .../codegen/vue3_vxe/views/index.vue.vm | 160 ++++++++ 7 files changed, 616 insertions(+), 176 deletions(-) create mode 100644 yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm create mode 100644 yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/api/api.ts.vm rename yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/{vue3 => vue3_vxe}/views/data.ts.vm (100%) create mode 100644 yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/index.vue.vm diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java index 20fd7e67d..258dceb3c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java @@ -105,8 +105,8 @@ public class CodegenEngine { // Vue3 .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/index.vue"), vue3FilePath("views/${table.moduleName}/${classNameVar}/index.vue")) - .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/data.ts"), - vue3FilePath("views/${table.moduleName}/${classNameVar}/${classNameVar}.data.ts")) +// .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/data.ts"), +// vue3FilePath("views/${table.moduleName}/${classNameVar}/${classNameVar}.data.ts")) .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("api/api.ts"), vue3FilePath("api/${table.moduleName}/${classNameVar}/index.ts")) .build(); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm index df49a002b..eaab40703 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm @@ -14,61 +14,32 @@ export interface ${simpleClassName}VO { #end } -export interface ${simpleClassName}PageReqVO extends PageParam { -#foreach ($column in $columns) -#if (${column.listOperation})##查询操作 -#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") - ${column.javaField}?: number -#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime") - ${column.javaField}?: Date[] -#else - ${column.javaField}?: ${column.javaType.toLowerCase()} -#end -#end -#end -} - -export interface ${simpleClassName}ExcelReqVO { -#foreach ($column in $columns) -#if (${column.listOperation})##查询操作 -#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") - ${column.javaField}?: number -#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime") - ${column.javaField}?: Date[] -#else - ${column.javaField}?: ${column.javaType.toLowerCase()} -#end -#end -#end -} -#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") - // 查询${table.classComment}列表 -export const get${simpleClassName}PageApi = async (params: ${simpleClassName}PageReqVO) => { +export const get${simpleClassName}Page = async (params: ${simpleClassName}PageReqVO) => { return await request.get({ url: '${baseURL}/page', params }) } // 查询${table.classComment}详情 -export const get${simpleClassName}Api = async (id: number) => { +export const get${simpleClassName} = async (id: number) => { return await request.get({ url: '${baseURL}/get?id=' + id }) } // 新增${table.classComment} -export const create${simpleClassName}Api = async (data: ${simpleClassName}VO) => { +export const create${simpleClassName} = async (data: ${simpleClassName}VO) => { return await request.post({ url: '${baseURL}/create', data }) } // 修改${table.classComment} -export const update${simpleClassName}Api = async (data: ${simpleClassName}VO) => { +export const update${simpleClassName} = async (data: ${simpleClassName}VO) => { return await request.put({ url: '${baseURL}/update', data }) } // 删除${table.classComment} -export const delete${simpleClassName}Api = async (id: number) => { +export const delete${simpleClassName} = async (id: number) => { return await request.delete({ url: '${baseURL}/delete?id=' + id }) } // 导出${table.classComment} Excel -export const export${simpleClassName}Api = async (params: ${simpleClassName}ExcelReqVO) => { +export const export${simpleClassName}Api = async (params) => { return await request.download({ url: '${baseURL}/export-excel', params }) } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm new file mode 100644 index 000000000..366fcb86b --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm @@ -0,0 +1,165 @@ + + + + #foreach($column in $columns) + #if ($column.createOperation || $column.updateOperation) + #set ($dictType = $column.dictType) + #set ($javaField = $column.javaField) + #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) + #set ($comment = $column.columnComment) + #if ($column.htmlType == "input") + #if (!$column.primaryKey)## 忽略主键,不用在表单里 + + + + #end + #elseif($column.htmlType == "imageUpload")## 图片上传 + #set ($hasImageUploadColumn = true) + + + + #elseif($column.htmlType == "fileUpload")## 文件上传 + #set ($hasFileUploadColumn = true) + + + + #elseif($column.htmlType == "editor")## 文本编辑器 + #set ($hasEditorColumn = true) + + + + #elseif($column.htmlType == "select")## 下拉框 + + + #if ("" != $dictType)## 有数据字典 + + #else##没数据字典 + + #end + + + #elseif($column.htmlType == "checkbox")## 多选框 + + + #if ("" != $dictType)## 有数据字典 + {{dict.label}} + #else##没数据字典 + 请选择字典生成 + #end + + + #elseif($column.htmlType == "radio")## 单选框 + + + #if ("" != $dictType)## 有数据字典 + {{dict.label}} + #else##没数据字典 + 请选择字典生成 + #end + + + #elseif($column.htmlType == "datetime")## 时间框 + + + + #elseif($column.htmlType == "textarea")## 文本框 + + + + #end + #end + #end + + + + + +// 弹出层标题 +title: "", +// 是否显示弹出层 +open: false, + +// 表单参数 +form: {}, +// 表单校验 +rules: { +#foreach ($column in $columns) + #if (($column.createOperation || $column.updateOperation) && !$column.nullable && !${column.primaryKey})## 创建或者更新操作 && 要求非空 && 非主键 + #set($comment=$column.columnComment) + $column.javaField: [{ required: true, message: "${comment}不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }], + #end +#end +} + + +/** 表单重置 */ +reset() { +this.form = { +#foreach ($column in $columns) + #if ($column.createOperation || $column.updateOperation) + #if ($column.htmlType == "checkbox") + $column.javaField: [], + #else + $column.javaField: undefined, + #end + #end +#end +}; +this.resetForm("form"); +}, + +/** 新增按钮操作 */ +handleAdd() { +this.reset(); +this.open = true; +this.title = "添加${table.classComment}"; +}, +/** 修改按钮操作 */ +handleUpdate(row) { +this.reset(); +const ${primaryColumn.javaField} = row.${primaryColumn.javaField}; +get${simpleClassName}(${primaryColumn.javaField}).then(response => { +this.form = response.data; +#foreach ($column in $columns) + #if($column.htmlType == "checkbox")## checkbox 特殊处理 + this.form.$column.javaField = this.form.${column.javaField}.split(","); + #end +#end +this.open = true; +this.title = "修改${table.classComment}"; +}); +}, +/** 提交按钮 */ +submitForm() { +this.#[[$]]#refs["form"].validate(valid => { +if (!valid) { +return; +} +#foreach ($column in $columns) +#if($column.htmlType == "checkbox") +this.form.$column.javaField = this.form.${column.javaField}.join(","); +#end +#end +// 修改的提交 +if (this.form.${primaryColumn.javaField} != null) { +update${simpleClassName}(this.form).then(response => { +this.#[[$modal]]#.msgSuccess("修改成功"); +this.open = false; +this.getList(); +}); +return; +} +// 添加的提交 +create${simpleClassName}(this.form).then(response => { +this.#[[$modal]]#.msgSuccess("新增成功"); +this.open = false; +this.getList(); +}); +}); +}, diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm index 389458c51..73f35856a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm @@ -1,160 +1,230 @@ + diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/api/api.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/api/api.ts.vm new file mode 100644 index 000000000..df49a002b --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/api/api.ts.vm @@ -0,0 +1,74 @@ +import request from '@/config/axios' + +export interface ${simpleClassName}VO { +#foreach ($column in $columns) +#if ($column.createOperation || $column.updateOperation) +#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") + ${column.javaField}: number +#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime") + ${column.javaField}: Date +#else + ${column.javaField}: ${column.javaType.toLowerCase()} +#end +#end +#end +} + +export interface ${simpleClassName}PageReqVO extends PageParam { +#foreach ($column in $columns) +#if (${column.listOperation})##查询操作 +#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") + ${column.javaField}?: number +#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime") + ${column.javaField}?: Date[] +#else + ${column.javaField}?: ${column.javaType.toLowerCase()} +#end +#end +#end +} + +export interface ${simpleClassName}ExcelReqVO { +#foreach ($column in $columns) +#if (${column.listOperation})##查询操作 +#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") + ${column.javaField}?: number +#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime") + ${column.javaField}?: Date[] +#else + ${column.javaField}?: ${column.javaType.toLowerCase()} +#end +#end +#end +} +#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") + +// 查询${table.classComment}列表 +export const get${simpleClassName}PageApi = async (params: ${simpleClassName}PageReqVO) => { + return await request.get({ url: '${baseURL}/page', params }) +} + +// 查询${table.classComment}详情 +export const get${simpleClassName}Api = async (id: number) => { + return await request.get({ url: '${baseURL}/get?id=' + id }) +} + +// 新增${table.classComment} +export const create${simpleClassName}Api = async (data: ${simpleClassName}VO) => { + return await request.post({ url: '${baseURL}/create', data }) +} + +// 修改${table.classComment} +export const update${simpleClassName}Api = async (data: ${simpleClassName}VO) => { + return await request.put({ url: '${baseURL}/update', data }) +} + +// 删除${table.classComment} +export const delete${simpleClassName}Api = async (id: number) => { + return await request.delete({ url: '${baseURL}/delete?id=' + id }) +} + +// 导出${table.classComment} Excel +export const export${simpleClassName}Api = async (params: ${simpleClassName}ExcelReqVO) => { + return await request.download({ url: '${baseURL}/export-excel', params }) +} diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/data.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/data.ts.vm similarity index 100% rename from yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/data.ts.vm rename to yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/data.ts.vm diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/index.vue.vm new file mode 100644 index 000000000..389458c51 --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/index.vue.vm @@ -0,0 +1,160 @@ + + From eb2e33f318b6aa74c3896e378eec1ca0f71550bf Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 20 Mar 2023 22:57:08 +0800 Subject: [PATCH 03/27] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=EF=BC=9A=E5=AE=8C=E5=96=84=20Vue3=20=E6=A0=87=E5=87=86?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E7=9A=84=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/codegen/vue3/views/index.vue.vm | 48 ++++++++++++++++--- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm index 73f35856a..dc071f212 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm @@ -1,11 +1,19 @@ diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm index 5622d7895..9a57c83f9 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm @@ -92,7 +92,7 @@ 搜索 重置 - #if ($permissionPrefix <= 14) + #if ($permissionPrefix.length() < 15) #else Date: Wed, 22 Mar 2023 20:50:09 +0800 Subject: [PATCH 06/27] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=EF=BC=9A=E5=AE=8C=E5=96=84=20Vue3=20=E6=A0=87=E5=87=86?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E7=9A=84=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/codegen/inner/CodegenEngine.java | 13 +++-- .../resources/codegen/vue3/views/form.vue.vm | 58 ++++++++++--------- .../resources/codegen/vue3/views/index.vue.vm | 21 ++++--- 3 files changed, 52 insertions(+), 40 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java index 94eab36b1..b41821b80 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java @@ -97,20 +97,21 @@ public class CodegenEngine { * value:生成的路径 */ private static final Table FRONT_TEMPLATES = ImmutableTable.builder() - // Vue2 + // Vue2 标准模版 .put(CodegenFrontTypeEnum.VUE2.getType(), vueTemplatePath("views/index.vue"), vueFilePath("views/${table.moduleName}/${classNameVar}/index.vue")) .put(CodegenFrontTypeEnum.VUE2.getType(), vueTemplatePath("api/api.js"), vueFilePath("api/${table.moduleName}/${classNameVar}.js")) - // Vue3 + // Vue3 标准模版 .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/index.vue"), vue3FilePath("views/${table.moduleName}/${classNameVar}/index.vue")) .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/form.vue"), - vue3FilePath("views/${table.moduleName}/${classNameVar}/form.vue")) -// .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/data.ts"), -// vue3FilePath("views/${table.moduleName}/${classNameVar}/${classNameVar}.data.ts")) + vue3FilePath("views/${table.moduleName}/${classNameVar}/${simpleClassName}Form.vue")) .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("api/api.ts"), vue3FilePath("api/${table.moduleName}/${classNameVar}/index.ts")) + // Vue3 Schema 模版 +// .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/data.ts"), +// vue3FilePath("views/${table.moduleName}/${classNameVar}/${classNameVar}.data.ts")) .build(); @Resource @@ -203,6 +204,8 @@ public class CodegenEngine { getStr(bindingMap, "basePackage").replaceAll("\\.", "/")); filePath = StrUtil.replace(filePath, "${classNameVar}", getStr(bindingMap, "classNameVar")); + filePath = StrUtil.replace(filePath, "${simpleClassName}", + getStr(bindingMap, "simpleClassName")); // sceneEnum 包含的字段 CodegenSceneEnum sceneEnum = (CodegenSceneEnum) bindingMap.get("sceneEnum"); filePath = StrUtil.replace(filePath, "${sceneEnum.prefixClass}", sceneEnum.getPrefixClass()); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm index 8209c92c3..690d7cf72 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm @@ -27,17 +27,17 @@ - #elseif($column.htmlType == "imageUpload")## 图片上传 TODO 芋艿:待测试 + #elseif($column.htmlType == "imageUpload")## 图片上传 #set ($hasImageUploadColumn = true) - - - - #elseif($column.htmlType == "fileUpload")## 文件上传 TODO 芋艿:待测试 + + + + #elseif($column.htmlType == "fileUpload")## 文件上传 #set ($hasFileUploadColumn = true) - - - - #elseif($column.htmlType == "editor")## 文本编辑器 TODO 芋艿:待测试 + + + + #elseif($column.htmlType == "editor")## 文本编辑器 @@ -59,19 +59,20 @@ #end - #elseif($column.htmlType == "checkbox")## 多选框 TODO 芋艿:待测试 + #elseif($column.htmlType == "checkbox")## 多选框 #if ("" != $dictType)## 有数据字典 #if (!$dictMethods.contains($dictMethod))## 如果不存在,则添加到 dictMethods 数组中,后续好 import #set($ignore = $dictMethods.add($dictMethod) ) #end - - {{dict.label}} - + + {{ dict.label }} + #else##没数据字典 请选择字典生成 #end @@ -96,14 +97,19 @@ #end - #elseif($column.htmlType == "datetime")## 时间框 TODO 芋艿:待测试 - - - - #elseif($column.htmlType == "textarea")## 文本框 TODO 芋艿:待测试 - - - + #elseif($column.htmlType == "datetime")## 时间框 + + + + #elseif($column.htmlType == "textarea")## 文本框 + + + #end #end #end @@ -163,7 +169,7 @@ const formRules = reactive({ const formRef = ref() // 表单 Ref /** 打开弹窗 */ -const openModal = async (type: string, id?: number) => { +const open = async (type: string, id?: number) => { modelVisible.value = true modelTitle.value = t('action.' + type) formType.value = type @@ -178,7 +184,7 @@ const openModal = async (type: string, id?: number) => { } } } -defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗 +defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm index 9a57c83f9..1d9158f71 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm @@ -92,12 +92,12 @@ 搜索 重置 - #if ($permissionPrefix.length() < 15) - + #if ($permissionPrefix.length() <= 12) + #else #end @@ -148,7 +148,7 @@ 编辑 @@ -172,6 +172,9 @@ @pagination="getList" /> + + + <${simpleClassName}Form ref="formRef" @success="getList" /> diff --git a/yudao-ui-admin/src/views/infra/redis/index.vue b/yudao-ui-admin/src/views/infra/redis/index.vue index 63be640bc..38e1cf823 100644 --- a/yudao-ui-admin/src/views/infra/redis/index.vue +++ b/yudao-ui-admin/src/views/infra/redis/index.vue @@ -65,77 +65,11 @@ - - - - - - - - - - - - - - - - -
- 键名列表 - -
- - - - - - - - -
-
- - - -
- 缓存内容 - 清理全部 -
- - - - - - - - - - - - - - -
-
-
-
diff --git a/yudao-ui-admin/src/views/infra/server/index.vue b/yudao-ui-admin/src/views/infra/server/index.vue index 7a5570cc2..409bd7325 100644 --- a/yudao-ui-admin/src/views/infra/server/index.vue +++ b/yudao-ui-admin/src/views/infra/server/index.vue @@ -1,18 +1,30 @@ diff --git a/yudao-ui-admin/src/views/infra/skywalking/index.vue b/yudao-ui-admin/src/views/infra/skywalking/index.vue index 4628d619d..6f5e7dc7f 100644 --- a/yudao-ui-admin/src/views/infra/skywalking/index.vue +++ b/yudao-ui-admin/src/views/infra/skywalking/index.vue @@ -1,18 +1,30 @@ diff --git a/yudao-ui-admin/src/views/infra/swagger/index.vue b/yudao-ui-admin/src/views/infra/swagger/index.vue index 3cf0d8ab3..0558fa694 100644 --- a/yudao-ui-admin/src/views/infra/swagger/index.vue +++ b/yudao-ui-admin/src/views/infra/swagger/index.vue @@ -1,19 +1,31 @@ From adb8b589675628d063aa8c02ec83ecddc39277b5 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 8 Apr 2023 11:49:28 +0800 Subject: [PATCH 10/27] =?UTF-8?q?=E6=89=80=E6=9C=89=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=9A=84=20name=20=E9=83=BD=E5=8A=A0=E4=B8=8A=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E5=89=8D=E7=BC=80=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/src/router/index.js | 28 +++++++++---------- .../src/views/bpm/definition/index.vue | 2 +- yudao-ui-admin/src/views/bpm/form/index.vue | 6 ++-- yudao-ui-admin/src/views/bpm/group/index.vue | 2 +- yudao-ui-admin/src/views/bpm/model/index.vue | 6 ++-- .../src/views/bpm/model/modelEditor.vue | 2 +- .../src/views/bpm/oa/leave/create.vue | 2 +- .../src/views/bpm/oa/leave/detail.vue | 2 +- .../src/views/bpm/oa/leave/index.vue | 8 +++--- .../src/views/bpm/processInstance/index.vue | 6 ++-- yudao-ui-admin/src/views/bpm/task/done.vue | 4 +-- yudao-ui-admin/src/views/bpm/task/todo.vue | 4 +-- .../taskAssignRule/taskAssignRuleDialog.vue | 2 +- .../src/views/infra/apiAccessLog/index.vue | 2 +- .../src/views/infra/apiErrorLog/index.vue | 2 +- .../src/views/infra/build/index.vue | 1 + .../src/views/infra/codegen/index.vue | 2 +- .../src/views/infra/config/index.vue | 2 +- .../views/infra/dataSourceConfig/index.vue | 2 +- .../src/views/infra/dbDoc/index.vue | 2 +- yudao-ui-admin/src/views/infra/file/index.vue | 2 +- .../src/views/infra/fileConfig/index.vue | 2 +- yudao-ui-admin/src/views/infra/job/index.vue | 2 +- yudao-ui-admin/src/views/infra/job/log.vue | 2 +- .../src/views/infra/redis/index.vue | 2 +- .../src/views/infra/server/index.vue | 2 +- .../src/views/infra/skywalking/index.vue | 2 +- .../src/views/infra/swagger/index.vue | 2 +- .../src/views/mall/product/property/index.vue | 2 +- .../src/views/mall/product/property/value.vue | 2 +- .../src/views/mall/product/spu/index.vue | 6 ++-- .../src/views/mall/product/spu/save.vue | 2 +- .../src/views/mall/promotion/coupon/index.vue | 2 +- .../mall/promotion/couponTemplate/index.vue | 2 +- .../mall/promotion/discountActivity/index.vue | 2 +- .../mall/promotion/rewardActivity/index.vue | 2 +- .../seckill/seckillActivity/index.vue | 2 +- .../promotion/seckill/seckillTime/index.vue | 2 +- .../src/views/mall/trade/afterSale/index.vue | 2 +- .../src/views/mall/trade/order/detail.vue | 2 +- .../src/views/mall/trade/order/index.vue | 4 +-- yudao-ui-admin/src/views/pay/app/index.vue | 2 +- .../src/views/pay/merchant/index.vue | 2 +- yudao-ui-admin/src/views/pay/refund/index.vue | 2 +- .../src/views/system/area/index.vue | 2 +- .../src/views/system/dept/index.vue | 2 +- yudao-ui-admin/src/views/system/dict/data.vue | 2 +- .../src/views/system/dict/index.vue | 2 +- .../src/views/system/errorCode/index.vue | 2 +- .../src/views/system/loginlog/index.vue | 2 +- .../src/views/system/mail/account/index.vue | 2 +- .../src/views/system/mail/log/index.vue | 2 +- .../src/views/system/mail/template/index.vue | 2 +- .../src/views/system/menu/index.vue | 2 +- .../src/views/system/notice/index.vue | 2 +- .../src/views/system/notify/message/index.vue | 2 +- .../src/views/system/notify/my/index.vue | 2 +- .../views/system/notify/template/index.vue | 2 +- .../src/views/system/oauth2/client/index.vue | 2 +- .../src/views/system/oauth2/token/index.vue | 2 +- .../src/views/system/operatelog/index.vue | 2 +- .../src/views/system/post/index.vue | 2 +- .../src/views/system/role/index.vue | 2 +- .../src/views/system/sensitiveWord/index.vue | 2 +- .../src/views/system/sms/channel/index.vue | 2 +- .../src/views/system/sms/log/index.vue | 2 +- .../src/views/system/sms/template/index.vue | 2 +- .../src/views/system/tenant/index.vue | 2 +- .../src/views/system/tenantPackage/index.vue | 2 +- .../src/views/system/user/index.vue | 2 +- 70 files changed, 97 insertions(+), 96 deletions(-) diff --git a/yudao-ui-admin/src/router/index.js b/yudao-ui-admin/src/router/index.js index d38e6c42d..1d64f59bc 100644 --- a/yudao-ui-admin/src/router/index.js +++ b/yudao-ui-admin/src/router/index.js @@ -100,7 +100,7 @@ export const constantRoutes = [ children: [{ path: 'type/data/:dictId(\\d+)', component: (resolve) => require(['@/views/system/dict/data'], resolve), - name: 'Data', + name: 'SystemDictData', meta: {title: '字典数据', icon: '', activeMenu: '/system/dict'} } ] @@ -112,7 +112,7 @@ export const constantRoutes = [ children: [{ path: 'log', component: (resolve) => require(['@/views/infra/job/log'], resolve), - name: 'JobLog', + name: 'InfraJobLog', meta: {title: '调度日志', activeMenu: '/infra/job'} } ] @@ -123,7 +123,7 @@ export const constantRoutes = [ children: [{ path: 'edit/:tableId(\\d+)', component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve), - name: 'GenEdit', + name: 'InfraCodegenEditTable', meta: {title: '修改生成配置', activeMenu: '/infra/codegen'} } ] @@ -136,12 +136,12 @@ export const constantRoutes = [ children: [{ path: 'oa/leave/create', component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve), - name: '发起 OA 请假', + name: 'BpmOALeaveCreate', meta: {title: '发起 OA 请假', icon: 'form', activeMenu: '/bpm/oa/leave'} }, { path: 'oa/leave/detail', component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve), - name: '查看 OA 请假', + name: 'BpmOALeaveDetail', meta: {title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave'} } ] @@ -153,27 +153,27 @@ export const constantRoutes = [ children: [{ path: 'manager/form/edit', component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve), - name: '流程表单-编辑', + name: 'BpmFormEditor', meta: {title: '流程表单-编辑', activeMenu: '/bpm/manager/form'} }, { path: 'manager/definition', component: (resolve) => require(['@/views/bpm/definition/index'], resolve), - name: '流程定义', + name: 'BpmProcessDefinition', meta: {title: '流程定义', activeMenu: '/bpm/manager/model'} }, { path: 'manager/model/design', component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve), - name: '设计流程', + name: 'BpmModelEditor', meta: {title: '设计流程', activeMenu: '/bpm/manager/model'} }, { path: 'process-instance/create', component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve), - name: '发起流程', + name: 'BpmProcessInstanceCreate', meta: {title: '发起流程', activeMenu: '/bpm/task/my'} }, { path: 'process-instance/detail', component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve), - name: '流程详情', + name: 'BpmProcessInstanceDetail', meta: {title: '流程详情', activeMenu: '/bpm/task/my'} } ] @@ -185,7 +185,7 @@ export const constantRoutes = [ children: [{ path: 'value/:propertyId(\\d+)', component: (resolve) => require(['@/views/mall/product/property/value'], resolve), - name: 'PropertyValue', + name: 'ProductPropertyValue', meta: {title: '商品属性值', icon: '', activeMenu: '/product/property'} } ] @@ -197,13 +197,13 @@ export const constantRoutes = [ children: [{ path: 'edit/:spuId(\\d+)', component: (resolve) => require(['@/views/mall/product/spu/save'], resolve), - name: 'SpuEdit', + name: 'ProductSpuUpdate', meta: {title: '修改商品', activeMenu: '/product/spu'} }, { path: 'add', component: (resolve) => require(['@/views/mall/product/spu/save'], resolve), - name: 'SpuAdd', + name: 'ProductSpuCreate', meta: {title: '添加商品', activeMenu: '/product/spu'} } ] @@ -215,7 +215,7 @@ export const constantRoutes = [ children: [ { path: 'detail', - name: '订单详情', + name: 'TradeOrderDetail', hidden: true, meta: { title: '订单详情' }, component: (resolve) => require(['@/views/mall/trade/order/detail'], resolve) diff --git a/yudao-ui-admin/src/views/bpm/definition/index.vue b/yudao-ui-admin/src/views/bpm/definition/index.vue index 0ef67b2a3..dc992545f 100644 --- a/yudao-ui-admin/src/views/bpm/definition/index.vue +++ b/yudao-ui-admin/src/views/bpm/definition/index.vue @@ -81,7 +81,7 @@ import Parser from '@/components/parser/Parser' import taskAssignRuleDialog from "../taskAssignRule/taskAssignRuleDialog"; export default { - name: "processDefinition", + name: "BpmProcessDefinition", components: { Parser, taskAssignRuleDialog diff --git a/yudao-ui-admin/src/views/bpm/form/index.vue b/yudao-ui-admin/src/views/bpm/form/index.vue index db730abde..f9bcb7264 100644 --- a/yudao-ui-admin/src/views/bpm/form/index.vue +++ b/yudao-ui-admin/src/views/bpm/form/index.vue @@ -67,7 +67,7 @@ import Parser from '@/components/parser/Parser' import {decodeFields} from "@/utils/formGenerator"; export default { - name: "Form", + name: "BpmForm", components: { Parser }, @@ -134,13 +134,13 @@ export default { /** 新增按钮操作 */ handleAdd() { this.$router.push({ - path:"/bpm/manager/form/edit" + name: "BpmFormEditor" }); }, /** 修改按钮操作 */ handleUpdate(row) { this.$router.push({ - path:"/bpm/manager/form/edit", + name: "BpmFormEditor", query:{ formId: row.id } diff --git a/yudao-ui-admin/src/views/bpm/group/index.vue b/yudao-ui-admin/src/views/bpm/group/index.vue index ffb3f2046..6c23a947f 100644 --- a/yudao-ui-admin/src/views/bpm/group/index.vue +++ b/yudao-ui-admin/src/views/bpm/group/index.vue @@ -102,7 +102,7 @@ import {CommonStatusEnum} from "@/utils/constants"; import {listSimpleUsers} from "@/api/system/user"; export default { - name: "UserGroup", + name: "BpmUserGroup", components: { }, data() { diff --git a/yudao-ui-admin/src/views/bpm/model/index.vue b/yudao-ui-admin/src/views/bpm/model/index.vue index fbb580fe3..e80b96429 100644 --- a/yudao-ui-admin/src/views/bpm/model/index.vue +++ b/yudao-ui-admin/src/views/bpm/model/index.vue @@ -233,7 +233,7 @@ import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; export default { - name: "model", + name: "BpmModel", components: { Parser, Treeselect, @@ -380,7 +380,7 @@ export default { /** 设计按钮操作 */ handleDesign(row) { this.$router.push({ - path:"/bpm/manager/model/design", + name: "BpmModelEditor", query:{ modelId: row.id } @@ -473,7 +473,7 @@ export default { /** 跳转流程定义的列表 */ handleDefinitionList(row) { this.$router.push({ - path:"/bpm/manager/definition", + name: "BpmProcessDefinition", query:{ key: row.key } diff --git a/yudao-ui-admin/src/views/bpm/model/modelEditor.vue b/yudao-ui-admin/src/views/bpm/model/modelEditor.vue index 91be300a7..78e78d317 100644 --- a/yudao-ui-admin/src/views/bpm/model/modelEditor.vue +++ b/yudao-ui-admin/src/views/bpm/model/modelEditor.vue @@ -26,7 +26,7 @@ import {createModel, getModel, updateModel} from "@/api/bpm/model"; // import MyProcessPanel from "../package/process-panel/ProcessPanel"; export default { - name: "App", + name: "BpmModelEditor", components: { MyProcessPalette }, data() { return { diff --git a/yudao-ui-admin/src/views/bpm/oa/leave/create.vue b/yudao-ui-admin/src/views/bpm/oa/leave/create.vue index 14b6ed566..3ac54173c 100644 --- a/yudao-ui-admin/src/views/bpm/oa/leave/create.vue +++ b/yudao-ui-admin/src/views/bpm/oa/leave/create.vue @@ -30,7 +30,7 @@ import { createLeave} from "@/api/bpm/leave" import { getDictDatas, DICT_TYPE } from '@/utils/dict' export default { - name: "LeaveCreate", + name: "BpmOALeaveCreate", components: { }, data() { diff --git a/yudao-ui-admin/src/views/bpm/oa/leave/detail.vue b/yudao-ui-admin/src/views/bpm/oa/leave/detail.vue index 1e1e464fa..0436b02fc 100644 --- a/yudao-ui-admin/src/views/bpm/oa/leave/detail.vue +++ b/yudao-ui-admin/src/views/bpm/oa/leave/detail.vue @@ -16,7 +16,7 @@ import { getLeave} from "@/api/bpm/leave" import {getDictDatas, DICT_TYPE} from '@/utils/dict' export default { - name: "LeaveDetail", + name: "BpmOALeaveDetail", components: { }, data() { diff --git a/yudao-ui-admin/src/views/bpm/oa/leave/index.vue b/yudao-ui-admin/src/views/bpm/oa/leave/index.vue index 8a2f01eef..49d5d21f0 100644 --- a/yudao-ui-admin/src/views/bpm/oa/leave/index.vue +++ b/yudao-ui-admin/src/views/bpm/oa/leave/index.vue @@ -89,7 +89,7 @@ import { getDictDatas, DICT_TYPE } from '@/utils/dict' import {cancelProcessInstance} from "@/api/bpm/processInstance"; export default { - name: "Leave", + name: "BpmOALeave", components: { }, data() { @@ -142,15 +142,15 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.$router.push({ path: "/bpm/oa/leave/create"}); + this.$router.push({ name: "BpmOALeaveCreate"}); }, /** 详情按钮操作 */ handleDetail(row) { - this.$router.push({ path: "/bpm/oa/leave/detail", query: { id: row.id}}); + this.$router.push({ name: "BpmOALeaveDetail", query: { id: row.id}}); }, /** 查看审批进度的操作 */ handleProcessDetail(row) { - this.$router.push({ path: "/bpm/process-instance/detail", query: { id: row.processInstanceId}}); + this.$router.push({ name: "BpmProcessInstanceDetail", query: { id: row.processInstanceId}}); }, /** 取消请假 */ handleCancel(row) { diff --git a/yudao-ui-admin/src/views/bpm/processInstance/index.vue b/yudao-ui-admin/src/views/bpm/processInstance/index.vue index b15751325..4e681ac24 100644 --- a/yudao-ui-admin/src/views/bpm/processInstance/index.vue +++ b/yudao-ui-admin/src/views/bpm/processInstance/index.vue @@ -103,7 +103,7 @@ import { getMyProcessInstancePage, cancelProcessInstance } from "@/api/bpm/processInstance"; export default { - name: "ProcessInstance", + name: "BpmProcessInstance", components: { }, data() { @@ -155,7 +155,7 @@ export default { }, /** 新增按钮操作 **/ handleAdd() { - this.$router.push({ path: "/bpm/process-instance/create"}) + this.$router.push({ name: "BpmProcessInstanceCreate"}) }, /** 取消按钮操作 */ handleCancel(row) { @@ -175,7 +175,7 @@ export default { }, /** 处理详情按钮 */ handleDetail(row) { - this.$router.push({ path: "/bpm/process-instance/detail", query: { id: row.id}}); + this.$router.push({ name: "BpmProcessInstanceDetail", query: { id: row.id}}); }, } }; diff --git a/yudao-ui-admin/src/views/bpm/task/done.vue b/yudao-ui-admin/src/views/bpm/task/done.vue index c6d8e4cc3..9d522bec5 100644 --- a/yudao-ui-admin/src/views/bpm/task/done.vue +++ b/yudao-ui-admin/src/views/bpm/task/done.vue @@ -63,7 +63,7 @@ import {getDoneTaskPage} from '@/api/bpm/task' import {getDate} from "@/utils/dateUtils"; export default { - name: "Done", + name: "BpmDoneTask", components: { }, data() { @@ -113,7 +113,7 @@ export default { }, /** 处理审批按钮 */ handleAudit(row) { - this.$router.push({ path: "/bpm/process-instance/detail", query: { id: row.processInstance.id}}); + this.$router.push({ name: "BpmProcessInstanceDetail", query: { id: row.processInstance.id}}); }, } }; diff --git a/yudao-ui-admin/src/views/bpm/task/todo.vue b/yudao-ui-admin/src/views/bpm/task/todo.vue index 79b922d95..a14dc5644 100644 --- a/yudao-ui-admin/src/views/bpm/task/todo.vue +++ b/yudao-ui-admin/src/views/bpm/task/todo.vue @@ -52,7 +52,7 @@ import {getTodoTaskPage} from '@/api/bpm/task' export default { - name: "Todo", + name: "BpmTodoTask", components: { }, data() { @@ -100,7 +100,7 @@ export default { }, /** 处理审批按钮 */ handleAudit(row) { - this.$router.push({ path: "/bpm/process-instance/detail", query: { id: row.processInstance.id}}); + this.$router.push({ name: "BpmProcessInstanceDetail", query: { id: row.processInstance.id}}); }, } }; diff --git a/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue b/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue index dd337475d..ec503b40e 100644 --- a/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue +++ b/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue @@ -91,7 +91,7 @@ import {listSimpleUsers} from "@/api/system/user"; import {listSimpleUserGroups} from "@/api/bpm/userGroup"; export default { - name: "taskAssignRuleDialog", + name: "BpmTaskAssignRule", components: { Treeselect }, diff --git a/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue b/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue index ce5d1e471..345adf631 100644 --- a/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue +++ b/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue @@ -116,7 +116,7 @@ import { getApiAccessLogPage, exportApiAccessLogExcel } from "@/api/infra/apiAccessLog"; export default { - name: "ApiAccessLog", + name: "InfraApiAccessLog", components: { }, data() { diff --git a/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue b/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue index cea4893e0..f076bc723 100644 --- a/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue +++ b/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue @@ -123,7 +123,7 @@ import { updateApiErrorLogProcess, getApiErrorLogPage, exportApiErrorLogExcel } import { InfraApiErrorLogProcessStatusEnum } from '@/utils/constants' export default { - name: "ApiErrorLog", + name: "InfraApiErrorLog", components: { }, data() { diff --git a/yudao-ui-admin/src/views/infra/build/index.vue b/yudao-ui-admin/src/views/infra/build/index.vue index a77daae98..83f682400 100644 --- a/yudao-ui-admin/src/views/infra/build/index.vue +++ b/yudao-ui-admin/src/views/infra/build/index.vue @@ -158,6 +158,7 @@ const formConfInDB = getFormConf() const idGlobal = getIdGlobal() export default { + name: "InfraBuild", components: { draggable, render, diff --git a/yudao-ui-admin/src/views/infra/codegen/index.vue b/yudao-ui-admin/src/views/infra/codegen/index.vue index a5405b7c5..252f1197f 100644 --- a/yudao-ui-admin/src/views/infra/codegen/index.vue +++ b/yudao-ui-admin/src/views/infra/codegen/index.vue @@ -100,7 +100,7 @@ hljs.registerLanguage("javascript", require("highlight.js/lib/languages/javascri hljs.registerLanguage("sql", require("highlight.js/lib/languages/sql")); hljs.registerLanguage("typescript", require("highlight.js/lib/languages/typescript")); export default { - name: "Codegen", + name: "InfraCodegen", components: { importTable }, data() { return { diff --git a/yudao-ui-admin/src/views/infra/config/index.vue b/yudao-ui-admin/src/views/infra/config/index.vue index 802abeb08..6ec5ac0b2 100644 --- a/yudao-ui-admin/src/views/infra/config/index.vue +++ b/yudao-ui-admin/src/views/infra/config/index.vue @@ -110,7 +110,7 @@ import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig } from "@/api/infra/config"; export default { - name: "Config", + name: "InfraConfig", data() { return { // 遮罩层 diff --git a/yudao-ui-admin/src/views/infra/dataSourceConfig/index.vue b/yudao-ui-admin/src/views/infra/dataSourceConfig/index.vue index 6a8e3da1c..576259cec 100755 --- a/yudao-ui-admin/src/views/infra/dataSourceConfig/index.vue +++ b/yudao-ui-admin/src/views/infra/dataSourceConfig/index.vue @@ -57,7 +57,7 @@ import { createDataSourceConfig, updateDataSourceConfig, deleteDataSourceConfig, getDataSourceConfig, getDataSourceConfigList } from "@/api/infra/dataSourceConfig"; export default { - name: "DataSourceConfig", + name: "InfraDataSourceConfig", components: { }, data() { diff --git a/yudao-ui-admin/src/views/infra/dbDoc/index.vue b/yudao-ui-admin/src/views/infra/dbDoc/index.vue index 3df8f36b7..a7b40f8ca 100644 --- a/yudao-ui-admin/src/views/infra/dbDoc/index.vue +++ b/yudao-ui-admin/src/views/infra/dbDoc/index.vue @@ -21,7 +21,7 @@ import { exportHtml, exportWord, exportMarkdown} from "@/api/infra/dbDoc"; import iFrame from "@/components/iFrame/index"; export default { - name: "DBDoc", + name: "InfraDBDoc", components: { iFrame }, data() { return { diff --git a/yudao-ui-admin/src/views/infra/file/index.vue b/yudao-ui-admin/src/views/infra/file/index.vue index bd569a377..b4ebf35f9 100644 --- a/yudao-ui-admin/src/views/infra/file/index.vue +++ b/yudao-ui-admin/src/views/infra/file/index.vue @@ -92,7 +92,7 @@ import {getAccessToken} from "@/utils/auth"; import ImagePreview from "@/components/ImagePreview"; export default { - name: "File", + name: "InfraFile", components: { ImagePreview }, diff --git a/yudao-ui-admin/src/views/infra/fileConfig/index.vue b/yudao-ui-admin/src/views/infra/fileConfig/index.vue index 1ee8c5f5d..01e671fab 100755 --- a/yudao-ui-admin/src/views/infra/fileConfig/index.vue +++ b/yudao-ui-admin/src/views/infra/fileConfig/index.vue @@ -145,7 +145,7 @@ import { } from "@/api/infra/fileConfig"; export default { - name: "FileConfig", + name: "InfraFileConfig", components: { }, data() { diff --git a/yudao-ui-admin/src/views/infra/job/index.vue b/yudao-ui-admin/src/views/infra/job/index.vue index 2bd387cc0..052e3417f 100644 --- a/yudao-ui-admin/src/views/infra/job/index.vue +++ b/yudao-ui-admin/src/views/infra/job/index.vue @@ -155,7 +155,7 @@ import Crontab from '@/components/Crontab' export default { components: { Crontab }, - name: "Job", + name: "InfraJob", data() { return { // 遮罩层 diff --git a/yudao-ui-admin/src/views/infra/job/log.vue b/yudao-ui-admin/src/views/infra/job/log.vue index 8febf83db..ab47bb070 100644 --- a/yudao-ui-admin/src/views/infra/job/log.vue +++ b/yudao-ui-admin/src/views/infra/job/log.vue @@ -96,7 +96,7 @@ import { getJobLogPage, exportJobLogExcel } from "@/api/infra/jobLog"; export default { - name: "JobLog", + name: "InfraJobLog", data() { return { // 遮罩层 diff --git a/yudao-ui-admin/src/views/infra/redis/index.vue b/yudao-ui-admin/src/views/infra/redis/index.vue index 38e1cf823..0f08aef83 100644 --- a/yudao-ui-admin/src/views/infra/redis/index.vue +++ b/yudao-ui-admin/src/views/infra/redis/index.vue @@ -73,7 +73,7 @@ import { getCache } from "@/api/infra/redis"; import * as echarts from 'echarts' require('echarts/theme/macarons') // echarts theme export default { - name: "Server", + name: "InfraRedis", data () { return { // 统计命令信息 diff --git a/yudao-ui-admin/src/views/infra/server/index.vue b/yudao-ui-admin/src/views/infra/server/index.vue index 409bd7325..575597d84 100644 --- a/yudao-ui-admin/src/views/infra/server/index.vue +++ b/yudao-ui-admin/src/views/infra/server/index.vue @@ -8,7 +8,7 @@ import iFrame from "@/components/iFrame/index"; import { getConfigKey } from "@/api/infra/config"; export default { - name: "Druid", + name: "InfraAdminServer", components: { iFrame }, data() { return { diff --git a/yudao-ui-admin/src/views/infra/skywalking/index.vue b/yudao-ui-admin/src/views/infra/skywalking/index.vue index 6f5e7dc7f..2b3f2a196 100644 --- a/yudao-ui-admin/src/views/infra/skywalking/index.vue +++ b/yudao-ui-admin/src/views/infra/skywalking/index.vue @@ -8,7 +8,7 @@ import iFrame from "@/components/iFrame/index"; import { getConfigKey } from "@/api/infra/config"; export default { - name: "Druid", + name: "InfraSkyWalking", components: { iFrame }, data() { return { diff --git a/yudao-ui-admin/src/views/infra/swagger/index.vue b/yudao-ui-admin/src/views/infra/swagger/index.vue index 0558fa694..249269c8b 100644 --- a/yudao-ui-admin/src/views/infra/swagger/index.vue +++ b/yudao-ui-admin/src/views/infra/swagger/index.vue @@ -8,7 +8,7 @@ import iFrame from "@/components/iFrame/index"; import { getConfigKey } from "@/api/infra/config"; export default { - name: "Druid", + name: "InfraSwagger", components: { iFrame }, data() { return { diff --git a/yudao-ui-admin/src/views/mall/product/property/index.vue b/yudao-ui-admin/src/views/mall/product/property/index.vue index a4044cfe1..5b105bfcf 100644 --- a/yudao-ui-admin/src/views/mall/product/property/index.vue +++ b/yudao-ui-admin/src/views/mall/product/property/index.vue @@ -77,7 +77,7 @@ import { createProperty, updateProperty, deleteProperty, getProperty, getPropertyPage } from "@/api/mall/product/property"; export default { - name: "Property", + name: "ProductProperty", components: { }, data() { diff --git a/yudao-ui-admin/src/views/mall/product/property/value.vue b/yudao-ui-admin/src/views/mall/product/property/value.vue index 86fc54f00..cb61fe76b 100644 --- a/yudao-ui-admin/src/views/mall/product/property/value.vue +++ b/yudao-ui-admin/src/views/mall/product/property/value.vue @@ -83,7 +83,7 @@ import { } from '@/api/mall/product/property' export default { - name: "PropertyValue", + name: "ProductPropertyValue", data() { return { // 遮罩层 diff --git a/yudao-ui-admin/src/views/mall/product/spu/index.vue b/yudao-ui-admin/src/views/mall/product/spu/index.vue index d77229203..806e4f205 100644 --- a/yudao-ui-admin/src/views/mall/product/spu/index.vue +++ b/yudao-ui-admin/src/views/mall/product/spu/index.vue @@ -227,7 +227,7 @@ import {getBrandList} from "@/api/mall/product/brand"; import {ProductSpuStatusEnum} from "@/utils/constants"; export default { - name: "Spu", + name: "ProductSpu", data() { return { activeTabs: "all", @@ -318,11 +318,11 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.$router.push({ name: 'SpuAdd'}) + this.$router.push({ name: 'ProductSpuCreate'}) }, /** 修改按钮操作 */ handleUpdate(row) { - this.$router.push({ name: 'SpuEdit', params: { spuId: row.id }}) + this.$router.push({ name: 'ProductSpuUpdate', params: { spuId: row.id }}) }, /** 删除按钮操作 */ handleDelete(row) { diff --git a/yudao-ui-admin/src/views/mall/product/spu/save.vue b/yudao-ui-admin/src/views/mall/product/spu/save.vue index 1e2f48255..307f58f3b 100644 --- a/yudao-ui-admin/src/views/mall/product/spu/save.vue +++ b/yudao-ui-admin/src/views/mall/product/spu/save.vue @@ -187,7 +187,6 @@ diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/api/api.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/api/api.ts.vm new file mode 100644 index 000000000..df49a002b --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/api/api.ts.vm @@ -0,0 +1,74 @@ +import request from '@/config/axios' + +export interface ${simpleClassName}VO { +#foreach ($column in $columns) +#if ($column.createOperation || $column.updateOperation) +#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") + ${column.javaField}: number +#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime") + ${column.javaField}: Date +#else + ${column.javaField}: ${column.javaType.toLowerCase()} +#end +#end +#end +} + +export interface ${simpleClassName}PageReqVO extends PageParam { +#foreach ($column in $columns) +#if (${column.listOperation})##查询操作 +#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") + ${column.javaField}?: number +#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime") + ${column.javaField}?: Date[] +#else + ${column.javaField}?: ${column.javaType.toLowerCase()} +#end +#end +#end +} + +export interface ${simpleClassName}ExcelReqVO { +#foreach ($column in $columns) +#if (${column.listOperation})##查询操作 +#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") + ${column.javaField}?: number +#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime") + ${column.javaField}?: Date[] +#else + ${column.javaField}?: ${column.javaType.toLowerCase()} +#end +#end +#end +} +#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") + +// 查询${table.classComment}列表 +export const get${simpleClassName}PageApi = async (params: ${simpleClassName}PageReqVO) => { + return await request.get({ url: '${baseURL}/page', params }) +} + +// 查询${table.classComment}详情 +export const get${simpleClassName}Api = async (id: number) => { + return await request.get({ url: '${baseURL}/get?id=' + id }) +} + +// 新增${table.classComment} +export const create${simpleClassName}Api = async (data: ${simpleClassName}VO) => { + return await request.post({ url: '${baseURL}/create', data }) +} + +// 修改${table.classComment} +export const update${simpleClassName}Api = async (data: ${simpleClassName}VO) => { + return await request.put({ url: '${baseURL}/update', data }) +} + +// 删除${table.classComment} +export const delete${simpleClassName}Api = async (id: number) => { + return await request.delete({ url: '${baseURL}/delete?id=' + id }) +} + +// 导出${table.classComment} Excel +export const export${simpleClassName}Api = async (params: ${simpleClassName}ExcelReqVO) => { + return await request.download({ url: '${baseURL}/export-excel', params }) +} diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/data.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/data.ts.vm similarity index 100% rename from yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/data.ts.vm rename to yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/data.ts.vm diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/index.vue.vm new file mode 100644 index 000000000..389458c51 --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vxe/views/index.vue.vm @@ -0,0 +1,160 @@ + + From 975b978e37f26ef030c34bc44a9244071eac6e06 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 20 Mar 2023 22:57:08 +0800 Subject: [PATCH 13/27] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=EF=BC=9A=E5=AE=8C=E5=96=84=20Vue3=20=E6=A0=87=E5=87=86?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E7=9A=84=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/codegen/vue3/views/index.vue.vm | 48 ++++++++++++++++--- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm index 73f35856a..dc071f212 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm @@ -1,11 +1,19 @@ diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm index 5622d7895..9a57c83f9 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm @@ -92,7 +92,7 @@ 搜索 重置 - #if ($permissionPrefix <= 14) + #if ($permissionPrefix.length() < 15) #else Date: Wed, 22 Mar 2023 20:50:09 +0800 Subject: [PATCH 16/27] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=EF=BC=9A=E5=AE=8C=E5=96=84=20Vue3=20=E6=A0=87=E5=87=86?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E7=9A=84=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/codegen/inner/CodegenEngine.java | 13 +++-- .../resources/codegen/vue3/views/form.vue.vm | 58 ++++++++++--------- .../resources/codegen/vue3/views/index.vue.vm | 21 ++++--- 3 files changed, 52 insertions(+), 40 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java index 94eab36b1..b41821b80 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java @@ -97,20 +97,21 @@ public class CodegenEngine { * value:生成的路径 */ private static final Table FRONT_TEMPLATES = ImmutableTable.builder() - // Vue2 + // Vue2 标准模版 .put(CodegenFrontTypeEnum.VUE2.getType(), vueTemplatePath("views/index.vue"), vueFilePath("views/${table.moduleName}/${classNameVar}/index.vue")) .put(CodegenFrontTypeEnum.VUE2.getType(), vueTemplatePath("api/api.js"), vueFilePath("api/${table.moduleName}/${classNameVar}.js")) - // Vue3 + // Vue3 标准模版 .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/index.vue"), vue3FilePath("views/${table.moduleName}/${classNameVar}/index.vue")) .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/form.vue"), - vue3FilePath("views/${table.moduleName}/${classNameVar}/form.vue")) -// .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/data.ts"), -// vue3FilePath("views/${table.moduleName}/${classNameVar}/${classNameVar}.data.ts")) + vue3FilePath("views/${table.moduleName}/${classNameVar}/${simpleClassName}Form.vue")) .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("api/api.ts"), vue3FilePath("api/${table.moduleName}/${classNameVar}/index.ts")) + // Vue3 Schema 模版 +// .put(CodegenFrontTypeEnum.VUE3.getType(), vue3TemplatePath("views/data.ts"), +// vue3FilePath("views/${table.moduleName}/${classNameVar}/${classNameVar}.data.ts")) .build(); @Resource @@ -203,6 +204,8 @@ public class CodegenEngine { getStr(bindingMap, "basePackage").replaceAll("\\.", "/")); filePath = StrUtil.replace(filePath, "${classNameVar}", getStr(bindingMap, "classNameVar")); + filePath = StrUtil.replace(filePath, "${simpleClassName}", + getStr(bindingMap, "simpleClassName")); // sceneEnum 包含的字段 CodegenSceneEnum sceneEnum = (CodegenSceneEnum) bindingMap.get("sceneEnum"); filePath = StrUtil.replace(filePath, "${sceneEnum.prefixClass}", sceneEnum.getPrefixClass()); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm index 8209c92c3..690d7cf72 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm @@ -27,17 +27,17 @@ - #elseif($column.htmlType == "imageUpload")## 图片上传 TODO 芋艿:待测试 + #elseif($column.htmlType == "imageUpload")## 图片上传 #set ($hasImageUploadColumn = true) - - - - #elseif($column.htmlType == "fileUpload")## 文件上传 TODO 芋艿:待测试 + + + + #elseif($column.htmlType == "fileUpload")## 文件上传 #set ($hasFileUploadColumn = true) - - - - #elseif($column.htmlType == "editor")## 文本编辑器 TODO 芋艿:待测试 + + + + #elseif($column.htmlType == "editor")## 文本编辑器 @@ -59,19 +59,20 @@ #end - #elseif($column.htmlType == "checkbox")## 多选框 TODO 芋艿:待测试 + #elseif($column.htmlType == "checkbox")## 多选框 #if ("" != $dictType)## 有数据字典 #if (!$dictMethods.contains($dictMethod))## 如果不存在,则添加到 dictMethods 数组中,后续好 import #set($ignore = $dictMethods.add($dictMethod) ) #end - - {{dict.label}} - + + {{ dict.label }} + #else##没数据字典 请选择字典生成 #end @@ -96,14 +97,19 @@ #end - #elseif($column.htmlType == "datetime")## 时间框 TODO 芋艿:待测试 - - - - #elseif($column.htmlType == "textarea")## 文本框 TODO 芋艿:待测试 - - - + #elseif($column.htmlType == "datetime")## 时间框 + + + + #elseif($column.htmlType == "textarea")## 文本框 + + + #end #end #end @@ -163,7 +169,7 @@ const formRules = reactive({ const formRef = ref() // 表单 Ref /** 打开弹窗 */ -const openModal = async (type: string, id?: number) => { +const open = async (type: string, id?: number) => { modelVisible.value = true modelTitle.value = t('action.' + type) formType.value = type @@ -178,7 +184,7 @@ const openModal = async (type: string, id?: number) => { } } } -defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗 +defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm index 9a57c83f9..1d9158f71 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm @@ -92,12 +92,12 @@ 搜索 重置 - #if ($permissionPrefix.length() < 15) - + #if ($permissionPrefix.length() <= 12) + #else #end @@ -148,7 +148,7 @@ 编辑 @@ -172,6 +172,9 @@ @pagination="getList" /> + + + <${simpleClassName}Form ref="formRef" @success="getList" /> diff --git a/yudao-ui-admin/src/views/infra/redis/index.vue b/yudao-ui-admin/src/views/infra/redis/index.vue index 63be640bc..38e1cf823 100644 --- a/yudao-ui-admin/src/views/infra/redis/index.vue +++ b/yudao-ui-admin/src/views/infra/redis/index.vue @@ -65,77 +65,11 @@ - - - - - - - - - - - - - - - - -
- 键名列表 - -
- - - - - - - - -
-
- - - -
- 缓存内容 - 清理全部 -
- - - - - - - - - - - - - - -
-
-
-
diff --git a/yudao-ui-admin/src/views/infra/server/index.vue b/yudao-ui-admin/src/views/infra/server/index.vue index 7a5570cc2..409bd7325 100644 --- a/yudao-ui-admin/src/views/infra/server/index.vue +++ b/yudao-ui-admin/src/views/infra/server/index.vue @@ -1,18 +1,30 @@ diff --git a/yudao-ui-admin/src/views/infra/skywalking/index.vue b/yudao-ui-admin/src/views/infra/skywalking/index.vue index 4628d619d..6f5e7dc7f 100644 --- a/yudao-ui-admin/src/views/infra/skywalking/index.vue +++ b/yudao-ui-admin/src/views/infra/skywalking/index.vue @@ -1,18 +1,30 @@ diff --git a/yudao-ui-admin/src/views/infra/swagger/index.vue b/yudao-ui-admin/src/views/infra/swagger/index.vue index 3cf0d8ab3..0558fa694 100644 --- a/yudao-ui-admin/src/views/infra/swagger/index.vue +++ b/yudao-ui-admin/src/views/infra/swagger/index.vue @@ -1,19 +1,31 @@ From f46c0e24feeaf32bff33fb89417e043cdbd499a4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 8 Apr 2023 11:49:28 +0800 Subject: [PATCH 20/27] =?UTF-8?q?=E6=89=80=E6=9C=89=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=9A=84=20name=20=E9=83=BD=E5=8A=A0=E4=B8=8A=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E5=89=8D=E7=BC=80=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/src/router/index.js | 28 +++++++++---------- .../src/views/bpm/definition/index.vue | 2 +- yudao-ui-admin/src/views/bpm/form/index.vue | 6 ++-- yudao-ui-admin/src/views/bpm/group/index.vue | 2 +- yudao-ui-admin/src/views/bpm/model/index.vue | 6 ++-- .../src/views/bpm/model/modelEditor.vue | 2 +- .../src/views/bpm/oa/leave/create.vue | 2 +- .../src/views/bpm/oa/leave/detail.vue | 2 +- .../src/views/bpm/oa/leave/index.vue | 8 +++--- .../src/views/bpm/processInstance/index.vue | 6 ++-- yudao-ui-admin/src/views/bpm/task/done.vue | 4 +-- yudao-ui-admin/src/views/bpm/task/todo.vue | 4 +-- .../taskAssignRule/taskAssignRuleDialog.vue | 2 +- .../src/views/infra/apiAccessLog/index.vue | 2 +- .../src/views/infra/apiErrorLog/index.vue | 2 +- .../src/views/infra/build/index.vue | 1 + .../src/views/infra/codegen/index.vue | 2 +- .../src/views/infra/config/index.vue | 2 +- .../views/infra/dataSourceConfig/index.vue | 2 +- .../src/views/infra/dbDoc/index.vue | 2 +- yudao-ui-admin/src/views/infra/file/index.vue | 2 +- .../src/views/infra/fileConfig/index.vue | 2 +- yudao-ui-admin/src/views/infra/job/index.vue | 2 +- yudao-ui-admin/src/views/infra/job/log.vue | 2 +- .../src/views/infra/redis/index.vue | 2 +- .../src/views/infra/server/index.vue | 2 +- .../src/views/infra/skywalking/index.vue | 2 +- .../src/views/infra/swagger/index.vue | 2 +- .../src/views/mall/product/property/index.vue | 2 +- .../src/views/mall/product/property/value.vue | 2 +- .../src/views/mall/product/spu/index.vue | 6 ++-- .../src/views/mall/product/spu/save.vue | 2 +- .../src/views/mall/promotion/coupon/index.vue | 2 +- .../mall/promotion/couponTemplate/index.vue | 2 +- .../mall/promotion/discountActivity/index.vue | 2 +- .../mall/promotion/rewardActivity/index.vue | 2 +- .../seckill/seckillActivity/index.vue | 2 +- .../promotion/seckill/seckillTime/index.vue | 2 +- .../src/views/mall/trade/afterSale/index.vue | 2 +- .../src/views/mall/trade/order/detail.vue | 2 +- .../src/views/mall/trade/order/index.vue | 4 +-- yudao-ui-admin/src/views/pay/app/index.vue | 2 +- .../src/views/pay/merchant/index.vue | 2 +- yudao-ui-admin/src/views/pay/refund/index.vue | 2 +- .../src/views/system/area/index.vue | 2 +- .../src/views/system/dept/index.vue | 2 +- yudao-ui-admin/src/views/system/dict/data.vue | 2 +- .../src/views/system/dict/index.vue | 2 +- .../src/views/system/errorCode/index.vue | 2 +- .../src/views/system/loginlog/index.vue | 2 +- .../src/views/system/mail/account/index.vue | 2 +- .../src/views/system/mail/log/index.vue | 2 +- .../src/views/system/mail/template/index.vue | 2 +- .../src/views/system/menu/index.vue | 2 +- .../src/views/system/notice/index.vue | 2 +- .../src/views/system/notify/message/index.vue | 2 +- .../src/views/system/notify/my/index.vue | 2 +- .../views/system/notify/template/index.vue | 2 +- .../src/views/system/oauth2/client/index.vue | 2 +- .../src/views/system/oauth2/token/index.vue | 2 +- .../src/views/system/operatelog/index.vue | 2 +- .../src/views/system/post/index.vue | 2 +- .../src/views/system/role/index.vue | 2 +- .../src/views/system/sensitiveWord/index.vue | 2 +- .../src/views/system/sms/channel/index.vue | 2 +- .../src/views/system/sms/log/index.vue | 2 +- .../src/views/system/sms/template/index.vue | 2 +- .../src/views/system/tenant/index.vue | 2 +- .../src/views/system/tenantPackage/index.vue | 2 +- .../src/views/system/user/index.vue | 2 +- 70 files changed, 97 insertions(+), 96 deletions(-) diff --git a/yudao-ui-admin/src/router/index.js b/yudao-ui-admin/src/router/index.js index d38e6c42d..1d64f59bc 100644 --- a/yudao-ui-admin/src/router/index.js +++ b/yudao-ui-admin/src/router/index.js @@ -100,7 +100,7 @@ export const constantRoutes = [ children: [{ path: 'type/data/:dictId(\\d+)', component: (resolve) => require(['@/views/system/dict/data'], resolve), - name: 'Data', + name: 'SystemDictData', meta: {title: '字典数据', icon: '', activeMenu: '/system/dict'} } ] @@ -112,7 +112,7 @@ export const constantRoutes = [ children: [{ path: 'log', component: (resolve) => require(['@/views/infra/job/log'], resolve), - name: 'JobLog', + name: 'InfraJobLog', meta: {title: '调度日志', activeMenu: '/infra/job'} } ] @@ -123,7 +123,7 @@ export const constantRoutes = [ children: [{ path: 'edit/:tableId(\\d+)', component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve), - name: 'GenEdit', + name: 'InfraCodegenEditTable', meta: {title: '修改生成配置', activeMenu: '/infra/codegen'} } ] @@ -136,12 +136,12 @@ export const constantRoutes = [ children: [{ path: 'oa/leave/create', component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve), - name: '发起 OA 请假', + name: 'BpmOALeaveCreate', meta: {title: '发起 OA 请假', icon: 'form', activeMenu: '/bpm/oa/leave'} }, { path: 'oa/leave/detail', component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve), - name: '查看 OA 请假', + name: 'BpmOALeaveDetail', meta: {title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave'} } ] @@ -153,27 +153,27 @@ export const constantRoutes = [ children: [{ path: 'manager/form/edit', component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve), - name: '流程表单-编辑', + name: 'BpmFormEditor', meta: {title: '流程表单-编辑', activeMenu: '/bpm/manager/form'} }, { path: 'manager/definition', component: (resolve) => require(['@/views/bpm/definition/index'], resolve), - name: '流程定义', + name: 'BpmProcessDefinition', meta: {title: '流程定义', activeMenu: '/bpm/manager/model'} }, { path: 'manager/model/design', component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve), - name: '设计流程', + name: 'BpmModelEditor', meta: {title: '设计流程', activeMenu: '/bpm/manager/model'} }, { path: 'process-instance/create', component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve), - name: '发起流程', + name: 'BpmProcessInstanceCreate', meta: {title: '发起流程', activeMenu: '/bpm/task/my'} }, { path: 'process-instance/detail', component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve), - name: '流程详情', + name: 'BpmProcessInstanceDetail', meta: {title: '流程详情', activeMenu: '/bpm/task/my'} } ] @@ -185,7 +185,7 @@ export const constantRoutes = [ children: [{ path: 'value/:propertyId(\\d+)', component: (resolve) => require(['@/views/mall/product/property/value'], resolve), - name: 'PropertyValue', + name: 'ProductPropertyValue', meta: {title: '商品属性值', icon: '', activeMenu: '/product/property'} } ] @@ -197,13 +197,13 @@ export const constantRoutes = [ children: [{ path: 'edit/:spuId(\\d+)', component: (resolve) => require(['@/views/mall/product/spu/save'], resolve), - name: 'SpuEdit', + name: 'ProductSpuUpdate', meta: {title: '修改商品', activeMenu: '/product/spu'} }, { path: 'add', component: (resolve) => require(['@/views/mall/product/spu/save'], resolve), - name: 'SpuAdd', + name: 'ProductSpuCreate', meta: {title: '添加商品', activeMenu: '/product/spu'} } ] @@ -215,7 +215,7 @@ export const constantRoutes = [ children: [ { path: 'detail', - name: '订单详情', + name: 'TradeOrderDetail', hidden: true, meta: { title: '订单详情' }, component: (resolve) => require(['@/views/mall/trade/order/detail'], resolve) diff --git a/yudao-ui-admin/src/views/bpm/definition/index.vue b/yudao-ui-admin/src/views/bpm/definition/index.vue index 0ef67b2a3..dc992545f 100644 --- a/yudao-ui-admin/src/views/bpm/definition/index.vue +++ b/yudao-ui-admin/src/views/bpm/definition/index.vue @@ -81,7 +81,7 @@ import Parser from '@/components/parser/Parser' import taskAssignRuleDialog from "../taskAssignRule/taskAssignRuleDialog"; export default { - name: "processDefinition", + name: "BpmProcessDefinition", components: { Parser, taskAssignRuleDialog diff --git a/yudao-ui-admin/src/views/bpm/form/index.vue b/yudao-ui-admin/src/views/bpm/form/index.vue index db730abde..f9bcb7264 100644 --- a/yudao-ui-admin/src/views/bpm/form/index.vue +++ b/yudao-ui-admin/src/views/bpm/form/index.vue @@ -67,7 +67,7 @@ import Parser from '@/components/parser/Parser' import {decodeFields} from "@/utils/formGenerator"; export default { - name: "Form", + name: "BpmForm", components: { Parser }, @@ -134,13 +134,13 @@ export default { /** 新增按钮操作 */ handleAdd() { this.$router.push({ - path:"/bpm/manager/form/edit" + name: "BpmFormEditor" }); }, /** 修改按钮操作 */ handleUpdate(row) { this.$router.push({ - path:"/bpm/manager/form/edit", + name: "BpmFormEditor", query:{ formId: row.id } diff --git a/yudao-ui-admin/src/views/bpm/group/index.vue b/yudao-ui-admin/src/views/bpm/group/index.vue index ffb3f2046..6c23a947f 100644 --- a/yudao-ui-admin/src/views/bpm/group/index.vue +++ b/yudao-ui-admin/src/views/bpm/group/index.vue @@ -102,7 +102,7 @@ import {CommonStatusEnum} from "@/utils/constants"; import {listSimpleUsers} from "@/api/system/user"; export default { - name: "UserGroup", + name: "BpmUserGroup", components: { }, data() { diff --git a/yudao-ui-admin/src/views/bpm/model/index.vue b/yudao-ui-admin/src/views/bpm/model/index.vue index fbb580fe3..e80b96429 100644 --- a/yudao-ui-admin/src/views/bpm/model/index.vue +++ b/yudao-ui-admin/src/views/bpm/model/index.vue @@ -233,7 +233,7 @@ import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; export default { - name: "model", + name: "BpmModel", components: { Parser, Treeselect, @@ -380,7 +380,7 @@ export default { /** 设计按钮操作 */ handleDesign(row) { this.$router.push({ - path:"/bpm/manager/model/design", + name: "BpmModelEditor", query:{ modelId: row.id } @@ -473,7 +473,7 @@ export default { /** 跳转流程定义的列表 */ handleDefinitionList(row) { this.$router.push({ - path:"/bpm/manager/definition", + name: "BpmProcessDefinition", query:{ key: row.key } diff --git a/yudao-ui-admin/src/views/bpm/model/modelEditor.vue b/yudao-ui-admin/src/views/bpm/model/modelEditor.vue index 91be300a7..78e78d317 100644 --- a/yudao-ui-admin/src/views/bpm/model/modelEditor.vue +++ b/yudao-ui-admin/src/views/bpm/model/modelEditor.vue @@ -26,7 +26,7 @@ import {createModel, getModel, updateModel} from "@/api/bpm/model"; // import MyProcessPanel from "../package/process-panel/ProcessPanel"; export default { - name: "App", + name: "BpmModelEditor", components: { MyProcessPalette }, data() { return { diff --git a/yudao-ui-admin/src/views/bpm/oa/leave/create.vue b/yudao-ui-admin/src/views/bpm/oa/leave/create.vue index 14b6ed566..3ac54173c 100644 --- a/yudao-ui-admin/src/views/bpm/oa/leave/create.vue +++ b/yudao-ui-admin/src/views/bpm/oa/leave/create.vue @@ -30,7 +30,7 @@ import { createLeave} from "@/api/bpm/leave" import { getDictDatas, DICT_TYPE } from '@/utils/dict' export default { - name: "LeaveCreate", + name: "BpmOALeaveCreate", components: { }, data() { diff --git a/yudao-ui-admin/src/views/bpm/oa/leave/detail.vue b/yudao-ui-admin/src/views/bpm/oa/leave/detail.vue index 1e1e464fa..0436b02fc 100644 --- a/yudao-ui-admin/src/views/bpm/oa/leave/detail.vue +++ b/yudao-ui-admin/src/views/bpm/oa/leave/detail.vue @@ -16,7 +16,7 @@ import { getLeave} from "@/api/bpm/leave" import {getDictDatas, DICT_TYPE} from '@/utils/dict' export default { - name: "LeaveDetail", + name: "BpmOALeaveDetail", components: { }, data() { diff --git a/yudao-ui-admin/src/views/bpm/oa/leave/index.vue b/yudao-ui-admin/src/views/bpm/oa/leave/index.vue index 8a2f01eef..49d5d21f0 100644 --- a/yudao-ui-admin/src/views/bpm/oa/leave/index.vue +++ b/yudao-ui-admin/src/views/bpm/oa/leave/index.vue @@ -89,7 +89,7 @@ import { getDictDatas, DICT_TYPE } from '@/utils/dict' import {cancelProcessInstance} from "@/api/bpm/processInstance"; export default { - name: "Leave", + name: "BpmOALeave", components: { }, data() { @@ -142,15 +142,15 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.$router.push({ path: "/bpm/oa/leave/create"}); + this.$router.push({ name: "BpmOALeaveCreate"}); }, /** 详情按钮操作 */ handleDetail(row) { - this.$router.push({ path: "/bpm/oa/leave/detail", query: { id: row.id}}); + this.$router.push({ name: "BpmOALeaveDetail", query: { id: row.id}}); }, /** 查看审批进度的操作 */ handleProcessDetail(row) { - this.$router.push({ path: "/bpm/process-instance/detail", query: { id: row.processInstanceId}}); + this.$router.push({ name: "BpmProcessInstanceDetail", query: { id: row.processInstanceId}}); }, /** 取消请假 */ handleCancel(row) { diff --git a/yudao-ui-admin/src/views/bpm/processInstance/index.vue b/yudao-ui-admin/src/views/bpm/processInstance/index.vue index b15751325..4e681ac24 100644 --- a/yudao-ui-admin/src/views/bpm/processInstance/index.vue +++ b/yudao-ui-admin/src/views/bpm/processInstance/index.vue @@ -103,7 +103,7 @@ import { getMyProcessInstancePage, cancelProcessInstance } from "@/api/bpm/processInstance"; export default { - name: "ProcessInstance", + name: "BpmProcessInstance", components: { }, data() { @@ -155,7 +155,7 @@ export default { }, /** 新增按钮操作 **/ handleAdd() { - this.$router.push({ path: "/bpm/process-instance/create"}) + this.$router.push({ name: "BpmProcessInstanceCreate"}) }, /** 取消按钮操作 */ handleCancel(row) { @@ -175,7 +175,7 @@ export default { }, /** 处理详情按钮 */ handleDetail(row) { - this.$router.push({ path: "/bpm/process-instance/detail", query: { id: row.id}}); + this.$router.push({ name: "BpmProcessInstanceDetail", query: { id: row.id}}); }, } }; diff --git a/yudao-ui-admin/src/views/bpm/task/done.vue b/yudao-ui-admin/src/views/bpm/task/done.vue index c6d8e4cc3..9d522bec5 100644 --- a/yudao-ui-admin/src/views/bpm/task/done.vue +++ b/yudao-ui-admin/src/views/bpm/task/done.vue @@ -63,7 +63,7 @@ import {getDoneTaskPage} from '@/api/bpm/task' import {getDate} from "@/utils/dateUtils"; export default { - name: "Done", + name: "BpmDoneTask", components: { }, data() { @@ -113,7 +113,7 @@ export default { }, /** 处理审批按钮 */ handleAudit(row) { - this.$router.push({ path: "/bpm/process-instance/detail", query: { id: row.processInstance.id}}); + this.$router.push({ name: "BpmProcessInstanceDetail", query: { id: row.processInstance.id}}); }, } }; diff --git a/yudao-ui-admin/src/views/bpm/task/todo.vue b/yudao-ui-admin/src/views/bpm/task/todo.vue index 79b922d95..a14dc5644 100644 --- a/yudao-ui-admin/src/views/bpm/task/todo.vue +++ b/yudao-ui-admin/src/views/bpm/task/todo.vue @@ -52,7 +52,7 @@ import {getTodoTaskPage} from '@/api/bpm/task' export default { - name: "Todo", + name: "BpmTodoTask", components: { }, data() { @@ -100,7 +100,7 @@ export default { }, /** 处理审批按钮 */ handleAudit(row) { - this.$router.push({ path: "/bpm/process-instance/detail", query: { id: row.processInstance.id}}); + this.$router.push({ name: "BpmProcessInstanceDetail", query: { id: row.processInstance.id}}); }, } }; diff --git a/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue b/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue index dd337475d..ec503b40e 100644 --- a/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue +++ b/yudao-ui-admin/src/views/bpm/taskAssignRule/taskAssignRuleDialog.vue @@ -91,7 +91,7 @@ import {listSimpleUsers} from "@/api/system/user"; import {listSimpleUserGroups} from "@/api/bpm/userGroup"; export default { - name: "taskAssignRuleDialog", + name: "BpmTaskAssignRule", components: { Treeselect }, diff --git a/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue b/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue index ce5d1e471..345adf631 100644 --- a/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue +++ b/yudao-ui-admin/src/views/infra/apiAccessLog/index.vue @@ -116,7 +116,7 @@ import { getApiAccessLogPage, exportApiAccessLogExcel } from "@/api/infra/apiAccessLog"; export default { - name: "ApiAccessLog", + name: "InfraApiAccessLog", components: { }, data() { diff --git a/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue b/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue index cea4893e0..f076bc723 100644 --- a/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue +++ b/yudao-ui-admin/src/views/infra/apiErrorLog/index.vue @@ -123,7 +123,7 @@ import { updateApiErrorLogProcess, getApiErrorLogPage, exportApiErrorLogExcel } import { InfraApiErrorLogProcessStatusEnum } from '@/utils/constants' export default { - name: "ApiErrorLog", + name: "InfraApiErrorLog", components: { }, data() { diff --git a/yudao-ui-admin/src/views/infra/build/index.vue b/yudao-ui-admin/src/views/infra/build/index.vue index a77daae98..83f682400 100644 --- a/yudao-ui-admin/src/views/infra/build/index.vue +++ b/yudao-ui-admin/src/views/infra/build/index.vue @@ -158,6 +158,7 @@ const formConfInDB = getFormConf() const idGlobal = getIdGlobal() export default { + name: "InfraBuild", components: { draggable, render, diff --git a/yudao-ui-admin/src/views/infra/codegen/index.vue b/yudao-ui-admin/src/views/infra/codegen/index.vue index a5405b7c5..252f1197f 100644 --- a/yudao-ui-admin/src/views/infra/codegen/index.vue +++ b/yudao-ui-admin/src/views/infra/codegen/index.vue @@ -100,7 +100,7 @@ hljs.registerLanguage("javascript", require("highlight.js/lib/languages/javascri hljs.registerLanguage("sql", require("highlight.js/lib/languages/sql")); hljs.registerLanguage("typescript", require("highlight.js/lib/languages/typescript")); export default { - name: "Codegen", + name: "InfraCodegen", components: { importTable }, data() { return { diff --git a/yudao-ui-admin/src/views/infra/config/index.vue b/yudao-ui-admin/src/views/infra/config/index.vue index 802abeb08..6ec5ac0b2 100644 --- a/yudao-ui-admin/src/views/infra/config/index.vue +++ b/yudao-ui-admin/src/views/infra/config/index.vue @@ -110,7 +110,7 @@ import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig } from "@/api/infra/config"; export default { - name: "Config", + name: "InfraConfig", data() { return { // 遮罩层 diff --git a/yudao-ui-admin/src/views/infra/dataSourceConfig/index.vue b/yudao-ui-admin/src/views/infra/dataSourceConfig/index.vue index 6a8e3da1c..576259cec 100755 --- a/yudao-ui-admin/src/views/infra/dataSourceConfig/index.vue +++ b/yudao-ui-admin/src/views/infra/dataSourceConfig/index.vue @@ -57,7 +57,7 @@ import { createDataSourceConfig, updateDataSourceConfig, deleteDataSourceConfig, getDataSourceConfig, getDataSourceConfigList } from "@/api/infra/dataSourceConfig"; export default { - name: "DataSourceConfig", + name: "InfraDataSourceConfig", components: { }, data() { diff --git a/yudao-ui-admin/src/views/infra/dbDoc/index.vue b/yudao-ui-admin/src/views/infra/dbDoc/index.vue index 3df8f36b7..a7b40f8ca 100644 --- a/yudao-ui-admin/src/views/infra/dbDoc/index.vue +++ b/yudao-ui-admin/src/views/infra/dbDoc/index.vue @@ -21,7 +21,7 @@ import { exportHtml, exportWord, exportMarkdown} from "@/api/infra/dbDoc"; import iFrame from "@/components/iFrame/index"; export default { - name: "DBDoc", + name: "InfraDBDoc", components: { iFrame }, data() { return { diff --git a/yudao-ui-admin/src/views/infra/file/index.vue b/yudao-ui-admin/src/views/infra/file/index.vue index bd569a377..b4ebf35f9 100644 --- a/yudao-ui-admin/src/views/infra/file/index.vue +++ b/yudao-ui-admin/src/views/infra/file/index.vue @@ -92,7 +92,7 @@ import {getAccessToken} from "@/utils/auth"; import ImagePreview from "@/components/ImagePreview"; export default { - name: "File", + name: "InfraFile", components: { ImagePreview }, diff --git a/yudao-ui-admin/src/views/infra/fileConfig/index.vue b/yudao-ui-admin/src/views/infra/fileConfig/index.vue index 1ee8c5f5d..01e671fab 100755 --- a/yudao-ui-admin/src/views/infra/fileConfig/index.vue +++ b/yudao-ui-admin/src/views/infra/fileConfig/index.vue @@ -145,7 +145,7 @@ import { } from "@/api/infra/fileConfig"; export default { - name: "FileConfig", + name: "InfraFileConfig", components: { }, data() { diff --git a/yudao-ui-admin/src/views/infra/job/index.vue b/yudao-ui-admin/src/views/infra/job/index.vue index 2bd387cc0..052e3417f 100644 --- a/yudao-ui-admin/src/views/infra/job/index.vue +++ b/yudao-ui-admin/src/views/infra/job/index.vue @@ -155,7 +155,7 @@ import Crontab from '@/components/Crontab' export default { components: { Crontab }, - name: "Job", + name: "InfraJob", data() { return { // 遮罩层 diff --git a/yudao-ui-admin/src/views/infra/job/log.vue b/yudao-ui-admin/src/views/infra/job/log.vue index 8febf83db..ab47bb070 100644 --- a/yudao-ui-admin/src/views/infra/job/log.vue +++ b/yudao-ui-admin/src/views/infra/job/log.vue @@ -96,7 +96,7 @@ import { getJobLogPage, exportJobLogExcel } from "@/api/infra/jobLog"; export default { - name: "JobLog", + name: "InfraJobLog", data() { return { // 遮罩层 diff --git a/yudao-ui-admin/src/views/infra/redis/index.vue b/yudao-ui-admin/src/views/infra/redis/index.vue index 38e1cf823..0f08aef83 100644 --- a/yudao-ui-admin/src/views/infra/redis/index.vue +++ b/yudao-ui-admin/src/views/infra/redis/index.vue @@ -73,7 +73,7 @@ import { getCache } from "@/api/infra/redis"; import * as echarts from 'echarts' require('echarts/theme/macarons') // echarts theme export default { - name: "Server", + name: "InfraRedis", data () { return { // 统计命令信息 diff --git a/yudao-ui-admin/src/views/infra/server/index.vue b/yudao-ui-admin/src/views/infra/server/index.vue index 409bd7325..575597d84 100644 --- a/yudao-ui-admin/src/views/infra/server/index.vue +++ b/yudao-ui-admin/src/views/infra/server/index.vue @@ -8,7 +8,7 @@ import iFrame from "@/components/iFrame/index"; import { getConfigKey } from "@/api/infra/config"; export default { - name: "Druid", + name: "InfraAdminServer", components: { iFrame }, data() { return { diff --git a/yudao-ui-admin/src/views/infra/skywalking/index.vue b/yudao-ui-admin/src/views/infra/skywalking/index.vue index 6f5e7dc7f..2b3f2a196 100644 --- a/yudao-ui-admin/src/views/infra/skywalking/index.vue +++ b/yudao-ui-admin/src/views/infra/skywalking/index.vue @@ -8,7 +8,7 @@ import iFrame from "@/components/iFrame/index"; import { getConfigKey } from "@/api/infra/config"; export default { - name: "Druid", + name: "InfraSkyWalking", components: { iFrame }, data() { return { diff --git a/yudao-ui-admin/src/views/infra/swagger/index.vue b/yudao-ui-admin/src/views/infra/swagger/index.vue index 0558fa694..249269c8b 100644 --- a/yudao-ui-admin/src/views/infra/swagger/index.vue +++ b/yudao-ui-admin/src/views/infra/swagger/index.vue @@ -8,7 +8,7 @@ import iFrame from "@/components/iFrame/index"; import { getConfigKey } from "@/api/infra/config"; export default { - name: "Druid", + name: "InfraSwagger", components: { iFrame }, data() { return { diff --git a/yudao-ui-admin/src/views/mall/product/property/index.vue b/yudao-ui-admin/src/views/mall/product/property/index.vue index a4044cfe1..5b105bfcf 100644 --- a/yudao-ui-admin/src/views/mall/product/property/index.vue +++ b/yudao-ui-admin/src/views/mall/product/property/index.vue @@ -77,7 +77,7 @@ import { createProperty, updateProperty, deleteProperty, getProperty, getPropertyPage } from "@/api/mall/product/property"; export default { - name: "Property", + name: "ProductProperty", components: { }, data() { diff --git a/yudao-ui-admin/src/views/mall/product/property/value.vue b/yudao-ui-admin/src/views/mall/product/property/value.vue index 86fc54f00..cb61fe76b 100644 --- a/yudao-ui-admin/src/views/mall/product/property/value.vue +++ b/yudao-ui-admin/src/views/mall/product/property/value.vue @@ -83,7 +83,7 @@ import { } from '@/api/mall/product/property' export default { - name: "PropertyValue", + name: "ProductPropertyValue", data() { return { // 遮罩层 diff --git a/yudao-ui-admin/src/views/mall/product/spu/index.vue b/yudao-ui-admin/src/views/mall/product/spu/index.vue index d77229203..806e4f205 100644 --- a/yudao-ui-admin/src/views/mall/product/spu/index.vue +++ b/yudao-ui-admin/src/views/mall/product/spu/index.vue @@ -227,7 +227,7 @@ import {getBrandList} from "@/api/mall/product/brand"; import {ProductSpuStatusEnum} from "@/utils/constants"; export default { - name: "Spu", + name: "ProductSpu", data() { return { activeTabs: "all", @@ -318,11 +318,11 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.$router.push({ name: 'SpuAdd'}) + this.$router.push({ name: 'ProductSpuCreate'}) }, /** 修改按钮操作 */ handleUpdate(row) { - this.$router.push({ name: 'SpuEdit', params: { spuId: row.id }}) + this.$router.push({ name: 'ProductSpuUpdate', params: { spuId: row.id }}) }, /** 删除按钮操作 */ handleDelete(row) { diff --git a/yudao-ui-admin/src/views/mall/product/spu/save.vue b/yudao-ui-admin/src/views/mall/product/spu/save.vue index 1e2f48255..307f58f3b 100644 --- a/yudao-ui-admin/src/views/mall/product/spu/save.vue +++ b/yudao-ui-admin/src/views/mall/product/spu/save.vue @@ -187,7 +187,6 @@ diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_schema/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_schema/views/index.vue.vm index 389458c51..0cfcade7f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_schema/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_schema/views/index.vue.vm @@ -1,160 +1,85 @@