删除之前的框架代码

This commit is contained in:
bgy
2023-09-06 15:14:22 +08:00
parent f43e4b7fed
commit 9a779eaaaa
101 changed files with 0 additions and 21035 deletions
-30
View File
@@ -1,30 +0,0 @@
<template>
<div id="app">
<router-view/>
</div>
</template>
<script>
export default {
name: "App"
};
</script>
<style>
html,
body {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0px;
margin: 0px;
}
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
widows: 100%;
height: 100%;
}
</style>
-58
View File
@@ -1,58 +0,0 @@
import axios from 'axios';
// 登录请求方法
const loginreq = (method, url, params) => {
return axios({
method: method,
url: url,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
data: params,
traditional: true,
transformRequest: [
function(data) {
let ret = ''
for (let it in data) {
ret +=
encodeURIComponent(it) +
'=' +
encodeURIComponent(data[it]) +
'&'
}
return ret
}
]
}).then(res => res.data);
};
// 通用公用方法
const req = (method, url, params) => {
return axios({
method: method,
url: url,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
token: localStorage.getItem('logintoken')
},
data: params,
traditional: true,
transformRequest: [
function(data) {
let ret = ''
for (let it in data) {
ret +=
encodeURIComponent(it) +
'=' +
encodeURIComponent(data[it]) +
'&'
}
return ret
}
]
}).then(res => res.data);
};
export {
loginreq,
req
}
-32
View File
@@ -1,32 +0,0 @@
import axios from 'axios';
import { req } from './axiosFun';
/**
* 商品管理
**/
// 商品管理-获取商品管理列表
export const GoodsList = (params) => { return req("post", "/api/Goods/list", params) };
// 商品管理-保存商品管理
export const GoodsSave = (params) => { return req("post", "/api/Goods/save", params) };
// 商品管理-删除商品管理
export const GoodsDelete = (params) => { return axios.delete("/api/Goods/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
/**
* 机器信息管理
**/
// 机器信息管理-获取机器信息管理列表
export const MachineList = (params) => { return req("post", "/api/Machine/list", params) };
// 机器信息管理-保存机器信息管理
export const MachineSave = (params) => { return req("post", "/api/Machine/save", params) };
// 机器信息管理-删除机器信息管理
export const MachineDelete = (params) => { return axios.delete("/api/Machine/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
/**
* 货道信息管理
**/
// 货道信息管理-获取获取货道信息管理列表
export const MachineAisleList = (params) => { return req("post", "/api/MachineAisle/list", params) };
// 货道信息管理-删除货道信息管理
export const MachineAisleDelete = (params) => { return axios.delete("/api/MachineAisle/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
// 货道信息管理-保存货道信息管理
export const MachineAisleRsave = (params) => { return req("post", "/api/MachineAisle/save", params) };
-32
View File
@@ -1,32 +0,0 @@
import axios from 'axios';
import { req } from './axiosFun';
/**
* 支付配置信息
**/
// 支付配置信息-获取支付配置信息列表
export const MachineConfigList = (params) => { return req("post", "/api/MachineConfig/list", params) };
// 支付配置信息-保存支付配置信息
export const MachineConfigSave = (params) => { return req("post", "/api/MachineConfig/save", params) };
// 支付配置信息-删除支付配置信息
export const MachineConfigDelete = (params) => { return axios.delete("/api/MachineConfig/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
/**
* 支付配置
**/
// 支付配置-获取支付配置列表
export const ConfigList = (params) => { return req("post", "/api/Config/list", params) };
// 支付配置-保存支付配置
export const ConfigSave = (params) => { return req("post", "/api/Config/save", params) };
// 支付配置-删除支付配置
export const ConfigDelete = (params) => { return axios.delete("/api/Config/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
/**
* 订单管理-交易订单
**/
// 交易订单-获取交易订单列表
export const OrderList = (params) => { return req("post", "/api/Order/list", params) };
// 交易订单-s删除交易订单
export const OrderDelete = (params) => { return axios.delete("/api/Order/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
// 交易订单-交易订单退款
export const OrderRefund = (params) => { return req("post", "/api/Order/refund", params) };
-97
View File
@@ -1,97 +0,0 @@
import axios from 'axios';
import { loginreq, req } from './axiosFun';
// 登录接口
export const login = (params) => { return loginreq("post", "/api/login", params) };
// 获取用户菜单
export const menu = (params) => { return axios.get("/api/menu?&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
// 退出接口
export const loginout = () => { return axios.delete("/api/login?&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
/**
* 用户管理
**/
// 用户管理-获取用户列表
export const userList = (params) => { return req("post", "/api/User/list", params) };
// 用户管理-保存(添加编辑)
export const userSave = (params) => { return req("post", "/api/User/save", params) };
// 用户管理-删除用户
export const userDelete = (params) => { return axios.delete("/api/User/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
// 用户管理-重置密码
export const userPwd = (params) => { return req("post", "/api/User/pwd", params) };
// 用户管理-修改状态
export const userLock = (params) => { return axios.get("/api/User/lock?userId=" + params.userId + "&lock=" + params.lock + "&token=" + localStorage.getItem('logintoken')) };
// 用户管理-数据权限
export const UserDeptTree = (params) => { return axios.get("/api/UserDept/tree/" + params + "?token=" + localStorage.getItem('logintoken')) };
// 用户管理-数据权限保存
export const UserDeptSave = (params) => { return req("post", "/api/UserDept/save", params) };
// 用户管理-获取部门设置
export const UserDeptdeptTree = (params) => { return axios.get("/api/UserDept/deptTree/" + params + "?token=" + localStorage.getItem('logintoken')) };
// 用户管理-保存部门设置
export const UserChangeDept = (params) => { return req("post", "/api/User/change/dept", params) };
// 用户管理-用户下线
export const userExpireToken = (params) => { return req("get", "/api/User/expireToken/" + params, {}) };
// 用户管理-刷新缓存
export const userFlashCache = (params) => { return req("get", "/api/User/flashCache/" + params, {}) };
/**
* 菜单管理
**/
// 菜单管理-获取菜单Module/list
export const ModuleList = () => { return req("post", "/api/Module/list") };
// 菜单管理-根据菜单获取数据
export const ModuleGet = (params) => { return axios.get("/api/Module/get/" + params + "?token=" + localStorage.getItem('logintoken')) };
// 菜单管理-获取父级菜单Module/nodes
export const ModuleNodes = (params) => { return req("post", "/api/Module/nodes", params) };
// 菜单管理-修改菜单
export const ModuleSave = (params) => { return req("post", "/api/Module/save", params) };
// 菜单管理-删除菜单
export const ModuleDelete = (params) => { return axios.delete("/api/Module/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
/**
* 角色管理
**/
// 角色管理-获取角色列表
export const roleList = (params) => { return req("post", "/api/Role/list", params) };
// 角色管理-保存(添加编辑)
export const roleSave = (params) => { return req("post", "/api/Role/save", params) };
// 角色管理-删除角色
export const roleDelete = (params) => { return axios.delete("/api/Role/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
// 角色管理-菜单权限(获取)
export const RoleRightTree = (params) => { return axios.get("/api/RoleRight/tree/" + params + "?token=" + localStorage.getItem('logintoken')) };
// 角色管理-菜单权限(保存)
export const RoleRightSave = (params) => { return req("post", "/api/RoleRight/save", params) };
/**
* 公司管理
**/
// 公司管理-获取公司列表
export const deptList = (params) => { return req("post", "/api/Dept/list", params) };
// 公司管理-保存(添加编辑)
export const deptSave = (params) => { return req("post", "/api/Dept/save", params) };
// 公司管理-删除公司
export const deptDelete = (params) => { return axios.get("/api/Dept/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
/**
* 系统环境变量
**/
// 系统环境变量-获取系统环境变量列表
export const variableList = (params) => { return req("post", "/api/Variable/list", params) };
// 系统环境变量-保存(添加编辑)
export const variableSave = (params) => { return req("post", "/api/Variable/save", params) };
// 系统环境变量-删除系统环境变量
export const variableDelete = (params) => { return axios.delete("/api/Variable/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
/**
* 权限管理
**/
// 权限管理-获取权限列表
export const permissionList = (params) => { return req("post", "/api/Permission/list", params) };
// 权限管理-保存权限
export const ermissionSave = (params) => { return req("post", "/api/Permission/save", params) };
// 权限管理-删除权限
export const ermissionDelete = (params) => { return axios.delete("/api/Permission/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
// 权限管理-获取权限
export const roleDropDown = () => { return axios.get("/api/Role/dropDown/all?&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
// 权限管理-配置权限
export const RolePermission = (params) => { return req("post", "/api/RolePermission/save", params) };
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

-48
View File
@@ -1,48 +0,0 @@
/**
* 分页组件
*/
<template>
<el-pagination class="page-box" @size-change="handleSizeChange" @current-change="handleCurrentChange" background :current-page="childMsg.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="childMsg.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="childMsg.total">
</el-pagination>
</template>
<script>
export default {
name: 'Pagination',
props: ['childMsg'],
data() {
return {
pageparm: {
currentPage: this.childMsg.currentPage,
pageSize: this.childMsg.pageSize
}
}
},
created() {},
methods: {
handleSizeChange(val) {
/**
* 子传父
* 参数1 父元素方法
* 参数2 数据
*/
this.pageparm.pageSize = val
this.$emit('callFather', this.pageparm)
},
handleCurrentChange(val) {
/**
* 子传父
* 参数1 父元素方法
* 参数2 数据
*/
this.pageparm.currentPage = val
this.$emit('callFather', this.pageparm)
}
}
}
</script>
<style>
.page-box {
margin: 10px auto;
}
</style>
-26
View File
@@ -1,26 +0,0 @@
/**
* 404
*/
<template>
<div class="page-404">
<h1>404!</h1>
<h2>Sorry, page not found</h2>
</div>
</template>
<style scoped>
.page-404 {
text-align: center;
}
.page-404 h1 {
font-size: 98px;
font-weight: 700;
line-height: 150px;
text-shadow: rgba(61, 61, 61, 0.3) 1px 1px, rgba(61, 61, 61, 0.2) 2px 2px,
rgba(61, 61, 61, 0.3) 3px 3px;
}
.page-404 h2 {
line-height: 30px;
font-size: 30px;
}
</style>
-290
View File
@@ -1,290 +0,0 @@
/**
* 左边菜单
*/
<template>
<el-menu default-active="2" :collapse="collapsed" collapse-transition router :default-active="$route.path" unique-opened class="el-menu-vertical-demo" background-color="#334157" text-color="#fff" active-text-color="#ffd04b">
<div class="logobox">
<img class="logoimg" src="../assets/img/logo.png" alt="">
</div>
<el-submenu v-for="menu in allmenu" :key="menu.menuid" :index="menu.menuname">
<template slot="title">
<i class="iconfont" :class="menu.icon"></i>
<span>{{menu.menuname}}</span>
</template>
<el-menu-item-group>
<el-menu-item v-for="chmenu in menu.menus" :index="'/'+chmenu.url" :key="chmenu.menuid">
<i class="iconfont" :class="chmenu.icon"></i>
<span>{{chmenu.menuname}}</span>
</el-menu-item>
</el-menu-item-group>
</el-submenu>
</el-menu>
</template>
<script>
import { menu } from '../api/userMG'
export default {
name: 'leftnav',
data() {
return {
collapsed: false,
allmenu: []
}
},
// 创建完毕状态(里面是操作)
created() {
// 获取图形验证码
let res = {
success: true,
data: [
{
menuid: 1,
icon: 'li-icon-xiangmuguanli',
menuname: '立案申请',
hasThird: null,
url: null,
menus: [
{
menuid: 102,
icon: 'icon-cat-skuQuery',
menuname: '商品管理',
hasThird: 'N',
url: 'registerapplicate/Goods',
menus: null
},
{
menuid: 11,
icon: 'icon-cat-skuQuery',
menuname: '立案申请',
hasThird: 'N',
url: 'registerapplicate/filingApplication',
menus: null
},
{
menuid: 12,
icon: 'icon-cat-skuQuery',
menuname: '立案申请审核',
hasThird: 'N',
url: 'registerapplicate/filingReview',
menus: null
},
{
menuid: 13,
icon: 'icon-cat-skuQuery',
menuname: '缴费确认',
hasThird: 'N',
url: 'registerapplicate/payConfirmation',
menus: null
}
]
},
{
menuid: 2,
icon: 'li-icon-dingdanguanli',
menuname: '案件处理',
hasThird: null,
url: null,
menus: [
// {
// menuid: 201,
// icon: 'icon-order-manage',
// menuname: '交易订单',
// hasThird: 'N',
// url: 'pay/Order',
// menus: null
// },
{
menuid: 21,
icon: 'icon-order-manage',
menuname: '立案',
hasThird: 'N',
url: 'casehandling/register',
menus: null
},
{
menuid: 22,
icon: 'icon-order-manage',
menuname: '组庭',
hasThird: 'N',
url: 'casehandling/formationCourt',
menus: null
},
{
menuid: 23,
icon: 'icon-order-manage',
menuname: '组庭审核',
hasThird: 'N',
url: 'casehandling/courtReview',
menus: null
},
{
menuid: 24,
icon: 'icon-order-manage',
menuname: '开庭审理',
hasThird: 'N',
url: 'casehandling/trialinCourt',
menus: null
},
{
menuid: 25,
icon: 'icon-order-manage',
menuname: '仲裁审核',
hasThird: 'N',
url: 'casehandling/arbitrationRaeview',
menus: null
}
]
},
// {
// menuid: 71,
// icon: 'li-icon-xitongguanli',
// menuname: '系统管理',
// hasThird: null,
// url: null,
// menus: [
// {
// menuid: 72,
// icon: 'icon-cus-manage',
// menuname: '用户管理',
// hasThird: 'N',
// url: 'system/user',
// menus: null
// },
// {
// menuid: 174,
// icon: 'icon-cms-manage',
// menuname: '菜单管理',
// hasThird: 'N',
// url: 'system/Module',
// menus: null
// },
// {
// menuid: 73,
// icon: 'icon-news-manage',
// menuname: '角色管理',
// hasThird: 'N',
// url: 'system/Role',
// menus: null
// },
// {
// menuid: 74,
// icon: 'icon-cs-manage',
// menuname: '公司管理',
// hasThird: 'N',
// url: 'system/Dept',
// menus: null
// },
// {
// menuid: 75,
// icon: 'icon-promotion-manage',
// menuname: '系统环境变量',
// hasThird: 'N',
// url: 'system/Variable',
// menus: null
// },
// {
// menuid: 76,
// icon: 'icon-cms-manage',
// menuname: '权限管理',
// hasThird: 'N',
// url: 'system/Permission',
// menus: null
// }
// ]
// },
// {
// menuid: 128,
// icon: 'li-icon-shangchengxitongtubiaozitihuayuanwenjian91',
// menuname: '支付管理',
// hasThird: null,
// url: null,
// menus: [
// {
// menuid: 129,
// icon: 'icon-provider-manage',
// menuname: '支付配置信息',
// hasThird: 'N',
// url: 'machine/MachineConfig',
// menus: null
// },
// {
// menuid: 175,
// icon: 'icon-provider-manage',
// menuname: '支付配置',
// hasThird: 'N',
// url: 'pay/Config',
// menus: null
// }
// ]
// },
// {
// menuid: 150,
// icon: 'li-icon-shangchengxitongtubiaozitihuayuanwenjian91',
// menuname: '图表',
// hasThird: null,
// url: null,
// menus: [
// {
// menuid: 159,
// icon: 'icon-provider-manage',
// menuname: '数据可视化',
// hasThird: 'N',
// url: 'charts/statistics',
// menus: null
// }
// ]
// }
],
msg: 'success'
}
this.allmenu = res.data
// menu(localStorage.getItem('logintoken'))
// .then(res => {
// console.log(JSON.stringify(res))
// if (res.success) {
// this.allmenu = res.data
// } else {
// this.$message.error(res.msg)
// return false
// }
// })
// .catch(err => {
// this.$message.error('菜单加载失败,请稍后再试!')
// })
// 监听
this.$root.Bus.$on('toggle', value => {
this.collapsed = !value
})
}
}
</script>
<style>
.el-menu-vertical-demo:not(.el-menu--collapse) {
width: 240px;
min-height: 400px;
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
border: none;
text-align: left;
}
.el-menu-item-group__title {
padding: 0px;
}
.el-menu-bg {
background-color: #1f2d3d !important;
}
.el-menu {
border: none;
}
.logobox {
height: 40px;
line-height: 40px;
color: #9d9d9d;
font-size: 20px;
text-align: center;
padding: 20px 0px;
}
.logoimg {
height: 40px;
}
</style>
-113
View File
@@ -1,113 +0,0 @@
/**
* 头部菜单
*/
<template>
<el-menu class="el-menu-demo" mode="horizontal" background-color="#334157" text-color="#fff" active-text-color="#fff">
<el-button class="buttonimg">
<img class="showimg" :src="collapsed?imgsq:imgshow" @click="toggle(collapsed)">
</el-button>
<el-submenu index="2" class="submenu">
<!-- <template slot="title">{{user.userRealName}}</template> -->
<template slot="title">超级管理员</template>
<el-menu-item index="2-1">设置</el-menu-item>
<el-menu-item @click="content()" index="2-2">个人中心</el-menu-item>
<el-menu-item @click="exit()" index="2-3">退出</el-menu-item>
</el-submenu>
</el-menu>
</template>
<script>
import { loginout } from '../api/userMG'
export default {
name: 'navcon',
data() {
return {
collapsed: true,
imgshow: require('../assets/img/show.png'),
imgsq: require('../assets/img/sq.png'),
user: {}
}
},
// 创建完毕状态(里面是操作)
created() {
this.user = JSON.parse(localStorage.getItem('userdata'))
},
methods: {
// 退出登录
exit() {
this.$confirm('退出登录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
setTimeout(() => {
this.$store.commit('logout', 'false')
this.$router.push({ path: '/login' })
this.$message({
type: 'success',
message: '已退出登录!'
})
}, 1000)
// loginout()
// .then(res => {
// if (res.success) {
// //如果请求成功就让他2秒跳转路由
// setTimeout(() => {
// this.$store.commit('logout', 'false')
// this.$router.push({ path: '/login' })
// this.$message({
// type: 'success',
// message: '已退出登录!'
// })
// }, 1000)
// } else {
// this.$message.error(res.msg)
// this.logining = false
// return false
// }
// })
// .catch(err => {
// // 获取图形验证码
// this.getcode()
// this.logining = false
// this.$message.error('退出失败,请稍后再试!')
// })
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
},
// 切换显示
toggle(showtype) {
this.collapsed = !showtype
this.$root.Bus.$emit('toggle', this.collapsed)
}
}
}
</script>
<style scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {
border: none;
}
.submenu {
float: right;
}
.buttonimg {
height: 60px;
background-color: transparent;
border: none;
}
.showimg {
width: 26px;
height: 26px;
position: absolute;
top: 17px;
left: 17px;
}
.showimg:active {
border: none;
}
</style>
-58
View File
@@ -1,58 +0,0 @@
/**
* 模版
**/
<template>
<div>
</div>
</template>
<script>
// 导入组件
import headerComponent from "./head.vue";
// 导出模块
export default {
// 模块名字
name: "template",
// 模块数据
data() {
//数据
return {};
},
// 注册组件
components: {
headerComponent
},
// 监听指定值,只有指定值变化,才会触发
watch: {},
// 里面的函数只有调用才会执行(实时计算)里面是定义的方法
methods: {
addFun() {},
submitFun() {}
},
// 创建前状态(里面是操作)
beforeCreate() {},
// 创建完毕状态(里面是操作)
created() {},
// 挂载前状态(里面是操作)
beforeMount() {},
// 挂载结束状态(里面是操作)
mounted() {},
// 更新前状态(里面是操作)
beforeUpdate() {},
// 更新完成状态(里面是操作)
updated() {},
// 销毁前状态(里面是操作)
beforeDestroy() {},
// 销毁完成状态(里面是操作)
destroyed() {}
};
</script>
// scoped 样式只在本组件使用
<style scoped>
/**
* 导入css样式组件
* @import "../assets/css/components/index.css";
*/
</style>
-82
View File
@@ -1,82 +0,0 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
// 引入element UI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App';
// 引入路由
import router from './router';
// 引入状态管理
import store from './vuex/store';
// 引入icon
import './assets/icon/iconfont.css'
//
// 引入echarts
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
import axios from 'axios';
Vue.prototype.$axios = axios;
Vue.config.productionTip = false;
// 使用element UI
Vue.use(ElementUI);
// 过滤器
import * as custom from './utils/util'
Object.keys(custom).forEach(key => {
Vue.filter(key, custom[key])
})
// 路由拦截器
router.beforeEach((to, from, next) => {
if (to.matched.length != 0) {
if (to.meta.requireAuth) { // 判断该路由是否需要登录权限
if (Boolean(localStorage.getItem("userInfo"))) { // 通过vuex state获取当前的user是否存在
next();
} else {
next({
path: '/login',
query: { redirect: to.fullPath } // 将跳转的路由path作为参数,登录成功后跳转到该路由
})
}
} else {
if (Boolean(localStorage.getItem("userInfo"))) { // 判断是否登录
if (to.path != "/" && to.path != "/login") { //判断是否要跳到登录界面
next();
} else {
/**
* 防刷新,如果登录,修改路由跳转到登录页面,修改路由为登录后的首页
*/
next({
path: '/registerapplicate/Goods'
})
}
} else {
next();
}
}
} else {
next({
path: '/login',
query: { redirect: to.fullPath } // 将跳转的路由path作为参数,登录成功后跳转到该路由
})
}
})
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store, //使用store vuex状态管理
components: { App },
template: '<App/>',
data: {
// 空的实例放到根组件下,所有的子组件都能调用
Bus: new Vue()
}
})
-266
View File
@@ -1,266 +0,0 @@
// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
* 立案申请
*/
// 商品管理
import Goods from '@/views/registerapplicate/Goods';
// 立案申请 Filing application
import filingApplication from '@/views/registerapplicate/filingApplication';
// 立案申请审核 Filing application review
import filingReview from '@/views/registerapplicate/filingReview';
// 缴费确认 payConfirmation
import payConfirmation from '@/views/registerapplicate/payConfirmation';
/**
* 案件处理
*/
// 立案 casehandling/register
import register from '@/views/casehandling/register';
// 组庭
import formationCourt from '@/views/casehandling/formationCourt';
// 组庭审核
import courtReview from '@/views/casehandling/courtReview';
// 开庭审理
import trialinCourt from '@/views/casehandling/trialinCourt';
// 仲裁审核
import arbitrationRaeview from '@/views/casehandling/arbitrationRaeview';
// 机器信息管理
import Machine from '@/views/machine/Machine';
// 货道信息管理
import MachineAisle from '@/views/machine/MachineAisle';
/**
* 订单管理
*/
// 交易订单
import Order from '@/views/pay/Order';
/**
* 系统管理
*/
// 用户管理
import user from '@/views/system/user';
// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';
// 系统环境变量
import Variable from '@/views/system/Variable';
// 权限管理
import Permission from '@/views/system/Permission';
/**
* 支付管理
*/
// 支付配置信息
import MachineConfig from '@/views/machine/MachineConfig';
// 支付配置
import Config from '@/views/pay/Config';
/**
* 数据监控
*/
// 监控查询
import druidLogin from '@/views/druid/login';
// 图表界面
import statistics from '@/views/charts/statistics';
// 启用路由
Vue.use(Router);
// 导出路由
export default new Router({
routes: [{
path: '/',
name: '',
component: login,
hidden: true,
meta: {
requireAuth: false
}
}, {
path: '/login',
name: '登录',
component: login,
hidden: true,
meta: {
requireAuth: false
}
}, {
path: '/index',
name: '首页',
component: index,
iconCls: 'el-icon-tickets',
children: [{
path: '/registerapplicate/Goods',
name: '商品管理',
component: Goods,
meta: {
requireAuth: true
}
},{
path: '/registerapplicate/filingApplication',
name: '立案申请',
component: filingApplication,
meta: {
requireAuth: true
}
}, {
path: '/registerapplicate/filingReview',
name: '立案申请审核',
component: filingReview,
meta: {
requireAuth: true
}
},{
path: '/registerapplicate/payConfirmation',
name: '缴费确认',
component: payConfirmation,
meta: {
requireAuth: true
}
},{
path: '/casehandling/register',
name: '立案',
component: register,
meta: {
requireAuth: true
}
},{
path: '/casehandling/formationCourt',
name: '组庭',
component: formationCourt,
meta: {
requireAuth: true
}
},{
path: '/casehandling/courtReview',
name: '组庭审核',
component: courtReview,
meta: {
requireAuth: true
}
},{
path: '/casehandling/trialinCourt',
name: '开庭审理',
component: trialinCourt,
meta: {
requireAuth: true
}
},{
path: '/casehandling/arbitrationRaeview',
name: '仲裁审核',
component: arbitrationRaeview,
meta: {
requireAuth: true
}
},
{
path: '/machine/Machine',
name: '机器信息管理',
component: Machine,
meta: {
requireAuth: true
}
}, {
path: '/machine/MachineAisle',
name: '货道信息管理',
component: MachineAisle,
meta: {
requireAuth: true
}
}, {
path: '/pay/Order',
name: '交易订单',
component: Order,
meta: {
requireAuth: true
}
}, {
path: '/system/user',
name: '用户管理',
component: user,
meta: {
requireAuth: true
}
}, {
path: '/system/Module',
name: '菜单管理',
component: Module,
meta: {
requireAuth: true
}
}, {
path: '/system/Role',
name: '角色管理',
component: Role,
meta: {
requireAuth: true
}
}, {
path: '/system/Dept',
name: '公司管理',
component: Dept,
meta: {
requireAuth: true
}
}, {
path: '/system/Variable',
name: '系统环境变量',
component: Variable,
meta: {
requireAuth: true
}
}, {
path: '/system/Permission',
name: '权限管理',
component: Permission,
meta: {
requireAuth: true
}
}, {
path: '/machine/MachineConfig',
name: '支付配置信息',
component: MachineConfig,
meta: {
requireAuth: true
}
}, {
path: '/pay/Config',
name: '支付配置',
component: Config,
meta: {
requireAuth: true
}
}, {
path: '/druid/login',
name: '监控查询',
component: druidLogin,
meta: {
requireAuth: true
}
}, {
path: '/charts/statistics',
name: '数据可视化',
component: statistics,
meta: {
requireAuth: true
}
}]
}]
})
-90
View File
@@ -1,90 +0,0 @@
/**
* 时间戳
* @param {*} timestamp 时间戳
*/
const timestampToTime = (timestamp) => {
let date = new Date(timestamp) //时间戳为10位需*1000,时间戳为13位的话不需乘1000
let Y = date.getFullYear() + '-'
let M =
(date.getMonth() + 1 < 10 ?
'0' + (date.getMonth() + 1) :
date.getMonth() + 1) + '-'
let D =
(date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
let h =
(date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
let m =
(date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) +
':'
let s =
date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return Y + M + D + h + m + s
};
/**
* 存储localStorage
*/
const setStore = (name, content) => {
if (!name) return;
if (typeof content !== 'string') {
content = JSON.stringify(content);
}
window.localStorage.setItem(name, content);
}
/**
* 获取localStorage
*/
const getStore = name => {
if (!name) return;
return window.localStorage.getItem(name);
}
/**
* 删除localStorage
*/
const removeStore = name => {
if (!name) return;
window.localStorage.removeItem(name);
}
/**
* 设置cookie
**/
function setCookie(name, value, day) {
let date = new Date();
date.setDate(date.getDate() + day);
document.cookie = name + '=' + value + ';expires=' + date;
};
/**
* 获取cookie
**/
function getCookie(name) {
let reg = RegExp(name + '=([^;]+)');
let arr = document.cookie.match(reg);
if (arr) {
return arr[1];
} else {
return '';
}
};
/**
* 删除cookie
**/
function delCookie(name) {
setCookie(name, null, -1);
};
/**
* 导出
**/
export {
timestampToTime,
setStore,
getStore,
removeStore,
setCookie,
getCookie,
delCookie
}
@@ -1,15 +0,0 @@
<template>
<div>
arbitrationRaeview 仲裁审核
</div>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
-15
View File
@@ -1,15 +0,0 @@
<template>
<div>
courtReview 组庭审核
</div>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
-15
View File
@@ -1,15 +0,0 @@
<template>
<div>
formationCourt 组庭
</div>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
-15
View File
@@ -1,15 +0,0 @@
<template>
<div>
register 立案
</div>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
-15
View File
@@ -1,15 +0,0 @@
<template>
<div>
trialinCourt 开庭审理
</div>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
-565
View File
@@ -1,565 +0,0 @@
/**
* 图表界面
*/
<template>
<!-- 组件主盒子 -->
<div class="stbox">
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>数据可视化</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索,切换 -->
<el-row :gutter="23">
<el-col :span="18">
<div class="stbgc">
<el-row :gutter="23">
<el-col :span="7">
<el-input size="small" v-model="machineNo" placeholder="请输入所属公司"></el-input>
</el-col>
<el-col :span="7">
<el-input size="small" v-model="machineNo" placeholder="请输入资产编号"></el-input>
</el-col>
<el-col :span="7">
<el-input size="small" v-model="machineNo" placeholder="请输入"></el-input>
</el-col>
<el-col :span="3" class="stsearch">
<el-button size="small" type="primary">搜索</el-button>
</el-col>
</el-row>
</div>
</el-col>
<el-col :span="6">
<div class="stbgc">
<el-row>
<el-col :span="8" class="text-c">
<el-radio v-model="type" label="day">日</el-radio>
</el-col>
<el-col :span="8" class="text-c">
<el-radio v-model="type" label="month">月</el-radio>
</el-col>
<el-col :span="8" class="text-c">
<el-radio v-model="type" label="years">年</el-radio>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<!-- 统计图 -->
<el-row :gutter="23">
<el-col :span="8" class="text-c">
<div class="st-gbox">
<div class="cavasbox" ref="SCEchart"></div>
</div>
</el-col>
<el-col :span="8" class="text-c">
<div class="st-gbox">
<div class="cavasbox" ref="SUMEchart"></div>
</div>
</el-col>
<el-col :span="8" class="text-c">
<div class="st-gbox">
<div class="cavasbox" ref="ClickEchart"></div>
</div>
</el-col>
</el-row>
<!-- 统计图 -->
<div>
<el-row :gutter="23">
<el-col :span="12" class="text-c">
<div class="paybox">
<div class="cavasbox" ref="payEchart"></div>
</div>
</el-col>
<el-col :span="12" class="text-c">
<div class="paybox">
<div class="cavasbox" ref="payNumEchart"></div>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import Chart from 'echarts'
export default {
name: "welcome",
data() {
return {
machineNo: '',
type: 'day',
// 销售总笔数
SCEoption: {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}月 : {c}"
},
legend: {
data: [{
name: '销售总笔数',
icon: 'rect'
}],
top: 1,
left: 1,
itemGap: 10,
itemWidth: 12,
itemHeight: 12,
textStyle: {
fontSize: 12,
color: "#323232"
}
},
grid: {
left: 50,
right: 10,
top: 30,
bottom: 30,
borderWidth: 1
},
xAxis: {
type: 'category',
data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
axisLine: {
lineStyle: {
color: "#999999",
width: 1
}
},
axisLabel: {
margin: 14,
height: 70,
interval: 0,
textStyle: {
fontSize: 10,
color: "#999999"
}
}
},
yAxis: {
type: 'value',
axisLine: {
lineStyle: {
color: "#999999",
width: 1
}
},
axisLabel: {
margin: 14,
textStyle: {
fontSize: 10,
color: "#999999"
}
}
},
series: [{
name: '销售总笔数',
type: 'bar',
barGap: 0,
data: [50000, 70000, 80000, 40000, 50000, 30000, 40000, 60000, 50000, 40000, 60000, 40000],
barWidth: 10,
itemStyle: {
normal: {
color: new Chart.graphic.LinearGradient(
0, 0, 0, 1,
[
{ offset: 0, color: '#83bff6' },
{ offset: 0.5, color: '#188df0' },
{ offset: 1, color: '#188df0' }
]
)
},
emphasis: {
color: new Chart.graphic.LinearGradient(
0, 0, 0, 1,
[
{ offset: 0, color: '#2378f7' },
{ offset: 0.7, color: '#2378f7' },
{ offset: 1, color: '#83bff6' }
]
)
}
}
}]
},
// 销售总金额
SUMoption: {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}月 : {c}"
},
legend: {
data: [{
name: '销售总金额',
icon: 'rect'
}],
top: 1,
left: 1,
itemGap: 10,
itemWidth: 12,
itemHeight: 12,
textStyle: {
fontSize: 12,
color: "#323232"
}
},
grid: {
left: 50,
right: 10,
top: 30,
bottom: 30,
borderWidth: 1
},
xAxis: {
type: 'category',
data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
axisLine: {
lineStyle: {
color: "#999999",
width: 1
}
},
axisLabel: {
margin: 14,
height: 70,
interval: 0,
textStyle: {
fontSize: 10,
color: "#999999"
}
}
},
yAxis: {
type: 'value',
axisLine: {
lineStyle: {
color: "#999999",
width: 1
}
},
axisLabel: {
margin: 14,
textStyle: {
fontSize: 10,
color: "#999999"
}
}
},
series: [{
name: '销售总金额',
// type: 'bar',
type: 'line',
barGap: 0,
data: [50000, 70000, 80000, 40000, 50000, 30000, 40000, 60000, 50000, 40000, 60000, 40000],
barWidth: 10,
itemStyle: {
color: "#108ff9"
}
}]
},
// 总点击量
Clickoption: {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}月 : {c}"
},
legend: {
data: [{
name: '总点击量',
icon: 'rect'
}],
top: 1,
left: 1,
itemGap: 10,
itemWidth: 12,
itemHeight: 12,
textStyle: {
fontSize: 12,
color: "#323232"
}
},
grid: {
left: 50,
right: 10,
top: 30,
bottom: 30,
borderWidth: 1
},
xAxis: {
type: 'category',
data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
axisLine: {
lineStyle: {
color: "#999999",
width: 1
}
},
axisLabel: {
margin: 14,
height: 70,
interval: 0,
textStyle: {
fontSize: 10,
color: "#999999"
}
}
},
yAxis: {
type: 'value',
axisLine: {
lineStyle: {
color: "#999999",
width: 1
}
},
axisLabel: {
margin: 14,
textStyle: {
fontSize: 10,
color: "#999999"
}
}
},
series: [{
name: '总点击量',
type: 'bar',
barGap: 0,
data: [50000, 10000, 80000, 30000, 50000, 60000, 40000, 80000, 50000, 20000, 60000, 40000],
barWidth: 10,
itemStyle: {
color: "#48cefd"
}
}]
},
// 支付方式统计
payoption: {
backgroundColor: '#2c343c',
title: {
text: '支付方式统计(金额)',
left: 10,
top: 5,
textStyle: {
fontSize: 12,
color: '#ccc'
}
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
visualMap: {
show: false,
min: 80,
max: 600,
inRange: {
colorLightness: [0, 1]
}
},
series: [
{
name: '支付方式统计(金额)',
type: 'pie',
radius: '55%',
center: ['50%', '50%'],
data: [
{ value: 335, name: '支付宝' },
{ value: 310, name: '银商二维码' },
{ value: 274, name: '会员' },
{ value: 235, name: '微信支付' },
{ value: 100, name: 'Pos通' }
].sort(function (a, b) { return a.value - b.value; }),
roseType: 'radius',
label: {
normal: {
textStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
}
},
labelLine: {
normal: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
},
smooth: 0.2,
length: 10,
length2: 20
}
},
itemStyle: {
normal: {
color: '#c23531',
shadowBlur: 200,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
animationType: 'scale',
animationEasing: 'elasticOut',
animationDelay: function (idx) {
return Math.random() * 200;
}
}
]
},
payNumoption: {
backgroundColor: '#2c343c',
title: {
text: '支付方式统计(笔数)',
left: 10,
top: 5,
textStyle: {
fontSize: 12,
color: '#ccc'
}
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
visualMap: {
show: false,
min: 80,
max: 600,
inRange: {
colorLightness: [0, 1]
}
},
series: [
{
name: '支付方式统计(笔数)',
type: 'pie',
radius: '55%',
center: ['50%', '50%'],
data: [
{ value: 335, name: '支付宝' },
{ value: 310, name: '银商二维码' },
{ value: 274, name: '会员' },
{ value: 235, name: '微信支付' },
{ value: 100, name: 'Pos通' }
].sort(function (a, b) { return a.value - b.value; }),
roseType: 'radius',
label: {
normal: {
textStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
}
},
labelLine: {
normal: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
},
smooth: 0.2,
length: 10,
length2: 20
}
},
itemStyle: {
normal: {
color: '#c23531',
shadowBlur: 200,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
animationType: 'scale',
animationEasing: 'elasticOut',
animationDelay: function (idx) {
return Math.random() * 200;
}
}
]
},
}
},
// 导入组件
components: {
// 点聚合组件
},
// 创建完毕状态(里面是操作)
created() { },
// 挂载结束状态(里面是操作)
mounted() {
this.getSCE()
this.getSUM()
this.getClick()
this.getpay()
this.getpayNum()
},
// 里面的函数只有调用才会执行
methods: {
// 交易总笔数
getSCE() {
this.chart = Chart.init(this.$refs.SCEchart)
this.chart.setOption(this.SCEoption)
},
// 交易总金额
getSUM() {
this.chart = Chart.init(this.$refs.SUMEchart)
this.chart.setOption(this.SUMoption)
},
// 总点击量
getClick() {
this.chart = Chart.init(this.$refs.ClickEchart)
this.chart.setOption(this.Clickoption)
},
// 支付方式统计
getpay() {
this.chart = Chart.init(this.$refs.payEchart)
this.chart.setOption(this.payoption)
},
// 支付方式统计
getpayNum() {
this.chart = Chart.init(this.$refs.payNumEchart)
this.chart.setOption(this.payNumoption)
}
}
};
</script>
<style>
.stbox {
width: 100%;
height: 100%;
box-sizing: border-box;
}
.stbgc {
background-color: #fff;
height: 60px;
line-height: 60px;
border-radius: 5px;
padding: 0px 16px;
}
.stsearch {
text-align: center;
}
.text-c {
text-align: center;
}
.st-gbox {
background-color: #fff;
margin-top: 20px;
border-radius: 5px;
height: 30vh;
box-sizing: border-box;
padding: 10px;
}
.cavasbox {
box-sizing: border-box;
width: 100%;
height: 100%;
}
.paybox {
width: 100%;
background-color: #fff;
box-sizing: border-box;
border-radius: 5px;
margin-top: 20px;
height: 32vh;
}
</style>
-18
View File
@@ -1,18 +0,0 @@
/**
* 数据监控 监控查询
*/
<template>
<div>数据监控 监控查询</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
@@ -1,313 +0,0 @@
/**
* 基础菜单 商品管理
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>立案申请</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-input size="small" v-model="formInline.deptName" placeholder="输入部门名称"></el-input>
</el-form-item>
<el-form-item label="">
<el-input size="small" v-model="formInline.deptNo" placeholder="输入部门代码"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="handleEdit()">立案申请</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" :data="listData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="selection" width="60">
</el-table-column>
<el-table-column align="center" sortable prop="caseNo" label="案件编号" width="200">
</el-table-column>
<el-table-column align="center" prop="applicant" label="申请人" width="100"></el-table-column>
<el-table-column align="center" prop="subjectmatter" label="案件标的" width="200"></el-table-column>
<el-table-column align="center" sortable prop="filingdate" label="立案日期" width="200"></el-table-column>
<el-table-column align="center" prop="arbitratemethod" label="仲裁方式" width="90">
</el-table-column>
<el-table-column align="center" prop="caseStatus" label="案件状态" width="90">
</el-table-column>
<el-table-column align="center" label="操作" min-width="300">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="deleteUser(scope.$index, scope.row)">详情</el-button>
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">修改</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog :title="title" :visible.sync="editFormVisible" width="30%" @click="closeDialog">
<el-form label-width="120px" :model="editForm" :rules="rules" ref="editForm">
<el-form-item label="部门名称" prop="deptName">
<el-input size="small" v-model="editForm.deptName" auto-complete="off" placeholder="请输入部门名称"></el-input>
</el-form-item>
<el-form-item label="部门代码" prop="deptNo">
<el-input size="small" v-model="editForm.deptNo" auto-complete="off" placeholder="请输入部门代码"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="closeDialog">取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="submitForm('editForm')">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { deptList, deptSave, deptDelete } from '../../api/userMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
nshow: true, //switch开启
fshow: false, //switch关闭
loading: false, //是显示加载
editFormVisible: false, //控制编辑页面显示与隐藏
title: '添加',
editForm: {
deptId: '',
deptName: '',
deptNo: '',
token: localStorage.getItem('logintoken')
},
// rules表单验证
rules: {
deptName: [
{ required: true, message: '请输入部门名称', trigger: 'blur' }
],
deptNo: [{ required: true, message: '请输入部门代码', trigger: 'blur' }]
},
formInline: {
page: 1,
limit: 10,
varLable: '',
varName: '',
token: localStorage.getItem('logintoken')
},
// 删除部门
seletedata: {
ids: '',
token: localStorage.getItem('logintoken')
},
userparm: [], //搜索权限
listData: [], //用户数据
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取公司列表
getdata(parameter) {
this.loading = true
// 模拟数据开始
let res = {
code: 0,
msg: null,
count: 5,
data: [
// 案件编号 申请人 案件标的 立案日期 仲裁方式 案件状态
{
caseNo: 1,
applicant: '张三',
subjectmatter: 1521,
filingdate: '2023-09-01',
arbitratemethod: '线下',
caseStatus: '待开庭',
},
{
caseNo: 2,
applicant: '李四',
subjectmatter: 19421,
filingdate: '2023-02-11',
arbitratemethod: '线上',
caseStatus: '已结案',
},
{
caseNo: 3,
applicant: '王五',
subjectmatter: 521,
filingdate: '2023-01-25',
arbitratemethod: '线下',
caseStatus: '已结案',
},
{
caseNo: 4,
applicant: '喊超薄',
subjectmatter: 666,
filingdate: '2023-01-25',
arbitratemethod: '线下',
caseStatus: '未立案',
},
]
}
this.loading = false
this.listData = res.data
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// deptList(parameter)
// .then(res => {
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.listData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
// .catch(err => {
// this.loading = false
// this.$message.error('菜单加载失败,请稍后再试!')
// })
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
// 搜索事件
search() {
this.getdata(this.formInline)
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
if (row != undefined && row != 'undefined') {
this.title = '修改'
this.editForm.deptId = row.deptId
this.editForm.deptName = row.deptName
this.editForm.deptNo = row.deptNo
} else {
this.title = '添加'
this.editForm.deptId = ''
this.editForm.deptName = ''
this.editForm.deptNo = ''
}
},
// 编辑、增加页面保存方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
deptSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '公司保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('公司保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除公司
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deptDelete(row.deptId)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '公司已删除!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('公司删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 关闭编辑、增加弹出框
closeDialog() {
this.editFormVisible = false
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
-97
View File
@@ -1,97 +0,0 @@
<template>
<!-- <el-container class="index-con">
<el-header class="index-header">
<navcon></navcon>
</el-header>
<el-container class="index-con">
<el-aside :class="showclass">
<leftnav></leftnav>
</el-aside>
<el-container class="main-con">
<el-main clss="index-main">
<router-view></router-view>
</el-main>
</el-container>
</el-container>
</el-container> -->
<el-container class="index-con">
<el-aside :class="showclass">
<leftnav></leftnav>
</el-aside>
<el-container class="main-con">
<el-header class="index-header">
<navcon></navcon>
</el-header>
<el-main clss="index-main">
<router-view></router-view>
</el-main>
</el-container>
</el-container>
</template>
<script>
// 导入组件
import navcon from '../components/navcon.vue'
import leftnav from '../components/leftnav.vue'
export default {
name: 'index',
data() {
return {
showclass: 'asideshow',
showtype: false
}
},
// 注册组件
components: {
navcon,
leftnav
},
methods: {},
created() {
// 监听
this.$root.Bus.$on('toggle', value => {
if (value) {
this.showclass = 'asideshow'
} else {
setTimeout(() => {
this.showclass = 'aside'
}, 300)
}
})
},
beforeUpdate() {},
// 挂载前状态(里面是操作)
beforeMount() {
// 弹出登录成功
this.$message({
message: '登录成功',
type: 'success'
})
}
}
</script>
<style >
.index-con {
height: 100%;
width: 100%;
box-sizing: border-box;
}
.aside {
width: 64px !important;
height: 100%;
background-color: #334157;
margin: 0px;
}
.asideshow {
width: 240px !important;
height: 100%;
background-color: #334157;
margin: 0px;
}
.index-header,
.index-main {
padding: 0px;
border-left: 2px solid #333;
}
</style>
-149
View File
File diff suppressed because one or more lines are too long
-18
View File
@@ -1,18 +0,0 @@
/**
* 基础菜单 机器信息管理
*/
<template>
<div>基础菜单 机器信息管理</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
-18
View File
@@ -1,18 +0,0 @@
/**
* 基础菜单 货道信息管理
*/
<template>
<div>基础菜单 货道信息管理</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
-401
View File
@@ -1,401 +0,0 @@
/**
* 支付管理 支付配置信息
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>支付配置信息</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-input size="small" v-model="formInline.machineNo" placeholder="输入终端号"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="handleEdit()">添加</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" :data="listData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="selection" width="60">
</el-table-column>
<el-table-column sortable prop="machineNo" label="终端号" width="200">
</el-table-column>
<el-table-column sortable prop="payType" label="支付方式" width="200">
</el-table-column>
<el-table-column sortable prop="configName" label="显示名称" width="200">
</el-table-column>
<el-table-column sortable prop="payOpen" label="状态" width="200">
</el-table-column>
<el-table-column sortable prop="editTime" label="修改时间" width="200">
<template slot-scope="scope">
<div>{{scope.row.editTime|timestampToTime}}</div>
</el-switch>
</template>
</el-table-column>
<el-table-column sortable prop="editUser" label="修改人" width="150">
</el-table-column>
<el-table-column align="center" label="操作" min-width="300">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="deleteUser(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog :title="title" :visible.sync="editFormVisible" width="30%" @click="closeDialog">
<el-form label-width="120px" :model="editForm" :rules="rules" ref="editForm">
<el-form-item label="终端号" prop="machineNo">
<el-input size="small" v-model="editForm.machineNo" auto-complete="off" placeholder="请输入终端号"></el-input>
</el-form-item>
<el-form-item label="支付方式" prop="payType">
<el-select size="small" v-model="editForm.payType" placeholder="请选择" class="userRole">
<el-option v-for="type in payType" :label="type.key" :value="type.value" :key="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="配置序号" prop="configId">
<el-input size="small" v-model="editForm.configId" auto-complete="off" placeholder="请输入配置序号"></el-input>
</el-form-item>
<el-form-item label="显示名称" prop="configName">
<el-input size="small" v-model="editForm.configName" auto-complete="off" placeholder="请输入显示名称"></el-input>
</el-form-item>
<el-form-item label="状态" prop="payOpen">
<el-select size="small" v-model="editForm.payOpen" placeholder="请选择" class="userRole">
<el-option label="正常" value="T"></el-option>
<el-option label="禁用" value="N"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="closeDialog">取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="submitForm('editForm')">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
MachineConfigList,
MachineConfigSave,
MachineConfigDelete
} from '../../api/payMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
nshow: true, //switch开启
fshow: false, //switch关闭
loading: false, //是显示加载
editFormVisible: false, //控制编辑页面显示与隐藏
title: '添加',
payType: [
{ key: '现金', value: 1 },
{ key: '支付宝', value: 2 },
{ key: '微信', value: 3 },
{ key: 'POS通', value: 4 },
{ key: '闪付', value: 5 },
{ key: 'POS通C扫B', value: 6 },
{ key: '银联二维码', value: 8 },
{ key: '会员余额支付', value: 9 }
],
editForm: {
tcId: '',
machineNo: '',
payType: '',
configId: '',
configName: '',
payOpen: '',
token: localStorage.getItem('logintoken')
},
// rules表单验证
rules: {
machineNo: [
{ required: true, message: '请输入终端号', trigger: 'blur' }
],
payType: [
{ required: true, message: '请选择支付方式', trigger: 'blur' }
],
configId: [
{ required: true, message: '请输入配置序号', trigger: 'blur' }
],
configName: [
{ required: true, message: '请输入显示名称', trigger: 'blur' }
],
payOpen: [{ required: true, message: '请选择状态', trigger: 'blur' }]
},
formInline: {
page: 1,
limit: 10,
varLable: '',
varName: '',
token: localStorage.getItem('logintoken')
},
// 删除部门
seletedata: {
ids: '',
token: localStorage.getItem('logintoken')
},
userparm: [], //搜索权限
listData: [], //用户数据
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取公司列表
getdata(parameter) {
this.loading = true
// 模拟数据
let res = {
code: 0,
msg: null,
count: 5,
data: [
{
addUser: null,
editUser: null,
addTime: null,
editTime: 1524046759000,
tcId: 1,
deptId: 1,
machineNo: '564565656666',
payType: 3,
payOpen: 'T',
configId: 63,
configName: '微信',
posNo: '098'
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
tcId: 2,
deptId: 1,
machineNo: '66666666',
payType: 2,
payOpen: 'T',
configId: 64,
configName: '支付宝',
posNo: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
tcId: 3,
deptId: 1,
machineNo: '93066545645546500791',
payType: 6,
payOpen: 'T',
configId: 67,
configName: '银商微信、支付宝',
posNo: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
tcId: 4,
deptId: 1,
machineNo: '65545656565',
payType: 6,
payOpen: 'T',
configId: 67,
configName: '银商微信、支付宝',
posNo: null
},
{
addUser: null,
editUser: null,
addTime: 1527409037000,
editTime: 1527409037000,
tcId: 6,
deptId: 1,
machineNo: '565654545454545',
payType: 6,
payOpen: 'T',
configId: 96,
configName: '微信',
posNo: null
}
]
}
this.loading = false
this.listData = res.data
// 分页赋值
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// MachineConfigList(parameter)
// .then(res => {
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.listData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
// .catch(err => {
// this.loading = false
// this.$message.error('菜单加载失败,请稍后再试!')
// })
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
// 搜索事件
search() {
this.getdata(this.formInline)
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
if (row != undefined && row != 'undefined') {
this.title = '修改'
this.editForm.tcId = row.tcId
this.editForm.machineNo = row.machineNo
this.editForm.configId = row.configId
this.editForm.payType = row.payType
this.editForm.configName = row.configName
this.editForm.payOpen = row.payOpen
} else {
this.title = '添加'
this.editForm.tcId = ''
this.editForm.machineNo = ''
this.editForm.payType = ''
this.editForm.configId = ''
this.editForm.configName = ''
this.editForm.payOpen = ''
}
},
// 编辑、增加页面保存方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
MachineConfigSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '公司保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('支付配置信息保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除公司
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
MachineConfigDelete(row.deptId)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '公司已删除!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('支付配置信息删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 关闭编辑、增加弹出框
closeDialog() {
this.editFormVisible = false
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
-610
View File
@@ -1,610 +0,0 @@
/**
* 支付管理 支付配置
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>支付配置</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-input size="small" v-model="formInline.name" placeholder="输入名称"></el-input>
</el-form-item>
<el-form-item>
<el-select size="small" v-model="formInline.payType" placeholder="请选择">
<el-option v-for="type in payType" :label="type.key" :value="type.value" :key="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input size="small" v-model="formInline.partner" placeholder="输入商户号"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="handleEdit()">添加</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" :data="listData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="index" width="60">
</el-table-column>
<el-table-column sortable prop="name" label="名称" width="200" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="payType" label="支付类型" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="partner" label="商户号" width="100" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="subMchId" label="微信子商户" width="140" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="appid" label="应用ID" width="100" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="signType" label="加密类型" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="partnerKey" label="商户签名密钥" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="notifyUrl" label="通知回调" width="140" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="sellerUserId" label="支付宝卖家" width="150" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="certPath" label="微信证书路径" width="150" show-overflow-tooltip>
</el-table-column>
<el-table-column align="center" label="操作" min-width="150">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="deleteUser(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog :title="title" :visible.sync="editFormVisible" width="30%" @click="closeDialog('editForm')">
<el-form label-width="120px" :model="editForm" :rules="rules" ref="editForm">
<el-form-item label="名称" prop="name">
<el-input size="small" v-model="editForm.name" auto-complete="off" placeholder="请输入名称"></el-input>
</el-form-item>
<el-form-item label="支付类型" prop="payType">
<el-select size="small" v-model="editForm.payType" placeholder="请选择" class="userRole">
<el-option v-for="type in payType" :label="type.key" :value="type.value" :key="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="商户号" prop="partner">
<el-input size="small" v-model="editForm.partner" auto-complete="off" placeholder="请输入商户号"></el-input>
</el-form-item>
<el-form-item label="微信子商户" prop="subMchId">
<el-input size="small" v-model="editForm.subMchId" auto-complete="off" placeholder="请输入微信子商户"></el-input>
</el-form-item>
<el-form-item label="应用ID" prop="appid">
<el-input size="small" v-model="editForm.appid" auto-complete="off" placeholder="请输入应用ID"></el-input>
</el-form-item>
<el-form-item label="通知回调" prop="notifyUrl">
<el-input size="small" v-model="editForm.notifyUrl" auto-complete="off" placeholder="请输入通知回调"></el-input>
</el-form-item>
<el-form-item label="加密类型" prop="signType">
<el-input size="small" v-model="editForm.signType" auto-complete="off" placeholder="请输入加密类型"></el-input>
</el-form-item>
<el-form-item label="商户签名密钥" prop="partnerKey">
<el-input size="small" v-model="editForm.partnerKey" auto-complete="off" placeholder="请输入商户签名密钥"></el-input>
</el-form-item>
<el-form-item label="支付宝卖家" prop="sellerUserId">
<el-input size="small" v-model="editForm.sellerUserId" auto-complete="off" placeholder="请输入支付宝卖家"></el-input>
</el-form-item>
<el-form-item label="微信证书路径" prop="certPath">
<el-input size="small" v-model="editForm.certPath" auto-complete="off" placeholder="请输入微信证书路径"></el-input>
</el-form-item>
<el-form-item label="微信证书密码" prop="certPassword">
<el-input size="small" v-model="editForm.certPassword" auto-complete="off" placeholder="请输入微信证书密码"></el-input>
</el-form-item>
<el-form-item label="支付宝私钥" prop="rsaKey">
<el-input size="small" v-model="editForm.rsaKey" auto-complete="off" placeholder="请输入支付宝私钥"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="closeDialog('editForm')">取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="submitForm('editForm')">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { ConfigList, ConfigSave, ConfigDelete } from '../../api/payMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
loading: false, //是显示加载
editFormVisible: false, //控制编辑页面显示与隐藏
title: '添加',
payType: [
{ key: '请选择', value: 0 },
{ key: '现金', value: 1 },
{ key: '支付宝', value: 2 },
{ key: '微信', value: 3 },
{ key: 'POS通', value: 4 },
{ key: '闪付', value: 5 },
{ key: 'POS通C扫B', value: 6 },
{ key: '银联二维码', value: 8 },
{ key: '会员余额支付', value: 9 }
],
editForm: {
id: '',
name: '',
payType: 1,
partner: '',
subMchId: '',
appid: '',
notifyUrl: '',
signType: '',
partnerKey: '',
sellerUserId: '',
certPath: '',
certPassword: '',
rsaKey: '',
token: localStorage.getItem('logintoken')
},
// rules表单验证
rules: {
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
payType: [
{ required: true, message: '请选择支付方式', trigger: 'blur' }
],
partner: [{ required: true, message: '请输入商户号', trigger: 'blur' }],
subMchId: [
{ required: true, message: '请输入微信子商户号', trigger: 'blur' }
],
appid: [{ required: true, message: '请输入应用ID', trigger: 'blur' }],
notifyUrl: [
{ required: true, message: '请输入通知回调', trigger: 'blur' }
],
signType: [
{ required: true, message: '请输入加密类型', trigger: 'blur' }
],
partnerKey: [
{ required: true, message: '请输入商户签名密钥', trigger: 'blur' }
],
sellerUserId: [
{ required: true, message: '请输入支付宝卖家', trigger: 'blur' }
],
certPath: [
{ required: true, message: '请输入微信证书路径', trigger: 'blur' }
],
certPassword: [
{ required: true, message: '请输入微信证书密码', trigger: 'blur' }
],
rsaKey: [
{ required: true, message: '请输入支付宝私钥', trigger: 'blur' }
]
},
formInline: {
page: 1,
limit: 10,
name: '',
payType: 0,
partner: '',
token: localStorage.getItem('logintoken')
},
// 删除部门
seletedata: {
ids: '',
token: localStorage.getItem('logintoken')
},
userparm: [], //搜索权限
listData: [], //用户数据
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取公司列表
getdata(parameter) {
this.loading = true
// 模拟数据
let res = {
code: 0,
msg: null,
count: 207,
data: [
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
id: 1,
name: '支付宝2.0',
payType: 1,
partner: '2015122801047567',
subMchId: '',
appid: '2015122801047567',
notifyUrl: 'r/pay/alipay/notify',
signType: 'RSA',
partnerKey: '==',
sellerUserId: '2088121360144859',
certPath: '',
certPassword: '',
rsaKey: '',
deptId: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
id: 2,
name: 'zzzzzz',
payType: 2,
partner: '1250856201',
subMchId: null,
appid: 'wx3ef7713adf0a97b8',
notifyUrl: null,
signType: 'NATIVE',
partnerKey: '2e3cdaf5aa051c16563c0b8916184d5d',
sellerUserId: null,
certPath:
'/usr/local/tomcat_provider/webapps/machine-service-provider-0.0.1-SNAPSHOT/conf/apiclient_cert_1250856201.p12',
certPassword: '1250856201',
rsaKey: null,
deptId: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
id: 3,
name: ' 待删除',
payType: 2,
partner: '1271942301',
subMchId: '1273729701',
appid: 'wx3ef7713adf0a97b8',
notifyUrl: '/pay/wx/notify',
signType: 'NATIVE',
partnerKey: '2e3cdaf5aa051c16563c0b8916184d5d',
sellerUserId: '',
certPath:
'/usr/local/tomcat_provider/webapps/machine-service-provider-0.0.1-SNAPSHOT/conf/apiclient_cert_1271942301.p12',
certPassword: '1271942301',
rsaKey: null,
deptId: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
id: 5,
name: '微信301',
payType: 2,
partner: '1271942301',
subMchId: '1341564201',
appid: 'wx3ef7713adf0a97b8',
notifyUrl: 'er/pay/wx/notify',
signType: 'NATIVE',
partnerKey: '2e3cdaf5aa051c16563c0b8916184d5d',
sellerUserId: null,
certPath:
'/usr/local/tomcat_provider/webapps/---0.0.1-SNAPSHOT/conf/apiclient_cert_1271942301.p12',
certPassword: '1271942301',
rsaKey: null,
deptId: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
id: 6,
name: '微信301',
payType: 2,
partner: '1271942301',
subMchId: '1284797101',
appid: 'wx3ef7713adf0a97b8',
notifyUrl:
'http://180.166.211.210:8114/machine-pay-consumer/pay/wx/notify',
signType: 'NATIVE',
partnerKey: '2e3cdaf5aa051c16563c0b8916184d5d',
sellerUserId: null,
certPath:
'/usr/local/tomcat_provider/webapps/--provider-0.0.1-SNAPSHOT/conf/apiclient_cert_1271942301.p12',
certPassword: '1271942301',
rsaKey: null,
deptId: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
id: 7,
name: '微信301',
payType: 2,
partner: '1271942301',
subMchId: '1277531101',
appid: 'wx3ef7713adf0a97b8',
notifyUrl:
'http://180.166.211.210:8114/machine-pay-consumer/pay/wx/notify',
signType: 'NATIVE',
partnerKey: '2e3cdaf5aa051c16563c0b8916184d5d',
sellerUserId: null,
certPath:
'/usr/local/tomcat_provider/webapps/machine-service-provider-0.0.1-SNAPSHOT/conf/apiclient_cert_1271942301.p12',
certPassword: '1271942301',
rsaKey: null,
deptId: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
id: 8,
name: '微信301',
payType: 2,
partner: '1271942301',
subMchId: '1276485301',
appid: 'wx3ef7713adf0a97b8',
notifyUrl:
'http://180.166.211.210:8114/machine-pay-consumer/pay/wx/notify',
signType: 'NATIVE',
partnerKey: '2e3cdaf5aa051c16563c0b8916184d5d',
sellerUserId: null,
certPath:
'/usr/local/tomcat_provider/webapps/machine-service-provider-0.0.1-SNAPSHOT/conf/apiclient_cert_1271942301.p12',
certPassword: '1271942301',
rsaKey: null,
deptId: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
id: 9,
name: '微信',
payType: 2,
partner: '1347158201',
subMchId: '1351034701',
appid: 'wx83a7489c10c9c952',
notifyUrl: '',
signType: 'NATIVE',
partnerKey: 'f174607ba704632b6cad2df8b04650d6',
sellerUserId: null,
certPath:
'/usr/local/tomcat_provider/webapps/machine-service-provider-0.0.1-SNAPSHOT/conf/apiclient_cert_1347158201.p12',
certPassword: '1347158201',
rsaKey: null,
deptId: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
id: 10,
name: '-微信301',
payType: 2,
partner: '1271942301',
subMchId: '1357984702',
appid: 'wx3ef7713adf0a97b8',
notifyUrl:
'http://180.166.211.210:8114/machine-pay-consumer/pay/wx/notify',
signType: 'NATIVE',
partnerKey: '2e3cdaf5aa051c16563c0b8916184d5d',
sellerUserId: null,
certPath:
'/usr/local/tomcat_provider/webapps/machine-service-provider-0.0.1-SNAPSHOT/conf/apiclient_cert_1271942301.p12',
certPassword: '1271942301',
rsaKey: null,
deptId: null
},
{
addUser: null,
editUser: null,
addTime: null,
editTime: null,
id: 11,
name: '-微信301',
payType: 2,
partner: '1271942301',
subMchId: '1357972202',
appid: 'wx3ef7713adf0a97b8',
notifyUrl:
'http://180.166.211.210:8114/machine-pay-consumer/pay/wx/notify',
signType: 'NATIVE',
partnerKey: '2e3cdaf5aa051c16563c0b8916184d5d',
sellerUserId: null,
certPath:
'/usr/local/tomcat_provider/webapps/machine-service-provider-0.0.1-SNAPSHOT/conf/apiclient_cert_1271942301.p12',
certPassword: '1271942301',
rsaKey: null,
deptId: null
}
]
}
this.loading = false
this.listData = res.data
// 分页赋值
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// ConfigList(parameter)
// .then(res => {
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.listData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
// .catch(err => {
// this.loading = false
// this.$message.error('菜单加载失败,请稍后再试!')
// })
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
// 搜索事件
search() {
this.getdata(this.formInline)
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
if (row != undefined && row != 'undefined') {
this.title = '修改'
this.editForm.id = row.id
this.editForm.name = row.name
this.editForm.payType = row.payType
this.editForm.partner = row.partner
this.editForm.subMchId = row.subMchId
this.editForm.appid = row.appid
this.editForm.notifyUrl = row.notifyUrl
this.editForm.signType = row.signType
this.editForm.partnerKey = row.partnerKey
this.editForm.sellerUserId = row.sellerUserId
this.editForm.certPath = row.certPath
this.editForm.certPassword = row.certPassword
this.editForm.rsaKey = row.rsaKey
} else {
this.title = '添加'
this.editForm.id = ''
this.editForm.name = ''
this.editForm.payType = ''
this.editForm.partner = ''
this.editForm.subMchId = ''
this.editForm.appid = ''
this.editForm.notifyUrl = ''
this.editForm.signType = ''
this.editForm.partnerKey = ''
this.editForm.sellerUserId = ''
this.editForm.certPath = ''
this.editForm.certPassword = ''
this.editForm.rsaKey = ''
}
},
// 编辑、增加页面保存方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
ConfigSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '公司保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('支付配置信息保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除公司
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
ConfigDelete(row.deptId)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '公司已删除!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('支付配置信息删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 关闭编辑、增加弹出框
closeDialog(formName) {
this.editFormVisible = false
this.$refs[formName].resetFields()
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
-631
View File
@@ -1,631 +0,0 @@
/**
* 订单管理 交易订单
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>交易订单</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-input size="small" v-model="formInline.machineNo" placeholder="输入终端编号"></el-input>
</el-form-item>
<el-form-item>
<el-input size="small" v-model="formInline.orderNo" placeholder="输入订单号"></el-input>
</el-form-item>
<el-form-item>
<el-input size="small" v-model="formInline.transId" placeholder="输入交易单号"></el-input>
</el-form-item>
<el-form-item>
<el-select size="small" v-model="formInline.payType" placeholder="请选择">
<el-option v-for="type in payType" :label="type.key" :value="type.value" :key="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select size="small" v-model="formInline.orderStatus" placeholder="请选择">
<el-option v-for="type in payway" :label="type.key" :value="type.value" :key="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" :data="listData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="index" width="60">
</el-table-column>
<el-table-column sortable prop="machineNo" label="终端编号" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="orderNo" label="订单号" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="transId" label="交易单号" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="payType" label="支付方式" width="140" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="transType" label="交易类型" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="goodsPrice" label="商品价格" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="payAmount" label="支付金额" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="goodsName" label="商品名称" width="140" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="orderStatus" label="订单状态" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column sortable prop="addTime" label="创建时间" width="180" show-overflow-tooltip>
<template slot-scope="scope">
<div>{{scope.row.addTime|timestampToTime}}</div>
</template>
</el-table-column>
<el-table-column align="center" label="操作" min-width="150">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">预览</el-button>
<el-button size="mini" type="danger" @click="deleteUser(scope.$index, scope.row)">退款</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog :title="title" :visible.sync="editFormVisible" width="50%" @click="closeDialog('editForm')">
<el-form label-width="120px" :model="editForm" ref="editForm">
<el-row>
<el-col :span="12">
<el-form-item label="公司编号">
<el-input size="small" v-model="editForm.deptId" auto-complete="off" placeholder="请输入名称" disabled></el-input>
</el-form-item>
<el-form-item label="订单号">
<el-input size="small" v-model="editForm.orderNo" auto-complete="off" placeholder="请输入商户号" disabled></el-input>
</el-form-item>
<el-form-item label="支付方式">
<el-input size="small" v-model="editForm.payType" auto-complete="off" placeholder="请输入商户号" disabled></el-input>
</el-form-item>
<el-form-item label="交易类型">
<el-input size="small" v-model="editForm.transType" auto-complete="off" placeholder="请输入微信子商户" disabled></el-input>
</el-form-item>
<el-form-item label="商品编号">
<el-input size="small" v-model="editForm.goodsNo" auto-complete="off" placeholder="请输入应用ID" disabled></el-input>
</el-form-item>
<el-form-item label="支付金额">
<el-input size="small" v-model="editForm.payAmount" auto-complete="off" placeholder="请输入通知回调" disabled></el-input>
</el-form-item>
<el-form-item label="货道号">
<el-input size="small" v-model="editForm.aisleNo" auto-complete="off" placeholder="请输入加密类型" disabled></el-input>
</el-form-item>
<el-form-item label="买家标识">
<el-input size="small" v-model="editForm.openId" auto-complete="off" placeholder="请输入商户签名密钥" disabled></el-input>
</el-form-item>
<el-form-item label="子商户号">
<el-input size="small" v-model="editForm.subMchId" auto-complete="off" placeholder="请输入支付宝卖家" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公司名称">
<el-input size="small" v-model="editForm.deptName" auto-complete="off" placeholder="请输入名称" disabled></el-input>
</el-form-item>
<el-form-item label="交易单号">
<el-input size="small" v-model="editForm.transId" auto-complete="off" placeholder="请输入商户号" disabled></el-input>
</el-form-item>
<el-form-item label="子支付方式">
<el-input size="small" v-model="editForm.subPayType" auto-complete="off" placeholder="请输入商户号" disabled></el-input>
</el-form-item>
<el-form-item label="终端编号">
<el-input size="small" v-model="editForm.machineNo" auto-complete="off" placeholder="请输入微信子商户" disabled></el-input>
</el-form-item>
<el-form-item label="商品价格">
<el-input size="small" v-model="editForm.goodsPrice" auto-complete="off" placeholder="请输入应用ID" disabled></el-input>
</el-form-item>
<el-form-item label="商品名称">
<el-input size="small" v-model="editForm.goodsName" auto-complete="off" placeholder="请输入通知回调" disabled></el-input>
</el-form-item>
<el-form-item label="订单状态">
<el-input size="small" v-model="editForm.orderStatus" auto-complete="off" placeholder="请输入加密类型" disabled></el-input>
</el-form-item>
<el-form-item label="商户号">
<el-input size="small" v-model="editForm.mchId" auto-complete="off" placeholder="请输入商户签名密钥" disabled></el-input>
</el-form-item>
<el-form-item label="编辑用户">
<el-input size="small" v-model="editForm.editUser" auto-complete="off" placeholder="请输入支付宝卖家" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注">
<el-input size="small" v-model="editForm.remark" auto-complete="off" placeholder="请输入微信证书路径" disabled></el-input>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
import { OrderList, OrderRefund, OrderDelete } from '../../api/payMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
loading: false, //是显示加载
editFormVisible: false, //控制编辑页面显示与隐藏
title: '预览',
payType: [
{ key: '请选择', value: 0 },
{ key: '现金', value: 1 },
{ key: '支付宝', value: 2 },
{ key: '微信', value: 3 },
{ key: 'POS通', value: 4 },
{ key: '闪付', value: 5 },
{ key: 'POS通C扫B', value: 6 },
{ key: '银联二维码', value: 8 },
{ key: '会员余额支付', value: 9 }
],
payway: [
{ key: '请选择', value: 0 },
{ key: '初始化', value: 1 },
{ key: '已支付', value: 2 },
{ key: '出货成功', value: 3 },
{ key: '出货失败', value: 4 },
{ key: '订单超时', value: 5 },
{ key: '退款初始化', value: 11 },
{ key: '退款进行中', value: 12 },
{ key: '退款成功', value: 13 },
{ key: '退款失败', value: 14 },
{ key: '订单处理中', value: 10 }
],
editForm: {
id: '',
name: '',
payType: 1,
partner: '',
subMchId: '',
appid: '',
notifyUrl: '',
signType: '',
partnerKey: '',
sellerUserId: '',
certPath: '',
certPassword: '',
rsaKey: '',
token: localStorage.getItem('logintoken')
},
formInline: {
page: 1,
limit: 10,
machineNo: '',
orderNo: '',
transId: '',
payType: 0,
orderStatus: 0,
token: localStorage.getItem('logintoken')
},
// 删除部门
seletedata: {
ids: '',
token: localStorage.getItem('logintoken')
},
userparm: [], //搜索权限
listData: [], //用户数据
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取公司列表
getdata(parameter) {
this.loading = true
// 模拟数据开始
let res = {
code: 0,
msg: null,
count: 23,
data: [
{
addUser: null,
editUser: null,
addTime: 1526380193000,
editTime: 1526380193000,
orderId: 109,
deptId: 1,
deptName: 'xxxx',
orderNo: 'xxxx',
transId: 'xxxx',
payType: 6,
subPayType: 'WXPay',
transType: '退款',
machineNo: '111111',
goodsNo: '123456',
goodsPrice: 0.01,
payAmount: -0.01,
goodsName: '可乐',
aisleNo: null,
orderStatus: 14,
openId: null,
mchId: '111111111111111',
subMchId: null,
remark: '不允许从此IP发起交易: 101.81.251.226'
},
{
addUser: null,
editUser: null,
addTime: 1526380176000,
editTime: 1526380176000,
orderId: 108,
deptId: 1,
deptName: 'xxxxxx',
orderNo: 'xxxx',
transId: 'xxxxx',
payType: 6,
subPayType: 'WXPay',
transType: '退款',
machineNo: 'J1AX904002',
goodsNo: '123456',
goodsPrice: 0.01,
payAmount: -0.01,
goodsName: '可乐',
aisleNo: null,
orderStatus: 14,
openId: null,
mchId: '898310154990338',
subMchId: null,
remark: '不允许从此IP发起交易: 101.81.251.226'
},
{
addUser: null,
editUser: null,
addTime: 1524921444000,
editTime: 1524894094000,
orderId: 107,
deptId: 1,
deptName: 'xxxxxx',
orderNo: 'J1AX90400220180428101723945',
transId: '4200000137201804287543647891',
payType: 6,
subPayType: 'WXPay',
transType: '消费',
machineNo: 'J1AX904002',
goodsNo: '123456',
goodsPrice: 0.01,
payAmount: 0.01,
goodsName: '可乐',
aisleNo: null,
orderStatus: 7,
openId: null,
mchId: '898310154990338',
subMchId: null,
remark: '无法找到指定的账单'
},
{
addUser: null,
editUser: null,
addTime: 1521307596000,
editTime: 1524641207000,
orderId: 20,
deptId: 1,
deptName: 'xxxx',
orderNo: '9300079120180318142634440',
transId: null,
payType: 0,
subPayType: '0',
transType: '消费',
machineNo: '111111111111111',
goodsNo: '123456',
goodsPrice: 0.01,
payAmount: 0.01,
goodsName: '可乐',
aisleNo: null,
orderStatus: 7,
openId: null,
mchId: null,
subMchId: null,
remark: '1111111111111111111111'
},
{
addUser: null,
editUser: null,
addTime: 1520195909000,
editTime: 1520195909000,
orderId: 19,
deptId: 1,
deptName: 'xxxx',
orderNo: '9300079120180305183828606',
transId: null,
payType: 0,
subPayType: '0',
transType: '消费',
machineNo: '93000791',
goodsNo: '123456',
goodsPrice: 0.01,
payAmount: 0.01,
goodsName: '可乐',
aisleNo: null,
orderStatus: 1,
openId: null,
mchId: null,
subMchId: null,
remark: null
},
{
addUser: null,
editUser: null,
addTime: 1520035180000,
editTime: 1520035180000,
orderId: 18,
deptId: 1,
deptName: 'xxxx',
orderNo: '4200000056201803031934477774',
transId: '9300079120180303170851281',
payType: 6,
subPayType: 'WXPay',
transType: '退款',
machineNo: '222222222222222222',
goodsNo: '123456',
goodsPrice: 0.01,
payAmount: 0.01,
goodsName: '可乐',
aisleNo: null,
orderStatus: 8,
openId: null,
mchId: '898310154990338',
subMchId: null,
remark: null
},
{
addUser: null,
editUser: null,
addTime: 1520020261000,
editTime: 1520185478000,
orderId: 17,
deptId: 1,
deptName: 'xxxx',
orderNo: '9300079120180303175059985',
transId: '4200000072201803031887274444',
payType: 6,
subPayType: 'WXPay',
transType: '消费',
machineNo: '93000791',
goodsNo: '123456',
goodsPrice: 0.01,
payAmount: 0.01,
goodsName: '可乐',
aisleNo: null,
orderStatus: 7,
openId: null,
mchId: '898310154990338',
subMchId: null,
remark: '不允许从此IP发起交易: 116.247.119.165'
},
{
addUser: null,
editUser: null,
addTime: 1520019911000,
editTime: 1520020075000,
orderId: 16,
deptId: 1,
deptName: 'xxxx',
orderNo: '9300079120180303174511778',
transId: '4200000055201803031949877221',
payType: 6,
subPayType: 'WXPay',
transType: '消费',
machineNo: '93000791',
goodsNo: '123456',
goodsPrice: 0.01,
payAmount: 0.01,
goodsName: '可乐',
aisleNo: null,
orderStatus: 1,
openId: null,
mchId: '898310154990338',
subMchId: null,
remark: null
},
{
addUser: null,
editUser: null,
addTime: 1520019776000,
editTime: 1520019776000,
orderId: 15,
deptId: 1,
deptName: 'xxxx',
orderNo: '9300079120180303174256156',
transId: null,
payType: 0,
subPayType: '0',
transType: '消费',
machineNo: '93000791',
goodsNo: '123456',
goodsPrice: 0.01,
payAmount: 0.01,
goodsName: '可乐',
aisleNo: null,
orderStatus: 1,
openId: null,
mchId: null,
subMchId: null,
remark: null
},
{
addUser: null,
editUser: null,
addTime: 1520019729000,
editTime: 1520019729000,
orderId: 14,
deptId: 1,
deptName: '上海XX',
orderNo: '9300079120180303174208429',
transId: null,
payType: 0,
subPayType: '0',
transType: '消费',
machineNo: '93000791',
goodsNo: '123456',
goodsPrice: 0.01,
payAmount: 0.01,
goodsName: '可乐',
aisleNo: null,
orderStatus: 1,
openId: null,
mchId: null,
subMchId: null,
remark: null
}
]
}
this.loading = false
this.listData = res.data
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// OrderList(parameter)
// .then(res => {
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.listData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
// .catch(err => {
// this.loading = false
// this.$message.error('菜单加载失败,请稍后再试!')
// })
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
// 搜索事件
search() {
this.getdata(this.formInline)
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
this.editForm = row
},
// 编辑、增加页面保存方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
ConfigSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '公司保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('支付配置信息保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除公司
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
ConfigDelete(row.deptId)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '公司已删除!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('支付配置信息删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 关闭编辑、增加弹出框
closeDialog(formName) {
this.editFormVisible = false
this.$refs[formName].resetFields()
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
-331
View File
@@ -1,331 +0,0 @@
/**
* 基础菜单 商品管理
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>商品管理</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-input size="small" v-model="formInline.deptName" placeholder="输入部门名称"></el-input>
</el-form-item>
<el-form-item label="">
<el-input size="small" v-model="formInline.deptNo" placeholder="输入部门代码"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="handleEdit()">添加</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" :data="listData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="selection" width="60">
</el-table-column>
<el-table-column sortable prop="deptName" label="部门名称" width="300">
</el-table-column>
<el-table-column sortable prop="deptNo" label="部门代码" width="300">
</el-table-column>
<el-table-column sortable prop="editTime" label="修改时间" width="300">
<template slot-scope="scope">
<div>{{scope.row.editTime|timestampToTime}}</div>
</template>
</el-table-column>
<el-table-column sortable prop="editUser" label="修改人" width="300">
</el-table-column>
<el-table-column align="center" label="操作" min-width="300">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="deleteUser(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog :title="title" :visible.sync="editFormVisible" width="30%" @click="closeDialog">
<el-form label-width="120px" :model="editForm" :rules="rules" ref="editForm">
<el-form-item label="部门名称" prop="deptName">
<el-input size="small" v-model="editForm.deptName" auto-complete="off" placeholder="请输入部门名称"></el-input>
</el-form-item>
<el-form-item label="部门代码" prop="deptNo">
<el-input size="small" v-model="editForm.deptNo" auto-complete="off" placeholder="请输入部门代码"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="closeDialog">取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="submitForm('editForm')">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { deptList, deptSave, deptDelete } from '../../api/userMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
nshow: true, //switch开启
fshow: false, //switch关闭
loading: false, //是显示加载
editFormVisible: false, //控制编辑页面显示与隐藏
title: '添加',
editForm: {
deptId: '',
deptName: '',
deptNo: '',
token: localStorage.getItem('logintoken')
},
// rules表单验证
rules: {
deptName: [
{ required: true, message: '请输入部门名称', trigger: 'blur' }
],
deptNo: [{ required: true, message: '请输入部门代码', trigger: 'blur' }]
},
formInline: {
page: 1,
limit: 10,
varLable: '',
varName: '',
token: localStorage.getItem('logintoken')
},
// 删除部门
seletedata: {
ids: '',
token: localStorage.getItem('logintoken')
},
userparm: [], //搜索权限
listData: [], //用户数据
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取公司列表
getdata(parameter) {
this.loading = true
// 模拟数据开始
let res = {
code: 0,
msg: null,
count: 5,
data: [
{
addUser: null,
editUser: null,
addTime: 1521062371000,
editTime: 1526700200000,
deptId: 2,
deptName: 'XX分公司',
deptNo: '1',
parentId: 1
},
{
addUser: null,
editUser: null,
addTime: 1521063247000,
editTime: 1526652291000,
deptId: 3,
deptName: '上海测试',
deptNo: '02',
parentId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526349555000,
editTime: 1526349565000,
deptId: 12,
deptName: '1',
deptNo: '11',
parentId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526373178000,
editTime: 1526373178000,
deptId: 13,
deptName: '5',
deptNo: '5',
parentId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526453107000,
editTime: 1526453107000,
deptId: 17,
deptName: 'v',
deptNo: 'v',
parentId: 1
}
]
}
this.loading = false
this.listData = res.data
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// deptList(parameter)
// .then(res => {
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.listData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
// .catch(err => {
// this.loading = false
// this.$message.error('菜单加载失败,请稍后再试!')
// })
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
// 搜索事件
search() {
this.getdata(this.formInline)
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
if (row != undefined && row != 'undefined') {
this.title = '修改'
this.editForm.deptId = row.deptId
this.editForm.deptName = row.deptName
this.editForm.deptNo = row.deptNo
} else {
this.title = '添加'
this.editForm.deptId = ''
this.editForm.deptName = ''
this.editForm.deptNo = ''
}
},
// 编辑、增加页面保存方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
deptSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '公司保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('公司保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除公司
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deptDelete(row.deptId)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '公司已删除!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('公司删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 关闭编辑、增加弹出框
closeDialog() {
this.editFormVisible = false
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
@@ -1,312 +0,0 @@
/**
* 基础菜单 商品管理
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>立案申请</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-input size="small" v-model="formInline.deptName" placeholder="立案申请"></el-input>
</el-form-item>
<el-form-item label="">
<el-input size="small" v-model="formInline.deptNo" placeholder="立案申请"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="handleEdit()">立案申请</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" :data="listData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="selection" width="60">
</el-table-column>
<el-table-column align="center" sortable prop="caseNo" label="案件编号" width="200">
</el-table-column>
<el-table-column align="center" prop="applicant" label="申请人" width="100"></el-table-column>
<el-table-column align="center" prop="subjectmatter" label="案件标的" width="200"></el-table-column>
<el-table-column align="center" sortable prop="filingdate" label="立案日期" width="200"></el-table-column>
<el-table-column align="center" prop="arbitratemethod" label="仲裁方式" width="90">
</el-table-column>
<el-table-column align="center" prop="caseStatus" label="案件状态" width="90">
</el-table-column>
<el-table-column align="center" label="操作" min-width="300">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="deleteUser(scope.$index, scope.row)">详情</el-button>
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">修改</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog :title="title" :visible.sync="editFormVisible" width="30%" @click="closeDialog">
<el-form label-width="120px" :model="editForm" :rules="rules" ref="editForm">
<el-form-item label="部门名称" prop="deptName">
<el-input size="small" v-model="editForm.deptName" auto-complete="off" placeholder="请输入部门名称"></el-input>
</el-form-item>
<el-form-item label="部门代码" prop="deptNo">
<el-input size="small" v-model="editForm.deptNo" auto-complete="off" placeholder="请输入部门代码"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="closeDialog">取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="submitForm('editForm')">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { deptList, deptSave, deptDelete } from '../../api/userMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
nshow: true, //switch开启
fshow: false, //switch关闭
loading: false, //是显示加载
editFormVisible: false, //控制编辑页面显示与隐藏
title: '添加',
editForm: {
deptId: '',
deptName: '',
deptNo: '',
token: localStorage.getItem('logintoken')
},
// rules表单验证
rules: {
deptName: [
{ required: true, message: '请输入部门名称', trigger: 'blur' }
],
deptNo: [{ required: true, message: '请输入部门代码', trigger: 'blur' }]
},
formInline: {
page: 1,
limit: 10,
varLable: '',
varName: '',
token: localStorage.getItem('logintoken')
},
// 删除部门
seletedata: {
ids: '',
token: localStorage.getItem('logintoken')
},
userparm: [], //搜索权限
listData: [], //用户数据
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取公司列表
getdata(parameter) {
this.loading = true
// 模拟数据开始
let res = {
code: 0,
msg: null,
count: 5,
data: [
// 案件编号 申请人 案件标的 立案日期 仲裁方式 案件状态
{
caseNo: 1,
applicant: '张三',
subjectmatter: 1521,
filingdate: '2023-09-01',
arbitratemethod: '线下',
caseStatus: '待开庭',
},
{
caseNo: 2,
applicant: '李四',
subjectmatter: 19421,
filingdate: '2023-02-11',
arbitratemethod: '线上',
caseStatus: '已结案',
},
{
caseNo: 3,
applicant: '王五',
subjectmatter: 521,
filingdate: '2023-01-25',
arbitratemethod: '线下',
caseStatus: '已结案',
},
{
caseNo: 4,
applicant: 'JHHG',
subjectmatter: 666,
filingdate: '2023-01-25',
arbitratemethod: '线下',
caseStatus: '未立案',
},
]
}
this.loading = false
this.listData = res.data
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// deptList(parameter)
// .then(res => {
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.listData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
// .catch(err => {
// this.loading = false
// this.$message.error('菜单加载失败,请稍后再试!')
// })
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
// 搜索事件
search() {
this.getdata(this.formInline)
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
if (row != undefined && row != 'undefined') {
this.title = '修改'
this.editForm.deptId = row.deptId
this.editForm.deptName = row.deptName
this.editForm.deptNo = row.deptNo
} else {
this.title = '添加'
this.editForm.deptId = ''
this.editForm.deptName = ''
this.editForm.deptNo = ''
}
},
// 编辑、增加页面保存方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
deptSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '公司保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('公司保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除公司
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deptDelete(row.deptId)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '公司已删除!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('公司删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 关闭编辑、增加弹出框
closeDialog() {
this.editFormVisible = false
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
@@ -1,15 +0,0 @@
<template>
<div>
filingReview 立案申请审核
</div>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
@@ -1,15 +0,0 @@
<template>
<div>
payConfirmation 缴费确认
</div>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
-332
View File
@@ -1,332 +0,0 @@
/**
* 系统管理 公司管理
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>公司管理</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-input size="small" v-model="formInline.deptName" placeholder="输入部门名称"></el-input>
</el-form-item>
<el-form-item label="">
<el-input size="small" v-model="formInline.deptNo" placeholder="输入部门代码"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="handleEdit()">添加</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" :data="listData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="selection" width="60">
</el-table-column>
<el-table-column sortable prop="deptName" label="部门名称" width="300">
</el-table-column>
<el-table-column sortable prop="deptNo" label="部门代码" width="300">
</el-table-column>
<el-table-column sortable prop="editTime" label="修改时间" width="300">
<template slot-scope="scope">
<div>{{scope.row.editTime|timestampToTime}}</div>
</template>
</el-table-column>
<el-table-column sortable prop="editUser" label="修改人" width="300">
</el-table-column>
<el-table-column align="center" label="操作" min-width="300">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="deleteUser(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog :title="title" :visible.sync="editFormVisible" width="30%" @click="closeDialog">
<el-form label-width="120px" :model="editForm" :rules="rules" ref="editForm">
<el-form-item label="部门名称" prop="deptName">
<el-input size="small" v-model="editForm.deptName" auto-complete="off" placeholder="请输入部门名称"></el-input>
</el-form-item>
<el-form-item label="部门代码" prop="deptNo">
<el-input size="small" v-model="editForm.deptNo" auto-complete="off" placeholder="请输入部门代码"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="closeDialog">取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="submitForm('editForm')">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { deptList, deptSave, deptDelete } from '../../api/userMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
nshow: true, //switch开启
fshow: false, //switch关闭
loading: false, //是显示加载
editFormVisible: false, //控制编辑页面显示与隐藏
title: '添加',
editForm: {
deptId: '',
deptName: '',
deptNo: '',
token: localStorage.getItem('logintoken')
},
// rules表单验证
rules: {
deptName: [
{ required: true, message: '请输入部门名称', trigger: 'blur' }
],
deptNo: [{ required: true, message: '请输入部门代码', trigger: 'blur' }]
},
formInline: {
page: 1,
limit: 10,
varLable: '',
varName: '',
token: localStorage.getItem('logintoken')
},
// 删除部门
seletedata: {
ids: '',
token: localStorage.getItem('logintoken')
},
userparm: [], //搜索权限
listData: [], //用户数据
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取公司列表
getdata(parameter) {
this.loading = true
// 模拟数据
let res = {
code: 0,
msg: null,
count: 5,
data: [
{
addUser: null,
editUser: null,
addTime: 1521062371000,
editTime: 1526700200000,
deptId: 2,
deptName: '上海分公司',
deptNo: '1',
parentId: 1
},
{
addUser: null,
editUser: null,
addTime: 1521063247000,
editTime: 1526652291000,
deptId: 3,
deptName: '上海测试',
deptNo: '02',
parentId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526349555000,
editTime: 1526349565000,
deptId: 12,
deptName: '1',
deptNo: '11',
parentId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526373178000,
editTime: 1526373178000,
deptId: 13,
deptName: '5',
deptNo: '5',
parentId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526453107000,
editTime: 1526453107000,
deptId: 17,
deptName: 'v',
deptNo: 'v',
parentId: 1
}
]
}
this.loading = false
this.listData = res.data
// 分页赋值
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// deptList(parameter)
// .then(res => {
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.listData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
// .catch(err => {
// this.loading = false
// this.$message.error('菜单加载失败,请稍后再试!')
// })
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
// 搜索事件
search() {
this.getdata(this.formInline)
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
if (row != undefined && row != 'undefined') {
this.title = '修改'
this.editForm.deptId = row.deptId
this.editForm.deptName = row.deptName
this.editForm.deptNo = row.deptNo
} else {
this.title = '添加'
this.editForm.deptId = ''
this.editForm.deptName = ''
this.editForm.deptNo = ''
}
},
// 编辑、增加页面保存方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
deptSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '公司保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('公司保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除公司
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deptDelete(row.deptId)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '公司已删除!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('公司删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 关闭编辑、增加弹出框
closeDialog() {
this.editFormVisible = false
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
-331
View File
@@ -1,331 +0,0 @@
/**
* 系统管理 菜单管理
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>菜单管理</el-breadcrumb-item>
</el-breadcrumb>
<!-- 主体内容 -->
<el-row>
<!-- title -->
<div class="modt-box">用户管理</div>
<el-col :span="4"> </el-col>
<el-col :span="6">
<div class="mod-btnbox">
<el-button size="small" type="primary">全部展开</el-button>
<el-button size="small" type="primary">全部压缩</el-button>
</div>
<el-tree class="treeclass" ref="tree" :data="treeData" default-expand-all="" :props="defaultProps" @node-click="nodeclick" @check-change="handleClick" check-strictly node-key="id" show-checkbox></el-tree>
</el-col>
<el-col :span="18">
<div class="mod-btnbox">
<el-button size="small" type="primary" icon="el-icon-plus" @click="addModule">添加</el-button>
</div>
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-form-item label="父级菜单" prop="parentId">
<el-select size="small" v-model="form.parentId" placeholder="请选择" class="selectw">
<el-option v-for="parm in fmenu" :key="parm.id" :label="parm.name" :value="parm.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="菜单名称" prop="moduleName">
<el-input size="small" v-model="form.moduleName"></el-input>
</el-form-item>
<el-form-item label="图标" prop="moduleIcon">
<el-input size="small" v-model="form.moduleIcon"></el-input>
</el-form-item>
<el-form-item label="URL" prop="moduleUrl">
<el-input size="small" v-model="form.moduleUrl"></el-input>
</el-form-item>
<el-form-item label="顺序" prop="moduleOrder">
<el-input size="small" v-model="form.moduleOrder"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="saveModule('form')">保存</el-button>
<el-button size="small" type="primary" v-show="showdelete" @click="deleteModule">删除</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
</template>
<script>
import {
ModuleList,
ModuleGet,
ModuleNodes,
ModuleSave,
ModuleDelete
} from '../../api/userMG'
export default {
data() {
return {
showdelete: false,
treeData: [],
defaultProps: {
children: 'children',
label: 'name'
},
form: {
addUser: '',
editUser: '',
addTime: '',
editTime: '',
moduleId: '',
parentId: '',
moduleLevel: '',
systemNo: '',
isLeaf: '',
fullIndex: '',
moduleIcon: '',
moduleOrder: '',
moduleName: '',
moduleNotes: '',
moduleUrl: ''
},
// rules表单验证
rules: {
parentId: [
{ required: true, message: '请选择父级菜单', trigger: 'blur' }
],
moduleName: [
{ required: true, message: '请输入菜单名称', trigger: 'blur' }
],
moduleIcon: [
{ required: true, message: '请输入菜单图标', trigger: 'blur' }
],
moduleUrl: [{ required: true, message: '请输入URL', trigger: 'blur' }],
moduleOrder: [
{ required: true, message: '请输入菜单顺序', trigger: 'blur' }
]
},
fmenu: []
}
},
/**
* 创建完毕
*/
created() {
this.getdata()
this.getmenu()
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取数据
getdata() {
ModuleList()
.then(res => {
this.treeData = [
{
id: 1,
pId: 0,
name: '平台顶级',
open: true,
checked: false
},
{
id: 2,
pId: 1,
name: '一层',
open: true,
checked: false
},
{
id: 3,
pId: 1,
name: '一层',
open: true,
checked: false
},
{
id: 12,
pId: 1,
name: '一层',
open: true,
checked: false
},
{
id: 13,
pId: 1,
name: '一层',
open: true,
checked: false
},
{
id: 17,
pId: 1,
name: '一层',
open: true,
checked: false
},
{
id: 4,
pId: 2,
name: '一层',
open: true,
checked: false
},
{
id: 5,
pId: 2,
name: '一层',
open: true,
checked: false
},
{
id: 6,
pId: 2,
name: '一层',
open: true,
checked: false
},
{
id: 7,
pId: 2,
name: '一层',
open: true,
checked: false
}
]
})
.catch(err => {
this.loading = false
this.$message.error('菜单管理列表失败,请稍后再试!')
})
},
// 添加
addModule() {
this.showdelete = false
this.form.addUser = ''
this.form.editUser = ''
this.form.addTime = ''
this.form.editTime = ''
this.form.moduleId = ''
this.form.parentId = ''
this.form.moduleLevel = ''
this.form.systemNo = ''
this.form.isLeaf = ''
this.form.fullIndex = ''
this.form.moduleIcon = ''
this.form.moduleOrder = ''
this.form.moduleName = ''
this.form.moduleNotes = ''
this.form.moduleUrl = ''
},
// 获取父级菜单
getmenu() {
let parm = {
page: '1',
limit: '10'
}
ModuleNodes(parm)
.then(res => {
this.fmenu = res.data
})
.catch(err => {
this.loading = false
this.$message.error('父级菜单列表获取失败,请稍后再试!')
})
},
// 复选变单选
handleClick(data, checked, node) {
if (checked) {
this.$refs.tree.setCheckedNodes([])
this.$refs.tree.setCheckedNodes([data])
this.showdelete = true
} else {
}
},
// 点击节点
nodeclick(arr, node, self) {
ModuleGet(arr.id)
.then(res => {
console.log(JSON.stringify(res))
this.form = res.data.data
this.$refs.tree.setCheckedNodes([])
this.$refs.tree.setCheckedNodes([arr])
})
.catch(err => {
this.loading = false
this.$message.error('用户管理获取失败,请稍后再试!')
})
},
// 保存菜单
saveModule(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
ModuleSave(this.form)
.then(res => {
this.getdata()
this.getmenu()
})
.catch(err => {
this.$message.error('菜单管理列表保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除菜单
deleteModule() {
ModuleDelete(this.form.moduleId)
.then(res => {
this.getdata()
this.getmenu()
this.$message.error('菜单管理列表删除成功!')
})
.catch(err => {
this.$message.error('菜单管理列表删除失败,请稍后再试!')
})
}
}
}
</script>
<style>
.user-search {
margin-top: 20px !important;
}
.user-search td {
margin-top: 20px !important;
}
.userRole {
width: 100%;
}
.el-table__expanded-cell {
padding: 0px !important;
margin: 0px !important;
}
.modt-box {
width: 100%;
height: 60px;
line-height: 60px;
background-color: #f0f2f5;
text-align: center;
color: #334157;
margin-top: 20px;
margin-bottom: 20px;
font-size: 24px;
}
.mod-btnbox {
margin-bottom: 20px;
}
.treeclass {
border: 1px solid #f3f3f3;
padding-top: 20px;
padding-bottom: 20px;
}
.selectw {
width: 100%;
}
</style>
-465
View File
@@ -1,465 +0,0 @@
/**
* 系统管理 权限管理
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>权限管理</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-input size="small" v-model="formInline.permissionName" placeholder="输入权限名称"></el-input>
</el-form-item>
<el-form-item label="">
<el-input size="small" v-model="formInline.permission" placeholder="输入权限CODE"></el-input>
</el-form-item>
<el-form-item label="角色:">
<el-select size="small" v-model="formInline.roleId" placeholder="请选择">
<el-option selected label="请选择" value="0"></el-option>
<el-option v-for="parm in userparm" :key="parm.roleId" :label="parm.roleName" :value="parm.roleId"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="handleEdit()">添加</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="RolePermission()">配置权限</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" @selection-change="selectChange" :data="listData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="selection" width="60">
</el-table-column>
<el-table-column sortable prop="permissionName" label="权限名称" width="300">
</el-table-column>
<el-table-column sortable prop="permission" label="权限CODE" width="300">
</el-table-column>
<el-table-column sortable prop="editTime" label="修改时间" width="300">
<template slot-scope="scope">
<div>{{scope.row.editTime|timestampToTime}}</div>
</template>
</el-table-column>
<el-table-column sortable prop="editUser" label="修改人" width="300">
</el-table-column>
<el-table-column align="center" label="操作" min-width="300">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="deleteUser(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog :title="title" :visible.sync="editFormVisible" width="30%" @click="closeDialog">
<el-form label-width="120px" :model="editForm" :rules="rules" ref="editForm">
<el-form-item label="权限名称" prop="permissionName">
<el-input size="small" v-model="editForm.permissionName" auto-complete="off" placeholder="权限名称"></el-input>
</el-form-item>
<el-form-item label="权限CODE" prop="permission">
<el-input size="small" v-model="editForm.permission" auto-complete="off" placeholder="权限CODE"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="closeDialog">取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="submitForm('editForm')">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
permissionList,
ermissionSave,
ermissionDelete,
roleDropDown,
RolePermission
} from '../../api/userMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
nshow: true, //switch开启
fshow: false, //switch关闭
loading: false, //是显示加载
editFormVisible: false, //控制编辑页面显示与隐藏
title: '添加',
editForm: {
permissionId: '',
permissionName: '',
permission: '',
token: localStorage.getItem('logintoken')
},
// rules表单验证
rules: {
permissionName: [
{ required: true, message: '请输入权限名称', trigger: 'blur' }
],
permission: [
{ required: true, message: '请输入权限CODE', trigger: 'blur' }
]
},
formInline: {
page: 1,
limit: 10,
permissionName: '',
permission: '',
roleId: '0',
token: localStorage.getItem('logintoken')
},
// 选择数据
selectdata: [],
userparm: [], //搜索权限
listData: [], //用户数据
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
watch: {},
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
this.getAccsee()
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取数据方法
getdata(parameter) {
this.loading = true
// 模拟数据
let res = {
code: 0,
msg: null,
count: 0,
data: [
{
addUser: null,
editUser: null,
addTime: 1519728609000,
editTime: 1522585700000,
permissionId: 1,
permissionName: '用户-列表',
permission: 'system:User:list',
lay_CHECKED: false,
LAY_CHECKED: false
},
{
addUser: null,
editUser: null,
addTime: 1519728667000,
editTime: 1522585706000,
permissionId: 3,
permissionName: '用户-修改',
permission: 'system:User:save',
lay_CHECKED: false,
LAY_CHECKED: false
},
{
addUser: null,
editUser: null,
addTime: 1519728669000,
editTime: 1522256096000,
permissionId: 4,
permissionName: '用户-删除',
permission: 'system:User:delete',
lay_CHECKED: false,
LAY_CHECKED: false
},
{
addUser: 'root',
editUser: 'root',
addTime: 1520249365000,
editTime: 1522256085000,
permissionId: 5,
permissionName: '系统管理:角色:列表',
permission: 'system:Role:list',
lay_CHECKED: false,
LAY_CHECKED: false
},
{
addUser: 'root',
editUser: 'root',
addTime: 1520249588000,
editTime: 1520249588000,
permissionId: 7,
permissionName: 'system:Role:save',
permission: 'system:Role:save',
lay_CHECKED: false,
LAY_CHECKED: false
},
{
addUser: 'root',
editUser: 'root',
addTime: 1520249588000,
editTime: 1520249588000,
permissionId: 8,
permissionName: 'system:Role:delete',
permission: 'system:Role:delete',
lay_CHECKED: false,
LAY_CHECKED: false
},
{
addUser: 'root',
editUser: 'root',
addTime: 1520251014000,
editTime: 1520251014000,
permissionId: 9,
permissionName: 'system:Variable:列表',
permission: 'system:Variable:list',
lay_CHECKED: false,
LAY_CHECKED: false
},
{
addUser: 'root',
editUser: 'root',
addTime: 1520251014000,
editTime: 1520251014000,
permissionId: 11,
permissionName: 'system:Variable:修改',
permission: 'system:Variable:save',
lay_CHECKED: false,
LAY_CHECKED: false
},
{
addUser: 'root',
editUser: 'root',
addTime: 1520251014000,
editTime: 1520251014000,
permissionId: 12,
permissionName: 'system:Variable:删除',
permission: 'system:Variable:delete',
lay_CHECKED: false,
LAY_CHECKED: false
}
]
}
this.loading = false
this.listData = res.data
// 分页赋值
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// 获取权限列表
// permissionList(parameter)
// .then(res => {
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.listData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
// .catch(err => {
// this.loading = false
// this.$message.error('权限管理列表获取失败,请稍后再试!')
// })
},
// 获取权限
getAccsee() {
roleDropDown()
.then(res => {
if (res.success == false) {
this.$message({
type: 'info',
message: res.msg
})
} else {
this.userparm = res.data
}
})
.catch(err => {
this.$message.error('权限获取失败,请稍后再试!')
})
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
// 搜索事件
search() {
this.getdata(this.formInline)
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
// 深拷贝并赋值
//this.editForm = Object.assign({}, row)
if (row != undefined && row != 'undefined') {
this.title = '修改'
this.editForm.permissionId = row.permissionId
this.editForm.permissionName = row.permissionName
this.editForm.permission = row.permission
} else {
this.title = '添加'
this.editForm.permissionId = ''
this.editForm.permissionName = ''
this.editForm.permission = ''
}
},
// 编辑、增加页面保存方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
ermissionSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '权限管理保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('权限管理保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除权限
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
ermissionDelete(row.permissionId)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '权限管理已删除!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('权限管理删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 选择复选框事件
selectChange(val) {
this.selectdata = val
},
// 配置权限
RolePermission() {
let parms = {
roleId: '',
permissionIds: ''
}
if (this.formInline.roleId == '0') {
this.$message({
type: 'info',
message: '请选择角色'
})
return false
}
parms.roleId = this.formInline.roleId
let len = this.selectdata
let ids = []
if (len != 0) {
for (let i = 0; i < len.length; i++) {
ids.push(len[i].permissionId)
}
}
parms.permissionIds = ids.join(',')
RolePermission(parms)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '配置权限成功!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('配置权限失败,请稍后再试!')
})
},
// 关闭编辑、增加弹出框
closeDialog() {
this.editFormVisible = false
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
-500
View File
@@ -1,500 +0,0 @@
/**
* 系统管理 角色管理
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>角色管理</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-input size="small" v-model="formInline.roleName" placeholder="输入角色名称"></el-input>
</el-form-item>
<el-form-item label="">
<el-input size="small" v-model="formInline.roleNo" placeholder="输入角色代码"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="handleEdit()">添加</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" :data="listData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="selection" width="60">
</el-table-column>
<el-table-column sortable prop="roleName" label="角色名称" width="300">
</el-table-column>
<el-table-column sortable prop="roleNo" label="角色代码" width="300">
</el-table-column>
<el-table-column sortable prop="editTime" label="修改时间" width="300">
<template slot-scope="scope">
<div>{{scope.row.editTime|timestampToTime}}</div>
</template>
</el-table-column>
<el-table-column sortable prop="editUser" label="修改人" width="300">
</el-table-column>
<el-table-column align="center" label="操作" min-width="300">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="deleteUser(scope.$index, scope.row)">删除</el-button>
<el-button size="mini" type="success" @click="menuAccess(scope.$index, scope.row)">菜单权限</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog :title="title" :visible.sync="editFormVisible" width="30%" @click='closeDialog("edit")'>
<el-form label-width="120px" :model="editForm" ref="editForm" :rules="rules">
<el-form-item label="系统编码" prop="systemNo">
<el-input size="small" v-model="editForm.systemNo" auto-complete="off" placeholder="请输入系统编码"></el-input>
</el-form-item>
<el-form-item label="角色名称" prop="roleName">
<el-input size="small" v-model="editForm.roleName" auto-complete="off" placeholder="请输入角色名称"></el-input>
</el-form-item>
<el-form-item label="角色代码" prop="roleNo">
<el-input size="small" v-model="editForm.roleNo" auto-complete="off" placeholder="请输入角色代码"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click='closeDialog("edit")'>取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="submitForm('editForm')">保存</el-button>
</div>
</el-dialog>
<!-- 菜单权限 -->
<el-dialog title="菜单权限" :visible.sync="menuAccessshow" width="30%" @click='closeDialog("perm")'>
<el-tree ref="tree" default-expand-all="" :data="RoleRight" :props="RoleRightProps" :default-checked-keys="checkmenu" node-key="id" show-checkbox>
</el-tree>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click='closeDialog("perm")'>取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="menuPermSave">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
roleList,
roleSave,
roleDelete,
rolePwd,
RoleRightTree,
RoleRightSave
} from '../../api/userMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
nshow: true, //switch开启
fshow: false, //switch关闭
loading: false, //是显示加载
editFormVisible: false, //控制编辑页面显示与隐藏
menuAccessshow: false, //控制数据权限显示与隐藏
title: '添加',
editForm: {
roleId: '',
systemNo: '',
roleNo: '',
roleName: '',
token: localStorage.getItem('logintoken')
},
// rules 表单验证
rules: {
systemNo: [
{ required: true, message: '请输入系统编码', trigger: 'blur' }
],
roleNo: [
{ required: true, message: '请输入角色代码', trigger: 'blur' }
],
roleName: [
{ required: true, message: '请输入角色名称', trigger: 'blur' }
]
},
formInline: {
page: 1,
limit: 10,
varLable: '',
varName: '',
token: localStorage.getItem('logintoken')
},
// 删除
seletedata: {
ids: '',
token: localStorage.getItem('logintoken')
},
userparm: [], //搜索权限
listData: [], //用户数据
// 数据权限
RoleRight: [],
RoleRightProps: {
children: 'children',
label: 'name'
},
// 选中
checkmenu: [],
//参数role
saveroleId: '',
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
watch: {},
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取角色列表
getdata(parameter) {
// 模拟数据
let res = {
code: 0,
msg: null,
count: 6,
data: [
{
addUser: 'root',
editUser: 'root',
addTime: 1519182004000,
editTime: 1520288426000,
roleId: 1,
systemNo: 'pmd',
roleNo: 'Administrator',
roleName: '超级管理员'
},
{
addUser: null,
editUser: null,
addTime: 1521111376000,
editTime: 1520678191000,
roleId: 2,
systemNo: 'order',
roleNo: 'admin',
roleName: '公司管理员'
},
{
addUser: null,
editUser: null,
addTime: 1520678221000,
editTime: 1520678221000,
roleId: 95,
systemNo: 'pm',
roleNo: 'common',
roleName: '普通用户'
},
{
addUser: null,
editUser: null,
addTime: 1526349853000,
editTime: 1526349853000,
roleId: 96,
systemNo: '1',
roleNo: '1',
roleName: '1'
},
{
addUser: null,
editUser: null,
addTime: 1526349942000,
editTime: 1526437443000,
roleId: 97,
systemNo: '2',
roleNo: '2',
roleName: '2'
},
{
addUser: null,
editUser: null,
addTime: 1526652148000,
editTime: 1526652148000,
roleId: 101,
systemNo: 'test',
roleNo: 'demo',
roleName: '演示角色'
}
]
}
this.loading = false
this.listData = res.data
// 分页赋值
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// roleList(parameter)
// .then(res => {
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.listData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
// .catch(err => {
// this.loading = false
// this.$message.error('获取角色列表失败,请稍后再试!')
// })
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
// 搜索事件
search() {
this.getdata(this.formInline)
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
if (row != undefined && row != 'undefined') {
this.title = '修改'
this.editForm.roleId = row.roleId
this.editForm.systemNo = row.systemNo
this.editForm.roleNo = row.roleNo
this.editForm.roleName = row.roleName
} else {
this.title = '添加'
this.editForm.roleId = ''
this.editForm.systemNo = ''
this.editForm.roleNo = ''
this.editForm.roleName = ''
}
},
// 编辑、增加页面保存方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
roleSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '角色保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('角色保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除角色
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
roleDelete(row.roleId)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '角色已删除!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('角色删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 数据权限
menuAccess: function(index, row) {
this.menuAccessshow = true
this.saveroleId = row.roleId
RoleRightTree(row.roleId)
.then(res => {
if (res.data.success) {
this.$message({
type: 'success',
message: '获取权限成功'
})
this.changemenu(res.data.data)
this.RoleRight = this.changeArr(res.data.data)
} else {
this.$message({
type: 'info',
message: res.data.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('获取权限失败,请稍后再试!')
})
},
// 选中菜单
changemenu(arr) {
let change = []
for (let i = 0; i < arr.length; i++) {
if (arr[i].checked) {
change.push(arr[i].id)
}
}
this.checkmenu = change
},
// tree 递归
changeArr(list) {
var temptree = [],
tree = [],
items = []
for (var i in list) {
if (!temptree[list[i].id]) {
var trow = {
id: list[i].id,
pId: list[i].pId,
name: list[i].name,
open: list[i].open,
checked: list[i].checked,
children: []
}
temptree[list[i].id] = trow
items.push(trow)
}
if (list[i].uid > 0) {
temptree[list[i].id]['children'].push({
id: list[i].id,
pId: list[i].pId,
name: list[i].name,
open: list[i].open,
checked: list[i].checked,
children: []
})
}
}
for (var j in items) {
if (temptree[items[j].pId]) {
temptree[items[j].pId]['children'].push(temptree[items[j].id])
} else {
tree.push(temptree[items[j].id])
}
}
temptree = null
items = null
return tree
},
// 菜单权限-保存
menuPermSave() {
let parm = {
roleId: this.saveroleId,
moduleIds: ''
}
let node = this.$refs.tree.getCheckedNodes()
let moduleIds = []
if (node.length != 0) {
for (let i = 0; i < node.length; i++) {
moduleIds.push(node[i].id)
}
parm.moduleIds = JSON.stringify(moduleIds)
}
RoleRightSave(parm)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '权限保存成功'
})
this.menuAccessshow = false
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('权限保存失败,请稍后再试!')
})
},
// 关闭编辑、增加弹出框
closeDialog(dialog) {
if (dialog == 'edit') {
this.editFormVisible = false
} else if (dialog == 'perm') {
this.menuAccessshow = false
}
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
-367
View File
@@ -1,367 +0,0 @@
/**
* 系统管理 系统环境变量
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>系统环境变量</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-input size="small" v-model="formInline.varLable" placeholder="输入变量描述"></el-input>
</el-form-item>
<el-form-item label="">
<el-input size="small" v-model="formInline.varName" placeholder="输入变量名称"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="handleEdit()">添加</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" :data="listData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="selection" width="60">
</el-table-column>
<el-table-column sortable prop="varLable" label="变量描述" width="200">
</el-table-column>
<el-table-column sortable prop="varName" label="变量名称" width="200">
</el-table-column>
<el-table-column sortable prop="varValue" label="变量名称" width="300">
</el-table-column>
<el-table-column sortable prop="editTime" label="修改时间" width="200">
<template slot-scope="scope">
<div>{{scope.row.editTime|timestampToTime}}</div>
</template>
</el-table-column>
<el-table-column sortable prop="editUser" label="修改人" width="200">
</el-table-column>
<el-table-column align="center" label="操作" min-width="300">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="deleteUser(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog title="修改" :visible.sync="editFormVisible" width="30%" @click="closeDialog">
<el-form label-width="120px" :model="editForm" :rules="rules" ref="editForm">
<el-form-item label="变量描述" prop="varLable">
<el-input size="small" v-model="editForm.varLable" auto-complete="off" placeholder="变量描述"></el-input>
</el-form-item>
<el-form-item label="变量名称" prop="varName">
<el-input size="small" v-model="editForm.varName" auto-complete="off" placeholder="变量名称"></el-input>
</el-form-item>
<el-form-item label="变量名称" prop="varValue">
<el-input size="small" v-model="editForm.varValue" auto-complete="off" placeholder="变量名称"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="closeDialog">取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="submitForm('editForm')">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { variableList, variableSave, variableDelete } from '../../api/userMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
nshow: true, //switch开启
fshow: false, //switch关闭
loading: false, //是显示加载
editFormVisible: false, //控制编辑页面显示与隐藏
title: '添加',
editForm: {
varId: '',
varLable: '',
varName: '',
varValue: '',
token: localStorage.getItem('logintoken')
},
// rules表单验证
rules: {
varLable: [
{ required: true, message: '请输入变量描述', trigger: 'blur' }
],
varName: [
{ required: true, message: '请输入变量名称', trigger: 'blur' }
],
varValue: [
{ required: true, message: '请输入变量名称', trigger: 'blur' }
]
},
formInline: {
page: 1,
limit: 10,
varLable: '',
varName: '',
token: localStorage.getItem('logintoken')
},
// 删除
seletedata: {
ids: '',
token: localStorage.getItem('logintoken')
},
userparm: [], //搜索权限
listData: [], //用户数据
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
watch: {},
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取数据方法
getdata(parameter) {
this.loading = true
// 模拟数据
let res = {
code: 0,
msg: null,
count: 6,
data: [
{
addUser: 'root',
editUser: 'root',
addTime: 1519385529000,
editTime: 1520619747000,
varId: 190,
deptId: 1,
varLable: '支付访问域名',
varName: 'domainName',
varValue: 'http://127.0.0.1:8080/iot-service-pay'
},
{
addUser: 'root',
editUser: 'root',
addTime: 1519451541000,
editTime: 1519451547000,
varId: 191,
deptId: 1,
varLable: '商品图片地址',
varName: 'productImgURL',
varValue: 'http://ymwlw.com/pic'
},
{
addUser: 'root',
editUser: 'root',
addTime: 1519452658000,
editTime: 1519452661000,
varId: 192,
deptId: 1,
varLable: '手机支付广告地址',
varName: 'groupDomain',
varValue: 'http://ymwlwl.com'
},
{
addUser: null,
editUser: null,
addTime: 1519879624000,
editTime: 1519879628000,
varId: 193,
deptId: 1,
varLable: '下单接口测试模式',
varName: 'envType',
varValue: 'false'
},
{
addUser: null,
editUser: null,
addTime: 1526374014000,
editTime: 1526374031000,
varId: 198,
deptId: null,
varLable: 'sgh',
varName: 'jhjj',
varValue: 'jhjhgs'
},
{
addUser: null,
editUser: null,
addTime: 1526453243000,
editTime: 1526453243000,
varId: 199,
deptId: null,
varLable: 'v',
varName: 'v',
varValue: 'v'
}
]
}
this.loading = false
this.listData = res.data
// 分页赋值
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// variableList(parameter)
// .then(res => {
// console.log(JSON.stringify(res))
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.listData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
// .catch(err => {
// this.loading = false
// this.$message.error('菜单加载失败,请稍后再试!')
// })
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
// 搜索事件
search() {
this.getdata(this.formInline)
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
if (row != undefined && row != 'undefined') {
this.title = '修改'
this.editForm.varId = row.varId
this.editForm.varLable = row.varLable
this.editForm.varName = row.varName
this.editForm.varValue = row.varValue
} else {
this.title = '添加'
this.editForm.varId = ''
this.editForm.varLable = ''
this.editForm.varName = ''
this.editForm.varValue = ''
}
},
// 编辑、增加页面保存方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
variableSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '系统环境变量保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('系统环境变量保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 删除权限
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
variableDelete(row.varId)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '系统环境变量已删除'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('系统环境变量删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 关闭编辑、增加弹出框
closeDialog() {
this.editFormVisible = false
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
-907
View File
@@ -1,907 +0,0 @@
/**
* 系统管理 用户管理
*/
<template>
<div>
<!-- 面包屑导航 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>用户管理</el-breadcrumb-item>
</el-breadcrumb>
<!-- 搜索筛选 -->
<el-form :inline="true" :model="formInline" class="user-search">
<el-form-item label="搜索:">
<el-select size="small" v-model="formInline.isLock" placeholder="请选择">
<el-option label="全部" value=""></el-option>
<el-option label="正常" value="N"></el-option>
<el-option label="已锁定" value="Y"></el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-input size="small" v-model="formInline.userName" placeholder="输入用户名"></el-input>
</el-form-item>
<el-form-item label="">
<el-input size="small" v-model="formInline.userMobile" placeholder="输入手机号"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="handleEdit()">添加</el-button>
<el-button size="small" type="primary" @click="handleunit()">部门设置</el-button>
</el-form-item>
</el-form>
<!--列表-->
<el-table size="small" @selection-change="selectChange" :data="userData" highlight-current-row v-loading="loading" border element-loading-text="拼命加载中" style="width: 100%;">
<el-table-column align="center" type="selection" width="50">
</el-table-column>
<el-table-column align="center" sortable prop="deptName" label="公司" width="120">
</el-table-column>
<el-table-column align="center" sortable prop="userName" label="用户名" width="120">
</el-table-column>
<el-table-column align="center" sortable prop="userRealName" label="姓名" width="120">
</el-table-column>
<el-table-column align="center" sortable prop="userMobile" label="手机号" width="120">
</el-table-column>
<el-table-column align="center" sortable prop="userSex" label="性别" min-width="50">
</el-table-column>
<el-table-column align="center" sortable prop="userEmail" label="邮件" min-width="120">
</el-table-column>
<el-table-column align="center" sortable prop="editTime" label="修改时间" min-width="120">
<template slot-scope="scope">
<div>{{scope.row.editTime|timestampToTime}}</div>
</template>
</el-table-column>
<el-table-column align="center" sortable prop="isLock" label="状态" min-width="50">
<template slot-scope="scope">
<el-switch v-model="scope.row.isLock=='N'?nshow:fshow" active-color="#13ce66" inactive-color="#ff4949" @change="editType(scope.$index, scope.row)">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" min-width="300">
<template slot-scope="scope">
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="deleteUser(scope.$index, scope.row)">删除</el-button>
<el-button size="mini" type="success" @click="resetpwd(scope.$index, scope.row)">重置密码</el-button>
<el-button size="mini" type="success" @click="dataAccess(scope.$index, scope.row)">数据权限</el-button>
<el-button size="mini" type="success" @click="offlineUser(scope.$index, scope.row)">下线</el-button>
<el-button size="mini" type="success" @click="refreshCache(scope.$index, scope.row)">刷新缓存</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<Pagination v-bind:child-msg="pageparm" @callFather="callFather"></Pagination>
<!-- 编辑界面 -->
<el-dialog :title="title" :visible.sync="editFormVisible" width="30%" @click='closeDialog("edit")'>
<el-form label-width="80px" ref="editForm" :model="editForm" :rules="rules">
<el-form-item label="用户名" prop="userName">
<el-input size="small" v-model="editForm.userName" auto-complete="off" placeholder="请输入用户名"></el-input>
</el-form-item>
<el-form-item label="姓名" prop="userRealName">
<el-input size="small" v-model="editForm.userRealName" auto-complete="off" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item label="角色" prop="roleId">
<el-select size="small" v-model="editForm.roleId" placeholder="请选择" class="userRole">
<el-option label="公司管理员" value="1"></el-option>
<el-option label="普通用户" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="手机号" prop="userMobile">
<el-input size="small" v-model="editForm.userMobile" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item label="邮件" prop="userEmail">
<el-input size="small" v-model="editForm.userEmail" placeholder="请输入邮箱地址"></el-input>
</el-form-item>
<el-form-item label="性别" prop="userSex">
<el-radio v-model="editForm.userSex" label="男">男</el-radio>
<el-radio v-model="editForm.userSex" label="女">女</el-radio>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click='closeDialog("edit")'>取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="submitForm('editForm')">保存</el-button>
</div>
</el-dialog>
<!-- 数据权限 -->
<el-dialog title="数据权限" :visible.sync="dataAccessshow" width="30%" @click='closeDialog("perm")'>
<el-tree ref="tree" default-expand-all="" :data="UserDept" :props="defaultProps" :default-checked-keys="checkmenu" node-key="id" show-checkbox>
</el-tree>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click='closeDialog("perm")'>取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="menuPermSave">保存</el-button>
</div>
</el-dialog>
<!-- 所属单位 -->
<el-dialog title="所属单位" :visible.sync="unitAccessshow" width="30%" @click='closeDialog("unit")'>
<el-tree ref="tree" default-expand-all="" :data="UserDept" :props="defaultProps" @check-change="handleClick" :default-checked-keys="checkmenu" node-key="id" show-checkbox check-strictly>
</el-tree>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click='closeDialog("unit")'>取消</el-button>
<el-button size="small" type="primary" :loading="loading" class="title" @click="unitPermSave">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
// 导入请求方法
import {
userList,
userSave,
userDelete,
userPwd,
userExpireToken,
userFlashCache,
userLock,
UserDeptTree,
UserDeptSave,
UserDeptdeptTree,
UserChangeDept
} from '../../api/userMG'
import Pagination from '../../components/Pagination'
export default {
data() {
return {
nshow: true, //switch开启
fshow: false, //switch关闭
loading: false, //是显示加载
title: '添加用户',
editFormVisible: false, //控制编辑页面显示与隐藏
dataAccessshow: false, //控制数据权限显示与隐藏
unitAccessshow: false, //控制所属单位隐藏与显示
// 编辑与添加
editForm: {
userId: '',
userName: '',
userRealName: '',
roleId: '',
userMobile: '',
userEmail: '',
userSex: '',
token: localStorage.getItem('logintoken')
},
// 部门参数
unitparm: {
userIds: '',
deptId: '',
deptName: ''
},
// 选择数据
selectdata: [],
// rules表单验证
rules: {
userName: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
],
userRealName: [
{ required: true, message: '请输入姓名', trigger: 'blur' }
],
roleId: [{ required: true, message: '请选择角色', trigger: 'blur' }],
userMobile: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{
pattern: /^1(3\d|47|5((?!4)\d)|7(0|1|[6-8])|8\d)\d{8,8}$/,
required: true,
message: '请输入正确的手机号',
trigger: 'blur'
}
],
userEmail: [
{ required: true, message: '请输入邮箱', trigger: 'blur' },
{
pattern: /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
required: true,
message: '请输入正确的邮箱',
trigger: 'blur'
}
],
userSex: [{ required: true, message: '请选择性别', trigger: 'blur' }]
},
// 删除用户
seletedata: {
ids: '',
token: localStorage.getItem('logintoken')
},
// 重置密码
resetpsd: {
userId: '',
token: localStorage.getItem('logintoken')
},
// 用户下线
offline: {
token: localStorage.getItem('logintoken')
},
// 请求数据参数
formInline: {
page: 1,
limit: 10,
deptId: '',
userName: '',
userMobile: '',
isLock: ''
},
//用户数据
userData: [],
// 数据权限
UserDept: [],
defaultProps: {
children: 'children',
label: 'name'
},
// 选中
checkmenu: [],
//参数role
saveroleId: '',
// 分页参数
pageparm: {
currentPage: 1,
pageSize: 10,
total: 10
}
}
},
// 注册组件
components: {
Pagination
},
/**
* 数据发生改变
*/
watch: {},
/**
* 创建完毕
*/
created() {
this.getdata(this.formInline)
},
/**
* 里面的方法只有被调用才会执行
*/
methods: {
// 获取数据方法
getdata(parameter) {
this.loading = true
// 模拟数据开始
let res = {
code: 0,
msg: null,
count: 12,
data: [
{
addUser: '1',
editUser: '1',
addTime: null,
editTime: 1527411068000,
userId: 1,
systemNo: 'pmd',
userName: 'root',
userPassword: 'e10adc3949ba59abbe56e057f20f883e',
userRealName: '超级管理员',
userSex: '女',
userMobile: '138123456789',
userEmail: '111@qq.com',
isLock: 'N',
deptId: 1,
deptName: 'xxxx',
roleId: 1
},
{
addUser: '1',
editUser: '1',
addTime: null,
editTime: 1527410579000,
userId: 3,
systemNo: 'mc',
userName: 'zengzhuo',
userPassword: 'e10adc3949ba59abbe56e057f20f883e',
userRealName: '系统管理员',
userSex: 'M',
userMobile: '18616988966',
userEmail: '222@qq.com',
isLock: 'N',
deptId: 2,
deptName: 'xxxx',
roleId: 101
},
{
addUser: '1',
editUser: '4',
addTime: null,
editTime: 1527411586000,
userId: 4,
systemNo: 'ec',
userName: 'admin',
userPassword: '59ba8b7dda9ff79186311a5a9fa155ca',
userRealName: '超级管理员',
userSex: '女',
userMobile: '138123456789',
userEmail: 'huangxuekun@founder.com',
isLock: 'N',
deptId: 2,
deptName: 'xxxx',
roleId: 3
},
{
addUser: null,
editUser: null,
addTime: 1526275128000,
editTime: 1526284402000,
userId: 28,
systemNo: null,
userName: 'eee111',
userPassword: 'e10adc3949ba59abbe56e057f20f883e',
userRealName: '123111',
userSex: '男',
userMobile: '12354342345',
userEmail: '111232@qq.com',
isLock: 'N',
deptId: 4,
deptName: 'zxxxxx',
roleId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526284533000,
editTime: 1526284533000,
userId: 37,
systemNo: null,
userName: 'ces',
userPassword: 'e10adc3949ba59abbe56e057f20f883e',
userRealName: 'sesfg',
userSex: '男',
userMobile: '12312312312',
userEmail: '122111111',
isLock: 'N',
deptId: 1,
deptName: 'xxxx',
roleId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526285228000,
editTime: 1526285228000,
userId: 43,
systemNo: null,
userName: '22',
userPassword: 'e10adc3949ba59abbe56e057f20f883e',
userRealName: '22',
userSex: '男',
userMobile: '222',
userEmail: '222',
isLock: 'N',
deptId: 1,
deptName: 'xxxx',
roleId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526448593000,
editTime: 1526448593000,
userId: 58,
systemNo: null,
userName: '1',
userPassword: 'e10adc3949ba59abbe56e057f20f883e',
userRealName: '1',
userSex: '女',
userMobile: '13607118810',
userEmail: '1@qq.com',
isLock: 'N',
deptId: 1,
deptName: 'xxxx',
roleId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526452698000,
editTime: 1526520341000,
userId: 60,
systemNo: null,
userName: '222222222',
userPassword: 'e10adc3949ba59abbe56e057f20f883e',
userRealName: '222222222222',
userSex: '男',
userMobile: '13607118810',
userEmail: '111@qq.com',
isLock: 'N',
deptId: 1,
deptName: 'xxxx',
roleId: 1
},
{
addUser: null,
editUser: null,
addTime: 1526452731000,
editTime: 1526452731000,
userId: 61,
systemNo: null,
userName: '33333333333333',
userPassword: 'e10adc3949ba59abbe56e057f20f883e',
userRealName: '4444444444444444444',
userSex: '女',
userMobile: '13607118810',
userEmail: 'qqq@qq.com',
isLock: 'N',
deptId: 1,
deptName: 'xxxx',
roleId: 2
},
{
addUser: null,
editUser: null,
addTime: 1526452756000,
editTime: 1527128981000,
userId: 62,
systemNo: null,
userName: '211111111',
userPassword: 'e10adc3949ba59abbe56e057f20f883e',
userRealName: '21111111111',
userSex: '男',
userMobile: '13601478451',
userEmail: '222222@qq.com',
isLock: 'N',
deptId: 17,
deptName: 'v',
roleId: 2
}
]
}
this.loading = false
this.userData = res.data
// 分页赋值
this.pageparm.currentPage = this.formInline.page
this.pageparm.pageSize = this.formInline.limit
this.pageparm.total = res.count
// 模拟数据结束
/***
* 调用接口,注释上面模拟数据 取消下面注释
*/
// 获取用户列表
// userList(parameter).then(res => {
// this.loading = false
// if (res.success == false) {
// this.$message({
// type: 'info',
// message: res.msg
// })
// } else {
// this.userData = res.data
// // 分页赋值
// this.pageparm.currentPage = this.formInline.page
// this.pageparm.pageSize = this.formInline.limit
// this.pageparm.total = res.count
// }
// })
},
// 分页插件事件
callFather(parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
//搜索事件
search() {
this.getdata(this.formInline)
},
// 修改type
editType: function(index, row) {
this.loading = true
let parm = {
lock: '',
userId: '',
token: localStorage.getItem('logintoken')
}
parm.userId = row.userId
let lock = row.isLock
if (lock == 'N') {
parm.lock = 'Y'
} else {
parm.lock = 'N'
}
// 修改状态
userLock(parm).then(res => {
this.loading = false
if (res.success == false) {
this.$message({
type: 'info',
message: res.msg
})
} else {
this.$message({
type: 'success',
message: '状态修改成功'
})
this.getdata(this.formInline)
}
})
},
//显示编辑界面
handleEdit: function(index, row) {
this.editFormVisible = true
if (row != undefined && row != 'undefined') {
this.title = '修改用户'
this.editForm.userId = row.userId
this.editForm.userName = row.userName
this.editForm.userRealName = row.userRealName
this.editForm.roleId = row.roleId
this.editForm.userMobile = row.userMobile
this.editForm.userEmail = row.userEmail
this.editForm.userSex = row.userSex
} else {
this.title = '添加用户'
this.editForm.userId = ''
this.editForm.userName = ''
this.editForm.userRealName = ''
this.editForm.roleId = ''
this.editForm.userMobile = ''
this.editForm.userEmail = ''
this.editForm.userSex = ''
}
},
// 编辑、添加提交方法
submitForm(editData) {
this.$refs[editData].validate(valid => {
if (valid) {
// 请求方法
userSave(this.editForm)
.then(res => {
this.editFormVisible = false
this.loading = false
if (res.success) {
this.getdata(this.formInline)
this.$message({
type: 'success',
message: '数据保存成功!'
})
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.editFormVisible = false
this.loading = false
this.$message.error('保存失败,请稍后再试!')
})
} else {
return false
}
})
},
// 显示部门设置
handleunit: function(index, row) {
this.unitAccessshow = true
let parms = 0
UserDeptdeptTree(parms)
.then(res => {
if (res.data.success) {
this.UserDept = this.changeArr(res.data.data)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('配置权限失败,请稍后再试!')
})
},
handleClick(data, checked, node) {
if (checked) {
this.$refs.tree.setCheckedNodes([])
this.$refs.tree.setCheckedNodes([data])
this.unitparm.deptId = data.id
this.unitparm.deptName = data.name
//交叉点击节点
} else {
}
},
// 保存部门
unitPermSave() {
let len = this.selectdata
let ids = []
if (len != 0) {
for (let i = 0; i < len.length; i++) {
ids.push(len[i].userId)
}
}
this.unitparm.userIds = ids.join(',')
UserChangeDept(this.unitparm)
.then(res => {
this.unitAccessshow = false
if (res.success) {
this.$message({
type: 'success',
message: '部门设置成功!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('部门设置失败,请稍后再试!')
})
},
// 选择复选框事件
selectChange(val) {
this.selectdata = val
},
// 关闭编辑、增加弹出框
closeDialog(dialog) {
if (dialog == 'edit') {
this.editFormVisible = false
} else if (dialog == 'perm') {
this.dataAccessshow = false
} else if (dialog == 'unit') {
this.unitAccessshow = false
}
},
// 删除用户
deleteUser(index, row) {
this.$confirm('确定要删除吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
// 删除
userDelete(row.id)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '数据已删除!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('数据删除失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除!'
})
})
},
// 重置密码
resetpwd(index, row) {
this.resetpsd.userId = row.userId
this.$confirm('确定要重置密码吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
userPwd(this.resetpsd)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '重置密码成功!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('重置密码失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '取消重置密码!'
})
})
},
// 数据权限
dataAccess: function(index, row) {
this.dataAccessshow = true
this.saveroleId = row.userId
UserDeptTree(row.userId)
.then(res => {
if (res.data.success) {
this.checkmenu = this.changemenu(res.data.data)
this.UserDept = this.changeArr(res.data.data)
} else {
this.$message({
type: 'info',
message: res.data.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('获取权限失败,请稍后再试!')
})
},
//数据格式化
changeArr(data) {
var pos = {}
var tree = []
var i = 0
while (data.length != 0) {
if (data[i].pId == 0) {
tree.push({
id: data[i].id,
name: data[i].name,
pId: data[i].pId,
open: data[i].open,
checked: data[i].checked,
children: []
})
pos[data[i].id] = [tree.length - 1]
data.splice(i, 1)
i--
} else {
var posArr = pos[data[i].pId]
if (posArr != undefined) {
var obj = tree[posArr[0]]
for (var j = 1; j < posArr.length; j++) {
obj = obj.children[posArr[j]]
}
obj.children.push({
id: data[i].id,
name: data[i].name,
pId: data[i].pId,
open: data[i].open,
checked: data[i].checked,
children: []
})
pos[data[i].id] = posArr.concat([obj.children.length - 1])
data.splice(i, 1)
i--
}
}
i++
if (i > data.length - 1) {
i = 0
}
}
return tree
},
// 选中菜单
changemenu(arr) {
let change = []
for (let i = 0; i < arr.length; i++) {
if (arr[i].checked) {
change.push(arr[i].id)
}
}
return change
},
// 菜单权限-保存
menuPermSave() {
let parm = {
userId: this.saveroleId,
deptIds: ''
}
let node = this.$refs.tree.getCheckedNodes()
let moduleIds = []
if (node.length != 0) {
for (let i = 0; i < node.length; i++) {
moduleIds.push(node[i].id)
}
parm.deptIds = JSON.stringify(moduleIds)
}
UserDeptSave(parm)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '权限保存成功'
})
this.dataAccessshow = false
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('权限保存失败,请稍后再试!')
})
},
// 下线用户
offlineUser(index, row) {
this.$confirm('确定要让' + row.userName + '用户下线吗?', '信息', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
userExpireToken(row.userName)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '用户' + row.userName + '强制下线成功!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('用户下线失败,请稍后再试!')
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
},
// 刷新缓存
refreshCache(index, row) {
userFlashCache(row.userName)
.then(res => {
if (res.success) {
this.$message({
type: 'success',
message: '刷新成功!'
})
this.getdata(this.formInline)
} else {
this.$message({
type: 'info',
message: res.msg
})
}
})
.catch(err => {
this.loading = false
this.$message.error('刷新失败,请稍后再试!')
})
}
}
}
</script>
<style scoped>
.user-search {
margin-top: 20px;
}
.userRole {
width: 100%;
}
</style>
-22
View File
@@ -1,22 +0,0 @@
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
// 登录验证
export default new Vuex.Store({
state: {
user: false
},
mutations: {
// 登录
login(state, user) {
state.user = user;
localStorage.setItem("userInfo", user);
},
// 退出
logout(state, user) {
state.user = "";
localStorage.setItem("userInfo", "");
}
}
})