Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev

 Conflicts:
	pom.xml
	ruoyi-common/src/main/java/com/ruoyi/common/utils/html/HTMLFilter.java
	ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
	ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java
	ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
	ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java
	ruoyi-ui/src/views/monitor/server/index.vue
This commit is contained in:
疯狂的狮子li 2021-09-26 10:05:29 +08:00
commit 125547f08f
3 changed files with 24 additions and 21 deletions

View File

@ -557,7 +557,7 @@ export default {
/** ${subTable.functionName}删除按钮操作 */ /** ${subTable.functionName}删除按钮操作 */
handleDelete${subClassName}() { handleDelete${subClassName}() {
if (this.checked${subClassName}.length == 0) { if (this.checked${subClassName}.length == 0) {
this.msgError("请先选择要删除的${subTable.functionName}数据"); this.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
} else { } else {
const ${subclassName}List = this.${subclassName}List; const ${subclassName}List = this.${subclassName}List;
const checked${subClassName} = this.checked${subClassName}; const checked${subClassName} = this.checked${subClassName};

View File

@ -81,13 +81,13 @@ public class SysLoginService
} }
else else
{ {
asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage(), request); AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage()));
throw new ServiceException(e.getMessage()); throw new ServiceException(e.getMessage());
} }
} }
asyncService.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"), request); asyncService.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"), request);
LoginUser loginUser = (LoginUser) authentication.getPrincipal(); LoginUser loginUser = (LoginUser) authentication.getPrincipal();
recordLoginInfo(loginUser.getUser()); recordLoginInfo(loginUser.getUserId());
// 生成token // 生成token
return tokenService.createToken(loginUser); return tokenService.createToken(loginUser);
} }
@ -116,12 +116,15 @@ public class SysLoginService
/** /**
* 记录登录信息 * 记录登录信息
*
* @param userId 用户ID
*/ */
public void recordLoginInfo(SysUser user) public void recordLoginInfo(Long userId)
{ {
user.setLoginIp(ServletUtils.getClientIP()); SysUser sysUser = new SysUser();
user.setLoginDate(DateUtils.getNowDate()); sysUser.setUserId(userId);
user.setUpdateBy(user.getUserName()); sysUser.setLoginIp(IpUtils.getIpAddr(ServletUtils.getRequest()));
userService.updateUserProfile(user); sysUser.setLoginDate(DateUtils.getNowDate());
userService.updateUserProfile(sysUser);
} }
} }

View File

@ -4,8 +4,8 @@
<el-tab-pane label="基本信息" name="basic"> <el-tab-pane label="基本信息" name="basic">
<basic-info-form ref="basicInfo" :info="info" /> <basic-info-form ref="basicInfo" :info="info" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="字段信息" name="cloum"> <el-tab-pane label="字段信息" name="columnInfo">
<el-table ref="dragTable" :data="cloumns" row-key="columnId" :max-height="tableHeight"> <el-table ref="dragTable" :data="columns" row-key="columnId" :max-height="tableHeight">
<el-table-column label="序号" type="index" min-width="5%" class-name="allowDrag" /> <el-table-column label="序号" type="index" min-width="5%" class-name="allowDrag" />
<el-table-column <el-table-column
label="字段列名" label="字段列名"
@ -141,13 +141,13 @@ export default {
data() { data() {
return { return {
// name // name
activeName: "cloum", activeName: "columnInfo",
// //
tableHeight: document.documentElement.scrollHeight - 245 + "px", tableHeight: document.documentElement.scrollHeight - 245 + "px",
// //
tables: [], tables: [],
// //
cloumns: [], columns: [],
// //
dictOptions: [], dictOptions: [],
// //
@ -161,7 +161,7 @@ export default {
if (tableId) { if (tableId) {
// //
getGenTable(tableId).then(res => { getGenTable(tableId).then(res => {
this.cloumns = res.data.rows; this.columns = res.data.rows;
this.info = res.data.info; this.info = res.data.info;
this.tables = res.data.tables; this.tables = res.data.tables;
}); });
@ -184,7 +184,7 @@ export default {
const validateResult = res.every(item => !!item); const validateResult = res.every(item => !!item);
if (validateResult) { if (validateResult) {
const genTable = Object.assign({}, basicForm.model, genForm.model); const genTable = Object.assign({}, basicForm.model, genForm.model);
genTable.columns = this.cloumns; genTable.columns = this.columns;
genTable.params = { genTable.params = {
treeCode: genTable.treeCode, treeCode: genTable.treeCode,
treeName: genTable.treeName, treeName: genTable.treeName,
@ -220,10 +220,10 @@ export default {
const sortable = Sortable.create(el, { const sortable = Sortable.create(el, {
handle: ".allowDrag", handle: ".allowDrag",
onEnd: evt => { onEnd: evt => {
const targetRow = this.cloumns.splice(evt.oldIndex, 1)[0]; const targetRow = this.columns.splice(evt.oldIndex, 1)[0];
this.cloumns.splice(evt.newIndex, 0, targetRow); this.columns.splice(evt.newIndex, 0, targetRow);
for (let index in this.cloumns) { for (let index in this.columns) {
this.cloumns[index].sort = parseInt(index) + 1; this.columns[index].sort = parseInt(index) + 1;
} }
} }
}); });