mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
发版 2.1.2
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ruoyi-vue-plus",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.2",
|
||||
"description": "RuoYi-Vue-Plus后台管理系统",
|
||||
"author": "LionLi",
|
||||
"license": "MIT",
|
||||
|
@ -135,7 +135,7 @@ export default {
|
||||
// 上传成功回调
|
||||
handleUploadSuccess(res, file) {
|
||||
this.$message.success("上传成功");
|
||||
this.$emit("input", res.url);
|
||||
this.$emit("input", res.data.url);
|
||||
},
|
||||
// 删除文件
|
||||
handleDelete(index) {
|
||||
@ -176,4 +176,4 @@ export default {
|
||||
.ele-upload-list__item-content-action .el-link {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -60,7 +60,7 @@ export default {
|
||||
this.$emit("input", "");
|
||||
},
|
||||
handleUploadSuccess(res) {
|
||||
this.$emit("input", res.url);
|
||||
this.$emit("input", res.data.url);
|
||||
this.loading.close();
|
||||
},
|
||||
handleBeforeUpload() {
|
||||
@ -97,4 +97,4 @@ export default {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -37,8 +37,8 @@ const user = {
|
||||
const uuid = userInfo.uuid
|
||||
return new Promise((resolve, reject) => {
|
||||
login(username, password, code, uuid).then(res => {
|
||||
setToken(res.token)
|
||||
commit('SET_TOKEN', res.token)
|
||||
setToken(res.data.token)
|
||||
commit('SET_TOKEN', res.data.token)
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
@ -50,11 +50,11 @@ const user = {
|
||||
GetInfo({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo().then(res => {
|
||||
const user = res.user
|
||||
const user = res.data.user
|
||||
const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
|
||||
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
||||
commit('SET_ROLES', res.roles)
|
||||
commit('SET_PERMISSIONS', res.permissions)
|
||||
if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
||||
commit('SET_ROLES', res.data.roles)
|
||||
commit('SET_PERMISSIONS', res.data.permissions)
|
||||
} else {
|
||||
commit('SET_ROLES', ['ROLE_DEFAULT'])
|
||||
}
|
||||
|
@ -80,6 +80,15 @@
|
||||
<span>更新日志</span>
|
||||
</div>
|
||||
<el-collapse accordion>
|
||||
<el-collapse-item title="v2.1.1 - 2021-5-21">
|
||||
<ol>
|
||||
<li>update springboot 升级 2.3.11</li>
|
||||
<li>update mybatis-plus 升级 3.4.3 分页Plus对象适配更新</li>
|
||||
<li>update 验证码生成更新为无符号整数计算</li>
|
||||
<li>update 请求响应对象 与 分页对象 结构修改 适配接口文档配置</li>
|
||||
<li>update swagger增加请求前缀</li>
|
||||
</ol>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="v2.1.1 - 2021-5-19">
|
||||
<ol>
|
||||
<li>update 配置统一提取为 properties 配置类</li>
|
||||
|
@ -99,8 +99,8 @@ export default {
|
||||
methods: {
|
||||
getCode() {
|
||||
getCodeImg().then(res => {
|
||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
||||
this.loginForm.uuid = res.uuid;
|
||||
this.codeUrl = "data:image/gif;base64," + res.data.img;
|
||||
this.loginForm.uuid = res.data.uuid;
|
||||
});
|
||||
},
|
||||
getCookie() {
|
||||
|
@ -390,14 +390,14 @@ export default {
|
||||
/** 根据角色ID查询菜单树结构 */
|
||||
getRoleMenuTreeselect(roleId) {
|
||||
return roleMenuTreeselect(roleId).then(response => {
|
||||
this.menuOptions = response.menus;
|
||||
this.menuOptions = response.data.menus;
|
||||
return response;
|
||||
});
|
||||
},
|
||||
/** 根据角色ID查询部门树结构 */
|
||||
getRoleDeptTreeselect(roleId) {
|
||||
return roleDeptTreeselect(roleId).then(response => {
|
||||
this.deptOptions = response.depts;
|
||||
this.deptOptions = response.data.depts;
|
||||
return response;
|
||||
});
|
||||
},
|
||||
@ -513,7 +513,7 @@ export default {
|
||||
this.open = true;
|
||||
this.$nextTick(() => {
|
||||
roleMenu.then(res => {
|
||||
let checkedKeys = res.checkedKeys
|
||||
let checkedKeys = res.data.checkedKeys
|
||||
checkedKeys.forEach((v) => {
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.menu.setChecked(v, true ,false);
|
||||
@ -539,7 +539,7 @@ export default {
|
||||
this.openDataScope = true;
|
||||
this.$nextTick(() => {
|
||||
roleDeptTreeselect.then(res => {
|
||||
this.$refs.dept.setCheckedKeys(res.checkedKeys);
|
||||
this.$refs.dept.setCheckedKeys(res.data.checkedKeys);
|
||||
});
|
||||
});
|
||||
this.title = "分配数据权限";
|
||||
@ -607,4 +607,4 @@ export default {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
@ -562,8 +562,8 @@ export default {
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
getUser().then(response => {
|
||||
this.postOptions = response.posts;
|
||||
this.roleOptions = response.roles;
|
||||
this.postOptions = response.data.posts;
|
||||
this.roleOptions = response.data.roles;
|
||||
this.open = true;
|
||||
this.title = "添加用户";
|
||||
this.form.password = this.initPassword;
|
||||
@ -575,11 +575,11 @@ export default {
|
||||
this.getTreeselect();
|
||||
const userId = row.userId || this.ids;
|
||||
getUser(userId).then(response => {
|
||||
this.form = response.data;
|
||||
this.postOptions = response.posts;
|
||||
this.roleOptions = response.roles;
|
||||
this.form.postIds = response.postIds;
|
||||
this.form.roleIds = response.roleIds;
|
||||
this.form = response.data.user;
|
||||
this.postOptions = response.data.posts;
|
||||
this.roleOptions = response.data.roles;
|
||||
this.form.postIds = response.data.postIds;
|
||||
this.form.roleIds = response.data.roleIds;
|
||||
this.open = true;
|
||||
this.title = "修改用户";
|
||||
this.form.password = "";
|
||||
|
@ -81,9 +81,9 @@ export default {
|
||||
methods: {
|
||||
getUser() {
|
||||
getUserProfile().then(response => {
|
||||
this.user = response.data;
|
||||
this.roleGroup = response.roleGroup;
|
||||
this.postGroup = response.postGroup;
|
||||
this.user = response.data.user;
|
||||
this.roleGroup = response.data.roleGroup;
|
||||
this.postGroup = response.data.postGroup;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ export default {
|
||||
formData.append("avatarfile", data);
|
||||
uploadAvatar(formData).then(response => {
|
||||
this.open = false;
|
||||
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
|
||||
this.options.img = process.env.VUE_APP_BASE_API + response.data.imgUrl;
|
||||
store.commit('SET_AVATAR', this.options.img);
|
||||
this.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
|
Reference in New Issue
Block a user