首页新版开发跳转
This commit is contained in:
@@ -14,19 +14,20 @@
|
||||
<span slot="title">系统管理</span>
|
||||
</template>
|
||||
<el-menu-item index="/console/userList"><i class="el-icon-user-solid"></i>用户管理</el-menu-item>
|
||||
<el-menu-item index="/console/roleList"><i class="el-icon-s-custom"></i>角色管理</el-menu-item>
|
||||
<el-menu-item index="/console/authList"><i class="el-icon-s-claim"></i>权限列表</el-menu-item>
|
||||
<!-- <el-menu-item index="/console/roleList"><i class="el-icon-s-custom"></i>角色管理</el-menu-item>-->
|
||||
<!-- <el-menu-item index="/console/authList"><i class="el-icon-s-claim"></i>权限列表</el-menu-item>-->
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<span class="header-right-user-name">{{userSelfInfo.userName}}</span>
|
||||
<el-dropdown @command="userSettingDropdown" trigger="click">
|
||||
<i class="el-icon-setting" style="margin-right: 15px; font-size: 16px;cursor: pointer;color: #fff;"> </i>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="aboutDoc">关于</el-dropdown-item>
|
||||
<el-dropdown-item command="" divided>我的资料</el-dropdown-item>
|
||||
<el-dropdown-item command="myInfo" divided>我的资料</el-dropdown-item>
|
||||
<el-dropdown-item command="userSignOut">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -71,6 +72,7 @@
|
||||
return {
|
||||
isCollapse: false,
|
||||
aboutDialogVisible: false,
|
||||
userSelfInfo: {},
|
||||
// 升级信息
|
||||
upgradeInfo: {},
|
||||
}
|
||||
@@ -78,7 +80,7 @@
|
||||
mounted: function () {
|
||||
app = this;
|
||||
global.vue.$app = this;
|
||||
this.getUserInfo();
|
||||
this.getSelfUserInfo();
|
||||
this.checkSystemUpgrade();
|
||||
},
|
||||
methods: {
|
||||
@@ -94,6 +96,8 @@
|
||||
this.userSignOut();
|
||||
} else if (command == 'aboutDoc') {
|
||||
app.aboutDialogVisible = true;
|
||||
} else if (command == 'myInfo') {
|
||||
this.$router.push({path: '/user/myInfo'});
|
||||
} else {
|
||||
toast.notOpen();
|
||||
}
|
||||
@@ -103,8 +107,9 @@
|
||||
location.reload();
|
||||
});
|
||||
},
|
||||
getUserInfo() {
|
||||
this.common.post(this.apilist1.getUserBaseInfo, {}, function (json) {
|
||||
getSelfUserInfo() {
|
||||
this.common.post(this.apilist1.getSelfUserInfo, {}, function (json) {
|
||||
app.userSelfInfo = json.data;
|
||||
});
|
||||
},
|
||||
checkSystemUpgrade() {
|
||||
@@ -133,6 +138,7 @@
|
||||
#app, .el-container, .el-menu {
|
||||
height: 100%;
|
||||
}
|
||||
.header-right-user-name{color: #fff;padding-right: 5px;}
|
||||
.el-menu-vertical{border-right: 0;background: #fafafa;}
|
||||
.el-menu-vertical .el-menu{background: #fafafa;}
|
||||
.el-header {background-color: #409EFF; color: #333; line-height: 40px; text-align: right;height: 40px !important;}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
var URL = {
|
||||
userLogin: '/login',
|
||||
userLogout: '/logout',
|
||||
getUserInfo: '/user/getUserInfo',
|
||||
getSelfUserInfo: '/user/info/selfInfo',
|
||||
getUserInfoList: '/user/info/list',
|
||||
updateUserInfo: '/user/info/update',
|
||||
deleteUserInfo: '/user/info/delete',
|
||||
userAuthList: '/user/info/auth/list',
|
||||
updateUserAuth: '/user/info/auth/update',
|
||||
resetPassword: '/user/info/resetPassword',
|
||||
|
||||
getUserBaseInfo: '/zyplayer-doc-wiki/common/user/base',
|
||||
|
||||
systemUpgradeInfo: '/system/info/upgrade',
|
||||
};
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ var href = window.location.href;
|
||||
var _fn = {
|
||||
href: href,
|
||||
// 本地启动时使用本地接口调试
|
||||
HOST: 'http://local.zyplayer.com:8083/zyplayer-doc-manage',
|
||||
HOST1: 'http://local.zyplayer.com:8083/zyplayer-doc-manage',
|
||||
// HOST: 'http://local.zyplayer.com:8083/zyplayer-doc-manage',
|
||||
// HOST1: 'http://local.zyplayer.com:8083/zyplayer-doc-manage',
|
||||
// 也可以直接使用线上的服务调试
|
||||
// HOST: 'http://doc.zyplayer.com/zyplayer-doc-manage',
|
||||
// HOST1: 'http://doc.zyplayer.com/zyplayer-doc-manage',
|
||||
// 打包时使用下面这两行,文件就放在根目录下,所以当前路劲就好
|
||||
// HOST: './',
|
||||
// HOST1: './',
|
||||
HOST: './',
|
||||
HOST1: './',
|
||||
|
||||
mixUrl: function (host, url) {
|
||||
var p;
|
||||
|
||||
14
zyplayer-doc-ui/console-ui/src/doc-console.html
Normal file
14
zyplayer-doc-ui/console-ui/src/doc-console.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>文档管理系统</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>wiki文档管理系统</title>
|
||||
<title>文档管理系统</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Home from './views/home/Home.vue'
|
||||
|
||||
import UserLogin from './views/user/Login.vue'
|
||||
import UserMyInfo from './views/user/MyInfo.vue'
|
||||
import UserRouterView from './views/user/RouterView.vue'
|
||||
|
||||
import ConsoleRoleList from './views/console/RoleList.vue'
|
||||
@@ -24,6 +25,7 @@ let routes = [
|
||||
component: UserRouterView,
|
||||
children: [
|
||||
{path: 'login', name: '系统登录',component: UserLogin, meta: {fullscreen: true}},
|
||||
{path: 'myInfo', name: '我的信息',component: UserMyInfo},
|
||||
]
|
||||
}, {
|
||||
path: '/console',
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getUserList">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="success" @click="addUserInfo"><i class="el-icon-plus"></i> 添加</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="padding: 10px;" v-loading="searchLoading">
|
||||
<el-table :data="searchResultList" border style="width: 100%; margin-bottom: 5px;" max-height="500">
|
||||
@@ -34,13 +37,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="creationTime" label="创建时间"></el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-on:change="delFlagChange" v-model="scope.row.delFlag" :active-value="0" active-text="正常" :inactive-value="1" inactive-text="停用"></el-switch>
|
||||
</template>
|
||||
<template slot-scope="scope">{{scope.row.delFlag==0?'正常':'停用'}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="240">
|
||||
<el-table-column label="操作" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" plain type="primary" v-on:click="editUserInfo(scope.row)">修改</el-button>
|
||||
<el-button size="mini" plain type="success" v-on:click="editUserAuthFun(scope.row)">权限</el-button>
|
||||
<el-button size="mini" plain type="warning" v-on:click="resetPassword(scope.row)">重置密码</el-button>
|
||||
<el-button size="mini" plain type="danger" v-on:click="deleteUser(scope.row)">删除</el-button>
|
||||
</template>
|
||||
@@ -59,8 +61,28 @@
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
<!--修改用户权限弹窗-->
|
||||
<el-dialog title="权限编辑" :visible.sync="editUserAuthDialogVisible" width="600px">
|
||||
<el-form ref="form" label-width="80px">
|
||||
<el-form-item label="账号">
|
||||
<el-input v-model="editUserForm.userNo" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名">
|
||||
<el-input v-model="editUserForm.userName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="权限">
|
||||
<el-select v-model="editUserAuth" multiple filterable placeholder="请选择" style="width: 100%;">
|
||||
<el-option v-for="item in allUserAuth" :key="item.id" :label="item.authDesc" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="editUserAuthSave">确定</el-button>
|
||||
<el-button @click="editUserAuthDialogVisible = false">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!--修改用户弹窗-->
|
||||
<el-dialog title="修改用户" :visible.sync="editUserDialogVisible" width="600px">
|
||||
<el-dialog :title="editUserForm.id > 0 ? '修改用户':'创建用户'" :visible.sync="editUserDialogVisible" width="600px">
|
||||
<el-form ref="form" :model="editUserForm" label-width="80px">
|
||||
<el-form-item label="账号">
|
||||
<el-input v-model="editUserForm.userNo"></el-input>
|
||||
@@ -74,17 +96,21 @@
|
||||
<el-form-item label="邮箱">
|
||||
<el-input v-model="editUserForm.email"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-switch v-model="editUserForm.delFlag" :active-value="0" active-text="正常" :inactive-value="2" inactive-text="停用"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别">
|
||||
<el-radio-group v-model="editUserForm.sex">
|
||||
<el-radio :label="1">男</el-radio>
|
||||
<el-radio :label="0">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色">
|
||||
<el-select v-model="editUserForm.role" multiple filterable placeholder="请选择">
|
||||
<el-option v-for="item in roleOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 先不做角色,想清楚了再做-->
|
||||
<!-- <el-form-item label="角色">-->
|
||||
<!-- <el-select v-model="editUserForm.role" multiple filterable placeholder="请选择">-->
|
||||
<!-- <el-option v-for="item in roleOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="updateEditUser">确定</el-button>
|
||||
<el-button @click="editUserDialogVisible = false">取消</el-button>
|
||||
@@ -103,6 +129,7 @@
|
||||
return {
|
||||
searchLoading: false,
|
||||
editUserDialogVisible: false,
|
||||
editUserAuthDialogVisible: false,
|
||||
totalCount: 0,
|
||||
searchParam: {
|
||||
type: 1,
|
||||
@@ -115,6 +142,8 @@
|
||||
{value: '管理员'}
|
||||
],
|
||||
editUserForm: {},
|
||||
allUserAuth: [],
|
||||
editUserAuth: [],
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
@@ -130,9 +159,39 @@
|
||||
this.searchParam.pageNum = val;
|
||||
this.getUserList();
|
||||
},
|
||||
editUserAuthFun(row) {
|
||||
app.allUserAuth = [];
|
||||
app.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);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
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;
|
||||
});
|
||||
},
|
||||
editUserInfo(row) {
|
||||
app.editUserDialogVisible = true;
|
||||
app.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
},
|
||||
addUserInfo() {
|
||||
this.editUserDialogVisible = true;
|
||||
this.editUserForm = row;
|
||||
this.editUserForm = {};
|
||||
},
|
||||
resetPassword(row) {
|
||||
this.$confirm('确定要重置此用户密码吗?', '提示', {
|
||||
@@ -140,7 +199,7 @@
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.editUserForm = row;
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
this.common.post(this.apilist1.resetPassword, this.editUserForm, function (json) {
|
||||
app.$confirm("重置成功!新的密码为:" + json.data).then(()=> {
|
||||
done();
|
||||
@@ -148,19 +207,17 @@
|
||||
});
|
||||
}).catch(()=>{});
|
||||
},
|
||||
delFlagChange(row, xx) {
|
||||
debugger
|
||||
// this.editUserForm = row;
|
||||
},
|
||||
deleteUser(row) {
|
||||
this.$confirm('确定要删除此用户吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.editUserForm = row;
|
||||
this.editUserForm.delFlag = 1;
|
||||
this.updateEditUser();
|
||||
this.editUserForm = JSON.parse(JSON.stringify(row));
|
||||
this.common.post(this.apilist1.deleteUserInfo, this.editUserForm, function (json) {
|
||||
toast.success("删除成功!");
|
||||
app.getUserList();
|
||||
});
|
||||
}).catch(()=>{});
|
||||
},
|
||||
updateEditUser() {
|
||||
|
||||
@@ -68,58 +68,12 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
totalCount: 0,
|
||||
searchParam: {
|
||||
spaceId: '',
|
||||
newsType: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
spacePageNews:[],
|
||||
newsTypes:["最近更新", "最新创建", "查看最多", "点赞最多", "查看+点赞最多"],
|
||||
};
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
this.initQueryParam(to);
|
||||
next();
|
||||
},
|
||||
mounted: function () {
|
||||
this.initQueryParam(this.$route);
|
||||
app = this;
|
||||
},
|
||||
methods: {
|
||||
getSpacePageNews() {
|
||||
this.common.post(this.apilist1.pageNews, this.searchParam, function (json) {
|
||||
app.spacePageNews = json.data || [];
|
||||
app.totalCount = json.total;
|
||||
});
|
||||
},
|
||||
jumpToDocPage(val) {
|
||||
window.open(val);
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.searchParam.pageSize = val;
|
||||
this.getSpacePageNews();
|
||||
},
|
||||
showPageDetail(row) {
|
||||
this.nowClickPath = {spaceId: row.spaceId, pageId: row.pageId};
|
||||
this.$router.push({path: '/page/show', query: this.nowClickPath});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.searchParam.pageNum = val;
|
||||
this.getSpacePageNews();
|
||||
},
|
||||
initQueryParam(to) {
|
||||
this.searchParam = {
|
||||
spaceId: to.query.spaceId,
|
||||
newsType: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
};
|
||||
if (!!this.searchParam.spaceId) {
|
||||
this.getSpacePageNews();
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
49
zyplayer-doc-ui/console-ui/src/views/user/MyInfo.vue
Normal file
49
zyplayer-doc-ui/console-ui/src/views/user/MyInfo.vue
Normal file
@@ -0,0 +1,49 @@
|
||||
<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>
|
||||
</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;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.my-info-vue{}
|
||||
.my-info-vue .box-card{margin: 10px;}
|
||||
</style>
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = (options = {}) => ({
|
||||
},
|
||||
output: {
|
||||
path: resolve(__dirname, 'dist'),
|
||||
filename: options.dev ? '[name].js' : '[name].js?[chunkhash]',
|
||||
filename: options.dev ? '[name].js' : 'doc-console-[name].js?[chunkhash]',
|
||||
chunkFilename: '[id].js?[chunkhash]',
|
||||
publicPath: options.dev ? '/assets/' : publicPath
|
||||
},
|
||||
@@ -45,7 +45,8 @@ module.exports = (options = {}) => ({
|
||||
names: ['vendor', 'manifest']
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'src/index.html'
|
||||
template: options.dev ? 'src/index.html':'src/doc-console.html',
|
||||
filename: options.dev ? 'index.html':'doc-console.html',
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user