🎉 3.6.0.RELEASE vue3版前端正式发布

This commit is contained in:
smallchill 2023-04-20 22:28:30 +08:00
parent d178675c53
commit 0885b48ad9
28 changed files with 329 additions and 68 deletions

View File

@ -1,7 +1,7 @@
<p align="center">
<img src="https://img.shields.io/badge/license-LGPL%20v3-blue.svg" alt="Build Status">
<img src="https://img.shields.io/badge/Spring%20Cloud-2021-blue.svg" alt="Coverage Status">
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.1-blue.svg" alt="Downloads">
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.10-blue.svg" alt="Downloads">
</p>
## SpringBlade微服务开发平台
@ -58,7 +58,7 @@ blade-tool
* Sword-基于React[https://sword.bladex.vip](https://sword.bladex.vip)
## 数据大屏
* Caster-数据大屏展示系统:[https://caster.bladex.vip](https://caster.bladex.vip)
* 数据大屏展示系统:[https://data.bladex.vip](https://data.bladex.vip)
## 技术文档
* [SpringBlade开发手册一览](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册)
@ -71,7 +71,8 @@ blade-tool
* 后端Github地址[https://github.com/chillzhuang/SpringBlade](https://github.com/chillzhuang/SpringBlade)
* 后端SpringBoot版[https://gitee.com/smallc/SpringBlade/tree/boot/](https://gitee.com/smallc/SpringBlade/tree/boot/)
* 前端框架Sword(基于React)[https://gitee.com/smallc/Sword](https://gitee.com/smallc/Sword)
* 前端框架Saber(基于Vue)[https://gitee.com/smallc/Saber](https://gitee.com/smallc/Saber)
* 前端框架Saber(基于Vue2)[https://gitee.com/smallc/Saber](https://gitee.com/smallc/Saber)
* 前端框架Saber3(基于Vue3)[https://gitee.com/smallc/Saber3](https://gitee.com/smallc/Saber/tree/3.x/)
## 开源协议
LGPL[GNU Lesser General Public License](http://www.gnu.org/licenses/lgpl.html)

View File

@ -5,7 +5,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -88,13 +88,13 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.11</version>
<version>1.2.16</version>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.22</version>
<version>8.0.32</version>
</dependency>
<!-- PostgreSql -->
<!--<dependency>

View File

@ -101,7 +101,7 @@ mybatis-plus:
swagger:
title: SpringBlade 接口文档系统
description: SpringBlade 接口文档系统
version: 3.5.0
version: 3.6.0
license: Powered By SpringBlade
licenseUrl: https://bladex.vip
terms-of-service-url: https://bladex.vip

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -30,4 +30,9 @@ public interface DevelopConstant {
* saber 系统名
*/
String SABER_NAME = "saber";
/**
* saber3 系统名
*/
String SABER3_NAME = "saber3";
}

View File

@ -159,6 +159,9 @@ public class BladeCodeGenerator {
} else if (Func.equals(systemName, DevelopConstant.SABER_NAME)) {
customFile.put("api.js", "/templates/saber/api.js.vm");
customFile.put("crud.vue", "/templates/saber/crud.vue.vm");
} else if (Func.equals(systemName, DevelopConstant.SABER3_NAME)) {
customFile.put("api.js", "/templates/saber3/api.js.vm");
customFile.put("crud.vue", "/templates/saber3/crud.vue.vm");
}
}

View File

@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/$!{serviceName}/$!{entityKey}/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/$!{serviceName}/$!{entityKey}/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/$!{serviceName}/$!{entityKey}/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/$!{serviceName}/$!{entityKey}/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/$!{serviceName}/$!{entityKey}/submit',
method: 'post',
data: row
})
}

View File

@ -0,0 +1,210 @@
<template>
<basic-container>
<avue-crud :option="option"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
v-model="form"
v-model:search="search"
v-model:page="page"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@on-load="onLoad">
<template #menu-left>
<el-button type="danger"
size="small"
icon="el-icon-delete"
plain
v-if="permission.$!{entityKey}_delete"
@click="handleDelete">删 除
</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/$!{servicePackage}/$!{entityKey}";
import {mapGetters} from "vuex";
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: {
height: 'auto',
calcHeight: 210,
searchShow: true,
searchMenuSpan: 6,
tip: false,
border: true,
index: true,
viewBtn: true,
selection: true,
column: [
#foreach($field in $!{table.fields})
#if($!{field.name}!=$!{tenantColumn})
{
label: "$!{field.comment}",
prop: "$!{field.propertyName}",
rules: [{
required: true,
message: "请输入$!{field.comment}",
trigger: "blur"
}]
},
#end
#end
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.$!{entityKey}_add, false),
viewBtn: this.validData(this.permission.$!{entityKey}_view, false),
delBtn: this.validData(this.permission.$!{entityKey}_delete, false),
editBtn: this.validData(this.permission.$!{entityKey}_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
done();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
window.console.log(error);
loading();
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -25,7 +25,7 @@ public interface AppConstant {
/**
* 应用版本
*/
String APPLICATION_VERSION = "3.5.0";
String APPLICATION_VERSION = "3.6.0";
/**
* 基础包

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -15,6 +15,7 @@
*/
package org.springblade.core.secure.props;
import io.jsonwebtoken.JwtException;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.launch.constant.TokenConstant;
@ -41,8 +42,7 @@ public class BladeTokenProperties {
*/
public String getSignKey() {
if (this.signKey.length() < TokenConstant.SIGN_KEY_LENGTH) {
log.warn("Token已启用默认签名,请前往blade.token.sign-key设置32位的key");
return TokenConstant.SIGN_KEY;
throw new JwtException("请配置 blade.token.sign-key 的值, 长度32位以上");
}
return this.signKey;
}

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -25,8 +25,7 @@
<!--Swagger-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-micro-spring-boot-starter</artifactId>
<version>${knife4j.version}</version>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>

View File

@ -55,7 +55,7 @@ public class SwaggerProperties {
/**
* 版本
**/
private String version = "3.5.0";
private String version = "3.6.0";
/**
* 许可证
**/

View File

@ -5,7 +5,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -43,18 +43,10 @@
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>${swagger.models.version}</version>
</dependency>
<!-- protostuff -->
<dependency>

View File

@ -27,10 +27,10 @@ import org.springblade.core.tool.utils.DateUtil;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import java.text.SimpleDateFormat;
@ -50,8 +50,8 @@ import java.util.TimeZone;
@EnableConfigurationProperties(BladeJacksonProperties.class)
public class JacksonConfiguration {
@Primary
@Bean
@ConditionalOnMissingBean
public ObjectMapper objectMapper(Jackson2ObjectMapperBuilder builder) {
builder.simpleDateFormat(DateUtil.PATTERN_DATETIME);
//创建ObjectMapper

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -40,7 +40,6 @@
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-spring-boot-starter</artifactId>
<version>${alibaba.seata.version}</version>
</dependency>
</dependencies>

58
pom.xml
View File

@ -5,7 +5,7 @@
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<packaging>pom</packaging>
<name>blade-tool</name>
<description>
@ -36,28 +36,26 @@
</scm>
<properties>
<blade.tool.version>3.5.0</blade.tool.version>
<blade.tool.version>3.6.0</blade.tool.version>
<java.version>1.8</java.version>
<maven.plugin.version>3.8.1</maven.plugin.version>
<swagger.version>2.10.5</swagger.version>
<swagger.models.version>1.6.2</swagger.models.version>
<knife4j.version>2.0.9</knife4j.version>
<mybatis.plus.version>3.5.2</mybatis.plus.version>
<mybatis.plus.generator.version>3.5.3</mybatis.plus.generator.version>
<knife4j.version>4.1.0</knife4j.version>
<mybatis.plus.version>3.5.3.1</mybatis.plus.version>
<mybatis.plus.generator.version>3.5.3.1</mybatis.plus.generator.version>
<protostuff.version>1.6.0</protostuff.version>
<disruptor.version>3.4.2</disruptor.version>
<guava.version>20.0</guava.version>
<spring.boot.admin.version>2.7.1</spring.boot.admin.version>
<mica.auto.version>1.2.5</mica.auto.version>
<alibaba.cloud.version>2021.0.1.0</alibaba.cloud.version>
<alibaba.nacos.version>2.1.0</alibaba.nacos.version>
<alibaba.seata.version>1.5.2</alibaba.seata.version>
<spring.plugin.version>2.0.0.RELEASE</spring.plugin.version>
<guava.version>31.1-jre</guava.version>
<mica.auto.version>2.3.2</mica.auto.version>
<spring.boot.version>2.7.1</spring.boot.version>
<spring.cloud.version>2021.0.3</spring.cloud.version>
<spring.platform.version>Cairo-SR8</spring.platform.version>
<alibaba.cloud.version>2021.0.5.0</alibaba.cloud.version>
<alibaba.nacos.version>2.1.2</alibaba.nacos.version>
<spring.version>5.3.27</spring.version>
<spring.boot.version>2.7.10</spring.boot.version>
<spring.boot.admin.version>2.7.10</spring.boot.admin.version>
<spring.cloud.version>2021.0.6</spring.cloud.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
@ -86,14 +84,11 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.plugin</groupId>
<artifactId>spring-plugin-core</artifactId>
<version>${spring.plugin.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.plugin</groupId>
<artifactId>spring-plugin-metadata</artifactId>
<version>${spring.plugin.version}</version>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@ -110,9 +105,16 @@
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>${spring.platform.version}</version>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${alibaba.cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-dependencies</artifactId>
<version>${knife4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>