diff --git a/src/main/resources/modules/SpringBoot/java/action/screen/Index.java b/src/main/resources/modules/SpringBoot/java/action/screen/Index.java index 0cfe4855..5d71ab17 100644 --- a/src/main/resources/modules/SpringBoot/java/action/screen/Index.java +++ b/src/main/resources/modules/SpringBoot/java/action/screen/Index.java @@ -16,6 +16,7 @@ public class Index extends Screen { prop.put("open", true);//是否保持一个子菜单展开 prop.put("coll", false);//左侧菜单是否收缩 prop.put("tran", false);//是否展示动画 + prop.put("full", false);//是否全屏 model.addAttribute("prop", prop); } } diff --git a/src/main/resources/modules/SpringBoot/resources/static/css/base.css b/src/main/resources/modules/SpringBoot/resources/static/css/base.css index cd2edb12..1c8fd366 100644 --- a/src/main/resources/modules/SpringBoot/resources/static/css/base.css +++ b/src/main/resources/modules/SpringBoot/resources/static/css/base.css @@ -708,7 +708,7 @@ code { .el-form.form .el-form-item__content > div, .el-form.search .el-form-item__content, .el-form.search .el-form-item__content > div { - width: 220px; + width: 200px; } .form-dialog .el-dialog{ diff --git a/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl b/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl index 996ea614..2d4d61dd 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl @@ -547,6 +547,36 @@ } })(); }, + setFullScreen: function () { + var el = document.documentElement; + var rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen; + + //typeof rfs != "undefined" && rfs + if (rfs) { + rfs.call(el); + } else if (typeof window.ActiveXObject !== "undefined") { + //for IE,这里其实就是模拟了按下键盘的F11,使浏览器全屏 + var wscript = new ActiveXObject("WScript.Shell"); + if (wscript != null) { + wscript.SendKeys("{F11}"); + } + } + }, + cancelFullScreen: function () { + var el = document; + var cfs = el.cancelFullScreen || el.webkitCancelFullScreen || el.mozCancelFullScreen || el.exitFullScreen; + + //typeof cfs != "undefined" && cfs + if (cfs) { + cfs.call(el); + } else if (typeof window.ActiveXObject !== "undefined") { + //for IE,这里和fullScreen相同,模拟按下F11键退出全屏 + var wscript = new ActiveXObject("WScript.Shell"); + if (wscript != null) { + wscript.SendKeys("{F11}"); + } + } + } } }); //字典组件 diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl index f7432347..7a6aec8c 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl @@ -61,6 +61,9 @@ +
  • + 全屏 +
  • 消息 @@ -79,7 +82,13 @@ 系统版本
  • - + + + + + 注销 + +
  • @@ -255,7 +264,8 @@ prop: { open: ${r"<#if prop.open>true<#else>false"}, coll: ${r"<#if prop.coll>true<#else>false"}, - tran: ${r"<#if prop.tran>true<#else>false"} + tran: ${r"<#if prop.tran>true<#else>false"}, + full: ${r"<#if prop.full>true<#else>false"} } }, methods: { @@ -306,12 +316,25 @@ this.tabs = tempTabs.filter(function (tab) { return tab.name !== tabName }) + }, + switchFullScreen:function(){ + this.prop.full = !this.prop.full; + if (this.prop.full) { + nav.setFullScreen() + } else { + nav.cancelFullScreen() + } } }, created: function () { }, mounted: function () { this.onHome();//页面初始好后打开首页 + if (this.prop.full) { + nav.setFullScreen() + } else { + nav.cancelFullScreen() + } }, watch: {} }) diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/login.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/login.ftl index 1d9bf6d6..17c7f3d9 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/login.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/login.ftl @@ -47,7 +47,7 @@ padding: 0; margin: 0; display: flex; - background: #252a2f; + background: #001d3a; justify-content: center; align-items: center; } diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl index 4186ccdc..986e1980 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl @@ -150,19 +150,16 @@ - + - - - - + @@ -218,32 +215,7 @@ ], userPwd: [ {required: true, message: '用户密码不能为空', trigger: 'blur'}, - { - validator: function (rule, value, callback) { - if (value === '') { - callback(new Error('请输入密码')); - } else { - if (app.form.userPwd_ !== '') { - app.$refs.form.validateField('userPwd_'); - } - callback(); - } - }, trigger: 'blur' - } - ], - userPwd_: [ - {required: true, message: '用户确认密码不能为空', trigger: 'blur'}, - { - validator: function (rule, value, callback) { - if (value === '') { - callback(new Error('请再次输入密码')); - } else if (value !== app.form.userPwd) { - callback(new Error('两次输入密码不一致!')); - } else { - callback(); - } - }, trigger: 'blur' - } + { pattern:/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/, message: '密码至少包含 数字和英文,长度6-20'} ], userStatus: [ {required: true, message: '用户状态不能为空', trigger: 'blur'},