Commit fe31abee authored by xulili's avatar xulili

登录

parent 3f0ad157
<template>
<div id="app">
<top-bar></top-bar>
<top-bar v-if="!$route.meta.noShowbar"></top-bar>
<breadcrumb v-if="$route.meta.showBreadcrumb"></breadcrumb>
<!-- <div :class="'appContent' {}"> -->
<div v-bind:class="[{ hasBread: $route.meta.showBreadcrumb }, 'appContent']">
......
This image diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
<template>
<div class="top-bar">
<div class="top-bar">
<div class="top-bar-left">
<div class="logo"></div>
<span class="title f24">中国国家博物馆建党百年展点播院线服务平台</span>
</div>
<div class="top-bar-right">
<div class="avatar"></div>
<div class="user-name f16 ">{{userName}}</div>
<!-- <div class="avatar"></div> -->
<div class="user-name f16">Hello, {{ userName }}</div>
<div class="line"></div>
<div class="login-out"></div>
<div class="login-out" @click="logout()"></div>
</div>
</div>
</div>
</template>
<script>
export default{
export default {
data() {
return{
userName:'admin,北京市政府'
}
return {
userName: localStorage.getItem("user"),
};
},
mounted(){
mounted() {},
methods: {
logout() {
this.$confirm("确认退出吗?")
.then((_) => {
this.handleLogout();
})
.catch((_) => {});
},
methods:{
handleLogout() {
let _this = this;
_this
.$https( {
method: "get",
url: "logout",
authType:'back'
} )
.then((res) => {
if (res.status == 200) {
let resData = res.data;
if (resData.resultCode == 200) {
_this.$message({
type: "success",
message: resData.message,
});
localStorage.removeItem("user");
localStorage.removeItem("backToken");
_this.$router.push("login");
} else {
_this.$message.error(res.data.message);
}
}
} else {
_this.$message.error(res.data.message);
}
})
.catch((err) => {
_this.$message.error(error.message);
});
},
},
};
</script>
<style lang="less" scoped>
.top-bar{
.top-bar {
background-color: @party-red;
width: 100%;
height: 76px;
line-height: 76px;
padding:0 30px;
overflow:hidden;
.top-bar-left{
padding: 0 30px;
overflow: hidden;
.top-bar-left {
float: left;
.logo{
.logo {
width: 46px;
height: 36px;
display: inline-block;
vertical-align: middle;
background-color: pink;
background: url("~@/assets/login/logo.png") no-repeat center/100% 100%;
}
.title{
.title {
color: @party-white;
vertical-align: middle;
padding-left: 16px;
}
}
.top-bar-right{
.top-bar-right {
float: right;
> *{
> * {
display: inline-block;
vertical-align: middle;
}
.avatar{
.avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background-color: pink;
}
.user-name{
.user-name {
font-size: 16px;
line-height: 16px;
color: @party-white;
}
.line{
.line {
width: 2px;
height: 18px;
background-color: @party-white;
margin: 0 15px;
}
.login-out{
.login-out {
width: 20px;
height: 20px;
background-color: pink;
background: url("~@/assets/login/logout.png") no-repeat center/100% 100%;
cursor: pointer;
}
}
}
</style>
......@@ -89,7 +89,7 @@ const httpServer = (opts,data,file,timeout)=>{
// Authorization
if(opts.authType==="back"){
//authToken=localStorage.getItem('backToken');
authToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInVzZXJfaWQiOiIxIiwiaXNzIjoiSUFUQSIsImV4cCI6MTYxNjY2NTkzOCwiaWF0IjoxNjE2NjUxNTM4fQ._nqZq0LMwkurIBKJtfX-imXLCxQSNwJ-ueGZ8iwW-0oAW880gY7PjNEfroYYQZ91v0u5yQb73Alzvy6EIp6GGg"
authToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInVzZXJfaWQiOiIxIiwiaXNzIjoiSUFUQSIsImV4cCI6MTYxNzAzMzM3NSwiaWF0IjoxNjE3MDE4OTc1fQ.NN7nF9aOGJIVZm-8x0uVz00S--YbETfkC1Ifu9R4PbnNPvObhDYlY_u2oxiq2dEkjkJ4sQWy5o2X-fTNaIvnIQ"
}else if(opts.authType==="front"){
authToken = localStorage.getItem("token") || MyLocalStorage.Cache.get('token');
}
......
export const menuList = [
{
title:'内容管理',
menu:[
name: '内容管理',
icon: 'icon-headContent',
avatar: 'content_head_picture.png',
color: '',
url: '',
children: [
{
subtitle:'视频管理',
subMenu:[
{label:'视频版权方管理', imgUrl:'',url:'/videoCopyright'},
{label:'视频分类管理', imgUrl:'',url:'/videoClassify'},
{label:'视频内容管理', imgUrl:'',url:'/videoContent'},
{label:'视频汇出', imgUrl:'',url:'/videoRemit'},
name: '展板管理',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ name: '版权方管理', icon: 'icon-copyrights', color: 'index-red', avatar: '', url: '/displayCopyright' },
{ name: '分类管理', icon: 'icon-classify', color: 'index-blue', avatar: '', url: '/displayclassify' },
{ name: '内容管理', icon: 'icon-content', color: 'index-green', avatar: '', url: '/displayContent' },
]
},
{
subtitle:'展板管理',
subMenu:[
{label:'展板版权方管理', imgUrl:'',url:'/displayCopyright'},
{label:'展板分类管理', imgUrl:'',url:'/displayClassify'},
{label:'展板内容管理', imgUrl:'',url:'/displayContent'},
name: '视频管理',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ name: '版权方管理', icon: 'icon-copyrights', color: 'index-red', avatar: '', url: '/videoCopyright' },
{ name: '分类管理', icon: 'icon-classify', color: 'index-blue', avatar: '', url: '/videoclassifyify' },
{ name: '内容管理', icon: 'icon-content', color: 'index-green', avatar: '', url: '/videoContent' },
{ name: '视频汇出', icon: 'icon-plane', color: 'index-purple', avatar: '', url: '/videoRemit' },
]
},
{
subtitle:'学习内容及互动管理',
subMenu:[
{label:'学习内容管理', imgUrl:'',url:'/learnContent'},
{label:'互动管理', imgUrl:'',url:'/interactive'}
name: '平台学习内容制作',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ name: '学习内容制作', icon: 'icon-pen', color: 'index-pink', avatar: '', url: '/learnContent' },
{ name: '学习项目管理', icon: 'icon-data', color: 'index-blue', avatar: '', url: '/learnProject' },
]
},
]
},
{
title:'统计数据',
menu:[
name: '审核管理',
icon: 'icon-headAudit',
avatar: 'audit_head_picture.png',
color: '',
url: '',
children: [
{
subtitle:'统计图表',
subMenu:[
{label:'统计概览', imgUrl:''},
{label:'互动统计', imgUrl:''},
{label:'趋势分析', imgUrl:''}
name: '内容及账号审核',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ name: '视频审核', icon: 'icon-video', color: 'index-blue', url: '/checkVideo' },
{ name: '展板审核', icon: 'icon-screen', color: 'index-green', url: '/checkDisplay' },
{ name: '平台学习内容审核', icon: 'icon-magnifier', color: 'index-pink', url: '/checkLearn' },
{ name: '账号禁用审核', icon: 'icon-disable', color: 'index-red', url: '/checkLearn' }
]
},
{
subtitle:'统计账号',
subMenu:[
{label:'统计账号管理', imgUrl:''}
}
]
},
{
title: '单位用户管理',
icon: 'icon-headUser',
avatar: 'user_head_picture.png',
color: '',
url: '',
children: [
{
name: '互动管理',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ label: '互动管理', icon: 'icon-interaction', color: 'index-purple', url: '/interactive' }
]
},
{
title:'审核管理',
menu:[
{
subtitle:'内容及账号审核',
subMenu:[
{label:'视频审核', imgUrl:'',url:'/checkVideo'},
{label:'展板审核', imgUrl:'',url:'/checkDisplay'},
{label:'平台学习内容审核', imgUrl:'',url:'/checkLearn'},
{label:'账号禁用审核', imgUrl:''}
name: '账号管理',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ label: '账号管理', icon: 'icon-account', color: 'index-blue', url: '/unitAdmin' }
]
}
]
},
{
title:'机顶盒管理',
menu:[
name: '机顶盒管理',
icon: 'icon-headStb',
avatar: 'stb_head_picture.png',
color: '',
url: '',
children: [
{
subtitle:'机顶盒信息及运维管理',
subMenu:[
{label:'机顶盒信息管理', imgUrl:'',url:'/STBbase'},
{label:'机顶盒运维信息管理', imgUrl:'',url:'/STBoperation'},
{label:'机顶盒运维账号管理', imgUrl:''},
{label:'app版本管理', imgUrl:'',url:'/appversion'},
{label:'app界面自定义', imgUrl:'',url:'/pagecustom'},
name: '机顶盒信息及运维管理',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ name: '基础信息管理', icon: 'icon-radio', color: 'index-pink', url: '/STBbase' },
{ name: '运维信息管理', icon: 'icon-message', color: 'index-blue', url: '/STBoperation' },
{ name: '运维账号管理', icon: 'icon-gear', color: 'index-pink', url: '/stbAccount' }
]
},
{
name: 'APP管理',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ name: '版本管理', icon: 'icon-appversion', color: 'index-red', url: '/appversion' },
{ name: '界面自定义', icon: 'icon-interface', color: 'index-pink', url: '/pagecustom' }
]
}
]
},
{
title:'系统管理',
menu:[
name: '统计数据',
icon: 'icon-headStatistics',
avatar: 'statistics_head_picture.png',
color: '',
url: '',
menu: [
{
subtitle:'机构及信息管理',
subMenu:[
{label:'机构管理', imgUrl:'',url:'/organ'},
{label:'日志管理', imgUrl:'',url:'/log'},
{label:'修改密码', imgUrl:'',url:'/changePwd'},
name: '统计图表',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ name: '统计概览', icon: 'icon-overview', color: 'index-purple', url: '/overview' },
{ name: '互动统计', icon: 'icon-interaction', color: 'index-green', url: '' },
{ name: '趋势分析', icon: 'icon-tend', color: 'index-pink', url: '' }
]
},
{
subtitle:'系统账号管理',
subMenu:[
{label:'用户账号管理', imgUrl:'',url:'/users'},
{label:'单位管理员账号管理', imgUrl:'',url:'/unitAdmin'},
name: '统计账号',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ name: '统计用户管理', icon: 'icon-statisticsUser', color: 'index-blue', url: '/statisticalUser' }
]
},
]
},
{
name: '系统管理',
icon: 'icon-headSystem',
avatar: 'system_head_picture.png',
color: '',
url: '',
menu: [
{
name: '机构及信息管理',
icon: '',
avatar: '',
color: '',
url: '',
children: [
{ name: '机构管理', icon: 'icon-organ', color: 'index-green', url: '/organ' },
{ name: '日志管理', icon: 'icon-log', color: 'index-pink', url: '/log' },
{ name: '平台用户管理', icon: 'icon-platUser', color: 'index-blue', url: '/users' },
{ name: '修改密码', icon: 'icon-lock', color: 'index-red', url: '/changePwd' },
]
}
]
},
]
\ No newline at end of file
import rejectDialog from './reject'
export {
rejectDialog
}
\ No newline at end of file
<template>
<el-dialog
custom-class="party-dialog"
title="驳回原因"
:visible.sync="dialogVisible"
width="468px"
:before-close="handleClose"
>
<div class="dialog-content">
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="80px"
label-position="top"
class="party-form"
>
<el-form-item label="请填写驳回原因" prop="remarks">
<el-input
v-model="form.remarks"
placeholder="请填写"
type="textarea"
></el-input>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer btn-group">
<el-button @click="handleClose()">取 消</el-button>
<el-button type="primary" @click="handleSubmit()">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
data() {
return {
dialogVisible: false,
form: {
status: 2,
content: "",
type: 3, //0,看板;1 视频;2 学习内容;3 账号禁用
},
rules: {
content: [
{ required: true, message: "请填写驳回原因", trigger: "change" },
],
},
};
},
mounted() {},
methods: {
// 弹窗关闭
handleClose() {
this.$confirm("确认关闭?")
.then((_) => {
this.handleReset();
})
.catch((_) => {});
},
handleReset() {
this.dialogVisible = false;
this.$refs.form.resetFields();
this.form = {
remarks: "",
type: "ACCOUNT",
};
},
// 提交
handleSubmit() {
// 校验用户输入值
let _this = this;
this.$refs.form.validate((valid) => {
if (valid) {
this.$https(
{
method: "put",
url: "audit/update",
authType: this.backToken,
},
_this.form
)
.then((res) => {
this.handleReset();
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.$message({
type: "success",
message: res.data.message,
});
this.$emit("success", true);
} else {
this.$message.error(res.data.message);
}
} else {
this.$message.error(res.data);
}
})
.catch((err) => {
console.log(err);
});
} else {
console.log("error submit!!");
return false;
}
});
},
},
};
</script>
<style lang="less" scoped>
.form-row {
display: flex;
justify-content: space-between;
}
</style>
\ No newline at end of file
......@@ -44,6 +44,13 @@
<i class="icon-table icon-enable"></i>
</el-button>
</el-tooltip>
<el-tooltip content="审核详情" placement="top">
<el-button
circle
@click="handleOperate(scope.row,'examine')">
<i class="icon-table icon-detail"></i>
</el-button>
</el-tooltip>
</div>
<div v-else>
<span v-if="item.prop==='type'">
......
<template>
<div class="party-table">
<el-table border :data="list" style="width: 100%;height:100%" height="100%">
<el-table-column
label="序号"
align="center"
width="100">
<template slot-scope="scope" >
<span>{{ (currentPage-1) * 10 * scope.$index + 1}}</span>
<el-table
border
:data="list"
style="width: 100%; height: 100%"
height="100%"
>
<el-table-column label="序号" align="center" width="100">
<template slot-scope="scope">
<span>{{ (currentPage - 1) * 10 * scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
align="center"
v-for="(item,index) in feildList"
v-for="(item, index) in feildList"
:key="index"
:prop="item.prop"
:label="item.label"
:width="item.width">
<template slot-scope="scope" >
:width="item.width"
>
<template slot-scope="scope">
<div v-if="item.isEdit" class="table-btn-group">
<el-button round class="passed" @click="handleOperate(scope.row,'edit')">
<el-button
round
class="passed"
:disabled="
scope.row.status === 'REFUSED' ||
scope.row.status === 'APPROVED_FINAL'
"
@click="handleOperate(scope.row, 'pass')"
>
通过
</el-button>
<el-button round class="rejected" @click="handleOperate(scope.row,'edit')">
<el-button
round
class="rejected"
:disabled="
scope.row.status === 'REFUSED' ||
scope.row.status === 'APPROVED_FINAL'
"
@click="handleOperate(scope.row, 'reject')"
>
驳回
</el-button>
</div>
<div v-else>
<span>{{scope.row[item.prop]}}</span>
<span v-if="item.prop === 'status'">
{{ scope.row[item.prop] | statusName }}
</span>
<span v-else>{{ scope.row[item.prop] }}</span>
</div>
</template>
</el-table-column>
......@@ -35,39 +57,72 @@
</template>
<script>
export default {
data(){
return {
}
data() {
return {};
},
props:{
currentPage:{
type:Number,
default:1
props: {
currentPage: {
type: Number,
default: 1,
},
list:{
type:Array,
default:()=>{return []}
list: {
type: Array,
default: () => {
return [];
},
feildList:{
type:Array,
default:()=>{return []}
}
},
methods:{
handleOperate(row,type){
this.$emit(
"action",
{
row:row,
type:type
}
)
feildList: {
type: Array,
default: () => {
return [];
},
},
},
filters: {
statusName(type) {
switch (type) {
case "TBC":
return "待初审";
break;
case "REFUSED":
return "驳回";
break;
case "TBCA":
return "待复审";
break;
case "APPROVED_FINAL":
return "通过";
break;
default:
return "";
}
},
},
methods: {
handleOperate(row, type) {
if (type == "pass") {
this.$confirm("确认进行此操作?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.handlEmitMsg(row, type);
})
.catch(() => {});
} else {
this.handlEmitMsg(row, type);
}
}
},
handlEmitMsg(row, type) {
this.$emit("action", {
row: row,
type: type,
});
},
},
};
</script>
<style lang="less">
@import '../../../style/table.less';
@import "../../../style/table.less";
</style>
\ No newline at end of file
......@@ -44,13 +44,13 @@ export default {
_size: 10,
total: 0,
},
activeRow: {}
activeRow: {},
};
},
components: {
partyPagination,
dbUnitTable,
editDialog
editDialog,
},
mounted() {
this.getFirstPageList();
......@@ -91,19 +91,28 @@ export default {
console.log(err);
});
},
// 页面返回值为空
getResWithOutData() {
this.list = [];
this.page = {
_index: 1,
_size: 10,
total: 0,
};
},
// 编辑
handleEdit() {
this.$refs.editDialog.id = this.activeRow.id;
this.$refs.editDialog.getDetailById();
this.$refs.editDialog.dialogVisible = true;
this.$refs.editDialog.isEdit = true
this.$refs.editDialog.isEdit = true;
},
// 查看详情
handleDetail() {
this.$refs.editDialog.id = this.activeRow.id;
this.$refs.editDialog.getDetailById();
this.$refs.editDialog.dialogVisible = true;
this.$refs.editDialog.isEdit = false
this.$refs.editDialog.isEdit = false;
},
handleAction(params) {
this.activeRow = params.row;
......@@ -127,10 +136,9 @@ export default {
};
</script>
<style lang="less" scoped>
.dbUnit-wrapper{
.page-tips{
.dbUnit-wrapper {
.page-tips {
white-space: nowrap;
}
}
</style>
\ No newline at end of file
......@@ -35,7 +35,9 @@
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips">展示所有禁用账号的申请,审核通过后,该账号状态为禁用,无法在系统中使用</span>
<span class="page-tips"
>展示所有禁用账号的申请,审核通过后,该账号状态为禁用,无法在系统中使用</span
>
</div>
</div>
<div class="table-content">
......@@ -45,64 +47,163 @@
:list="list"
@action="handleAction"
/>
<party-pagination/>
<party-pagination :page="page" @changePage="handleChangeCurrent" />
</div>
<!-- <user-dialog/> -->
<reject-dialog ref="rejectDialog" @success="getPageList()" />
</div>
</template>
<script>
import { partyPagination } from '@/components/index'
import checkTable from './components/checkTable'
import {addDialog, editDialog} from './userDialog/index'
import { partyPagination } from "@/components/index";
import checkTable from "./components/checkTable";
import { rejectDialog } from "./checkDialog/index";
export default {
data(){
return{
form:{
user:'',
status:''
},
options:[
{label:'待初审',value:1},
{label:'驳回',value:2},
{label:'待复审',value:3},
{label:'通过',value:4}
data() {
return {
form: {
name: "",
status: "",
},
options: [
{ label: "待初审", value: "TBC" },
{ label: "驳回", value: "REFUSED" },
{ label: "待复审", value: "TBCA" },
{ label: "通过", value: "APPROVED_FINAL" }
],
feildList:[
{prop:'username',label:'账号名称'},
{prop:'orgName',label:'所在机构'},
{prop:'endTime',label:'提交人'},
{prop:'endTime',label:'提交日期'},
{prop:'endTime',label:'审核状态'},
{prop:'',label:'操作',isEdit:true, width:240},
feildList: [
{ prop: "content", label: "账号名称" },
{ prop: "orgName", label: "所在机构" },
{ prop: "userName", label: "提交人" },
{ prop: "createTime", label: "提交日期" },
{ prop: "status", label: "审核状态" },
{ prop: "", label: "操作", isEdit: true, width: 240 },
],
list: []
}
list: [],
activeRow: {},
page: {
_index: 1,
_size: 10,
total: 0,
},
components:{ partyPagination, checkTable, addDialog, editDialog},
mounted(){
type:'ACCOUNT',
};
},
components: { partyPagination, checkTable, rejectDialog },
mounted() {
this.getFirstPageList();
},
methods: {
// 查询数据
handleSubmit() {
this.getPageList();
},
handleReset() {
this.form.name = "";
this.form.status = "";
this.getFirstPageList()
},
methods:{
handleSubmit(){
// 获取第一页数据列表
getFirstPageList() {
this.page._index = 1;
this.getPageList();
},
handleReset(){
this.form.user = ''
getPageList() {
let requestParams = {};
requestParams._index = this.page._index;
requestParams._size = this.page._size;
requestParams.name = this.form.name;
requestParams.status = this.form.status;
this.$https(
{
method: "get",
url: "audit/getUserList",
authType: this.backToken,
},
// 弹窗关闭
handleClose(){
this.$confirm('确认关闭?')
.then(_ => {
done();
requestParams
)
.then((res) => {
if (res.status != 200) {
this.getResWithOutData();
} else {
if (res.data.resultCode == 200) {
this.list = res.data.data.records;
this.page._size = res.data.data.size;
this.page.total = res.data.data.total;
} else {
this.getResWithOutData();
}
}
})
.catch(_ => {});
.catch((err) => {
console.log(err);
});
},
// 页面返回值为空
getResWithOutData() {
this.list = [];
this.page = {
_index: 1,
_size: 10,
total: 0,
};
},
handleAction(params){
console.log(params.type)
handleAction(params) {
this.activeRow = params.row;
switch (params.type) {
case "reject":
this.handleRject();
break;
case "pass":
this.handlePass();
break;
default:
break;
}
},
// 驳回
handleRject() {
this.$refs.rejectDialog.dialogVisible = true;
},
// 通过
handlePass() {
let params = {};
params.id = this.activeRow.id;
params.status = 4;
params.type = this.type
this.$https(
{
method: "put",
url: "audit/update",
authType: this.backToken,
},
params
)
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.$message({
type: "success",
message: res.data.message,
});
this.getPageList();
} else {
this.$message.error(res.data.message);
}
}
} else {
this.$message.error(res.data);
}
})
.catch((err) => {
console.log(res);
});
},
// 翻页
handleChangeCurrent() {
this.page._index = val;
this.getPageList();
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -160,24 +160,23 @@ export default {
requetsparams
)
.then((res) => {
debugger
this.handleReset();
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.$message({
type: "success",
message: res.data.message,
});
this.handleReset();
this.$emit("success", true);
} else {
this.$message.error(res.data.message);
this.$message.error(res.data.message || res.data.msg);
}
} else {
this.$message.error(res.data);
}
})
.catch((err) => {
console.log(res);
this.$message.error(err.message || err.msg);
});
} else {
console.log("error submit!!");
......
......@@ -193,6 +193,15 @@ export default {
console.log(err);
});
},
// 页面返回值为空
getResWithOutData(){
this.list = []
this.page = {
_index:1,
_size:10,
total:0
}
},
// 新增账号
handleAdd() {
this.$refs.addDialog.dialogVisible = true;
......
......@@ -3,21 +3,24 @@
<div class="panel-box" v-for="(item,index) in menuList" :key="index">
<div class="panel-box-title">
<span class="panel-box-title-wrapper">
<i class="panel-box-title-icon"></i>
<span>{{item.title}}</span>
<i :class="item.icon" class="panel-box-title-icon"></i>
<span>{{item.name}}</span>
</span>
<div class="panel-box-title-img"></div>
<div class="panel-box-title-img">
<img :src="requireImg(item.avatar)" alt="">
</div>
</div>
<div class="panel-box-content">
<div class="panel-sub-box" v-for="(subItem,subIndex) in item.menu" :key="subIndex">
<div class="panel-sub-box" v-for="(subItem,subIndex) in item.children" :key="subIndex">
<div class="panel-box-sub-title">
<span class="line"></span>
<span class="panel-box-sub-title_name">{{subItem.subtitle}}</span>
<span class="panel-box-sub-title_name">{{subItem.name}}</span>
</div>
<ul >
<li v-for="(menu,mIndex) in subItem.subMenu" :key="mIndex" @click="goPage(menu.url)">
<i class="icon-memu"></i>
<span class="menu-label">{{menu.label}}</span>
<li v-for="(menu,mIndex) in subItem.children" :key="mIndex" @click="goPage(menu.url)" :class="menu.color">
<i :class="menu.icon" class="icon-memu"></i>
<span class="menu-label">{{menu.name}}</span>
</li>
</ul>
</div>
......@@ -41,11 +44,15 @@ export default{
if(path){
this.$router.push(path)
}
},
requireImg(imgSrc){
return require(`@/assets/menu/${imgSrc}`)
}
}
}
</script>
<style lang="less" scoped>
@import '~@/style/menu.less';
@media screen and (max-width: 1440px) {
.index-container{
width: 100%;
......@@ -100,8 +107,6 @@ export default{
display: inline-block;
width: 28px;
height: 28px;
border-radius: 50%;
background-color: @party-pink;
vertical-align: middle;
margin-right: 18px;
}
......@@ -118,8 +123,12 @@ export default{
height: 10.4vw;
max-width: 200px;
max-height: 200px;
background-color:@party-pink ;
margin-top: 20px;
img{
width: 100%;
height: 100%;
object-fit: cover;
}
}
.panel-box-content{
padding-left: 20px;
......@@ -160,7 +169,6 @@ export default{
max-width: 128px;
max-height: 160px;
text-align: center;
background: @party-bg-gray;
border-radius: 8px;
color: @font-color;
&:not(:first-child){
......
<template>
<div class="change-pwd-wrapper height100">
<div class="change-pwd-wrapper height100">
<div class="page-form-box">
<div class="page-form-box-header">
修改密码
</div>
<div class="page-form-box-header">修改密码</div>
<div class="page-form-box-content">
<el-form ref="form" :model="form" label-width="80px" label-position="top" class="party-form">
<el-form-item label="请输入当前密码" >
<el-input v-model="form.name" placeholder="请填写"></el-input>
<el-form
ref="form"
:rules="rules"
:model="form"
label-width="80px"
label-position="top"
class="party-form"
>
<el-form-item label="请输入当前密码" prop="oldPassWord">
<el-input
v-model="form.oldPassWord"
placeholder="请输入当前密码"
type="password"
></el-input>
</el-form-item>
<el-form-item label="请输入新密码" >
<el-input v-model="form.name" placeholder="请填写"></el-input>
<el-form-item label="请输入新密码" prop="password">
<el-input
v-model="form.password"
placeholder="请输入新密码"
type="password"
>
</el-input>
</el-form-item>
<el-form-item label="请再次输入新密码" >
<el-input v-model="form.name" placeholder="请填写"></el-input>
<el-form-item label="请再次输入新密码" prop="checkPass">
<el-input
v-model="form.checkPass"
placeholder="请再次输入新密码"
type="password"
>
</el-input>
</el-form-item>
</el-form>
</div>
<div class="page-form-box-footer">
<div class="btn-group">
<el-button>取消</el-button>
<el-button type="primary">确定修改</el-button>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSubmit">确定修改</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data(){
return {
form:{
name:''
data() {
var validatePass = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入密码"));
} else {
this.$refs.ruleForm.validateField("password");
callback();
}
};
var validatePass2 = (rule, value, callback) => {
if (value === "") {
callback(new Error("请再次输入密码"));
} else if (value !== this.form.password) {
callback(new Error("两次输入密码不一致!"));
} else {
callback();
}
};
return {
form: {
oldPassWord: "",
password: "",
checkPass: "",
},
mounted(){
rules: {
oldPassWord: [
{ required: true, message: "请输入原密码", trigger: "blur" },
],
password: [
{ required: true, validator: validatePass, trigger: "blur" },
],
checkPass: [
{ required: true, validator: validatePass2, trigger: "blur" },
],
},
};
},
mounted() {},
methods: {
handleCancel() {
this.form = {
oldPassWord: "",
password: "",
checkPass: "",
};
},
methods:{
handleSubmit() {
let _this = this;
this.$refs.validate((valid) => {
if (valid) {
let requestParams = {};
requestParams.oldPassWord = _this.form.oldPassWord;
requestParams.password = _this.form.password;
_this
.$https(
{
method: "put",
url: "tUser/editPwd",
},
requestParams
)
.then((res) => {
if (res.status != 200) {
_this.$message.error(res.data.message);
} else {
if (res.data.resultCode == 200) {
this.$message({
type: "success",
message: res.data.message,
});
_this.redirectLogin()
} else {
_this.$message.error(res.data.message);
}
}
})
.catch((error) => {
_this.$message.error(error.data.message);
});
} else {
console.log("error submit!!");
return false;
}
});
},
redirectLogin(){
this.$router.push('./login')
}
}
},
};
</script>
<style lang="less" scoped>
.change-pwd-wrapper{
.party-form{
.change-pwd-wrapper {
.party-form {
width: 300px;
margin: 0 auto;
}
......
<template>
<div>
<el-dialog
custom-class="party-dialog"
title="新建机构"
......@@ -15,16 +16,9 @@
label-position="top"
class="party-form"
>
<el-form-item label="新增类别:" prop="level">
<el-radio-group v-model="form.level">
<el-radio
v-for="(item, index) in levelOption"
:key="index"
:label="item.label"
>
{{ item.value }}
</el-radio>
</el-radio-group>
<el-form-item label="父级节点:">
<el-input v-model="form.parentName"></el-input>
<el-button @click="handlefocus" round>修改</el-button>
</el-form-item>
<el-form-item label="机构名称:" prop="name">
<el-input
......@@ -58,9 +52,16 @@
>
</div>
</el-dialog>
<org-trees
ref="orgTree"
:treeData="treeData"
@selected="handleSelectParent"
/>
</div>
</template>
<script>
import { getAreas } from "@/config/area";
import orgTrees from './orgTree'
export default {
data() {
return {
......@@ -68,21 +69,18 @@ export default {
form: {
name: "",
areaId: [],
level: "",
remarks: "",
parentId: "",
parentName: "",
},
disabled: false,
areaOptions: [],
cascaderProps: {
label: "name",
value: "code",
checkStrictly: true
checkStrictly: true,
},
levelOption: [],
rules: {
level: [
{ required: true, message: "请选择用户类别", trigger: "change" },
],
name: [
{ required: true, message: "请输入机构名称", trigger: "change" },
],
......@@ -92,40 +90,46 @@ export default {
},
};
},
components: { orgTrees },
props: {
level: {
type: Number,
default: 1,
treeData: {
type: Array,
default: () => {
return [];
},
},
parentId:{
type: String,
default: '0',
}
},
mounted() {
this.getLevelOption();
getAreas().then((res) => {
this.areaOptions = res;
});
},
methods: {
handlefocus() {
this.$refs.orgTree.dialogVisible = true;
},
handleSelectParent(parentData) {
this.form.parentId = parentData.id;
this.form.parentName = parentData.name;
},
// 弹窗关闭
handleClose() {
this.$confirm("确认关闭?")
.then((_) => {
this.handleReset()
this.handleReset();
})
.catch((_) => {});
},
handleReset(){
this.dialogVisible = false
this.$refs.form.resetFields()
handleReset() {
this.dialogVisible = false;
this.$refs.form.resetFields();
this.form = {
name: "",
areaId: [],
level: "",
remarks: "",
}
parentId: "",
parentName: "",
};
},
handleCancle() {
this.handleClose();
......@@ -138,8 +142,7 @@ export default {
params.name = this.form.name;
params.areaId = [...this.form.areaId].pop();
params.remarks = this.form.remarks;
params.level = this.form.level;
params.parentId = this.parentId
params.parentId = this.form.parentName ? this.form.parentId : "0";
let requestparams = this.$qs.stringify(params);
this.$https(
{
......@@ -150,60 +153,31 @@ export default {
requestparams
)
.then((res) => {
if(res.status == 200 ){
if (res.data.resultCode == 200 ) {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.$message({
type: "success",
message: res.data.message,
});
this.handleReset()
this.$emit('success',true)
this.handleReset();
this.$emit("success", true);
} else {
this.$message.error(res.data.message);
this.$emit('success',false)
this.$emit("success", false);
}
} else {
this.$message.error(res.data);
this.$emit('success',false)
this.$emit("success", false);
}
})
.catch((err) => {
console.log(res);
console.log(err);
});
} else {
console.log("error submit!!");
return false;
}
});
},
getLevelOption() {
this.form.level = this.level;
if (this.level === 1) {
this.levelOption = [
{ label: 1, value: "平级机构" },
{ label: 2, value: "下级机构" },
];
} else if (this.level === 2) {
this.levelOption = [
{ label: 1, value: "上级机构" },
{ label: 2, value: "平级机构" },
{ label: 3, value: "下级机构" },
];
} else if (this.level === 3) {
this.levelOption = [
{ label: 2, value: "上级机构" },
{ label: 3, value: "平级机构" },
];
} else {
this.levelOption = [];
}
},
},
watch: {
level() {
// level 1 没有上级 level 3 没有下级
this.getLevelOption();
},
},
};
</script>
......
<template>
<p> 编辑</p>
<div>
<el-dialog
custom-class="party-dialog"
title="编辑机构"
:visible.sync="dialogVisible"
width="468px"
:before-close="handleClose"
>
<div class="dialog-content">
<el-form
ref="form"
:rules="rules"
:model="form"
label-width="80px"
label-position="top"
class="party-form"
>
<el-form-item label="父级节点:">
<el-input v-model="form.parentName"></el-input>
<el-button @click="handlefocus" round>修改</el-button>
</el-form-item>
<el-form-item label="机构名称:" prop="name">
<el-input
v-model="form.name"
placeholder="请填写"
clearable
></el-input>
</el-form-item>
<el-form-item label="机构地理位置:" prop="areaId">
<el-cascader
v-model="form.areaId"
change-on-select
:props="cascaderProps"
:options="areaOptions"
>
</el-cascader>
</el-form-item>
<el-form-item label="备注">
<el-input
v-model="form.remarks"
type="textarea"
placeholder="请输入"
></el-input>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer btn-group">
<el-button @click="handleCancle()">取 消</el-button>
<el-button type="primary" @click="handleSubmit()" :disabled="disabled"
>确 定</el-button
>
</div>
</el-dialog>
<org-trees
ref="orgTree"
:treeData="treeData"
@selected="handleSelectParent"
>
</org-trees>
</div>
</template>
export default{
<script>
import { getAreas } from "@/config/area";
import orgTrees from "./orgTree";
export default {
data() {
return {
dialogVisible: false,
form: {
name: "",
areaId: [],
remarks: "",
parentId: "",
parentName: "",
},
disabled: false,
areaOptions: [],
cascaderProps: {
label: "name",
value: "code",
checkStrictly: true,
},
rules: {
name: [
{ required: true, message: "请输入机构名称", trigger: "change" },
],
areaId: [
{ required: true, message: "请选择地理位置", trigger: "change" },
],
},
};
},
components: { orgTrees },
props: {
currentInfo: {
type: Object,
default: () => {
return {};
},
},
treeData: {
type: Array,
default: () => {
return [];
},
},
},
mounted() {
getAreas().then((res) => {
this.areaOptions = res;
});
},
methods: {
handlefocus() {
this.$refs.orgTree.dialogVisible = true;
},
handleSelectParent(parentData) {
this.form.parentId = parentData.id;
this.form.parentName = parentData.name;
},
// 弹窗关闭
handleClose() {
this.$confirm("确认关闭?")
.then((_) => {
this.handleReset();
})
.catch((_) => {});
},
handleReset() {
this.dialogVisible = false;
this.$refs.form.resetFields();
this.form = {
name: "",
areaId: [],
remarks: "",
parentId: "",
parentName: "",
};
},
handleCancle() {
this.handleClose();
},
handleSubmit() {
// 校验用户输入值
this.$refs.form.validate((valid) => {
if (valid) {
let params = {};
params.name = this.form.name;
params.areaId = [...this.form.areaId].pop();
params.remarks = this.form.remarks;
params.parentId = this.form.parentName ? this.form.parentId : "";
params.id = this.currentInfo.id;
let requestparams = this.$qs.stringify(params);
this.$https(
{
method: "put",
url: "organ/update",
authType: this.backToken,
},
requestparams
)
.then((res) => {
this.handleReset();
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.$message({
type: "success",
message: res.data.message,
});
}
this.$emit("success", true);
} else {
this.$message.error(res.data.message);
// this.$emit("success", false);
}
} else {
this.$message.error(res.data);
// this.$emit("success", false);
}
})
.catch((err) => {
console.log(err);
});
} else {
return false;
}
});
},
},
watch: {
currentInfo() {
this.form = {
name: this.currentInfo.name,
areaId: this.currentInfo.areas,
remarks: this.currentInfo.remarks,
parentId: this.currentInfo.parentId,
parentName: this.currentInfo.parentName,
};
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
import orgAdd from './add'
import orgEdit from './edit'
import orgTrees from './orgTree'
export{
orgAdd,
orgEdit
orgEdit,
orgTrees
}
<template>
<el-dialog
custom-class="party-dialog"
title="选择级别"
:visible.sync="dialogVisible"
width="600px"
>
<el-tree
ref="tree"
:data="treeData"
node-key="id"
highlight-current
:props="defaultProps"
@node-click="handleNodeClick"
>
</el-tree>
</el-dialog>
</template>
<script>
export default {
data() {
return {
dialogVisible: false,
defaultProps: {
children: "children",
label: "name",
},
};
},
props: {
treeData: {
type: Array,
default: () => {
return [];
},
},
},
methods: {
handleNodeClick(data) {
this.$emit('selected', data)
this.dialogVisible = false
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
@party-purple:#757BEE;
@party-pink:#CF6BA4;
@party-blue:#5E8DE5;
@party-green:#3DD0C6;
@colors: purple, pink, blue, green,red;
@iconList:headContent,copyrights,classify,content,plane,
pen,data,headAudit,video,screen,magnifier,disable,headUser,interaction,
account,headStb,radio,message,gear,appversion,interface,headStatistics,overview,tend,
statisticsUser,headSystem,organ,log,platUser,lock;
@lenIcon:length(@iconList);
@lenColor:length(@colors);
each(@iconList, {
.icon-@{value} {
background: url("~@/assets/menu/@{value}.png") no-repeat center/100% 100%;
}
});
each(@colors, {
// .index-@{value}{
// background-color: @{party-@{value}}
// }
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment