mirror of
https://github.com/chillzhuang/Saber.git
synced 2024-11-05 10:09:40 +08:00
🎉 3.0.1.RELEASE 架构升级适配 SpringCloud 2020.0.1
This commit is contained in:
parent
3ba18c8d97
commit
33352fb5f2
@ -1,9 +1,9 @@
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/badge/Release-V3.0.0-green.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/Release-V3.0.1-green.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Cloud-2020-blue.svg" alt="Coverage Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.4.1-blue.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-2.4.2-blue.svg" alt="Downloads">
|
||||
<a target="_blank" href="https://bladex.vip">
|
||||
<img src="https://img.shields.io/badge/Author-Small%20Chill-ff69b4.svg" alt="Downloads">
|
||||
</a>
|
||||
@ -75,7 +75,7 @@ SpringBlade
|
||||
## 项目地址
|
||||
* 后端Gitee地址:[https://gitee.com/smallc/SpringBlade](https://gitee.com/smallc/SpringBlade)
|
||||
* 后端Github地址:[https://github.com/chillzhuang/SpringBlade](https://github.com/chillzhuang/SpringBlade)
|
||||
* 后端SpringBoot版:[https://gitee.com/smallc/SpringBlade/tree/2.0-boot/](https://gitee.com/smallc/SpringBlade/tree/2.0-boot/)
|
||||
* 后端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)
|
||||
* 核心框架项目地址:[https://github.com/chillzhuang/blade-tool](https://github.com/chillzhuang/blade-tool)
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "saber-admin",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
8
public/cdn/avue/2.7.5/avue.min.js
vendored
8
public/cdn/avue/2.7.5/avue.min.js
vendored
File diff suppressed because one or more lines are too long
8
public/cdn/avue/2.7.6/avue.min.js
vendored
Normal file
8
public/cdn/avue/2.7.6/avue.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -12,7 +12,7 @@
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/element-ui/2.13.2/theme-chalk/index.css">
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css">
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/index.css">
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.7.5/index.css">
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.7.6/index.css">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.png">
|
||||
<title>Saber企业级开发平台</title>
|
||||
<style>
|
||||
@ -103,7 +103,7 @@
|
||||
<script src="<%= BASE_URL %>cdn/vue-router/3.0.1/vue-router.min.js" charset="utf-8"></script>
|
||||
<script src="<%= BASE_URL %>cdn/axios/1.0.0/axios.min.js" charset="utf-8"></script>
|
||||
<script src="<%= BASE_URL %>cdn/element-ui/2.13.2/index.js" charset="utf-8"></script>
|
||||
<script src="<%= BASE_URL %>cdn/avue/2.7.5/avue.min.js" charset="utf-8"></script>
|
||||
<script src="<%= BASE_URL %>cdn/avue/2.7.6/avue.min.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,9 +1,10 @@
|
||||
export default {
|
||||
column: [{
|
||||
label: '个人信息',
|
||||
prop: 'info',
|
||||
option: {
|
||||
submitText: '修改',
|
||||
tabs: true,
|
||||
tabsActive: 1,
|
||||
group: [
|
||||
{
|
||||
label: '个人信息',
|
||||
prop: 'info',
|
||||
column: [{
|
||||
label: '头像',
|
||||
type: 'upload',
|
||||
@ -42,12 +43,10 @@ export default {
|
||||
span: 12,
|
||||
row: true,
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
label: '修改密码',
|
||||
prop: 'password',
|
||||
option: {
|
||||
submitText: '修改',
|
||||
},
|
||||
{
|
||||
label: '修改密码',
|
||||
prop: 'password',
|
||||
column: [{
|
||||
label: '原密码',
|
||||
span: 12,
|
||||
@ -68,5 +67,5 @@ export default {
|
||||
prop: 'newPassword1'
|
||||
}]
|
||||
}
|
||||
}]
|
||||
],
|
||||
}
|
||||
|
93
src/util/func.js
Normal file
93
src/util/func.js
Normal file
@ -0,0 +1,93 @@
|
||||
/**
|
||||
* 通用工具类
|
||||
*/
|
||||
export default class func {
|
||||
/**
|
||||
* 不为空
|
||||
* @param val
|
||||
* @returns {boolean}
|
||||
*/
|
||||
static notEmpty(val) {
|
||||
return !this.isEmpty(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为定义
|
||||
* @param val
|
||||
* @returns {boolean}
|
||||
*/
|
||||
static isUndefined(val) {
|
||||
return val === null || typeof val === 'undefined';
|
||||
}
|
||||
|
||||
/**
|
||||
* 为空
|
||||
* @param val
|
||||
* @returns {boolean}
|
||||
*/
|
||||
static isEmpty(val) {
|
||||
if (
|
||||
val === null ||
|
||||
typeof val === 'undefined' ||
|
||||
(typeof val === 'string' && val === '' && val !== 'undefined')
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 强转int型
|
||||
* @param val
|
||||
* @param defaultValue
|
||||
* @returns {number}
|
||||
*/
|
||||
static toInt(val, defaultValue) {
|
||||
if (this.isEmpty(val)) {
|
||||
return defaultValue === undefined ? -1 : defaultValue;
|
||||
}
|
||||
const num = parseInt(val, 0);
|
||||
return Number.isNaN(num) ? (defaultValue === undefined ? -1 : defaultValue) : num;
|
||||
}
|
||||
|
||||
/**
|
||||
* Json强转为Form类型
|
||||
* @param obj
|
||||
* @returns {FormData}
|
||||
*/
|
||||
static toFormData(obj) {
|
||||
const data = new FormData();
|
||||
Object.keys(obj).forEach(key => {
|
||||
data.append(key, Array.isArray(obj[key]) ? obj[key].join(',') : obj[key]);
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* date类转为字符串格式
|
||||
* @param date
|
||||
* @param format
|
||||
* @returns {null}
|
||||
*/
|
||||
static format(date, format = 'YYYY-MM-DD HH:mm:ss') {
|
||||
return date ? date.format(format) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据逗号联合
|
||||
* @param arr
|
||||
* @returns {string}
|
||||
*/
|
||||
static join(arr) {
|
||||
return arr ? arr.join(',') : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据逗号分隔
|
||||
* @param str
|
||||
* @returns {string}
|
||||
*/
|
||||
static split(str) {
|
||||
return str ? String(str).split(',') : '';
|
||||
}
|
||||
}
|
@ -116,7 +116,7 @@
|
||||
{
|
||||
label: "菜单图标",
|
||||
prop: "source",
|
||||
type: "icon-select",
|
||||
type: "icon",
|
||||
slot: true,
|
||||
iconList: iconList,
|
||||
rules: [
|
||||
|
@ -1,83 +1,92 @@
|
||||
<template>
|
||||
<div>
|
||||
<basic-container>
|
||||
<avue-tabs :option="option"
|
||||
<avue-form :option="option"
|
||||
v-model="form"
|
||||
@change="handleChange"
|
||||
@submit="handleSubmit"></avue-tabs>
|
||||
@tab-click="handleTabClick"
|
||||
@submit="handleSubmit"></avue-form>
|
||||
</basic-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import option from "@/const/user/info";
|
||||
import {getUserInfo, update, updatePassword} from "@/api/system/user";
|
||||
import option from "@/const/user/info";
|
||||
import {getUserInfo, update, updatePassword} from "@/api/system/user";
|
||||
import func from "@/util/func";
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
type: "info",
|
||||
option: option,
|
||||
form: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.handleWitch();
|
||||
},
|
||||
methods: {
|
||||
handleSubmit() {
|
||||
if (this.type === "info") {
|
||||
update(this.form).then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "修改信息成功!"
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: res.data.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
updatePassword(this.form.oldPassword, this.form.newPassword, this.form.newPassword1).then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "修改密码成功!"
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: res.data.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleWitch() {
|
||||
if (this.type === "info") {
|
||||
getUserInfo().then(res => {
|
||||
const user = res.data.data;
|
||||
this.form = {
|
||||
id: user.id,
|
||||
avatar: user.avatar,
|
||||
name: user.name,
|
||||
realName: user.realName,
|
||||
phone: user.phone,
|
||||
email: user.email,
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handleChange(item) {
|
||||
this.type = item.prop;
|
||||
this.handleWitch();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
index: 0,
|
||||
option: option,
|
||||
form: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.handleWitch();
|
||||
},
|
||||
methods: {
|
||||
handleSubmit(form, done) {
|
||||
if (this.index === 0) {
|
||||
update(form).then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "修改信息成功!"
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: res.data.msg
|
||||
});
|
||||
}
|
||||
done();
|
||||
}, error => {
|
||||
window.console.log(error);
|
||||
done();
|
||||
})
|
||||
} else {
|
||||
updatePassword(form.oldPassword, form.newPassword, form.newPassword1).then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "修改密码成功!"
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: res.data.msg
|
||||
});
|
||||
}
|
||||
done();
|
||||
}, error => {
|
||||
window.console.log(error);
|
||||
done();
|
||||
})
|
||||
}
|
||||
},
|
||||
handleWitch() {
|
||||
if (this.index === 0) {
|
||||
getUserInfo().then(res => {
|
||||
const user = res.data.data;
|
||||
this.form = {
|
||||
id: user.id,
|
||||
avatar: user.avatar,
|
||||
name: user.name,
|
||||
realName: user.realName,
|
||||
phone: user.phone,
|
||||
email: user.email,
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handleTabClick(tabs) {
|
||||
this.index = func.toInt(tabs.index);
|
||||
this.handleWitch();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
@ -125,6 +125,19 @@
|
||||
<el-row>
|
||||
<basic-container>
|
||||
<el-collapse v-model="logActiveNames" @change="handleChange">
|
||||
<el-collapse-item title="3.0.1.发布 新增Swagger独立网关,优化代码生成" name="23">
|
||||
<div>1.升级 SpringBoot 至 2.4.2</div>
|
||||
<div>2.升级 SpringCloud 至 2020.0.1</div>
|
||||
<div>3.升级 Mybatis-Plus 至 3.4.2</div>
|
||||
<div>4.升级 Avue 至 2.7.6</div>
|
||||
<div>5.升级适配 Knife4j 2.0.8</div>
|
||||
<div>6.新增独立的Swagger网关</div>
|
||||
<div>7.新增代码生成的SqlServer驱动判断</div>
|
||||
<div>8.新增代码生成菜单Sql的ID</div>
|
||||
<div>9.优化SentinelFeign实现以适配最新API</div>
|
||||
<div>10.优化Saber个人中心实现以适配最新API</div>
|
||||
<div>11.修复Saber菜单图标选择失效的问题</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="3.0.0.发布 架构升级适配SpringCloud2020" name="22">
|
||||
<div>1.升级 SpringBoot 至 2.4.1</div>
|
||||
<div>2.升级 SpringCloud 至 2020.0.0</div>
|
||||
@ -364,7 +377,7 @@
|
||||
data() {
|
||||
return {
|
||||
activeNames: ['1', '2', '3', '5'],
|
||||
logActiveNames: ['22']
|
||||
logActiveNames: ['23']
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
Loading…
Reference in New Issue
Block a user