2020/12/28
This commit is contained in:
parent
42586d43b8
commit
e35e381011
11982
HSLink-front/package-lock.json
generated
11982
HSLink-front/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,12 @@ html {
|
||||
body{
|
||||
height: 100%;
|
||||
}
|
||||
.page{
|
||||
margin: 1rem;
|
||||
border-radius: 5px;
|
||||
padding: 1rem;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
#app{
|
||||
height: 100%;
|
||||
}
|
||||
|
@ -14,10 +14,7 @@
|
||||
label-position="left">
|
||||
<el-form-item label="角色" prop="role">
|
||||
<el-select v-model="form.role" placeholder="请选择">
|
||||
<el-option value="学生"></el-option>
|
||||
<el-option value="家长"></el-option>
|
||||
<el-option value="教师"></el-option>
|
||||
<el-option value="管理员"></el-option>
|
||||
<el-option :value="item.dd_detail" v-for="(item,index) in userTypeList" :key="index"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="账号" prop="username">
|
||||
@ -104,6 +101,8 @@
|
||||
type = "login"
|
||||
}
|
||||
return{
|
||||
//用户类型字典项
|
||||
userTypeList: [],
|
||||
isSelect: true,
|
||||
rememberList: JSON.parse(sessionStorage.getItem("rememberList")),
|
||||
rememberPassword: false,
|
||||
@ -162,6 +161,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUserType();
|
||||
},
|
||||
methods:{
|
||||
/*deleteUser(username,index) {
|
||||
@ -192,6 +192,15 @@
|
||||
this.isSelect = false
|
||||
this.isSelect = true
|
||||
},*/
|
||||
/**
|
||||
* 获取用户类型字典项
|
||||
*/
|
||||
getUserType() {
|
||||
this.$ajax.post('/hs/getDictionariesData',{code: 'userType'},res => {
|
||||
console.log('用户类型字典项', res);
|
||||
this.userTypeList = res;
|
||||
})
|
||||
},
|
||||
forget() {
|
||||
this.$message("请联系管理员重置密码")
|
||||
},
|
||||
@ -202,6 +211,15 @@
|
||||
this.$message.error('用户名和密码不匹配');
|
||||
this.loading = false;
|
||||
} else {
|
||||
if (this.form.role === '管理员') {
|
||||
this.$router.push({
|
||||
name: "admin"
|
||||
})
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: "homepage"
|
||||
})
|
||||
}
|
||||
this.$message({
|
||||
message: "登录成功",
|
||||
type: "success"
|
||||
@ -232,9 +250,6 @@
|
||||
}
|
||||
}*/
|
||||
this.loading = false;
|
||||
this.$router.push({
|
||||
name: "homepage"
|
||||
})
|
||||
sessionStorage.setItem("userInfo",JSON.stringify(r));
|
||||
// location.reload();
|
||||
}
|
||||
|
@ -26,10 +26,12 @@
|
||||
<el-menu
|
||||
default-active="1"
|
||||
class="el-menu-vertical-demo">
|
||||
<el-menu-item index="1" @click="goToArticleReview">文章审核</el-menu-item>
|
||||
<el-menu-item index="2" @click="goToPersonnelManagement">人员管理</el-menu-item>
|
||||
<el-menu-item index="3" @click="goToHomepageManagement">首页管理</el-menu-item>
|
||||
<el-menu-item index="4"disabled>更多···</el-menu-item>
|
||||
<el-menu-item index="1" @click="goToHomepageManagement">首页管理</el-menu-item>
|
||||
<el-menu-item index="2" @click="goToArticleReview">文章审核</el-menu-item>
|
||||
<el-menu-item index="3" @click="goToPersonnelManagement">人员管理</el-menu-item>
|
||||
<el-menu-item index="4" @click="goToHomepageManagement">注册管理</el-menu-item>
|
||||
<el-menu-item index="5" @click="goToHomepageManagement">帮助答复</el-menu-item>
|
||||
<el-menu-item index="6" disabled>更多···</el-menu-item>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
<el-main>
|
||||
@ -158,9 +160,6 @@
|
||||
padding: 0.5rem 2rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
.el-container{
|
||||
/*height: 100%;*/
|
||||
}
|
||||
.el-menu{
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
@ -3,70 +3,191 @@
|
||||
<div class="top">
|
||||
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="日期"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<no-date v-if="noDate"></no-date>
|
||||
<div class="table" v-if="!noDate">
|
||||
<div class="table-header">
|
||||
<div class="index box">序号</div>
|
||||
<div class="article-name box">文章名称</div>
|
||||
<div class="article-type box">文章类型</div>
|
||||
<div class="article-label box">文章标签</div>
|
||||
<div class="author box">发表人</div>
|
||||
<div class="time box">发表时间</div>
|
||||
<div class="function box">操作</div>
|
||||
</div>
|
||||
<div class="table-content">
|
||||
<div class="one-data" v-for="(article, index) in articleList" :key="index">
|
||||
<div class="index box">{{index+1}}</div>
|
||||
<div class="article-name box theme-font-blue special-text" @click="getContent(article.articleId)">{{article.title}}</div>
|
||||
<div class="article-type box theme-font-blue special-text" @click="searchLabel(article.type)">{{article.type}}</div>
|
||||
<div class="article-label box theme-font-blue special-text" @click="searchLabel(article.label)">{{article.label}}</div>
|
||||
<div class="author box theme-font-blue special-text" @click="goPersonalInfo(article.releaseId)">{{article.releaseName}}</div>
|
||||
<div class="time box">{{article.releaseTime}}</div>
|
||||
<div class="function box">
|
||||
<el-button type="success" size='mini' @click="verifyArticle(article, '1')">通过</el-button>
|
||||
<el-button type="danger" size='mini' @click="verifyArticle(article, '2')">驳回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="number">共{{articleList.length}}条数据</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import noDate from '@/components/components/NoData'
|
||||
export default {
|
||||
components: {
|
||||
noDate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [{
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1517 弄'
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1519 弄'
|
||||
}, {
|
||||
date: '2016-05-03',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1516 弄'
|
||||
}]
|
||||
//待审核文章列表
|
||||
articleList: [],
|
||||
//无数据
|
||||
noDate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleEdit(index, row) {
|
||||
console.log(index, row);
|
||||
mounted() {
|
||||
this.getVerifyList();
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
console.log(index, row);
|
||||
methods: {
|
||||
/**
|
||||
* 审核(通过/驳回)
|
||||
* @param {Object} item
|
||||
*/
|
||||
verifyArticle(item, operating) {
|
||||
const OPERATING = {
|
||||
"1": "通过",
|
||||
"2": "驳回"
|
||||
};
|
||||
let _this = this;
|
||||
_this.$confirm(`确认${OPERATING[operating]}?`, '审核', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
}).then(() => {
|
||||
this.$ajax.post('/admin/verifyArticle', {
|
||||
articleId: item.articleId,
|
||||
operating: operating
|
||||
}, res => {
|
||||
console.log("审核结果", res);
|
||||
if (res > 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: `${OPERATING[operating]}成功`
|
||||
});
|
||||
setTimeout(() => {
|
||||
_this.getVerifyList();
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '服务器出小差了,请稍后再试'
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取待审核文章列表
|
||||
*/
|
||||
getVerifyList() {
|
||||
this.$ajax.post('/admin/getVerifyList', {}, res => {
|
||||
console.log('待审核文章列表', res);
|
||||
if (res.length > 0) {
|
||||
this.noDate = false;
|
||||
this.articleList = res;
|
||||
} else {
|
||||
this.noDate = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取文章详情
|
||||
*/
|
||||
getContent(id) {
|
||||
this.$router.push({name: 'content'});
|
||||
sessionStorage.setItem("noticeId",id);
|
||||
},
|
||||
/**
|
||||
* 按条件查询文章
|
||||
*/
|
||||
searchLabel(label) {
|
||||
sessionStorage.setItem("condition",label);
|
||||
this.$router.push({name: "search"})
|
||||
},
|
||||
/**
|
||||
* 查看个人主页
|
||||
*/
|
||||
goPersonalInfo(userId) {
|
||||
this.$router.push({name: 'personalinfo'});
|
||||
sessionStorage.setItem("userId",userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-button+.el-button{
|
||||
margin-left: 0;
|
||||
}
|
||||
.table-content{
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
.number{
|
||||
font-size: 0.9rem;
|
||||
color: #999;
|
||||
float: right;
|
||||
margin: 1rem;
|
||||
}
|
||||
.special-text{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
cursor: pointer;
|
||||
}
|
||||
.special-text:hover{
|
||||
text-decoration: underline;
|
||||
}
|
||||
.index{
|
||||
width: 3rem;
|
||||
}
|
||||
.article-name{
|
||||
width: 15rem;
|
||||
}
|
||||
.article-type{
|
||||
width: 6rem;
|
||||
}
|
||||
.article-label{
|
||||
width: 6rem;
|
||||
}
|
||||
.author{
|
||||
width: 6rem;
|
||||
}
|
||||
.time{
|
||||
width: 10rem;
|
||||
color: #999;
|
||||
text-decoration: none!important;
|
||||
cursor: default!important;
|
||||
}
|
||||
.function{
|
||||
width: 10rem;
|
||||
}
|
||||
.box{
|
||||
text-align: center;
|
||||
}
|
||||
.table-header{
|
||||
color: #999;
|
||||
}
|
||||
.one-data{
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.table-header, .one-data{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #ADDFFA;
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
.page{
|
||||
margin: 1rem;
|
||||
border-radius: 5px;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<h1>1111</h1>
|
||||
<div class="page">
|
||||
<h1>完善中···</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -1,34 +1,37 @@
|
||||
<template>
|
||||
<div id="demo"></div>
|
||||
<div class="page">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="用户管理" name="1">
|
||||
<person></person>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="注册管理" name="2">
|
||||
<registration></registration>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import layui from 'layui';
|
||||
layui.use('table', function(){
|
||||
var table = layui.table;
|
||||
|
||||
//第一个实例
|
||||
table.render({
|
||||
elem: '#demo'
|
||||
,height: 312
|
||||
,url: '192.168.10.29:8048/hs/test' //数据接口
|
||||
,page: true //开启分页
|
||||
,cols: [[ //表头
|
||||
{field: 'id', title: 'ID', width:80, sort: true, fixed: 'left'}
|
||||
,{field: 'username', title: '用户名', width:80}
|
||||
,{field: 'sex', title: '性别', width:80, sort: true}
|
||||
,{field: 'city', title: '城市', width:80}
|
||||
,{field: 'sign', title: '签名', width: 177}
|
||||
,{field: 'experience', title: '积分', width: 80, sort: true}
|
||||
,{field: 'score', title: '评分', width: 80, sort: true}
|
||||
,{field: 'classify', title: '职业', width: 80}
|
||||
,{field: 'wealth', title: '财富', width: 135, sort: true}
|
||||
]]
|
||||
});
|
||||
|
||||
});
|
||||
import noDate from '@/components/components/NoData'
|
||||
import person from '@/view/admin/personnelManagement/personnelManagement/PersonnelManagement'
|
||||
import registration from '@/view/admin/personnelManagement/registrationManagement/RegistrationManagement'
|
||||
export default {
|
||||
name: "PersonnelManagement"
|
||||
components: {
|
||||
noDate,
|
||||
person,
|
||||
registration
|
||||
},
|
||||
name: "PersonnelManagement",
|
||||
data() {
|
||||
return{
|
||||
activeName: '1'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="top">
|
||||
|
||||
</div>
|
||||
<no-date v-if="noDate"></no-date>
|
||||
<div class="table" v-if="!noDate">
|
||||
<div class="table-header">
|
||||
<div class="index box">序号</div>
|
||||
<div class="article-name box">人员名称</div>
|
||||
<div class="article-type box">人员类型</div>
|
||||
<div class="time box">注册时间</div>
|
||||
<div class="article-type box">是否冻结</div>
|
||||
<div class="function box">操作</div>
|
||||
</div>
|
||||
<div class="table-content">
|
||||
<div class="one-data" v-for="(person, index) in personList" :key="index">
|
||||
<div class="index box">{{index+1}}</div>
|
||||
<div class="article-name box theme-font-blue special-text">{{person.real_name}}</div>
|
||||
<div class="article-type box theme-font-blue special-text">{{person.user_type}}</div>
|
||||
<div class="article-label box theme-font-blue special-text">{{person.create_time}}</div>
|
||||
<div class="article-type box theme-font-blue special-text">{{person.frozen_state === '0' ? '未冻结' : '已冻结'}}</div>
|
||||
<div class="function box">
|
||||
<el-button type="success" size='mini' @click="" v-if="person.frozen_state === '0'">冻结</el-button>
|
||||
<el-button type="danger" size='mini' @click="" v-if="person.frozen_state === '1'">解冻</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="number">共{{personList.length}}条数据</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import noDate from '@/components/components/NoData'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
noDate
|
||||
},
|
||||
name: "PersonnelManagement",
|
||||
data() {
|
||||
return{
|
||||
//无数据
|
||||
noDate: true,
|
||||
//人员列表
|
||||
personList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getFollowPeopleList()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取人员列表
|
||||
*/
|
||||
getFollowPeopleList() {
|
||||
this.$ajax.post('/admin/getPersonnelManagement', {}, res => {
|
||||
console.log('人员列表', res);
|
||||
if (res.length > 0) {
|
||||
this.personList = res;
|
||||
this.noDate = false;
|
||||
} else {
|
||||
this.noDate = true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-button+.el-button{
|
||||
margin-left: 0;
|
||||
}
|
||||
.table-content{
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
.number{
|
||||
font-size: 0.9rem;
|
||||
color: #999;
|
||||
float: right;
|
||||
margin: 1rem;
|
||||
}
|
||||
.special-text{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
cursor: pointer;
|
||||
}
|
||||
.special-text:hover{
|
||||
text-decoration: underline;
|
||||
}
|
||||
.index{
|
||||
width: 3rem;
|
||||
}
|
||||
.article-name{
|
||||
width: 6rem;
|
||||
}
|
||||
.article-type{
|
||||
width: 6rem;
|
||||
}
|
||||
.article-label{
|
||||
width: 6rem;
|
||||
}
|
||||
.author{
|
||||
width: 6rem;
|
||||
}
|
||||
.time{
|
||||
width: 10rem;
|
||||
color: #999;
|
||||
text-decoration: none!important;
|
||||
cursor: default!important;
|
||||
}
|
||||
.function{
|
||||
width: 10rem;
|
||||
}
|
||||
.box{
|
||||
text-align: center;
|
||||
}
|
||||
.table-header{
|
||||
color: #999;
|
||||
}
|
||||
.one-data{
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.table-header, .one-data{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #ADDFFA;
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "RegistrationManagement"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user