69 changed files with 1 additions and 11974 deletions
@ -1,91 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
import {getDownLoadUrl } from '@/utils/axios' |
|
||||
import { removeToken, getToken } from '@/utils/auth' |
|
||||
|
|
||||
// 资方信息表
|
|
||||
// 条件查询
|
|
||||
export function basefinbankListPage(data) { |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/listPage', |
|
||||
data, |
|
||||
method: 'post', |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 条件查询
|
|
||||
// export function listPage(data) {
|
|
||||
// return request({
|
|
||||
// url: '/base/v1/basefinbank/listPage',
|
|
||||
// method: 'post',
|
|
||||
// data: data,
|
|
||||
// headers: { 'Content-Type': 'application/json' }
|
|
||||
// })
|
|
||||
// }
|
|
||||
// 添加
|
|
||||
export function basefinbankSaveList(data) { |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/save', |
|
||||
data, |
|
||||
method: 'post', |
|
||||
// data: data,
|
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 修改
|
|
||||
export function basefinbankUpdate(data) { |
|
||||
// console.log('data44', data)
|
|
||||
return request({ |
|
||||
url: `/base/v1/basefinbank/update/${data.sid}`, |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 删除/base/v1/basefinbank/delete/{sid}
|
|
||||
// export function deleteBySids(data) {
|
|
||||
// return request({
|
|
||||
// url: '/base/v1/basefinbank/delete/deleteBySid?sid=' + data,
|
|
||||
// method: 'DELETE',
|
|
||||
// data: qs.stringify(data)
|
|
||||
// })
|
|
||||
// }
|
|
||||
// 批量删除/base/v1/basefinbank/deleteBySids
|
|
||||
export function basefinbankDeleteBySids(data) { |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/deleteBySids?sids=' + data, |
|
||||
method: 'DELETE', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 详情以及修改回 获取一条记录显/base/v1/basefinbank/details/{sid}
|
|
||||
export function basefinbankDetails(data) { |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/details/' + data, |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
// 根据资方名称模糊搜索资方名称下拉框
|
|
||||
export function basefinbankDnamesDown(data) { |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/namesDown', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
// 导出表格
|
|
||||
export function basefinbankExportExcel(data) { |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/exportExcel?sids='+data, |
|
||||
method: 'get', |
|
||||
responseType: 'blob' ,// 表明返回服务器返回的数据类型
|
|
||||
data: qs.stringify(data), |
|
||||
}) |
|
||||
} |
|
@ -1,42 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs'; |
|
||||
class staffOrg { |
|
||||
staffBingingList(data) { // 人员绑定审核列表
|
|
||||
return request({ |
|
||||
url: '/jlcyry/staffOrg/staffBingingList', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json', |
|
||||
'token' : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiIxOCIsImlzcyI6IldCSyIsImV4cCI6MTYwMjg5ODM0NH0.VBtcZcQm_1eLqThHXPM6YZrIHQFy3_LJtBkEONgcoos" |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
staffOrgBingingDetails(data) { //人员绑定列表点击审核的初始化页面数据
|
|
||||
return request({ |
|
||||
url: '/jlcyry/staffOrg/staffOrgBingingDetails/'+ data.userName, |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
verify(data) { //人员绑定审核
|
|
||||
return request({ |
|
||||
url: '/jlcyry/staffOrg/verifyStaffOrg', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
setUpDepartment(data) { //人员绑定部门
|
|
||||
return request({ |
|
||||
url: '/system/v1/departmentStaffs/setUpDepartment', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
export default new staffOrg() |
|
@ -1,60 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs'; |
|
||||
// 获取机构的单位类别
|
|
||||
export function getDwType(data) { |
|
||||
return request({ |
|
||||
url: '/system/dictCommon/getDwType', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
//获取机构的人员类别
|
|
||||
export function getRylb(data) { |
|
||||
return request({ |
|
||||
url: '/system/dictCommon/getRylb', |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//获取验证码(注册)
|
|
||||
export function getVerificationCode(data) { |
|
||||
return request({ |
|
||||
url: '/system/organization/getVerificationCode', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
//获取机构信息列表
|
|
||||
export function verifyList(data) { |
|
||||
return request({ |
|
||||
url: '/system/organization/verifyList', |
|
||||
method: 'post', |
|
||||
data: qs.stringify(data), |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//机构信息保存
|
|
||||
export function saveOrg(data) { |
|
||||
return request({ |
|
||||
url: '/system/organization/save', |
|
||||
method: 'post', |
|
||||
data: qs.stringify(data), |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//入职单位下拉框
|
|
||||
export function inductionUnitList(data) { |
|
||||
return request({ |
|
||||
url: '/system/organization/inductionUnitList', |
|
||||
method: 'post', |
|
||||
data: qs.stringify(data), |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function download(data) { // 下载授权证书
|
|
||||
return request({ |
|
||||
url: 'system/organization/download', |
|
||||
method: 'get', |
|
||||
}) |
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs'; |
|
||||
class organization{ |
|
||||
inductionUnitList(data) { // 绑定单位 入职单位下拉框
|
|
||||
return request({ |
|
||||
url: '/system/organization/inductionUnitList', |
|
||||
method: 'post', |
|
||||
data: qs.stringify(data), |
|
||||
}) |
|
||||
} |
|
||||
save(data) { // 人员机构关系保存
|
|
||||
return request({ |
|
||||
url: '/jlcyry/staffOrg/save', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
export default new organization() |
|
@ -1,138 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
// 用户列表
|
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
export function userList(data){ |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/listPage', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 根据sid查询一条信息
|
|
||||
export function userSingle(data){ |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/fetchSid/' +data.sid, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 新增
|
|
||||
export function userAdd(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuser/save', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 更新
|
|
||||
export function userUpdata(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuser/update/' +data.sid, |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 删除
|
|
||||
export function delUser(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuser/delBySid/' +data.sid, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 初始化密码
|
|
||||
export function initPwd(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuser/initPwd/' +data.sid, |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 单条用户的角色列表
|
|
||||
export function setRole(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysrole/listAllByUserSid/' +data.sid, |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 角色列表
|
|
||||
export function saveOrgRole(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuserrole/update', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 查询角色列表
|
|
||||
export function roleList(data){ |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinpolicy/listAll', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 查询部门列表
|
|
||||
export function orgList(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysorganization/list', |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 查询岗位列表
|
|
||||
export function postList(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/syspost/fetchByOrgSid/'+data.sid, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 获取验证码
|
|
||||
export function getCode(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuser/sendMessageCode/'+data.phone, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
@ -1,32 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
//获取单位级别
|
|
||||
export function getDwJb(data) { |
|
||||
return request({ |
|
||||
url: '/system/dictCommon/getDwJb', |
|
||||
method: 'GET', |
|
||||
}) |
|
||||
} |
|
||||
// 获取机构单位类别
|
|
||||
export function getDwType(data) { |
|
||||
return request({ |
|
||||
url: '/system/dictCommon/getDwType', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
//获取机构人员类别
|
|
||||
export function getRylb(data) { |
|
||||
return request({ |
|
||||
url: '/system/dictCommon/getRylb', |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 根据Type值获取数据对象
|
|
||||
export function getDicts(typeCode) { |
|
||||
return request({ |
|
||||
url: '/system/dictCommon/dicts/'+typeCode, |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
@ -1,120 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs'; |
|
||||
|
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
//获取菜单 分页列表
|
|
||||
export function pageList(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysorganization/listPage', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 查询左侧部门列表
|
|
||||
export function orgList(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysorganization/list', |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 编辑部门信息
|
|
||||
export function postOrgtree(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysorganization/update/' +data.sid, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 获取 机构分页列表
|
|
||||
export function putOrgtree(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysorganization/update/' +data.sid, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens} |
|
||||
}) |
|
||||
} |
|
||||
// 新增部门信息
|
|
||||
export function addOrgTree(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysorganization/save', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 树 节点名称 删除
|
|
||||
export function delOrgtree(data) { |
|
||||
return request({ |
|
||||
url: `/portal/v1/sysorganization/delBySid/`+data.sid, |
|
||||
method: 'get', |
|
||||
data: qs.stringify(data), |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
// 获取 机构树形
|
|
||||
export function getOrgTree(data) { |
|
||||
return request({ |
|
||||
url: `/system/v1/departments/departmentTreeList/`+ data.organizationSid, |
|
||||
method: 'GET', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
//// 添加 机构树形节点
|
|
||||
//export function addOrgTree(data) {
|
|
||||
//return request({
|
|
||||
// url: `/system/v1/departments`,
|
|
||||
// method: 'post',
|
|
||||
// data: data,
|
|
||||
// headers: {'Content-Type': 'application/json'}
|
|
||||
//})
|
|
||||
//}
|
|
||||
|
|
||||
// 获取 机构分页列表
|
|
||||
export function getPagelist(data) { |
|
||||
return request({ |
|
||||
url: `/system/v1/departments/pagelist`, |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
// 查看二维码
|
|
||||
export function getQrCode(data) { |
|
||||
return request({ |
|
||||
url: `/system/v1/departments/getQrCode/`+data.sid, |
|
||||
method: 'POST', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
@ -1,52 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
|
|
||||
//获取字典子集 分页列表
|
|
||||
export function dictCommonList(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/dictcommons/pageList', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//保存 字典子级
|
|
||||
export function savedictCommon(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/dictcommons/save', |
|
||||
method: 'POST', |
|
||||
data: qs.stringify(data), |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//根据sid 获取单个菜单 信息
|
|
||||
export function getRoleInfo(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/menus/' + data.sid, |
|
||||
method: 'GET', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//根据sid 修改 数据字典
|
|
||||
export function putdictCommon(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/dictcommons/update/' + data.sid, |
|
||||
method: 'POST', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//根据sid 删除菜单 信息
|
|
||||
export function deldictCommon(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/dictcommons/delete/' + data.sid, |
|
||||
method: 'DELETE', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
@ -1,72 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
|
|
||||
//获取菜单 分页列表
|
|
||||
export function pageList(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/dicttypes/pageList', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
//根据sid 修改
|
|
||||
export function putDictType(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/dicttypes/update/' + data.sid, |
|
||||
method: 'POST', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
////获取菜单 分页列表
|
|
||||
//export function dictTypeList(data) {
|
|
||||
//return request({
|
|
||||
// url: '/system/dicttype/pageList',
|
|
||||
// method: 'post',
|
|
||||
// data: data,
|
|
||||
// headers: {'Content-Type': 'application/json'}
|
|
||||
//})
|
|
||||
//}
|
|
||||
|
|
||||
//保存 角色信息
|
|
||||
export function saveDictType(data) { |
|
||||
return request({ |
|
||||
url: '/system/dicttype/save', |
|
||||
method: 'POST', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//根据sid 获取单个菜单 信息
|
|
||||
export function getRoleInfo(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/menus/' + data.sid, |
|
||||
method: 'GET', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
//根据sid 删除菜单 信息
|
|
||||
export function delDictType(data) { |
|
||||
return request({ |
|
||||
url: '/system/dicttype/delete/' + data.sid, |
|
||||
method: 'DELETE', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
@ -1,84 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
//获取菜单 分页列表
|
|
||||
export function pageList(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysfunction/listAllVoForSource', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//新增
|
|
||||
export function savePost(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysfunction/save', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//模块名称
|
|
||||
export function sourceList(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/syssource/listAll', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 删除
|
|
||||
export function delOrgroles(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysfunction/delBySids/'+ data.sid, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 修改
|
|
||||
export function getSingleData(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysfunction/fetchBySid/'+data.id, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
export function putOrgroles(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysfunction/update/' +data.sid, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 功能是否可用状态
|
|
||||
export function IsEnable(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysfunction/updateIsEnable/' +data.sid, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
@ -1,16 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
//获取菜单 分页列表
|
|
||||
export function logPageList(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/systemlog/listPage', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
@ -1,115 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
|
||||
|
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
//获取菜单 分页列表
|
|
||||
export function pageList(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysmenu/listAllVoForSource', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 新增保存 菜单信息
|
|
||||
export function saveMenusInfo(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysmenu/save', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
// 修改保存 菜单信息
|
|
||||
export function putMenusInfo(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysmenu/update/'+ data.sid, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
//根据sid 删除单个 资源信息
|
|
||||
export function delMenus(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysmenu/delBySids/' + data.sid, |
|
||||
method: 'get', |
|
||||
data: qs.stringify(data), |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 修改状态
|
|
||||
export function IsEnable(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysmenu/updateIsEnable/' + data.sid, |
|
||||
method: 'POST', |
|
||||
data: qs.stringify(data), |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
// 获取菜单 不分页列表
|
|
||||
export function roleList(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/menus/list', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//获取菜单 分页列表
|
|
||||
export function menusPageList(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/menus/pagelist', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//获取菜单 树形分页列表
|
|
||||
export function menusTreelist(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/menus/treelist', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
//根据sid 获取单个菜单 信息
|
|
||||
export function getRoleInfo(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/menus/' + data.sid, |
|
||||
method: 'GET', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
@ -1,61 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMTE1MjUwfQ.gtn_mVsbwH6ztl835rWmIY4DxeNmRe_TOt-Q0TdldIE'
|
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
//获取菜单 分页列表
|
|
||||
export function pageList(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/syspost/listPage', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 查询部门列表
|
|
||||
export function orgList(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysorganization/list', |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 新增
|
|
||||
export function savePost(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/syspost/save', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 修改
|
|
||||
export function putOrgroles(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/syspost/update/' +data.sid, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 删除
|
|
||||
export function delOrgroles(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/syspost/delBySids/' + data.sids, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
@ -1,139 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
// 业务角色 列表
|
|
||||
export function roleOrgList(data){ |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysrole/listPage', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 设置是否可用:isEnable:1可用,0不可用
|
|
||||
export function setRoleEnable(data) { |
|
||||
return request({ |
|
||||
url: `/system/v1/orgroles/setIsEnable/${data.sid}/${data.isEnable}`, |
|
||||
method: 'POST', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* <新增 保存角色> |
|
||||
* @orgSid 机构SID |
|
||||
* @remarks 备注 |
|
||||
* @roleName 角色名称 |
|
||||
* */ |
|
||||
export function saveOrgroles(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysrole/save', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
/** |
|
||||
* <根据SID 修改角色> |
|
||||
* @sid 角色SID |
|
||||
* @orgSid 机构SID |
|
||||
* @remarks 备注 |
|
||||
* @roleName 角色名称 |
|
||||
* */ |
|
||||
export function putOrgroles(data) { |
|
||||
return request({ |
|
||||
url: `/portal/v1/sysrole/update/${data.sid}`, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* <根据SID 删除角色> |
|
||||
* @sid 角色SID |
|
||||
* */ |
|
||||
export function delOrgroles(data) { |
|
||||
return request({ |
|
||||
url: `/portal/v1/sysrole/delBySids/${data.sid}`, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 菜单授权
|
|
||||
export function roleMenuTree(data) { |
|
||||
return request({ |
|
||||
url: `/portal/v1/sysmenu/listAllByRoleSid`, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 菜单授权保存
|
|
||||
export function saveorgrolemenus(data) { |
|
||||
return request({ |
|
||||
url: `/portal/v1/sysmenurole/updateRoleAndMenu`, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 资源授权
|
|
||||
export function sourceMenuTree(data) { |
|
||||
return request({ |
|
||||
url: `/portal/v1/syssource/listAllByRoleSid`, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 资源授权保存
|
|
||||
export function saveSource(data) { |
|
||||
return request({ |
|
||||
url: `/portal/v1/syssourcerole/updateRoleAndSource`, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 功能授权
|
|
||||
export function funMenuTree(data) { |
|
||||
return request({ |
|
||||
url: `/portal/v1/sysfunction/listAllByRoleSid`, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 功能授权保存
|
|
||||
export function savefunMenu(data) { |
|
||||
return request({ |
|
||||
url: `/portal/v1/sysrolefunction/updateRoleAndFunction`, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
@ -1,31 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
|
|
||||
/** |
|
||||
* < 业务角色授权时菜单列表(拥有的菜单选中)> |
|
||||
* @orgTypeKeys 单位性质(类别 |
|
||||
* @roleSid 业务角色sid |
|
||||
* @userType 用户类型只能为1或2 |
|
||||
* */ |
|
||||
export function roleMenuTree(data){ |
|
||||
return request({ |
|
||||
url: '/system/v1/orgrolemenus/menutree', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* < 保存角色授权的菜单项 > |
|
||||
* @roleMenus[] 角色权限列表 {menuSid 菜单sid} {orgSid 单位sid} {roleSid 角色sid} |
|
||||
* @roleSid 业务角色sid |
|
||||
* */ |
|
||||
export function saveorgrolemenus(data){ |
|
||||
return request({ |
|
||||
url: '/system/v1/orgrolemenus', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
@ -1,21 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
|
|
||||
//角色授权时菜单列表(拥有的菜单选中)
|
|
||||
export function getrolemenus(data) { |
|
||||
return request({ |
|
||||
url: `/system/v1/rolemenus/${data.roleSid}`, |
|
||||
method: 'GET', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
//保存 角色授权时菜单列表
|
|
||||
export function saverolemenus(data) { |
|
||||
return request({ |
|
||||
url: `/system/v1/rolemenus`, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
@ -1,111 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
//获取菜单 分页列表
|
|
||||
export function pageList(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/syssource/listPage', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
//保存 资源信息
|
|
||||
export function saveSourcesInfo(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/syssource/save', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 修改 保存 资源信息
|
|
||||
export function putSourcesInfo(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/syssource/update/' + data.sid, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
//根据sid 删除单个 资源信息
|
|
||||
export function delSources(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/syssource/delBySids/' + data.sid, |
|
||||
method: 'get', |
|
||||
data: qs.stringify(data), |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 获取获取资源类别
|
|
||||
export function getZzylb(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/syssource/listAll', |
|
||||
method: 'post', |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
// 获取资源 不分页列表
|
|
||||
export function sourcesList(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/sources/list', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 获取资源列表 不分页下拉
|
|
||||
export function getsourceList(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/sources/sourceList', |
|
||||
method: 'post' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
////获取资源 分页列表
|
|
||||
//export function sourcesPageList(data) {
|
|
||||
//return request({
|
|
||||
// url: '/system/v1/sources/pagelist',
|
|
||||
// method: 'POST',
|
|
||||
// data: data,
|
|
||||
// headers: {'Content-Type': 'application/json'}
|
|
||||
//})
|
|
||||
//}
|
|
||||
|
|
||||
|
|
||||
|
|
||||
//根据sid 获取单个 资源信息
|
|
||||
export function getSourcesInfo(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/sources/' + data.sid, |
|
||||
method: 'GET', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
@ -1,84 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
|
|
||||
export function verifyList(data){ // 用户列表
|
|
||||
return request({ |
|
||||
url: '/system/user/verifyList', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
// admin用户列表
|
|
||||
export function userListByAdmin(data){ |
|
||||
return request({ |
|
||||
url: '/system/user/userListByAdmin', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 设置角色
|
|
||||
export function psotUserRole(data){ |
|
||||
return request({ |
|
||||
url: '/system/v1/userrole', |
|
||||
method: 'post', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 用户初始化密码
|
|
||||
export function initPwd(data){ |
|
||||
return request({ |
|
||||
url: 'system/user/initPwd/'+data.sid, |
|
||||
method: 'POST', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 用户删除接口
|
|
||||
export function delUser(data){ |
|
||||
return request({ |
|
||||
url: '/system/user/delete/'+data.sid, |
|
||||
method: 'DELETE', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 初始化设置角色
|
|
||||
export function initUserRole(data){ |
|
||||
return request({ |
|
||||
url: '/system/v1/userroles/initUserRole/'+ data.userSid, |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 保存角色
|
|
||||
export function saveUserRole(data){ |
|
||||
return request({ |
|
||||
url: '/system/v1/userroles', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 用户信息
|
|
||||
export function getUserINfo(data){ |
|
||||
return request({ |
|
||||
url: '/system/user/userRegisterDetails', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 单位信息
|
|
||||
export function getOrgINfo(data){ |
|
||||
return request({ |
|
||||
url: '/system/organization/organizationRegisterDetails/'+ data.organizationSid, |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
@ -1,38 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
|
|
||||
|
|
||||
//获取菜单 分页列表
|
|
||||
export function login1(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuser/login', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
// 'token':tokens
|
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
class user { |
|
||||
login(data) { // 登录
|
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuser/login', |
|
||||
method: 'post', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
logout() { // 退出
|
|
||||
return request({ |
|
||||
url: '/vue-admin-template/user/logout', |
|
||||
method: 'post' |
|
||||
}) |
|
||||
} |
|
||||
updatePassword(data) { // 退出修改密码
|
|
||||
return request({ |
|
||||
url: '/system/user/updatePassword', |
|
||||
method: 'post', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
} |
|
@ -1,43 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
class user{ |
|
||||
verifyList(data){ // 请求审核列表
|
|
||||
return request({ |
|
||||
url: '/system/user/verifyList', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
userRegisterDetails(data){ // 获取审核内容
|
|
||||
console.log(data) |
|
||||
return request({ |
|
||||
url: '/system/user/userRegisterDetails', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
verify(data){ // 审核通过不通过
|
|
||||
return request({ |
|
||||
url: '/system/user/verify', |
|
||||
method: 'post', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
userDelete(data){ // 删除
|
|
||||
return request({ |
|
||||
url: '/system/user/delete/{sid}', |
|
||||
method: 'delete', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
userNameDelete(data){ // 删除个人注册审核
|
|
||||
return request({ |
|
||||
url: '/system/staffApply/deleteByUserName', |
|
||||
method: 'delete', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
export default new user() |
|
@ -1,32 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
|
|
||||
// 委托人分页列表
|
|
||||
export function clientList(data){ |
|
||||
return request({ |
|
||||
url: '/jlcyry/v1/clientalterrecords/pagerList', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 变更选择委托人列表
|
|
||||
export function setclientList(data){ |
|
||||
return request({ |
|
||||
url: '/jlcyry/v1/clientalterrecords/staffClientList', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 变更为被委托人
|
|
||||
export function doClientAlter(data){ |
|
||||
return request({ |
|
||||
url: '/jlcyry/v1/clientalterrecords/doClientAlter', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
@ -1,69 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
// 单位用户列表
|
|
||||
export function orgUserList(data){ |
|
||||
return request({ |
|
||||
url: '/system/user/userListByOrg', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
// 设置角色
|
|
||||
export function psotUserRole(data){ |
|
||||
return request({ |
|
||||
url: '/system/v1/userrole', |
|
||||
method: 'post', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 获取角色列表 |
|
||||
* orgSid 用户SID |
|
||||
* roleName 角色名称 |
|
||||
* */ |
|
||||
export function orgrolesList(data){ |
|
||||
return request({ |
|
||||
url: '/system/v1/orgroles/list', |
|
||||
method: 'post', |
|
||||
headers: {'Content-Type': 'application/json'}, |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
/** |
|
||||
* 保存 设置角色 /system/v1/orguserroles |
|
||||
* */ |
|
||||
export function saveOrgRole(data){ |
|
||||
return request({ |
|
||||
url: '/system/v1/orguserroles', |
|
||||
method: 'post', |
|
||||
headers: {'Content-Type': 'application/json'}, |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 部门机构列表 /system/v1/departments/departmentOrgList/{organizationSid} |
|
||||
* */ |
|
||||
export function getOrgList(organizationSid){ |
|
||||
return request({ |
|
||||
url: '/system/v1/departments/departmentOrgList/' + organizationSid, |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
/** |
|
||||
* 保存 设置部门 /system/v1/orguserroles |
|
||||
* */ |
|
||||
export function saveDepartment(data){ |
|
||||
return request({ |
|
||||
url: '/system/v1/departmentStaffs/setUpDepartment', |
|
||||
method: 'post', |
|
||||
headers: {'Content-Type': 'application/json'}, |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
|
|
@ -1,60 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
// 用户列表
|
|
||||
|
|
||||
let tokens = window.sessionStorage.getItem('token'); |
|
||||
export function userList(data){ |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/listPage', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 根据sid查询一条信息
|
|
||||
export function userSingle(data){ |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinpolicy/fetchSid/' +data.sid, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 新增
|
|
||||
export function userListAdd(data){ |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/save/', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 更新
|
|
||||
export function userUpdata(data){ |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/update/' +data.sid, |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 删除
|
|
||||
export function delbank(data){ |
|
||||
return request({ |
|
||||
url: '/base/v1/basefinbank/deleteBySids/' +data.sid, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
'token':tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
@ -1,43 +0,0 @@ |
|||||
<template> |
|
||||
<div class="imgDemo"> |
|
||||
<!--<el-button type="primary" @click="getToken()">token</el-button> |
|
||||
<div style="width: 200px;">{{token}}</div>--> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import {login1} from '@/api/system/user/login.js' |
|
||||
export default { |
|
||||
name: '', |
|
||||
data() { |
|
||||
return { |
|
||||
token:'' |
|
||||
} |
|
||||
}, |
|
||||
methods:{ |
|
||||
// getToken(){ |
|
||||
// let params = { |
|
||||
// password: "329653", |
|
||||
// roleSid: "", |
|
||||
// token: "", |
|
||||
// userName: "15097329653", |
|
||||
// verifyCode: "" |
|
||||
// } |
|
||||
// login1(params).then(res => { |
|
||||
// this.token = res.data.token |
|
||||
// window.sessionStorage.setItem('token', res.data.token) |
|
||||
// }) |
|
||||
// } |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss" scoped> |
|
||||
.imgDemo { |
|
||||
width: 100%; |
|
||||
height: 100%; |
|
||||
background: radial-gradient(#fff,#f5f7f4, #fff); |
|
||||
} |
|
||||
canvas { |
|
||||
} |
|
||||
</style> |
|
@ -1,161 +0,0 @@ |
|||||
<template> |
|
||||
<div class="content"> |
|
||||
<div class="right_cont"> |
|
||||
<!-- table --> |
|
||||
<div style="padding-top: 15px;"></div> |
|
||||
<table class="tishi" cellspacing="0" style="margin:0 auto 30px"> |
|
||||
<tr> |
|
||||
<td style="border-bottom: none; border-right: none;">原密码</td> |
|
||||
<td style="border-bottom: none;"> |
|
||||
<el-input type="password" v-model="form.original" show-password/> |
|
||||
<span>*</span> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td style="border-bottom: none; border-right: none;">新密码</td> |
|
||||
<td style="border-bottom: none;"> |
|
||||
<el-input type="password" v-model="form.password" show-password/> |
|
||||
<span>*</span> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td style="border-right: none;">确认密码</td> |
|
||||
<td> |
|
||||
<el-input type="password" v-model="form.confirmPassword" show-password/> |
|
||||
<span>*</span> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<span slot="footer" class="dialog-footer" style="margin-left:40%;"> |
|
||||
<el-button style=" margin-left: 8%; width: 100px;height: 40px;" type="primary" @click="updatePsw()">确认</el-button> |
|
||||
<!-- <el-button style="margin-left: 6%; width: 100px;height: 40px;" type="danger" @click="$router.go(-1)">关闭</el-button> --> |
|
||||
</span> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import login from '@/api/User/login.js' |
|
||||
import { removeStorage } from '@/utils/auth' |
|
||||
import User from '@/api/User/login.js' |
|
||||
import myviewer from '@/components/viewerjs/index.vue' |
|
||||
export default { |
|
||||
components:{myviewer}, |
|
||||
data() { |
|
||||
return { |
|
||||
checked: '', |
|
||||
form:{ |
|
||||
confirmPassword: '', |
|
||||
original: '', |
|
||||
password: '', |
|
||||
userSid: window.sessionStorage.getItem('userSid') |
|
||||
}, |
|
||||
token:window.sessionStorage.getItem('token') |
|
||||
} |
|
||||
}, |
|
||||
mounted(){ |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
updatePsw(){ |
|
||||
if(this.form.password != this.form.confirmPassword){ |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
message: '两次密码输入不一致!' |
|
||||
}); |
|
||||
return |
|
||||
} |
|
||||
login.updatePassword(this.form).then(res => { |
|
||||
this.$alert('密码修改成!请重新登录点击确定后退出。', '修改成功', { |
|
||||
confirmButtonText: '确定', |
|
||||
callback: action => { |
|
||||
User.logout({ token: this.token}).then(res => { |
|
||||
// removeToken() |
|
||||
window.sessionStorage.removeStorage('token') |
|
||||
window.sessionStorage.removeStorage('userSid') |
|
||||
this.$router.push({path: '/login'}) |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.$router.push({path: '/login'}) |
|
||||
}) |
|
||||
} |
|
||||
}); |
|
||||
// this.$message({ |
|
||||
// type: 'success', |
|
||||
// message: '!' |
|
||||
// }); |
|
||||
}) |
|
||||
}, |
|
||||
guanli(){ |
|
||||
this.$router.push({ |
|
||||
name: 'roleAdminister' |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped="scoped" lang="scss"> |
|
||||
|
|
||||
.content { |
|
||||
width: 100%; |
|
||||
padding-top: 10px; |
|
||||
font-size: 16px; |
|
||||
color: #fff; |
|
||||
box-sizing: border-box; |
|
||||
} |
|
||||
|
|
||||
.shouye { |
|
||||
position: absolute; |
|
||||
top: -3px; |
|
||||
left: 100px; |
|
||||
font-size: 16px; |
|
||||
color: #0395d8; |
|
||||
font-weight: bold; |
|
||||
} |
|
||||
|
|
||||
.placename { |
|
||||
position: absolute; |
|
||||
top: -3px; |
|
||||
left: 210px; |
|
||||
font-size: 16px; |
|
||||
color: #fff; |
|
||||
font-weight: bold; |
|
||||
} |
|
||||
|
|
||||
.right_cont { |
|
||||
width: 100%; |
|
||||
height: 645px; |
|
||||
background-color: #fff; |
|
||||
margin: 0; |
|
||||
padding: 15px; |
|
||||
box-sizing: border-box; |
|
||||
} |
|
||||
.tishi { |
|
||||
width: 560px; |
|
||||
color: #000; |
|
||||
padding-left: 1.5%; |
|
||||
margin-bottom: 50px; |
|
||||
tr { |
|
||||
height: 70px; |
|
||||
} |
|
||||
|
|
||||
td { |
|
||||
border: 1px solid #e6e9f0; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
td:first-child { |
|
||||
background-color: #f7f9fc; |
|
||||
} |
|
||||
.el-input, |
|
||||
input { |
|
||||
width: 80%; |
|
||||
} |
|
||||
span{ |
|
||||
font-size: 26px; |
|
||||
color: red; |
|
||||
margin-left: 10px; |
|
||||
} |
|
||||
} |
|
||||
</style> |
|
@ -1,174 +0,0 @@ |
|||||
<template> |
|
||||
<el-dialog top="5vh" :append-to-body="true" title="获取地图坐标" :visible.sync="dialogVisible" :before-close="handleClose" width="1000px"> |
|
||||
<div class="amap-page-container"> |
|
||||
<el-amap-search-box class="search-box" :search-option="searchOption" :on-search-result="onSearchResult" /> |
|
||||
<div class="toolbar"> |
|
||||
<span>当前坐标: {{ lng }}, {{ lat }}</span> |
|
||||
<span>地址: {{ address }}</span> |
|
||||
<el-button type="primary" @click="select" class="btn">确定</el-button> |
|
||||
|
|
||||
</div> |
|
||||
<el-amap |
|
||||
vid="amapDemo2" |
|
||||
:center="mapCenter" |
|
||||
:zoom="zoom" |
|
||||
class="amap-demo" |
|
||||
:events="events" |
|
||||
:plugin="plugin" |
|
||||
> |
|
||||
<!-- <el-amap-marker v-for="(marker,index) in markers" :key="index" :position="marker.position" /> --> |
|
||||
<el-amap-marker v-for="marker in markers" :position="marker" /> |
|
||||
</el-amap> |
|
||||
|
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { AMapManager } from 'vue-amap' |
|
||||
export default { |
|
||||
name: 'AmapPage', |
|
||||
props: { |
|
||||
dialogVisible: { |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
address:{ |
|
||||
type: String, |
|
||||
default: '' |
|
||||
}, |
|
||||
makerPosition: { |
|
||||
type: Array, |
|
||||
default: () => { |
|
||||
return [] |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
data: function() { |
|
||||
const self = this |
|
||||
return { |
|
||||
zoom: 12, |
|
||||
mapCenter: [116.384201, 39.90307], |
|
||||
markers: [[116.384201, 39.90307]], |
|
||||
searchOption: { |
|
||||
city: '北京', |
|
||||
citylimit: false |
|
||||
}, |
|
||||
lng: 0, |
|
||||
lat: 0, |
|
||||
loaded: false, |
|
||||
plugin: [{ |
|
||||
pName: 'Geolocation', |
|
||||
events: { |
|
||||
init(o) { |
|
||||
// o 是高德地图定位插件实例 |
|
||||
o.getCurrentPosition((status, result) => { |
|
||||
if (result && result.position) { |
|
||||
if (self.makerPosition.length == 0) { |
|
||||
self.address = result.formattedAddress |
|
||||
self.lng = result.position.lng |
|
||||
self.lat = result.position.lat |
|
||||
} |
|
||||
self.searchOption.city = result.addressComponent.city |
|
||||
self.center = [self.lng, self.lat] |
|
||||
self.loaded = true |
|
||||
self.$nextTick() |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
}], |
|
||||
events: { |
|
||||
click(e) { |
|
||||
const { lng, lat } = e.lnglat |
|
||||
self.lng = lng |
|
||||
self.lat = lat |
|
||||
self.markers[0] = [lng, lat] |
|
||||
|
|
||||
// 这里通过高德 SDK 完成。 |
|
||||
var geocoder = new AMap.Geocoder({ |
|
||||
radius: 1000, |
|
||||
extensions: 'all' |
|
||||
}) |
|
||||
geocoder.getAddress([lng, lat], function(status, result) { |
|
||||
if (status === 'complete' && result.info === 'OK') { |
|
||||
if (result && result.regeocode) { |
|
||||
self.address = result.regeocode.formattedAddress |
|
||||
self.$nextTick() |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
created() { |
|
||||
if (this.makerPosition.length) { |
|
||||
this.markers[0] = this.makerPosition |
|
||||
this.lng = this.makerPosition[0] || 0 |
|
||||
this.lat = this.makerPosition[1] || 0 |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
onSearchResult(pois) { |
|
||||
let latSum = 0 |
|
||||
let lngSum = 0 |
|
||||
if (pois.length > 0) { |
|
||||
pois.forEach(poi => { |
|
||||
const { lng, lat } = poi |
|
||||
lngSum += lng |
|
||||
latSum += lat |
|
||||
this.markers.push([poi.lng, poi.lat]) |
|
||||
}) |
|
||||
const center = { |
|
||||
lng: lngSum / pois.length, |
|
||||
lat: latSum / pois.length |
|
||||
} |
|
||||
this.mapCenter = [center.lng, center.lat] |
|
||||
} |
|
||||
}, |
|
||||
handleClose(done) { |
|
||||
this.$emit('update:dialogVisible', false) |
|
||||
this.$nextTick(() => { |
|
||||
done() |
|
||||
}) |
|
||||
}, |
|
||||
select() { |
|
||||
this.$emit('update:dialogVisible', false) |
|
||||
this.$emit('update:makerPosition', this.markers[0]) |
|
||||
this.$emit('update:address', this.address) |
|
||||
this.$parent.validateForm() |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss" scoped> |
|
||||
.amap-demo { |
|
||||
height: 450px; |
|
||||
} |
|
||||
.search-box { |
|
||||
z-index: 999; |
|
||||
margin-bottom: 20px; |
|
||||
position: absolute; |
|
||||
top: 70px; |
|
||||
left: 100px; |
|
||||
} |
|
||||
.amap-page-container { |
|
||||
position: relative; |
|
||||
} |
|
||||
.toolbar{ |
|
||||
padding-bottom: 10px; |
|
||||
height: 50px; |
|
||||
line-height: 50px; |
|
||||
position: relative; |
|
||||
.btn{ |
|
||||
position: absolute; |
|
||||
right: 0; |
|
||||
} |
|
||||
span{ |
|
||||
padding-left: 10px; |
|
||||
} |
|
||||
} |
|
||||
</style> |
|
@ -1,89 +0,0 @@ |
|||||
<template> |
|
||||
<el-row :gutter="50"> |
|
||||
<el-col :span="12"> |
|
||||
<div class="color-red fs18" style="line-height: 36px;"> |
|
||||
<p>提示:</p> |
|
||||
<p style="text-indent:25px">为保证系统信息安全,本平台使用实名注册,注册时填写的内容需与上传文件相符,并经系统管理员审核通过后生效。 |
|
||||
对于单位注册,注册时需提供单位法人委托书,授权一名单位管理员专门管理本单位账户,并对本单位信息安全负责。</p> |
|
||||
<p class="color-grey pd-t40"> |
|
||||
法人授权委托书制作步骤如下: <br> |
|
||||
1、点击“下载授权委托书模板”;<br> |
|
||||
2、打开授权委托书文本;<br> |
|
||||
3、填写授权委托书内容;<br> |
|
||||
4、打印授权委托书;<br> |
|
||||
5、在授权委托书上签字盖章;<br> |
|
||||
6、扫描或拍照已签字盖章的授权委托书,并上传至本电脑备用。<br> |
|
||||
</p> |
|
||||
</div> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<div> |
|
||||
<el-button type="primary" class='bg-primary' @click.native.prevent="download()" style='margin: 12px 0;'>下载授权委托书</el-button> |
|
||||
<el-button type="primary" class='bg-primary' @click="onImport()">上传授权委托书</el-button> |
|
||||
</div> |
|
||||
<UploadImg class='first' ref="uploadImg" :FrontPhoto="Photourl" @imgUrl="attorneyPath"></UploadImg> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import UploadImg from '@/components/uploadFile/index.vue' |
|
||||
import axios from 'axios' |
|
||||
import { download } from '@/api/orgRegist/index.js' |
|
||||
export default { |
|
||||
components:{UploadImg}, |
|
||||
name: 'frist', |
|
||||
props:{ |
|
||||
Form:{ |
|
||||
type: Object, |
|
||||
default: function () { |
|
||||
return {} |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
Photourl: require('@/assets/images/org/jian.png'), |
|
||||
} |
|
||||
}, |
|
||||
computed: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
download(){ |
|
||||
axios({ |
|
||||
method: 'get', |
|
||||
url: 'api/system/organization/download', |
|
||||
responseType: 'blob' |
|
||||
}).then(response => { |
|
||||
console.log(response); |
|
||||
let blob = new Blob([response.data], {type:"application/msword"}); |
|
||||
let link = document.createElement('a'); |
|
||||
if (window.navigator && window.navigator.msSaveOrOpenBlob) { |
|
||||
window.navigator.msSaveOrOpenBlob(blob, "授权书附件.doc"); |
|
||||
} else { |
|
||||
// var objectUrl = URL.createObjectURL(blob); |
|
||||
// window.open(objectUrl); |
|
||||
link.href = window.URL.createObjectURL(blob); |
|
||||
link.download = "授权书附件.doc"; |
|
||||
link.click(); |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
onImport() { |
|
||||
this.$refs['uploadImg'].$refs['upload'].$refs['upload-inner'].handleClick() |
|
||||
}, |
|
||||
attorneyPath(url){ // 授权委托书 |
|
||||
this.$set(this.Form,"attorneyPath",url.filePath) |
|
||||
this.$set(this.Form,"attorneyPathurl",url.fullUrl) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.avatar-uploader.first .avatar { |
|
||||
width: 350px; |
|
||||
height: 350px; |
|
||||
} |
|
||||
</style> |
|
@ -1,31 +0,0 @@ |
|||||
<template> |
|
||||
<div class="text-center pd-y40"> |
|
||||
<img src="../../../../assets/images/org/success.png" alt=""/> |
|
||||
<h4 class="pd-y20 fs20">提交成功</h4> |
|
||||
<p>管理员审核通过后会有短信提醒!<br> 系统将在{{time}}秒后返回登录页!</p> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
time: 13, |
|
||||
timeInterval: null |
|
||||
} |
|
||||
}, |
|
||||
mounted(){ |
|
||||
this.timeInterval = setInterval(()=>{ |
|
||||
--this.time |
|
||||
if(this.time == 0){ |
|
||||
clearInterval(this.timeInterval) |
|
||||
window.close(); |
|
||||
this.time = ''; |
|
||||
} |
|
||||
},1000) |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
</style> |
|
@ -1,5 +0,0 @@ |
|||||
export { default as first } from './first.vue' |
|
||||
export { default as second } from './second.vue' |
|
||||
export { default as third } from './third.vue' |
|
||||
export { default as fourth } from './fourth.vue' |
|
||||
|
|
@ -1,149 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<el-form :model="Form" :rules="rules" ref="ruleForm" label-width="180px"> |
|
||||
<el-form-item label="单位类别" prop="dwType"> |
|
||||
<el-select v-model="Form.dwType" placeholder="请选择单位类别"> |
|
||||
<el-option v-for="item in DwTypelist" |
|
||||
:key="item.dictKey" |
|
||||
:label="item.dictValue" |
|
||||
:value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="单位级别" prop="dwjb"> |
|
||||
<el-select v-model="Form.dwjb" placeholder="请选择单位类别"> |
|
||||
<el-option v-for="item in DwJblist" |
|
||||
:key="item.dictKey" |
|
||||
:label="item.dictValue" |
|
||||
:value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="统一信用代码/登记证号" prop="orgCode"> |
|
||||
<el-input v-model="Form.orgCode" @input="changeorgCOde" maxlength="18"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="单位名称" prop="name"> |
|
||||
<el-input v-model="Form.name"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="登录用户名"> |
|
||||
<el-input v-model="Form.userName" disabled></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="单位注册地址" prop="orgAddress"> |
|
||||
<el-input v-model="Form.orgAddress"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="法人代表/负责人" prop="contactMan"> |
|
||||
<el-input v-model="Form.contactMan"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="单位所属区域" prop="regionSid" class="demo-form-inline"> |
|
||||
<AreaPicker @areaPicker="areaPicker"></AreaPicker> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="单位地理位置" prop="gisInfo"> |
|
||||
<el-input v-model="Form.gisInfo" readonly> |
|
||||
<el-button slot="append" icon="el-icon-map-location" @click='mapDialog = true'></el-button> |
|
||||
</el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="单位通讯地址" prop="postAddress"> |
|
||||
<el-input v-model="Form.postAddress"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="法人证书" prop="businessLicense"> |
|
||||
<UploadImg class="second" :FrontPhoto="Photourl" @imgUrl="FrontPhotoUrl"></UploadImg> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
|
|
||||
<Position v-if="mapDialog" :address.sync="Form.postAddress" :maker-position.sync="Form.gisInfo" :dialog-visible.sync="mapDialog" /> |
|
||||
|
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
// import AMap from 'AMap' |
|
||||
import UploadImg from '@/components/uploadFile/index.vue' |
|
||||
import AreaPicker from '@/components/AreaPicker/index.vue' |
|
||||
import Position from './amap.vue' |
|
||||
import { getDwType, getDwJb } from '@/api/system/dataDict/dataDict.js' |
|
||||
export default { |
|
||||
components:{UploadImg, AreaPicker, Position}, |
|
||||
props:{ |
|
||||
Form:{ |
|
||||
type: Object, |
|
||||
default: function () { |
|
||||
return {} |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
DwTypelist: [], |
|
||||
DwJblist: [], |
|
||||
mapDialog: false, |
|
||||
address: '', |
|
||||
Photourl: require('@/assets/images/org/yyzz.png'), |
|
||||
rules: { |
|
||||
orgCode: [ |
|
||||
{ required: true, message: '请输入统一信用代码', trigger: 'blur' }, |
|
||||
{ min: 9, max: 18, message: '统一信用代码长度在 9位 或者 18 位', trigger: 'blur' } |
|
||||
], |
|
||||
dwType: [{ required: true, message: '请选择活动区域', trigger: 'change' }], |
|
||||
dwjb: [{ required: true, message: '请选择活动区域', trigger: 'change' }], |
|
||||
name: [{required: true, message: '请输入单位名称', trigger: 'blur'}], |
|
||||
orgAddress: [{required: true, message: '请输入单位注册地址', trigger: 'blur'}], |
|
||||
contactMan: [{required: true, message: '请输入法人代表/负责人', trigger: 'blur'}], |
|
||||
regionSid: [{required: true, message: '请选择单位地区', trigger: ['blur', 'change']}], |
|
||||
gisInfo: [{required: true, message: '请选择单位地理位置', trigger: 'blur'}], |
|
||||
postAddress: [{required: true, message: '请输入单位通讯地址', trigger: 'blur'}], |
|
||||
DwType: [{required: true, message: '请选择活动区域', trigger: 'change'}], |
|
||||
businessLicense: [{required: true, message: '请上传应用执照', trigger: 'change'}], |
|
||||
}, |
|
||||
} |
|
||||
}, |
|
||||
async mounted() { |
|
||||
getDwType().then((res) => { |
|
||||
this.DwTypelist = res.data |
|
||||
}) |
|
||||
getDwJb().then((res) => { |
|
||||
this.DwJblist = res.data |
|
||||
}) |
|
||||
}, |
|
||||
methods: { |
|
||||
FrontPhotoUrl(url){ |
|
||||
this.$set(this.Form,'businessLicense',url.filePath) |
|
||||
this.validateForm() |
|
||||
}, |
|
||||
addressInput(){ |
|
||||
console.log('ssss') |
|
||||
this.validateForm() |
|
||||
}, |
|
||||
areaPicker(val){ |
|
||||
this.$set(this.Form,'regionSid',val) |
|
||||
}, |
|
||||
changeorgCOde(){ |
|
||||
this.Form.userName = this.Form.orgCode |
|
||||
}, |
|
||||
validateForm () { |
|
||||
let flag = null |
|
||||
this.$refs['ruleForm'].validate(valid => { |
|
||||
if (valid) { |
|
||||
flag = true |
|
||||
} else { |
|
||||
flag = false |
|
||||
} |
|
||||
}) |
|
||||
return flag |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.avatar-uploader.second .avatar { |
|
||||
width: 350px; |
|
||||
height: 450px; |
|
||||
} |
|
||||
.map{ |
|
||||
width: 600px; |
|
||||
height: 600px; |
|
||||
} |
|
||||
.amap-demo { |
|
||||
height: 300px; |
|
||||
} |
|
||||
</style> |
|
@ -1,176 +0,0 @@ |
|||||
<template> |
|
||||
<el-form :model="Form" :rules="rules" ref="ruleForm" label-width="200px" class="demo-Form"> |
|
||||
<el-form-item label="被委托人身份证号码" prop="idNo"> |
|
||||
<el-input type="idNo" v-model="Form.idNo" :maxlength="18" placeholder="请输入身份证号码"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="被委托人姓名" prop="staffInfoName"> |
|
||||
<el-input v-model="Form.staffInfoName" placeholder="请输入委托人姓名"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-row> |
|
||||
<el-col :span='12'> |
|
||||
<el-form-item label="单位管理员头像" prop="staffInfoHeadUrl"> |
|
||||
<UploadImg @imgUrl="HeadUrl" :FrontPhoto="require('@/assets/images/org/headerimg.png')" :tip="'要求图片大小不超过10M'"></UploadImg> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span='12'> |
|
||||
<el-form-item label="授权书复印件" > |
|
||||
<UploadImg @imgUrl="FrontPhotoUrl" :FrontPhoto="Form1.attorneyPathurl" :tip="'要求图片大小不超过10M'"></UploadImg> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span='12'> |
|
||||
<el-form-item label="被委托人身份证正面复印件" prop="idFrontPhoto"> |
|
||||
<UploadImg @imgUrl="idFrontPhoto" :FrontPhoto="require('@/assets/images/org/sfz.png')" :tip="'要求图片大小不超过10M'"></UploadImg> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span='12'> |
|
||||
<el-form-item label="被委托人身份证反面复印件" prop="idBackPhoto" class="demo-form-inline"> |
|
||||
<UploadImg @imgUrl="idBackPhoto" :FrontPhoto="require('@/assets/images/org/sfz.png')" :tip="'要求图片大小不超过10M'"></UploadImg> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-form-item label="用户名"> |
|
||||
<el-input v-model="Form1.userName" placeholder="请输入用户名" disabled></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系人手机号码" prop="contactMobile"> |
|
||||
<el-input type="text" v-model="Form.contactMobile" placeholder="请输入手机号" maxlength="11"></el-input> |
|
||||
<el-button class="Tips" type="text" :disabled='isDisabled' @click.stop.prevent="getcode()">点击获取验证码 {{downTime ? downTime+'s':''}}</el-button> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系人座机电话" prop="contactTelephone"> |
|
||||
<el-input v-model="Form.contactTelephone" placeholder="请输入座机电话"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="手机短信验证码" prop="verificationCode"> |
|
||||
<el-input v-model="Form.verificationCode" placeholder="请输入短信验证码"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import UploadImg from '@/components/uploadFile/index.vue' |
|
||||
import { |
|
||||
getVerificationCode |
|
||||
} from '@/api/orgRegist/index.js' |
|
||||
export default { |
|
||||
components:{UploadImg}, |
|
||||
props:{ |
|
||||
Form:{ |
|
||||
type: Object, |
|
||||
default: function () { |
|
||||
return {} |
|
||||
} |
|
||||
}, |
|
||||
Form1:{ |
|
||||
type: Object, |
|
||||
default: function () { |
|
||||
return {} |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
data() { |
|
||||
var validatorPhone = function (rule, value, callback) { |
|
||||
if (value === '') { |
|
||||
callback(new Error('手机号不能为空')) |
|
||||
} else if (!/^1\d{10}$/.test(value)) { |
|
||||
callback(new Error('手机号格式错误')) |
|
||||
} else { |
|
||||
callback() |
|
||||
} |
|
||||
} |
|
||||
return { |
|
||||
downTime: '', |
|
||||
isDisabled: false, |
|
||||
rule: [{ required: true, trigger: 'change' }], |
|
||||
rules: { |
|
||||
idNo: [ |
|
||||
{ required: true, message: '请输入身份证号', trigger: 'blur' }, |
|
||||
{ pattern: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/, |
|
||||
message: '身份证号格式错误', trigger: 'blur' , |
|
||||
} |
|
||||
], |
|
||||
userName: [{ required: true, message: '请输入用户名', trigger: 'change' }], |
|
||||
staffInfoName: [{ required: true, message: '请输入被委托人姓名', trigger: 'change' }], |
|
||||
staffInfoHeadUrl: [{ required: true, message: '请上传图片', trigger: 'change' }], |
|
||||
attorneyPath: [{ required: true, message: '请上传图片', trigger: 'change' }], |
|
||||
idFrontPhoto: [{ required: true, message: '请上传图片', trigger: 'change' }], |
|
||||
idBackPhoto: [{ required: true, message: '请上传图片', trigger: 'change' }], |
|
||||
contactMobile: [ |
|
||||
{ required: true, validator: validatorPhone, trigger: 'blur' } |
|
||||
], |
|
||||
verificationCode: [{ required: true, message: '请输入验证码', trigger: 'change' }], |
|
||||
}, |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
// 手机验证码 |
|
||||
getcode() { |
|
||||
if(!this.Form.contactMobile){ |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
message: '请输入手机号码!' |
|
||||
}); |
|
||||
return |
|
||||
} |
|
||||
this.downTime = 60 |
|
||||
this.isDisabled = true |
|
||||
let timeInterval = setInterval(()=>{ |
|
||||
--this.downTime |
|
||||
if(this.downTime == 0){ |
|
||||
clearInterval(timeInterval) |
|
||||
this.downTime = ''; |
|
||||
this.isDisabled = false |
|
||||
} |
|
||||
},1000) |
|
||||
getVerificationCode({ |
|
||||
mobile: this.Form.contactMobile |
|
||||
}).catch(()=>{ |
|
||||
this.isDisabled = false |
|
||||
}) |
|
||||
}, |
|
||||
FrontPhotoUrl(url){ |
|
||||
this.Form.attorneyPath = url.filePath |
|
||||
}, |
|
||||
HeadUrl(url){ |
|
||||
this.Form.staffInfoHeadUrl = url.filePath |
|
||||
}, |
|
||||
idBackPhoto(url){ |
|
||||
this.Form.idBackPhoto = url.filePath |
|
||||
}, |
|
||||
idFrontPhoto(url){ |
|
||||
this.Form.idFrontPhoto = url.filePath |
|
||||
}, |
|
||||
validateForm () { |
|
||||
let flag = null |
|
||||
this.$refs['ruleForm'].validate(valid => { |
|
||||
console.log(this.Form) |
|
||||
if (valid) { |
|
||||
flag = true |
|
||||
} else { |
|
||||
flag = false |
|
||||
} |
|
||||
}) |
|
||||
return flag |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.avatar-uploader-icon { |
|
||||
width: 200px; |
|
||||
height: 200px; |
|
||||
line-height: 178px; |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader .avatar { |
|
||||
width: 200px; |
|
||||
height: 200px; |
|
||||
} |
|
||||
.Tips { |
|
||||
padding-left: 10px; |
|
||||
position: absolute; |
|
||||
left: 100%; |
|
||||
top: 0; |
|
||||
} |
|
||||
</style> |
|
@ -1,217 +0,0 @@ |
|||||
<template> |
|
||||
<div class="container"> |
|
||||
<el-header> |
|
||||
<h3 class="title">河北省计量业务应用平台</h3> |
|
||||
</el-header> |
|
||||
<div class="org-from"> |
|
||||
<el-steps :active="active" finish-status="success"> |
|
||||
<el-step v-for="(item,index) of stepTitle" :key="index" :title="item" @click.native="handleStep(index)" /> |
|
||||
</el-steps> |
|
||||
<!-- 内容展示区 --> |
|
||||
<!-- 第一步 --> |
|
||||
<div class="basicInfo pd-y20 pd-x20" v-if="active ===0"> |
|
||||
<keep-alive> |
|
||||
<first :Form='Form1' ref="Form1"></first> |
|
||||
</keep-alive> |
|
||||
</div> |
|
||||
<!-- 第二步 --> |
|
||||
<div class="basicInfo" v-if="active ===1"> |
|
||||
<keep-alive> |
|
||||
<second :Form.sync='Form2' ref="Form2"></second> |
|
||||
</keep-alive> |
|
||||
</div> |
|
||||
<!-- 第三 --> |
|
||||
<div class="basicInfo" v-if="active ===2"> |
|
||||
<keep-alive> |
|
||||
<third :Form.sync='Form3' :Form1="Form" ref="Form3"></third> |
|
||||
</keep-alive> |
|
||||
</div> |
|
||||
<!-- 第四 --> |
|
||||
<div class="basicInfo" v-if="active ===3"> |
|
||||
<keep-alive> |
|
||||
<fourth></fourth> |
|
||||
</keep-alive> |
|
||||
</div> |
|
||||
<div class="deployBtn text-center"> |
|
||||
<el-button type="primary" class='bg-primary' style='margin-top: 12px;' @click='prev' v-show='active==1||active==2'>上一步</el-button> |
|
||||
<el-button type="primary" class='bg-primary' style='margin-top: 12px;' @click='next' v-show='active==1||active==0'>下一步</el-button> |
|
||||
<el-button type="primary" class='bg-primary' style='margin-top: 12px;' @click='save' v-show='active==2'>提交</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import {first, second, third, fourth} from './components/index.js' |
|
||||
import paddwordinput from '@/components/passwordSafe/index.vue' |
|
||||
import { saveOrg } from '@/api/orgRegist/index.js' |
|
||||
export default { |
|
||||
components: {first, second, third, fourth}, |
|
||||
data() { |
|
||||
return { |
|
||||
active: 0, // 步骤 |
|
||||
stepSuc: [0],// 已选步骤 |
|
||||
stepTitle: ['上传授权证书', '填写单位信息', '填写被授权人信息', '注册完成'], // 步骤标题 |
|
||||
Form1:{ |
|
||||
attorneyPath: '', |
|
||||
attorneyPathurl: '' |
|
||||
}, |
|
||||
Form2:{ |
|
||||
businessLicense: '' |
|
||||
}, |
|
||||
Form3:{ |
|
||||
}, |
|
||||
Form: { |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
// 点击步骤条 |
|
||||
handleStep(val) { |
|
||||
if (this.stepSuc.includes(val) === true) { |
|
||||
this.active = val |
|
||||
} |
|
||||
}, |
|
||||
prev() { |
|
||||
document.body.scrollTop = document.documentElement.scrollTop = 0; |
|
||||
if (--this.active === 0) { |
|
||||
this.active = 0 |
|
||||
} |
|
||||
}, |
|
||||
next() { |
|
||||
if( this.active == 0) { |
|
||||
if(!this.Form1.attorneyPathurl) { |
|
||||
this.$message({ |
|
||||
type: 'error', |
|
||||
message: '请上传授权委托书!' |
|
||||
}); |
|
||||
return |
|
||||
}else { |
|
||||
this.stepSuc.push(++this.active) |
|
||||
} |
|
||||
} |
|
||||
if( this.active == 1) { |
|
||||
let flag = this.$refs['Form2'].validateForm() |
|
||||
console.log(flag) |
|
||||
if(!this.$refs['Form2'].validateForm()) { |
|
||||
this.$message({ |
|
||||
type: 'error', |
|
||||
message: '必填项不能为空!' |
|
||||
}); |
|
||||
return |
|
||||
}else { |
|
||||
this.stepSuc.push(++this.active) |
|
||||
} |
|
||||
} |
|
||||
this.Form = Object.assign(this.Form1, this.Form2, this.Form3) |
|
||||
document.body.scrollTop = document.documentElement.scrollTop = 0; |
|
||||
}, |
|
||||
save(){ |
|
||||
if(!this.$refs['Form3'].validateForm()) { |
|
||||
this.$message({ |
|
||||
type: 'error', |
|
||||
message: '必填项不能为空!' |
|
||||
}); |
|
||||
return |
|
||||
} |
|
||||
let Form = Object.assign(this.Form1, this.Form2, this.Form3) |
|
||||
Form.gisInfo = Form.gisInfo.join() |
|
||||
saveOrg(Form).then(res=>{ |
|
||||
console.log(res) |
|
||||
if(res.code == 200){ |
|
||||
this.stepSuc.push(++this.active) |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss" scoped> |
|
||||
@import "~@/styles/variables.scss"; |
|
||||
h3{margin: 0;padding: 0;} |
|
||||
.el-header{ |
|
||||
width: 100%; |
|
||||
background-color: #0294d7; |
|
||||
color: #fff; |
|
||||
line-height: 60px; |
|
||||
overflow: hidden; |
|
||||
position: fixed; |
|
||||
z-index: 99; |
|
||||
top: 0; |
|
||||
.title{ |
|
||||
float: left; |
|
||||
font-size: 26px; |
|
||||
margin-left: 35px; |
|
||||
} |
|
||||
} |
|
||||
.content,.container{ |
|
||||
padding: 50px 0; |
|
||||
background-color: #f7f9fc; |
|
||||
} |
|
||||
</style> |
|
||||
<style lang="scss"> |
|
||||
.org-from { |
|
||||
width: 1160px; |
|
||||
padding: 30px 0; |
|
||||
margin: 0 auto; |
|
||||
|
|
||||
// 步骤条样式 |
|
||||
.el-step__icon { |
|
||||
width: 40px; |
|
||||
height: 40px; |
|
||||
} |
|
||||
|
|
||||
.el-step__icon.is-text { |
|
||||
background-color: #919192; |
|
||||
font-size: 26px; |
|
||||
color: #FFFFFF; |
|
||||
border: 5px solid #DEDEDE; |
|
||||
} |
|
||||
|
|
||||
.el-step.is-horizontal .el-step__line { |
|
||||
top: 15px; |
|
||||
height: 10px; |
|
||||
background-color: #D9D9D9; |
|
||||
} |
|
||||
|
|
||||
.el-step__title.is-success, |
|
||||
.el-step__title.is-process { |
|
||||
color: #018CD6; |
|
||||
} |
|
||||
|
|
||||
.el-step__head.is-success { |
|
||||
border-color: transparent; |
|
||||
} |
|
||||
|
|
||||
.el-step__head.is-process .is-text, |
|
||||
.el-step__head.is-success .is-text { |
|
||||
background-color: #018CD6; |
|
||||
} |
|
||||
|
|
||||
.el-input__inner:focus { |
|
||||
border: 1px solid #549FD9; |
|
||||
} |
|
||||
|
|
||||
.basicInfo .el-form { |
|
||||
width: 860px; |
|
||||
padding-top: 20px; |
|
||||
margin: 0 auto; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.deployBtn {} |
|
||||
|
|
||||
.flex-com { |
|
||||
display: flex; |
|
||||
} |
|
||||
|
|
||||
.active-color { |
|
||||
color: #018CD6; |
|
||||
background-color: #018CD6; |
|
||||
} |
|
||||
</style> |
|
@ -1,293 +0,0 @@ |
|||||
<template> |
|
||||
<div class="content"> |
|
||||
<el-header> |
|
||||
<h3 class="title">河北省计量业务应用平台</h3> |
|
||||
</el-header> |
|
||||
<div class="user-from"> |
|
||||
<el-form :model="userForm" :rules="rules" ref="userForm" label-width="120px" class="demo-userForm"> |
|
||||
<el-form-item label="身份证号" prop="idNo"> |
|
||||
<el-input v-model="userForm.idNo" @blur="onInputBlur" placeholder="请输入身份证号" :maxlength="18"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="真实姓名" prop="name"> |
|
||||
<el-input v-model="userForm.name" placeholder="请输入真实姓名"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="个人手机号" prop="mobile"> |
|
||||
<el-input v-model="userForm.mobile" placeholder="请输入手机号" ></el-input> |
|
||||
<el-button class="Tips" type="text" :disabled='isDisabled' @click.stop.prevent="getcode()">点击获取验证码 {{downTime ? downTime+'s':''}}</el-button> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="手机验证码" prop="verificationCode"> |
|
||||
<el-input v-model="userForm.verificationCode" placeholder="请输入验证码"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="用户名" prop="userName"> |
|
||||
<el-input v-model="userForm.userName" :disabled="true"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="密码" prop="password"> |
|
||||
<paddwordinput v-model="userForm.password" placeholder="请输入密码" :pastips='true' :maxlength="10"></paddwordinput> |
|
||||
<el-button class="Tips" type="text">密码必须为8至10位大小写字母和数字组合</el-button> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="确认密码" prop="rePassword"> |
|
||||
<paddwordinput v-model="userForm.rePassword" placeholder="请再次输入密码" :maxlength="10"></paddwordinput> |
|
||||
</el-form-item> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item label="身份证正面照" prop="idFrontPhoto"> |
|
||||
<UploadImg @imgUrl="FrontPhotoUrl"></UploadImg> |
|
||||
<el-input v-model="userForm.idFrontPhoto" v-show="false"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item label="身份证背面照" prop="idBackPhoto"> |
|
||||
<UploadImg @imgUrl="BackPhotoUrl"></UploadImg> |
|
||||
<el-input v-model="userForm.idBackPhoto" v-show="false"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-form-item style="text-align: center;"> |
|
||||
<el-button type="primary" @click="submitForm('userForm')" :disabled="btnDisabled">注册</el-button> |
|
||||
<el-button @click="resetForm('userForm')">关闭</el-button> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
registUser, |
|
||||
getVerificationCode |
|
||||
} from '@/api/user1.js' |
|
||||
import qs from 'qs' |
|
||||
import UploadImg from '@/components/uploadFile/index.vue' |
|
||||
import paddwordinput from '@/components/passwordSafe/index.vue' |
|
||||
export default { |
|
||||
components:{ UploadImg, paddwordinput }, |
|
||||
data() { |
|
||||
var validatorPhone = function (rule, value, callback) { |
|
||||
if (value === '') { |
|
||||
callback(new Error('手机号不能为空')) |
|
||||
} else if (!/^1\d{10}$/.test(value)) { |
|
||||
callback(new Error('手机号格式错误')) |
|
||||
} else { |
|
||||
callback() |
|
||||
} |
|
||||
} |
|
||||
var validatePass2 = (rule, value, callback) => { |
|
||||
if (value === '') { |
|
||||
callback(new Error('请再次输入密码')) |
|
||||
// password 是表单上绑定的字段 |
|
||||
} else if (value !== this.userForm.password) { |
|
||||
callback(new Error('两次输入密码不一致!')) |
|
||||
} else { |
|
||||
callback() |
|
||||
} |
|
||||
} |
|
||||
return { |
|
||||
downTime: '', |
|
||||
isDisabled: false, |
|
||||
userForm: { |
|
||||
name: '', |
|
||||
userName: '', //用户名 |
|
||||
password: '', |
|
||||
rePassword: '', |
|
||||
mobile: '', // 手机号 |
|
||||
verificationCode: '', |
|
||||
idNo: '', |
|
||||
idBackPhoto: '', // 反面 |
|
||||
idFrontPhoto: '' |
|
||||
}, |
|
||||
btnDisabled: false, |
|
||||
rule: [{required: true, message: '不能为空', trigger: 'blur'}], |
|
||||
rules: { |
|
||||
idNo: [ |
|
||||
{ required: true, message: '请输入身份证号', trigger: 'blur' }, |
|
||||
{ pattern: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/, |
|
||||
message: '身份证号格式错误', trigger: 'blur' , |
|
||||
} |
|
||||
], |
|
||||
name: [ |
|
||||
{ required: true, message: '请输入真实姓名', trigger: 'blur' } |
|
||||
], |
|
||||
mobile: [ |
|
||||
{ required: true, validator: validatorPhone, trigger: 'blur' } |
|
||||
], |
|
||||
verificationCode: [ |
|
||||
{ required: true, message: '请输入手机验证码', trigger: 'blur' } |
|
||||
], |
|
||||
userName: [ |
|
||||
{ required: true, message: '请输入身份证号', trigger: 'blur' } |
|
||||
], |
|
||||
password: [ |
|
||||
{ required: true, message: '请输入密码', trigger: 'blur' }, |
|
||||
{ min: 8, max: 10, message: '长度在 8 到 10 个字符大小写字母和数字组合', trigger: 'blur' } |
|
||||
], |
|
||||
rePassword: [ |
|
||||
{ required: true, validator: validatePass2, trigger: 'blur' } |
|
||||
], |
|
||||
idFrontPhoto: [ |
|
||||
{ required: true, message: '请输入上传身份证', trigger: 'blur' } |
|
||||
], |
|
||||
idBackPhoto: [ |
|
||||
{ required: true, message: '请输入上传身份证', trigger: 'blur' } |
|
||||
], |
|
||||
} |
|
||||
}; |
|
||||
}, |
|
||||
methods: { |
|
||||
// 手机验证码 |
|
||||
getcode() { |
|
||||
let _this = this |
|
||||
if (!/^1\d{10}$/.test(_this.userForm.mobile)) { |
|
||||
this.$message({ |
|
||||
type: 'error', |
|
||||
message: '手机号格式错误!' |
|
||||
}); |
|
||||
}else { |
|
||||
_this.downTime = 60 |
|
||||
let timeInterval = null |
|
||||
_this.isDisabled = true |
|
||||
timeInterval = setInterval(()=>{ |
|
||||
--_this.downTime |
|
||||
if(_this.downTime == 0){ |
|
||||
clearInterval(timeInterval) |
|
||||
_this.downTime = ''; |
|
||||
_this.isDisabled = false |
|
||||
} |
|
||||
},1000) |
|
||||
getVerificationCode({ |
|
||||
mobile: _this.userForm.mobile |
|
||||
}).then(res =>{ |
|
||||
// this.isDisabled = false |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
FrontPhotoUrl(url){ |
|
||||
this.userForm.idFrontPhoto = url.filePath |
|
||||
}, |
|
||||
BackPhotoUrl(url){ |
|
||||
this.userForm.idBackPhoto = url.filePath |
|
||||
}, |
|
||||
submitForm(formName) { |
|
||||
this.btnDisabled = true |
|
||||
this.$refs[formName].validate((valid) => { |
|
||||
if (valid) { |
|
||||
registUser(qs.stringify(this.userForm)).then((res) => { |
|
||||
this.btnDisabled = false |
|
||||
this.$confirm('注册成功, 是否关闭页面?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'success' |
|
||||
}).then(() => { |
|
||||
window.close(); |
|
||||
}) |
|
||||
}).catch(() => { |
|
||||
this.btnDisabled = false |
|
||||
}) |
|
||||
} else { |
|
||||
return false; |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
resetForm(formName) { |
|
||||
window.close(); |
|
||||
this.$refs[formName].resetFields(); |
|
||||
}, |
|
||||
onInputBlur() { // 用户名密码 |
|
||||
this.userForm.userName = this.userForm.idNo |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss" scoped> |
|
||||
@import "~@/styles/variables.scss"; |
|
||||
h3{margin: 0;padding: 0;} |
|
||||
.el-header{ |
|
||||
width: 100%; |
|
||||
background-color: #0294d7; |
|
||||
color: #fff; |
|
||||
line-height: 60px; |
|
||||
overflow: hidden; |
|
||||
position: fixed; |
|
||||
z-index: 99; |
|
||||
top: 0; |
|
||||
.title{ |
|
||||
float: left; |
|
||||
font-size: 26px; |
|
||||
margin-left: 35px; |
|
||||
} |
|
||||
} |
|
||||
.content{ |
|
||||
padding: 50px 0; |
|
||||
background-color: #f7f9fc; |
|
||||
} |
|
||||
</style> |
|
||||
|
|
||||
<style lang="scss"> |
|
||||
@import "~@/styles/variables.scss"; |
|
||||
.opcity{ |
|
||||
opacity: 1 !important; |
|
||||
} |
|
||||
.user-from { |
|
||||
width: 860px; |
|
||||
padding-top: 20px; |
|
||||
margin: 0 auto; |
|
||||
.el-input__inner:focus { |
|
||||
border: 1px solid $border-color; |
|
||||
} |
|
||||
.Tips { |
|
||||
padding-left: 10px; |
|
||||
position: absolute; |
|
||||
left: 100%; |
|
||||
top: 0; |
|
||||
} |
|
||||
|
|
||||
.pasTips { |
|
||||
display: flex; |
|
||||
justify-content: center; |
|
||||
|
|
||||
span { |
|
||||
display: inline-block; |
|
||||
margin: 15px 10px 0 10px; |
|
||||
padding: 0 30px; |
|
||||
line-height: 30px; |
|
||||
border-top: 3px solid red; |
|
||||
opacity: 0.3; |
|
||||
} |
|
||||
|
|
||||
span:nth-child(2) { |
|
||||
border-color: blue; |
|
||||
} |
|
||||
|
|
||||
span:nth-child(3) { |
|
||||
border-color: green; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader .el-upload { |
|
||||
border: 1px dashed #d9d9d9; |
|
||||
border-radius: 6px; |
|
||||
cursor: pointer; |
|
||||
position: relative; |
|
||||
overflow: hidden; |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader .el-upload:hover { |
|
||||
border-color: #409EFF; |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader-icon { |
|
||||
font-size: 28px; |
|
||||
color: #8c939d; |
|
||||
width: 200px; |
|
||||
height: 178px; |
|
||||
line-height: 178px; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
.avatar { |
|
||||
width: 178px; |
|
||||
height: 178px; |
|
||||
display: block; |
|
||||
} |
|
||||
} |
|
||||
</style> |
|
@ -1,501 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|
||||
<el-tab-pane label="角色列表" name="roleList"> |
|
||||
|
|
||||
<div class="container"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="search" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="16"> |
|
||||
<el-form-item label="角色名称"> |
|
||||
<el-input v-model="search.name" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-button @click="getroleOrgList(1)">查询</el-button> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- table --> |
|
||||
<el-table :data="roleTable" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="440px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click="sourceMenus(scope.row)" type="primary" size="mini">资源授权</el-button> |
|
||||
<el-button @click="funMenus(scope.row)" type="primary" size="mini">功能授权</el-button> |
|
||||
<el-button @click="roleMenus(scope.row)" type="primary" size="mini">菜单授权</el-button> |
|
||||
<el-button @click="editRow(scope.row)" type="primary" size="mini">修改</el-button> |
|
||||
<el-button @click="delRow(scope.row)" type="danger" size="mini">删除</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="name" label="角色名称" width="220px" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="remarks" label="备注" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="isEnableName" label="是否可用" align="center"></el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" /> |
|
||||
|
|
||||
<!-- 编辑角色信息 --> |
|
||||
<el-dialog :title="dialogTitle + '角色信息'" :visible.sync="editDialog" width="40%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>角色名称</td> |
|
||||
<td><el-input v-model="roleForm.name"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>编码</td> |
|
||||
<td><el-input v-model="roleForm.code"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>排序</td> |
|
||||
<td><el-input v-model="roleForm.sort"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>备注</td> |
|
||||
<td> |
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="editDialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
<!-- 资源授权 --> |
|
||||
<el-dialog title="资源授权" :visible.sync="sourceDialog" width="50%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>角色名称</td> |
|
||||
<td><el-input v-model="roleForm.name" readonly></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>可操作资源列表</td> |
|
||||
<td> |
|
||||
<el-tree v-loading="loading" :data="treedata" ref="sourceTree" show-checkbox accordion node-key="sid" |
|
||||
:default-expand-all='true' |
|
||||
:default-checked-keys="checkedId" :props="sourcedefaultProps" @check-change="checkchange"> |
|
||||
</el-tree> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div slot="footer" class="text-center"> |
|
||||
<el-button type="primary" @click="sourceSave">保 存</el-button> |
|
||||
<el-button @click="sourceDialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
<!-- 功能授权 --> |
|
||||
<el-dialog title="功能授权" :visible.sync="funDialog" width="50%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>角色名称</td> |
|
||||
<td><el-input v-model="roleForm.name" readonly></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>可操作功能列表</td> |
|
||||
<td> |
|
||||
<el-tree v-loading="loading" :data="treedata" ref="funTree" show-checkbox accordion node-key="sid" |
|
||||
:default-expand-all='true' |
|
||||
:default-checked-keys="checkedId" :props="defaultProps" @check-change="checkchange"> |
|
||||
</el-tree> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div slot="footer" class="text-center"> |
|
||||
<el-button type="primary" @click="funSave">保 存</el-button> |
|
||||
<el-button @click="funDialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
<!-- 菜单授权 --> |
|
||||
<el-dialog title="菜单授权" :visible.sync="roleDialog" width="50%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>角色名称</td> |
|
||||
<td><el-input v-model="roleForm.name" readonly></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>可操作菜单列表</td> |
|
||||
<td> |
|
||||
<el-tree v-loading="loading" :data="treedata" ref="Tree" show-checkbox accordion node-key="sid" |
|
||||
:default-expand-all='true' |
|
||||
:default-checked-keys="checkedId" :props="defaultProps" @check-change="checkchange"> |
|
||||
</el-tree> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div slot="footer" class="text-center"> |
|
||||
<el-button type="primary" @click="getCheckedKeys">保 存</el-button> |
|
||||
<el-button @click="roleDialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane label="新增角色" name="addrole"> |
|
||||
<el-card class="box-card"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>角色名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="roleForm.name"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>编码</td> |
|
||||
<td> |
|
||||
<el-input v-model="roleForm.code"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>排序</td> |
|
||||
<td> |
|
||||
<el-input v-model="roleForm.sort"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>备注</td> |
|
||||
<td> |
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
</div> |
|
||||
</el-card> |
|
||||
</el-tab-pane> |
|
||||
</el-tabs> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
roleOrgList, |
|
||||
saveOrgroles, |
|
||||
putOrgroles, |
|
||||
delOrgroles, |
|
||||
setRoleEnable, |
|
||||
roleMenuTree, |
|
||||
saveorgrolemenus, |
|
||||
sourceMenuTree, |
|
||||
saveSource, |
|
||||
funMenuTree, |
|
||||
savefunMenu |
|
||||
} from '@/api/system/roleAdminister/index.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
dialogTitle: '', |
|
||||
activeName: 'roleList', |
|
||||
roleForm: { |
|
||||
name:'', |
|
||||
code:'', |
|
||||
sort:'', |
|
||||
type:'2', |
|
||||
remarks:'' |
|
||||
}, |
|
||||
formBackup: {}, |
|
||||
search: { |
|
||||
name: '' |
|
||||
}, |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
}, |
|
||||
roleTable: [], |
|
||||
editDialog: false, |
|
||||
// 树形 |
|
||||
loading: false, |
|
||||
defaultProps: { |
|
||||
children: 'children', |
|
||||
label: 'name' |
|
||||
}, |
|
||||
checkedId: [], // 菜单授权 已选中 |
|
||||
treedata: [], // 菜单授权 |
|
||||
chace: [], |
|
||||
roleDialog: false, |
|
||||
Thisrow: {}, |
|
||||
// 资源授权 |
|
||||
sourceDialog:false, |
|
||||
sourcetreedata:[], |
|
||||
sourcedefaultProps: { |
|
||||
children: 'children', |
|
||||
label: 'sourceName' |
|
||||
}, |
|
||||
// 功能授权 |
|
||||
funDialog:false |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.formBackup = Object.assign({}, this.roleForm), |
|
||||
this.getroleOrgList() |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页函数 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getroleOrgList() |
|
||||
}, |
|
||||
// 分页列表 |
|
||||
getroleOrgList(flag) { |
|
||||
if(flag == '1'){ |
|
||||
this.page.current = 1 |
|
||||
} |
|
||||
let params = this.page |
|
||||
params.params = this.search |
|
||||
roleOrgList(params).then(res => { |
|
||||
this.page.total = res.data.total |
|
||||
this.roleTable = res.data.records |
|
||||
for(let i=0;i<this.roleTable.length;i++){ |
|
||||
if(this.roleTable[i].isEnable == '1'){ |
|
||||
this.roleTable[i].isEnableName = '是' |
|
||||
}else{ |
|
||||
this.roleTable[i].isEnableName = '否' |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
handleClick(tab, event) { |
|
||||
if(tab.name == 'addrole'){ |
|
||||
this.dialogTitle = '新增' |
|
||||
this.roleForm = Object.assign({}, this.formBackup) |
|
||||
}else{ |
|
||||
this.getroleOrgList() |
|
||||
} |
|
||||
}, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.editDialog = true |
|
||||
this.roleForm = Object.assign({}, row) |
|
||||
}, |
|
||||
delRow(row) { |
|
||||
this.$confirm('确定要删除该角色吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
delOrgroles({ |
|
||||
sid: row.sid |
|
||||
}).then(res => { |
|
||||
this.getroleOrgList() |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
// 保存角色 |
|
||||
save() { |
|
||||
if (this.roleForm.sid) { |
|
||||
putOrgroles(this.roleForm).then(res => { |
|
||||
if (res.code == '200') { |
|
||||
this.getroleOrgList() |
|
||||
this.editDialog = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
saveOrgroles(this.roleForm).then(res => { |
|
||||
if (res.code == '200') { |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
this.activeName = "roleList" |
|
||||
this.getroleOrgList() |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
// 是否可用 按钮 |
|
||||
enabledChange(value, row) { |
|
||||
setRoleEnable({ |
|
||||
isEnable: value, |
|
||||
sid: row.sid |
|
||||
}).then(res => { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
}) |
|
||||
}, |
|
||||
sourceMenus(row){ |
|
||||
this.sourceDialog = true |
|
||||
this.checkedId = [] |
|
||||
this.roleForm.name = row.name |
|
||||
this.Thisrow = row |
|
||||
this.loading = true |
|
||||
let params = { |
|
||||
roleSid: row.sid |
|
||||
} |
|
||||
sourceMenuTree(params).then(res => { |
|
||||
let data1 = res.data |
|
||||
for(let i=0;i<data1.length;i++){ |
|
||||
if(data1[i].checked == 0){ |
|
||||
this.checkedId.push(data1[i].sid) |
|
||||
} |
|
||||
} |
|
||||
this.treedata = res.data |
|
||||
this.loading = false |
|
||||
}) |
|
||||
}, |
|
||||
funMenus(row){ |
|
||||
this.funDialog = true |
|
||||
this.checkedId = [] |
|
||||
this.roleForm.name = row.name |
|
||||
this.Thisrow = row |
|
||||
this.loading = true |
|
||||
let params = { |
|
||||
roleSid: row.sid |
|
||||
} |
|
||||
funMenuTree(params).then(res => { |
|
||||
let data1 = res.data |
|
||||
for(let i=0;i<data1.length;i++){ |
|
||||
if(data1[i].checked == 0){ |
|
||||
this.checkedId.push(data1[i].sid) |
|
||||
} |
|
||||
for(let j=0;j<data1[i].children.length;j++){ |
|
||||
let data2 = data1[i].children |
|
||||
if(data2[j].checked == 0){ |
|
||||
this.checkedId.push(data2[j].sid) |
|
||||
} |
|
||||
for(let k=0;k<data2[j].children.length;k++){ |
|
||||
let data3 = data2[j].children |
|
||||
if(data3[k].checked == 0){ |
|
||||
this.checkedId.push(data3[k].sid) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
this.treedata = res.data |
|
||||
this.loading = false |
|
||||
}) |
|
||||
}, |
|
||||
// 获取授权菜单树形 |
|
||||
roleMenus(row) { |
|
||||
this.roleDialog = true |
|
||||
this.checkedId = [] |
|
||||
this.roleForm.name = row.name |
|
||||
this.Thisrow = row |
|
||||
this.loading = true |
|
||||
let params = { |
|
||||
roleSid: row.sid |
|
||||
} |
|
||||
roleMenuTree(params).then(res => { |
|
||||
let data1 = res.data |
|
||||
for(let i=0;i<data1.length;i++){ |
|
||||
if(data1[i].checked == 0){ |
|
||||
this.checkedId.push(data1[i].sid) |
|
||||
} |
|
||||
for(let j=0;j<data1[i].children.length;j++){ |
|
||||
let data2 = data1[i].children |
|
||||
if(data2[j].checked == 0){ |
|
||||
this.checkedId.push(data2[j].sid) |
|
||||
} |
|
||||
for(let k=0;k<data2[j].children.length;k++){ |
|
||||
let data3 = data2[j].children |
|
||||
if(data3[k].checked == 0){ |
|
||||
this.checkedId.push(data3[k].sid) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
this.treedata = res.data |
|
||||
this.getTreeParentNode(res.data, this.checkedId) |
|
||||
this.getTreeParentid(res.data) |
|
||||
this.loading = false |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
// 递归查询所有上级数据 |
|
||||
getTreeParentNode(menus, ids) { |
|
||||
for (var i = 0; i < menus.length; i++) { |
|
||||
if (menus[i].children && menus[i].children.length != 0) { |
|
||||
this.getTreeParentNode(menus[i].children, ids) |
|
||||
} else if (menus[i].isCheck) { |
|
||||
ids.push(menus[i].sid) |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
// 所有一级菜单ID |
|
||||
getTreeParentid(menus) { |
|
||||
for (var i = 0; i < menus.length; i++) { |
|
||||
this.chace.push(menus[i].sid) |
|
||||
} |
|
||||
}, |
|
||||
// 资源授权保存 |
|
||||
sourceSave(){ |
|
||||
let _this = this |
|
||||
let sourceMenus = this.$refs.sourceTree.getCheckedKeys() |
|
||||
let params={ |
|
||||
sorceSid:sourceMenus.toString(), |
|
||||
roleSid:_this.Thisrow.sid |
|
||||
} |
|
||||
saveSource(params).then(res => { |
|
||||
this.sourceDialog = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
// 功能授权保存 |
|
||||
funSave(){ |
|
||||
let _this = this |
|
||||
let funMenus = this.$refs.funTree.getCheckedKeys() |
|
||||
let params={ |
|
||||
functionSid:funMenus.toString(), |
|
||||
roleSid:_this.Thisrow.sid |
|
||||
} |
|
||||
savefunMenu(params).then(res => { |
|
||||
this.funDialog = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
// 菜单授权 |
|
||||
getCheckedKeys() { |
|
||||
let _this = this |
|
||||
let roleMenus = [] |
|
||||
roleMenus = this.$refs.Tree.getCheckedKeys() |
|
||||
|
|
||||
// let parentTrue = this.$refs.Tree.getHalfCheckedKeys() |
|
||||
// for (let i = 0; i < parentTrue.length; i++) { |
|
||||
// for (let j = 0; j < this.chace.length; j++) { |
|
||||
// if (parentTrue[i] == this.chace[j]) { |
|
||||
// parentTrue.splice(i, 1); |
|
||||
// } |
|
||||
// } |
|
||||
// } |
|
||||
let params={ |
|
||||
menuSid:roleMenus.toString(), |
|
||||
roleSid:_this.Thisrow.sid |
|
||||
} |
|
||||
saveorgrolemenus(params).then(res => { |
|
||||
this.roleDialog = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
checkchange(){ |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style scoped="scoped"> |
|
||||
.my-tabs{ |
|
||||
margin-top: 10px; |
|
||||
} |
|
||||
</style> |
|
@ -1,77 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange"> |
|
||||
<el-table-column type="selection" width="55"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="日期" width="120"> |
|
||||
<template slot-scope="scope">{{ scope.row.date }}</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="name" label="姓名" width="120"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="address" label="地址" show-overflow-tooltip> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<div style="margin-top: 20px"> |
|
||||
<el-button @click="toggleSelection([tableData[1], tableData[2]])">切换第二、第三行的选中状态</el-button> |
|
||||
<el-button @click="toggleSelection()">取消选择</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
tableData: [{ |
|
||||
date: '2016-05-03', |
|
||||
name: '王小虎', |
|
||||
address: '上海市普陀区金沙江路 1518 弄' |
|
||||
}, { |
|
||||
date: '2016-05-02', |
|
||||
name: '王小虎', |
|
||||
address: '上海市普陀区金沙江路 1518 弄' |
|
||||
}, { |
|
||||
date: '2016-05-04', |
|
||||
name: '王小虎', |
|
||||
address: '上海市普陀区金沙江路 1518 弄' |
|
||||
}, { |
|
||||
date: '2016-05-01', |
|
||||
name: '王小虎', |
|
||||
address: '上海市普陀区金沙江路 1518 弄' |
|
||||
}, { |
|
||||
date: '2016-05-08', |
|
||||
name: '王小虎', |
|
||||
address: '上海市普陀区金沙江路 1518 弄' |
|
||||
}, { |
|
||||
date: '2016-05-06', |
|
||||
name: '王小虎', |
|
||||
address: '上海市普陀区金沙江路 1518 弄' |
|
||||
}, { |
|
||||
date: '2016-05-07', |
|
||||
name: '王小虎', |
|
||||
address: '上海市普陀区金沙江路 1518 弄' |
|
||||
}], |
|
||||
multipleSelection: [] |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
toggleSelection(rows) { |
|
||||
if (rows) { |
|
||||
rows.forEach(row => { |
|
||||
this.$refs.multipleTable.toggleRowSelection(row); |
|
||||
}); |
|
||||
} else { |
|
||||
this.$refs.multipleTable.clearSelection(); |
|
||||
} |
|
||||
}, |
|
||||
handleSelectionChange(val) { |
|
||||
this.multipleSelection = val; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
@ -1,217 +0,0 @@ |
|||||
<template> |
|
||||
<div class="container"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="14"> |
|
||||
<el-form-item label="数据value"> |
|
||||
<el-input v-model="page.params.dictValue" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="10"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="onSearch()">查 询</el-button> |
|
||||
<el-button @click="add()">添 加</el-button> |
|
||||
<el-button @click="closeDict">返 回</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" align="center" width="280px"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="add(scope.row)"> |
|
||||
添加子级 |
|
||||
</el-button> |
|
||||
<el-button type="primary" size="mini" @click="editRow(scope.row)"> |
|
||||
修改 |
|
||||
</el-button> |
|
||||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="dictType" label="字典分类编码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="dictKey" label="数据key" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="dictValue" label="数据value" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
|
|
||||
<!-- 分类编辑 --> |
|
||||
<el-dialog :title="dialogTitle + '字典分类'" :visible.sync="editDialog" width="50%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>字典分类编码</td> |
|
||||
<td> |
|
||||
{{form.dictType}} |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>数据key</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.dictKey"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>数据value</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.dictValue"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<span slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="editDialog = false">关 闭</el-button> |
|
||||
</span> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import axios from 'axios' |
|
||||
import { dictCommonList, savedictCommon, putdictCommon, deldictCommon } from '@/api/system/dictType/dictCommon.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
editDialog: false, |
|
||||
dialogTitle: '', |
|
||||
form: { |
|
||||
dictKey: '', |
|
||||
dictType: '', |
|
||||
dictValue: '', |
|
||||
parentSid: '' |
|
||||
}, |
|
||||
formBackup: Object.assign({}, this.form), |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params:{ |
|
||||
dictKey: '', |
|
||||
dictType: '', |
|
||||
dictValue: '', |
|
||||
parentSid: '', |
|
||||
sidPath: '', |
|
||||
} |
|
||||
}, |
|
||||
tableData: [] |
|
||||
} |
|
||||
}, |
|
||||
props:['dictData'], |
|
||||
watch:{ |
|
||||
dictData: { |
|
||||
handler(val) { |
|
||||
this.form.parentSid = val.sid |
|
||||
this.form.dictType = val.dictType |
|
||||
this.page.params.parentSid = val.sid |
|
||||
this.page.params.dictType = val.dictType |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
deep: true, |
|
||||
}, |
|
||||
}, |
|
||||
mounted() { |
|
||||
// if (this.$route.query.sid) { |
|
||||
// sessionStorage.setItem('dictType', this.$route.query.dictType); |
|
||||
// sessionStorage.setItem('parentSid', this.$route.query.sid); |
|
||||
// this.page.params.dictType = this.$route.query.dictType |
|
||||
// this.page.params.parentSid = this.$route.query.sid |
|
||||
// this.form.dictType = this.$route.query.dictType; |
|
||||
// this.form.parentSid = this.$route.query.sid |
|
||||
// } else { |
|
||||
// this.page.params.dictType = sessionStorage.getItem('dictType'); |
|
||||
// this.page.params.parentSid = sessionStorage.getItem('parentSid'); |
|
||||
// this.form.dictType = sessionStorage.getItem('dictType'); |
|
||||
// this.form.parentSid = sessionStorage.getItem('parentSid'); |
|
||||
// } |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
onSearch() { //查询 |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ // 重置 |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
getPageList(data){ // 获取列表 |
|
||||
dictCommonList(data).then((res)=>{ |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
add(row){ |
|
||||
if(row){ |
|
||||
this.form.dictType = row.dictType |
|
||||
}else{ |
|
||||
// this.form = Object.assign({}, this.formBackup) |
|
||||
// this.form.dictType = this.$route.query.dictType |
|
||||
} |
|
||||
this.dialogTitle = '新增' |
|
||||
this.editDialog = true |
|
||||
|
|
||||
}, |
|
||||
closeDict(){ |
|
||||
this.$emit('show',false) |
|
||||
}, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.editDialog = true |
|
||||
this.form = Object.assign({}, row) |
|
||||
|
|
||||
}, |
|
||||
save(){ |
|
||||
this.form.parentSid = this.$route.query.sid |
|
||||
if(this.form.sid){ |
|
||||
putdictCommon(this.form).then(res => { |
|
||||
this.editDialog = false |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}else{ |
|
||||
savedictCommon(this.form).then(res => { |
|
||||
this.editDialog = false |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
deleteRow(row) { |
|
||||
this.$confirm('确定要删除该数据吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
deldictCommon({sid: row.sid}).then(res => { |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss"> |
|
||||
|
|
||||
</style> |
|
@ -1,200 +0,0 @@ |
|||||
<template> |
|
||||
<div class="container"> |
|
||||
<div v-show="!commonShow"> |
|
||||
|
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="14"> |
|
||||
<el-form-item label="分类名称"> |
|
||||
<el-input v-model="page.params.dictTypeName"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="10"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="onSearch()">查询</el-button> |
|
||||
<!--<el-button @click="add()">添加</el-button>--> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" align="center" width="220px"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="guanli(scope.row)"> |
|
||||
管理 |
|
||||
</el-button> |
|
||||
<el-button type="primary" size="mini" @click="editRow(scope.row)"> |
|
||||
修改 |
|
||||
</el-button> |
|
||||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="dictTypeCode" label="字典分类编码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="dictTypeName" label="字典分类名称" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="remarks" label="说明" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
|
|
||||
<!-- 分类编辑 --> |
|
||||
<el-dialog :title="dialogTitle + '字典分类'" :visible.sync="editDialog" width="50%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>数据字典code</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.dictTypeCode"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>数据分类名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.dictTypeName"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>说明</td> |
|
||||
<td> |
|
||||
<el-input type="textarea" v-model="form.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<span slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="editDialog = false">关 闭</el-button> |
|
||||
</span> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
<dict-common @show = 'isShow' :dictData ='dictData' v-show="commonShow"></dict-common> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { pageList, saveDictType, putDictType, delDictType } from '@/api/system/dictType/index.js' |
|
||||
import dictCommon from './dictCommon.vue' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
editDialog: false, |
|
||||
dialogTitle: '', |
|
||||
form: {}, |
|
||||
formBackup: Object.assign({}, this.form), |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params:{ |
|
||||
dictTypeName: '', |
|
||||
dictTypeCode: '' |
|
||||
} |
|
||||
}, |
|
||||
tableData: [], |
|
||||
commonShow:false, |
|
||||
dictData:{} |
|
||||
} |
|
||||
}, |
|
||||
components:{ |
|
||||
dictCommon |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
onSearch() { //查询 |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ // 重置 |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
getPageList(data){ // 获取列表 |
|
||||
pageList(data).then((res)=>{ |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
// add(){ |
|
||||
// this.dialogTitle = '新增' |
|
||||
// this.editDialog = true |
|
||||
// this.form = Object.assign({}, this.formBackup) |
|
||||
// }, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.editDialog = true |
|
||||
this.form = Object.assign({}, row) |
|
||||
}, |
|
||||
save(){ |
|
||||
if(this.form.sid){ |
|
||||
putDictType(this.form).then(res => { |
|
||||
this.editDialog = false |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}else{ |
|
||||
saveDictType(this.form).then(res => { |
|
||||
this.editDialog = false |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
deleteRow(row) { |
|
||||
this.$confirm('确定要删除该条数据吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
delDictType({sid: row.sid}).then(res => { |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
guanli(row){ |
|
||||
this.dictData={ |
|
||||
sid: row.sid, |
|
||||
dictType: row.dictTypeCode |
|
||||
} |
|
||||
this.commonShow = true |
|
||||
// this.$router.push({ |
|
||||
// path: '/dictCommon', |
|
||||
// name:'', |
|
||||
// query: { |
|
||||
// sid: row.sid, |
|
||||
// dictType: row.dictTypeCode |
|
||||
// } |
|
||||
// }) |
|
||||
}, |
|
||||
isShow(val){ |
|
||||
this.commonShow = val |
|
||||
}, |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped="scoped"> |
|
||||
.my-tabs{ |
|
||||
margin-top: 10px; |
|
||||
} |
|
||||
</style> |
|
@ -1,349 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|
||||
<el-tab-pane label="功能列表" name="roleList"> |
|
||||
|
|
||||
<div class="container"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="search" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="24"> |
|
||||
<el-form-item label="功能名称"> |
|
||||
<el-input v-model="search.name" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-button @click="getList">查询</el-button> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- table --> |
|
||||
<el-table :data="roleTable" border style="width: 100%;" |
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
|
||||
row-key="sid" |
|
||||
ref="multipleTable" |
|
||||
header-cell-class-name="table-header" |
|
||||
> |
|
||||
<!--<el-table-column label="序号" width="50px" type="index" align="center"></el-table-column>--> |
|
||||
<el-table-column prop="name" label="功能名称" width="200px" align="left"></el-table-column> |
|
||||
<el-table-column label="操作" width="280px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click="addChildren(scope.row)" type="primary" size="mini"> 添加子功能 </el-button> |
|
||||
<el-button @click="editRow(scope.row)" v-if="scope.row.isSource == '0'" type="primary" size="mini"> 修改 </el-button> |
|
||||
<el-button @click="delRow(scope.row)" v-if="scope.row.isSource == '0'" type="danger" size="mini"> 删除 </el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="actionUrl" label="url地址" width="200" align="center"></el-table-column> |
|
||||
<!--<el-table-column prop="sourceName" label="模块名称" align="center"></el-table-column>--> |
|
||||
<el-table-column prop="isEnable" label="是否可用" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-switch |
|
||||
v-model="scope.row.isEnable" |
|
||||
active-value='1' |
|
||||
inactive-value='0' |
|
||||
active-color="#13ce66" |
|
||||
inactive-color="#ff4949" |
|
||||
@change="enabledChange($event,scope.row)"> |
|
||||
</el-switch> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<!--<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" />--> |
|
||||
|
|
||||
<!-- 编辑功能信息 --> |
|
||||
<el-dialog :title="dialogTitle + '功能信息'" :visible.sync="editDialog" width="40%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>上级功能</td> |
|
||||
<td><el-input v-model="roleForm.parentName" :disabled="true"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>功能名称</td> |
|
||||
<td><el-input v-model="roleForm.name"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>url地址</td> |
|
||||
<td><el-input v-model="roleForm.actionUrl"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>模块名称</td> |
|
||||
<td> |
|
||||
<el-select v-model="roleForm.sourceSid"> |
|
||||
<el-option |
|
||||
v-for="(item, i) in sourceNameData" |
|
||||
:key="i" |
|
||||
:label="item.sourceName" |
|
||||
:value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>终端权限</td> |
|
||||
<td> |
|
||||
<el-checkbox-group v-model="phoneFunction"> |
|
||||
<!--<el-checkbox v-for="(item,index) in phoneFunctionData" :label="item.name"></el-checkbox>--> |
|
||||
<el-checkbox label="0" name="type">pc端</el-checkbox> |
|
||||
<el-checkbox label="1" name="type">移动端</el-checkbox> |
|
||||
</el-checkbox-group> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>说明</td> |
|
||||
<td> <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input></td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="editDialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane label="新增功能" name="addrole"> |
|
||||
<el-card class="box-card"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>上级功能</td> |
|
||||
<td><el-input v-model="roleForm.parentName" :disabled="true"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>功能名称</td> |
|
||||
<td><el-input v-model="roleForm.name"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>url地址</td> |
|
||||
<td><el-input v-model="roleForm.actionUrl"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>模块名称</td> |
|
||||
<td> |
|
||||
<el-select v-model="roleForm.sourceSid"> |
|
||||
<el-option |
|
||||
v-for="(item, i) in sourceNameData" |
|
||||
:key="i" |
|
||||
:label="item.sourceName" |
|
||||
:value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>终端权限</td> |
|
||||
<td> |
|
||||
<el-checkbox-group v-model="phoneFunction"> |
|
||||
<!--<el-checkbox v-for="(item,index) in phoneFunctionData" :label="item.name"></el-checkbox>--> |
|
||||
<el-checkbox label="0" name="type">pc端</el-checkbox> |
|
||||
<el-checkbox label="1" name="type">移动端</el-checkbox> |
|
||||
</el-checkbox-group> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>说明</td> |
|
||||
<td> <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input></td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
</div> |
|
||||
</el-card> |
|
||||
</el-tab-pane> |
|
||||
</el-tabs> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
pageList, |
|
||||
savePost, |
|
||||
sourceList, |
|
||||
delOrgroles, |
|
||||
getSingleData, |
|
||||
putOrgroles, |
|
||||
IsEnable |
|
||||
} from '@/api/system/functional/functional.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
dialogTitle: '', |
|
||||
activeName: 'roleList', |
|
||||
roleForm: { |
|
||||
sid:'', |
|
||||
parentName:'顶级菜单', |
|
||||
parentSid:'0', |
|
||||
name:'', |
|
||||
actionUrl:'', |
|
||||
// controllerName:'', |
|
||||
sourceSid:'', |
|
||||
phoneFunction:'', |
|
||||
remarks: "", |
|
||||
}, |
|
||||
phoneFunction:[], |
|
||||
phoneFunctionData:[{ |
|
||||
name:'PC端', |
|
||||
id:'0' |
|
||||
},{ |
|
||||
name:'移动端', |
|
||||
id:'1' |
|
||||
}], |
|
||||
// 模块名称 |
|
||||
sourceNameData:[], |
|
||||
formBackup: {}, |
|
||||
search: { |
|
||||
name: '' |
|
||||
}, |
|
||||
orgName:'', |
|
||||
roleTable: [], |
|
||||
editDialog: false, |
|
||||
// 树形 |
|
||||
loading: false, |
|
||||
defaultProps: { |
|
||||
children: 'children', |
|
||||
label: 'name' |
|
||||
}, |
|
||||
orgdata:[], // 部门 |
|
||||
checkedId: [], |
|
||||
treedata: [], |
|
||||
// chace: [], |
|
||||
// roleDialog: false, |
|
||||
// Thisrow: {}, |
|
||||
// orgListAll:[] |
|
||||
|
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.formBackup = Object.assign({}, this.roleForm), |
|
||||
this.getList() |
|
||||
this.getsourceList() |
|
||||
}, |
|
||||
methods: { |
|
||||
// 分页列表 |
|
||||
getList() { |
|
||||
// let params = this.search |
|
||||
let params={ |
|
||||
name: this.search.name |
|
||||
} |
|
||||
pageList(params).then(res => { |
|
||||
this.roleTable = res.data |
|
||||
console.log(res.data) |
|
||||
}) |
|
||||
}, |
|
||||
// 模块名称 |
|
||||
getsourceList(){ |
|
||||
let params={} |
|
||||
sourceList(params).then(res => { |
|
||||
this.sourceNameData = res.data |
|
||||
this.loading = false |
|
||||
}) |
|
||||
}, |
|
||||
handleClick(tab, event) { |
|
||||
if(tab.name == 'addrole'){ |
|
||||
this.dialogTitle = '新增' |
|
||||
this.roleForm = Object.assign({}, this.formBackup) |
|
||||
}else{ |
|
||||
this.getList() |
|
||||
} |
|
||||
}, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.editDialog = true |
|
||||
this.roleForm = Object.assign({}, row) |
|
||||
getSingleData({id: row.sid }).then(res => { |
|
||||
this.roleForm.parentName= res.data.parentName |
|
||||
this.roleForm.sourceSid= res.data.sourceSid |
|
||||
this.roleForm.sourceName= '' |
|
||||
this.phoneFunction = res.data.phoneFunction.split(",") |
|
||||
}) |
|
||||
}, |
|
||||
addChildren(row){ |
|
||||
this.refersh() |
|
||||
this.activeName= 'addrole' |
|
||||
this.roleForm.parentName = row.name |
|
||||
this.roleForm.parentSid = row.sid |
|
||||
if(row.isSource == '1'){ |
|
||||
this.roleForm.parentName = '顶级菜单' |
|
||||
this.roleForm.parentSid = 0 |
|
||||
}else{ |
|
||||
this.roleForm.parentName = row.name |
|
||||
this.roleForm.parentSid = row.sid |
|
||||
} |
|
||||
}, |
|
||||
delRow(row) { |
|
||||
this.$confirm('确定要删除该功能吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
delOrgroles({ |
|
||||
sid: row.sid |
|
||||
}).then(res => { |
|
||||
this.getList() |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
// 保存角色 |
|
||||
save() { |
|
||||
this.roleForm.phoneFunction = this.phoneFunction.toString() |
|
||||
if (this.roleForm.sid) { |
|
||||
putOrgroles(this.roleForm).then(res => { |
|
||||
if (res.code == '200') { |
|
||||
this.getList() |
|
||||
this.editDialog = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
savePost(this.roleForm).then(res => { |
|
||||
if (res.code == '200') { |
|
||||
this.getList() |
|
||||
this.activeName = "roleList" |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
refersh(){ |
|
||||
this.roleForm= { |
|
||||
parentName:'顶级菜单', |
|
||||
parentSid:'0', |
|
||||
name:'', |
|
||||
actionUrl:'', |
|
||||
sourceSid:'', |
|
||||
phoneFunction:'', |
|
||||
remarks: "", |
|
||||
} |
|
||||
}, |
|
||||
// 是否可用 按钮 |
|
||||
enabledChange(value, row) { |
|
||||
IsEnable({ |
|
||||
sid: row.sid |
|
||||
}).then(res => { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
|
|
||||
<style scoped="scoped"> |
|
||||
.el-select > .el-input { |
|
||||
display: block; |
|
||||
width: 300px; |
|
||||
} |
|
||||
.my-tabs{ |
|
||||
margin-top: 10px; |
|
||||
} |
|
||||
</style> |
|
@ -1,212 +0,0 @@ |
|||||
<template> |
|
||||
<div class="container"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form :inline="true" :model="form" class="demo-form-inline"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="16"> |
|
||||
<el-form-item label="日志类别"> |
|
||||
<el-input v-model="page.params.eventName" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="getPageList(page)">查询</el-button> |
|
||||
<el-button type="primary" @click="exportExcel" >导出日志</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" type="index" align="center" width="70px"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="eventName" label="日志类别" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="eventContent" label="日志内容" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="userName" label="用户名" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="userIp" label="IP地址" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="timestamp" label="记录时间" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { logPageList } from '@/api/system/log/index.js' |
|
||||
import axios from 'axios' |
|
||||
import { getStorage } from '@/utils/auth' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
radio: '1', |
|
||||
dialogVisible: false, |
|
||||
disabled: false, |
|
||||
form: {}, |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params: { |
|
||||
eventName: '' |
|
||||
} |
|
||||
}, |
|
||||
tableData: [] |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
onSearch() { //查询 |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ // 重置 |
|
||||
this.page = this.pageBackup |
|
||||
}, |
|
||||
getPageList(data){ // 获取列表 |
|
||||
logPageList(data).then((res)=>{ |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
exportExcel(){ // 导出文件 |
|
||||
axios({ |
|
||||
method: 'get', |
|
||||
url: 'api/system/v1/systemlogs/exportLogExcel', |
|
||||
params: this.page, |
|
||||
responseType: 'blob', |
|
||||
headers:{'token': getStorage()} |
|
||||
}).then(response => { |
|
||||
let blob = new Blob([response.data], {type:"application/vnd.ms-excel"}); |
|
||||
if (!!window.ActiveXObject || "ActiveXObject" in window) { |
|
||||
window.navigator.msSaveOrOpenBlob(blob, '日志'); |
|
||||
} else { |
|
||||
let link = document.createElement('a'); |
|
||||
link.href = window.URL.createObjectURL(blob); |
|
||||
link.download = "日志"; |
|
||||
link.click(); |
|
||||
} |
|
||||
}).catch((error) => { |
|
||||
|
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped="scoped" lang="scss"> |
|
||||
.zcxx { |
|
||||
color: #000; |
|
||||
width: 98%; |
|
||||
margin: 0px auto 30px; |
|
||||
background-color: #f7f9fc; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
height: 60px; |
|
||||
line-height: 60px; |
|
||||
|
|
||||
p { |
|
||||
font-size: 18px; |
|
||||
float: left; |
|
||||
margin-top: 0px; |
|
||||
margin-left: 10px; |
|
||||
font-weight: bold; |
|
||||
width: 300px; |
|
||||
} |
|
||||
|
|
||||
.el-button { |
|
||||
float: right; |
|
||||
margin-top: 13px; |
|
||||
border: none; |
|
||||
width: 80px; |
|
||||
padding: 0; |
|
||||
text-align: center; |
|
||||
padding-top: 10px; |
|
||||
padding-bottom: 10px; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
table { |
|
||||
width: 98%; |
|
||||
margin: 0 auto; |
|
||||
|
|
||||
tr { |
|
||||
height: 45px; |
|
||||
vertical-align: top; |
|
||||
} |
|
||||
|
|
||||
td:first-child { |
|
||||
text-align: right; |
|
||||
width: 20%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(2) { |
|
||||
padding-left: 30px; |
|
||||
width: 23%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(3) { |
|
||||
text-align: right; |
|
||||
width: 20%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(4) { |
|
||||
padding-left: 30px; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
span { |
|
||||
font-size: 14px; |
|
||||
color: #015bff; |
|
||||
margin-left: 20px; |
|
||||
} |
|
||||
|
|
||||
.sfz { |
|
||||
border: 1px solid #e6e9f0; |
|
||||
width: 45%; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
#bei { |
|
||||
width: 21.4%; |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader .el-upload { |
|
||||
border: 1px dashed #d9d9d9; |
|
||||
border-radius: 6px; |
|
||||
cursor: pointer; |
|
||||
position: relative; |
|
||||
overflow: hidden; |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader .el-upload:hover { |
|
||||
border-color: #409EFF; |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader-icon { |
|
||||
font-size: 28px; |
|
||||
color: #8c939d; |
|
||||
width: 148px; |
|
||||
height: 148px; |
|
||||
line-height: 148px; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
.avatar { |
|
||||
width: 148px; |
|
||||
height: 148px; |
|
||||
display: block; |
|
||||
} |
|
||||
</style> |
|
@ -1,558 +0,0 @@ |
|||||
<template> |
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|
||||
<el-tab-pane label="菜单列表" name="roleList"> |
|
||||
<div class="content"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form :inline="true" :model="form" class="demo-form-inline"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="18"> |
|
||||
<el-form-item label="菜单名称"> |
|
||||
<el-input v-model="page.params.name" placeholder="菜单名称" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="资源名称"> |
|
||||
<!--<el-select v-model="page.sourceSid" @change="$forceUpdate()" :disabled="isadd"> |
|
||||
<el-option |
|
||||
v-for="(item, i) in sourceNameData" |
|
||||
:key="i" |
|
||||
:label="item.sourceName" |
|
||||
:value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select>--> |
|
||||
<el-input v-model="page.params.sourceName" placeholder="资源名称" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-button type="primary" @click="getPageList">查询</el-button> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="getPageList">保存排序</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<!-- table --> |
|
||||
<div class="table-describe clearfix"> |
|
||||
<h4 style="color:#000;">菜单列表</h4> |
|
||||
</div> |
|
||||
<el-table :data="tableData" border style="width: 100%;" |
|
||||
row-key="sid" |
|
||||
ref="multipleTable" |
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"> |
|
||||
<el-table-column prop="name" label="菜单名称" width="220"></el-table-column> |
|
||||
<el-table-column label="操作" width="260" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="add(scope.row)"> |
|
||||
添加子菜单 |
|
||||
</el-button> |
|
||||
<el-button v-if="scope.row.isSource == '0'" type="primary" size="mini" @click="editRow(scope.row)"> |
|
||||
修改 |
|
||||
</el-button> |
|
||||
<el-button v-if="scope.row.isSource == '0'" type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<!--<el-table-column prop="sourceName" label="资源名称" align="center"></el-table-column>--> |
|
||||
<el-table-column prop="sortNo" sortable label="排序" align="center" width="100"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input v-model="scope.row.sortNo" size="mini" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="pageUrl" label="链接地址" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="isEnable" label="可见性" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-switch |
|
||||
v-model="scope.row.isEnable" |
|
||||
active-color="#13ce66" |
|
||||
inactive-color="#ff4949" |
|
||||
active-value="1" |
|
||||
inactive-value="0" |
|
||||
@change="enabledChange(scope.row.isEnable,scope.row)"> |
|
||||
</el-switch> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
</div> |
|
||||
<!-- <pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> --> |
|
||||
<!-- 编辑功能信息 --> |
|
||||
<el-dialog :title="dialogTitle + '功能信息'" :visible.sync="editDialog" width="40%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td >上级菜单</td> |
|
||||
<td ><el-input v-model="form.pname" :disabled="true"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >资源名称</td> |
|
||||
<td> |
|
||||
<el-select v-model="form.sourceSid" @change="$forceUpdate()" :disabled="isadd"> |
|
||||
<el-option |
|
||||
v-for="(item, i) in sourceNameData" |
|
||||
:key="i" |
|
||||
:label="item.sourceName" |
|
||||
:value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >菜单名称</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.name"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >菜单路由</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.menuUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >菜单图片路径</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.iconUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >前端页面名称</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.pageName"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >前端页面路径</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.pageUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >是否可见</td> |
|
||||
<td > |
|
||||
<el-radio-group v-model="form.isShow"> |
|
||||
<el-radio :label="0">否</el-radio> |
|
||||
<el-radio :label="1">是</el-radio> |
|
||||
</el-radio-group> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>排序号</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.sortNo"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>备注</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="editDialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
|
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane label="新增菜单" name="addrole"> |
|
||||
<!-- 添加 --> |
|
||||
<!--<el-dialog :title="dialogTitle + '菜单管理'" :visible.sync="editDialog" width="40%">--> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td >上级菜单</td> |
|
||||
<td ><el-input v-model="form.pname" :disabled="true"></el-input></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >资源名称</td> |
|
||||
<td> |
|
||||
<el-select v-model="form.sourceSid" @change="$forceUpdate()" :disabled="isadd"> |
|
||||
<el-option |
|
||||
v-for="(item, i) in sourceNameData" |
|
||||
:key="i" |
|
||||
:label="item.sourceName" |
|
||||
:value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >菜单名称</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.name"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >菜单路由</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.menuUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >菜单图片路径</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.iconUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >前端页面名称</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.pageName"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >前端页面路径</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.pageUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >是否可见</td> |
|
||||
<td > |
|
||||
<el-radio-group v-model="form.isShow"> |
|
||||
<el-radio :label="0">否</el-radio> |
|
||||
<el-radio :label="1">是</el-radio> |
|
||||
</el-radio-group> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>排序号</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.sortNo"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>备注</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保存</el-button> |
|
||||
</div> |
|
||||
|
|
||||
</el-tab-pane> |
|
||||
</el-tabs> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { pageList, menusTreelist, saveMenusInfo, putMenusInfo, delMenus,IsEnable } from '@/api/system/menu/index.js' |
|
||||
import { sourceList } from '@/api/system/functional/functional.js' |
|
||||
|
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: 'roleList', |
|
||||
editDialog: false, |
|
||||
dialogTitle: '', |
|
||||
checked: '', |
|
||||
form:{ |
|
||||
pname:'顶级菜单', |
|
||||
iconUrl: "", |
|
||||
isShow: 1, |
|
||||
menuName: "", |
|
||||
menuUrl: "", |
|
||||
pageAliasName: "", |
|
||||
pageName: "", |
|
||||
pageUrl: "", |
|
||||
pageUrlRedirect: "", |
|
||||
psid: "", |
|
||||
remarks: "", |
|
||||
sortNo: 0, |
|
||||
sourceSid: '' |
|
||||
}, |
|
||||
formBackup: Object.assign({}, this.form), |
|
||||
tableData: [], |
|
||||
page: { |
|
||||
current: 1, |
|
||||
size: 10, |
|
||||
total: 0, |
|
||||
params:{ |
|
||||
name: '', |
|
||||
psid: '', |
|
||||
sourceName: '', |
|
||||
sourceSid: '' |
|
||||
} |
|
||||
}, |
|
||||
rank: '1', |
|
||||
sourceNameData: [], // 资源 |
|
||||
isadd: false |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getPageList() |
|
||||
this.getsourceList() |
|
||||
|
|
||||
// getsourceList().then(res => { |
|
||||
// this.sourceNameData = res.data |
|
||||
// }) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getPageList() |
|
||||
}, |
|
||||
resetSearch(){ // 重置 |
|
||||
this.page.params = this.pageBackup |
|
||||
}, |
|
||||
getPageList(){ // 获取列表 |
|
||||
pageList(this.page).then((res)=>{ |
|
||||
let treedata = res.data |
|
||||
console.log('菜单列表', res) |
|
||||
this.tableData = treedata |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
// 资源名称 |
|
||||
getsourceList(){ |
|
||||
let params={} |
|
||||
sourceList(params).then(res => { |
|
||||
this.sourceNameData = res.data |
|
||||
this.loading = false |
|
||||
}) |
|
||||
}, |
|
||||
handleClick(tab, event) { |
|
||||
if(tab.name == 'addrole'){ |
|
||||
this.dialogTitle = '新增' |
|
||||
this.roleForm = Object.assign({}, this.formBackup) |
|
||||
}else{ |
|
||||
this.getPageList() |
|
||||
} |
|
||||
}, |
|
||||
add(row){ |
|
||||
this.activeName= 'addrole' |
|
||||
// if(row == 0){ |
|
||||
// this.isadd = false |
|
||||
// }else{ |
|
||||
// this.isadd = true |
|
||||
// } |
|
||||
// this.dialogTitle = '新增' |
|
||||
// this.editDialog = true |
|
||||
this.form = Object.assign({}, this.formBackup) |
|
||||
this.form.isShow = 1 |
|
||||
// this.form.psid = row.sid || 0 |
|
||||
this.form.pname = row.name || '顶级菜单' |
|
||||
this.form.sourceSid = row.sourceSid || '' |
|
||||
if(row.isSource == '1'){ |
|
||||
this.form.psid = 0 |
|
||||
}else{ |
|
||||
this.form.psid = row.sid |
|
||||
} |
|
||||
}, |
|
||||
editRow(row){ |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.editDialog = true |
|
||||
this.form = Object.assign({}, row) |
|
||||
this.form.isShow = 1 |
|
||||
this.form.pname = row.psid == "0" ? '顶级菜单' : row.pname |
|
||||
}, |
|
||||
save(){ |
|
||||
if(this.form.sid){ |
|
||||
putMenusInfo(this.form).then(res => { |
|
||||
this.editDialog = false |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}else{ |
|
||||
saveMenusInfo(this.form).then(res => { |
|
||||
this.activeName = "roleList" |
|
||||
this.getPageList() |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
deleteRow(row) { |
|
||||
this.$confirm('确定要删除该菜单吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
delMenus({sid: row.sid}).then(res => { |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
// 是否可用 按钮 |
|
||||
enabledChange(value, row) { |
|
||||
IsEnable({ |
|
||||
sid: row.sid |
|
||||
}).then(res => { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
}) |
|
||||
}, |
|
||||
retname(sid){ |
|
||||
obj = this.sourceNameData.find((item)=>{ |
|
||||
return item.sid == sid;//筛选出匹配数据 |
|
||||
}); |
|
||||
return obj.name |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.el-input__inner{ |
|
||||
line-height: 32px; |
|
||||
height: 32px; |
|
||||
} |
|
||||
</style> |
|
||||
|
|
||||
|
|
||||
<style scoped="scoped" lang="scss"> |
|
||||
.el-pagination.is-background .btn-next, |
|
||||
.el-pagination.is-background .btn-prev { |
|
||||
padding: 0 20px; |
|
||||
border: 1px solid #ccc; |
|
||||
border-radius: 2px; |
|
||||
background-color: #FFFFFF; |
|
||||
} |
|
||||
|
|
||||
.el-icon-arrow-left:before, |
|
||||
.el-icon-arrow-right:before { |
|
||||
content: '下一页'; |
|
||||
color: #727272; |
|
||||
} |
|
||||
|
|
||||
.el-icon-arrow-left:before { |
|
||||
content: '上一页'; |
|
||||
} |
|
||||
|
|
||||
.content { |
|
||||
width: 100%; |
|
||||
padding-top: 10px; |
|
||||
font-size: 16px; |
|
||||
color: #fff; |
|
||||
box-sizing: border-box; |
|
||||
} |
|
||||
|
|
||||
.shouye { |
|
||||
position: absolute; |
|
||||
top: -3px; |
|
||||
left: 100px; |
|
||||
font-size: 16px; |
|
||||
color: #0395d8; |
|
||||
font-weight: bold; |
|
||||
} |
|
||||
|
|
||||
.placename { |
|
||||
position: absolute; |
|
||||
top: -3px; |
|
||||
left: 210px; |
|
||||
font-size: 16px; |
|
||||
color: #fff; |
|
||||
font-weight: bold; |
|
||||
} |
|
||||
|
|
||||
.right_cont { |
|
||||
width: 100%; |
|
||||
height: 645px; |
|
||||
background-color: #fff; |
|
||||
margin: 0; |
|
||||
padding: 15px; |
|
||||
box-sizing: border-box; |
|
||||
} |
|
||||
|
|
||||
.cont_head { |
|
||||
height: 40px; |
|
||||
width: 97%; |
|
||||
margin-left: 1.5%; |
|
||||
background-color: #f7f9fc; |
|
||||
overflow: hidden; |
|
||||
} |
|
||||
|
|
||||
.cont_head p { |
|
||||
float: left; |
|
||||
color: #000; |
|
||||
line-height: 40px; |
|
||||
margin-left: 50px; |
|
||||
} |
|
||||
|
|
||||
.cont_head input { |
|
||||
float: left; |
|
||||
height: 24px; |
|
||||
width: 147px; |
|
||||
margin-top: 6px; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
border-radius: 5px; |
|
||||
-webkit-appearance: none; |
|
||||
outline: none; |
|
||||
} |
|
||||
|
|
||||
.cont_head select { |
|
||||
float: left; |
|
||||
height: 28px; |
|
||||
width: 147px; |
|
||||
margin-top: 6px; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
border-radius: 5px; |
|
||||
outline: none; |
|
||||
} |
|
||||
|
|
||||
.chaxun { |
|
||||
height: 28px; |
|
||||
width: 85px; |
|
||||
line-height: 0px; |
|
||||
background-color: #018ad2; |
|
||||
margin-top: 6px; |
|
||||
text-align: center; |
|
||||
padding: 0; |
|
||||
float: right; |
|
||||
margin-right: 6px; |
|
||||
} |
|
||||
|
|
||||
.tishi { |
|
||||
width: 80%; |
|
||||
|
|
||||
margin: auto; |
|
||||
|
|
||||
tr { |
|
||||
height: 50px; |
|
||||
} |
|
||||
|
|
||||
td { |
|
||||
border: 1px solid #e6e9f0; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
td:first-child { |
|
||||
background-color: #f7f9fc; |
|
||||
} |
|
||||
|
|
||||
input { |
|
||||
width: 80%; |
|
||||
height: 30px; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
} |
|
||||
|
|
||||
textarea { |
|
||||
width: 80%; |
|
||||
height: 100px; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
margin-top: 10px; |
|
||||
margin-bottom: 6px; |
|
||||
} |
|
||||
select { |
|
||||
width: 80%; |
|
||||
height: 30px; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
} |
|
||||
} |
|
||||
.my-tabs{ |
|
||||
margin-top: 10px; |
|
||||
} |
|
||||
</style> |
|
@ -1,446 +0,0 @@ |
|||||
<template> |
|
||||
<div class="container" style="display: flex;"> |
|
||||
<div class="org-tree"> |
|
||||
<el-tree :data="treedata" |
|
||||
node-key="sid" |
|
||||
:props="props" |
|
||||
default-expand-all |
|
||||
@node-click="handleNodeClick" |
|
||||
:expand-on-click-node="false" |
|
||||
> |
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }" |
|
||||
@mouseenter="mouseenter(data)" |
|
||||
@mouseleave="mouseleave(data)" |
|
||||
@click.stop.native> |
|
||||
<span>{{ node.label || $store.getters.userInfo.Orgname }}</span> |
|
||||
<span v-show="data.del" class="handle"> |
|
||||
<el-tooltip class="item" effect="dark" content="新增" placement="top-start"> |
|
||||
<el-button type="text" size="mini" @click.stop="() => append(data)" icon="el-icon-circle-plus-outline"> |
|
||||
</el-button> |
|
||||
</el-tooltip> |
|
||||
<el-tooltip v-show="data.sid" class="item" effect="dark" content="修改" placement="top-start"> |
|
||||
<el-button type="text" size="mini" @click.stop="() => deit(data)" icon="el-icon-edit"> |
|
||||
</el-button> |
|
||||
</el-tooltip> |
|
||||
<el-tooltip v-show="data.sid" class="item" effect="dark" content="删除" placement="top-start"> |
|
||||
<el-button type="text" size="mini" @click.stop="() => remove(data)" icon="el-icon-delete"> |
|
||||
</el-button> |
|
||||
</el-tooltip> |
|
||||
</span> |
|
||||
</span> |
|
||||
</el-tree> |
|
||||
</div> |
|
||||
|
|
||||
<el-dialog title="编辑节点" :visible.sync="dialogVisible" width="40%"> |
|
||||
<el-form :model="nodeForm"> |
|
||||
<el-form-item label="部门名称" label-width="120px"> |
|
||||
<el-input v-model="nodeForm.name" autocomplete="off"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="排序号" label-width="120px"> |
|
||||
<el-input v-model="nodeForm.sortNo" autocomplete="off"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
<div slot="footer" class="text-center"> |
|
||||
<el-button type="primary" @click="nodeSave()">保 存</el-button> |
|
||||
<el-button @click="dialogVisible = false">返 回</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
|
|
||||
<div class="org-table" v-show="isshow == 'table'"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="24"> |
|
||||
<el-form-item label="部门名称"> |
|
||||
<el-input v-model="page.params.name" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item> |
|
||||
<el-button @click="onSearch()">查询</el-button> |
|
||||
<el-button @click="resetSearch()">重置</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<!-- table --> |
|
||||
<el-table |
|
||||
:data="tableData" |
|
||||
default-expand-all |
|
||||
border style="width: 100%;"> |
|
||||
<!--<el-table-column label="序号" type="index" width="40px" align="center"></el-table-column>--> |
|
||||
<el-table-column label="操作" align="center" width="160px"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="editRow(scope.row)" > |
|
||||
编辑 |
|
||||
</el-button> |
|
||||
<el-button type="danger" size="mini" @click.native.prevent="remove(scope.row)"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
|
|
||||
<el-table-column prop="name" label="部门名称" align="center"></el-table-column> |
|
||||
<el-table-column prop="zgNames" label="主管" align="center"></el-table-column> |
|
||||
<el-table-column prop="fgNames" label="分管" align="center"></el-table-column> |
|
||||
<!--<el-table-column prop="contactMan" label="联系人" align="center" width="100px"></el-table-column>--> |
|
||||
<el-table-column prop="linkPhone" label="联系人手机号" width="110" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="addrs" label="地址" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="sort" label="排序" align="center" width="50px"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="qrText" label="二维码" align="center" width="80px"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click.native.prevent="lookRow(scope.row)" type="text" size="small"> |
|
||||
查看 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
</div> |
|
||||
|
|
||||
<div class="org-table" v-show="isshow == 'ewm'"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="16"> |
|
||||
<h4 style="margin: 0;line-height: 32px;">部门二维码</h4> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="Printewm">打 印</el-button> |
|
||||
<el-button @click="isshow = 'table'">返 回</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- center --> |
|
||||
<div class="ewm"style="display: flex;justify-content: center; align-items: center;" ref="print"> |
|
||||
<img style="width: 200px; height: 200px;" :src="ewmForm.qrFilePath" alt=""> |
|
||||
<ul style="list-style:none; line-height: 32px; font-size: 16px;"> |
|
||||
<li><label for="">部门名称: </label><span>{{ewmForm.departmentName}}</span></li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
<!-- 新增编辑 --> |
|
||||
<div class="org-table" v-show="isshow == 'edit'"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="16"> |
|
||||
<h4 style="margin: 0;line-height: 32px;"> {{ dialogTitle }}部门信息</h4> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="isshow = 'table'">返 回</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- center --> |
|
||||
<div class="ediut"> |
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px"> |
|
||||
<el-form-item label="部门名称" prop="name"> |
|
||||
<el-input v-model="form.name"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="部门地理位置" prop="jwd"> |
|
||||
<el-input v-model="form.jwd" readonly> |
|
||||
<el-button slot="append" icon="el-icon-map-location" @click='mapDialog = true'></el-button> |
|
||||
</el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="部门地址" prop="addrs"> |
|
||||
<el-input v-model="form.addrs"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="主管人员" prop="zgStaffSid"> |
|
||||
<el-input v-model="form.zgStaffSid"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="分管人员" prop="fgStaffSid"> |
|
||||
<el-input v-model="form.fgStaffSid"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="部门联系人" prop=" linkPerson"> |
|
||||
<el-input v-model="form.linkPerson"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系电话" prop="linkPhone"> |
|
||||
<el-input v-model="form.linkPhone"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="排序号" prop="sort"> |
|
||||
<el-input v-model="form.sort"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
<Position v-if="mapDialog" :address.sync="form.addrs" :maker-position.sync="form.jwd" :dialog-visible.sync="mapDialog" /> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { pageList, orgList, addOrgTree, getPagelist, putOrgtree, postOrgtree, delOrgtree, getQrCode } from '@/api/system/departments/departments.js' |
|
||||
import Position from '@/components/amap/amap.vue' |
|
||||
export default { |
|
||||
components:{ Position }, |
|
||||
data() { |
|
||||
return { |
|
||||
dialogVisible: false, |
|
||||
mapDialog: false, |
|
||||
dialogTitle: '', |
|
||||
props:{ |
|
||||
label:"name", |
|
||||
children:"children", |
|
||||
}, |
|
||||
nodeForm:{ |
|
||||
sid: '', |
|
||||
name: '', |
|
||||
sortNo:'' |
|
||||
}, |
|
||||
ewmForm: { |
|
||||
qrFilePath: '', |
|
||||
organizationName: '', |
|
||||
departmentName: '', |
|
||||
address: '' |
|
||||
}, |
|
||||
form: { |
|
||||
name:'', |
|
||||
jwd:'', |
|
||||
addrs:'', |
|
||||
zgStaffSid:'', |
|
||||
fgStaffSid:'', |
|
||||
linkPerson:'', |
|
||||
linkPhone:'', |
|
||||
sort:'' |
|
||||
}, |
|
||||
formBackup: Object.assign({}, this.form), |
|
||||
isshow: 'table', |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params:{ |
|
||||
name: '', |
|
||||
organizationSid: '', |
|
||||
psid: '' |
|
||||
} |
|
||||
}, |
|
||||
tableData: [], |
|
||||
treedata: [], |
|
||||
rules:{ |
|
||||
name:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
], |
|
||||
jwd:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
], |
|
||||
addrs:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
], |
|
||||
zgStaffSid:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
], |
|
||||
fgStaffSid:[{ required: true, message: '请输入', trigger: 'blur' },], |
|
||||
linkPerson:[{ required: true, message: '请输入', trigger: 'blur' },], |
|
||||
linkPhone:[{ required: true, message: '请输入', trigger: 'blur' },], |
|
||||
sort:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
] |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getOrgTree() |
|
||||
// this.getPageList() |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
handleNodeClick(data){ |
|
||||
this.isshow = 'table' |
|
||||
this.page.params.organizationSid = this.$store.getters.userInfo.orgSid |
|
||||
this.page.params.psid = data.sid || 0 |
|
||||
|
|
||||
// let params = { |
|
||||
// total: 0, |
|
||||
// current: 1, |
|
||||
// size: 10, |
|
||||
// params:{ |
|
||||
// name: '', |
|
||||
// organizationSid: this.$store.getters.userInfo.orgSid, |
|
||||
// psid: data.sid || 0 |
|
||||
// } |
|
||||
// } |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
getPageList(data){ // 获取树形列表 |
|
||||
pageList(data).then(res => { |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
getOrgTree(){ // 获取树形列表 |
|
||||
orgList({}).then(res => { |
|
||||
this.treedata = res.data |
|
||||
}) |
|
||||
}, |
|
||||
save(){ |
|
||||
this.form.organizationSid = this.$store.getters.userInfo.orgSid |
|
||||
// this.form.dlxx = typeof(this.form.dlxx) == 'string' ? this.form.dlxx : this.form.dlxx.join() |
|
||||
if(this.form.sid){ |
|
||||
putOrgtree(this.form).then(res => { |
|
||||
this.isshow = 'table' |
|
||||
this.getOrgTree() |
|
||||
this.handleNodeClick({sid: this.form.psid}) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}else{ |
|
||||
addOrgTree(this.form).then(res => { |
|
||||
this.isshow = 'table' |
|
||||
this.getOrgTree() |
|
||||
this.handleNodeClick({sid: this.form.psid}) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
append(data) { |
|
||||
this.dialogTitle = '新增' |
|
||||
this.isshow = 'edit' |
|
||||
this.form = Object.assign({}, this.formBackup) |
|
||||
this.form.psid = data.sid || 0 |
|
||||
this.form.organizationSid = this.$store.getters.userInfo.orgSid |
|
||||
this.form.address = data.orgAddress || data.address |
|
||||
this.form.dlxx = data.gisInfo || data.dlxx |
|
||||
}, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.isshow = 'edit' |
|
||||
this.form = Object.assign({}, row) |
|
||||
// getRoleInfo({sid: row.sid}).then(res => { |
|
||||
// this.form = res.data |
|
||||
// // this.user = Object.assign({}, row |
|
||||
// }) |
|
||||
}, |
|
||||
deit(data){ // 节点编辑保存 |
|
||||
this.dialogVisible = true |
|
||||
this.nodeForm.sid = data.sid |
|
||||
this.nodeForm.name = data.name |
|
||||
this.nodeForm.sortNo = data.sortNo |
|
||||
}, |
|
||||
nodeSave(){ // 节点编辑保存 |
|
||||
postOrgtree(this.nodeForm).then(res => { |
|
||||
this.getOrgTree() |
|
||||
this.dialogVisible = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
remove(data) { |
|
||||
this.$confirm('确定要删除该部门吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
delOrgtree({sid:data.sid}).then(res => { |
|
||||
this.getOrgTree() |
|
||||
this.handleNodeClick({sid: data.psid}) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
lookRow(row){ // 查看二维码 |
|
||||
this.isshow = 'ewm' |
|
||||
getQrCode({sid: row.sid}).then(res => { |
|
||||
this.ewmForm = res.data |
|
||||
}) |
|
||||
}, |
|
||||
Printewm(){ |
|
||||
this.$print(this.$refs.print) // 使用 |
|
||||
}, |
|
||||
mouseenter(data){ |
|
||||
this.$set(data, 'del', true) |
|
||||
}, |
|
||||
mouseleave(data){ |
|
||||
this.$set(data, 'del', false) |
|
||||
}, |
|
||||
onSearch(){ |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ |
|
||||
this.page.params.name = '' |
|
||||
this.getPageList(this.page) |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.el-icon-arrow-right:before { |
|
||||
content: '\e6e0'; |
|
||||
color: #727272; |
|
||||
} |
|
||||
</style> |
|
||||
|
|
||||
<style scoped="scoped" lang="scss"> |
|
||||
.org-tree { |
|
||||
width: 240px; |
|
||||
min-height: 100%; |
|
||||
box-sizing: border-box; |
|
||||
/*padding-right: 10px;*/ |
|
||||
border: 1px solid #edf1f7; |
|
||||
} |
|
||||
|
|
||||
.org-table { |
|
||||
flex: 1; |
|
||||
// padding-left: 10px; |
|
||||
margin:0 10px; |
|
||||
border: 1px solid #edf1f7; |
|
||||
min-height: 100%; |
|
||||
overflow-y:scroll; |
|
||||
.ewm{ |
|
||||
margin: 30px auto 0; |
|
||||
width:560px; |
|
||||
} |
|
||||
.ediut{ |
|
||||
margin: 30px auto 0; |
|
||||
/*width:750px;*/ |
|
||||
} |
|
||||
} |
|
||||
.custom-tree-node { |
|
||||
position: relative; |
|
||||
overflow: hidden; |
|
||||
width: 100%; |
|
||||
flex: 1; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
justify-content: space-between; |
|
||||
font-size: 14px; |
|
||||
padding-right: 8px; |
|
||||
} |
|
||||
.handle{ |
|
||||
position: absolute; |
|
||||
right: 0; |
|
||||
|
|
||||
.el-button--text{ |
|
||||
font-size: 15px; |
|
||||
background-color: #FFFFFF; |
|
||||
} |
|
||||
} |
|
||||
.my-tabs{ |
|
||||
margin-top: 10px; |
|
||||
} |
|
||||
</style> |
|
@ -1,400 +0,0 @@ |
|||||
<template> |
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|
||||
<el-tab-pane label="岗位列表" name="roleList"> |
|
||||
|
|
||||
<div class="container"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="search" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="24"> |
|
||||
<el-form-item label="岗位名称"> |
|
||||
<el-input v-model="search.name" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="所属部门"> |
|
||||
<el-select v-model="search.orgSid" placeholder="请选择" clearable @clear="handleClear"> |
|
||||
<el-option hidden :key="search.orgSid" :label="orgName" :value="search.orgSid"></el-option> |
|
||||
<el-tree v-loading="loading" :data="treedata" ref="Tree" show-checkbox accordion node-key="sid" |
|
||||
:default-checked-keys="checkedId" |
|
||||
:default-expand-all='true' :check-strictly ='true' :props="defaultProps" @check-change="checkchange" |
|
||||
> |
|
||||
</el-tree> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-button @click="getList(1)">查询</el-button> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- table --> |
|
||||
<el-table :data="roleTable" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="220px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click="editRow(scope.row)" type="primary" size="mini"> 修改 </el-button> |
|
||||
<el-button @click="delRow(scope.row)" type="danger" size="mini"> 删除 </el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="name" label="岗位名称" width="220px" align="center"></el-table-column> |
|
||||
<el-table-column prop="orgName" label="所属部门" align="center"></el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" /> |
|
||||
|
|
||||
<!-- 编辑角色信息 --> |
|
||||
<el-dialog :title="dialogTitle + '角色信息'" :visible.sync="editDialog" width="40%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>角色名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="roleForm.name"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<!--<tr> |
|
||||
<td>备注</td> |
|
||||
<td> |
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr>--> |
|
||||
<tr> |
|
||||
<td>选择部门(单选)</td> |
|
||||
<td> |
|
||||
<el-tree |
|
||||
:data="treedata1" |
|
||||
show-checkbox |
|
||||
node-key="sid" |
|
||||
ref="Tree1" |
|
||||
:default-expand-all='true' |
|
||||
:check-strictly ='true' |
|
||||
:default-checked-keys="checkedId1" |
|
||||
:props="defaultProps" |
|
||||
@check-change="checkchange1" |
|
||||
> |
|
||||
</el-tree> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="editDialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane label="新增岗位" name="addrole"> |
|
||||
<el-card class="box-card"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>岗位名称</td> |
|
||||
<td><el-input v-model="roleForm.name"></el-input></td> |
|
||||
</tr> |
|
||||
<!--<tr> |
|
||||
<td>备注</td> |
|
||||
<td> <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input></td> |
|
||||
</tr>--> |
|
||||
<tr> |
|
||||
<td>选择部门(单选)</td> |
|
||||
<td> |
|
||||
<el-tree |
|
||||
:data="treedata2" |
|
||||
show-checkbox |
|
||||
node-key="sid" |
|
||||
ref="Tree2" |
|
||||
:default-expand-all='true' |
|
||||
:check-strictly ='true' |
|
||||
:default-checked-keys="checkedId2" |
|
||||
:props="defaultProps" |
|
||||
@check-change="checkchange2" |
|
||||
> |
|
||||
</el-tree> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
</div> |
|
||||
</el-card> |
|
||||
</el-tab-pane> |
|
||||
</el-tabs> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
pageList, |
|
||||
orgList, |
|
||||
savePost, |
|
||||
putOrgroles, |
|
||||
delOrgroles, |
|
||||
// setRoleEnable |
|
||||
} from '@/api/system/postManage/index.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
dialogTitle: '', |
|
||||
activeName: 'roleList', |
|
||||
roleForm: { |
|
||||
remarks: "", |
|
||||
roleName: "", |
|
||||
orgSid:'' |
|
||||
}, |
|
||||
formBackup: {}, |
|
||||
search: { |
|
||||
name: '', |
|
||||
orgSid: '' |
|
||||
}, |
|
||||
orgName:'', |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
}, |
|
||||
roleTable: [], |
|
||||
editDialog: false, |
|
||||
// 树形 |
|
||||
loading: false, |
|
||||
defaultProps: { |
|
||||
children: 'children', |
|
||||
label: 'name' |
|
||||
}, |
|
||||
// orgdata:[], // 部门 |
|
||||
checkedId: [], |
|
||||
checkedId1: [], |
|
||||
checkedId2: [], |
|
||||
treedata: [], |
|
||||
treedata1: [], |
|
||||
treedata2: [], |
|
||||
// chace: [], |
|
||||
// roleDialog: false, |
|
||||
// Thisrow: {}, |
|
||||
// orgListAll:[] |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.formBackup = Object.assign({}, this.roleForm), |
|
||||
this.getList() |
|
||||
this.getOrgList() |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页函数 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getList() |
|
||||
}, |
|
||||
// 分页列表 |
|
||||
getList(flag) { |
|
||||
if(flag == '1'){ |
|
||||
this.page.current = 1 |
|
||||
} |
|
||||
let params = this.page |
|
||||
params.params = this.search |
|
||||
pageList(params).then(res => { |
|
||||
this.page.total = res.data.total |
|
||||
this.roleTable = res.data.records |
|
||||
}) |
|
||||
}, |
|
||||
handleClick(tab, event) { |
|
||||
if(tab.name == 'addrole'){ |
|
||||
this.dialogTitle = '新增' |
|
||||
this.roleForm = Object.assign({}, this.formBackup) |
|
||||
}else{ |
|
||||
this.getList() |
|
||||
} |
|
||||
}, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.editDialog = true |
|
||||
this.roleForm = Object.assign({}, row) |
|
||||
this.checkedId1 =[this.roleForm.orgSid] |
|
||||
}, |
|
||||
delRow(row) { |
|
||||
this.$confirm('确定要删除该岗位吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
let params={ |
|
||||
sids: row.sid |
|
||||
} |
|
||||
delOrgroles(params).then(res => { |
|
||||
this.getList() |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
// 保存角色 |
|
||||
save() { |
|
||||
|
|
||||
if (this.roleForm.sid) { |
|
||||
let orgSid = this.$refs.Tree1.getCheckedKeys() |
|
||||
this.roleForm.orgSid = orgSid.toString() |
|
||||
putOrgroles(this.roleForm).then(res => { |
|
||||
if (res.code == '200') { |
|
||||
this.getList() |
|
||||
this.editDialog = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
let orgSid = this.$refs.Tree2.getCheckedKeys() |
|
||||
this.roleForm.orgSid = orgSid.toString() |
|
||||
savePost(this.roleForm).then(res => { |
|
||||
if (res.code == '200') { |
|
||||
this.getList() |
|
||||
this.activeName = "roleList" |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
let arr =[] |
|
||||
this.$refs.Tree2.setCheckedKeys(arr); |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
this.reset() |
|
||||
}, |
|
||||
reset(){ |
|
||||
this.roleForm = { |
|
||||
remarks: "", |
|
||||
roleName: "", |
|
||||
orgSid:'' |
|
||||
}; |
|
||||
this.search = { |
|
||||
name: '', |
|
||||
orgSid: '' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
// 获取部门树形 |
|
||||
getOrgList(row) { |
|
||||
this.roleDialog = true |
|
||||
this.checkedId = [] |
|
||||
// this.roleForm.roleName = row.roleName |
|
||||
this.Thisrow = row |
|
||||
this.loading = true |
|
||||
let params = { |
|
||||
// roleSid: row.sid, |
|
||||
// userType: '2' |
|
||||
} |
|
||||
|
|
||||
orgList(params).then(res => { |
|
||||
this.treedata = res.data |
|
||||
this.treedata1 = res.data |
|
||||
this.treedata2 = res.data |
|
||||
// this.getTreeParentNode(res.data, this.checkedId) |
|
||||
// this.getTreeParentid(res.data) |
|
||||
this.loading = false |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
// // 递归查询所有上级数据 |
|
||||
// getTreeParentNode(menus, ids) { |
|
||||
// for (var i = 0; i < menus.length; i++) { |
|
||||
// if (menus[i].children && menus[i].children.length != 0) { |
|
||||
// this.getTreeParentNode(menus[i].children, ids) |
|
||||
// } else if (menus[i].isCheck) { |
|
||||
// ids.push(menus[i].sid) |
|
||||
// } |
|
||||
// } |
|
||||
// }, |
|
||||
// // 所有一级菜单ID |
|
||||
// getTreeParentid(menus) { |
|
||||
// for (var i = 0; i < menus.length; i++) { |
|
||||
// this.chace.push(menus[i].sid) |
|
||||
// } |
|
||||
// }, |
|
||||
// getCheckedKeys() { |
|
||||
// let _this = this |
|
||||
// let roleMenus = [] |
|
||||
// this.$refs.Tree.getCheckedKeys().forEach(val => { |
|
||||
// roleMenus.push({ |
|
||||
// menuSid: val, |
|
||||
// orgSid: _this.$store.getters.userInfo.orgSid, |
|
||||
// roleSid: _this.Thisrow.sid |
|
||||
// }) |
|
||||
// }) |
|
||||
// let parentTrue = this.$refs.Tree.getHalfCheckedKeys() |
|
||||
// for (let i = 0; i < parentTrue.length; i++) { |
|
||||
// for (let j = 0; j < this.chace.length; j++) { |
|
||||
// if (parentTrue[i] == this.chace[j]) { |
|
||||
// parentTrue.splice(i, 1); |
|
||||
// } |
|
||||
// } |
|
||||
// } |
|
||||
// parentTrue.forEach(val => { |
|
||||
// roleMenus.push({ |
|
||||
// menuSid: val, |
|
||||
// orgSid: _this.$store.getters.userInfo.orgSid, |
|
||||
// roleSid: _this.Thisrow.sid |
|
||||
// }) |
|
||||
// }) |
|
||||
// saveorgrolemenus({ |
|
||||
// roleSid: _this.Thisrow.sid, |
|
||||
// roleMenus: roleMenus |
|
||||
// }).then(res => { |
|
||||
// this.roleDialog = false |
|
||||
// this.$message({ |
|
||||
// message: res.msg, |
|
||||
// type: 'success' |
|
||||
// }) |
|
||||
// }) |
|
||||
// }, |
|
||||
checkchange(data,checked,indeterminate) { |
|
||||
if (checked){ |
|
||||
|
|
||||
this.search.orgSid = data.sid |
|
||||
this.orgName = data.name |
|
||||
|
|
||||
let arr = [] |
|
||||
arr = [data.sid]; |
|
||||
this.$refs.Tree.setCheckedKeys(arr); |
|
||||
return; |
|
||||
} |
|
||||
}, |
|
||||
checkchange1(data,checked,indeterminate) { |
|
||||
if (checked){ |
|
||||
this.roleForm.orgSid = data.sid |
|
||||
// this.orgName = data.name |
|
||||
let arr = [] |
|
||||
arr = [data.sid]; |
|
||||
this.$refs.Tree1.setCheckedKeys(arr); |
|
||||
return; |
|
||||
} |
|
||||
}, |
|
||||
checkchange2(data,checked,indeterminate) { |
|
||||
if (checked){ |
|
||||
this.roleForm.orgSid = data.sid |
|
||||
// this.orgName = data.name |
|
||||
let arr = [] |
|
||||
arr = [data.sid]; |
|
||||
this.$refs.Tree2.setCheckedKeys(arr); |
|
||||
return; |
|
||||
} |
|
||||
}, |
|
||||
handleClear() { |
|
||||
// 将选择器的值置空 |
|
||||
this.orgName = '' |
|
||||
this.search.orgSid = '' |
|
||||
let arr =[] |
|
||||
this.$refs.Tree.setCheckedKeys(arr); |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style scoped> |
|
||||
.el-select > .el-input { |
|
||||
display: block; |
|
||||
width: 300px; |
|
||||
} |
|
||||
/deep/.tab-header .el-select { |
|
||||
width: 180px; |
|
||||
} |
|
||||
.my-tabs{ |
|
||||
margin-top: 10px; |
|
||||
} |
|
||||
</style> |
|
@ -1,448 +0,0 @@ |
|||||
<template> |
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|
||||
<el-tab-pane label="资源列表" name="roleList"> |
|
||||
<div class="container"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form :inline="true" :model="page.params" class="demo-form-inline"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="21"> |
|
||||
<el-form-item label="资源ID"> |
|
||||
<el-input v-model="page.params.sourceId" placeholder="资源ID" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="资源名称"> |
|
||||
<el-input v-model="page.params.sourceName" placeholder="资源名称" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-button type="primary" @click="getPageList(1)">查 询</el-button> |
|
||||
</el-col> |
|
||||
<el-col :span="3"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="getPageList">保存排序</el-button> |
|
||||
<!--<el-button type="primary" @click="add()">添加资源</el-button>--> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="70px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="150px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="editRow(scope.row)"> |
|
||||
修改 |
|
||||
</el-button> |
|
||||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="sourceName" label="资源名称" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="sortNo" label="排序" align="center" width="70px"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input v-model="scope.row.sortNo" size="mini" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="sourceId" label="资源ID(微服务的name属性)" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="remarks" label="资源描述" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
|
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
<!-- 编辑角色信息 --> |
|
||||
<el-dialog :title="dialogTitle + '角色信息'" :visible.sync="editDialog" width="40%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>父级资源</td> |
|
||||
<td> |
|
||||
<el-select v-model="form.psid" placeholder="请选择"> |
|
||||
<!--<el-option |
|
||||
label="请选择" |
|
||||
value="0"> |
|
||||
</el-option>--> |
|
||||
<el-option |
|
||||
v-for="item in sourceList" |
|
||||
:key="item.sid" |
|
||||
:label="item.name" |
|
||||
:value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
<!-- <el-input v-model="form.psid"></el-input> --> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源ID</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.sourceId"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源名称</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.sourceName"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源类别</td> |
|
||||
<td > |
|
||||
<el-select v-model="form.sourceType" placeholder="请选择资源类别"> |
|
||||
<el-option |
|
||||
v-for="item in zylb" |
|
||||
:key="item.dictKey" |
|
||||
:label="item.dictValue" |
|
||||
:value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>app下载地址</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.sourceUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>web页面url</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.pageUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<!-- <tr> |
|
||||
<td>资源url标识</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.urlSign"></el-input> |
|
||||
</td> |
|
||||
</tr> --> |
|
||||
<tr> |
|
||||
<td>包名</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.sourcePackage"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>菜单图标地址</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.iconUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源图标背景色</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.iconBgColor"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
|
|
||||
<tr> |
|
||||
<td>资源版本</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.ver"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>启动模块动作</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.sourceAction"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源用到的json拼接</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.sourceExtra"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>提示数量</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.noticeNum"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>RePlugin插件名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.modulePluginName"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>排序号</td> |
|
||||
<td> |
|
||||
<el-input type="number" v-model="form.sortNo"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源描述</td> |
|
||||
<td> |
|
||||
<el-input type="textarea" v-model="form.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保存</el-button> |
|
||||
<!--<el-button @click="editDialog = false">关闭</el-button>--> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane label="新增资源" name="addrole"> |
|
||||
<!--<el-dialog :title="dialogTitle + '资源描述'" :visible.sync="editDialog" width="60%">--> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>父级资源</td> |
|
||||
<td> |
|
||||
<el-select v-model="form.psid" placeholder="请选择"> |
|
||||
<!--<el-option |
|
||||
label="请选择" |
|
||||
value="0"> |
|
||||
</el-option>--> |
|
||||
<el-option |
|
||||
v-for="item in sourceList" |
|
||||
:key="item.sid" |
|
||||
:label="item.name" |
|
||||
:value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
<!-- <el-input v-model="form.psid"></el-input> --> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源ID</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.sourceId"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源名称</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.sourceName"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源类别</td> |
|
||||
<td > |
|
||||
<el-select v-model="form.sourceType" placeholder="请选择资源类别"> |
|
||||
<el-option |
|
||||
v-for="item in zylb" |
|
||||
:key="item.dictKey" |
|
||||
:label="item.dictValue" |
|
||||
:value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>app下载地址</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.sourceUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>web页面url</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.pageUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<!-- <tr> |
|
||||
<td>资源url标识</td> |
|
||||
<td > |
|
||||
<el-input v-model="form.urlSign"></el-input> |
|
||||
</td> |
|
||||
</tr> --> |
|
||||
<tr> |
|
||||
<td>包名</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.sourcePackage"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>菜单图标地址</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.iconUrl"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源图标背景色</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.iconBgColor"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
|
|
||||
<tr> |
|
||||
<td>资源版本</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.ver"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>启动模块动作</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.sourceAction"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源用到的json拼接</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.sourceExtra"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>提示数量</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.noticeNum"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>RePlugin插件名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.modulePluginName"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>排序号</td> |
|
||||
<td> |
|
||||
<el-input type="number" v-model="form.sortNo"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>资源描述</td> |
|
||||
<td> |
|
||||
<el-input type="textarea" v-model="form.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保存</el-button> |
|
||||
<!--<el-button @click="editDialog = false">关闭</el-button>--> |
|
||||
</div> |
|
||||
<!--</el-dialog>--> |
|
||||
<!--</div>--> |
|
||||
</el-tab-pane> |
|
||||
</el-tabs> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { pageList, saveSourcesInfo, getSourcesInfo, putSourcesInfo, delSources, getZzylb, getsourceList } from '@/api/system/sources/index.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: 'roleList', |
|
||||
dialogTitle: '', |
|
||||
editDialog: false, |
|
||||
form: {}, |
|
||||
formBackup: Object.assign({}, this.form), |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params: { |
|
||||
psid: '', |
|
||||
sourceId: '', |
|
||||
sourceName: '' |
|
||||
}, |
|
||||
}, |
|
||||
tableData: [], |
|
||||
zylb: [], |
|
||||
sourceList:[] |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getPageList(this.page) |
|
||||
// getsourceList().then(res => { |
|
||||
// this.sourceList = res.data |
|
||||
// }) |
|
||||
// getZzylb().then(res => { |
|
||||
// this.zylb = res.data |
|
||||
// }) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ // 重置 |
|
||||
this.page = { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params: { |
|
||||
psid: '', |
|
||||
sourceId: '', |
|
||||
sourceName: '' |
|
||||
}, |
|
||||
} |
|
||||
this.getPageList() |
|
||||
}, |
|
||||
getPageList(){ // 获取列表 |
|
||||
pageList(this.page).then((res)=>{ |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
handleClick(tab, event) { |
|
||||
if(tab.name == 'addrole'){ |
|
||||
this.dialogTitle = '新增' |
|
||||
this.roleForm = Object.assign({}, this.formBackup) |
|
||||
}else{ |
|
||||
this.getPageList() |
|
||||
} |
|
||||
}, |
|
||||
save(){ |
|
||||
if(this.form.sid){ |
|
||||
putSourcesInfo(this.form).then(res => { |
|
||||
this.editDialog = false |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}else{ |
|
||||
saveSourcesInfo(this.form).then(res => { |
|
||||
this.getPageList() |
|
||||
this.activeName = "roleList" |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
this.reset() |
|
||||
}, |
|
||||
reset(){ |
|
||||
this.form = { |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.editDialog = true |
|
||||
this.form = Object.assign({}, row) |
|
||||
// getSourcesInfo({sid: row.sid}).then(res => { |
|
||||
// this.form = res.data |
|
||||
// }) |
|
||||
}, |
|
||||
deleteRow(row) { |
|
||||
this.$confirm('确定要删除该资源吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
delSources({sid: row.sid}).then(res => { |
|
||||
this.getPageList() |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped="scoped" lang="scss"> |
|
||||
.my-tabs{ |
|
||||
margin-top: 10px; |
|
||||
} |
|
||||
</style> |
|
@ -1,344 +0,0 @@ |
|||||
<template> |
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|
||||
<el-tab-pane label="角色列表" name="roleList"> |
|
||||
|
|
||||
<div class="container"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="search" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="16"> |
|
||||
<el-form-item label="角色名称"> |
|
||||
<el-input v-model="search.roleName" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-button @click="getroleOrgList()">查询</el-button> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- table --> |
|
||||
<el-table :data="roleTable" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="240px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click="roleMenus(scope.row)" type="primary" size="mini"> |
|
||||
菜单授权 |
|
||||
</el-button> |
|
||||
<el-button @click="editRow(scope.row)" type="primary" size="mini"> |
|
||||
修改 |
|
||||
</el-button> |
|
||||
<el-button @click="delRow(scope.row)" type="danger" size="mini"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="roleName" label="角色名称" width="220px" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="remarks" label="备注" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="isEnable" label="是否可用" width="120px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-switch v-model="scope.row.isEnable" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="enabledChange(scope.row.isEnable,scope.row)"> |
|
||||
</el-switch> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" /> |
|
||||
|
|
||||
<!-- 编辑角色信息 --> |
|
||||
<el-dialog :title="dialogTitle + '角色信息'" :visible.sync="editDialog" width="40%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>角色名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="roleForm.roleName"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>是否可用</td> |
|
||||
<td> |
|
||||
<el-switch v-model="roleForm.isEnable" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0"> |
|
||||
</el-switch> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>备注</td> |
|
||||
<td> |
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="editDialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
<!-- 菜单授权 --> |
|
||||
<el-dialog title="菜单授权" :visible.sync="roleDialog" width="50%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>角色名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="roleForm.roleName" readonly></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>可操作菜单列表</td> |
|
||||
<td> |
|
||||
<el-tree v-loading="loading" :data="treedata" ref="Tree" show-checkbox accordion node-key="sid" :default-checked-keys="checkedId" :props="defaultProps" @check-change="checkchange"> |
|
||||
</el-tree> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div slot="footer" class="text-center"> |
|
||||
<el-button type="primary" @click="getCheckedKeys">保 存</el-button> |
|
||||
<el-button @click="roleDialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane label="新增角色" name="addrole"> |
|
||||
<el-card class="box-card"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>角色名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="roleForm.roleName"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>备注</td> |
|
||||
<td> |
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div style="margin-top: 20px; text-align: center;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
</div> |
|
||||
</el-card> |
|
||||
</el-tab-pane> |
|
||||
</el-tabs> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
roleOrgList, |
|
||||
saveOrgroles, |
|
||||
putOrgroles, |
|
||||
delOrgroles, |
|
||||
setRoleEnable, |
|
||||
} from '@/api/system/roleAdminister/index.js' |
|
||||
import { |
|
||||
roleMenuTree, |
|
||||
saveorgrolemenus, |
|
||||
} from '@/api/system/roleAdminister/rolemenus.js' |
|
||||
import { getrolemenus, saverolemenus } from '@/api/system/roleMenus/index.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
dialogTitle: '', |
|
||||
activeName: 'roleList', |
|
||||
roleForm: { |
|
||||
orgSid: this.$setStorage.getters.userInfo.orgSid, |
|
||||
remarks: '', |
|
||||
roleName: '', |
|
||||
}, |
|
||||
formBackup: {}, |
|
||||
search: { |
|
||||
roleName: '', |
|
||||
orgSid: this.$store.getters.userInfo.orgSid, |
|
||||
}, |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
}, |
|
||||
roleTable: [], |
|
||||
editDialog: false, |
|
||||
// 树形 |
|
||||
loading: false, |
|
||||
defaultProps: { |
|
||||
children: 'children', |
|
||||
label: 'menuName', |
|
||||
}, |
|
||||
checkedId: [], |
|
||||
treedata: [], |
|
||||
chace: [], |
|
||||
roleDialog: false, |
|
||||
Thisrow: {}, |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
;(this.formBackup = Object.assign({}, this.roleForm)), this.getroleOrgList() |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { |
|
||||
// 分页函数 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getroleOrgList(this.page) |
|
||||
}, |
|
||||
// 分页列表 |
|
||||
getroleOrgList() { |
|
||||
let params = this.page |
|
||||
params.params = this.search |
|
||||
roleOrgList(params).then((res) => { |
|
||||
this.page.total = res.data.total |
|
||||
this.roleTable = res.data.records |
|
||||
}) |
|
||||
}, |
|
||||
handleClick(tab, event) { |
|
||||
if (tab.name == 'addrole') { |
|
||||
this.dialogTitle = '新增' |
|
||||
this.roleForm = Object.assign({}, this.formBackup) |
|
||||
} else { |
|
||||
this.getroleOrgList() |
|
||||
} |
|
||||
}, |
|
||||
add() { |
|
||||
this.dialogTitle = '新增' |
|
||||
this.editDialog = true |
|
||||
this.roleForm = Object.assign({}, this.formBackup) |
|
||||
}, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.editDialog = true |
|
||||
this.roleForm = Object.assign({}, row) |
|
||||
}, |
|
||||
delRow(row) { |
|
||||
this.$confirm('确定要删除该角色吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning', |
|
||||
}).then(() => { |
|
||||
delOrgroles({ |
|
||||
sid: row.sid, |
|
||||
}).then((res) => { |
|
||||
this.getroleOrgList() |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!', |
|
||||
}) |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
// 保存角色 |
|
||||
save() { |
|
||||
if (this.roleForm.sid) { |
|
||||
putOrgroles(this.roleForm).then((res) => { |
|
||||
if (res.code == '200') { |
|
||||
this.getroleOrgList() |
|
||||
this.editDialog = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success', |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
saveOrgroles(this.roleForm).then((res) => { |
|
||||
if (res.code == '200') { |
|
||||
this.getroleOrgList() |
|
||||
this.activeName = 'roleList' |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success', |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
// 是否可用 按钮 |
|
||||
enabledChange(value, row) { |
|
||||
setRoleEnable({ |
|
||||
isEnable: value, |
|
||||
sid: row.sid, |
|
||||
}).then((res) => { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg, |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
// 获取授权菜单树形 |
|
||||
roleMenus(row) { |
|
||||
this.roleDialog = true |
|
||||
this.checkedId = [] |
|
||||
this.roleForm.roleName = row.roleName |
|
||||
this.Thisrow = row |
|
||||
this.loading = true |
|
||||
let params = { |
|
||||
orgSid: this.$store.getters.userInfo.orgSid, |
|
||||
roleSid: row.sid, |
|
||||
userType: '2', |
|
||||
} |
|
||||
|
|
||||
roleMenuTree(params).then((res) => { |
|
||||
this.treedata = res.data |
|
||||
this.getTreeParentNode(res.data, this.checkedId) |
|
||||
this.getTreeParentid(res.data) |
|
||||
this.loading = false |
|
||||
}) |
|
||||
}, |
|
||||
// 递归查询所有上级数据 |
|
||||
getTreeParentNode(menus, ids) { |
|
||||
for (var i = 0; i < menus.length; i++) { |
|
||||
if (menus[i].children && menus[i].children.length != 0) { |
|
||||
this.getTreeParentNode(menus[i].children, ids) |
|
||||
} else if (menus[i].isCheck) { |
|
||||
ids.push(menus[i].sid) |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
// 所有一级菜单ID |
|
||||
getTreeParentid(menus) { |
|
||||
for (var i = 0; i < menus.length; i++) { |
|
||||
this.chace.push(menus[i].sid) |
|
||||
} |
|
||||
}, |
|
||||
getCheckedKeys() { |
|
||||
let _this = this |
|
||||
let roleMenus = [] |
|
||||
this.$refs.Tree.getCheckedKeys().forEach((val) => { |
|
||||
roleMenus.push({ |
|
||||
menuSid: val, |
|
||||
orgSid: _this.$store.getters.userInfo.orgSid, |
|
||||
roleSid: _this.Thisrow.sid, |
|
||||
}) |
|
||||
}) |
|
||||
let parentTrue = this.$refs.Tree.getHalfCheckedKeys() |
|
||||
for (let i = 0; i < parentTrue.length; i++) { |
|
||||
for (let j = 0; j < this.chace.length; j++) { |
|
||||
if (parentTrue[i] == this.chace[j]) { |
|
||||
parentTrue.splice(i, 1) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
parentTrue.forEach((val) => { |
|
||||
roleMenus.push({ |
|
||||
menuSid: val, |
|
||||
orgSid: _this.$store.getters.userInfo.orgSid, |
|
||||
roleSid: _this.Thisrow.sid, |
|
||||
}) |
|
||||
}) |
|
||||
saveorgrolemenus({ |
|
||||
roleSid: _this.Thisrow.sid, |
|
||||
roleMenus: roleMenus, |
|
||||
}).then((res) => { |
|
||||
this.roleDialog = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success', |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped="scoped"> |
|
||||
.my-tabs { |
|
||||
margin-top: 10px; |
|
||||
} |
|
||||
</style> |
|
@ -1,220 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<div class="cline-set"><el-button type="primary" icon="el-icon-plus" @click="set_SQR()">变更被授权人</el-button></div> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="search" label-width="100px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="24"> |
|
||||
<el-form-item label="被委托人姓名"> |
|
||||
<el-input v-model="search.name" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="被委托日期"> |
|
||||
<el-date-picker |
|
||||
v-model="search.startDate" |
|
||||
type="date" |
|
||||
format="yyyy-MM-dd" |
|
||||
value-format="yyyy-MM-dd" |
|
||||
placeholder="选择日期"> |
|
||||
</el-date-picker> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="至" label-width="23px"> |
|
||||
<el-date-picker |
|
||||
v-model="search.endDate" |
|
||||
:picker-options="pickerStartData(search.startDate)" |
|
||||
type="date" |
|
||||
format="yyyy-MM-dd" |
|
||||
value-format="yyyy-MM-dd" |
|
||||
placeholder="选择日期"> |
|
||||
</el-date-picker> |
|
||||
</el-form-item> |
|
||||
<el-button @click="onSearch()">查询</el-button> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- table --> |
|
||||
<div class="table-describe clearfix"> |
|
||||
<h4 style="">被委托人列表</h4> |
|
||||
<pagination class="pagesize" layout="sizes" :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
</div> |
|
||||
<el-table :data="clientTable" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="name" label="姓名" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="idNo" label="身份证号码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="mobile" label="手机号码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="startDate" label="开始日期" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="endDate" label="结束日期" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
|
|
||||
<!-- 变更授权ren --> |
|
||||
<el-dialog title="本单位人员列表" width="70%" :visible.sync="dialogTable" append-to-body> |
|
||||
<div class="clearfix"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="search" label-width="60px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="24"> |
|
||||
<el-form-item label="姓名:"> |
|
||||
<el-input v-model="search1.name" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-button @click="set_SQR()">查询</el-button> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<div class="table-describe clearfix"> |
|
||||
<h4 style="">本单位人员列表</h4> |
|
||||
<pagination class="pagesize" layout="sizes" :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
</div> |
|
||||
<el-table :data="gridData" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="160px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click="setRole(scope.row)" type="primary" size="mini"> |
|
||||
变更为授权委托人 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="name" label="姓名" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="idNO" label="身份证号码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="mobile" label="手机号码" align="center" width="140px"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page1.total" :page.sync="page1.current" :limit.sync="page1.size" @pagination="pagination1"/> |
|
||||
</div> |
|
||||
|
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { clientList, setclientList, doClientAlter } from '@/api/system/userAdminister/client.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: 'first', |
|
||||
search: { |
|
||||
endDate: "", |
|
||||
name: "", |
|
||||
startDate: "", |
|
||||
orgSid: this.$store.getters.userInfo.orgSid |
|
||||
}, |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
}, |
|
||||
clientTable: [], |
|
||||
dialogTable: false, |
|
||||
search1: { |
|
||||
endDate: "", |
|
||||
name: "", |
|
||||
startDate: "", |
|
||||
orgSid: this.$store.getters.userInfo.orgSid |
|
||||
}, |
|
||||
page1: { |
|
||||
total: 0, |
|
||||
current: 1, |
|
||||
size: 10, |
|
||||
}, |
|
||||
gridData:[] |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getclientList() |
|
||||
}, |
|
||||
methods: { |
|
||||
getclientList(){ |
|
||||
let params = this.page |
|
||||
params.params = this.search |
|
||||
clientList(params).then(res=>{ |
|
||||
this.page.total = res.data.total |
|
||||
this.clientTable = res.data.records |
|
||||
}) |
|
||||
}, |
|
||||
pickerStartData(newtime){ |
|
||||
return { |
|
||||
disabledDate(time) { return time.getTime() < new Date(newtime) - 1000*60*60*24 } |
|
||||
} |
|
||||
}, |
|
||||
handleClick(tab, event) { |
|
||||
console.log(tab, event); |
|
||||
}, |
|
||||
onSearch(){ |
|
||||
this.getclientList() |
|
||||
}, |
|
||||
// 分页 |
|
||||
pagination(val) { |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getclientList() |
|
||||
}, |
|
||||
pagination1(){ |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.set_SQR() |
|
||||
}, |
|
||||
set_SQR(row){ |
|
||||
this.dialogTable = true |
|
||||
let params = this.page1 |
|
||||
params.params = this.search1 |
|
||||
setclientList(params).then(res =>{ |
|
||||
this.page1.total = res.data.total |
|
||||
this.gridData = res.data.records |
|
||||
}) |
|
||||
}, |
|
||||
// 变更为被委托人 |
|
||||
setRole(row){ |
|
||||
console.log(row) |
|
||||
let params = { |
|
||||
orgSid: this.$store.getters.userInfo.orgSid, |
|
||||
name: row.name, |
|
||||
staffSid: row.staffSid, |
|
||||
mobile: row.mobile, |
|
||||
idNo: row.idNO |
|
||||
} |
|
||||
doClientAlter(params).then(res => { |
|
||||
if(res.code == '200'){ |
|
||||
this.getclientList() |
|
||||
this.dialogTable = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.clearfix{ |
|
||||
zoom: 1; |
|
||||
} |
|
||||
.clearfix:before, |
|
||||
.clearfix:after{ |
|
||||
width: 100%; |
|
||||
display: table; |
|
||||
content: ""; |
|
||||
height: 0; |
|
||||
visibility: hidden; |
|
||||
} |
|
||||
.clearfix:after{ |
|
||||
clear: both; |
|
||||
} |
|
||||
.cline-set{ |
|
||||
padding-bottom: 10px; |
|
||||
margin-bottom: 10px; |
|
||||
border-bottom: 1px solid #018ad2; |
|
||||
} |
|
||||
</style> |
|
@ -1,277 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="search" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="24"> |
|
||||
<el-form-item label="用户姓名"> |
|
||||
<el-input v-model="search.xm" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="部门名称"> |
|
||||
<el-input v-model="search.deptmentName" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-button @click="getOrgUserList()">查询</el-button> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- table --> |
|
||||
<div class="table-describe clearfix"> |
|
||||
<h4 style="">本单位用户列表</h4> |
|
||||
<pagination class="pagesize" layout="sizes" :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
</div> |
|
||||
<el-table :data="userTable" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="300px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click="setRole(scope.row)" type="primary" size="mini"> |
|
||||
设置角色 |
|
||||
</el-button> |
|
||||
<el-button @click="setOrg(scope.row)" type="primary" size="mini"> |
|
||||
设置部门 |
|
||||
</el-button> |
|
||||
<el-button @click="initPwd(scope.row)" type="danger" size="mini"> |
|
||||
初始化密码 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="userName" label="用户名" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span class="tablerow-click" @click="userinfo(scope.row)">{{scope.row.userName}}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="roleName" label="角色名称" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="idNo" label="身份证号码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="name" label="真实姓名" width="120px" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="mobile" label="手机号码" align="center" width="140px"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="deptmentName" label="所属部门" align="center"> |
|
||||
|
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
<!-- 角色设置 --> |
|
||||
<el-dialog title="设置角色" :visible.sync="roleDialog" width="30%"> |
|
||||
<el-form :model="roleForm" :rules="rules" ref="roleForm"> |
|
||||
<el-form-item label="角色名称" :label-width="formLabelWidth" prop="roleSid"> |
|
||||
<el-select v-model="roleForm.roleSid" placeholder="请选择"> |
|
||||
<el-option v-for="item in roleList" |
|
||||
:key="item.sid" |
|
||||
:label="item.roleName" |
|
||||
:value="item.sid" |
|
||||
></el-option> |
|
||||
</el-select> |
|
||||
<el-button type="primary" size='mini' @click="toNav('RoleAdminister')" style="margin-left: 10px;" circle icon="el-icon-plus"></el-button> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
<div slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="saveRole('roleForm')">保 存</el-button> |
|
||||
<el-button @click="roleDialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
<!-- 部门设置 --> |
|
||||
<el-dialog title="部门设置" :visible.sync="bm_Dialog" width="30%"> |
|
||||
<el-form :model="bm_Form" :rules="rules" ref="bm_Form"> |
|
||||
<el-form-item label="部门名称" :label-width="formLabelWidth" prop="departmentSid"> |
|
||||
<!-- <el-select v-model="bm_Form.departmentSid" placeholder="请选择"> |
|
||||
<el-option v-for="item in bm_List" |
|
||||
:key="item.departmentSid" |
|
||||
:label="item.departmentName" |
|
||||
:value="item.departmentSid" |
|
||||
></el-option> |
|
||||
</el-select> --> |
|
||||
<el-cascader |
|
||||
v-model="bm_Form.departmentSid" |
|
||||
:options="treedata" |
|
||||
:props="props"></el-cascader> |
|
||||
<el-button type="primary" size='mini' @click="toNav('deptManage')" style="margin-left: 10px;" circle icon="el-icon-plus"></el-button> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
<div slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="saveOrg('bm_Form')">保 存</el-button> |
|
||||
<el-button @click="bm_Dialog = false">关 闭</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { orgUserList } from '@/api/system/userAdminister/index.js' |
|
||||
import { orgrolesList, saveOrgRole, getOrgList, saveDepartment } from '@/api/system/userAdminister/index.js' |
|
||||
import { initPwd } from '@/api/system/user/Auser.js' |
|
||||
import { getOrgTree } from '@/api/system/departments/departments.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: 'first', |
|
||||
search: { |
|
||||
userName: '', |
|
||||
xm: '', |
|
||||
orgSid: this.$store.getters.userInfo.orgSid |
|
||||
}, |
|
||||
props: { |
|
||||
value: "sid", |
|
||||
label: "name", |
|
||||
children: "orgDepartmentVoList" |
|
||||
}, |
|
||||
treedata:null, |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
}, |
|
||||
userTable: [], |
|
||||
clientTable: [], |
|
||||
// 设置角色 |
|
||||
formLabelWidth: '100', |
|
||||
roleDialog: false, |
|
||||
roleList: [], |
|
||||
roleForm: { |
|
||||
orgSid: this.$store.getters.userInfo.orgSid, |
|
||||
roleSid: "", |
|
||||
userSid: "" |
|
||||
}, |
|
||||
// 部门 |
|
||||
bm_Dialog: false, |
|
||||
bm_Form: {departmentSid: ''}, |
|
||||
bm_List: [], |
|
||||
rules: { |
|
||||
roleSid: [ |
|
||||
{ required: true, message: '请选择角色名称', trigger: 'change' } |
|
||||
], |
|
||||
departmentSid: [ |
|
||||
{ required: true, message: '请选择部门名称', trigger: 'change' } |
|
||||
], |
|
||||
} |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getOrgUserList() |
|
||||
orgrolesList({orgSid: this.$store.getters.userInfo.orgSid,roleName:''}).then(res => { |
|
||||
this.roleList = res.data |
|
||||
}) |
|
||||
this.getOrgTree() |
|
||||
getOrgList(this.$store.getters.userInfo.orgSid).then(res => { |
|
||||
this.bm_List = res.data |
|
||||
}) |
|
||||
}, |
|
||||
methods: { |
|
||||
// 列表 + 初始化 |
|
||||
getOrgUserList(){ |
|
||||
let params = this.page |
|
||||
params.params = this.search |
|
||||
orgUserList(this.page).then(res=>{ |
|
||||
this.page.total = res.data.total |
|
||||
this.userTable = res.data.records |
|
||||
}) |
|
||||
}, |
|
||||
// 分页 |
|
||||
pagination(val) { |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getOrgUserList() |
|
||||
}, |
|
||||
getOrgTree(){ // 获取部门树形列表 |
|
||||
function treeArr(data){ |
|
||||
if (data.length > 0) { |
|
||||
for (var i = 0; i < data.length; i++) { |
|
||||
if(data[i].orgDepartmentVoList.length > 0){ |
|
||||
treeArr(data[i].orgDepartmentVoList) |
|
||||
} else { |
|
||||
delete data[i].orgDepartmentVoList |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
getOrgTree({organizationSid: this.$store.getters.userInfo.orgSid}).then(res => { |
|
||||
let tree = res.data[0].orgDepartmentVoList |
|
||||
treeArr(tree) |
|
||||
this.treedata = tree |
|
||||
}) |
|
||||
}, |
|
||||
//设置角色 设置 用户ID |
|
||||
setRole(row){ |
|
||||
this.roleDialog = true |
|
||||
this.roleForm.userSid = row.sid |
|
||||
}, |
|
||||
//设置角色 提交 |
|
||||
saveRole(formName){ |
|
||||
this.$refs[formName].validate((valid) => { |
|
||||
if (valid) { |
|
||||
saveOrgRole(this.roleForm).then(res => { |
|
||||
if(res.code == "200"){ |
|
||||
this.roleDialog = false |
|
||||
this.getOrgUserList() |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
console.log('error submit!!'); |
|
||||
return false; |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
//设置部门 获取 用户ID |
|
||||
setOrg(row){ |
|
||||
this.bm_Dialog = true |
|
||||
this.bm_Form.departmentSid = '' |
|
||||
this.$set(this.bm_Form,'staffSid',row.staffSid) |
|
||||
}, |
|
||||
//设置部门 提交 |
|
||||
saveOrg(formName){ |
|
||||
this.$refs[formName].validate((valid) => { |
|
||||
if (valid) { |
|
||||
let params = { // 请求的参数 |
|
||||
departmentSid: this.bm_Form.departmentSid[this.bm_Form.departmentSid.length-1], |
|
||||
staffSid: this.bm_Form.staffSid, |
|
||||
} |
|
||||
saveDepartment(params).then(res => { |
|
||||
if(res.code == "200"){ |
|
||||
this.getOrgUserList() |
|
||||
this.bm_Dialog = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
console.log('error submit!!'); |
|
||||
return false; |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
initPwd(row){ |
|
||||
this.$confirm('此操作将初始化该用户密码, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
initPwd({sid: row.sid}).then(res => { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
toNav(src){ |
|
||||
this.$router.push("/"+src); |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style scoped="scoped"> |
|
||||
.el-select > .el-input { |
|
||||
display: block; |
|
||||
width: 300px; |
|
||||
} |
|
||||
</style> |
|
@ -1,39 +0,0 @@ |
|||||
<template> |
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|
||||
<el-tab-pane label="用户列表" name="first"> |
|
||||
<User></User> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane label="被委托人列表" name="second"> |
|
||||
<Client></Client> |
|
||||
</el-tab-pane> |
|
||||
</el-tabs> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import User from './components/user.vue' |
|
||||
import Client from './components/client.vue' |
|
||||
export default { |
|
||||
components:{Client, User}, |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: 'first' |
|
||||
}; |
|
||||
}, |
|
||||
methods: { |
|
||||
handleClick(tab, event) { |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss"> |
|
||||
.my-tabs{ |
|
||||
margin-top: 10px; |
|
||||
.el-date-editor .el-range-separator{ |
|
||||
line-height: 26px; |
|
||||
} |
|
||||
.tab-header .el-form-item .el-input__icon { |
|
||||
line-height: 26px; |
|
||||
} |
|
||||
} |
|
||||
</style> |
|
@ -1,456 +0,0 @@ |
|||||
<template> |
|
||||
<div class="container"> |
|
||||
<!-- 查询 --> |
|
||||
<tab-search> |
|
||||
<div slot="from"> |
|
||||
<el-form ref="form" :inline="true" :model="page.params" > |
|
||||
<el-form-item label="区域" label-width="50px"> |
|
||||
<AreaPicker @areaPicker="areaPicker" |
|
||||
:province="page.params.province" |
|
||||
:city="page.params.city" |
|
||||
:county="page.params.county"></AreaPicker> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="单位名称" label-width="80px"> |
|
||||
<el-input v-model="page.params.name" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<!-- <el-form-item label="状态" label-width="50px"> |
|
||||
<el-select v-model="page.params.state" placeholder="请选择状态"> |
|
||||
<el-option label="全部" :value="0"> |
|
||||
</el-option> |
|
||||
<el-option label="未审核" :value="1"> |
|
||||
</el-option> |
|
||||
<el-option label="已审核" :value="2"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> --> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<div slot="btn"> |
|
||||
<el-button @click="onSearch()">查询</el-button> |
|
||||
<el-button @click="resetSearch()">重置</el-button> |
|
||||
</div> |
|
||||
</tab-search> |
|
||||
|
|
||||
<!-- table --> |
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column prop="id" label="序号" width="60" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
{{(scope.$index+1)+(page.current-1)*page.size}} |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="180" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click="orgRegister(scope.row)" type="primary" size="mini"> |
|
||||
{{scope.row.state == 1 ? "审核":"查看"}} |
|
||||
</el-button> |
|
||||
<el-button @click="handledelete(scope.row)" type="danger" size="mini"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="orgCode" label="单位代码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="单位名称" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span class="tablerow-click" @click="orgRegister(scope.row)">{{scope.row.name}}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="所在区域" align="center"> |
|
||||
<el-table-column prop="province" label="省" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="city" label="市" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="county" label="区/县" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="contactMan" label="负责人" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="contactMobile" label="手机号码" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
<!-- 审核窗口 --> |
|
||||
<el-dialog :visible.sync="dialogVisible" :append-to-body="true" width="70%" class="company" style="margin-top: -10vh;"> |
|
||||
<div class="zcxx" > |
|
||||
<p>审核单位注册信息</p> |
|
||||
<el-button v-if="showbtn == 1" type="primary" @click="dialogVisible = false" icon="el-icon-back" style="background-color: #0272c8; margin-right: 10px;">返回</el-button> |
|
||||
<!-- <el-button type="primary" icon="el-icon-position" style="background-color: #018ad2; margin-right: 10px;">导出</el-button> --> |
|
||||
<el-button v-if="showbtn == 1" type="primary" @click="handleVerify(3)" icon="el-icon-circle-close" style="background-color: #d6432b;margin-right: 10px;">不通过</el-button> |
|
||||
<el-button v-if="showbtn == 1" type="primary" @click="handleVerify(2)" icon="el-icon-circle-check" style="background-color: #198e08;">通过</el-button> |
|
||||
</div> |
|
||||
<table style="font-size: 16px;"> |
|
||||
<tr> |
|
||||
<td >法人证书:</td> |
|
||||
<td >{{orgInfo.orgCode}}</td> |
|
||||
<td >单位全称:</td> |
|
||||
<td >{{orgInfo.name}}<span>点击验证企业</span></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td >法定代表人姓名:</td> |
|
||||
<td >{{orgInfo.contactMan}}</td> |
|
||||
<td >单位类别:</td> |
|
||||
<td >{{orgInfo.dwType}}</td> |
|
||||
</tr> |
|
||||
|
|
||||
<tr> |
|
||||
<td>电话:</td> |
|
||||
<td>{{orgInfo.contactMobile}}</td> |
|
||||
<td>单位地理位置:</td> |
|
||||
<td>{{orgInfo.gisInfo}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>所在区域:</td> |
|
||||
<td>{{orgInfo.region}}</td> |
|
||||
<td>单位级别:</td> |
|
||||
<td>{{orgInfo.dwjb}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>单位通讯地址:</td> |
|
||||
<td colspan="3"> |
|
||||
{{orgInfo.postAddress}} |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>单位注册地址:</td> |
|
||||
<td colspan="3">{{orgInfo.orgAddress}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>单位营业执照副本复印件:</td> |
|
||||
<td> |
|
||||
<eimage :url="orgInfo.businessLicense"></eimage> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div class="zcxx" style="margin-top: 20px;"> |
|
||||
<p>被委托人信息</p> |
|
||||
</div> |
|
||||
<table class="bwtr" style="font-size: 16px;"> |
|
||||
<tr> |
|
||||
<td>身份证号:</td> |
|
||||
<td>{{orgInfo.idNo}}</td> |
|
||||
<td>姓名:</td> |
|
||||
<td>{{orgInfo.name}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>用户名:</td> |
|
||||
<td>{{orgInfo.userName}}</td> |
|
||||
<td>手机号码:</td> |
|
||||
<td>{{orgInfo.mobile}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>单位管理员头像:</td> |
|
||||
<td> |
|
||||
<eimage :url="orgInfo.photoPath"></eimage> |
|
||||
</td> |
|
||||
<td>授权书复印件:</td> |
|
||||
<td> |
|
||||
<eimage :url="orgInfo.businessLicense"></eimage> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>身份证正面复印件:</td> |
|
||||
<td> |
|
||||
<eimage :url="orgInfo.idFrontPhoto"></eimage> |
|
||||
</td> |
|
||||
<td>身份证反面复印件:</td> |
|
||||
<td> |
|
||||
<eimage :url="orgInfo.idBackPhoto"></eimage> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
</el-dialog> |
|
||||
<remarks :dialogBack.sync="dialogBack" @verifyBack="verifyBack"></remarks> |
|
||||
</div> |
|
||||
</template> |
|
||||
<script> |
|
||||
import organization from '@/api/system/organization/organization.js' |
|
||||
import AreaPicker from '@/components/AreaPicker/index.vue' |
|
||||
import remarks from './remarks/index.vue' |
|
||||
export default { |
|
||||
components:{AreaPicker, remarks}, |
|
||||
data() { |
|
||||
return { |
|
||||
imageUrl: '', |
|
||||
dialogVisible: false, |
|
||||
disabled: false, |
|
||||
dialogBack: false, |
|
||||
showbtn: true, |
|
||||
organizationSid: '',// 单位SID |
|
||||
page: { |
|
||||
total: 10, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
params: { |
|
||||
city: '', |
|
||||
county: '', |
|
||||
name: '', |
|
||||
province: '', |
|
||||
state: 0, |
|
||||
}, |
|
||||
size: 10, // 每页的数据条数 |
|
||||
}, |
|
||||
pageBackup: Object.assign({}, this.page), |
|
||||
tableData: [], |
|
||||
orgInfo:{ |
|
||||
"attorney": "", |
|
||||
"businessLicense": "", |
|
||||
"contactMan": "", |
|
||||
"contactMobile": "", |
|
||||
"dwType": "", |
|
||||
"gisInfo": "", |
|
||||
"idBackPhoto": "", |
|
||||
"idFrontPhoto": "", |
|
||||
"orgCode": "", |
|
||||
"organizationName": "", |
|
||||
"photoPath": "", |
|
||||
"postAddress": "", |
|
||||
"region": "", |
|
||||
"idNo": "", |
|
||||
"mobile": "", |
|
||||
"name": "", |
|
||||
"userName": "" |
|
||||
}, |
|
||||
orgBackup: Object.assign({}, this.orgInfo), |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
getverifyList(data){ // 获取审核列表 |
|
||||
organization.verifyList(data).then(res => { |
|
||||
console.log(res) |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
onSearch() { //查询 |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ |
|
||||
this.page = { |
|
||||
total: 20, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
params: { |
|
||||
city: '', |
|
||||
county: '', |
|
||||
name: '', |
|
||||
province: '', |
|
||||
state: 0, |
|
||||
}, |
|
||||
size: 10, // 每页的数据条数 |
|
||||
} |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
areaPicker(val){//省市区值 |
|
||||
let arr = val.split('/') |
|
||||
this.page.params.province = arr[1] || "" |
|
||||
this.page.params.city = arr[2] || "" |
|
||||
this.page.params.county = arr[3] || "" |
|
||||
}, |
|
||||
orgRegister(row){ // 获取审核详情 |
|
||||
this.dialogVisible = true |
|
||||
this.organizationSid = row.sid |
|
||||
this.showbtn = row.state |
|
||||
this.orgInfo = Object.assign({}, this.orgBackup) |
|
||||
let params = { |
|
||||
organizationSid: row.sid |
|
||||
} |
|
||||
organization.orgRegisterDetails(params).then(res => { |
|
||||
console.log(res) |
|
||||
this.orgInfo = res.data |
|
||||
}) |
|
||||
}, |
|
||||
verify(state){ // 审核 |
|
||||
let params ={ |
|
||||
state: state+'', |
|
||||
organizationSid: this.organizationSid |
|
||||
} |
|
||||
organization.verify(params).then(res => { |
|
||||
console.log(res) |
|
||||
this.dialogVisible = false |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
this.getverifyList(this.page) |
|
||||
}) |
|
||||
}, |
|
||||
// 审核通过 |
|
||||
handleVerify(state){ |
|
||||
if(state == 2){ |
|
||||
let params ={ // 请求的参数 |
|
||||
state: state, |
|
||||
remarks:'', |
|
||||
organizationSid: this.organizationSid |
|
||||
} |
|
||||
organization.verify(params).then(res => { |
|
||||
this.getverifyList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
this.dialogVisible = false |
|
||||
}) |
|
||||
}else{ |
|
||||
this.dialogBack = true |
|
||||
} |
|
||||
}, |
|
||||
// 审核不通过 |
|
||||
verifyBack(remarks){ |
|
||||
let params ={ // 请求的参数 |
|
||||
state: 3, |
|
||||
remarks:remarks, |
|
||||
organizationSid: this.organizationSid |
|
||||
} |
|
||||
organization.verify(params).then(res => { |
|
||||
this.getverifyList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
this.dialogBack = false |
|
||||
this.dialogVisible = false |
|
||||
}) |
|
||||
}, |
|
||||
handledelete(row) { |
|
||||
this.$confirm('确认要删除吗?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
organization.del({sid: row.sid}).then(res => { |
|
||||
this.getverifyList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}).catch(() => { |
|
||||
this.$message({ |
|
||||
type: 'info', |
|
||||
message: '已取消删除' |
|
||||
}); |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss"> |
|
||||
.company .el-image .el-image__inner--center{ |
|
||||
height: 150px !important; |
|
||||
} |
|
||||
</style> |
|
||||
|
|
||||
<style lang="scss" scoped="scoped"> |
|
||||
.el-image{ |
|
||||
width: 180px; |
|
||||
height: 150px; |
|
||||
} |
|
||||
.zcxx { |
|
||||
color: #000; |
|
||||
width: 98%; |
|
||||
margin: 0px auto 30px; |
|
||||
background-color: #f7f9fc; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
height: 60px; |
|
||||
line-height: 60px; |
|
||||
|
|
||||
p { |
|
||||
font-size: 16px; |
|
||||
float: left; |
|
||||
margin-top: 0px; |
|
||||
margin-left: 10px; |
|
||||
font-weight: bold; |
|
||||
width: 300px; |
|
||||
} |
|
||||
|
|
||||
.el-button { |
|
||||
float: right; |
|
||||
margin-top: 13px; |
|
||||
border: none; |
|
||||
width: 80px; |
|
||||
padding: 0; |
|
||||
text-align: center; |
|
||||
padding-top: 10px; |
|
||||
padding-bottom: 10px; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
table { |
|
||||
width: 98%; |
|
||||
margin: 0 auto; |
|
||||
|
|
||||
tr { |
|
||||
height: 45px; |
|
||||
vertical-align: top; |
|
||||
} |
|
||||
|
|
||||
td:first-child { |
|
||||
text-align: right; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(2) { |
|
||||
padding-left: 30px; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(3) { |
|
||||
text-align: right; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(4) { |
|
||||
padding-left: 30px; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
span { |
|
||||
font-size: 14px; |
|
||||
color: #015bff; |
|
||||
margin-left: 20px; |
|
||||
} |
|
||||
|
|
||||
.sfz { |
|
||||
border: 1px solid #e6e9f0; |
|
||||
width: 45%; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
#bei { |
|
||||
width: 21.4%; |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader .el-upload { |
|
||||
border: 1px dashed #d9d9d9; |
|
||||
border-radius: 6px; |
|
||||
cursor: pointer; |
|
||||
position: relative; |
|
||||
overflow: hidden; |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader .el-upload:hover { |
|
||||
border-color: #409EFF; |
|
||||
} |
|
||||
|
|
||||
.avatar-uploader-icon { |
|
||||
font-size: 28px; |
|
||||
color: #8c939d; |
|
||||
width: 148px; |
|
||||
height: 148px; |
|
||||
line-height: 148px; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
.avatar { |
|
||||
width: 148px; |
|
||||
height: 148px; |
|
||||
display: block; |
|
||||
} |
|
||||
</style> |
|
@ -1,307 +0,0 @@ |
|||||
<!-- 个人注册 --> |
|
||||
<template> |
|
||||
<div class="container"> |
|
||||
<!-- 查询 --> |
|
||||
<tab-search> |
|
||||
<div slot="from"> |
|
||||
<el-form ref="form" :inline="true" label-width="80px"> |
|
||||
<el-form-item label="用户名"> |
|
||||
<el-input v-model="page.params.userName" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<div slot="btn"> |
|
||||
<el-button @click="onSearch()">查询</el-button> |
|
||||
<el-button @click="resetSearch()">重置</el-button> |
|
||||
</div> |
|
||||
</tab-search> |
|
||||
<!-- table --> |
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column prop="id" label="序号" width="60" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
{{(scope.$index+1)+(page.current-1)*page.size}} |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="180" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click="userRegister(scope.row)" type="primary" size="mini"> |
|
||||
{{scope.row.state == 1 ? "审核":"已审核"}} |
|
||||
</el-button> |
|
||||
<el-button @click.stop="Rowdelete(scope.row)" type="danger" size="mini"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="userName" label="用户名" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="idNo" label="身份证号码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="name" label="真实姓名" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="mobile" label="手机号码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="createTime" label="注册日期" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
<!-- 审核 --> |
|
||||
<el-dialog :visible.sync="dialogVisible" :append-to-body="true" width="70%" style="margin-top: -10vh;"> |
|
||||
<div class="zcxx" v-if="showbtn == 1"> |
|
||||
<p>审核注册个人信息</p> |
|
||||
<el-button type="primary" @click="dialogVisible=false" icon="el-icon-back" style="background-color: #0272c8;margin-right: 10px;">返回</el-button> |
|
||||
<el-button type="primary" @click="handleVerify(3)" icon="el-icon-circle-close" style="background-color: #d6432b; margin-right: 10px;">不通过</el-button> |
|
||||
<el-button type="primary" @click="handleVerify(2)" icon="el-icon-circle-check" style="background-color: #198e08;">通过</el-button> |
|
||||
</div> |
|
||||
<table style="font-size: 18px;"> |
|
||||
<tr> |
|
||||
<td>真实姓名:</td> |
|
||||
<td>{{userInfo.name }}</td> |
|
||||
<td>身份证号:</td> |
|
||||
<td>{{userInfo.idNo}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>用户名:</td> |
|
||||
<td>{{userInfo.userName}}</td> |
|
||||
<td>手机号:</td> |
|
||||
<td>{{userInfo.mobile}}</td> |
|
||||
</tr> |
|
||||
<tr style="vertical-align: middle;"> |
|
||||
<td>身份证正面照片:</td> |
|
||||
<td> |
|
||||
<eimage :url="userInfo.idFrontPhoto"></eimage> |
|
||||
</td> |
|
||||
<td>身份证背面照片:</td> |
|
||||
<td> |
|
||||
<eimage :url="userInfo.idBackPhoto"></eimage> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
</el-dialog> |
|
||||
<remarks :dialogBack.sync="dialogBack" @verifyBack="verifyBack"></remarks> |
|
||||
</div> |
|
||||
</template> |
|
||||
<script> |
|
||||
import remarks from './remarks/index.vue' |
|
||||
import user from '@/api/system/user/user1.js' |
|
||||
export default { |
|
||||
components:{remarks}, |
|
||||
data() { |
|
||||
return { |
|
||||
dialogVisible: false, |
|
||||
showbtn: true, |
|
||||
dialogBack: false, |
|
||||
page: { |
|
||||
total: 20, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
params: { // 查询的参数 |
|
||||
state: '', |
|
||||
userName: '', |
|
||||
state: 1 |
|
||||
}, |
|
||||
size: 10, // 每页的数据条数 |
|
||||
}, |
|
||||
pageBackup: Object.assign({}, this.page), |
|
||||
tableData: [], // tabel 数据 |
|
||||
userInfo:{ // 审核的表单字段 |
|
||||
"idBackPhoto": "", |
|
||||
"idFrontPhoto": "", |
|
||||
"idNo": "", |
|
||||
"mobile": "", |
|
||||
"name": "", |
|
||||
"userName": "" |
|
||||
}, |
|
||||
userBackup: Object.assign({}, this.userInfo), |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
getverifyList(data){ // 获取列表 |
|
||||
user.verifyList(data).then(res => { |
|
||||
console.log(res) |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
onSearch() { //查询 |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ |
|
||||
this.page = { |
|
||||
total: 20, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
params: { // 查询的参数 |
|
||||
state: '', |
|
||||
userName: '', |
|
||||
state: 1 |
|
||||
}, |
|
||||
size: 10, // 每页的数据条数 |
|
||||
} |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
userRegister(row){ // 获取审核表单内容 |
|
||||
console.log(row.userName) |
|
||||
this.dialogVisible = true |
|
||||
this.showbtn = row.state |
|
||||
this.userInfo = Object.assign({}, this.userBackup) |
|
||||
let params = { // 请求的参数 |
|
||||
userName: row.userName |
|
||||
} |
|
||||
user.userRegisterDetails(params).then(res => { |
|
||||
console.log(res) |
|
||||
this.userInfo = res.data |
|
||||
}) |
|
||||
}, |
|
||||
verify(state){ // 审核的通过不通过 |
|
||||
|
|
||||
}, |
|
||||
// 审核通过 |
|
||||
handleVerify(state){ |
|
||||
if(state == 2){ |
|
||||
let params ={ // 请求的参数 |
|
||||
state: state, |
|
||||
remarks:'', |
|
||||
userName: this.userInfo.userName, |
|
||||
} |
|
||||
user.verify(params).then(res => { |
|
||||
this.getverifyList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
this.dialogVisible = false |
|
||||
}) |
|
||||
}else{ |
|
||||
this.dialogBack = true |
|
||||
} |
|
||||
}, |
|
||||
// 审核不通过 |
|
||||
verifyBack(remarks){ |
|
||||
let params ={ // 请求的参数 |
|
||||
state: 3, |
|
||||
remarks:remarks, |
|
||||
userName: this.userInfo.userName, |
|
||||
} |
|
||||
user.verify(params).then(res => { |
|
||||
this.getverifyList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
this.dialogBack = false |
|
||||
this.dialogVisible = false |
|
||||
}) |
|
||||
}, |
|
||||
Rowdelete(row) { // 删除当前行 |
|
||||
this.$confirm('确认要删除吗?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
user.userNameDelete({userName: row.userName}).then(res => { |
|
||||
this.getverifyList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}).catch(() => { |
|
||||
this.$message({ |
|
||||
type: 'info', |
|
||||
message: '已取消删除' |
|
||||
}); |
|
||||
}); |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss" scoped="scoped"> |
|
||||
.el-image{ |
|
||||
width: 180px; |
|
||||
height: 150px; |
|
||||
} |
|
||||
.zcxx { |
|
||||
color: #000; |
|
||||
width: 98%; |
|
||||
margin: 0px auto 30px; |
|
||||
background-color: #f7f9fc; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
height: 60px; |
|
||||
line-height: 60px; |
|
||||
|
|
||||
p { |
|
||||
font-size: 18px; |
|
||||
float: left; |
|
||||
margin-top: 0px; |
|
||||
margin-left: 10px; |
|
||||
font-weight: bold; |
|
||||
width: 300px; |
|
||||
} |
|
||||
|
|
||||
.el-button { |
|
||||
float: right; |
|
||||
margin-top: 13px; |
|
||||
border: none; |
|
||||
width: 80px; |
|
||||
padding: 0; |
|
||||
text-align: center; |
|
||||
padding-top: 10px; |
|
||||
padding-bottom: 10px; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
table { |
|
||||
width: 98%; |
|
||||
margin: 0 auto; |
|
||||
|
|
||||
tr { |
|
||||
height: 45px; |
|
||||
vertical-align: top; |
|
||||
} |
|
||||
|
|
||||
td:first-child { |
|
||||
text-align: right; |
|
||||
width: 20%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(2) { |
|
||||
padding-left: 30px; |
|
||||
width: 23%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(3) { |
|
||||
text-align: right; |
|
||||
width: 20%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(4) { |
|
||||
padding-left: 30px; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
span { |
|
||||
font-size: 14px; |
|
||||
color: #015bff; |
|
||||
margin-left: 20px; |
|
||||
} |
|
||||
|
|
||||
.sfz { |
|
||||
border: 1px solid #e6e9f0; |
|
||||
width: 45%; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
#bei { |
|
||||
width: 21.4%; |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</style> |
|
@ -1,377 +0,0 @@ |
|||||
<!-- 人员绑定 --> |
|
||||
<template> |
|
||||
<div class="container"> |
|
||||
<!-- 查询 --> |
|
||||
<tab-search> |
|
||||
<div slot="from"> |
|
||||
<el-form ref="form" :inline="true" label-width="40px"> |
|
||||
<el-form-item label="姓名"> |
|
||||
<el-input v-model="page.params.userName" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-button @click="onSearch()">查询</el-button> |
|
||||
<!-- <el-button @click="resetSearch()">重置</el-button> --> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<div slot="btn"> |
|
||||
</div> |
|
||||
</tab-search> |
|
||||
|
|
||||
<!-- table --> |
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column prop="id" label="序号" width="60" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
{{(scope.$index+1)+(page.current-1)*page.size}} |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="190" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click="Register(scope.row)" type="primary" size="mini"> |
|
||||
{{scope.row.state == 1 ? "审核":"已通过"}} |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="idNo" label="身份证号码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="name" label="真实姓名" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="mobile" label="手机号码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="userName" label="用户名" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<!-- 分页 --> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" /> |
|
||||
<!-- 审核 --> |
|
||||
<el-dialog :visible.sync="dialogVisible" :append-to-body="true" width="70%" style="margin-top: -10vh;"> |
|
||||
<div class="zcxx" v-if="showbtn == 1"> |
|
||||
<p>审核单位人员信息</p> |
|
||||
<el-button type="primary" @click="dialogVisible=false" icon="el-icon-back" style="background-color: #0272c8;margin-right: 10px;">返回</el-button> |
|
||||
<el-button type="primary" @click="verify(3)" icon="el-icon-circle-close" style="background-color: #d6432b; margin-right: 10px;"> |
|
||||
不通过 |
|
||||
</el-button> |
|
||||
<el-button type="primary" @click="setinnerVisible" icon="el-icon-circle-check" style="background-color: #198e08;"> |
|
||||
通过 |
|
||||
</el-button> |
|
||||
</div> |
|
||||
<table style="font-size: 16px;"> |
|
||||
<tr> |
|
||||
<td>真实姓名:</td> |
|
||||
<td>{{verifyInfo.name }}</td> |
|
||||
<td>身份证号:</td> |
|
||||
<td>{{verifyInfo.idNo}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>用户名:</td> |
|
||||
<td>{{verifyInfo.userName}}</td> |
|
||||
<td>手机号:</td> |
|
||||
<td>{{verifyInfo.mobile}}</td> |
|
||||
</tr> |
|
||||
<tr style="vertical-align: middle;"> |
|
||||
<td>身份证正面照片:</td> |
|
||||
<td> |
|
||||
<eimage :url="verifyInfo.idFrontPhoto"></eimage> |
|
||||
</td> |
|
||||
<td>身份证背面照片:</td> |
|
||||
<td> |
|
||||
<eimage :url="verifyInfo.idBackPhoto"></eimage> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<el-dialog |
|
||||
width="30%" |
|
||||
title="绑定部门" |
|
||||
:visible.sync="innerVisible" |
|
||||
append-to-body> |
|
||||
<div class="block"> |
|
||||
<label class="demonstration">请选择部门: </label> |
|
||||
<el-cascader |
|
||||
v-model="departmentSid" |
|
||||
:options="treedata" |
|
||||
:props="props"></el-cascader> |
|
||||
<el-button type="primary" size='mini' @click="toNav('deptManage')" style="margin-left: 10px;" circle icon="el-icon-plus"></el-button> |
|
||||
</div> |
|
||||
<span slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="setDepartment(0)">保存</el-button> |
|
||||
<el-button @click="innerVisible = false">返回</el-button> |
|
||||
</span> |
|
||||
</el-dialog> |
|
||||
</el-dialog> |
|
||||
<el-dialog |
|
||||
width="30%" |
|
||||
title="绑定部门" |
|
||||
:visible.sync="bmdialog" |
|
||||
append-to-body> |
|
||||
<div class="block"> |
|
||||
<label class="demonstration">请选择部门: </label> |
|
||||
<el-cascader |
|
||||
v-model="departmentSid" |
|
||||
:options="treedata" |
|
||||
:props="props"></el-cascader> |
|
||||
<el-button type="primary" size='mini' @click="toNav('RoleAdminister')" style="margin-left: 10px;" circle icon="el-icon-plus"></el-button> |
|
||||
</div> |
|
||||
<span slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="setDepartment(1)">保存</el-button> |
|
||||
<el-button @click="bmdialog = false">返回</el-button> |
|
||||
</span> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</template> |
|
||||
<script> |
|
||||
import staffOrg from '@/api/jlcyry/staffOrg/staffOrg.js' |
|
||||
import departments from '@/api/system/departments/departments.js' |
|
||||
import { getOrgTree } from '@/api/system/departments/departments.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
props: { |
|
||||
value: "sid", |
|
||||
label: "name", |
|
||||
children: "orgDepartmentVoList" |
|
||||
}, |
|
||||
departmentSid: '', |
|
||||
dialogVisible: false, |
|
||||
dialogFormVisible: false, |
|
||||
innerVisible: false, |
|
||||
bmdialog: false, |
|
||||
showbtn: true, |
|
||||
departmentTree: [], |
|
||||
department: '', |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
params: {}, |
|
||||
size: 10, // 每页的数据条数 |
|
||||
}, |
|
||||
pageBackup: Object.assign({}, this.page), |
|
||||
tableData: [], |
|
||||
treedata: null, |
|
||||
verifyInfo: { // 审核的表单字段 |
|
||||
"idBackPhoto": "", |
|
||||
"idFrontPhoto": "", |
|
||||
"idNo": "", |
|
||||
"mobile": "", |
|
||||
"name": "", |
|
||||
"userName": "" |
|
||||
}, |
|
||||
verifyBackup: Object.assign({}, this.verifyInfo), |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
getverifyList(data) { // 获取table列表 |
|
||||
staffOrg.staffBingingList(data).then(res => { |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
onSearch() { //查询 |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
resetSearch() { // 查询重置 |
|
||||
this.page = { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
params: {}, |
|
||||
size: 10, // 每页的数据条数 |
|
||||
}, |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
// 获取审核 表单内容 |
|
||||
Register(row) { |
|
||||
this.dialogVisible = true |
|
||||
this.showbtn = row.state |
|
||||
this.verifyInfo = Object.assign({}, this.verifyBackup) |
|
||||
let params = { // 请求的参数 |
|
||||
userName: row.userName |
|
||||
} |
|
||||
staffOrg.staffOrgBingingDetails(params).then(res => { |
|
||||
console.log(res) |
|
||||
this.verifyInfo = res.data |
|
||||
this.verifyInfo.orgSid = row.orgSid |
|
||||
this.verifyInfo.staffSid = row.staffSid |
|
||||
}) |
|
||||
}, |
|
||||
verify(state) { // 审核 —— 通过 ,不通过 |
|
||||
let params = { // 请求的参数 |
|
||||
organizationSid: this.verifyInfo.orgSid, |
|
||||
staffSid: this.verifyInfo.staffSid, |
|
||||
state: state, |
|
||||
} |
|
||||
staffOrg.verify(params).then(res => { |
|
||||
console.log(res) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
this.getverifyList(this.page) |
|
||||
this.dialogVisible = false |
|
||||
this.dialogFormVisible = false |
|
||||
}) |
|
||||
}, |
|
||||
setDepartment(state){ |
|
||||
console.log(this.departmentSid) |
|
||||
let params = { // 请求的参数 |
|
||||
departmentSid: this.departmentSid[this.departmentSid.length-1], |
|
||||
staffSid: this.verifyInfo.staffSid, |
|
||||
} |
|
||||
staffOrg.setUpDepartment(params).then(res => { |
|
||||
this.innerVisible = false |
|
||||
this.bmdialog = false |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
if(state == 0){ |
|
||||
this.verify(2) |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
setinnerVisible(){ |
|
||||
this.innerVisible = true |
|
||||
this.getOrgTree() |
|
||||
}, |
|
||||
setbmdialog(){ |
|
||||
this.bmdialog = true |
|
||||
this.getOrgTree() |
|
||||
}, |
|
||||
getOrgTree(){ // 获取部门树形列表 |
|
||||
function treeArr(data){ |
|
||||
if (data.length > 0) { |
|
||||
for (var i = 0; i < data.length; i++) { |
|
||||
if(data[i].orgDepartmentVoList.length > 0){ |
|
||||
treeArr(data[i].orgDepartmentVoList) |
|
||||
} else { |
|
||||
delete data[i].orgDepartmentVoList |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
getOrgTree({organizationSid: this.$store.getters.userInfo.orgSid}).then(res => { |
|
||||
let tree = res.data[0].orgDepartmentVoList |
|
||||
treeArr(tree) |
|
||||
this.treedata = tree |
|
||||
}) |
|
||||
}, |
|
||||
delete(row) { // 删除当前行 |
|
||||
this.$confirm('确认要删除吗?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
user.delete().then(res => { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}).catch(() => { |
|
||||
this.$message({ |
|
||||
type: 'info', |
|
||||
message: '已取消删除' |
|
||||
}); |
|
||||
}); |
|
||||
}, |
|
||||
toNav(src){ |
|
||||
this.$router.push("/"+src); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss" scoped="scoped"> |
|
||||
.el-image { |
|
||||
width: 180px; |
|
||||
height: 150px; |
|
||||
} |
|
||||
|
|
||||
.el-image__preview { |
|
||||
object-fit: none !important; |
|
||||
} |
|
||||
.demonstration{ |
|
||||
padding-right: 10px; |
|
||||
} |
|
||||
.zcxx { |
|
||||
color: #000; |
|
||||
width: 98%; |
|
||||
margin: 0px auto 30px; |
|
||||
background-color: #f7f9fc; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
height: 60px; |
|
||||
line-height: 60px; |
|
||||
|
|
||||
p { |
|
||||
font-size: 18px; |
|
||||
float: left; |
|
||||
margin-top: 0px; |
|
||||
margin-left: 10px; |
|
||||
font-weight: bold; |
|
||||
width: 300px; |
|
||||
} |
|
||||
|
|
||||
.el-button { |
|
||||
float: right; |
|
||||
margin-top: 13px; |
|
||||
border: none; |
|
||||
width: 80px; |
|
||||
padding: 0; |
|
||||
text-align: center; |
|
||||
padding-top: 10px; |
|
||||
padding-bottom: 10px; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
table { |
|
||||
width: 98%; |
|
||||
margin: 0 auto; |
|
||||
|
|
||||
tr { |
|
||||
height: 45px; |
|
||||
vertical-align: top; |
|
||||
} |
|
||||
|
|
||||
td:first-child { |
|
||||
text-align: right; |
|
||||
width: 20%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(2) { |
|
||||
padding-left: 30px; |
|
||||
width: 23%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(3) { |
|
||||
text-align: right; |
|
||||
width: 20%; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(4) { |
|
||||
padding-left: 30px; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
span { |
|
||||
font-size: 14px; |
|
||||
color: #015bff; |
|
||||
margin-left: 20px; |
|
||||
} |
|
||||
|
|
||||
.sfz { |
|
||||
border: 1px solid #e6e9f0; |
|
||||
width: 45%; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
#bei { |
|
||||
width: 21.4%; |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</style> |
|
@ -1,58 +0,0 @@ |
|||||
<template> |
|
||||
<el-dialog title="退回原因" :visible.sync="dialogBack" :before-close="handleClose" append-to-body> |
|
||||
<el-form :model="formBack" :rules="rules" ref="formBack"> |
|
||||
<el-form-item label="" prop="remarks"> |
|
||||
<el-input type="textarea" :rows="4" v-model="formBack.remarks" autocomplete="off"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
<div slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="submitForm('formBack')">退 回</el-button> |
|
||||
<el-button @click="handleClose">取 消</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
export default { |
|
||||
props: { |
|
||||
dialogBack: Boolean, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
formBack: { |
|
||||
remarks: '' |
|
||||
}, |
|
||||
rules: { |
|
||||
name: [{ |
|
||||
required: true, |
|
||||
message: '请输入', |
|
||||
trigger: 'blur' |
|
||||
}] |
|
||||
} |
|
||||
}; |
|
||||
}, |
|
||||
methods: { |
|
||||
// 关闭弹匡事件 |
|
||||
handleClose(done) { |
|
||||
this.$emit('update:dialogBack', false) |
|
||||
this.$nextTick(() => { |
|
||||
done() |
|
||||
}) |
|
||||
}, |
|
||||
submitForm(formName) { |
|
||||
this.$refs[formName].validate((valid) => { |
|
||||
if (valid) { |
|
||||
console.log(this.formBack.remarks) |
|
||||
this.$emit('verifyBack', this.formBack.remarks) |
|
||||
} else { |
|
||||
console.log('error submit!!'); |
|
||||
return false; |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
</style> |
|
@ -1,151 +0,0 @@ |
|||||
<template> |
|
||||
<div class="orginfo"> |
|
||||
<div class="zcxx"> |
|
||||
<p>审核单位注册信息</p> |
|
||||
</div> |
|
||||
<table style="font-size: 16px;"> |
|
||||
<tr> |
|
||||
<td>法人证书:</td> |
|
||||
<td>{{orgInfo.orgCode}}</td> |
|
||||
<td>单位全称:</td> |
|
||||
<td>{{orgInfo.name}}<span>点击验证企业</span></td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>法定代表人姓名:</td> |
|
||||
<td>{{orgInfo.contactMan}}</td> |
|
||||
<td>单位类别:</td> |
|
||||
<td>{{orgInfo.dwType}}</td> |
|
||||
</tr> |
|
||||
|
|
||||
<tr> |
|
||||
<td>电话:</td> |
|
||||
<td>{{orgInfo.contactMobile}}</td> |
|
||||
<td>单位地理位置:</td> |
|
||||
<td>{{orgInfo.gisInfo}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>所在区域:</td> |
|
||||
<td>{{orgInfo.region}}</td> |
|
||||
<td>单位级别:</td> |
|
||||
<td>{{orgInfo.dwjb}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>单位通讯地址:</td> |
|
||||
<td colspan="3"> |
|
||||
{{orgInfo.postAddress}} |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>单位注册地址:</td> |
|
||||
<td colspan="3">{{orgInfo.orgAddress}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>单位营业执照副本复印件:</td> |
|
||||
<td> |
|
||||
<eimage :url="orgInfo.grantPhoto"></eimage> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<div class="zcxx" style="margin-top: 20px;"> |
|
||||
<p>被委托人信息</p> |
|
||||
</div> |
|
||||
<table class="bwtr" style="font-size: 16px;"> |
|
||||
<tr> |
|
||||
<td>身份证号:</td> |
|
||||
<td>{{orgInfo.idNo}}</td> |
|
||||
<td>姓名:</td> |
|
||||
<td>{{orgInfo.name}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>用户名:</td> |
|
||||
<td>{{orgInfo.userName}}</td> |
|
||||
<td>手机号码:</td> |
|
||||
<td>{{orgInfo.mobile}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>单位管理员头像:</td> |
|
||||
<td> |
|
||||
<eimage :url="orgInfo.photoPath"></eimage> |
|
||||
</td> |
|
||||
<td>授权书复印件:</td> |
|
||||
<td> |
|
||||
<eimage :url="orgInfo.businessLicense"></eimage> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>身份证正面复印件:</td> |
|
||||
<td> |
|
||||
<eimage :url="orgInfo.idBackPhoto"></eimage> |
|
||||
</td> |
|
||||
<td>身份证反面复印件:</td> |
|
||||
<td> |
|
||||
<eimage :url="orgInfo.idFrontPhoto"></eimage> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
export default { |
|
||||
props: { |
|
||||
orgInfo: { |
|
||||
type: Object, |
|
||||
default () { |
|
||||
return {} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss" scoped="scoped"> |
|
||||
.el-image{ |
|
||||
width: 180px; |
|
||||
height: 150px; |
|
||||
} |
|
||||
.zcxx { |
|
||||
color: #000; |
|
||||
width: 98%; |
|
||||
margin: 0px auto 30px; |
|
||||
background-color: #f7f9fc; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
height: 60px; |
|
||||
line-height: 60px; |
|
||||
|
|
||||
p { |
|
||||
font-size: 16px; |
|
||||
float: left; |
|
||||
margin-top: 0px; |
|
||||
margin-left: 10px; |
|
||||
font-weight: bold; |
|
||||
width: 300px; |
|
||||
} |
|
||||
|
|
||||
.el-button { |
|
||||
float: right; |
|
||||
margin-top: 13px; |
|
||||
border: none; |
|
||||
width: 80px; |
|
||||
padding: 0; |
|
||||
text-align: center; |
|
||||
padding-top: 10px; |
|
||||
padding-bottom: 10px; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
table { |
|
||||
width: 100%; |
|
||||
margin: 0 20px; |
|
||||
td { |
|
||||
padding: 5px 0; |
|
||||
} |
|
||||
span { |
|
||||
font-size: 14px; |
|
||||
color: #015bff; |
|
||||
margin-left: 20px; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
</style> |
|
@ -1,35 +0,0 @@ |
|||||
<template> |
|
||||
<div class="zcxx"> |
|
||||
<p>审核注册个人信息</p> |
|
||||
</div> |
|
||||
<table style="font-size: 18px;"> |
|
||||
<tr> |
|
||||
<td>真实姓名:</td> |
|
||||
<td>{{userInfo.name }}</td> |
|
||||
<td>身份证号:</td> |
|
||||
<td>{{userInfo.idNo}}</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>用户名:</td> |
|
||||
<td>{{userInfo.userName}}</td> |
|
||||
<td>手机号:</td> |
|
||||
<td>{{userInfo.mobile}}</td> |
|
||||
</tr> |
|
||||
<tr style="vertical-align: middle;"> |
|
||||
<td>身份证正面照片:</td> |
|
||||
<td> |
|
||||
<eimage :src="userInfo.idFrontPhoto"></eimage> |
|
||||
</td> |
|
||||
<td>身份证背面照片:</td> |
|
||||
<td> |
|
||||
<eimage :src="userInfo.idBackPhoto"></eimage> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
</style> |
|
@ -1,180 +0,0 @@ |
|||||
<template> |
|
||||
<div class="container"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="14"> |
|
||||
<el-form-item label="数据value"> |
|
||||
<el-input v-model="page.params.dictValue" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="10"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="onSearch()">查 询</el-button> |
|
||||
<el-button @click="add()">添 加</el-button> |
|
||||
<el-button @click="$router.go(-1)">返 回</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="editRow(scope.row)"> |
|
||||
修改 |
|
||||
</el-button> |
|
||||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="dictType" label="字典分类编码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="dictKey" label="数据key" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="dictValue" label="数据value" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
|
|
||||
<!-- 分类编辑 --> |
|
||||
<el-dialog :title="dialogTitle + '字典分类'" :visible.sync="editDialog" width="50%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>字典分类编码</td> |
|
||||
<td> |
|
||||
{{form.dictType}} |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>数据key</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.dictKey"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>数据value</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.dictValue"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<span slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="editDialog = false">关 闭</el-button> |
|
||||
</span> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { dictCommonList, savedictCommon, putdictCommon, deldictCommon } from '@/api/system/dictType/dictCommon.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
editDialog: false, |
|
||||
dialogTitle: '', |
|
||||
form: { |
|
||||
dictKey: '', |
|
||||
dictType: '', |
|
||||
dictValue: '', |
|
||||
parentSid: '' |
|
||||
}, |
|
||||
formBackup: Object.assign({}, this.form), |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params:{ |
|
||||
dictKey: '', |
|
||||
dictType: '', |
|
||||
dictValue: '', |
|
||||
parentSid: '', |
|
||||
sidPath: '', |
|
||||
} |
|
||||
}, |
|
||||
tableData: [] |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.page.params.dictType = this.$route.params.dictType |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
onSearch() { //查询 |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ // 重置 |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
getPageList(data){ // 获取列表 |
|
||||
dictCommonList(data).then((res)=>{ |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
add(){ |
|
||||
this.dialogTitle = '新增' |
|
||||
this.editDialog = true |
|
||||
this.form = Object.assign({}, this.formBackup) |
|
||||
this.form.dictType = this.$route.params.dictType |
|
||||
}, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.editDialog = true |
|
||||
this.form = Object.assign({}, row) |
|
||||
|
|
||||
}, |
|
||||
save(){ |
|
||||
this.form.parentSid = this.$route.params.sid |
|
||||
if(this.form.sid){ |
|
||||
putdictCommon(this.form).then(res => { |
|
||||
this.editDialog = false |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}else{ |
|
||||
savedictCommon(this.form).then(res => { |
|
||||
this.editDialog = false |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
deleteRow(row) { |
|
||||
this.$confirm('确定要删除该角色吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
deldictCommon({sid: row.sid}).then(res => { |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss"> |
|
||||
|
|
||||
</style> |
|
@ -1,433 +0,0 @@ |
|||||
<template> |
|
||||
<div class="container" style="display: flex;"> |
|
||||
<div class="org-tree"> |
|
||||
<el-tree :data="treedata" |
|
||||
node-key="organizationSid" |
|
||||
:props="props" |
|
||||
default-expand-all |
|
||||
@node-click="handleNodeClick" |
|
||||
:expand-on-click-node="false"> |
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }" |
|
||||
@mouseenter="mouseenter(data)" |
|
||||
@mouseleave="mouseleave(data)" |
|
||||
@click.stop.native> |
|
||||
<span>{{ node.label || $store.getters.userInfo.Orgname }}</span> |
|
||||
<span v-show="data.del" class="handle"> |
|
||||
<el-tooltip class="item" effect="dark" content="新增" placement="top-start"> |
|
||||
<el-button type="text" size="mini" @click.stop="() => append(data)" icon="el-icon-circle-plus-outline"> |
|
||||
</el-button> |
|
||||
</el-tooltip> |
|
||||
<el-tooltip v-show="data.sid" class="item" effect="dark" content="修改" placement="top-start"> |
|
||||
<el-button type="text" size="mini" @click.stop="() => deit(data)" icon="el-icon-edit"> |
|
||||
</el-button> |
|
||||
</el-tooltip> |
|
||||
<el-tooltip v-show="data.sid" class="item" effect="dark" content="删除" placement="top-start"> |
|
||||
<el-button type="text" size="mini" @click.stop="() => remove(data)" icon="el-icon-delete"> |
|
||||
</el-button> |
|
||||
</el-tooltip> |
|
||||
</span> |
|
||||
</span> |
|
||||
</el-tree> |
|
||||
</div> |
|
||||
|
|
||||
<el-dialog title="编辑节点" :visible.sync="dialogVisible" width="40%"> |
|
||||
<el-form :model="nodeForm"> |
|
||||
<el-form-item label="部门名称" label-width="120px"> |
|
||||
<el-input v-model="nodeForm.name" autocomplete="off"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="排序号" label-width="120px"> |
|
||||
<el-input v-model="nodeForm.sortNo" autocomplete="off"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
<div slot="footer" class="text-center"> |
|
||||
<el-button type="primary" @click="nodeSave()">保 存</el-button> |
|
||||
<el-button @click="dialogVisible = false">返 回</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
|
|
||||
<div class="org-table" v-show="isshow == 'table'"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="24"> |
|
||||
<el-form-item label="部门名称"> |
|
||||
<el-input v-model="page.params.name" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item> |
|
||||
<el-button @click="onSearch()">查询</el-button> |
|
||||
<el-button @click="resetSearch()">重置</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<!-- table --> |
|
||||
<el-table |
|
||||
:data="tableData" |
|
||||
default-expand-all |
|
||||
border style="width: 100%;"> |
|
||||
<el-table-column label="序号" type="index" width="70px" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" align="center" width="200px"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="editRow(scope.row)" > |
|
||||
编辑 |
|
||||
</el-button> |
|
||||
<el-button type="danger" size="mini" @click.native.prevent="remove(scope.row)"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
|
|
||||
<el-table-column prop="name" label="部门名称" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="contactMan" label="联系人" align="center" width="100px"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="mobile" label="联系人手机号码" width="160px" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="address" label="地址" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="sortNo" label="排序" align="center" width="50px"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="regdate" label="二维码" align="center" width="80px"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button @click.native.prevent="lookRow(scope.row)" type="text" size="small"> |
|
||||
查看 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
</div> |
|
||||
|
|
||||
<div class="org-table" v-show="isshow == 'ewm'"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="16"> |
|
||||
<h4 style="margin: 0;line-height: 32px;">部门二维码</h4> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="Printewm">打 印</el-button> |
|
||||
<el-button @click="isshow = 'table'">返 回</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- center --> |
|
||||
<div class="ewm"style="display: flex;justify-content: center; align-items: center;" ref="print"> |
|
||||
<img style="width: 200px; height: 200px;" :src="ewmForm.qrFilePath" alt=""> |
|
||||
<ul style="list-style:none; line-height: 32px; font-size: 16px;"> |
|
||||
<li><label for="">部门名称: </label><span>{{ewmForm.departmentName}}</span></li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
<!-- 新增编辑 --> |
|
||||
<div class="org-table" v-show="isshow == 'edit'"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="16"> |
|
||||
<h4 style="margin: 0;line-height: 32px;"> {{ dialogTitle }}部门信息</h4> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="isshow = 'table'">返 回</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- center --> |
|
||||
<div class="ediut"> |
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px"> |
|
||||
<el-form-item label="部门名称" prop="name"> |
|
||||
<el-input v-model="form.name"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="部门地理位置" prop="dlxx"> |
|
||||
<el-input v-model="form.dlxx" readonly> |
|
||||
<el-button slot="append" icon="el-icon-map-location" @click='mapDialog = true'></el-button> |
|
||||
</el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="部门地址" prop="address"> |
|
||||
<el-input v-model="form.address"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="部门联系人" prop="contactMan"> |
|
||||
<el-input v-model="form.contactMan"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系电话" prop="mobile"> |
|
||||
<el-input v-model="form.mobile"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="排序号" prop="sortNo"> |
|
||||
<el-input v-model="form.sortNo"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
<Position v-if="mapDialog" :address.sync="form.address" :maker-position.sync="form.dlxx" :dialog-visible.sync="mapDialog" /> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { getOrgTree, addOrgTree, getPagelist, putOrgtree, postOrgtree, delOrgtree, getQrCode } from '@/api/system/departments/departments.js' |
|
||||
import Position from '@/components/amap/amap.vue' |
|
||||
export default { |
|
||||
components:{ Position }, |
|
||||
data() { |
|
||||
return { |
|
||||
dialogVisible: false, |
|
||||
mapDialog: false, |
|
||||
dialogTitle: '', |
|
||||
props:{ |
|
||||
label:"name", |
|
||||
children:"orgDepartmentVoList", |
|
||||
}, |
|
||||
nodeForm:{ |
|
||||
sid: '', |
|
||||
name: '', |
|
||||
sortNo:'' |
|
||||
}, |
|
||||
ewmForm: { |
|
||||
qrFilePath: '', |
|
||||
organizationName: '', |
|
||||
departmentName: '', |
|
||||
address: '' |
|
||||
}, |
|
||||
form: { |
|
||||
organizationSid: '', |
|
||||
psid: '', |
|
||||
address: '', |
|
||||
dlxx: '' |
|
||||
}, |
|
||||
formBackup: Object.assign({}, this.form), |
|
||||
isshow: 'table', |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params:{ |
|
||||
name: '', |
|
||||
organizationSid: '', |
|
||||
psid: '' |
|
||||
} |
|
||||
}, |
|
||||
tableData: [], |
|
||||
treedata: [], |
|
||||
rules:{ |
|
||||
name:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
], |
|
||||
dlxx:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
], |
|
||||
address:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
], |
|
||||
contactMan:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
], |
|
||||
mobile:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
], |
|
||||
sortNo:[ |
|
||||
{ required: true, message: '请输入', trigger: 'blur' }, |
|
||||
] |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getOrgTree() |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
handleNodeClick(data){ |
|
||||
this.isshow = 'table' |
|
||||
this.page.params.organizationSid = this.$store.getters.userInfo.orgSid |
|
||||
this.page.params.psid = data.sid || 0 |
|
||||
|
|
||||
// let params = { |
|
||||
// total: 0, |
|
||||
// current: 1, |
|
||||
// size: 10, |
|
||||
// params:{ |
|
||||
// name: '', |
|
||||
// organizationSid: this.$store.getters.userInfo.orgSid, |
|
||||
// psid: data.sid || 0 |
|
||||
// } |
|
||||
// } |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
getPageList(data){ // 获取树形列表 |
|
||||
getPagelist(data).then(res => { |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
getOrgTree(){ // 获取树形列表 |
|
||||
getOrgTree({organizationSid: this.$store.getters.userInfo.orgSid}).then(res => { |
|
||||
this.treedata = res.data |
|
||||
}) |
|
||||
}, |
|
||||
save(){ |
|
||||
this.form.organizationSid = this.$store.getters.userInfo.orgSid |
|
||||
console.log(this.form) |
|
||||
this.form.dlxx = typeof(this.form.dlxx) == 'string' ? this.form.dlxx : this.form.dlxx.join() |
|
||||
if(this.form.sid){ |
|
||||
putOrgtree(this.form).then(res => { |
|
||||
this.isshow = 'table' |
|
||||
this.getOrgTree() |
|
||||
this.handleNodeClick({sid: this.form.psid}) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}else{ |
|
||||
addOrgTree(this.form).then(res => { |
|
||||
this.isshow = 'table' |
|
||||
this.getOrgTree() |
|
||||
this.handleNodeClick({sid: this.form.psid}) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
append(data) { |
|
||||
console.log(data) |
|
||||
this.dialogTitle = '新增' |
|
||||
this.isshow = 'edit' |
|
||||
this.form = Object.assign({}, this.formBackup) |
|
||||
this.form.psid = data.sid || 0 |
|
||||
this.form.organizationSid = this.$store.getters.userInfo.orgSid |
|
||||
this.form.address = data.orgAddress || data.address |
|
||||
this.form.dlxx = data.gisInfo || data.dlxx |
|
||||
}, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.isshow = 'edit' |
|
||||
this.form = Object.assign({}, row) |
|
||||
// getRoleInfo({sid: row.sid}).then(res => { |
|
||||
// this.form = res.data |
|
||||
// // this.user = Object.assign({}, row |
|
||||
// }) |
|
||||
}, |
|
||||
deit(data){ // 节点编辑保存 |
|
||||
console.log(data) |
|
||||
this.dialogVisible = true |
|
||||
this.nodeForm.sid = data.sid |
|
||||
this.nodeForm.name = data.name |
|
||||
this.nodeForm.sortNo = data.sortNo |
|
||||
}, |
|
||||
nodeSave(){ // 节点编辑保存 |
|
||||
postOrgtree(this.nodeForm).then(res => { |
|
||||
this.getOrgTree() |
|
||||
this.dialogVisible = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
remove(data) { |
|
||||
this.$confirm('确定要删除该角色吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
delOrgtree({sid:data.sid}).then(res => { |
|
||||
this.getOrgTree() |
|
||||
this.handleNodeClick({sid: data.psid}) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
lookRow(row){ // 查看二维码 |
|
||||
this.isshow = 'ewm' |
|
||||
getQrCode({sid: row.sid}).then(res => { |
|
||||
this.ewmForm = res.data |
|
||||
}) |
|
||||
}, |
|
||||
Printewm(){ |
|
||||
this.$print(this.$refs.print) // 使用 |
|
||||
}, |
|
||||
mouseenter(data){ |
|
||||
this.$set(data, 'del', true) |
|
||||
}, |
|
||||
mouseleave(data){ |
|
||||
this.$set(data, 'del', false) |
|
||||
}, |
|
||||
onSearch(){ |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ |
|
||||
this.page.params.name = '' |
|
||||
this.getPageList(this.page) |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.el-icon-arrow-right:before { |
|
||||
content: '\e6e0'; |
|
||||
color: #727272; |
|
||||
} |
|
||||
</style> |
|
||||
|
|
||||
<style scoped="scoped" lang="scss"> |
|
||||
.org-tree { |
|
||||
width: 240px; |
|
||||
min-height: 100%; |
|
||||
box-sizing: border-box; |
|
||||
padding-right: 10px; |
|
||||
border: 1px solid #edf1f7; |
|
||||
} |
|
||||
|
|
||||
.org-table { |
|
||||
flex: 1; |
|
||||
// padding-left: 10px; |
|
||||
margin:0 10px; |
|
||||
border: 1px solid #edf1f7; |
|
||||
.ewm{ |
|
||||
margin: 30px auto 0; |
|
||||
width:560px; |
|
||||
} |
|
||||
.ediut{ |
|
||||
margin: 30px auto 0; |
|
||||
width:750px; |
|
||||
} |
|
||||
} |
|
||||
.custom-tree-node { |
|
||||
position: relative; |
|
||||
overflow: hidden; |
|
||||
width: 100%; |
|
||||
flex: 1; |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
justify-content: space-between; |
|
||||
font-size: 14px; |
|
||||
padding-right: 8px; |
|
||||
} |
|
||||
.handle{ |
|
||||
position: absolute; |
|
||||
right: 0; |
|
||||
|
|
||||
.el-button--text{ |
|
||||
font-size: 15px; |
|
||||
background-color: #FFFFFF; |
|
||||
} |
|
||||
} |
|
||||
</style> |
|
@ -1,323 +0,0 @@ |
|||||
<template> |
|
||||
<div class="container"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form :inline="true" :model="form" class="demo-form-inline"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="16"> |
|
||||
<el-form-item label="角色名称"> |
|
||||
<el-input v-model="page.params.roleName" placeholder="角色名称" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button type="primary" @click="onSearch">查询</el-button> |
|
||||
<el-button type="primary" @click="add()">新增</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- table --> |
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="70px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="260px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="roleMenus(scope.row)"> |
|
||||
菜单授权 |
|
||||
</el-button> |
|
||||
<el-button type="primary" size="mini" @click="editRow(scope.row)"> |
|
||||
修改 |
|
||||
</el-button> |
|
||||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="roleName" label="角色名称" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="orgTypeKey" label="单位类别" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="remarks" label="备注" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="enabled" label="是否可用" width="100px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-switch |
|
||||
v-model="scope.row.isEnable" |
|
||||
active-color="#13ce66" |
|
||||
inactive-color="#ff4949" |
|
||||
:active-value="1" |
|
||||
:inactive-value="0" |
|
||||
@change="enabledChange(scope.row.isEnable,scope.row)"> |
|
||||
</el-switch> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
<!-- 编辑角色信息 --> |
|
||||
<el-dialog :title="dialogTitle + '角色信息'" :visible.sync="editDialog" width="40%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td>角色名称</td> |
|
||||
<td> |
|
||||
<el-input v-model="form.roleName"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>单位类型</td> |
|
||||
<td> |
|
||||
<el-select v-model="form.orgTypeKey" placeholder="请选择单位类型"> |
|
||||
<el-option |
|
||||
v-for="item in dwlb" |
|
||||
:key="item.sid" |
|
||||
:label="item.dictValue" |
|
||||
:value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>用户类型</td> |
|
||||
<td> |
|
||||
<el-select v-model="form.state" placeholder="请选择用户类型"> |
|
||||
<el-option |
|
||||
v-for="item in userType" |
|
||||
:key="item.dictKey" |
|
||||
:label="item.dictValue" |
|
||||
:value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td>备注</td> |
|
||||
<td> |
|
||||
<el-input type="textarea" v-model="form.remarks"></el-input> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<span slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="save()">保 存</el-button> |
|
||||
<el-button @click="editDialog = false">关 闭</el-button> |
|
||||
</span> |
|
||||
</el-dialog> |
|
||||
<!-- 菜单授权 --> |
|
||||
<el-dialog title="菜单授权" :visible.sync="roleDialog" width="50%"> |
|
||||
<el-tree |
|
||||
v-loading="loading" |
|
||||
:data="treedata" |
|
||||
ref="Tree" |
|
||||
show-checkbox |
|
||||
accordion |
|
||||
node-key="sid" |
|
||||
:default-checked-keys="checkedId" |
|
||||
@setChecked="setChecked" |
|
||||
:props="defaultProps" |
|
||||
@check-change="checkchange"> |
|
||||
</el-tree> |
|
||||
<div slot="footer" class="text-center"> |
|
||||
<el-button type="primary" @click="getCheckedKeys">保 存</el-button> |
|
||||
<el-button @click="roleDialog = false">返 回</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
|
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { rolePageList, saveRoleInfo, getRoleInfo, putRoleInfo, delRole, setRoleEnable } from '@/api/system/Role/roleManage.js' |
|
||||
import { getrolemenus, saverolemenus } from '@/api/system/roleMenus/index.js' |
|
||||
import { getDicts } from '@/api/system/dataDict/dataDict.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
loading: false, |
|
||||
dialogTitle: '', |
|
||||
form: {}, |
|
||||
formBackup: Object.assign({}, this.form), |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params: { |
|
||||
roleName: '' |
|
||||
}, |
|
||||
}, |
|
||||
tableData: [], |
|
||||
editDialog: false, |
|
||||
treedata: [], |
|
||||
roleDialog: false, |
|
||||
defaultProps: { |
|
||||
children: 'children', |
|
||||
label: 'menuName' |
|
||||
}, |
|
||||
checkedId: [], |
|
||||
roleSid: '', |
|
||||
chace: [], |
|
||||
userType:[], |
|
||||
dwlb:[] |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getPageList(this.page) |
|
||||
getDicts("userType").then(res =>{ this.userType = res.data }) |
|
||||
getDicts('dwlb').then(res =>{ this.dwlb = res.data }) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
onSearch() { //查询 |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ // 重置 |
|
||||
this.page = { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params: { |
|
||||
roleName: '' |
|
||||
}, |
|
||||
} |
|
||||
this.getPageList(this.page) |
|
||||
}, |
|
||||
getPageList(data){ // 获取列表 |
|
||||
|
|
||||
rolePageList(data).then((res)=>{ |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
add(){ |
|
||||
this.dialogTitle = '新增' |
|
||||
this.editDialog = true |
|
||||
this.form = Object.assign({}, this.formBackup) |
|
||||
}, |
|
||||
save(){ |
|
||||
let data = this.form |
|
||||
if(this.form.sid){ |
|
||||
putRoleInfo(this.form).then(res => { |
|
||||
this.editDialog = false |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}else{ |
|
||||
saveRoleInfo(data).then(res => { |
|
||||
this.editDialog = false |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
editRow(row) { |
|
||||
this.dialogTitle = '编辑' |
|
||||
this.editDialog = true |
|
||||
this.form = Object.assign({}, row) |
|
||||
// getRoleInfo({sid: row.sid}).then(res => { |
|
||||
// this.form = res.data |
|
||||
// // this.user = Object.assign({}, row |
|
||||
// }) |
|
||||
}, |
|
||||
deleteRow(row) { |
|
||||
this.$confirm('确定要删除该角色吗, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
delRole({sid: row.sid}).then(res => { |
|
||||
this.getPageList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
enabledChange(value,row){ |
|
||||
console.log(value,row) |
|
||||
setRoleEnable({isEnable:value, sid: row.sid }).then(res => { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
}) |
|
||||
}, |
|
||||
roleMenus(row){ // 获取授权菜单树形 |
|
||||
this.roleDialog = true |
|
||||
this.checkedId = [] |
|
||||
this.roleSid = row.sid |
|
||||
this.loading = true |
|
||||
getrolemenus({roleSid: row.sid}).then(res => { |
|
||||
this.treedata = res.data |
|
||||
this.getTreeParentNode(res.data, this.checkedId) |
|
||||
this.getTreeParentid(res.data) |
|
||||
this.loading = false |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
// 递归查询所有上级数据 |
|
||||
getTreeParentNode (menus, ids) { |
|
||||
for (var i = 0; i < menus.length; i++) { |
|
||||
if (menus[i].children && menus[i].children.length != 0) { |
|
||||
this.getTreeParentNode(menus[i].children, ids) |
|
||||
}else if (menus[i].isCheck) { |
|
||||
ids.push(menus[i].sid) |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
// 所有一级菜单ID |
|
||||
getTreeParentid (menus) { |
|
||||
for (var i = 0; i < menus.length; i++) { |
|
||||
this.chace.push(menus[i].sid) |
|
||||
} |
|
||||
}, |
|
||||
getCheckedKeys() { |
|
||||
let roleMenus = [] |
|
||||
this.$refs.Tree.getCheckedKeys().forEach(val => { |
|
||||
roleMenus.push({ |
|
||||
menuSid: val, |
|
||||
roleSid: this.roleSid |
|
||||
}) |
|
||||
}) |
|
||||
let parentTrue = this.$refs.Tree.getHalfCheckedKeys() |
|
||||
for(let i = 0; i < parentTrue.length;i++) { |
|
||||
for(let j = 0; j < this.chace.length;j++) { |
|
||||
if(parentTrue[i] == this.chace[j]) { |
|
||||
parentTrue.splice(i, 1); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
parentTrue.forEach(val => { |
|
||||
roleMenus.push({ |
|
||||
menuSid: val, |
|
||||
roleSid: this.roleSid |
|
||||
}) |
|
||||
}) |
|
||||
saverolemenus({roleSid: this.roleSid,roleMenus: roleMenus}).then(res => { |
|
||||
this.roleDialog = false |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
setChecked(){ |
|
||||
}, |
|
||||
checkchange(){ |
|
||||
console.log(this.$refs.Tree.getCheckedKeys()) |
|
||||
console.log(this.$refs.Tree.getHalfCheckedKeys()) |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped="scoped" lang="scss"> |
|
||||
|
|
||||
</style> |
|
@ -1,363 +0,0 @@ |
|||||
<template> |
|
||||
<div class="container"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|
||||
<el-row :gutter="20"> |
|
||||
<el-col :span="16"> |
|
||||
<el-form-item label="单位名称"> |
|
||||
<el-input v-model="page.params.organizationName"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="用户名"> |
|
||||
<el-input v-model="page.params.userName"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<el-form-item style="float: right;"> |
|
||||
<el-button @click="onSearch()">查询</el-button> |
|
||||
<el-button @click="resetSearch()">重置</el-button> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<!-- table --> |
|
||||
<div class="table-describe clearfix"> |
|
||||
<h4 style="">用户信息列表</h4> |
|
||||
<pagination class="pagesize" layout="sizes" :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
</div> |
|
||||
<el-table :data="tableData" border style="width: 100%;"> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" width="200px" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<!-- <el-button @click="getrolelist(scope.row)" type="primary" size="mini" |
|
||||
:disabled="!scope.row.organizationName"> |
|
||||
设置角色 |
|
||||
</el-button> --> |
|
||||
<el-button @click="initPwd(scope.row)" type="primary" size="mini"> |
|
||||
初始化密码 |
|
||||
</el-button> |
|
||||
<el-button @click="delUser(scope.row)" type="danger" size="mini"> |
|
||||
删除 |
|
||||
</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="userName" label="用户名" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span class="tablerow-click" @click="userinfo(scope.row)">{{scope.row.userName}}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="idNo" label="身份证号码" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="name" label="真实姓名" width="120px" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="mobile" label="手机号码" align="center" width="140px"> |
|
||||
</el-table-column> |
|
||||
<!-- <el-table-column prop="role" label="角色" align="center" width="140px"> |
|
||||
</el-table-column> --> |
|
||||
<el-table-column prop="organizationName" label="单位名称" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span class="tablerow-click" @click="orgInfo(scope.row)">{{scope.row.organizationName}}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|
||||
|
|
||||
<el-dialog title="用户信息" :visible.sync="showuserInfo" width="70%" > |
|
||||
<table class="tishi" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td style="border-bottom: none; border-right: none;">真实姓名</td> |
|
||||
<td style="border-bottom: none;"> |
|
||||
{{userInfoFrom.name}} |
|
||||
</td> |
|
||||
<td style="border-bottom: none; border-right: none;">身份证号码</td> |
|
||||
<td style="border-bottom: none;"> |
|
||||
{{userInfoFrom.idNo}} |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td style="border-bottom: none; border-right: none;">用户名</td> |
|
||||
<td style="border-bottom: none;"> |
|
||||
{{userInfoFrom.userName}} |
|
||||
</td> |
|
||||
<td style="border-bottom: none; border-right: none;">手机号码</td> |
|
||||
<td style="border-bottom: none;"> |
|
||||
{{userInfoFrom.mobile}} |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td style="border-right: none;">身份证正面照片</td> |
|
||||
<td> |
|
||||
<eimage :url="userInfoFrom.idFrontPhoto"></eimage> |
|
||||
</td> |
|
||||
<td style="border-right: none;">身份证背面照片</td> |
|
||||
<td> |
|
||||
<eimage :url="userInfoFrom.idBackPhoto"></eimage> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
</el-dialog> |
|
||||
|
|
||||
|
|
||||
<el-dialog title="" :visible.sync="showOrgInfo" width="70%" > |
|
||||
<lockorginfo :orgInfo="OrgInfoFrom"></lockorginfo> |
|
||||
</el-dialog> |
|
||||
|
|
||||
|
|
||||
<el-dialog title="设置角色" :visible.sync="roledialog" width="40%"> |
|
||||
<table class="e-table" cellspacing="0"> |
|
||||
<tr> |
|
||||
<td style="border-bottom: none; border-right: none;">用户名</td> |
|
||||
<td style="border-bottom: none;"> |
|
||||
{{rolefrom.userName }} |
|
||||
</td> |
|
||||
</tr> |
|
||||
<tr> |
|
||||
<td style="border-right: none;">角色</td> |
|
||||
<td> |
|
||||
<el-select v-model="rolefrom.roleSid" placeholder="请选择"> |
|
||||
<el-option |
|
||||
v-for="item in rolelist" |
|
||||
:key="item.sid" |
|
||||
:label="item.roleName" |
|
||||
:value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</table> |
|
||||
<span slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="saveUserRole()">保 存</el-button> |
|
||||
<el-button @click="roledialog = false">关 闭</el-button> |
|
||||
</span> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { userListByAdmin, verifyList, initPwd, delUser, getUserINfo, getOrgINfo, initUserRole, saveUserRole } from '@/api/system/user/Auser.js' |
|
||||
import { roleList } from '@/api/system/Role/roleManage.js' |
|
||||
|
|
||||
import lockorginfo from './components/orgInfo.vue' |
|
||||
export default { |
|
||||
components:{ lockorginfo }, |
|
||||
data() { |
|
||||
return { |
|
||||
imageUrl: '', |
|
||||
dialogImageUrl: '', |
|
||||
showuserInfo: false, |
|
||||
showOrgInfo: false, |
|
||||
dialogVisible: false, |
|
||||
roledialog: false, |
|
||||
form: {}, |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params: { |
|
||||
isAdmin: '', |
|
||||
organizationName: '', |
|
||||
state: 2, |
|
||||
userName: '' |
|
||||
} |
|
||||
}, |
|
||||
pageBackup: Object.assign({}, this.page), |
|
||||
tableData: [], |
|
||||
userInfoFrom: {}, |
|
||||
OrgInfoFrom: {}, |
|
||||
rolelist: [], |
|
||||
rolefrom: { |
|
||||
roleSid: '', |
|
||||
userSid: '' |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
methods: { |
|
||||
pagination(val) { // 分页 |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
onSearch() { //查询 |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
resetSearch(){ // 重置 |
|
||||
this.page = { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
params: { |
|
||||
isAdmin: '', |
|
||||
organizationName: '', |
|
||||
state: 2, |
|
||||
userName: '' |
|
||||
} |
|
||||
} |
|
||||
this.getverifyList(this.page) |
|
||||
}, |
|
||||
getverifyList(data){ // 获取用户列表 |
|
||||
userListByAdmin(data).then((res)=>{ |
|
||||
this.tableData = res.data.records |
|
||||
this.page.total = res.data.total |
|
||||
}) |
|
||||
}, |
|
||||
// getrolelist(row){ // 获取角色初始化列表 |
|
||||
// initUserRole({userSid: row.sid}).then(res => { |
|
||||
// this.roledialog = true |
|
||||
// this.rolelist = res.data.roleVoList |
|
||||
// this.rolefrom.userSid = res.data.userSid |
|
||||
// this.rolefrom.userName = res.data.userName |
|
||||
// this.rolefrom.roleSid = res.data.roleSid |
|
||||
// }) |
|
||||
// }, |
|
||||
saveUserRole(){ |
|
||||
saveUserRole(this.rolefrom).then(res=>{ |
|
||||
this.roledialog = false |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
}) |
|
||||
}, |
|
||||
initPwd(row){ |
|
||||
this.$confirm('此操作将初始化该用户密码, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
initPwd({sid: row.sid}).then(res => { |
|
||||
this.getverifyList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: res.msg |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
userinfo(row) { // 查看用户信息 |
|
||||
this.showuserInfo = true |
|
||||
getUserINfo({userName: row.userName}).then(res => { |
|
||||
this.userInfoFrom = res.data |
|
||||
}) |
|
||||
}, |
|
||||
orgInfo(row){ |
|
||||
this.showOrgInfo = true |
|
||||
getOrgINfo({organizationSid: row.organizationSid}).then(res => { |
|
||||
this.OrgInfoFrom = res.data |
|
||||
}) |
|
||||
}, |
|
||||
delUser(row){ |
|
||||
this.$confirm('此操作将永久删除该用户, 是否继续?', '提示', { |
|
||||
confirmButtonText: '确定', |
|
||||
cancelButtonText: '取消', |
|
||||
type: 'warning' |
|
||||
}).then(() => { |
|
||||
delUser({sid: row.sid}).then(res => { |
|
||||
this.getverifyList(this.page) |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '删除成功!' |
|
||||
}); |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.el-dialog__footer{ |
|
||||
text-align: center; |
|
||||
} |
|
||||
</style> |
|
||||
|
|
||||
<style lang="scss" scoped="scoped"> |
|
||||
.el-image{ |
|
||||
width: 180px; |
|
||||
height: 150px; |
|
||||
} |
|
||||
.tablerow-click{ |
|
||||
color: #007FFF; |
|
||||
cursor: pointer; |
|
||||
} |
|
||||
.zcxx { |
|
||||
color: #000; |
|
||||
width: 98%; |
|
||||
margin: 0px auto 30px; |
|
||||
background-color: #f7f9fc; |
|
||||
border: 1px solid #e6e9f0; |
|
||||
height: 60px; |
|
||||
line-height: 60px; |
|
||||
|
|
||||
p { |
|
||||
font-size: 16px; |
|
||||
float: left; |
|
||||
margin-top: 0px; |
|
||||
margin-left: 10px; |
|
||||
font-weight: bold; |
|
||||
width: 300px; |
|
||||
} |
|
||||
|
|
||||
.el-button { |
|
||||
float: right; |
|
||||
margin-top: 13px; |
|
||||
border: none; |
|
||||
width: 80px; |
|
||||
padding: 0; |
|
||||
text-align: center; |
|
||||
padding-top: 10px; |
|
||||
padding-bottom: 10px; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
table { |
|
||||
width: 98%; |
|
||||
margin: 0 auto; |
|
||||
|
|
||||
tr { |
|
||||
height: 45px; |
|
||||
vertical-align: top; |
|
||||
} |
|
||||
|
|
||||
td:first-child { |
|
||||
text-align: right; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(2) { |
|
||||
padding-left: 30px; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(3) { |
|
||||
text-align: right; |
|
||||
} |
|
||||
|
|
||||
td:nth-child(4) { |
|
||||
padding-left: 30px; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
span { |
|
||||
font-size: 14px; |
|
||||
color: #015bff; |
|
||||
margin-left: 20px; |
|
||||
} |
|
||||
|
|
||||
.sfz { |
|
||||
border: 1px solid #e6e9f0; |
|
||||
width: 45%; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
#bei { |
|
||||
width: 21.4%; |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
</style> |
|
@ -1,64 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|
||||
<el-tab-pane label="资方信息" name="roleList"> |
|
||||
<user-manage-list :dataObj = 'dataObj' @status = 'isShow' @item ='listObj'></user-manage-list> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane label="新增" name="addrole"> |
|
||||
<user-manage-add @status = 'isShow' :dataObj = 'childObj'></user-manage-add> |
|
||||
</el-tab-pane> |
|
||||
</el-tabs> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import userManageList from './userManageList.vue' |
|
||||
import userManageAdd from './userManageAdd.vue' |
|
||||
export default { |
|
||||
components: { |
|
||||
userManageList: userManageList, |
|
||||
userManageAdd: userManageAdd, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: 'roleList', |
|
||||
editDialog: false, |
|
||||
dataObj:{ |
|
||||
isShow:'' |
|
||||
}, |
|
||||
childObj:{} |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
handleClick(tab, event) { |
|
||||
if(tab.name == 'addrole'){ |
|
||||
this.dialogTitle = '新增' |
|
||||
// this.roleForm = Object.assign({}, this.formBackup) |
|
||||
}else{ |
|
||||
// this.getroleOrgList() |
|
||||
} |
|
||||
}, |
|
||||
isShow(val){ |
|
||||
if(!val){ |
|
||||
this.activeName = 'roleList' |
|
||||
this.dataObj.isShow = false |
|
||||
this.dataObj.isShow = true |
|
||||
}else{ |
|
||||
this.activeName = 'addrole' |
|
||||
} |
|
||||
}, |
|
||||
listObj(val){ |
|
||||
this.childObj = val |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style scoped="scoped"> |
|
||||
.my-tabs{ |
|
||||
margin-top: 10px; |
|
||||
} |
|
||||
</style> |
|
@ -1,71 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<el-card class="box-card"> |
|
||||
<div style="float: right;"> |
|
||||
<el-button type="primary" @click='save()' size="mini">保 存</el-button> |
|
||||
<el-button type="success" size="mini">下 载</el-button> |
|
||||
<el-button type="info" size="mini">返 回</el-button> |
|
||||
</div> |
|
||||
<el-form :inline="true" :model="bankform" class="demo-form-inline" label-position="right"> |
|
||||
<el-form-item> |
|
||||
<h2>资方基础信息</h2> |
|
||||
</el-form-item> |
|
||||
<br /> |
|
||||
<el-form-item label="资方名称:"> |
|
||||
<el-input v-model="bankform.manageName" placeholder="资方名称" style="width: 500px;"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系人:"> |
|
||||
<el-input v-model="bankform.name" placeholder="联系人" style="width: 500px;"></el-input> |
|
||||
</el-form-item> |
|
||||
<br /> |
|
||||
<el-form-item label="联系电话:"> |
|
||||
<el-input v-model="bankform.mobile" placeholder="联系电话" style="width: 500px;"></el-input> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</el-card> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
userListAdd |
|
||||
} from '@/api/system/userManage/index.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
bankform: { |
|
||||
manageName: '', |
|
||||
name: '', |
|
||||
mobile: '' |
|
||||
}, |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
save() { |
|
||||
userListAdd(this.bankform).then(res => { |
|
||||
if (res.code == '200') { |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
this.$emit('status', false) |
|
||||
} |
|
||||
this.reset() |
|
||||
}) |
|
||||
}, |
|
||||
reset() { |
|
||||
this.bankform = { |
|
||||
manageName: '', |
|
||||
name: '', |
|
||||
mobile: '' |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
</style> |
|
@ -1,192 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<el-collapse v-model="activeNames" @change="handleChange"> |
|
||||
<br /> |
|
||||
<div style="float: right;"> |
|
||||
<el-button type="primary" size="small" @click='add()'>新增</el-button> |
|
||||
<el-button type="primary" size="small" @click=''>修改</el-button> |
|
||||
<el-button type="primary" size="small" @click='del()'>删除</el-button> |
|
||||
<el-button type="primary" size="small">导出</el-button> |
|
||||
</div> |
|
||||
<el-collapse-item title="显示" name="0"> |
|
||||
<div class="tab-header"> |
|
||||
<el-form ref="form" :inline="true" :model="search" label-width="80px"> |
|
||||
<el-row :gutter="24"> |
|
||||
<el-col :span="24"> |
|
||||
<el-form-item label="资方名称"> |
|
||||
<el-input placeholder="请输入资方名称" v-model="search.manageName" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系人"> |
|
||||
<el-input placeholder="请输入联系人" v-model="search.name" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系电话"> |
|
||||
<el-input placeholder="请输入联系电话" v-model="search.mobile" clearable></el-input> |
|
||||
</el-form-item> |
|
||||
<el-button @click="getOrgUserList(1)">查询</el-button> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
</el-collapse-item> |
|
||||
</el-collapse> |
|
||||
<!-- table --> |
|
||||
<el-table :data="userTable" border style="width: 100%;" @selection-change="handleSelectionChange"> |
|
||||
<el-table-column width="50px" type="selection" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="序号" width="50px" type="index" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="manageName" label="资方名称" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span class="tablerow-click" @click="sel(scope.row)">{{scope.row.manageName}}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="name" label="联系人" align="center"> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="mobile" label="联系电话" width="120px" align="center"> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" /> |
|
||||
<div> |
|
||||
<el-dialog title="详情" :visible.sync="dlvs" width="30%" :before-close="handleClose"> |
|
||||
<el-form ref="form" :model="bankform" label-width="80px"> |
|
||||
<el-form-item label="资方名称"> |
|
||||
<el-input v-model="bankform.manageName"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系人"> |
|
||||
<el-input v-model="bankform.name"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系电话"> |
|
||||
<el-input v-model="bankform.mobile"></el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item> |
|
||||
<el-button type="primary" @click="close()">关 闭</el-button> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
userList, |
|
||||
userSingle, |
|
||||
userListAdd, |
|
||||
delbank |
|
||||
} from '@/api/system/userManage/index.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
bankform: { |
|
||||
sid:'', |
|
||||
manageName: '', |
|
||||
name: '', |
|
||||
mobile: '' |
|
||||
}, |
|
||||
// 新增弹框 |
|
||||
dialogVisible: false, |
|
||||
dlvs: false, |
|
||||
// |
|
||||
activeNames: ['1'], |
|
||||
|
|
||||
form: {}, |
|
||||
roleListAll: [], |
|
||||
search: { |
|
||||
sid:'', |
|
||||
manageName: '', |
|
||||
name: '', |
|
||||
mobile: '' |
|
||||
}, |
|
||||
page: { |
|
||||
total: 0, // 默认数据总数 |
|
||||
current: 1, // 默认开始页面 |
|
||||
size: 10, // 每页的数据条数 |
|
||||
}, |
|
||||
userTable: [], |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.getOrgUserList() |
|
||||
}, |
|
||||
methods: { |
|
||||
// 列表 + 初始化 |
|
||||
getOrgUserList(flag) { |
|
||||
if (flag == '1') { |
|
||||
this.page.current = 1 |
|
||||
} |
|
||||
let params = this.page |
|
||||
params.params = this.search |
|
||||
userList(params).then(res => { |
|
||||
this.page.total = res.data.total |
|
||||
this.userTable = res.data.records |
|
||||
}) |
|
||||
}, |
|
||||
//查看详情 |
|
||||
sel(row) { |
|
||||
this.dlvs = true; |
|
||||
this.bankform = Object.assign({}, row) |
|
||||
}, |
|
||||
// 新增保存 |
|
||||
add() { |
|
||||
this.dialogVisible = true; |
|
||||
}, |
|
||||
save() { |
|
||||
userListAdd(this.bankform).then(res => { |
|
||||
if (res.code == '200') { |
|
||||
this.$message({ |
|
||||
message: res.msg, |
|
||||
type: 'success' |
|
||||
}) |
|
||||
this.$emit('status', false) |
|
||||
} |
|
||||
this.reset() |
|
||||
this.dialogVisible = false; |
|
||||
}) |
|
||||
}, |
|
||||
reset() { |
|
||||
this.form = { |
|
||||
manageName: '', |
|
||||
name: '', |
|
||||
mobile: '' |
|
||||
} |
|
||||
}, |
|
||||
del(row) { |
|
||||
delbank(this.userTable.sid).then( res => { |
|
||||
|
|
||||
}) |
|
||||
}, |
|
||||
handleClose(done) { |
|
||||
this.$confirm('确认关闭?') |
|
||||
.then(_ => { |
|
||||
done(); |
|
||||
}) |
|
||||
.catch(_ => {}); |
|
||||
}, |
|
||||
close() { |
|
||||
this.dlvs = false; |
|
||||
this.entls = false; |
|
||||
}, |
|
||||
// 分页 |
|
||||
pagination(val) { |
|
||||
this.page.current = val.pageNum |
|
||||
this.page.size = val.pageSize |
|
||||
this.getOrgUserList() |
|
||||
}, |
|
||||
// |
|
||||
handleChange(val) { |
|
||||
console.log(val); |
|
||||
}, |
|
||||
handleSelectionChange(val) { |
|
||||
this.multipleSelection = val; |
|
||||
this.userTable.sid |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style scoped="scoped"> |
|
||||
.el-select>.el-input { |
|
||||
display: block; |
|
||||
width: 300px; |
|
||||
} |
|
||||
</style> |
|
@ -1,3 +0,0 @@ |
|||||
<template> |
|
||||
<router-view /> |
|
||||
</template> |
|
@ -1,358 +0,0 @@ |
|||||
<template> |
|
||||
<div class="app-container"> |
|
||||
<div v-show="visible"> |
|
||||
<div class="tab-header webtop"> |
|
||||
<div>资方信息表管理</div> |
|
||||
<div> |
|
||||
<el-button type="primary" size="medium" @click="handleCreate()">新增</el-button> |
|
||||
<el-button type="primary" size="medium" @click="handleUpdate()">修改</el-button> |
|
||||
<el-button type="danger" size="medium" @click="handleDelete()">删除</el-button> |
|
||||
<el-button type="success" size="medium" @click="handleDaoChu()">导出</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="searchcon"> |
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ |
|
||||
searchxianshitit |
|
||||
}}</el-button> |
|
||||
<div v-show="isSearchShow" class="search"> |
|
||||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|
||||
<el-form-item label="资方名称"> |
|
||||
<el-input v-model="listQuery.manageName" placeholder="请输入资方名称" clearable class="filter-item" /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系人"> |
|
||||
<el-input v-model="listQuery.name" placeholder="请输入联系人" clearable class="filter-item" /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="联系电话"> |
|
||||
<el-input v-model="listQuery.mobile" placeholder="请输入联系电话" clearable class="filter-item" /> |
|
||||
</el-form-item> |
|
||||
<el-button type="primary" @click="handleFilter">查询</el-button> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="listtop"> |
|
||||
<div class="tit">资方管理信息列表</div> |
|
||||
<pageye v-show="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|
||||
class="pagination" @pagination="getList" /> |
|
||||
</div> |
|
||||
<div> |
|
||||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%" |
|
||||
@selection-change="handleSelectionChange"> |
|
||||
<el-table-column width="50px" type="selection" align="center" /> |
|
||||
<el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column label="资方名称" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span class="bluezi" @click="handleCheck(scope.row)">{{scope.row.manageName}}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="联系人" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.name }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="联系电话" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.mobile }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<!-- <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width"> |
|
||||
<template slot-scope="{row}"> |
|
||||
<el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button> |
|
||||
</template> |
|
||||
</el-table-column> --> |
|
||||
</el-table> |
|
||||
</div> |
|
||||
|
|
||||
<div class="pages"> |
|
||||
<div class="tit" /> |
|
||||
<!-- 翻页 --> |
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|
||||
class="pagination" @pagination="getList" /> |
|
||||
</div> |
|
||||
</div> |
|
||||
<zifangguanli-add ref="addAndUpdate" @handleReturn="visible=true" @created="dataCreated" @updated="dataUpdated" /> |
|
||||
<zifangguanli-info ref="info" @handleReturn="visible=true" /> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
mapGetters |
|
||||
} from 'vuex' |
|
||||
import { |
|
||||
basefinbankListPage, |
|
||||
basefinbankDeleteBySids, |
|
||||
basefinbankExportExcel |
|
||||
} from '@/api/jichuxinxi/basefinbank' |
|
||||
import { |
|
||||
setuser, |
|
||||
getuser |
|
||||
} from '@/utils/baocun' |
|
||||
import { |
|
||||
delUser |
|
||||
} from '@/api/system/user/Auser' |
|
||||
import Pagination from '@/components/pagination' |
|
||||
import pageye from '@/components/pagination/pageye' |
|
||||
import zifangguanliAdd from './zifangguanliAdd.vue' |
|
||||
import zifangguanliInfo from './zifangguanliInfo.vue' |
|
||||
export default { |
|
||||
name: 'zifangguanli', |
|
||||
components: { |
|
||||
Pagination, |
|
||||
pageye, |
|
||||
zifangguanliAdd, |
|
||||
zifangguanliInfo |
|
||||
}, |
|
||||
|
|
||||
data() { |
|
||||
return { |
|
||||
isSearchShow: false, |
|
||||
searchxianshitit: '显示查询条件', |
|
||||
// --按钮菜单------- |
|
||||
menuState: { |
|
||||
add: false, // 添加 |
|
||||
edit: false, // 编辑 |
|
||||
delete: false, // 删除 |
|
||||
view: false, // 查看 |
|
||||
audit: false, // 审核 |
|
||||
input: false, // 导入 |
|
||||
output: false, // 导出 |
|
||||
upload: false, // 同步 |
|
||||
release: false // 下发 |
|
||||
}, |
|
||||
// 查询 ----------- |
|
||||
tableKey: 0, |
|
||||
list: [], |
|
||||
sids: [], |
|
||||
// list: [{ title: '蔚县鑫元汽贸有限责任公司' }], |
|
||||
total: 1, |
|
||||
FormLoading: false, |
|
||||
listLoading: false, |
|
||||
listQuery: { |
|
||||
current: 1, |
|
||||
size: 20, |
|
||||
params: { |
|
||||
manageName: '', |
|
||||
name: '', |
|
||||
mobile: '' |
|
||||
} |
|
||||
}, |
|
||||
selectDate: undefined, |
|
||||
temp: {}, // 添加和修改 |
|
||||
visible: true |
|
||||
// ------------------------------------ |
|
||||
} |
|
||||
}, |
|
||||
computed: { |
|
||||
...mapGetters([ |
|
||||
'id', |
|
||||
'roles', |
|
||||
'rolesIds', |
|
||||
'departmentId', |
|
||||
'departmentCode' |
|
||||
]) |
|
||||
}, |
|
||||
created() { |
|
||||
// 初始化变量 |
|
||||
this.init() |
|
||||
// 加载列表 |
|
||||
this.getList() |
|
||||
}, |
|
||||
methods: { |
|
||||
// 搜索条件效果 |
|
||||
clicksearchShow() { |
|
||||
this.isSearchShow = !this.isSearchShow |
|
||||
if (this.isSearchShow) { |
|
||||
this.searchxianshitit = '隐藏查询条件' |
|
||||
} else { |
|
||||
this.searchxianshitit = '显示查询条件' |
|
||||
} |
|
||||
}, |
|
||||
init() { |
|
||||
// 根据当前用户. 加载当前页面的按钮权限 |
|
||||
// findButtonByUserId(this.$route.path).then(response => { |
|
||||
// if ( |
|
||||
// response.code === 20000 && |
|
||||
// response.data && |
|
||||
// response.data.length > 0 |
|
||||
// ) { |
|
||||
// this.menuState = ConvertMenuState(response.data) // 处理各按钮显示状态 |
|
||||
// } |
|
||||
// }) |
|
||||
}, |
|
||||
// 序号 |
|
||||
indexMethod(index) { |
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
||||
var pageindex = index + 1 + pagestart |
|
||||
return pageindex |
|
||||
}, |
|
||||
// 查询列表信息 |
|
||||
getList() { |
|
||||
this.listLoading = true |
|
||||
basefinbankListPage({ |
|
||||
current: this.listQuery.current, |
|
||||
size: this.listQuery.size, |
|
||||
params: { |
|
||||
manageName: this.listQuery.manageName, |
|
||||
mobile: this.listQuery.mobile, |
|
||||
name: this.listQuery.name |
|
||||
} |
|
||||
}).then((response) => { |
|
||||
console.log('列表查询结果1:', response) |
|
||||
console.log('列表查询结果:' + JSON.stringify(response)) |
|
||||
this.listLoading = false |
|
||||
if ( |
|
||||
response.code === '200' && |
|
||||
response.data && |
|
||||
response.data.total > 0 |
|
||||
) { |
|
||||
this.list = response.data.records |
|
||||
this.total = response.data.total |
|
||||
} else { |
|
||||
this.list = [] |
|
||||
this.total = 0 |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 查询按钮 |
|
||||
handleFilter() { |
|
||||
this.listQuery.current = 1 |
|
||||
this.getList() |
|
||||
}, |
|
||||
// 打开添加 |
|
||||
handleCreate() { |
|
||||
this.$refs.addAndUpdate.openCreate(() => { |
|
||||
this.visible = false |
|
||||
}) |
|
||||
}, |
|
||||
// 勾选 |
|
||||
handleSelectionChange(row) { |
|
||||
const aa = [] |
|
||||
row.forEach((element) => { |
|
||||
aa.push(element.sid) |
|
||||
setuser(this.sids) |
|
||||
}) |
|
||||
this.sids = aa |
|
||||
}, |
|
||||
// 打开修改 |
|
||||
handleUpdate() { |
|
||||
if (this.sids.length === 1) { |
|
||||
this.dialogStatus = 'update' |
|
||||
this.$refs.addAndUpdate.openUpdate(this.sids[0], () => { |
|
||||
this.visible = false |
|
||||
}) |
|
||||
} else if (this.sids.length > 1) { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '不能选中多个资方信息修改!!', |
|
||||
type: 'info', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '没有选择资方信息!!', |
|
||||
type: 'error', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
}, |
|
||||
// 打开查看 |
|
||||
handleCheck(row) { |
|
||||
this.$refs.info.openInfo(row.sid, () => { |
|
||||
this.visible = false |
|
||||
}) |
|
||||
}, |
|
||||
// 根据本行ID删除数据 |
|
||||
handleDelete() { |
|
||||
if (this.sids.length > 0) { |
|
||||
basefinbankDeleteBySids(this.sids).then((response) => { |
|
||||
console.log('3455', response) |
|
||||
if (response.code === '200') { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '删除成功', |
|
||||
type: 'success', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
this.getList() |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '删除失败', |
|
||||
message: response.msg, |
|
||||
type: 'error' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '没有选择资方信息!!', |
|
||||
type: 'error', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
}, |
|
||||
// 导出 |
|
||||
handleDaoChu() { |
|
||||
// this.$confirm('确定要导出数据, 是否继续?', '提示', { |
|
||||
// confirmButtonText: '确定', |
|
||||
// cancelButtonText: '取消', |
|
||||
// type: 'warning' |
|
||||
// }) |
|
||||
basefinbankExportExcel(this.sids).then((res) => { |
|
||||
const blob = new Blob([res], { |
|
||||
type: 'application/vnd.ms-excel' |
|
||||
}) |
|
||||
const objectUrl = URL.createObjectURL(blob) |
|
||||
window.location.href = objectUrl |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '导出成功', |
|
||||
type: 'success', |
|
||||
duration: 2000, |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
// 添加修改返回 |
|
||||
AddUpdateReturn() { |
|
||||
this.visible = true |
|
||||
}, |
|
||||
// 添加保存完成 |
|
||||
dataCreated() { |
|
||||
this.visible = true |
|
||||
this.handleFilter() |
|
||||
}, |
|
||||
// 修改保存完成 |
|
||||
dataUpdated() { |
|
||||
this.visible = true |
|
||||
this.getList() |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
/deep/ .el-collapse { |
|
||||
border-top: 0px solid #e6ebf5; |
|
||||
border-bottom: 0px solid #e6ebf5; |
|
||||
} |
|
||||
|
|
||||
/deep/ .el-collapse-item__content { |
|
||||
margin: 0; |
|
||||
padding: 0; |
|
||||
} |
|
||||
|
|
||||
/deep/ .el-collapse-item__wrap { |
|
||||
border-bottom: 0px solid #ebeef5; |
|
||||
} |
|
||||
|
|
||||
/deep/ .el-collapse-item__header { |
|
||||
border-bottom: 0px solid #e6ebf5; |
|
||||
} |
|
||||
|
|
||||
.searchli { |
|
||||
padding: 5px 100px; |
|
||||
} |
|
||||
</style> |
|
@ -1,217 +0,0 @@ |
|||||
<template> |
|
||||
<div v-show="visible" class="app-container"> |
|
||||
<div class="tab-header webtop"> |
|
||||
<div v-if="stateId === '0'">添加资方信息</div> |
|
||||
<div v-else>修改资方信息</div> |
|
||||
<div> |
|
||||
<el-button type="primary" size="small" @click="handleCreate()">保存</el-button> |
|
||||
<el-button type="primary" size="small">下载</el-button> |
|
||||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="listconadd"> |
|
||||
<el-form ref="dataForm" :model="temp" label-position="right" label-width="190px" class="formadd" :rules="rules"> |
|
||||
<div class="title">资方基本信息</div> |
|
||||
<el-row> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="manageName"> |
|
||||
<span slot="label">资方名称:</span> |
|
||||
<el-input v-model="temp.manageName" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="name"> |
|
||||
<span slot="label">联系人:</span> |
|
||||
<el-input v-model="temp.name" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="mobile"> |
|
||||
<span slot="label">联系电话:</span> |
|
||||
<el-input v-model="temp.mobile" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12" /> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
mapGetters |
|
||||
} from 'vuex' |
|
||||
import { |
|
||||
basefinbankSaveList, |
|
||||
basefinbankUpdate, |
|
||||
basefinbankDetails |
|
||||
} from '@/api/jichuxinxi/basefinbank' |
|
||||
export default { |
|
||||
name: 'ZifangguanliAdd', |
|
||||
// components: { }, |
|
||||
data() { |
|
||||
return { |
|
||||
// --按钮菜单------- |
|
||||
menuState: { |
|
||||
add: false, // 添加 |
|
||||
edit: false, // 编辑 |
|
||||
delete: false, // 删除 |
|
||||
view: false, // 查看 |
|
||||
audit: false, // 审核 |
|
||||
input: false, // 导入 |
|
||||
output: false, // 导出 |
|
||||
upload: false, // 同步 |
|
||||
release: false // 下发 |
|
||||
}, |
|
||||
visible: false, |
|
||||
stateId: 0, |
|
||||
FormLoading: false, |
|
||||
listLoading: false, |
|
||||
temp: {}, // 添加和修改 |
|
||||
textMap: { |
|
||||
update: '修改', |
|
||||
create: '创建' |
|
||||
}, |
|
||||
dialogStatus: '', // 对话框状态 |
|
||||
rules: { |
|
||||
manageName: [{ |
|
||||
required: true, |
|
||||
message: '请填写资方名称', |
|
||||
trigger: 'blur' |
|
||||
}], |
|
||||
name: [{ |
|
||||
required: true, |
|
||||
message: '请填写联系人', |
|
||||
trigger: 'blur' |
|
||||
}], |
|
||||
mobile: [{ |
|
||||
required: true, |
|
||||
message: '请填写联系电话', |
|
||||
trigger: 'blur' |
|
||||
}, |
|
||||
{ |
|
||||
pattern: /^1[3-9]\d{9}$/, |
|
||||
message: '手机号格式错误' |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
// ------------------------------------ |
|
||||
} |
|
||||
}, |
|
||||
computed: { |
|
||||
...mapGetters([ |
|
||||
'id', |
|
||||
'roles', |
|
||||
'rolesIds', |
|
||||
'departmentId', |
|
||||
'departmentCode' |
|
||||
]) |
|
||||
}, |
|
||||
created() { |
|
||||
// 初始化变量 |
|
||||
this.init() |
|
||||
}, |
|
||||
methods: { |
|
||||
init() { |
|
||||
|
|
||||
}, |
|
||||
openUpdate(sid, showed) { |
|
||||
this.stateId = sid |
|
||||
if (this.stateId !== '0') { |
|
||||
basefinbankDetails(this.stateId).then((response) => { |
|
||||
if (response.code === '200') { |
|
||||
this.$refs['dataForm'].clearValidate() |
|
||||
this.temp = response.data |
|
||||
this.visible = true |
|
||||
if (showed && typeof(showed) === 'function') { |
|
||||
showed() |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
openCreate(showed) { |
|
||||
this.$refs['dataForm'].clearValidate() |
|
||||
this.stateId = '0' |
|
||||
this.resetTemp() |
|
||||
this.visible = true |
|
||||
if (showed && typeof(showed) === 'function') { |
|
||||
showed() |
|
||||
} |
|
||||
}, |
|
||||
// ----------------------------------方法-------------------- |
|
||||
// 返回 |
|
||||
handleReturn() { |
|
||||
this.visible = false |
|
||||
this.$emit('handleReturn') |
|
||||
}, |
|
||||
|
|
||||
// 添加前数据初始化 |
|
||||
resetTemp() { |
|
||||
this.temp = { |
|
||||
manageName: '', // |
|
||||
mobile: '', // |
|
||||
name: '' |
|
||||
} |
|
||||
}, |
|
||||
// 添加数据 |
|
||||
handleCreate() { |
|
||||
this.$refs['dataForm'].validate((valid) => { |
|
||||
if (valid) { |
|
||||
this.FormLoading = true |
|
||||
this.dialogStatus = 'create' |
|
||||
if (this.stateId === '0') { |
|
||||
console.log('传入值:', this.temp) |
|
||||
basefinbankSaveList(this.temp).then((response) => { |
|
||||
console.log('返回值:', response) |
|
||||
this.FormLoading = false |
|
||||
if (response.code === '200') { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '添加成功', |
|
||||
type: 'success', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
this.$emit('created') |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '添加失败', |
|
||||
type: 'error', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
basefinbankUpdate(this.temp).then((response) => { |
|
||||
this.dialogStatus = 'update' |
|
||||
console.log('response', response) |
|
||||
this.FormLoading = false |
|
||||
if (response.code === '200') { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '修改成功', |
|
||||
type: 'success', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
this.$emit('updated') |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '失败', |
|
||||
message: '修改失败', |
|
||||
type: 'error' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
</style> |
|
@ -1,93 +0,0 @@ |
|||||
<template> |
|
||||
<div v-show="visible" class="app-container"> |
|
||||
<div class="tab-header webtop"> |
|
||||
<div>查看资方信息</div> |
|
||||
<div> |
|
||||
<el-button type="primary" size="small">下载</el-button> |
|
||||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="listconadd"> |
|
||||
<el-form ref="dataForm" :model="temp" label-position="right" label-width="190px" class="forminfo"> |
|
||||
<div class="title">资方基本信息</div> |
|
||||
<el-row> |
|
||||
<el-col :span="4" class="trightb">资方名称:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.manageName }} </el-col> |
|
||||
<el-col :span="4" class="trightb">联系人:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.name }} </el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="4" class="trightb">联系电话:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.mobile }} </el-col> |
|
||||
<el-col :span="4" class="trightb" /> |
|
||||
<el-col :span="8" class="tleft" /> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { mapGetters } from 'vuex' |
|
||||
import { |
|
||||
basefinbankDetails |
|
||||
} from '@/api/jichuxinxi/basefinbank' |
|
||||
export default { |
|
||||
name: 'ZifangguanliInfo', |
|
||||
// components: { }, |
|
||||
data() { |
|
||||
return { |
|
||||
visible: false, |
|
||||
FormLoading: false, |
|
||||
temp: {} // 查看实体 |
|
||||
} |
|
||||
}, |
|
||||
computed: { |
|
||||
...mapGetters([ |
|
||||
'id', |
|
||||
'roles', |
|
||||
'rolesIds', |
|
||||
'departmentId', |
|
||||
'departmentCode' |
|
||||
]) |
|
||||
}, |
|
||||
created() { |
|
||||
// 初始化变量 |
|
||||
this.init() |
|
||||
}, |
|
||||
methods: { |
|
||||
init() { |
|
||||
}, |
|
||||
openInfo(sid, showed) { |
|
||||
this.stateId = sid |
|
||||
basefinbankDetails(this.stateId).then((response) => { |
|
||||
console.log('查询', response) |
|
||||
this.FormLoading = false |
|
||||
if (response.code === '200') { |
|
||||
this.temp = response.data |
|
||||
this.visible = true |
|
||||
if (showed && typeof (showed) === 'function') { |
|
||||
showed() |
|
||||
} |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '失败', |
|
||||
message: '查询失败', |
|
||||
type: 'error' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
// ----------------------------------方法-------------------- |
|
||||
// 返回 |
|
||||
handleReturn() { |
|
||||
this.visible = false |
|
||||
this.$emit('handleReturn') |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
|
|
||||
</style> |
|
||||
|
|
@ -1,480 +0,0 @@ |
|||||
<template> |
|
||||
<div class="app-container"> |
|
||||
<div class="tab-header webtop"> |
|
||||
<div>资方政策管理</div> |
|
||||
<div> |
|
||||
<el-button type="primary" size="small" @click="handleCreate()">新增</el-button> |
|
||||
<el-button type="primary" size="small" @click="handleUpdate()">修改</el-button> |
|
||||
<el-button type="danger" size="small" @click="handleDelete()">删除</el-button> |
|
||||
<!-- <el-button type="success" size="small" @click="handleDaoChu()">导出</el-button> --> |
|
||||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="searchcon"> |
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|
||||
<div v-show="isSearchShow" class="search"> |
|
||||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|
||||
<el-form-item label="政策名称"> |
|
||||
<el-input v-model="listQuery.params.policyName" placeholder="请输入政策名称" clearable class="filter-item" /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="品牌"> |
|
||||
<!-- <el-input v-model="listQuery.brand" placeholder="请输入品牌" clearable class="filter-item" /> --> |
|
||||
<el-autocomplete v-model="listQuery.params.brand" :fetch-suggestions="querySearchAsync" class="addinputw" placeholder="请输入品牌名称" @select="handleSelect"> |
|
||||
<i slot="suffix" class="el-icon-edit el-input__icon" @click="inputclear" /> |
|
||||
<template slot-scope="{ item }"> |
|
||||
<div style="paddingg:5px;background-color:Azure;"> |
|
||||
<span>品牌名称:</span> |
|
||||
<span style="color:red">{{ item.brandName }}</span><br> |
|
||||
</div> |
|
||||
</template> |
|
||||
</el-autocomplete> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="资方名称"> |
|
||||
<!-- <el-input v-model="listQuery.params.manageName" placeholder="请输入资方名称" clearable class="filter-item" /> --> |
|
||||
<el-select v-model="listQuery.params.manageName" class="addinputw" placeholder="请选择资方名称"> |
|
||||
<el-option v-for="(item,index) in manageNameType" :key="index" :label="item.manageName" :value="item.manageName" /> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-button type="primary" @click="handleFilter">查询</el-button> |
|
||||
|
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="listtop"> |
|
||||
<div class="tit">资方产品政策信息列表</div> |
|
||||
<pageye |
|
||||
v-show="total>0" |
|
||||
:total="total" |
|
||||
:page.sync="listQuery.current" |
|
||||
:limit.sync="listQuery.size" |
|
||||
class="pagination" |
|
||||
@pagination="getList" |
|
||||
/> |
|
||||
</div> |
|
||||
<div> |
|
||||
<el-table |
|
||||
:key="tableKey" |
|
||||
v-loading="listLoading" |
|
||||
:data="list" |
|
||||
border |
|
||||
style="width: 100%;" |
|
||||
@selection-change="handleSelectionChange" |
|
||||
> |
|
||||
<el-table-column width="50px" type="selection" align="center" /> |
|
||||
<el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column label="政策名称" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.policyName }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="品牌" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.brandName }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="车型" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.modelName }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="资方名称" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.manageName }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="首付比例" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.downPayment }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="保证金比例" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.marginRatio }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="利率" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.rate }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="期数" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.nper }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="厂家贴息" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.discount }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="政策盈利比例" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.earningsRatio }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="操作" align="center" width="100px" class-name="small-padding fixed-width"> |
|
||||
<template slot-scope="{row}"> |
|
||||
<el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
</div> |
|
||||
<div class="pages"> |
|
||||
<div class="tit" /> |
|
||||
<!-- 翻页 --> |
|
||||
<pagination |
|
||||
v-show="total>0" |
|
||||
:total="total" |
|
||||
:page.sync="listQuery.current" |
|
||||
:limit.sync="listQuery.size" |
|
||||
class="pagination" |
|
||||
@pagination="getList" |
|
||||
/> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
mapGetters |
|
||||
} from 'vuex' |
|
||||
import { |
|
||||
listPage, |
|
||||
deleteBySids |
|
||||
} from '@/api/jichuxinxi/basefinpolicy' |
|
||||
import { |
|
||||
setuser |
|
||||
} from '@/utils/baocun' |
|
||||
import Pagination from '@/components/pagination' |
|
||||
import pageye from '@/components/pagination/pageye' |
|
||||
import { brandLike } from '@/api/jichuxinxi/brandManagement' |
|
||||
import { basefinbankDnamesDown } from '@/api/jichuxinxi/basefinbank' // 资方名称 |
|
||||
export default { |
|
||||
name: 'zifangzhengce', |
|
||||
components: { |
|
||||
Pagination, |
|
||||
pageye |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
isSearchShow: false, |
|
||||
searchxianshitit: '显示查询条件', |
|
||||
// --按钮菜单------- |
|
||||
menuState: { |
|
||||
add: false, // 添加 |
|
||||
edit: false, // 编辑 |
|
||||
delete: false, // 删除 |
|
||||
view: false, // 查看 |
|
||||
audit: false, // 审核 |
|
||||
input: false, // 导入 |
|
||||
output: false, // 导出 |
|
||||
upload: false, // 同步 |
|
||||
release: false // 下发 |
|
||||
}, |
|
||||
// 查询 ----------- |
|
||||
tableKey: 0, |
|
||||
sids: [], |
|
||||
list: [], |
|
||||
manageNameType:[], |
|
||||
// list: [{ title: '123' }], |
|
||||
total: 1, |
|
||||
FormLoading: false, |
|
||||
listLoading: false, |
|
||||
listQuery: { |
|
||||
current: 1, |
|
||||
size: 20, |
|
||||
params: { |
|
||||
policyName: '', |
|
||||
brand: '', |
|
||||
manageName: '' |
|
||||
} |
|
||||
}, |
|
||||
selectDate: undefined, |
|
||||
temp: {}, // 添加和修改 |
|
||||
templook: {}, // 查看实体 |
|
||||
textMap: { |
|
||||
update: '修改', |
|
||||
create: '创建' |
|
||||
}, |
|
||||
datass:[], |
|
||||
YongHu:[], |
|
||||
dialogFormVisible: false, // 添加修改对话框状态 |
|
||||
dialogFormShowVisible: false, // 查看对话框默认关闭状态 |
|
||||
dialogStatus: '' // 对话框状态 |
|
||||
// typeOptions: [], |
|
||||
// tureArrys: [ |
|
||||
// { |
|
||||
// value: 1, |
|
||||
// label: '是' |
|
||||
// }, |
|
||||
// { |
|
||||
// value: 0, |
|
||||
// label: '否' |
|
||||
// } |
|
||||
// ], |
|
||||
// fenzuOptions: [ |
|
||||
// { value: '1', label: '单位' }, |
|
||||
// { value: '2', label: '个人' } |
|
||||
// ], |
|
||||
// rules: { |
|
||||
// title: [{ required: true, message: '请填写', trigger: 'blur' }], |
|
||||
// qc: [{ required: true, message: '请填写全称', trigger: 'blur' }] |
|
||||
// } |
|
||||
// ------------------------------------ |
|
||||
} |
|
||||
}, |
|
||||
computed: { |
|
||||
...mapGetters([ |
|
||||
'id', |
|
||||
'roles', |
|
||||
'rolesIds', |
|
||||
'departmentId', |
|
||||
'departmentCode' |
|
||||
]) |
|
||||
}, |
|
||||
created() { |
|
||||
// 初始化变量 |
|
||||
this.init() |
|
||||
// 加载列表 |
|
||||
this.getList() |
|
||||
this.pingpai() |
|
||||
this.zifangmingcheng() |
|
||||
}, |
|
||||
methods: { |
|
||||
// 搜索条件效果 |
|
||||
clicksearchShow() { |
|
||||
this.isSearchShow = !this.isSearchShow |
|
||||
if (this.isSearchShow) { |
|
||||
this.searchxianshitit = '隐藏查询条件' |
|
||||
} else { |
|
||||
this.searchxianshitit = '显示查询条件' |
|
||||
} |
|
||||
}, |
|
||||
zifangmingcheng() { |
|
||||
basefinbankDnamesDown({ name: this.temp.manageName }).then((res) => { |
|
||||
if (res.code === '200') { |
|
||||
console.log(res.data, 66666666666) |
|
||||
this.manageNameType = res.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
querySearchAsync(queryString, cb) { |
|
||||
console.log('查询条件:', queryString) |
|
||||
|
|
||||
if ( |
|
||||
queryString != null && |
|
||||
queryString != undefined && |
|
||||
queryString !== '' |
|
||||
) { |
|
||||
// this.searchData({ name: queryString }) |
|
||||
brandLike({ name: queryString }).then((response) => { |
|
||||
if (response.code === '200') { |
|
||||
this.datass = response.data |
|
||||
cb(response.data) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
console.log(1111111111, this.YongHu) |
|
||||
this.datass = this.YongHu |
|
||||
cb(this.YongHu) |
|
||||
} |
|
||||
}, |
|
||||
handleSelect(e) { |
|
||||
this.listQuery.params.brand = e.brandName |
|
||||
}, |
|
||||
// 清空信息 |
|
||||
inputclear() { |
|
||||
this.listQuery.brand = '' |
|
||||
}, |
|
||||
pingpai() { |
|
||||
brandLike().then((res) => { |
|
||||
if (res.code === '200') { |
|
||||
console.log(res.data, 222) |
|
||||
this.YongHu = res.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
init() { |
|
||||
// 根据当前用户. 加载当前页面的按钮权限 |
|
||||
// findButtonByUserId(this.$route.path).then(response => { |
|
||||
// if ( |
|
||||
// response.code === 20000 && |
|
||||
// response.data && |
|
||||
// response.data.length > 0 |
|
||||
// ) { |
|
||||
// this.menuState = ConvertMenuState(response.data) // 处理各按钮显示状态 |
|
||||
// } |
|
||||
// }) |
|
||||
}, |
|
||||
// 序号 |
|
||||
indexMethod(index) { |
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
||||
var pageindex = index + 1 + pagestart |
|
||||
return pageindex |
|
||||
}, |
|
||||
|
|
||||
// 查询列表信息 |
|
||||
getList() { |
|
||||
this.listLoading = true |
|
||||
console.log(this.listQuery, 11111111111) |
|
||||
console.log('查询:' + JSON.stringify(this.listQuery)) |
|
||||
listPage(this.listQuery).then((response) => { |
|
||||
console.log('列表查询结果1:', response) |
|
||||
console.log('列表查询结果:' + JSON.stringify(response)) |
|
||||
this.listLoading = false |
|
||||
if ( |
|
||||
response.code === '200' && |
|
||||
response.data && |
|
||||
response.data.total > 0 |
|
||||
) { |
|
||||
this.list = response.data.records |
|
||||
// this.list.brand = tempData.brandName |
|
||||
console.log(this.list, 123) |
|
||||
// setuser(response.data.records.sid) |
|
||||
this.total = response.data.total |
|
||||
} else { |
|
||||
this.list = [] |
|
||||
this.total = 0 |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
// 查询按钮 |
|
||||
handleFilter() { |
|
||||
this.listQuery.current = 1 |
|
||||
console.log(this.listQuery,789) |
|
||||
this.getList() |
|
||||
}, |
|
||||
|
|
||||
// ----------------------------------方法-------------------- |
|
||||
// 返回 |
|
||||
handleReturn() { |
|
||||
this.$router.go(-1) |
|
||||
}, |
|
||||
// 添加前数据初始化 |
|
||||
resetTemp() { |
|
||||
this.temp = { |
|
||||
branchSid: '', |
|
||||
brand: '', |
|
||||
discount: '', |
|
||||
downPayment: '', |
|
||||
earningsRatio: '', |
|
||||
manageName: '', |
|
||||
marginRatio: '', |
|
||||
nper: '', |
|
||||
policyName: '', |
|
||||
rate: '', |
|
||||
vehicleModel: '' |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
handleSelectionChange(row) { |
|
||||
const aa = [] |
|
||||
row.forEach((element) => { |
|
||||
aa.push(element.sid) |
|
||||
setuser(this.sids) |
|
||||
}) |
|
||||
this.sids = aa |
|
||||
}, |
|
||||
// 打开添加 |
|
||||
handleCreate() { |
|
||||
this.$router.push({ |
|
||||
path: '/zifang/zifangzhengceAdd/0' |
|
||||
}) |
|
||||
}, |
|
||||
// 打开修改 |
|
||||
handleUpdate() { |
|
||||
if (this.sids.length === 1) { |
|
||||
this.dialogStatus = 'update' |
|
||||
console.log(this.sids) |
|
||||
this.$router.push({ |
|
||||
path: `/zifang/zifangzhengceAdd/${this.sids[0]}` |
|
||||
}) |
|
||||
} else if (this.sids.length > 1) { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '不能选中多个资方产品政策修改!!', |
|
||||
type: 'info', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '没有选择资方产品政策!!', |
|
||||
type: 'error', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
// 打开查看 |
|
||||
handleCheck(row) { |
|
||||
console.log('111', row) |
|
||||
this.$router.push({ |
|
||||
path: '/zifang/zifangzhengceInfo', |
|
||||
query: { |
|
||||
sid: row.sid |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
// 根据本行ID删除数据 |
|
||||
handleDelete() { |
|
||||
if (this.sids.length) { |
|
||||
deleteBySids(this.sids).then((response) => { |
|
||||
console.log('3455', response) |
|
||||
if (response.code === '200') { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '删除成功', |
|
||||
type: 'success', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
this.getList() |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '删除失败', |
|
||||
message: response.msg, |
|
||||
type: 'error' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '没有选择资方产品政策!!', |
|
||||
type: 'error', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
} |
|
||||
// // 导出 |
|
||||
// handleDaoChu() { |
|
||||
// } |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
/deep/ .el-collapse { |
|
||||
border-top: 0px solid #e6ebf5; |
|
||||
border-bottom: 0px solid #e6ebf5; |
|
||||
} |
|
||||
|
|
||||
/deep/ .el-collapse-item__content { |
|
||||
margin: 0; |
|
||||
padding: 0; |
|
||||
} |
|
||||
|
|
||||
/deep/ .el-collapse-item__wrap { |
|
||||
border-bottom: 0px solid #EBEEF5; |
|
||||
} |
|
||||
|
|
||||
/deep/ .el-collapse-item__header { |
|
||||
border-bottom: 0px solid #e6ebf5; |
|
||||
} |
|
||||
|
|
||||
.searchli { |
|
||||
padding: 5px 100px; |
|
||||
} |
|
||||
</style> |
|
@ -1,419 +0,0 @@ |
|||||
<template> |
|
||||
<div class="app-container"> |
|
||||
<div class="tab-header webtop"> |
|
||||
<div v-if="stateId==='0'">添加资方产品政策</div> |
|
||||
<div v-else>资方产品政策</div> |
|
||||
<div> |
|
||||
<el-button type="primary" size="small" @click="handleCreate()">保存</el-button> |
|
||||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="listconadd"> |
|
||||
<el-form ref="dataForm" :model="temp" label-position="right" label-width="190px" class="formadd" :rules="rules"> |
|
||||
<div class="title">资方产品政策</div> |
|
||||
<el-row> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="policyName"> |
|
||||
<span slot="label">政策名称:</span> |
|
||||
<el-input v-model="temp.policyName" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="brand"> |
|
||||
<span slot="label">品牌:</span> |
|
||||
<el-autocomplete v-model="temp.brandName" :fetch-suggestions="querySearchAsync" class="addinputw" placeholder="请输入品牌名称" @select="handleSelect"> |
|
||||
<i slot="suffix" class="el-icon-edit el-input__icon" @click="inputclear" /> |
|
||||
<template slot-scope="{ item }"> |
|
||||
<div style="paddingg:5px;background-color:Azure;"> |
|
||||
<span>品牌名称:</span> |
|
||||
<span style="color:red">{{ item.brandName }}</span><br> |
|
||||
</div> |
|
||||
</template> |
|
||||
</el-autocomplete> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="vehicleModel"> |
|
||||
<span slot="label">车型:</span> |
|
||||
<el-select v-model="temp.vehicleModel" class="addinputw" filterable placeholder="请选择车型" @click="xuanzhong"> |
|
||||
<el-option v-for="(item,index) in vehicleModelType" :key="index" :label="item.modelName" :value="item.sid" /> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="manageSid"> |
|
||||
<span slot="label">资方名称:</span> |
|
||||
<el-select v-model="temp.manageSid" class="addinputw" placeholder="请选择资方名称"> |
|
||||
<el-option v-for="(item,index) in manageNameType" :key="index" :label="item.manageName" :value="item.sid" /> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="downPayment"> |
|
||||
<span slot="label">首付比例:</span> |
|
||||
<el-input v-model="temp.downPayment" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="marginRatio"> |
|
||||
<span slot="label">保证金比例:</span> |
|
||||
<el-input v-model="temp.marginRatio" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="rate"> |
|
||||
<span slot="label">利率:</span> |
|
||||
<el-input v-model="temp.rate" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="nper"> |
|
||||
<span slot="label">期数:</span> |
|
||||
<el-input v-model="temp.nper" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<!-- <el-col :span="12"> |
|
||||
<el-form-item prop="branchSid"> |
|
||||
<span slot="label">分公司sid:</span> |
|
||||
<el-input v-model="temp.branchSid" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> --> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="discount"> |
|
||||
<span slot="label">厂家贴息:</span> |
|
||||
<el-input v-model="temp.discount" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item prop="earningsRatio"> |
|
||||
<span slot="label">政策盈利比例:</span> |
|
||||
<el-input v-model="temp.earningsRatio" maxlength="125" placeholder="" class="addinputw" clearable /> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
|
|
||||
|
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { mapGetters } from 'vuex' |
|
||||
import { |
|
||||
listPage, |
|
||||
SaveList, |
|
||||
Update, |
|
||||
deleteBySids, |
|
||||
details, |
|
||||
ExportExcel |
|
||||
} from '@/api/jichuxinxi/basefinpolicy' |
|
||||
import { brandLike } from '@/api/jichuxinxi/brandManagement' // 品牌管理模糊查询 |
|
||||
import { basefinbankDnamesDown } from '@/api/jichuxinxi/basefinbank' // 资方名称 |
|
||||
import { selectDown } from '@/api/jichuxinxi/basevehicle'// 根据品牌sid查询车型下拉框 |
|
||||
export default { |
|
||||
name: 'ZifangzhengceAdd', |
|
||||
// components: { }, |
|
||||
data() { |
|
||||
return { |
|
||||
// --按钮菜单------- |
|
||||
menuState: { |
|
||||
add: false, // 添加 |
|
||||
edit: false, // 编辑 |
|
||||
delete: false, // 删除 |
|
||||
view: false, // 查看 |
|
||||
audit: false, // 审核 |
|
||||
input: false, // 导入 |
|
||||
output: false, // 导出 |
|
||||
upload: false, // 同步 |
|
||||
release: false // 下发 |
|
||||
}, |
|
||||
YongHu: [], |
|
||||
datass: [], |
|
||||
sid: '', |
|
||||
stateId: 0, |
|
||||
FormLoading: false, |
|
||||
listLoading: false, |
|
||||
temp: {}, // 添加和修改 |
|
||||
// templook: {}, |
|
||||
textMap: { |
|
||||
update: '修改', |
|
||||
create: '创建' |
|
||||
}, |
|
||||
// dialogFormVisible: false, // 添加修改对话框状态 |
|
||||
// dialogFormShowVisible: false, // 查看对话框默认关闭状态 |
|
||||
dialogStatus: '', // 对话框状态 |
|
||||
brandType: [], |
|
||||
manageNameType: [], |
|
||||
vehicleModelType: [], |
|
||||
rules: { |
|
||||
policyName: [ |
|
||||
{ required: true, message: '请填写政策名称', trigger: 'blur' } |
|
||||
], |
|
||||
// brand: [{ required: true, message: '请填写品牌', trigger: 'blur' }], |
|
||||
vehicleModel: [ |
|
||||
// { required: true, message: '请填写车型', trigger: 'blur' } |
|
||||
], |
|
||||
manageName: [ |
|
||||
// { required: true, message: '请填写资方名称', trigger: 'blur' } |
|
||||
], |
|
||||
downPayment: [ |
|
||||
{ required: true, message: '请填写首付比例', trigger: 'blur' } |
|
||||
], |
|
||||
marginRatio: [ |
|
||||
{ required: true, message: '请填写保证金比例', trigger: 'blur' } |
|
||||
], |
|
||||
rate: [{ required: true, message: '请填写利率', trigger: 'blur' }], |
|
||||
nper: [{ required: true, message: '请填写期数', trigger: 'blur' }], |
|
||||
branchSid: [ |
|
||||
{ required: true, message: '请填写分公司sid', trigger: 'blur' } |
|
||||
], |
|
||||
discount: [ |
|
||||
{ required: true, message: '请填写厂家贴息', trigger: 'blur' } |
|
||||
], |
|
||||
earningsRatio: [ |
|
||||
{ required: true, message: '请填写政策盈利比例', trigger: 'blur' } |
|
||||
] |
|
||||
} |
|
||||
// ------------------------------------ |
|
||||
} |
|
||||
}, |
|
||||
computed: { |
|
||||
...mapGetters([ |
|
||||
'id', |
|
||||
'roles', |
|
||||
'rolesIds', |
|
||||
'departmentId', |
|
||||
'departmentCode' |
|
||||
]) |
|
||||
}, |
|
||||
created() { |
|
||||
// 初始化变量 |
|
||||
this.init() |
|
||||
}, |
|
||||
methods: { |
|
||||
init() { |
|
||||
this.stateId = this.$route.params.id |
|
||||
// 根据当前用户. 加载当前页面的按钮权限 |
|
||||
// findButtonByUserId(this.$route.path).then(response => { |
|
||||
// if ( |
|
||||
// response.code === 20000 && |
|
||||
// response.data && |
|
||||
// response.data.length > 0 |
|
||||
// ) { |
|
||||
// this.menuState = ConvertMenuState(response.data) // 处理各按钮显示状态 |
|
||||
// } |
|
||||
// }) |
|
||||
if (this.stateId !== '0') { |
|
||||
details(this.stateId).then((response) => { |
|
||||
if (response.code === '200') { |
|
||||
this.temp = response.data |
|
||||
this.chexing(response.data.brand) |
|
||||
// this.chexing(response.data.vehicleModel) |
|
||||
console.log(this.temp, 555555555555) |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
this.pingpai() |
|
||||
this.zifangmingcheng() |
|
||||
}, |
|
||||
|
|
||||
// ----------------------------------方法-------------------- |
|
||||
// 品牌 |
|
||||
pingpai() { |
|
||||
brandLike().then((res) => { |
|
||||
if (res.code === '200') { |
|
||||
console.log(res.data, 222) |
|
||||
this.YongHu = res.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
handleSelect(e) { |
|
||||
// 选择: |
|
||||
console.log('选择qqqqqqqqq:' ,e) |
|
||||
this.temp.brandName = e.brandName |
|
||||
this.temp.brand = e.sid |
|
||||
this.chexing(this.temp.brand) |
|
||||
}, |
|
||||
// 清空信息 |
|
||||
inputclear() { |
|
||||
this.temp.brandName = '' |
|
||||
// this.temp.brandCode = '' |
|
||||
}, |
|
||||
// 文本模糊查询 |
|
||||
querySearchAsync(queryString, cb) { |
|
||||
console.log('查询条件:', queryString) |
|
||||
|
|
||||
if ( |
|
||||
queryString != null && |
|
||||
queryString != undefined && |
|
||||
queryString !== '' |
|
||||
) { |
|
||||
// this.searchData({ name: queryString }) |
|
||||
brandLike({ name: queryString }).then((response) => { |
|
||||
if (response.code === '200') { |
|
||||
this.datass = response.data |
|
||||
cb(response.data) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
console.log(1111111111, this.YongHu) |
|
||||
this.datass = this.YongHu |
|
||||
cb(this.YongHu) |
|
||||
} |
|
||||
}, |
|
||||
// handleSelect1(e) { |
|
||||
// // 选择: |
|
||||
// console.log('选择:' ,e) |
|
||||
// this.temp.name = e.name |
|
||||
// this.sid = e.sid |
|
||||
// }, |
|
||||
// // 清空信息 |
|
||||
// inputclear1() { |
|
||||
// this.temp.brand = '' |
|
||||
// // this.temp.brandCode = '' |
|
||||
// }, |
|
||||
// // 文本模糊查询 |
|
||||
// querySearchAsync1(queryString, cb) { |
|
||||
// console.log('查询条件:', queryString) |
|
||||
|
|
||||
// if ( |
|
||||
// queryString != null && |
|
||||
// queryString != undefined && |
|
||||
// queryString !== '' |
|
||||
// ) { |
|
||||
// // this.searchData({ name: queryString }) |
|
||||
// namesDown({ name: queryString }).then((response) => { |
|
||||
// if (response.code === '200') { |
|
||||
// this.manageNameType = response.data |
|
||||
// cb(response.data) |
|
||||
// } |
|
||||
// }) |
|
||||
// } else { |
|
||||
// console.log(1111111111, this.YongHu) |
|
||||
// this.manageNameType = this.YongHu |
|
||||
// cb(this.YongHu) |
|
||||
// } |
|
||||
// }, |
|
||||
// 资方名称 |
|
||||
zifangmingcheng() { |
|
||||
basefinbankDnamesDown({ name: this.temp.manageName }).then((res) => { |
|
||||
if (res.code === '200') { |
|
||||
console.log(res.data, 66666666666) |
|
||||
this.manageNameType = res.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
xuanzhong() { |
|
||||
if (this.datass.length === 0) { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '请选择品牌后再选择车型', |
|
||||
type: 'error', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
} |
|
||||
}, |
|
||||
// 车型 |
|
||||
chexing(sid1) { |
|
||||
console.log('车型11111111',sid1) |
|
||||
var sid ={ |
|
||||
sid:sid1 |
|
||||
} |
|
||||
selectDown(sid).then((res) => { |
|
||||
console.log(33333333333, res) |
|
||||
if (res.code === '200') { |
|
||||
this.vehicleModelType = res.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
// 返回 |
|
||||
handleReturn() { |
|
||||
this.$router.go(-1) |
|
||||
}, |
|
||||
|
|
||||
// 添加前数据初始化 |
|
||||
resetTemp() { |
|
||||
this.temp = { |
|
||||
branchSid: '', |
|
||||
brand: '', |
|
||||
discount: '', |
|
||||
downPayment: '', |
|
||||
earningsRatio: '', |
|
||||
manageName: '', |
|
||||
marginRatio: '', |
|
||||
nper: '', |
|
||||
policyName: '', |
|
||||
rate: '', |
|
||||
vehicleModel: '' |
|
||||
} |
|
||||
}, |
|
||||
// 添加数据 |
|
||||
handleCreate() { |
|
||||
this.$refs['dataForm'].validate((valid) => { |
|
||||
if (valid) { |
|
||||
this.FormLoading = true |
|
||||
this.dialogStatus = 'create' |
|
||||
if (this.stateId === '0') { |
|
||||
console.log('传入值:', this.temp) |
|
||||
// this.temp.brand = this.sid |
|
||||
SaveList(this.temp).then((response) => { |
|
||||
console.log('返回值:', response) |
|
||||
this.FormLoading = false |
|
||||
if (response.code === '200') { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '添加成功', |
|
||||
type: 'success', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
this.$router.push({ path: '/zifang/zifangzhengce' }) |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '添加失败', |
|
||||
type: 'error', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
this.temp.sid=this.stateId |
|
||||
console.log(this.temp) |
|
||||
Update(this.temp).then((response) => { |
|
||||
this.dialogStatus = 'update' |
|
||||
console.log('response', response) |
|
||||
this.FormLoading = false |
|
||||
if (response.code === '200') { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '修改成功', |
|
||||
type: 'success', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
this.$router.push({ path: '/zifang/zifangzhengce' }) |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '失败', |
|
||||
message: '修改失败', |
|
||||
type: 'error' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
</style> |
|
@ -1,197 +0,0 @@ |
|||||
<template> |
|
||||
<div class="app-container"> |
|
||||
<div class="tab-header webtop"> |
|
||||
<div>资方产品政策详细信息</div> |
|
||||
<div> |
|
||||
<el-button type="info" size="medium" @click="handleReturn()">返回</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="listconadd"> |
|
||||
<el-form ref="dataForm" :model="temp" label-position="right" label-width="190px" class="forminfo" :rules="rules"> |
|
||||
<div class="title">资方产品政策详细信息</div> |
|
||||
<el-row> |
|
||||
<el-col :span="4" class="trightb">政策名称:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.policyName }} </el-col> |
|
||||
<el-col :span="4" class="trightb">品牌:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.brandName }} </el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="4" class="trightb">车型:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.modelName }} </el-col> |
|
||||
<el-col :span="4" class="trightb">资方名称:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.manageName }} </el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="4" class="trightb">首付比例:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.downPayment }} </el-col> |
|
||||
<el-col :span="4" class="trightb">保证金比例:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.marginRatio }} </el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="4" class="trightb">利率:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.rate }} </el-col> |
|
||||
<el-col :span="4" class="trightb">期数:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.nper }} </el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="4" class="trightb">厂家贴息:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.discount }} </el-col> |
|
||||
<el-col :span="4" class="trightb">政策盈利比例:</el-col> |
|
||||
<el-col :span="8" class="tleft"> {{ temp.earningsRatio }} </el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { mapGetters } from 'vuex' |
|
||||
import { |
|
||||
listPage, |
|
||||
SaveList, |
|
||||
Update, |
|
||||
deleteBySids, |
|
||||
details, |
|
||||
ExportExcel |
|
||||
} from '@/api/jichuxinxi/basefinpolicy' |
|
||||
export default { |
|
||||
name: 'ZifangzhengceInfo', |
|
||||
// components: { }, |
|
||||
data() { |
|
||||
return { |
|
||||
// --按钮菜单------- |
|
||||
menuState: { |
|
||||
add: false, // 添加 |
|
||||
edit: false, // 编辑 |
|
||||
delete: false, // 删除 |
|
||||
view: false, // 查看 |
|
||||
audit: false, // 审核 |
|
||||
input: false, // 导入 |
|
||||
output: false, // 导出 |
|
||||
upload: false, // 同步 |
|
||||
release: false // 下发 |
|
||||
}, |
|
||||
FormLoading: false, |
|
||||
// listLoading: false, |
|
||||
|
|
||||
temp: {}, // 查看实体 |
|
||||
textMap: { |
|
||||
update: '修改', |
|
||||
create: '创建' |
|
||||
}, |
|
||||
// dialogFormVisible: false, // 添加修改对话框状态 |
|
||||
// dialogFormShowVisible: false, // 查看对话框默认关闭状态 |
|
||||
dialogStatus: '', // 对话框状态 |
|
||||
// fenzuOptions: [ |
|
||||
// ], |
|
||||
rules: { |
|
||||
policyName: [{ required: true, message: '请填写政策名称', trigger: 'blur' }], |
|
||||
brand: [{ required: true, message: '请填写品牌', trigger: 'blur' }], |
|
||||
vehicleModel: [{ required: true, message: '请填写车型', trigger: 'blur' }], |
|
||||
manageName: [{ required: true, message: '请填写资方名称', trigger: 'blur' }], |
|
||||
downPayment: [{ required: true, message: '请填写首付比例', trigger: 'blur' }], |
|
||||
marginRatio: [{ required: true, message: '请填写保证金比例', trigger: 'blur' }], |
|
||||
rate: [{ required: true, message: '请填写利率', trigger: 'blur' }], |
|
||||
nper: [{ required: true, message: '请填写期数', trigger: 'blur' }], |
|
||||
branchSid: [{ required: true, message: '请填写分公司sid', trigger: 'blur' }], |
|
||||
discount: [{ required: true, message: '请填写厂家贴息', trigger: 'blur' }], |
|
||||
earningsRatio: [{ required: true, message: '请填写政策盈利比例', trigger: 'blur' }] |
|
||||
} |
|
||||
// ------------------------------------ |
|
||||
} |
|
||||
}, |
|
||||
computed: { |
|
||||
...mapGetters([ |
|
||||
'id', |
|
||||
'roles', |
|
||||
'rolesIds', |
|
||||
'departmentId', |
|
||||
'departmentCode' |
|
||||
]) |
|
||||
}, |
|
||||
created() { |
|
||||
// 初始化变量 |
|
||||
this.init() |
|
||||
}, |
|
||||
methods: { |
|
||||
init() { |
|
||||
this.stateId = this.$route.query.sid |
|
||||
console.log(this.stateId, 2222) |
|
||||
|
|
||||
details(this.stateId).then((response) => { |
|
||||
console.log('查询', response) |
|
||||
this.FormLoading = false |
|
||||
if (response.code === '200') { |
|
||||
this.temp = response.data |
|
||||
this.temp.brandName = tempData.brand |
|
||||
this.temp.manageName = tempData.manageName |
|
||||
console.log('查询1', this.temp) |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '失败', |
|
||||
message: '查询失败', |
|
||||
type: 'error' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
// 根据当前用户. 加载当前页面的按钮权限 |
|
||||
// findButtonByUserId(this.$route.path).then(response => { |
|
||||
// if ( |
|
||||
// response.code === 20000 && |
|
||||
// response.data && |
|
||||
// response.data.length > 0 |
|
||||
// ) { |
|
||||
// this.menuState = ConvertMenuState(response.data) // 处理各按钮显示状态 |
|
||||
// } |
|
||||
// }) |
|
||||
}, |
|
||||
|
|
||||
// ----------------------------------方法-------------------- |
|
||||
// 返回 |
|
||||
handleReturn() { |
|
||||
this.$router.go(-1) |
|
||||
}, |
|
||||
|
|
||||
// 添加前数据初始化 |
|
||||
resetTemp() { |
|
||||
this.temp = { |
|
||||
branchSid: '', |
|
||||
brand: '', |
|
||||
discount: '', |
|
||||
downPayment: '', |
|
||||
earningsRatio: '', |
|
||||
manageName: '', |
|
||||
marginRatio: '', |
|
||||
nper: '', |
|
||||
policyName: '', |
|
||||
rate: '', |
|
||||
vehicleModel: '' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
// 打开修改 |
|
||||
handleCheck() { |
|
||||
this.FormLoading = true |
|
||||
details(this.tempDate.sid).then((response) => { |
|
||||
console.log('查询', response) |
|
||||
this.FormLoading = false |
|
||||
if (response.code === '200') { |
|
||||
this.temp = response.data |
|
||||
console.log('查询1', this.temp) |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '失败', |
|
||||
message: '查询失败', |
|
||||
type: 'error' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
|
|
||||
</style> |
|
Loading…
Reference in new issue