Former-commit-id: f133dce15eecae8ed1d06c3a32279c3eb58ee48d
master
wangbing 5 years ago
parent 6a8adbe82e
commit 7aa9c35331

@ -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);
}
}

@ -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{

@ -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}");
}
}
}
}
});
//字典组件

@ -61,6 +61,9 @@
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
</li>
<li>
<el-link :underline="false" icon="el-icon-full-screen" @click="switchFullScreen">全屏</el-link>
</li>
<li>
<el-link :underline="false" @click="onHome" icon="el-icon-message-solid"><span
style="line-height: 20px;"><el-badge is-dot class="item">消息</el-badge></span></el-link>
@ -79,7 +82,13 @@
<el-link :underline="false" @click="onHome" icon="el-icon-warning-outline">系统版本</el-link>
</li>
<li>
<el-link :underline="false" icon="el-icon-switch-button"></el-link>
<el-dropdown>
<el-link :underline="false" icon="el-icon-switch-button"></el-link>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>注销</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
</ul>
</div>
@ -255,7 +264,8 @@
prop: {
open: ${r"<#if prop.open>true<#else>false</#if>"},
coll: ${r"<#if prop.coll>true<#else>false</#if>"},
tran: ${r"<#if prop.tran>true<#else>false</#if>"}
tran: ${r"<#if prop.tran>true<#else>false</#if>"},
full: ${r"<#if prop.full>true<#else>false</#if>"}
}
},
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: {}
})

@ -47,7 +47,7 @@
padding: 0;
margin: 0;
display: flex;
background: #252a2f;
background: #001d3a;
justify-content: center;
align-items: center;
}

@ -150,19 +150,16 @@
<el-input v-model="form.userAlias" clearable size="small" autocomplete="off" placeholder="请输入用户别名"></el-input>
</el-form-item>
<el-form-item label="用户密码" prop="userPwd">
<el-input v-model="form.userPwd" type="password" clearable size="small" autocomplete="off" placeholder="请输入用户密码"></el-input>
<el-input v-model="form.userPwd" clearable size="small" autocomplete="off" placeholder="请输入用户密码"></el-input>
</el-form-item>
<el-form-item label="所属部门" prop="deptCode">
<el-input-dept v-model="form.deptCode" clearable size="small" placeholder="请选择所属部门"></el-input-dept>
</el-form-item>
<el-form-item label="确认密码" prop="userPwd_">
<el-input v-model="form.userPwd_" type="password" clearable size="small" autocomplete="off" placeholder="请输入用户确认密码"></el-input>
</el-form-item>
<el-form-item label="用户状态" prop="userStatus">
<el-input-dict v-model="form.userStatus" clearable size="small" placeholder="请输入用户状态" dict-name="USER_STATUS"></el-input-dict>
</el-form-item>
<el-form-item label="用户角色" prop="roleIdList">
<el-transfer v-model="form.roleIdList" :data="roleList" :titles="['未选角色','已选角色']"></el-transfer>
<el-transfer v-model="form.roleIdList" :data="roleList" :titles="['未选角色','已选角色']" style="width: 500px" ></el-transfer>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -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'},

Loading…
Cancel
Save

Powered by TurnKey Linux.