Commit d463a86c authored by xulili's avatar xulili

Merge branch 'dev_xll' into 'master'

Dev xll

See merge request !13
parents 17090d1d 431420dd
<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: localStorage.getItem("user"),
userName:'admin,北京市政府' };
} },
mounted() {},
methods: {
logout() {
this.$confirm("确认退出吗?")
.then((_) => {
this.handleLogout();
})
.catch((_) => {});
}, },
mounted(){ 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);
});
}, },
methods:{ },
};
}
}
</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 {
float: right;
> * {
display: inline-block;
vertical-align: middle;
}
.avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background-color: pink;
}
.user-name {
font-size: 16px;
line-height: 16px;
color: @party-white;
}
.line {
width: 2px;
height: 18px;
background-color: @party-white;
margin: 0 15px;
} }
.top-bar-right{ .login-out {
float: right; width: 20px;
> *{ height: 20px;
display: inline-block; background: url("~@/assets/login/logout.png") no-repeat center/100% 100%;
vertical-align: middle; cursor: pointer;
}
.avatar{
width: 36px;
height: 36px;
border-radius: 50%;
background-color: pink;
}
.user-name{
font-size: 16px;
line-height: 16px;
color: @party-white;
}
.line{
width: 2px;
height: 18px;
background-color: @party-white;
margin: 0 15px;
}
.login-out{
width: 20px;
height: 20px;
background-color: pink;
}
} }
}
} }
</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');
} }
......
This diff is collapsed.
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> <template slot-scope="scope">
</el-table-column> <span>{{ (currentPage - 1) * 10 * scope.$index + 1 }}</span>
<el-table-column </template>
align="center" </el-table-column>
v-for="(item,index) in feildList" <el-table-column
:key="index" align="center"
:prop="item.prop" v-for="(item, index) in feildList"
:label="item.label" :key="index"
:width="item.width"> :prop="item.prop"
<template slot-scope="scope" > :label="item.label"
<div v-if="item.isEdit" class="table-btn-group"> :width="item.width"
<el-button round class="passed" @click="handleOperate(scope.row,'edit')"> >
通过 <template slot-scope="scope">
</el-button> <div v-if="item.isEdit" class="table-btn-group">
<el-button round class="rejected" @click="handleOperate(scope.row,'edit')"> <el-button
驳回 round
</el-button> class="passed"
</div> :disabled="
<div v-else> scope.row.status === 'REFUSED' ||
<span>{{scope.row[item.prop]}}</span> scope.row.status === 'APPROVED_FINAL'
</div> "
</template> @click="handleOperate(scope.row, 'pass')"
</el-table-column> >
通过
</el-button>
<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 v-if="item.prop === 'status'">
{{ scope.row[item.prop] | statusName }}
</span>
<span v-else>{{ scope.row[item.prop] }}</span>
</div>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data(){ data() {
return { return {};
},
} props: {
currentPage: {
type: Number,
default: 1,
}, },
props:{ list: {
currentPage:{ type: Array,
type:Number, default: () => {
default:1 return [];
}, },
list:{
type:Array,
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
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
data() { data() {
return { return {
form: { form: {
type: 2, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 type: 2, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
}, },
feildList: [ feildList: [
{ prop: "userName", label: "管理员姓名" }, { prop: "userName", label: "管理员姓名" },
...@@ -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
<template> <template>
<!-- 账号禁用审核 --> <!-- 账号禁用审核 -->
<div class="recheck-wrapper height100"> <div class="recheck-wrapper height100">
<div class="search-container"> <div class="search-container">
<el-form :inline="true" :model="form"> <el-form :inline="true" :model="form">
<el-form-item> <el-form-item>
<el-input <el-input
v-model="form.name" v-model="form.name"
placeholder="请输入账号名称、提交人" placeholder="请输入账号名称、提交人"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
clearable clearable
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select <el-select
v-model="form.status" v-model="form.status"
placeholder="请选择账号状态" placeholder="请选择账号状态"
clearable clearable
> >
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div class="btn-group"> <div class="btn-group">
<el-button type="primary" @click="handleSubmit">查询</el-button> <el-button type="primary" @click="handleSubmit">查询</el-button>
<el-button @click="handleReset">重置</el-button> <el-button @click="handleReset">重置</el-button>
</div> </div>
</el-form-item> </el-form-item>
</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"
</div> >展示所有禁用账号的申请,审核通过后,该账号状态为禁用,无法在系统中使用</span
>
</div> </div>
<div class="table-content"> </div>
<check-table <div class="table-content">
class="noAdd" <check-table
:feildList="feildList" class="noAdd"
:list="list" :feildList="feildList"
@action="handleAction" :list="list"
/> @action="handleAction"
<party-pagination/> />
</div> <party-pagination :page="page" @changePage="handleChangeCurrent" />
<!-- <user-dialog/> --> </div>
<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,
},
type:'ACCOUNT',
};
},
components: { partyPagination, checkTable, rejectDialog },
mounted() {
this.getFirstPageList();
},
methods: {
// 查询数据
handleSubmit() {
this.getPageList();
}, },
components:{ partyPagination, checkTable, addDialog, editDialog}, handleReset() {
mounted(){ this.form.name = "";
this.form.status = "";
this.getFirstPageList()
}, },
methods:{
handleSubmit(){
// 获取第一页数据列表
getFirstPageList() {
this.page._index = 1;
this.getPageList();
},
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,
}, },
handleReset(){ requestParams
this.form.user = '' )
}, .then((res) => {
// 弹窗关闭 if (res.status != 200) {
handleClose(){ this.getResWithOutData();
this.$confirm('确认关闭?') } else {
.then(_ => { if (res.data.resultCode == 200) {
done(); this.list = res.data.data.records;
}) this.page._size = res.data.data.size;
.catch(_ => {}); this.page.total = res.data.data.total;
} else {
this.getResWithOutData();
}
}
})
.catch((err) => {
console.log(err);
});
},
// 页面返回值为空
getResWithOutData() {
this.list = [];
this.page = {
_index: 1,
_size: 10,
total: 0,
};
},
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,
}, },
handleAction(params){ params
console.log(params.type) )
} .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 class="page-form-box-content">
</div> <el-form
<div class="page-form-box-content"> ref="form"
<el-form ref="form" :model="form" label-width="80px" label-position="top" class="party-form"> :rules="rules"
<el-form-item label="请输入当前密码" > :model="form"
<el-input v-model="form.name" placeholder="请填写"></el-input> label-width="80px"
</el-form-item> label-position="top"
<el-form-item label="请输入新密码" > class="party-form"
<el-input v-model="form.name" placeholder="请填写"></el-input> >
</el-form-item> <el-form-item label="请输入当前密码" prop="oldPassWord">
<el-form-item label="请再次输入新密码" > <el-input
<el-input v-model="form.name" placeholder="请填写"></el-input> v-model="form.oldPassWord"
</el-form-item> placeholder="请输入当前密码"
</el-form> type="password"
</div> ></el-input>
<div class="page-form-box-footer"> </el-form-item>
<div class="btn-group"> <el-form-item label="请输入新密码" prop="password">
<el-button>取消</el-button> <el-input
<el-button type="primary">确定修改</el-button> v-model="form.password"
</div> placeholder="请输入新密码"
type="password"
>
</el-input>
</el-form-item>
<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 @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSubmit">确定修改</el-button>
</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: "",
},
rules: {
oldPassWord: [
{ required: true, message: "请输入原密码", trigger: "blur" },
],
password: [
{ required: true, validator: validatePass, trigger: "blur" },
],
checkPass: [
{ required: true, validator: validatePass2, trigger: "blur" },
],
},
};
}, },
mounted(){ mounted() {},
methods: {
handleCancel() {
this.form = {
oldPassWord: "",
password: "",
checkPass: "",
};
},
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')
}
}, },
methods:{ };
}
}
</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;
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<el-dialog <div>
custom-class="party-dialog" <el-dialog
title="新建机构" custom-class="party-dialog"
:visible.sync="dialogVisible" title="新建机构"
width="468px" :visible.sync="dialogVisible"
:before-close="handleClose" width="468px"
> :before-close="handleClose"
<div class="dialog-content"> >
<el-form <div class="dialog-content">
ref="form" <el-form
:rules="rules" ref="form"
:model="form" :rules="rules"
label-width="80px" :model="form"
label-position="top" label-width="80px"
class="party-form" label-position="top"
> class="party-form"
<el-form-item label="新增类别:" prop="level"> >
<el-radio-group v-model="form.level"> <el-form-item label="父级节点:">
<el-radio <el-input v-model="form.parentName"></el-input>
v-for="(item, index) in levelOption" <el-button @click="handlefocus" round>修改</el-button>
:key="index" </el-form-item>
:label="item.label" <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"
> >
{{ item.value }} </el-cascader>
</el-radio> </el-form-item>
</el-radio-group> <el-form-item label="备注">
</el-form-item> <el-input
<el-form-item label="机构名称:" prop="name"> v-model="form.remarks"
<el-input type="textarea"
v-model="form.name" placeholder="请输入"
placeholder="请填写" ></el-input>
clearable </el-form-item>
></el-input> </el-form>
</el-form-item> </div>
<el-form-item label="机构地理位置:" prop="areaId"> <div slot="footer" class="dialog-footer btn-group">
<el-cascader <el-button @click="handleCancle()">取 消</el-button>
v-model="form.areaId" <el-button type="primary" @click="handleSubmit()" :disabled="disabled"
change-on-select >确 定</el-button
:props="cascaderProps" >
:options="areaOptions" </div>
> </el-dialog>
</el-cascader> <org-trees
</el-form-item> ref="orgTree"
<el-form-item label="备注"> :treeData="treeData"
<el-input @selected="handleSelectParent"
v-model="form.remarks" />
type="textarea" </div>
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>
</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