From adcb6194c86787ee782d79aefd459eea87eb7777 Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Fri, 19 Nov 2021 17:58:55 +0800
Subject: [PATCH 01/12] =?UTF-8?q?=E6=96=B0=E5=A2=9Etab=E5=AF=B9=E8=B1=A1?=
=?UTF-8?q?=E7=AE=80=E5=8C=96=E9=A1=B5=E7=AD=BE=E6=93=8D=E4=BD=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/layout/components/TagsView/index.vue | 19 ++----
ruoyi-ui/src/plugins/index.js | 3 +
ruoyi-ui/src/plugins/tab.js | 68 +++++++++++++++++++
ruoyi-ui/src/store/modules/tagsView.js | 2 +-
ruoyi-ui/src/utils/request.js | 15 ++--
ruoyi-ui/src/views/monitor/job/log.vue | 4 +-
ruoyi-ui/src/views/system/dict/data.vue | 14 ++++
ruoyi-ui/src/views/system/role/authUser.vue | 4 +-
ruoyi-ui/src/views/system/user/authRole.vue | 4 +-
.../views/system/user/profile/resetPwd.vue | 3 +-
.../views/system/user/profile/userInfo.vue | 3 +-
ruoyi-ui/src/views/tool/gen/editTable.vue | 4 +-
12 files changed, 108 insertions(+), 35 deletions(-)
create mode 100644 ruoyi-ui/src/plugins/tab.js
diff --git a/ruoyi-ui/src/layout/components/TagsView/index.vue b/ruoyi-ui/src/layout/components/TagsView/index.vue
index e43aa2e4..2381d2e0 100644
--- a/ruoyi-ui/src/layout/components/TagsView/index.vue
+++ b/ruoyi-ui/src/layout/components/TagsView/index.vue
@@ -152,31 +152,24 @@ export default {
})
},
refreshSelectedTag(view) {
- this.$store.dispatch('tagsView/delCachedView', view).then(() => {
- const { fullPath } = view
- this.$nextTick(() => {
- this.$router.replace({
- path: '/redirect' + fullPath
- })
- })
- })
+ this.$tab.refreshPage(view);
},
closeSelectedTag(view) {
- this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
+ this.$tab.closePage(view).then(({ visitedViews }) => {
if (this.isActive(view)) {
this.toLastView(visitedViews, view)
}
})
},
closeRightTags() {
- this.$store.dispatch('tagsView/delRightTags', this.selectedTag).then(visitedViews => {
+ this.$tab.closeRightPage(this.selectedTag).then(visitedViews => {
if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) {
this.toLastView(visitedViews)
}
})
},
closeLeftTags() {
- this.$store.dispatch('tagsView/delLeftTags', this.selectedTag).then(visitedViews => {
+ this.$tab.closeLeftPage(this.selectedTag).then(visitedViews => {
if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) {
this.toLastView(visitedViews)
}
@@ -184,12 +177,12 @@ export default {
},
closeOthersTags() {
this.$router.push(this.selectedTag).catch(()=>{});
- this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => {
+ this.$tab.closeOtherPage(this.selectedTag).then(() => {
this.moveToCurrentTag()
})
},
closeAllTags(view) {
- this.$store.dispatch('tagsView/delAllViews').then(({ visitedViews }) => {
+ this.$tab.closeAllPage().then(({ visitedViews }) => {
if (this.affixTags.some(tag => tag.path === this.$route.path)) {
return
}
diff --git a/ruoyi-ui/src/plugins/index.js b/ruoyi-ui/src/plugins/index.js
index 7cc83a4c..9bc6eacd 100644
--- a/ruoyi-ui/src/plugins/index.js
+++ b/ruoyi-ui/src/plugins/index.js
@@ -1,3 +1,4 @@
+import tab from './tab'
import auth from './auth'
import cache from './cache'
import modal from './modal'
@@ -5,6 +6,8 @@ import download from './download'
export default {
install(Vue) {
+ // 页签操作
+ Vue.prototype.$tab = tab
// 认证对象
Vue.prototype.$auth = auth
// 缓存对象
diff --git a/ruoyi-ui/src/plugins/tab.js b/ruoyi-ui/src/plugins/tab.js
new file mode 100644
index 00000000..f2d7b22b
--- /dev/null
+++ b/ruoyi-ui/src/plugins/tab.js
@@ -0,0 +1,68 @@
+import store from '@/store'
+import router from '@/router';
+
+export default {
+ // 刷新当前tab页签
+ refreshPage(obj) {
+ const { path, matched } = router.currentRoute;
+ if (obj === undefined) {
+ matched.forEach((m) => {
+ if (m.components && m.components.default && m.components.default.name) {
+ if (!['Layout', 'ParentView'].includes(m.components.default.name)) {
+ obj = { name: m.components.default.name, path: path };
+ }
+ }
+ });
+ }
+ return store.dispatch('tagsView/delCachedView', obj).then(() => {
+ const { path } = obj
+ router.replace({
+ path: '/redirect' + path
+ })
+ })
+
+
+ },
+ // 关闭当前tab页签,打开新页签
+ closeOpenPage(obj) {
+ store.dispatch("tagsView/delView", router.currentRoute);
+ if (obj !== undefined) {
+ return router.push(obj);
+ }
+ },
+ // 关闭指定tab页签
+ closePage(obj) {
+ if (obj === undefined) {
+ return store.dispatch('tagsView/delView', router.currentRoute).then(({ lastPath }) => {
+ return router.push(lastPath || '/');
+ });
+ }
+ return store.dispatch('tagsView/delView', obj);
+ },
+ // 关闭所有tab页签
+ closeAllPage() {
+ return store.dispatch('tagsView/delAllViews');
+ },
+ // 关闭左侧tab页签
+ closeLeftPage(obj) {
+ return store.dispatch('tagsView/delLeftTags', obj || router.currentRoute);
+ },
+ // 关闭右侧tab页签
+ closeRightPage(obj) {
+ return store.dispatch('tagsView/delRightTags', obj || router.currentRoute);
+ },
+ // 关闭其他tab页签
+ closeOtherPage(obj) {
+ return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
+ },
+ // 添加tab页签
+ addPage(title, url) {
+ var obj = { path: url, meta: { title: title } }
+ store.dispatch('tagsView/addView', obj);
+ return router.push(url);
+ },
+ // 修改tab页签
+ updatePage(obj) {
+ return store.dispatch('tagsView/updateVisitedView', obj);
+ }
+}
diff --git a/ruoyi-ui/src/store/modules/tagsView.js b/ruoyi-ui/src/store/modules/tagsView.js
index 93d44040..9acf5dc5 100644
--- a/ruoyi-ui/src/store/modules/tagsView.js
+++ b/ruoyi-ui/src/store/modules/tagsView.js
@@ -14,7 +14,7 @@ const mutations = {
},
ADD_CACHED_VIEW: (state, view) => {
if (state.cachedViews.includes(view.name)) return
- if (!view.meta.noCache) {
+ if (view.meta && !view.meta.noCache) {
state.cachedViews.push(view.name)
}
},
diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index 48f3da19..86342eab 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -48,19 +48,16 @@ service.interceptors.response.use(res => {
return res.data
}
if (code === 401) {
- let doms = document.getElementsByClassName('el-message-box')[0]
- if(doms === undefined){
- MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
+ MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
confirmButtonText: '重新登录',
cancelButtonText: '取消',
type: 'warning'
}
- ).then(() => {
- store.dispatch('LogOut').then(() => {
- location.href = '/index';
- })
- }).catch(() => {});
- }
+ ).then(() => {
+ store.dispatch('LogOut').then(() => {
+ location.href = '/index';
+ })
+ }).catch(() => {});
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) {
Message({
diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue
index f2754d70..5fd393a0 100644
--- a/ruoyi-ui/src/views/monitor/job/log.vue
+++ b/ruoyi-ui/src/views/monitor/job/log.vue
@@ -245,8 +245,8 @@ export default {
},
// 返回按钮
handleClose() {
- this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.push({ path: "/monitor/job" });
+ const obj = { path: "/monitor/job" };
+ this.$tab.closeOpenPage(obj);
},
/** 搜索按钮操作 */
handleQuery() {
diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue
index 45327c02..aa878bdd 100644
--- a/ruoyi-ui/src/views/system/dict/data.vue
+++ b/ruoyi-ui/src/views/system/dict/data.vue
@@ -79,6 +79,15 @@
v-hasPermi="['system:dict:export']"
>导出
+
+ 关闭
+
@@ -316,6 +325,11 @@ export default {
this.queryParams.pageNum = 1;
this.getList();
},
+ // 返回按钮
+ handleClose() {
+ const obj = { path: "/system/dict" };
+ this.$tab.closeOpenPage(obj);
+ },
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
diff --git a/ruoyi-ui/src/views/system/role/authUser.vue b/ruoyi-ui/src/views/system/role/authUser.vue
index e18ea8b3..dd188125 100644
--- a/ruoyi-ui/src/views/system/role/authUser.vue
+++ b/ruoyi-ui/src/views/system/role/authUser.vue
@@ -153,8 +153,8 @@ export default {
},
// 返回按钮
handleClose() {
- this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.push({ path: "/system/role" });
+ const obj = { path: "/system/role" };
+ this.$tab.closeOpenPage(obj);
},
/** 搜索按钮操作 */
handleQuery() {
diff --git a/ruoyi-ui/src/views/system/user/authRole.vue b/ruoyi-ui/src/views/system/user/authRole.vue
index a4bcbe3f..b184de25 100644
--- a/ruoyi-ui/src/views/system/user/authRole.vue
+++ b/ruoyi-ui/src/views/system/user/authRole.vue
@@ -109,8 +109,8 @@ export default {
},
/** 关闭按钮 */
close() {
- this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.push({ path: "/system/user" });
+ const obj = { path: "/system/user" };
+ this.$tab.closeOpenPage(obj);
},
},
};
diff --git a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue
index e0192684..3437abca 100644
--- a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue
+++ b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue
@@ -64,8 +64,7 @@ export default {
});
},
close() {
- this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.push({ path: "/index" });
+ this.$tab.closePage();
}
}
};
diff --git a/ruoyi-ui/src/views/system/user/profile/userInfo.vue b/ruoyi-ui/src/views/system/user/profile/userInfo.vue
index 978cddf4..ac7c44a6 100644
--- a/ruoyi-ui/src/views/system/user/profile/userInfo.vue
+++ b/ruoyi-ui/src/views/system/user/profile/userInfo.vue
@@ -68,8 +68,7 @@ export default {
});
},
close() {
- this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.push({ path: "/index" });
+ this.$tab.closePage();
}
}
};
diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/gen/editTable.vue
index a00a629e..4da627fb 100644
--- a/ruoyi-ui/src/views/tool/gen/editTable.vue
+++ b/ruoyi-ui/src/views/tool/gen/editTable.vue
@@ -211,8 +211,8 @@ export default {
},
/** 关闭按钮 */
close() {
- this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.push({ path: "/tool/gen", query: { t: Date.now(), pageNum: this.$route.query.pageNum } })
+ const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: this.$route.query.pageNum } };
+ this.$tab.closeOpenPage(obj);
}
},
mounted() {
From 451d218f4bea0f401d424026355ba88cb7c2355e Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Mon, 22 Nov 2021 18:13:39 +0800
Subject: [PATCH 02/12] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/RightToolbar/index.vue | 2 +-
ruoyi-ui/src/plugins/tab.js | 4 +--
ruoyi-ui/src/views/login.vue | 8 +++--
ruoyi-ui/src/views/system/dept/index.vue | 6 ++--
ruoyi-ui/src/views/system/dict/data.vue | 2 +-
.../src/views/system/logininfor/index.vue | 4 +--
ruoyi-ui/src/views/system/menu/index.vue | 35 ++++++++++---------
ruoyi-ui/src/views/system/operlog/index.vue | 4 +--
ruoyi-ui/src/views/system/role/index.vue | 3 +-
ruoyi-ui/src/views/system/role/selectUser.vue | 4 +++
ruoyi-ui/src/views/system/user/index.vue | 3 +-
.../views/system/user/profile/resetPwd.vue | 9 ++---
.../views/system/user/profile/userAvatar.vue | 4 +--
13 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/ruoyi-ui/src/components/RightToolbar/index.vue b/ruoyi-ui/src/components/RightToolbar/index.vue
index e3e1286f..f7663a3c 100644
--- a/ruoyi-ui/src/components/RightToolbar/index.vue
+++ b/ruoyi-ui/src/components/RightToolbar/index.vue
@@ -62,7 +62,7 @@ export default {
},
// 右侧列表元素变化
dataChange(data) {
- for (var item in this.columns) {
+ for (let item in this.columns) {
const key = this.columns[item].key;
this.columns[item].visible = !data.includes(key);
}
diff --git a/ruoyi-ui/src/plugins/tab.js b/ruoyi-ui/src/plugins/tab.js
index f2d7b22b..95a3848b 100644
--- a/ruoyi-ui/src/plugins/tab.js
+++ b/ruoyi-ui/src/plugins/tab.js
@@ -20,8 +20,6 @@ export default {
path: '/redirect' + path
})
})
-
-
},
// 关闭当前tab页签,打开新页签
closeOpenPage(obj) {
@@ -56,7 +54,7 @@ export default {
return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
},
// 添加tab页签
- addPage(title, url) {
+ openPage(title, url) {
var obj = { path: url, meta: { title: title } }
store.dispatch('tagsView/addView', obj);
return router.push(url);
diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue
index 255eafca..3baaf243 100644
--- a/ruoyi-ui/src/views/login.vue
+++ b/ruoyi-ui/src/views/login.vue
@@ -3,7 +3,12 @@
若依后台管理系统
-
+
@@ -66,7 +71,6 @@ export default {
data() {
return {
codeUrl: "",
- cookiePassword: "",
loginForm: {
username: "admin",
password: "admin123",
diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue
index ba5752db..66e62964 100644
--- a/ruoyi-ui/src/views/system/dept/index.vue
+++ b/ruoyi-ui/src/views/system/dept/index.vue
@@ -179,8 +179,6 @@ export default {
isExpandAll: true,
// 重新渲染表格状态
refreshTable: true,
- // 是否展开
- expand: false,
// 查询参数
queryParams: {
deptName: undefined,
@@ -276,7 +274,7 @@ export default {
this.open = true;
this.title = "添加部门";
listDept().then(response => {
- this.deptOptions = this.handleTree(response.data, "deptId");
+ this.deptOptions = this.handleTree(response.data, "deptId");
});
},
/** 展开/折叠操作 */
@@ -296,7 +294,7 @@ export default {
this.title = "修改部门";
});
listDeptExcludeChild(row.deptId).then(response => {
- this.deptOptions = this.handleTree(response.data, "deptId");
+ this.deptOptions = this.handleTree(response.data, "deptId");
});
},
/** 提交按钮 */
diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue
index aa878bdd..c08c28a8 100644
--- a/ruoyi-ui/src/views/system/dict/data.vue
+++ b/ruoyi-ui/src/views/system/dict/data.vue
@@ -325,7 +325,7 @@ export default {
this.queryParams.pageNum = 1;
this.getList();
},
- // 返回按钮
+ /** 返回按钮操作 */
handleClose() {
const obj = { path: "/system/dict" };
this.$tab.closeOpenPage(obj);
diff --git a/ruoyi-ui/src/views/system/logininfor/index.vue b/ruoyi-ui/src/views/system/logininfor/index.vue
index 7155b850..c7077b3f 100644
--- a/ruoyi-ui/src/views/system/logininfor/index.vue
+++ b/ruoyi-ui/src/views/system/logininfor/index.vue
@@ -6,8 +6,8 @@
v-model="queryParams.ipaddr"
placeholder="请输入登录地址"
clearable
+ size="small"
style="width: 240px;"
- size="small"
@keyup.enter.native="handleQuery"
/>
@@ -16,8 +16,8 @@
v-model="queryParams.userName"
placeholder="请输入用户名称"
clearable
+ size="small"
style="width: 240px;"
- size="small"
@keyup.enter.native="handleQuery"
/>
diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue
index e2390430..f203e692 100644
--- a/ruoyi-ui/src/views/system/menu/index.vue
+++ b/ruoyi-ui/src/views/system/menu/index.vue
@@ -78,7 +78,8 @@
-
-
-
+
+
-
-
+
+
@@ -172,8 +173,8 @@
-
-
+
+
@@ -194,8 +195,8 @@
-
-
+
+
@@ -205,8 +206,8 @@
-
-
+
+
@@ -216,8 +217,8 @@
-
-
+
+
@@ -230,8 +231,8 @@
-
-
+
+
@@ -247,8 +248,8 @@
-
-
+
+
diff --git a/ruoyi-ui/src/views/system/operlog/index.vue b/ruoyi-ui/src/views/system/operlog/index.vue
index f94bd27c..f3ebb03f 100644
--- a/ruoyi-ui/src/views/system/operlog/index.vue
+++ b/ruoyi-ui/src/views/system/operlog/index.vue
@@ -6,8 +6,8 @@
v-model="queryParams.title"
placeholder="请输入系统模块"
clearable
- style="width: 240px;"
size="small"
+ style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
@@ -16,8 +16,8 @@
v-model="queryParams.operName"
placeholder="请输入操作人员"
clearable
- style="width: 240px;"
size="small"
+ style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue
index b2cfd6bf..5b99d179 100644
--- a/ruoyi-ui/src/views/system/role/index.vue
+++ b/ruoyi-ui/src/views/system/role/index.vue
@@ -355,8 +355,7 @@ export default {
/** 查询角色列表 */
getList() {
this.loading = true;
- listRole(this.addDateRange(this.queryParams, this.dateRange)).then(
- response => {
+ listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.roleList = response.rows;
this.total = response.total;
this.loading = false;
diff --git a/ruoyi-ui/src/views/system/role/selectUser.vue b/ruoyi-ui/src/views/system/role/selectUser.vue
index a9e2ce0f..02610d8e 100644
--- a/ruoyi-ui/src/views/system/role/selectUser.vue
+++ b/ruoyi-ui/src/views/system/role/selectUser.vue
@@ -123,6 +123,10 @@ export default {
handleSelectUser() {
const roleId = this.queryParams.roleId;
const userIds = this.userIds.join(",");
+ if (userIds == "") {
+ this.$modal.msgError("请选择要分配的用户");
+ return;
+ }
authUserSelectAll({ roleId: roleId, userIds: userIds }).then(res => {
this.$modal.msgSuccess(res.msg);
if (res.code === 200) {
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index 2b7283f9..3525c9b3 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -206,7 +206,7 @@
-
+
@@ -652,7 +652,6 @@ export default {
/** 下载模板操作 */
importTemplate() {
this.download('system/user/importTemplate', {
- ...this.queryParams
}, `user_template_${new Date().getTime()}.xlsx`)
},
// 文件上传中处理
diff --git a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue
index 3437abca..06715e5c 100644
--- a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue
+++ b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue
@@ -29,7 +29,6 @@ export default {
}
};
return {
- test: "1test",
user: {
oldPassword: undefined,
newPassword: undefined,
@@ -55,11 +54,9 @@ export default {
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
- updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
- response => {
- this.$modal.msgSuccess("修改成功");
- }
- );
+ updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
+ this.$modal.msgSuccess("修改成功");
+ });
}
});
},
diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue
index ce934627..835602e8 100644
--- a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue
+++ b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue
@@ -1,7 +1,7 @@
-
+
Date: Mon, 22 Nov 2021 18:13:49 +0800
Subject: [PATCH 03/12] =?UTF-8?q?=E5=8D=87=E7=BA=A7js-cookie=E5=88=B0?=
=?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC3.0.1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json
index a77f7ef4..d3f9ab6e 100644
--- a/ruoyi-ui/package.json
+++ b/ruoyi-ui/package.json
@@ -46,7 +46,7 @@
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
"js-beautify": "1.13.0",
- "js-cookie": "2.2.1",
+ "js-cookie": "3.0.1",
"jsencrypt": "3.2.1",
"nprogress": "0.2.0",
"quill": "1.3.7",
From b6a71fe988e2ac12e0be8fdfed2ff1550d39ada2 Mon Sep 17 00:00:00 2001
From: Ricky
Date: Mon, 22 Nov 2021 22:54:24 +0800
Subject: [PATCH 04/12] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/ruoyi/system/controller/SysProfileController.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysProfileController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysProfileController.java
index 0e04f799..4b747ab2 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysProfileController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysProfileController.java
@@ -64,6 +64,9 @@ public class SysProfileController extends BaseController
@PutMapping
public AjaxResult updateProfile(@RequestBody SysUser user)
{
+ LoginUser loginUser = SecurityUtils.getLoginUser();
+ SysUser sysUser = loginUser.getSysUser();
+ user.setUserName(sysUser.getUserName());
if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
@@ -74,8 +77,6 @@ public class SysProfileController extends BaseController
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
- LoginUser loginUser = SecurityUtils.getLoginUser();
- SysUser sysUser = loginUser.getSysUser();
user.setUserId(sysUser.getUserId());
user.setPassword(null);
if (userService.updateUserProfile(user) > 0)
From 337d1bab024fbb004c10ffca5b871138c3db8298 Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Wed, 24 Nov 2021 16:37:20 +0800
Subject: [PATCH 05/12] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=89=8D=E7=AB=AF?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/package.json | 2 +-
ruoyi-ui/src/components/Breadcrumb/index.vue | 2 +-
ruoyi-ui/src/components/RuoYi/Doc/index.vue | 2 +-
ruoyi-ui/src/components/RuoYi/Git/index.vue | 2 +-
ruoyi-ui/src/components/SizeSelect/index.vue | 3 +--
ruoyi-ui/src/layout/components/Sidebar/Logo.vue | 2 +-
ruoyi-ui/src/layout/index.vue | 2 +-
ruoyi-ui/src/main.js | 2 +-
ruoyi-ui/src/router/index.js | 10 +++++-----
ruoyi-ui/src/store/modules/permission.js | 4 ++--
ruoyi-ui/src/store/modules/settings.js | 2 +-
ruoyi-ui/src/utils/dict/index.js | 2 +-
12 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json
index d3f9ab6e..73c1818c 100644
--- a/ruoyi-ui/package.json
+++ b/ruoyi-ui/package.json
@@ -56,7 +56,7 @@
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-router": "3.4.9",
- "vue-meta": "^2.4.0",
+ "vue-meta": "2.4.0",
"vuedraggable": "2.24.3",
"vuex": "3.6.0"
},
diff --git a/ruoyi-ui/src/components/Breadcrumb/index.vue b/ruoyi-ui/src/components/Breadcrumb/index.vue
index dfeca60f..a5f907ac 100644
--- a/ruoyi-ui/src/components/Breadcrumb/index.vue
+++ b/ruoyi-ui/src/components/Breadcrumb/index.vue
@@ -2,7 +2,7 @@
- {{ item.meta.title }}
+ {{ item.meta.title }}
{{ item.meta.title }}
diff --git a/ruoyi-ui/src/components/RuoYi/Doc/index.vue b/ruoyi-ui/src/components/RuoYi/Doc/index.vue
index 71678853..6b0403e9 100644
--- a/ruoyi-ui/src/components/RuoYi/Doc/index.vue
+++ b/ruoyi-ui/src/components/RuoYi/Doc/index.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/ruoyi-ui/src/components/RuoYi/Git/index.vue b/ruoyi-ui/src/components/RuoYi/Git/index.vue
index 95431b5f..4edb0688 100644
--- a/ruoyi-ui/src/components/RuoYi/Git/index.vue
+++ b/ruoyi-ui/src/components/RuoYi/Git/index.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/ruoyi-ui/src/components/SizeSelect/index.vue b/ruoyi-ui/src/components/SizeSelect/index.vue
index 5503b971..00496f71 100644
--- a/ruoyi-ui/src/components/SizeSelect/index.vue
+++ b/ruoyi-ui/src/components/SizeSelect/index.vue
@@ -5,8 +5,7 @@
- {{
- item.label }}
+ {{ item.label }}
diff --git a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue
index 82f3d581..c8401c51 100644
--- a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue
+++ b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue
@@ -29,7 +29,7 @@ export default {
variables() {
return variables;
},
- sideTheme() {
+ sideTheme() {
return this.$store.state.settings.sideTheme
}
},
diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue
index 718723ea..4d6fe024 100644
--- a/ruoyi-ui/src/layout/index.vue
+++ b/ruoyi-ui/src/layout/index.vue
@@ -98,7 +98,7 @@ export default {
}
.hideSidebar .fixed-header {
- width: calc(100% - 54px)
+ width: calc(100% - 54px);
}
.mobile .fixed-header {
diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js
index 83b07910..729467ae 100644
--- a/ruoyi-ui/src/main.js
+++ b/ruoyi-ui/src/main.js
@@ -10,7 +10,7 @@ import '@/assets/styles/ruoyi.scss' // ruoyi css
import App from './App'
import store from './store'
import router from './router'
-import directive from './directive' //directive
+import directive from './directive' // directive
import plugins from './plugins' // plugins
import { download } from '@/utils/request'
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index 0bde090c..c1fcfc14 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -95,7 +95,7 @@ export const constantRoutes = [
path: 'role/:userId(\\d+)',
component: (resolve) => require(['@/views/system/user/authRole'], resolve),
name: 'AuthRole',
- meta: { title: '分配角色', activeMenu: '/system/user'}
+ meta: { title: '分配角色', activeMenu: '/system/user' }
}
]
},
@@ -108,7 +108,7 @@ export const constantRoutes = [
path: 'user/:roleId(\\d+)',
component: (resolve) => require(['@/views/system/role/authUser'], resolve),
name: 'AuthUser',
- meta: { title: '分配用户', activeMenu: '/system/role'}
+ meta: { title: '分配用户', activeMenu: '/system/role' }
}
]
},
@@ -121,7 +121,7 @@ export const constantRoutes = [
path: 'index/:dictId(\\d+)',
component: (resolve) => require(['@/views/system/dict/data'], resolve),
name: 'Data',
- meta: { title: '字典数据', activeMenu: '/system/dict'}
+ meta: { title: '字典数据', activeMenu: '/system/dict' }
}
]
},
@@ -134,7 +134,7 @@ export const constantRoutes = [
path: 'index',
component: (resolve) => require(['@/views/monitor/job/log'], resolve),
name: 'JobLog',
- meta: { title: '调度日志', activeMenu: '/monitor/job'}
+ meta: { title: '调度日志', activeMenu: '/monitor/job' }
}
]
},
@@ -147,7 +147,7 @@ export const constantRoutes = [
path: 'index',
component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
name: 'GenEdit',
- meta: { title: '修改生成配置', activeMenu: '/tool/gen'}
+ meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
}
]
}
diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js
index 4c8ed023..2c2120a8 100644
--- a/ruoyi-ui/src/store/modules/permission.js
+++ b/ruoyi-ui/src/store/modules/permission.js
@@ -1,7 +1,7 @@
import { constantRoutes } from '@/router'
import { getRouters } from '@/api/menu'
import Layout from '@/layout/index'
-import ParentView from '@/components/ParentView';
+import ParentView from '@/components/ParentView'
import InnerLink from '@/layout/components/InnerLink'
const permission = {
@@ -24,7 +24,7 @@ const permission = {
// 顶部导航菜单默认添加统计报表栏指向首页
const index = [{
path: 'index',
- meta: { title: '统计报表', icon: 'dashboard'}
+ meta: { title: '统计报表', icon: 'dashboard' }
}]
state.topbarRouters = routes.concat(index);
},
diff --git a/ruoyi-ui/src/store/modules/settings.js b/ruoyi-ui/src/store/modules/settings.js
index 3277a60d..d08d8c2c 100644
--- a/ruoyi-ui/src/store/modules/settings.js
+++ b/ruoyi-ui/src/store/modules/settings.js
@@ -8,7 +8,7 @@ const state = {
theme: storageSetting.theme || '#409EFF',
sideTheme: storageSetting.sideTheme || sideTheme,
showSettings: showSettings,
- topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
+ topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView,
fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
diff --git a/ruoyi-ui/src/utils/dict/index.js b/ruoyi-ui/src/utils/dict/index.js
index 66ddfef9..d6fdb802 100644
--- a/ruoyi-ui/src/utils/dict/index.js
+++ b/ruoyi-ui/src/utils/dict/index.js
@@ -5,7 +5,7 @@ export default function(Vue, options) {
mergeOptions(options)
Vue.mixin({
data() {
- if (this.$options.dicts === undefined || this.$options.dicts === null) {
+ if (this.$options === undefined || this.$options.dicts === undefined || this.$options.dicts === null) {
return {}
}
const dict = new Dict()
From 961825d25cecd6ad84b9ae92c28d489c35b30484 Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Wed, 24 Nov 2021 16:39:55 +0800
Subject: [PATCH 06/12] update bin
---
bin/run-auth.bat | 2 +-
bin/run-gateway.bat | 2 +-
bin/run-modules-file.bat | 2 +-
bin/run-modules-gen.bat | 2 +-
bin/run-modules-job.bat | 2 +-
bin/run-modules-system.bat | 2 +-
bin/run-monitor.bat | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/bin/run-auth.bat b/bin/run-auth.bat
index 84de0ed6..4c09a743 100644
--- a/bin/run-auth.bat
+++ b/bin/run-auth.bat
@@ -8,7 +8,7 @@ cd ../ruoyi-auth/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
-java -Dfile.encoding=utf-8 -jar %JAVA_OPTS% ruoyi-auth.jar
+java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-auth.jar
cd bin
pause
\ No newline at end of file
diff --git a/bin/run-gateway.bat b/bin/run-gateway.bat
index 21bfa24b..d0d78af5 100644
--- a/bin/run-gateway.bat
+++ b/bin/run-gateway.bat
@@ -8,7 +8,7 @@ cd ../ruoyi-gateway/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
-java -Dfile.encoding=utf-8 -jar %JAVA_OPTS% ruoyi-gateway.jar
+java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-gateway.jar
cd bin
pause
\ No newline at end of file
diff --git a/bin/run-modules-file.bat b/bin/run-modules-file.bat
index e160cdb2..61f89068 100644
--- a/bin/run-modules-file.bat
+++ b/bin/run-modules-file.bat
@@ -8,7 +8,7 @@ cd ../ruoyi-modules/ruoyi-file/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
-java -Dfile.encoding=utf-8 -jar %JAVA_OPTS% ruoyi-modules-file.jar
+java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-file.jar
cd bin
pause
\ No newline at end of file
diff --git a/bin/run-modules-gen.bat b/bin/run-modules-gen.bat
index 9a077bd4..cbb7e7b2 100644
--- a/bin/run-modules-gen.bat
+++ b/bin/run-modules-gen.bat
@@ -8,7 +8,7 @@ cd ../ruoyi-modules/ruoyi-gen/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
-java -Dfile.encoding=utf-8 -jar %JAVA_OPTS% ruoyi-modules-gen.jar
+java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-gen.jar
cd bin
pause
\ No newline at end of file
diff --git a/bin/run-modules-job.bat b/bin/run-modules-job.bat
index 3a2e333b..b419237a 100644
--- a/bin/run-modules-job.bat
+++ b/bin/run-modules-job.bat
@@ -8,7 +8,7 @@ cd ../ruoyi-modules/ruoyi-job/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
-java -Dfile.encoding=utf-8 -jar %JAVA_OPTS% ruoyi-modules-job.jar
+java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-job.jar
cd bin
pause
\ No newline at end of file
diff --git a/bin/run-modules-system.bat b/bin/run-modules-system.bat
index 78f8b59e..0d232fef 100644
--- a/bin/run-modules-system.bat
+++ b/bin/run-modules-system.bat
@@ -8,7 +8,7 @@ cd ../ruoyi-modules/ruoyi-system/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
-java -Dfile.encoding=utf-8 -jar %JAVA_OPTS% ruoyi-modules-system.jar
+java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-system.jar
cd bin
pause
\ No newline at end of file
diff --git a/bin/run-monitor.bat b/bin/run-monitor.bat
index 9ee7b99b..6149abd1 100644
--- a/bin/run-monitor.bat
+++ b/bin/run-monitor.bat
@@ -8,7 +8,7 @@ cd ../ruoyi-visual/ruoyi-monitor/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
-java -Dfile.encoding=utf-8 -jar %JAVA_OPTS% ruoyi-visual-monitor.jar
+java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-visual-monitor.jar
cd bin
pause
\ No newline at end of file
From 08885f65cd6815fbc18a5b485eb9fd99c2a0d2cf Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Wed, 24 Nov 2021 16:40:18 +0800
Subject: [PATCH 07/12] =?UTF-8?q?=E5=8D=87=E7=BA=A7velocity=E5=88=B0?=
=?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC2.3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 10 ++--------
ruoyi-modules/ruoyi-gen/pom.xml | 2 +-
.../java/com/ruoyi/gen/util/VelocityInitializer.java | 3 +--
.../main/java/com/ruoyi/job/config/ScheduleConfig.java | 2 +-
4 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/pom.xml b/pom.xml
index 3336a503..0baaf102 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
3.4.1
2.11.0
1.4
- 1.7
+ 2.3
1.2.78
0.9.1
8.2.2
@@ -151,14 +151,8 @@
org.apache.velocity
- velocity
+ velocity-engine-core
${velocity.version}
-
-
- commons-collections
- commons-collections
-
-
diff --git a/ruoyi-modules/ruoyi-gen/pom.xml b/ruoyi-modules/ruoyi-gen/pom.xml
index 21d5b7e9..f61269d3 100644
--- a/ruoyi-modules/ruoyi-gen/pom.xml
+++ b/ruoyi-modules/ruoyi-gen/pom.xml
@@ -51,7 +51,7 @@
org.apache.velocity
- velocity
+ velocity-engine-core
diff --git a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java
index b856f661..c0736626 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java
+++ b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityInitializer.java
@@ -20,10 +20,9 @@ public class VelocityInitializer
try
{
// 加载classpath目录下的vm文件
- p.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
+ p.setProperty("resource.loader.file.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
// 定义字符集
p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8);
- p.setProperty(Velocity.OUTPUT_ENCODING, Constants.UTF8);
// 初始化Velocity引擎,指定配置Properties
Velocity.init(p);
}
diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java
index a7ad1631..4b6eee72 100644
--- a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java
+++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java
@@ -7,7 +7,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
/**
- * 定时任务配置
+ * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效)
*
* @author ruoyi
*/
From 2c1bdc9670a4ceab55174546eb3a34bbbd56c171 Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Thu, 25 Nov 2021 10:06:29 +0800
Subject: [PATCH 08/12] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=BE=A4?=
=?UTF-8?q?=E5=8F=B7=EF=BC=9A236543183?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 +-
ruoyi-ui/src/views/index.vue | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index a48ec009..104499c2 100644
--- a/README.md
+++ b/README.md
@@ -115,4 +115,4 @@ com.ruoyi
## 若依微服务交流群
-QQ群: [](https://jq.qq.com/?_wv=1027&k=yqInfq0S) [](https://jq.qq.com/?_wv=1027&k=Oy1mb3p8) [](https://jq.qq.com/?_wv=1027&k=rvxkJtXK) [](https://jq.qq.com/?_wv=1027&k=0Ck3PvTe) [](https://jq.qq.com/?_wv=1027&k=FnHHP4TT) 点击按钮入群。
\ No newline at end of file
+QQ群: [](https://jq.qq.com/?_wv=1027&k=yqInfq0S) [](https://jq.qq.com/?_wv=1027&k=Oy1mb3p8) [](https://jq.qq.com/?_wv=1027&k=rvxkJtXK) [](https://jq.qq.com/?_wv=1027&k=0Ck3PvTe) [](https://jq.qq.com/?_wv=1027&k=FnHHP4TT) [](https://jq.qq.com/?_wv=1027&k=qdT1Ojpz) 点击按钮入群。
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue
index 8498e6a3..58d95deb 100644
--- a/ruoyi-ui/src/views/index.vue
+++ b/ruoyi-ui/src/views/index.vue
@@ -119,9 +119,9 @@
QQ群:满42799195
- 满170157040 满130643120 满225920371
-
- 201705537满170157040 满130643120 满225920371 满201705537
+
+ 236543183
From 4d4123243cf6272e824769684637a8b9c42da033 Mon Sep 17 00:00:00 2001
From: Ricky
Date: Thu, 25 Nov 2021 13:42:06 +0800
Subject: [PATCH 09/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E7=94=9F=E6=88=90=E5=A4=8D=E9=80=89=E6=A1=86=E5=AD=97=E5=85=B8?=
=?UTF-8?q?=E9=81=97=E6=BC=8F=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/java/com/ruoyi/gen/util/VelocityUtils.java | 3 ++-
.../ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm | 4 ++++
.../ruoyi-gen/src/main/resources/vm/vue/index.vue.vm | 4 ++++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityUtils.java b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityUtils.java
index 18e6fbec..9f3f5634 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityUtils.java
+++ b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityUtils.java
@@ -274,7 +274,8 @@ public class VelocityUtils
for (GenTableColumn column : columns)
{
if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny(
- column.getHtmlType(), new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO }))
+ column.getHtmlType(),
+ new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX }))
{
dicts.add("'" + column.getDictType() + "'");
}
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
index 19802cee..bf9e0646 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
@@ -108,7 +108,11 @@
#elseif($column.list && "" != $column.dictType)
+#if($column.htmlType == "checkbox")
+
+#else
+#end
#elseif($column.list && "" != $javaField)
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
index 77d3d63e..2f698f46 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
@@ -136,7 +136,11 @@
#elseif($column.list && "" != $column.dictType)
+#if($column.htmlType == "checkbox")
+
+#else
+#end
#elseif($column.list && "" != $javaField)
From 2a452a00e02dccb5ec65464a52efd019df9bc672 Mon Sep 17 00:00:00 2001
From: Ricky
Date: Thu, 25 Nov 2021 15:23:46 +0800
Subject: [PATCH 10/12] =?UTF-8?q?=E5=8D=87=E7=BA=A7velocity=E5=88=B0?=
=?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC2.3=EF=BC=88=E8=AF=AD?=
=?UTF-8?q?=E6=B3=95=E5=8D=87=E7=BA=A7=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/vm/vue/index-tree.vue.vm | 14 +++++---------
.../src/main/resources/vm/vue/index.vue.vm | 14 +++++---------
.../src/main/resources/vm/xml/mapper.xml.vm | 10 +++++-----
3 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
index bf9e0646..95ac0ffe 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
@@ -300,8 +300,7 @@ export default {
queryParams: {
#foreach ($column in $columns)
#if($column.query)
- $column.javaField: null#if($velocityCount != $columns.size()),#end
-
+ $column.javaField: null#if($foreach.count != $columns.size()),#end
#end
#end
},
@@ -319,8 +318,7 @@ export default {
#end
$column.javaField: [
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }
- ]#if($velocityCount != $columns.size()),#end
-
+ ]#if($foreach.count != $columns.size()),#end
#end
#end
}
@@ -383,14 +381,12 @@ export default {
this.form = {
#foreach ($column in $columns)
#if($column.htmlType == "radio")
- $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($velocityCount != $columns.size()),#end
+ $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($foreach.count != $columns.size()),#end
#elseif($column.htmlType == "checkbox")
- $column.javaField: []#if($velocityCount != $columns.size()),#end
-
+ $column.javaField: []#if($foreach.count != $columns.size()),#end
#else
- $column.javaField: null#if($velocityCount != $columns.size()),#end
-
+ $column.javaField: null#if($foreach.count != $columns.size()),#end
#end
#end
};
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
index 2f698f46..fe51c2eb 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
@@ -364,8 +364,7 @@ export default {
pageSize: 10,
#foreach ($column in $columns)
#if($column.query)
- $column.javaField: null#if($velocityCount != $columns.size()),#end
-
+ $column.javaField: null#if($foreach.count != $columns.size()),#end
#end
#end
},
@@ -383,8 +382,7 @@ export default {
#end
$column.javaField: [
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }
- ]#if($velocityCount != $columns.size()),#end
-
+ ]#if($foreach.count != $columns.size()),#end
#end
#end
}
@@ -428,14 +426,12 @@ export default {
this.form = {
#foreach ($column in $columns)
#if($column.htmlType == "radio")
- $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($velocityCount != $columns.size()),#end
+ $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($foreach.count != $columns.size()),#end
#elseif($column.htmlType == "checkbox")
- $column.javaField: []#if($velocityCount != $columns.size()),#end
-
+ $column.javaField: []#if($foreach.count != $columns.size()),#end
#else
- $column.javaField: null#if($velocityCount != $columns.size()),#end
-
+ $column.javaField: null#if($foreach.count != $columns.size()),#end
#end
#end
};
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm
index 0c681d9c..5b704e73 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm
@@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#end
- select#foreach($column in $columns) $column.columnName#if($velocityCount != $columns.size()),#end#end from ${tableName}
+ select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}