控制台前端页面升级
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var app;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -48,7 +47,6 @@
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
|
||||
@@ -77,7 +77,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var app;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -100,7 +99,6 @@
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<template>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
|
||||
@@ -124,9 +124,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import toast from '../../common/lib/common/toast'
|
||||
var app;
|
||||
|
||||
import consoleApi from '../../common/api/console'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -150,7 +148,6 @@
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
this.getUserList();
|
||||
},
|
||||
methods: {
|
||||
@@ -163,34 +160,34 @@
|
||||
this.getUserList();
|
||||
},
|
||||
editUserAuthFun(row) {
|
||||
app.allUserAuth = [];
|
||||
app.editUserAuth = [];
|
||||
this.allUserAuth = [];
|
||||
this.editUserAuth = [];
|
||||
var param = {userIds: row.id};
|
||||
this.common.post(this.apilist1.userAuthList, param, function (json) {
|
||||
app.editUserAuth = [];
|
||||
app.allUserAuth = json.data;
|
||||
app.editUserAuthDialogVisible = true;
|
||||
app.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
for (var i = 0; i < app.allUserAuth.length; i++) {
|
||||
if (app.allUserAuth[i].checked == 1) {
|
||||
app.editUserAuth.push(app.allUserAuth[i].id);
|
||||
}
|
||||
}
|
||||
});
|
||||
consoleApi.userAuthList(param).then(json => {
|
||||
this.editUserAuth = [];
|
||||
this.allUserAuth = json.data;
|
||||
this.editUserAuthDialogVisible = true;
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
for (var i = 0; i < this.allUserAuth.length; i++) {
|
||||
if (this.allUserAuth[i].checked == 1) {
|
||||
this.editUserAuth.push(this.allUserAuth[i].id);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
editUserAuthSave() {
|
||||
var param = {
|
||||
userIds: this.editUserForm.id,
|
||||
authIds: this.editUserAuth.join(","),
|
||||
};
|
||||
this.common.post(this.apilist1.updateUserAuth, param, function (json) {
|
||||
toast.success("保存成功!");
|
||||
app.editUserAuthDialogVisible = false;
|
||||
consoleApi.updateUserAuth(param).then(json => {
|
||||
this.$message.success("保存成功!");
|
||||
this.editUserAuthDialogVisible = false;
|
||||
});
|
||||
},
|
||||
editUserInfo(row) {
|
||||
app.editUserDialogVisible = true;
|
||||
app.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
this.editUserDialogVisible = true;
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
},
|
||||
addUserInfo() {
|
||||
this.editUserDialogVisible = true;
|
||||
@@ -203,11 +200,10 @@
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
this.common.post(this.apilist1.resetPassword, this.editUserForm, function (json) {
|
||||
app.$confirm("重置成功!新的密码为:" + json.data).then(()=> {
|
||||
done();
|
||||
}).catch(()=> {});
|
||||
});
|
||||
consoleApi.resetPassword(this.editUserForm).then(json => {
|
||||
app.$confirm("重置成功!新的密码为:" + json.data).then(()=> {
|
||||
}).catch(()=> {});
|
||||
});
|
||||
}).catch(()=>{});
|
||||
},
|
||||
deleteUser(row) {
|
||||
@@ -216,28 +212,28 @@
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
this.common.post(this.apilist1.deleteUserInfo, this.editUserForm, function (json) {
|
||||
toast.success("删除成功!");
|
||||
app.getUserList();
|
||||
});
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
consoleApi.deleteUserInfo(this.editUserForm).then(json => {
|
||||
this.$message.success("删除成功!");
|
||||
this.getUserList();
|
||||
});
|
||||
}).catch(()=>{});
|
||||
},
|
||||
updateEditUser() {
|
||||
this.common.post(this.apilist1.updateUserInfo, this.editUserForm, function (json) {
|
||||
toast.success("保存成功!");
|
||||
app.editUserDialogVisible = false;
|
||||
app.getUserList();
|
||||
});
|
||||
consoleApi.updateUserInfo(this.editUserForm).then(json => {
|
||||
this.$message.success("保存成功!");
|
||||
this.editUserDialogVisible = false;
|
||||
this.getUserList();
|
||||
});
|
||||
},
|
||||
getUserList() {
|
||||
this.searchLoading = true;
|
||||
this.common.post(this.apilist1.getUserInfoList, this.searchParam, function (json) {
|
||||
// 让加载动画停留一会
|
||||
setTimeout(()=>{app.searchLoading = false;}, 500);
|
||||
app.totalCount = json.total;
|
||||
app.searchResultList = json.data;
|
||||
});
|
||||
consoleApi.getUserInfoList(this.searchParam).then(json => {
|
||||
// 让加载动画停留一会
|
||||
setTimeout(()=>{this.searchLoading = false;}, 500);
|
||||
this.totalCount = json.total;
|
||||
this.searchResultList = json.data;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,18 +64,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import toast from '../../common/lib/common/toast'
|
||||
import global from '../../common/config/global'
|
||||
|
||||
var app;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
},
|
||||
methods: {
|
||||
jumpToDocPage(val) {
|
||||
|
||||
@@ -1,88 +1,99 @@
|
||||
<template>
|
||||
<div style="padding-top: 50px;">
|
||||
<el-form :model="loginParam" :rules="loginRules" ref="loginParam" label-position="left" label-width="0px"
|
||||
class="demo-ruleForm login-container">
|
||||
<h3 class="title">系统登录</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input type="text" v-model="loginParam.username" auto-complete="off" placeholder="账号" @keyup.enter="loginSubmit"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input type="password" v-model="loginParam.password" auto-complete="off" placeholder="密码" @keyup.enter="loginSubmit"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button type="primary" style="width:100%;" @click.native.prevent="loginSubmit" :loading="logining">登录
|
||||
</el-button>
|
||||
<!--<el-button @click.native.prevent="handleReset2">重置</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div>
|
||||
<div style="padding-top: 50px;">
|
||||
<el-form :model="loginParam" :rules="loginRules" ref="loginParam" label-position="left" label-width="0px" class="demo-ruleForm login-container">
|
||||
<h3 class="title">文档管理-系统登录</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input type="text" v-model="loginParam.username" auto-complete="off" placeholder="账号" @keyup.enter.native="loginSubmit"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input type="password" v-model="loginParam.password" auto-complete="off" placeholder="密码" @keyup.enter.native="loginSubmit"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button type="primary" style="width:100%;" @click.native.prevent="loginSubmit" :loading="logining">登录</el-button>
|
||||
<!--<el-button @click.native.prevent="handleReset2">重置</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--随机背景图-->
|
||||
<img v-if="bgImgRandom == 1" src="../../assets/img/bg1.jpeg" class="login-background-img">
|
||||
<img v-else-if="bgImgRandom == 2" src="../../assets/img/bg2.jpeg" class="login-background-img">
|
||||
<img v-else-if="bgImgRandom == 3" src="../../assets/img/bg3.jpeg" class="login-background-img">
|
||||
<img v-else-if="bgImgRandom == 4" src="../../assets/img/bg4.jpeg" class="login-background-img">
|
||||
<img v-else-if="bgImgRandom == 5" src="../../assets/img/bg5.jpeg" class="login-background-img">
|
||||
<img v-else src="../../assets/img/bg5.jpeg" class="login-background-img">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
logining: false,
|
||||
redirect: '',
|
||||
loginParam: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{required: true, message: '请输入账号', trigger: 'blur'},
|
||||
],
|
||||
password: [
|
||||
{required: true, message: '请输入密码', trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
checked: true
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
this.redirect = this.$route.query.redirect;
|
||||
},
|
||||
methods: {
|
||||
loginSubmit() {
|
||||
var that = this;
|
||||
this.$refs.loginParam.validate((valid) => {
|
||||
if (!valid) return;
|
||||
that.common.post(that.apilist1.userLogin, that.loginParam, function (json) {
|
||||
if(!!that.redirect) {
|
||||
location.href = decodeURIComponent(that.redirect);
|
||||
} else {
|
||||
that.$router.back();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
import consoleApi from '../../common/api/console'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
logining: false,
|
||||
redirect: '',
|
||||
loginParam: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{required: true, message: '请输入账号', trigger: 'blur'},
|
||||
],
|
||||
password: [
|
||||
{required: true, message: '请输入密码', trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
checked: true,
|
||||
bgImgRandom: Math.ceil(Math.random() * 4) + 1,
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
this.redirect = this.$route.query.redirect;
|
||||
},
|
||||
methods: {
|
||||
loginSubmit() {
|
||||
this.$refs.loginParam.validate((valid) => {
|
||||
if (!valid) return;
|
||||
consoleApi.userLogin(this.loginParam).then(() => {
|
||||
if (!!this.redirect) {
|
||||
location.href = decodeURIComponent(this.redirect);
|
||||
} else {
|
||||
this.$router.back();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.login-container {
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
background-clip: padding-box;
|
||||
margin: 0 auto;
|
||||
width: 350px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
.login-container {
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
background-clip: padding-box;
|
||||
margin: 0 auto;
|
||||
width: 350px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
.title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
|
||||
.remember {
|
||||
margin: 0px 0px 35px 0px;
|
||||
}
|
||||
.remember {
|
||||
margin: 0px 0px 35px 0px;
|
||||
}
|
||||
|
||||
.login-background-img{
|
||||
width: 100%; height: 100%; position: absolute;z-index: -1;top:0;left:0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -1,49 +1,48 @@
|
||||
<template>
|
||||
<div class="my-info-vue">
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right" style="padding: 20px 10px;">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>我的信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div style="margin: 0 auto;max-width: 1000px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">我的信息</div>
|
||||
<el-form class="search-form-box" label-width="100px">
|
||||
<el-form-item label="账号:">{{userInfo.userNo}}</el-form-item>
|
||||
<el-form-item label="用户名:">{{userInfo.userName}}</el-form-item>
|
||||
<el-form-item label="手机号:">{{userInfo.phone}}</el-form-item>
|
||||
<el-form-item label="邮箱:">{{userInfo.email}}</el-form-item>
|
||||
<el-form-item label="状态:">{{userInfo.delFlag==0?'正常':'停用'}}</el-form-item>
|
||||
<el-form-item label="性别:">{{userInfo.sex==0?'女':'男'}}</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
<div class="my-info-vue">
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right" style="padding: 20px 10px;">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>我的信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div style="margin: 0 auto;max-width: 1000px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">我的信息</div>
|
||||
<el-form class="search-form-box" label-width="100px">
|
||||
<el-form-item label="账号:">{{userInfo.userNo}}</el-form-item>
|
||||
<el-form-item label="用户名:">{{userInfo.userName}}</el-form-item>
|
||||
<el-form-item label="手机号:">{{userInfo.phone}}</el-form-item>
|
||||
<el-form-item label="邮箱:">{{userInfo.email}}</el-form-item>
|
||||
<el-form-item label="状态:">{{userInfo.delFlag==0?'正常':'停用'}}</el-form-item>
|
||||
<el-form-item label="性别:">{{userInfo.sex==0?'女':'男'}}</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var app;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {}
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
app = this;
|
||||
this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
this.common.post(this.apilist1.getSelfUserInfo, this.searchParam, function (json) {
|
||||
app.userInfo = json.data;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
import consoleApi from '../../common/api/console'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {}
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
consoleApi.getSelfUserInfo().then(json => {
|
||||
this.userInfo = json.data;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.my-info-vue{}
|
||||
.my-info-vue .box-card{margin: 10px;}
|
||||
.my-info-vue{}
|
||||
.my-info-vue .box-card{margin: 10px;}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<template>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user