Signed-off-by: yinxr <2273460044@qq.com>

master
yinxr 7 years ago
parent 314f6c50d1
commit b974e76854
  1. 30
      src/main/webapp/WEB-INF/manager/exit-system.ftl
  2. 2
      src/main/webapp/WEB-INF/manager/include/head-file.ftl
  3. 35
      src/main/webapp/WEB-INF/manager/index.ftl
  4. 40
      src/main/webapp/WEB-INF/manager/reset-password.ftl

@ -0,0 +1,30 @@
<!-- 退出系统 -->
<div id="exit-system" class="exit-system">
<el-dialog title="退出提示" :visible.sync="isShow">
确认退出
<div slot="footer" class="dialog-footer">
<el-button @click="isShow = false">取 消</el-button>
<el-button type="primary" @click="loginOut">确认退出</el-button>
</div>
</el-dialog>
</div>
<script>
var exitSystemVue = new Vue({
el: '#exit-system',
data: {
isShow: false, // 模态框的显示
},
methods: {
loginOut: function () {
var that = this;
ms.http.get(ms.manager + "/loginOut.do")
.then((data) => {
isShow = false;
location.href = ms.manager + "/login.do";
}, (err) => {
that.$message.error(data.resultMsg);
})
}
}
})
</script>

@ -44,7 +44,7 @@
// ms.manager = "${managerPath}";
ms.base = "http://192.168.0.54:82";
ms.manager = "http://192.168.0.54:82/apis";
ms.manager = "http://192.168.0.54:82/apis/ms";
//图片懒加载
Vue.use(VueLazyload, {
error: ms.base + '/images/ic_image_deault.png',

@ -4,8 +4,9 @@
<title></title>
<!-- <#include "/include/head-file.ftl"/> -->
<!-- <link rel="stylesheet" href="${base}/static/ms-admin/4.7.0/css/index.css"> -->
<!--#include virtual="include/head-file.ftl" -->
<!--#include virtual="./reset-password.ftl" -->
<!--#include virtual="./exit-system.ftl" -->
<link rel="stylesheet" href="../../../static/ms-admin/4.7.0/css/index.css">
</head>
@ -52,9 +53,9 @@
<el-dropdown trigger="click" class="ms-admin-login" placement="top-start" @visible-change="loginDown = !loginDown">
<span class="el-dropdown-link" :class="{'active':loginDown}">
<img src="http://cdn.mingsoft.net/global/static/ms-admin/4.7.0//msheader.png" />
<span>管理员</span>
<span v-text='peopleInfo.managerName'></span>
</span>
<el-dropdown-menu class="ms-admin-login-down" slot="dropdown">
<el-dropdown-menu class="ms-admin-login-down" slot="dropdown" @click.native='openModal'>
<el-dropdown-item>修改密码</el-dropdown-item>
<el-dropdown-item>退出</el-dropdown-item>
</el-dropdown-menu>
@ -127,9 +128,8 @@
</div>
</body>
</html>
<script>
new Vue({
var indexVue = new Vue({
el: "#app",
data: {
// 预置菜单图标
@ -154,6 +154,10 @@
collapseMenu:false,//菜单折叠,false不折叠
currentTab:'',//当前激活tab的name
tabIndex: 2,
//登录用户信息
peopleInfo:{
managerName:''//账号
},
},
watch:{
menuList:function(n,o){
@ -170,11 +174,11 @@
// 菜单列表
list:function(){
var that = this;
ms.http.get(ms.base + "/ms/model/list.do")
ms.http.get(ms.manager + "/model/list.do")
.then((data)=>{
that.menuList = data.rows
}, (err) => {
that.$message.error(data.resultMsg);
that.$message.error(err);
})
},
// 菜单打开页面
@ -232,11 +236,28 @@
setTimeout(function(){
that.shortcutMenu = false
},50)
},
managerGet:function(){
var that = this;
ms.http.get(ms.manager + "/basic/manager/get.do")
.then((data)=>{
that.peopleInfo = data
}, (err) => {
that.$message.error(err);
})
},
// 打开修改密码,退出的模态框
openModal:function(){
console.log('event.target',event.target.innerText);
event.target.innerText.indexOf('修改密码')>-1
? resetPasswordVue.isShow=true : exitSystemVue.isShow=true
}
},
mounted:function(){
// 菜单列表
this.list();
//获取登录用户信息
this.managerGet();
},
})
</script>

@ -0,0 +1,40 @@
<!-- 修改密码 -->
<div id="reset-password" class="reset-password">
<el-dialog title="修改密码" :visible.sync="isShow">
<el-form :model="resetPasswordForm" label-width='80px'>
<el-form-item label="账号">
<el-input v-model="resetPasswordForm.managerName" autocomplete="off" readonly disabled></el-input>
</el-form-item>
<el-form-item label="旧密码">
<el-input v-model="resetPasswordForm.oldManagerPassword" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="新密码">
<el-input v-model="resetPasswordForm.newManagerPassword" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="isShow = false">取 消</el-button>
<el-button type="primary" @click="update">更新密码</el-button>
</div>
</el-dialog>
</div>
<script>
var resetPasswordVue = new Vue({
el: '#reset-password',
data: {
// 模态框的显示
isShow: false,
resetPasswordForm: {
managerName: '',
oldManagerPassword: '',
newManagerPassword: "",
}
},
methods: {
// 更新密码
update: function () {
isShow = false
}
}
})
</script>
Loading…
Cancel
Save