Commit fe31abee authored by xulili's avatar xulili

登录

parent 3f0ad157
<template> <template>
<div id="app"> <div id="app">
<top-bar></top-bar> <top-bar v-if="!$route.meta.noShowbar"></top-bar>
<breadcrumb v-if="$route.meta.showBreadcrumb"></breadcrumb> <breadcrumb v-if="$route.meta.showBreadcrumb"></breadcrumb>
<!-- <div :class="'appContent' {}"> --> <!-- <div :class="'appContent' {}"> -->
<div v-bind:class="[{ hasBread: $route.meta.showBreadcrumb }, '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> <template>
<div class="top-bar"> <div class="top-bar">
<div class="top-bar-left"> <div class="top-bar-left">
<div class="logo"></div> <div class="logo"></div>
<span class="title f24">中国国家博物馆建党百年展点播院线服务平台</span> <span class="title f24">中国国家博物馆建党百年展点播院线服务平台</span>
</div> </div>
<div class="top-bar-right"> <div class="top-bar-right">
<div class="avatar"></div> <!-- <div class="avatar"></div> -->
<div class="user-name f16 ">{{userName}}</div> <div class="user-name f16">Hello, {{ userName }}</div>
<div class="line"></div> <div class="line"></div>
<div class="login-out"></div> <div class="login-out" @click="logout()"></div>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
export default {
export default{
data() { data() {
return{ return {
userName:'admin,北京市政府' 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> </script>
<style lang="less" scoped> <style lang="less" scoped>
.top-bar{ .top-bar {
background-color: @party-red; background-color: @party-red;
width: 100%; width: 100%;
height: 76px; height: 76px;
line-height: 76px; line-height: 76px;
padding:0 30px; padding: 0 30px;
overflow:hidden; overflow: hidden;
.top-bar-left{ .top-bar-left {
float: left; float: left;
.logo{ .logo {
width: 46px; width: 46px;
height: 36px; height: 36px;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
background-color: pink; background: url("~@/assets/login/logo.png") no-repeat center/100% 100%;
} }
.title{ .title {
color: @party-white; color: @party-white;
vertical-align: middle; vertical-align: middle;
padding-left: 16px; padding-left: 16px;
} }
} }
.top-bar-right{ .top-bar-right {
float: right; float: right;
> *{ > * {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} }
.avatar{ .avatar {
width: 36px; width: 36px;
height: 36px; height: 36px;
border-radius: 50%; border-radius: 50%;
background-color: pink; background-color: pink;
} }
.user-name{ .user-name {
font-size: 16px; font-size: 16px;
line-height: 16px; line-height: 16px;
color: @party-white; color: @party-white;
} }
.line{ .line {
width: 2px; width: 2px;
height: 18px; height: 18px;
background-color: @party-white; background-color: @party-white;
margin: 0 15px; margin: 0 15px;
} }
.login-out{ .login-out {
width: 20px; width: 20px;
height: 20px; height: 20px;
background-color: pink; background: url("~@/assets/login/logout.png") no-repeat center/100% 100%;
cursor: pointer;
} }
} }
} }
</style> </style>
...@@ -89,7 +89,7 @@ const httpServer = (opts,data,file,timeout)=>{ ...@@ -89,7 +89,7 @@ const httpServer = (opts,data,file,timeout)=>{
// Authorization // Authorization
if(opts.authType==="back"){ if(opts.authType==="back"){
//authToken=localStorage.getItem('backToken'); //authToken=localStorage.getItem('backToken');
authToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInVzZXJfaWQiOiIxIiwiaXNzIjoiSUFUQSIsImV4cCI6MTYxNjY2NTkzOCwiaWF0IjoxNjE2NjUxNTM4fQ._nqZq0LMwkurIBKJtfX-imXLCxQSNwJ-ueGZ8iwW-0oAW880gY7PjNEfroYYQZ91v0u5yQb73Alzvy6EIp6GGg" authToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInVzZXJfaWQiOiIxIiwiaXNzIjoiSUFUQSIsImV4cCI6MTYxNzAzMzM3NSwiaWF0IjoxNjE3MDE4OTc1fQ.NN7nF9aOGJIVZm-8x0uVz00S--YbETfkC1Ifu9R4PbnNPvObhDYlY_u2oxiq2dEkjkJ4sQWy5o2X-fTNaIvnIQ"
}else if(opts.authType==="front"){ }else if(opts.authType==="front"){
authToken = localStorage.getItem("token") || MyLocalStorage.Cache.get('token'); authToken = localStorage.getItem("token") || MyLocalStorage.Cache.get('token');
} }
......
export const menuList = [ export const menuList = [
{ {
title:'内容管理', name: '内容管理',
menu:[ icon: 'icon-headContent',
avatar: 'content_head_picture.png',
color: '',
url: '',
children: [
{ {
subtitle:'视频管理', name: '展板管理',
subMenu:[ icon: '',
{label:'视频版权方管理', imgUrl:'',url:'/videoCopyright'}, avatar: '',
{label:'视频分类管理', imgUrl:'',url:'/videoClassify'}, color: '',
{label:'视频内容管理', imgUrl:'',url:'/videoContent'}, url: '',
{label:'视频汇出', imgUrl:'',url:'/videoRemit'}, 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:'展板管理', name: '视频管理',
subMenu:[ icon: '',
{label:'展板版权方管理', imgUrl:'',url:'/displayCopyright'}, avatar: '',
{label:'展板分类管理', imgUrl:'',url:'/displayClassify'}, color: '',
{label:'展板内容管理', imgUrl:'',url:'/displayContent'}, 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:'学习内容及互动管理', name: '平台学习内容制作',
subMenu:[ icon: '',
{label:'学习内容管理', imgUrl:'',url:'/learnContent'}, avatar: '',
{label:'互动管理', imgUrl:'',url:'/interactive'} color: '',
url: '',
children: [
{ name: '学习内容制作', icon: 'icon-pen', color: 'index-pink', avatar: '', url: '/learnContent' },
{ name: '学习项目管理', icon: 'icon-data', color: 'index-blue', avatar: '', url: '/learnProject' },
] ]
}, },
] ]
}, },
{ {
title:'统计数据', name: '审核管理',
menu:[ icon: 'icon-headAudit',
avatar: 'audit_head_picture.png',
color: '',
url: '',
children: [
{ {
subtitle:'统计图表', name: '内容及账号审核',
subMenu:[ icon: '',
{label:'统计概览', imgUrl:''}, avatar: '',
{label:'互动统计', imgUrl:''}, color: '',
{label:'趋势分析', imgUrl:''} 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:'审核管理', name: '账号管理',
menu:[ icon: '',
{ avatar: '',
subtitle:'内容及账号审核', color: '',
subMenu:[ url: '',
{label:'视频审核', imgUrl:'',url:'/checkVideo'}, children: [
{label:'展板审核', imgUrl:'',url:'/checkDisplay'}, { label: '账号管理', icon: 'icon-account', color: 'index-blue', url: '/unitAdmin' }
{label:'平台学习内容审核', imgUrl:'',url:'/checkLearn'},
{label:'账号禁用审核', imgUrl:''}
] ]
} }
] ]
}, },
{ {
title:'机顶盒管理', name: '机顶盒管理',
menu:[ icon: 'icon-headStb',
avatar: 'stb_head_picture.png',
color: '',
url: '',
children: [
{ {
subtitle:'机顶盒信息及运维管理', name: '机顶盒信息及运维管理',
subMenu:[ icon: '',
{label:'机顶盒信息管理', imgUrl:'',url:'/STBbase'}, avatar: '',
{label:'机顶盒运维信息管理', imgUrl:'',url:'/STBoperation'}, color: '',
{label:'机顶盒运维账号管理', imgUrl:''}, url: '',
{label:'app版本管理', imgUrl:'',url:'/appversion'}, children: [
{label:'app界面自定义', imgUrl:'',url:'/pagecustom'}, { 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:'系统管理', name: '统计数据',
menu:[ icon: 'icon-headStatistics',
avatar: 'statistics_head_picture.png',
color: '',
url: '',
menu: [
{ {
subtitle:'机构及信息管理', name: '统计图表',
subMenu:[ icon: '',
{label:'机构管理', imgUrl:'',url:'/organ'}, avatar: '',
{label:'日志管理', imgUrl:'',url:'/log'}, color: '',
{label:'修改密码', imgUrl:'',url:'/changePwd'}, 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:'系统账号管理', name: '统计账号',
subMenu:[ icon: '',
{label:'用户账号管理', imgUrl:'',url:'/users'}, avatar: '',
{label:'单位管理员账号管理', imgUrl:'',url:'/unitAdmin'}, 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 @@ ...@@ -44,6 +44,13 @@
<i class="icon-table icon-enable"></i> <i class="icon-table icon-enable"></i>
</el-button> </el-button>
</el-tooltip> </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>
<div v-else> <div v-else>
<span v-if="item.prop==='type'"> <span v-if="item.prop==='type'">
......
<template> <template>
<div class="party-table"> <div class="party-table">
<el-table border :data="list" style="width: 100%;height:100%" height="100%"> <el-table
<el-table-column border
label="序号" :data="list"
align="center" style="width: 100%; height: 100%"
width="100"> height="100%"
<template slot-scope="scope" > >
<span>{{ (currentPage-1) * 10 * scope.$index + 1}}</span> <el-table-column label="序号" align="center" width="100">
<template slot-scope="scope">
<span>{{ (currentPage - 1) * 10 * scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
v-for="(item,index) in feildList" v-for="(item, index) in feildList"
:key="index" :key="index"
:prop="item.prop" :prop="item.prop"
:label="item.label" :label="item.label"
:width="item.width"> :width="item.width"
<template slot-scope="scope" > >
<template slot-scope="scope">
<div v-if="item.isEdit" class="table-btn-group"> <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>
<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> </el-button>
</div> </div>
<div v-else> <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> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -35,39 +57,72 @@ ...@@ -35,39 +57,72 @@
</template> </template>
<script> <script>
export default { export default {
data(){ data() {
return { return {};
}
}, },
props:{ props: {
currentPage:{ currentPage: {
type:Number, type: Number,
default:1 default: 1,
}, },
list:{ list: {
type:Array, type: Array,
default:()=>{return []} default: () => {
return [];
}, },
feildList:{
type:Array,
default:()=>{return []}
}
}, },
methods:{ feildList: {
handleOperate(row,type){ type: Array,
this.$emit( default: () => {
"action", return [];
{ },
row:row, },
type:type },
} 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> </script>
<style lang="less"> <style lang="less">
@import '../../../style/table.less'; @import "../../../style/table.less";
</style> </style>
\ No newline at end of file
...@@ -44,13 +44,13 @@ export default { ...@@ -44,13 +44,13 @@ export default {
_size: 10, _size: 10,
total: 0, total: 0,
}, },
activeRow: {} activeRow: {},
}; };
}, },
components: { components: {
partyPagination, partyPagination,
dbUnitTable, dbUnitTable,
editDialog editDialog,
}, },
mounted() { mounted() {
this.getFirstPageList(); this.getFirstPageList();
...@@ -91,19 +91,28 @@ export default { ...@@ -91,19 +91,28 @@ export default {
console.log(err); console.log(err);
}); });
}, },
// 页面返回值为空
getResWithOutData() {
this.list = [];
this.page = {
_index: 1,
_size: 10,
total: 0,
};
},
// 编辑 // 编辑
handleEdit() { handleEdit() {
this.$refs.editDialog.id = this.activeRow.id; this.$refs.editDialog.id = this.activeRow.id;
this.$refs.editDialog.getDetailById(); this.$refs.editDialog.getDetailById();
this.$refs.editDialog.dialogVisible = true; this.$refs.editDialog.dialogVisible = true;
this.$refs.editDialog.isEdit = true this.$refs.editDialog.isEdit = true;
}, },
// 查看详情 // 查看详情
handleDetail() { handleDetail() {
this.$refs.editDialog.id = this.activeRow.id; this.$refs.editDialog.id = this.activeRow.id;
this.$refs.editDialog.getDetailById(); this.$refs.editDialog.getDetailById();
this.$refs.editDialog.dialogVisible = true; this.$refs.editDialog.dialogVisible = true;
this.$refs.editDialog.isEdit = false this.$refs.editDialog.isEdit = false;
}, },
handleAction(params) { handleAction(params) {
this.activeRow = params.row; this.activeRow = params.row;
...@@ -127,10 +136,9 @@ export default { ...@@ -127,10 +136,9 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.dbUnit-wrapper{ .dbUnit-wrapper {
.page-tips{ .page-tips {
white-space: nowrap; white-space: nowrap;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -35,7 +35,9 @@ ...@@ -35,7 +35,9 @@
</el-form> </el-form>
<div class="page-tip"> <div class="page-tip">
<span class="page-tip-title">页面说明:</span> <span class="page-tip-title">页面说明:</span>
<span class="page-tips">展示所有禁用账号的申请,审核通过后,该账号状态为禁用,无法在系统中使用</span> <span class="page-tips"
>展示所有禁用账号的申请,审核通过后,该账号状态为禁用,无法在系统中使用</span
>
</div> </div>
</div> </div>
<div class="table-content"> <div class="table-content">
...@@ -45,64 +47,163 @@ ...@@ -45,64 +47,163 @@
:list="list" :list="list"
@action="handleAction" @action="handleAction"
/> />
<party-pagination/> <party-pagination :page="page" @changePage="handleChangeCurrent" />
</div> </div>
<!-- <user-dialog/> --> <reject-dialog ref="rejectDialog" @success="getPageList()" />
</div> </div>
</template> </template>
<script> <script>
import { partyPagination } from '@/components/index' import { partyPagination } from "@/components/index";
import checkTable from './components/checkTable' import checkTable from "./components/checkTable";
import {addDialog, editDialog} from './userDialog/index' import { rejectDialog } from "./checkDialog/index";
export default { export default {
data(){ data() {
return{ return {
form:{ form: {
user:'', name: "",
status:'' status: "",
}, },
options:[ options: [
{label:'待初审',value:1}, { label: "待初审", value: "TBC" },
{label:'驳回',value:2}, { label: "驳回", value: "REFUSED" },
{label:'待复审',value:3}, { label: "待复审", value: "TBCA" },
{label:'通过',value:4} { label: "通过", value: "APPROVED_FINAL" }
], ],
feildList:[ feildList: [
{prop:'username',label:'账号名称'}, { prop: "content", label: "账号名称" },
{prop:'orgName',label:'所在机构'}, { prop: "orgName", label: "所在机构" },
{prop:'endTime',label:'提交人'}, { prop: "userName", label: "提交人" },
{prop:'endTime',label:'提交日期'}, { prop: "createTime", label: "提交日期" },
{prop:'endTime',label:'审核状态'}, { prop: "status", label: "审核状态" },
{prop:'',label:'操作',isEdit:true, width:240}, { prop: "", label: "操作", isEdit: true, width: 240 },
], ],
list: [] list: [],
} activeRow: {},
page: {
_index: 1,
_size: 10,
total: 0,
}, },
components:{ partyPagination, checkTable, addDialog, editDialog}, type:'ACCOUNT',
mounted(){ };
},
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(){ getPageList() {
this.form.user = '' 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,
}, },
// 弹窗关闭 requestParams
handleClose(){ )
this.$confirm('确认关闭?') .then((res) => {
.then(_ => { if (res.status != 200) {
done(); 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){ handleAction(params) {
console.log(params.type) 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> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>
\ No newline at end of file
...@@ -160,24 +160,23 @@ export default { ...@@ -160,24 +160,23 @@ export default {
requetsparams requetsparams
) )
.then((res) => { .then((res) => {
debugger this.handleReset();
if (res.status == 200) { if (res.status == 200) {
if (res.data.resultCode == 200) { if (res.data.resultCode == 200) {
this.$message({ this.$message({
type: "success", type: "success",
message: res.data.message, message: res.data.message,
}); });
this.handleReset();
this.$emit("success", true); this.$emit("success", true);
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message || res.data.msg);
} }
} else { } else {
this.$message.error(res.data); this.$message.error(res.data);
} }
}) })
.catch((err) => { .catch((err) => {
console.log(res); this.$message.error(err.message || err.msg);
}); });
} else { } else {
console.log("error submit!!"); console.log("error submit!!");
......
...@@ -193,6 +193,15 @@ export default { ...@@ -193,6 +193,15 @@ export default {
console.log(err); console.log(err);
}); });
}, },
// 页面返回值为空
getResWithOutData(){
this.list = []
this.page = {
_index:1,
_size:10,
total:0
}
},
// 新增账号 // 新增账号
handleAdd() { handleAdd() {
this.$refs.addDialog.dialogVisible = true; this.$refs.addDialog.dialogVisible = true;
......
...@@ -3,21 +3,24 @@ ...@@ -3,21 +3,24 @@
<div class="panel-box" v-for="(item,index) in menuList" :key="index"> <div class="panel-box" v-for="(item,index) in menuList" :key="index">
<div class="panel-box-title"> <div class="panel-box-title">
<span class="panel-box-title-wrapper"> <span class="panel-box-title-wrapper">
<i class="panel-box-title-icon"></i> <i :class="item.icon" class="panel-box-title-icon"></i>
<span>{{item.title}}</span> <span>{{item.name}}</span>
</span> </span>
<div class="panel-box-title-img"></div> <div class="panel-box-title-img">
<img :src="requireImg(item.avatar)" alt="">
</div>
</div> </div>
<div class="panel-box-content"> <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"> <div class="panel-box-sub-title">
<span class="line"></span> <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> </div>
<ul > <ul >
<li v-for="(menu,mIndex) in subItem.subMenu" :key="mIndex" @click="goPage(menu.url)"> <li v-for="(menu,mIndex) in subItem.children" :key="mIndex" @click="goPage(menu.url)" :class="menu.color">
<i class="icon-memu"></i>
<span class="menu-label">{{menu.label}}</span> <i :class="menu.icon" class="icon-memu"></i>
<span class="menu-label">{{menu.name}}</span>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -41,11 +44,15 @@ export default{ ...@@ -41,11 +44,15 @@ export default{
if(path){ if(path){
this.$router.push(path) this.$router.push(path)
} }
},
requireImg(imgSrc){
return require(`@/assets/menu/${imgSrc}`)
} }
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import '~@/style/menu.less';
@media screen and (max-width: 1440px) { @media screen and (max-width: 1440px) {
.index-container{ .index-container{
width: 100%; width: 100%;
...@@ -100,8 +107,6 @@ export default{ ...@@ -100,8 +107,6 @@ export default{
display: inline-block; display: inline-block;
width: 28px; width: 28px;
height: 28px; height: 28px;
border-radius: 50%;
background-color: @party-pink;
vertical-align: middle; vertical-align: middle;
margin-right: 18px; margin-right: 18px;
} }
...@@ -118,8 +123,12 @@ export default{ ...@@ -118,8 +123,12 @@ export default{
height: 10.4vw; height: 10.4vw;
max-width: 200px; max-width: 200px;
max-height: 200px; max-height: 200px;
background-color:@party-pink ;
margin-top: 20px; margin-top: 20px;
img{
width: 100%;
height: 100%;
object-fit: cover;
}
} }
.panel-box-content{ .panel-box-content{
padding-left: 20px; padding-left: 20px;
...@@ -160,7 +169,6 @@ export default{ ...@@ -160,7 +169,6 @@ export default{
max-width: 128px; max-width: 128px;
max-height: 160px; max-height: 160px;
text-align: center; text-align: center;
background: @party-bg-gray;
border-radius: 8px; border-radius: 8px;
color: @font-color; color: @font-color;
&:not(:first-child){ &:not(:first-child){
......
<template> <template>
<div class="change-pwd-wrapper height100"> <div class="change-pwd-wrapper height100">
<div class="page-form-box"> <div class="page-form-box">
<div class="page-form-box-header"> <div class="page-form-box-header">修改密码</div>
修改密码
</div>
<div class="page-form-box-content"> <div class="page-form-box-content">
<el-form ref="form" :model="form" label-width="80px" label-position="top" class="party-form"> <el-form
<el-form-item label="请输入当前密码" > ref="form"
<el-input v-model="form.name" placeholder="请填写"></el-input> :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>
<el-form-item label="请输入新密码" > <el-form-item label="请输入新密码" prop="password">
<el-input v-model="form.name" placeholder="请填写"></el-input> <el-input
v-model="form.password"
placeholder="请输入新密码"
type="password"
>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="请再次输入新密码" > <el-form-item label="请再次输入新密码" prop="checkPass">
<el-input v-model="form.name" placeholder="请填写"></el-input> <el-input
v-model="form.checkPass"
placeholder="请再次输入新密码"
type="password"
>
</el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="page-form-box-footer"> <div class="page-form-box-footer">
<div class="btn-group"> <div class="btn-group">
<el-button>取消</el-button> <el-button @click="handleCancel">取消</el-button>
<el-button type="primary">确定修改</el-button> <el-button type="primary" @click="handleSubmit">确定修改</el-button>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
data(){ data() {
return { var validatePass = (rule, value, callback) => {
form:{ if (value === "") {
name:'' 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> </script>
<style lang="less" scoped> <style lang="less" scoped>
.change-pwd-wrapper{ .change-pwd-wrapper {
.party-form{ .party-form {
width: 300px; width: 300px;
margin: 0 auto; margin: 0 auto;
} }
......
<template> <template>
<div>
<el-dialog <el-dialog
custom-class="party-dialog" custom-class="party-dialog"
title="新建机构" title="新建机构"
...@@ -15,16 +16,9 @@ ...@@ -15,16 +16,9 @@
label-position="top" label-position="top"
class="party-form" class="party-form"
> >
<el-form-item label="新增类别:" prop="level"> <el-form-item label="父级节点:">
<el-radio-group v-model="form.level"> <el-input v-model="form.parentName"></el-input>
<el-radio <el-button @click="handlefocus" round>修改</el-button>
v-for="(item, index) in levelOption"
:key="index"
:label="item.label"
>
{{ item.value }}
</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="机构名称:" prop="name"> <el-form-item label="机构名称:" prop="name">
<el-input <el-input
...@@ -58,9 +52,16 @@ ...@@ -58,9 +52,16 @@
> >
</div> </div>
</el-dialog> </el-dialog>
<org-trees
ref="orgTree"
:treeData="treeData"
@selected="handleSelectParent"
/>
</div>
</template> </template>
<script> <script>
import { getAreas } from "@/config/area"; import { getAreas } from "@/config/area";
import orgTrees from './orgTree'
export default { export default {
data() { data() {
return { return {
...@@ -68,21 +69,18 @@ export default { ...@@ -68,21 +69,18 @@ export default {
form: { form: {
name: "", name: "",
areaId: [], areaId: [],
level: "",
remarks: "", remarks: "",
parentId: "",
parentName: "",
}, },
disabled: false, disabled: false,
areaOptions: [], areaOptions: [],
cascaderProps: { cascaderProps: {
label: "name", label: "name",
value: "code", value: "code",
checkStrictly: true checkStrictly: true,
}, },
levelOption: [],
rules: { rules: {
level: [
{ required: true, message: "请选择用户类别", trigger: "change" },
],
name: [ name: [
{ required: true, message: "请输入机构名称", trigger: "change" }, { required: true, message: "请输入机构名称", trigger: "change" },
], ],
...@@ -92,40 +90,46 @@ export default { ...@@ -92,40 +90,46 @@ export default {
}, },
}; };
}, },
components: { orgTrees },
props: { props: {
level: { treeData: {
type: Number, type: Array,
default: 1, default: () => {
return [];
},
}, },
parentId:{
type: String,
default: '0',
}
}, },
mounted() { mounted() {
this.getLevelOption();
getAreas().then((res) => { getAreas().then((res) => {
this.areaOptions = res; this.areaOptions = res;
}); });
}, },
methods: { methods: {
handlefocus() {
this.$refs.orgTree.dialogVisible = true;
},
handleSelectParent(parentData) {
this.form.parentId = parentData.id;
this.form.parentName = parentData.name;
},
// 弹窗关闭 // 弹窗关闭
handleClose() { handleClose() {
this.$confirm("确认关闭?") this.$confirm("确认关闭?")
.then((_) => { .then((_) => {
this.handleReset() this.handleReset();
}) })
.catch((_) => {}); .catch((_) => {});
}, },
handleReset(){ handleReset() {
this.dialogVisible = false this.dialogVisible = false;
this.$refs.form.resetFields() this.$refs.form.resetFields();
this.form = { this.form = {
name: "", name: "",
areaId: [], areaId: [],
level: "",
remarks: "", remarks: "",
} parentId: "",
parentName: "",
};
}, },
handleCancle() { handleCancle() {
this.handleClose(); this.handleClose();
...@@ -138,8 +142,7 @@ export default { ...@@ -138,8 +142,7 @@ export default {
params.name = this.form.name; params.name = this.form.name;
params.areaId = [...this.form.areaId].pop(); params.areaId = [...this.form.areaId].pop();
params.remarks = this.form.remarks; params.remarks = this.form.remarks;
params.level = this.form.level; params.parentId = this.form.parentName ? this.form.parentId : "0";
params.parentId = this.parentId
let requestparams = this.$qs.stringify(params); let requestparams = this.$qs.stringify(params);
this.$https( this.$https(
{ {
...@@ -150,60 +153,31 @@ export default { ...@@ -150,60 +153,31 @@ export default {
requestparams requestparams
) )
.then((res) => { .then((res) => {
if(res.status == 200 ){ if (res.status == 200) {
if (res.data.resultCode == 200 ) { if (res.data.resultCode == 200) {
this.$message({ this.$message({
type: "success", type: "success",
message: res.data.message, message: res.data.message,
}); });
this.handleReset() this.handleReset();
this.$emit('success',true) this.$emit("success", true);
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
this.$emit('success',false) this.$emit("success", false);
} }
} else { } else {
this.$message.error(res.data); this.$message.error(res.data);
this.$emit('success',false) this.$emit("success", false);
} }
}) })
.catch((err) => { .catch((err) => {
console.log(res); console.log(err);
}); });
} else { } else {
console.log("error submit!!");
return false; 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> </script>
......
<template> <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> </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 lang="less" scoped>
</style> </style>
\ No newline at end of file
import orgAdd from './add' import orgAdd from './add'
import orgEdit from './edit' import orgEdit from './edit'
import orgTrees from './orgTree'
export{ export{
orgAdd, 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