完善系统管理
This commit is contained in:
@@ -18,7 +18,7 @@ export function pageList(data) {
|
|||||||
// 查询左侧部门列表
|
// 查询左侧部门列表
|
||||||
export function orgList(data) {
|
export function orgList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysorganization/list',
|
url: '/wms/apiadmin/sysorganization/list/' + data,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -67,7 +67,7 @@ export function addOrgTree(data) {
|
|||||||
// 回显
|
// 回显
|
||||||
export function selectBySid(data) {
|
export function selectBySid(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'portal/v1/sysorganization/fetchBySid/' + data,
|
url: '/wms/apiadmin/sysorganization/fetchBySid/' + data,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -3,23 +3,26 @@ import qs from 'qs'
|
|||||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
||||||
let tokens = window.sessionStorage.getItem('token');
|
let tokens = window.sessionStorage.getItem('token');
|
||||||
// 业务角色 列表
|
// 业务角色 列表
|
||||||
export function roleOrgList(data){
|
export function roleOrgList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysrole/listPage',
|
url: '/wms/apiadmin/sysrole/listPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function postList(data){
|
export function postList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/syspost/list',
|
url: '/wms/apiadmin/syspost/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json'}
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,8 +58,9 @@ export function saveOrgroles(data) {
|
|||||||
url: '/wms/apiadmin/sysrole/save',
|
url: '/wms/apiadmin/sysrole/save',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -72,8 +76,9 @@ export function putOrgroles(data) {
|
|||||||
url: `/wms/apiadmin/sysrole/update/${data.sid}`,
|
url: `/wms/apiadmin/sysrole/update/${data.sid}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -87,8 +92,9 @@ export function delOrgroles(data) {
|
|||||||
url: `/wms/apiadmin/sysrole/delBySids/${data.sid}`,
|
url: `/wms/apiadmin/sysrole/delBySids/${data.sid}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -97,7 +103,9 @@ export function getRoleMenuList(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysmobilemenurole/getRoleMenuList',
|
url: '/wms/apiadmin/sysmobilemenurole/getRoleMenuList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: { roleSid: data }
|
params: {
|
||||||
|
roleSid: data
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,8 +115,9 @@ export function saveRoleMenuList(data) {
|
|||||||
url: `/wms/apiadmin/sysmobilemenurole/saveRoleMenuList`,
|
url: `/wms/apiadmin/sysmobilemenurole/saveRoleMenuList`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -119,8 +128,9 @@ export function roleMenuTree(data) {
|
|||||||
url: `/wms/apiadmin/sysmenu/listAllByRoleSid`,
|
url: `/wms/apiadmin/sysmenu/listAllByRoleSid`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -128,11 +138,12 @@ export function roleMenuTree(data) {
|
|||||||
// 菜单授权保存
|
// 菜单授权保存
|
||||||
export function saveorgrolemenus(data) {
|
export function saveorgrolemenus(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysrikeauthorize/updateRoleAndMenu`,
|
url: `/wms/apiadmin/sysroleauthorize/updateRoleAndMenu`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -142,8 +153,9 @@ export function sourceMenuTree(data) {
|
|||||||
url: `/wms/apiadmin/syssource/listAllByRoleSid`,
|
url: `/wms/apiadmin/syssource/listAllByRoleSid`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -153,8 +165,9 @@ export function saveSource(data) {
|
|||||||
url: `/wms/apiadmin/syssourcerole/updateRoleAndSource`,
|
url: `/wms/apiadmin/syssourcerole/updateRoleAndSource`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -171,8 +184,9 @@ export function savefunMenu(data) {
|
|||||||
url: `/wms/apiadmin/sysrolefunction/updateRoleAndFunction`,
|
url: `/wms/apiadmin/sysrolefunction/updateRoleAndFunction`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -183,7 +197,10 @@ export function selMenuByRole(data) {
|
|||||||
url: `/wms/apiadmin/sysmenurole/selMenuByRole`,
|
url: `/wms/apiadmin/sysmenurole/selMenuByRole`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,6 +210,9 @@ export function updateDataByRoleMenu(data) {
|
|||||||
url: `/wms/apiadmin/sysmenurole/updateDataByRoleMenu`,
|
url: `/wms/apiadmin/sysmenurole/updateDataByRoleMenu`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,136 +3,162 @@ import qs from 'qs'
|
|||||||
// 用户列表
|
// 用户列表
|
||||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
||||||
let tokens = window.sessionStorage.getItem('token');
|
let tokens = window.sessionStorage.getItem('token');
|
||||||
export function userList(data){
|
export function userList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/listPage',
|
url: '/wms/apiadmin/sysuser/listPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 新增
|
// 新增
|
||||||
export function userAdd(data){
|
export function userAdd(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/save',
|
url: '/wms/apiadmin/sysstaffinfo/save',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 更新
|
|
||||||
export function userUpdata(data){
|
// 初始化 用户
|
||||||
|
export function initUserInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/update/' +data.sid,
|
url: '/wms/apiadmin/sysstaffinfo/fetchBySid/' + data.sid,
|
||||||
|
method: 'get',
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新
|
||||||
|
export function userUpdata(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/apiadmin/sysstaffinfo/update/' + data.sid,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
export function delUser(data){
|
export function delUser(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/delBySid/' +data.sid,
|
url: '/wms/apiadmin/sysuser/delBySid/' + data.sid,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 初始化密码
|
// 初始化密码
|
||||||
export function initPwd(data){
|
export function initPwd(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/initPwd/' +data.sid,
|
url: '/wms/apiadmin/sysuser/initPwd/' + data.sid,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 根据sid查询一条信息
|
// 根据sid查询一条信息
|
||||||
export function userSingle(data){
|
export function userSingle(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/fetchBySid/' +data.sid,
|
url: '/wms/apiadmin/sysuser/fetchBySid/' + data.sid,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 单条用户的角色列表
|
// 单条用户的角色列表
|
||||||
export function setRole(data){
|
export function setRole(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysrole/listAllByUserSid/' +data.sid,
|
url: '/wms/apiadmin/sysrole/listAllByUserSid/' + data.sid,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 角色列表
|
// 角色列表
|
||||||
export function saveOrgRole(data){
|
export function saveOrgRole(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuserrole/update',
|
url: '/wms/apiadmin/sysuserrole/update',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查询角色列表
|
// 查询角色列表
|
||||||
export function roleList(data){
|
export function roleList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysrole/listAll',
|
url: '/wms/apiadmin/sysrole/listAll',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查询部门列表
|
// 查询部门列表
|
||||||
export function orgList(data){
|
export function orgList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysorganization/list',
|
url: '/wms/apiadmin/sysorganization/list/' + data,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查询岗位列表
|
// 查询岗位列表
|
||||||
export function postList(data){
|
export function postList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/syspost/fetchByOrgSid/'+data.sid,
|
url: '/wms/apiadmin/syspost/fetchByOrgSid/' + data.sid,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
export function getCode(data){
|
export function getCode(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/sendMessageCode/'+data.phone,
|
url: '/wms/apiadmin/sysuser/sendMessageCode/' + data.phone,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {
|
||||||
'token':tokens
|
'Content-Type': 'application/json',
|
||||||
|
'token': tokens
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
params: {
|
params: {
|
||||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33', // wms 资源sid
|
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33', // wms 资源sid
|
||||||
orgSid: window.sessionStorage.getItem('orgSid'),
|
orgSid: window.sessionStorage.getItem('orgSid'),
|
||||||
userSid: window.sessionStorage.getItem('sid')
|
userSid: window.sessionStorage.getItem('userSid')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -919,7 +919,7 @@
|
|||||||
const choose = this.cateList.filter((item) => item.sid == val)
|
const choose = this.cateList.filter((item) => item.sid == val)
|
||||||
console.log('>>>>>>>>>selectCateChange', choose)
|
console.log('>>>>>>>>>selectCateChange', choose)
|
||||||
this.formobj.goodsTypeSid = choose[0].sid
|
this.formobj.goodsTypeSid = choose[0].sid
|
||||||
this.formobj.goodsTypeName = choose[0].goodsTypeName
|
this.formobj.typeName = choose[0].goodsTypeName
|
||||||
},
|
},
|
||||||
selectfacturerChange(val) {
|
selectfacturerChange(val) {
|
||||||
const choose = this.facturerList.filter((item) => item.sid == val)
|
const choose = this.facturerList.filter((item) => item.sid == val)
|
||||||
|
|||||||
@@ -374,17 +374,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
getOrgSidByPath({
|
// getOrgSidByPath({
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath')
|
// orgPath: window.sessionStorage.getItem('defaultOrgPath')
|
||||||
}).then((res) => {
|
// }).then((res) => {
|
||||||
if (res.success) {
|
// if (res.success) {
|
||||||
this.formobj.createOrgSid = res.data
|
// this.formobj.createOrgSid = res.data
|
||||||
this.formobj.useOrgSid = res.data
|
// this.formobj.useOrgSid = res.data
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
init() {
|
||||||
|
getOrgSidByPath({
|
||||||
|
orgPath: window.sessionStorage.getItem('defaultOrgPath')
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.formobj.createOrgSid = res.data
|
||||||
|
this.formobj.useOrgSid = res.data
|
||||||
|
|
||||||
|
this.getsupplierLust()
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// commodityInput(value) {
|
// commodityInput(value) {
|
||||||
// this.commodityQuery.params.name = value
|
// this.commodityQuery.params.name = value
|
||||||
// this.commodityLoading = true
|
// this.commodityLoading = true
|
||||||
@@ -700,7 +715,11 @@
|
|||||||
this.isUpdata = false
|
this.isUpdata = false
|
||||||
console.log("showAdd", this.isUpdata);
|
console.log("showAdd", this.isUpdata);
|
||||||
|
|
||||||
this.getsupplierLust()
|
|
||||||
|
this.init()
|
||||||
|
|
||||||
|
|
||||||
|
// this.getsupplierLust()
|
||||||
// this.getWarehouseList()
|
// this.getWarehouseList()
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -718,7 +737,10 @@
|
|||||||
showEdit(row) {
|
showEdit(row) {
|
||||||
this.title = "【修改】"
|
this.title = "【修改】"
|
||||||
this.isUpdata = true
|
this.isUpdata = true
|
||||||
this.getsupplierLust()
|
|
||||||
|
this.init()
|
||||||
|
|
||||||
|
// this.getsupplierLust()
|
||||||
// this.getWarehouseList()
|
// this.getWarehouseList()
|
||||||
console.log("showEdit", this.isUpdata);
|
console.log("showEdit", this.isUpdata);
|
||||||
|
|
||||||
@@ -791,8 +813,7 @@
|
|||||||
// })
|
// })
|
||||||
|
|
||||||
choiceSupplierInfo({
|
choiceSupplierInfo({
|
||||||
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
|
createOrgSid: this.formobj.createOrgSid
|
||||||
.getItem('defaultOrgPath').lastIndexOf('/') + 1)
|
|
||||||
}).then((resp) => {
|
}).then((resp) => {
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
this.supplierList = resp.data
|
this.supplierList = resp.data
|
||||||
|
|||||||
@@ -38,7 +38,8 @@
|
|||||||
|
|
||||||
<div class="listconadd">
|
<div class="listconadd">
|
||||||
|
|
||||||
<el-table ref="multipleTable" :data="tableData" border style="width: 100%;margin-bottom: 100px;" row-key="sid"
|
<el-table v-loading="loading" ref="multipleTable" :data="tableData" border
|
||||||
|
style="width: 100%;margin-bottom: 100px;" row-key="sid"
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
||||||
<el-table-column prop="name" label="菜单名称" width="220" />
|
<el-table-column prop="name" label="菜单名称" width="220" />
|
||||||
<el-table-column label="操作" width="260" align="center">
|
<el-table-column label="操作" width="260" align="center">
|
||||||
@@ -61,11 +62,12 @@
|
|||||||
<el-input v-model="scope.row.sortNo" size="mini"/>
|
<el-input v-model="scope.row.sortNo" size="mini"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>-->
|
</el-table-column>-->
|
||||||
|
<el-table-column prop="pageUrl" width="120" label="类型" align="center" />
|
||||||
<el-table-column prop="pageUrl" label="链接地址" align="center" />
|
<el-table-column prop="pageUrl" label="链接地址" align="center" />
|
||||||
<el-table-column prop="isEnable" label="可见性" align="center">
|
<el-table-column prop="isShow" label="可见性" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch v-model="scope.row.isEnable" active-color="#13ce66" inactive-color="#ff4949" active-value="1"
|
<el-switch v-model="scope.row.isShow" active-color="#13ce66" inactive-color="#ff4949" active-value="1"
|
||||||
inactive-value="0" @change="enabledChange(scope.row.isEnable,scope.row)" />
|
inactive-value="0" @change="enabledChange(scope.row.isShow,scope.row)" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -117,12 +119,22 @@
|
|||||||
<el-input v-model="form.pageUrl" />
|
<el-input v-model="form.pageUrl" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>类型分类</td>
|
||||||
|
<td>
|
||||||
|
<el-radio-group v-model="editMenuType" @change="menuTypeChangeRadio">
|
||||||
|
<el-radio :label="'1'">目录</el-radio>
|
||||||
|
<el-radio :label="'2'">菜单</el-radio>
|
||||||
|
<el-radio :label="'3'">按钮</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>是否可见</td>
|
<td>是否可见</td>
|
||||||
<td>
|
<td>
|
||||||
<el-radio-group v-model="form.isShow">
|
<el-radio-group v-model="editShow" @change="changeRadio">
|
||||||
<el-radio :label="0">否</el-radio>
|
<el-radio :label="'0'">否</el-radio>
|
||||||
<el-radio :label="1">是</el-radio>
|
<el-radio :label="'1'">是</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -192,12 +204,22 @@
|
|||||||
<el-input v-model="form.pageUrl" style="width:300px" />
|
<el-input v-model="form.pageUrl" style="width:300px" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>类型分类</td>
|
||||||
|
<td>
|
||||||
|
<el-radio-group v-model="addMenuType" @change="menuTypeChangeRadio2">
|
||||||
|
<el-radio :label="'1'">目录</el-radio>
|
||||||
|
<el-radio :label="'2'">菜单</el-radio>
|
||||||
|
<el-radio :label="'3'">按钮</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>是否可见</td>
|
<td>是否可见</td>
|
||||||
<td>
|
<td>
|
||||||
<el-radio-group v-model="form.isShow">
|
<el-radio-group v-model="addShow" @change="changeRadio2">
|
||||||
<el-radio :label="0">否</el-radio>
|
<el-radio :label="'0'">否</el-radio>
|
||||||
<el-radio :label="1">是</el-radio>
|
<el-radio :label="'1'">是</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -235,6 +257,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loading: false,
|
||||||
activeName: 'roleList',
|
activeName: 'roleList',
|
||||||
editDialog: false,
|
editDialog: false,
|
||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
@@ -242,7 +265,7 @@
|
|||||||
form: {
|
form: {
|
||||||
pname: '顶级菜单',
|
pname: '顶级菜单',
|
||||||
iconUrl: '',
|
iconUrl: '',
|
||||||
isShow: 1,
|
isShow: '1',
|
||||||
menuName: '',
|
menuName: '',
|
||||||
menuUrl: '',
|
menuUrl: '',
|
||||||
pageAliasName: '',
|
pageAliasName: '',
|
||||||
@@ -252,7 +275,7 @@
|
|||||||
psid: '',
|
psid: '',
|
||||||
remarks: '',
|
remarks: '',
|
||||||
sortNo: 0,
|
sortNo: 0,
|
||||||
sourceSid: 'wms',
|
sourceName: 'wms',
|
||||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
||||||
},
|
},
|
||||||
formBackup: Object.assign({}, this.form),
|
formBackup: Object.assign({}, this.form),
|
||||||
@@ -270,7 +293,11 @@
|
|||||||
},
|
},
|
||||||
rank: '1',
|
rank: '1',
|
||||||
sourceNameData: [], // 资源
|
sourceNameData: [], // 资源
|
||||||
isadd: false
|
isadd: false,
|
||||||
|
editShow: '1',
|
||||||
|
addShow: '1',
|
||||||
|
addMenuType: '1',
|
||||||
|
editMenuType: '1',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -282,6 +309,22 @@
|
|||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
menuTypeChangeRadio(val) {
|
||||||
|
console.log('menuTypeChangeRadio', val)
|
||||||
|
this.form.menuType = val
|
||||||
|
},
|
||||||
|
menuTypeChangeRadio2(val) {
|
||||||
|
console.log('menuTypeChangeRadio2', val)
|
||||||
|
this.form.menuType = val
|
||||||
|
},
|
||||||
|
changeRadio(val) {
|
||||||
|
console.log('changeRadio', val)
|
||||||
|
this.form.isShow = val
|
||||||
|
},
|
||||||
|
changeRadio2(val) {
|
||||||
|
console.log('changeRadio2', val)
|
||||||
|
this.form.isShow = val
|
||||||
|
},
|
||||||
pagination(val) { // 分页
|
pagination(val) { // 分页
|
||||||
this.page.current = val.pageNum
|
this.page.current = val.pageNum
|
||||||
this.page.size = val.pageSize
|
this.page.size = val.pageSize
|
||||||
@@ -291,7 +334,9 @@
|
|||||||
this.page.params = this.pageBackup
|
this.page.params = this.pageBackup
|
||||||
},
|
},
|
||||||
getPageList() { // 获取列表
|
getPageList() { // 获取列表
|
||||||
|
this.loading = true
|
||||||
pageList(this.page).then((res) => {
|
pageList(this.page).then((res) => {
|
||||||
|
this.loading = false
|
||||||
console.log('这里是条件查询', this.page)
|
console.log('这里是条件查询', this.page)
|
||||||
const treedata = res.data
|
const treedata = res.data
|
||||||
console.log('菜单列表', res)
|
console.log('菜单列表', res)
|
||||||
@@ -310,7 +355,14 @@
|
|||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
if (tab.name == 'addrole') {
|
if (tab.name == 'addrole') {
|
||||||
this.dialogTitle = '新增'
|
this.dialogTitle = '新增'
|
||||||
this.roleForm = Object.assign({}, this.formBackup)
|
this.form = Object.assign({}, this.formBackup)
|
||||||
|
this.form.isShow = '1'
|
||||||
|
this.form.menuType = '1'
|
||||||
|
// this.form.psid = row.sid || 0
|
||||||
|
this.form.pname = '顶级菜单'
|
||||||
|
this.form.sourceName = 'wms'
|
||||||
|
this.form.sourceSid = 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
||||||
|
this.form.psid = 0
|
||||||
} else {
|
} else {
|
||||||
this.getPageList()
|
this.getPageList()
|
||||||
}
|
}
|
||||||
@@ -325,7 +377,8 @@
|
|||||||
// this.dialogTitle = '新增'
|
// this.dialogTitle = '新增'
|
||||||
// this.editDialog = true
|
// this.editDialog = true
|
||||||
this.form = Object.assign({}, this.formBackup)
|
this.form = Object.assign({}, this.formBackup)
|
||||||
this.form.isShow = 1
|
this.form.isShow = '1'
|
||||||
|
this.form.menuType = '1'
|
||||||
// this.form.psid = row.sid || 0
|
// this.form.psid = row.sid || 0
|
||||||
this.form.pname = row.name || '顶级菜单'
|
this.form.pname = row.name || '顶级菜单'
|
||||||
this.form.sourceName = row.sourceName
|
this.form.sourceName = row.sourceName
|
||||||
@@ -337,17 +390,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
editRow(row) {
|
editRow(row) {
|
||||||
|
console.log("editRow", row);
|
||||||
this.dialogTitle = '编辑'
|
this.dialogTitle = '编辑'
|
||||||
this.editDialog = true
|
this.editDialog = true
|
||||||
this.form = Object.assign({}, row)
|
this.form = Object.assign({}, row)
|
||||||
this.form.isShow = 1
|
|
||||||
|
this.editShow = this.form.isShow
|
||||||
|
this.editMenuType = this.form.menuType
|
||||||
|
|
||||||
|
// this.form.isShow = 1
|
||||||
this.form.pname = row.psid == '0' ? '顶级菜单' : row.pname
|
this.form.pname = row.psid == '0' ? '顶级菜单' : row.pname
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
if (this.form.sid) {
|
if (this.form.sid) {
|
||||||
putMenusInfo(this.form).then(res => {
|
putMenusInfo(this.form).then(res => {
|
||||||
this.editDialog = false
|
this.editDialog = false
|
||||||
this.getPageList(this.page)
|
this.getPageList()
|
||||||
this.$message({
|
this.$message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
@@ -379,17 +437,15 @@
|
|||||||
delMenus({
|
delMenus({
|
||||||
sid: row.sid
|
sid: row.sid
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
||||||
loading.close()
|
loading.close()
|
||||||
if (resp.success) {
|
this.getPageList()
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: resp.msg,
|
message: resp.msg,
|
||||||
showClose: true
|
showClose: true
|
||||||
})
|
})
|
||||||
this.getPageList(this.page)
|
|
||||||
} else {
|
|
||||||
// 根据resp.code进行异常情况处理
|
|
||||||
}
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container" style="display: flex;">
|
<div class="container" style="display: flex;">
|
||||||
<div class="org-tree">
|
<div class="org-tree">
|
||||||
<el-tree :data="treedata" node-key="sid" :props="props" :default-expanded-keys="['fd6435f2-0005-11ec-a033-48452053aa33']" @node-click="handleNodeClick">
|
<el-tree :data="treedata" node-key="sid" :props="props"
|
||||||
<span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)" @click.stop.native>
|
:default-expanded-keys="['fd6435f2-0005-11ec-a033-48452053aa33']" @node-click="handleNodeClick">
|
||||||
<span>{{ node.label || $store.getters.userInfo.Orgname }}</span>
|
<span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="mouseenter(data)"
|
||||||
<span v-show="data.del" class="handle">
|
@mouseleave="mouseleave(data)">
|
||||||
<el-tooltip class="item" effect="dark" content="新增" placement="top-start">
|
<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 type="text" size="mini" @click.stop="() => append(data)" icon="el-icon-circle-plus-outline">
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@@ -17,8 +19,8 @@
|
|||||||
<!-- <el-button type="text" size="mini" @click.stop="() => remove(data)" icon="el-icon-delete">-->
|
<!-- <el-button type="text" size="mini" @click.stop="() => remove(data)" icon="el-icon-delete">-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<!-- </el-tooltip>-->
|
<!-- </el-tooltip>-->
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog title="编辑节点" :visible.sync="dialogVisible" width="50%" class="edit">
|
<el-dialog title="编辑节点" :visible.sync="dialogVisible" width="50%" class="edit">
|
||||||
@@ -37,13 +39,13 @@
|
|||||||
<td>主管人员</td>
|
<td>主管人员</td>
|
||||||
<td>
|
<td>
|
||||||
<el-select v-model="form.zgStaffSid" style="width:300px" filterable clearable>
|
<el-select v-model="form.zgStaffSid" style="width:300px" filterable clearable>
|
||||||
<el-option v-for="item in staffdata" :key="item.sid" :label="item.name" :value="item.sid"/>
|
<el-option v-for="item in staffdata" :key="item.sid" :label="item.name" :value="item.sid" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
<td>分管人员</td>
|
<td>分管人员</td>
|
||||||
<td>
|
<td>
|
||||||
<el-select v-model="fgStaffSid" style="width:300px" filterable multiple>
|
<el-select v-model="fgStaffSid" style="width:300px" filterable multiple>
|
||||||
<el-option v-for="item in staffdata2" :key="item.sid" :label="item.name" :value="item.sid"/>
|
<el-option v-for="item in staffdata2" :key="item.sid" :label="item.name" :value="item.sid" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -56,8 +58,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>管理层级</td>
|
<td>管理层级</td>
|
||||||
<td>
|
<td>
|
||||||
<el-select v-model="form.orgLevelValue" style="width:300px" placeholder="请选择" filterable @change="changeOrgLevel">
|
<el-select v-model="form.orgLevelValue" style="width:300px" placeholder="请选择" filterable
|
||||||
<el-option v-for="item in orgLevel_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
@change="changeOrgLevel">
|
||||||
|
<el-option v-for="item in orgLevel_list" :key="item.dictKey" :label="item.dictValue"
|
||||||
|
:value="item.dictValue"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
<td>其他编码</td>
|
<td>其他编码</td>
|
||||||
@@ -73,7 +77,8 @@
|
|||||||
<td>组织属性</td>
|
<td>组织属性</td>
|
||||||
<td>
|
<td>
|
||||||
<el-select v-model="form.orgAttributeValue" placeholder="请选择" filterable @change="changeOrgAttribute">
|
<el-select v-model="form.orgAttributeValue" placeholder="请选择" filterable @change="changeOrgAttribute">
|
||||||
<el-option v-for="item in orgAttribute_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
<el-option v-for="item in orgAttribute_list" :key="item.dictKey" :label="item.dictValue"
|
||||||
|
:value="item.dictValue"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -105,6 +110,7 @@
|
|||||||
<el-button @click="dialogVisible = false">返 回</el-button>
|
<el-button @click="dialogVisible = false">返 回</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<div class="org-table" v-show="isshow == 'table'">
|
<div class="org-table" v-show="isshow == 'table'">
|
||||||
<div class="tab-header">
|
<div class="tab-header">
|
||||||
<el-form ref="form" :inline="true" :model="form" label-width="80px">
|
<el-form ref="form" :inline="true" :model="form" label-width="80px">
|
||||||
@@ -133,24 +139,24 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="组织名称" align="center"></el-table-column>
|
<el-table-column prop="name" label="组织名称" width="120" align="center"></el-table-column>
|
||||||
<el-table-column prop="orgCode" label="组织编码" align="center"></el-table-column>
|
<el-table-column prop="orgCode" label="组织编码" width="110" align="center"></el-table-column>
|
||||||
<!-- <el-table-column prop="zgNames" label="主管" align="center"></el-table-column>-->
|
<el-table-column prop="zgNames" label="主管" width="100" align="center"></el-table-column>
|
||||||
<el-table-column prop="fgNames" label="分管" align="center"></el-table-column>
|
<el-table-column prop="fgNames" label="分管" width="100" align="center"></el-table-column>
|
||||||
<!--<el-table-column prop="contactMan" label="联系人" align="center" width="100px"></el-table-column>-->
|
<el-table-column prop="linkPerson" label="联系人" align="center" width="100px"></el-table-column>
|
||||||
<el-table-column prop="linkPhone" label="联系人手机号" width="110" align="center">
|
<el-table-column prop="linkPhone" label="联系人手机号" width="130" align="center">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="addrs" label="地址" align="center">
|
<el-table-column prop="addrs" label="地址" align="center">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="sort" label="排序" align="center" width="50px">
|
<el-table-column prop="sort" label="排序" align="center" width="80px">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="qrText" label="二维码" align="center" width="80px">
|
<!-- <el-table-column prop="qrText" label="二维码" align="center" width="100px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button @click.native.prevent="lookRow(scope.row)" type="text" size="small">查看</el-button>
|
<el-button @click.native.prevent="lookRow(scope.row)" type="text" size="small">查看</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
|
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="org-table" v-show="isshow == 'ewm'">
|
<div class="org-table" v-show="isshow == 'ewm'">
|
||||||
@@ -211,13 +217,13 @@
|
|||||||
<td>主管人员</td>
|
<td>主管人员</td>
|
||||||
<td>
|
<td>
|
||||||
<el-select v-model="form.zgStaffSid" style="width:300px" filterable clearable>
|
<el-select v-model="form.zgStaffSid" style="width:300px" filterable clearable>
|
||||||
<el-option v-for="item in staffdata" :key="item.sid" :label="item.name" :value="item.sid"/>
|
<el-option v-for="item in staffdata" :key="item.sid" :label="item.name" :value="item.sid" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
<td>分管人员</td>
|
<td>分管人员</td>
|
||||||
<td>
|
<td>
|
||||||
<el-select v-model="fgStaffSid" style="width:300px" filterable multiple>
|
<el-select v-model="fgStaffSid" style="width:300px" filterable multiple>
|
||||||
<el-option v-for="item in staffdata2" :key="item.sid" :label="item.name" :value="item.sid"/>
|
<el-option v-for="item in staffdata2" :key="item.sid" :label="item.name" :value="item.sid" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -230,8 +236,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>管理层级</td>
|
<td>管理层级</td>
|
||||||
<td>
|
<td>
|
||||||
<el-select v-model="form.orgLevelValue" style="width:300px" placeholder="请选择" filterable @change="changeOrgLevel">
|
<el-select v-model="form.orgLevelValue" style="width:300px" placeholder="请选择" filterable
|
||||||
<el-option v-for="item in orgLevel_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
@change="changeOrgLevel">
|
||||||
|
<el-option v-for="item in orgLevel_list" :key="item.dictKey" :label="item.dictValue"
|
||||||
|
:value="item.dictValue"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
<td>其他编码</td>
|
<td>其他编码</td>
|
||||||
@@ -247,7 +255,8 @@
|
|||||||
<td>组织属性</td>
|
<td>组织属性</td>
|
||||||
<td>
|
<td>
|
||||||
<el-select v-model="form.orgAttributeValue" placeholder="请选择" filterable @change="changeOrgAttribute">
|
<el-select v-model="form.orgAttributeValue" placeholder="请选择" filterable @change="changeOrgAttribute">
|
||||||
<el-option v-for="item in orgAttribute_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
<el-option v-for="item in orgAttribute_list" :key="item.dictKey" :label="item.dictValue"
|
||||||
|
:value="item.dictValue"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -281,380 +290,406 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
addOrgTree,
|
addOrgTree,
|
||||||
delOrgtree,
|
delOrgtree,
|
||||||
getQrCode, getStaff,
|
getQrCode,
|
||||||
getStaffName,
|
getStaff,
|
||||||
orgList,
|
getStaffName,
|
||||||
pageList,
|
orgList,
|
||||||
postOrgtree,
|
pageList,
|
||||||
putOrgtree,
|
postOrgtree,
|
||||||
selectBySid
|
putOrgtree,
|
||||||
} from '@/api/system/departments/departments.js'
|
selectBySid
|
||||||
import { typeValues } from '@/api/system/roleAdminister/index'
|
} from '@/api/system/departments/departments.js'
|
||||||
import Position from '@/components/amap/amap.vue'
|
import {
|
||||||
|
typeValues
|
||||||
|
} from '@/api/system/roleAdminister/index'
|
||||||
|
import Position from '@/components/amap/amap.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Position },
|
components: {
|
||||||
data() {
|
Position
|
||||||
return {
|
},
|
||||||
dialogVisible: false,
|
data() {
|
||||||
mapDialog: false,
|
return {
|
||||||
dialogTitle: '',
|
dialogVisible: false,
|
||||||
props: {
|
mapDialog: false,
|
||||||
label: 'name',
|
dialogTitle: '',
|
||||||
children: 'children'
|
props: {
|
||||||
},
|
label: 'name',
|
||||||
nodeForm: {
|
children: 'children'
|
||||||
sid: '',
|
},
|
||||||
name: '',
|
nodeForm: {
|
||||||
sortNo: ''
|
sid: '',
|
||||||
},
|
|
||||||
ewmForm: {
|
|
||||||
qrFilePath: '',
|
|
||||||
organizationName: '',
|
|
||||||
departmentName: '',
|
|
||||||
address: ''
|
|
||||||
},
|
|
||||||
orgAttribute_list: [],
|
|
||||||
orgLevel_list: [],
|
|
||||||
form: {
|
|
||||||
sid: '',
|
|
||||||
name: '',
|
|
||||||
orgCode: '',
|
|
||||||
/* jwd: '',*/
|
|
||||||
addrs: '',
|
|
||||||
zgStaffSid: '',
|
|
||||||
zgStaffName: '',
|
|
||||||
fgStaffSid: '',
|
|
||||||
fgStaffName: '',
|
|
||||||
linkPerson: '',
|
|
||||||
linkPhone: '',
|
|
||||||
sort: '',
|
|
||||||
isDept: '',
|
|
||||||
orgAbbre: '',
|
|
||||||
orgAttributeValue: '',
|
|
||||||
orgAttributeKey: '',
|
|
||||||
orgLevelValue: '',
|
|
||||||
orgLevelKey: '',
|
|
||||||
otherCode: ''
|
|
||||||
},
|
|
||||||
fgStaffSid: [],
|
|
||||||
formBackup: Object.assign({}, this.form),
|
|
||||||
isshow: 'table',
|
|
||||||
page: {
|
|
||||||
total: 0, // 默认数据总数
|
|
||||||
current: 1, // 默认开始页面
|
|
||||||
size: 10, // 每页的数据条数
|
|
||||||
params: {
|
|
||||||
name: '',
|
name: '',
|
||||||
organizationSid: '',
|
sortNo: ''
|
||||||
psid: ''
|
},
|
||||||
|
ewmForm: {
|
||||||
|
qrFilePath: '',
|
||||||
|
organizationName: '',
|
||||||
|
departmentName: '',
|
||||||
|
address: ''
|
||||||
|
},
|
||||||
|
orgAttribute_list: [],
|
||||||
|
orgLevel_list: [],
|
||||||
|
form: {
|
||||||
|
sid: '',
|
||||||
|
name: '',
|
||||||
|
orgCode: '',
|
||||||
|
/* jwd: '',*/
|
||||||
|
addrs: '',
|
||||||
|
zgStaffSid: '',
|
||||||
|
zgStaffName: '',
|
||||||
|
fgStaffSid: '',
|
||||||
|
fgStaffName: '',
|
||||||
|
linkPerson: '',
|
||||||
|
linkPhone: '',
|
||||||
|
sort: '',
|
||||||
|
isDept: '',
|
||||||
|
orgAbbre: '',
|
||||||
|
orgAttributeValue: '',
|
||||||
|
orgAttributeKey: '',
|
||||||
|
orgLevelValue: '',
|
||||||
|
orgLevelKey: '',
|
||||||
|
otherCode: ''
|
||||||
|
},
|
||||||
|
fgStaffSid: [],
|
||||||
|
formBackup: Object.assign({}, this.form),
|
||||||
|
isshow: 'table',
|
||||||
|
page: {
|
||||||
|
total: 0, // 默认数据总数
|
||||||
|
current: 1, // 默认开始页面
|
||||||
|
size: 10, // 每页的数据条数
|
||||||
|
params: {
|
||||||
|
name: '',
|
||||||
|
organizationSid: '',
|
||||||
|
psid: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
treedata: [],
|
||||||
|
staffdata: [],
|
||||||
|
staffdata2: [],
|
||||||
|
rules: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getOrgTree()
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
typeValues({
|
||||||
|
type: 'orgAttribute'
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.orgAttribute_list = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
typeValues({
|
||||||
|
type: 'orgLevel'
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.orgLevel_list = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
changeOrgLevel(value) {
|
||||||
|
let bb = null
|
||||||
|
this.orgLevel_list.forEach((e) => {
|
||||||
|
if (e.dictValue === value) {
|
||||||
|
bb = {
|
||||||
|
value: e.dictValue,
|
||||||
|
key: e.dictKey
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.form.orgLevelValue = bb.value
|
||||||
|
this.form.orgLevelKey = bb.key
|
||||||
|
},
|
||||||
|
changeOrgAttribute(value) {
|
||||||
|
let bb = null
|
||||||
|
this.orgAttribute_list.forEach((e) => {
|
||||||
|
if (e.dictValue === value) {
|
||||||
|
bb = {
|
||||||
|
key: e.dictKey,
|
||||||
|
value: e.dictValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.form.orgAttributeKey = bb.key
|
||||||
|
},
|
||||||
|
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.organizationSid = window.sessionStorage.getItem('orgSid')
|
||||||
|
this.page.params.psid = data.sid || 0
|
||||||
|
|
||||||
|
this.getPageList(this.page)
|
||||||
|
},
|
||||||
|
getPageList(data) { // 获取树形列表
|
||||||
|
pageList(data).then(res => {
|
||||||
|
console.log('返回子级:', res)
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.page.total = res.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getOrgTree() { // 获取树形列表
|
||||||
|
orgList(window.sessionStorage.getItem('orgSid')).then(res => {
|
||||||
|
this.treedata = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
save() {
|
||||||
|
if (this.fgStaffSid.length > 0) {
|
||||||
|
this.form.fgStaffSid = this.fgStaffSid.join()
|
||||||
|
} else {
|
||||||
|
this.form.fgStaffName = ''
|
||||||
|
this.form.fgStaffSid = ''
|
||||||
|
}
|
||||||
|
// this.form.organizationSid = this.$store.getters.userInfo.orgSid
|
||||||
|
this.form.organizationSid = window.sessionStorage.getItem('orgSid')
|
||||||
|
// this.form.dlxx = typeof(this.form.dlxx) == 'string' ? this.form.dlxx : this.form.dlxx.join()
|
||||||
|
if (this.form.sid) {
|
||||||
|
// console.log(this.form)
|
||||||
|
putOrgtree(this.form).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.isshow = 'table'
|
||||||
|
this.getOrgTree()
|
||||||
|
this.handleNodeClick({
|
||||||
|
sid: this.form.psid
|
||||||
|
})
|
||||||
|
this.$message({
|
||||||
|
message: res.msg,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addOrgTree(this.form).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.isshow = 'table'
|
||||||
|
this.getOrgTree()
|
||||||
|
this.handleNodeClick({
|
||||||
|
sid: this.form.psid
|
||||||
|
})
|
||||||
|
this.$message({
|
||||||
|
message: res.msg,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tableData: [],
|
append(data) {
|
||||||
treedata: [],
|
console.log(123456789, data)
|
||||||
staffdata: [],
|
this.dialogTitle = '新增'
|
||||||
staffdata2: [],
|
this.isshow = 'edit'
|
||||||
rules: {}
|
this.fgStaffSid = []
|
||||||
}
|
this.form = Object.assign({}, this.formBackup)
|
||||||
},
|
this.form.psid = data.sid || 0
|
||||||
mounted() {
|
// this.form.organizationSid = this.$store.getters.userInfo.orgSid
|
||||||
this.getOrgTree()
|
this.form.organizationSid = window.sessionStorage.getItem('orgSid')
|
||||||
this.init()
|
this.form.address = data.orgAddress || data.address
|
||||||
},
|
this.form.dlxx = data.gisInfo || data.dlxx
|
||||||
methods: {
|
this.getStaff(data.sid)
|
||||||
init() {
|
this.getStaff2(data.sid)
|
||||||
typeValues({ type: 'orgAttribute' }).then((res) => {
|
},
|
||||||
if (res.success) {
|
editRow(row) {
|
||||||
this.orgAttribute_list = res.data
|
this.getStaff(row.sid)
|
||||||
}
|
this.getStaff2(row.sid)
|
||||||
})
|
this.dialogTitle = '编辑'
|
||||||
typeValues({ type: 'orgLevel' }).then((res) => {
|
this.isshow = 'edit'
|
||||||
if (res.success) {
|
this.fgStaffSid = []
|
||||||
this.orgLevel_list = res.data
|
selectBySid(row.sid).then((response) => {
|
||||||
}
|
if (response.success) {
|
||||||
})
|
this.form = response.data
|
||||||
},
|
this.form.fgStaffName = response.data.fgNames
|
||||||
changeOrgLevel(value) {
|
this.form.fgStaffSid = response.data.fgStaffSid
|
||||||
let bb = null
|
if (this.form.fgStaffSid) {
|
||||||
this.orgLevel_list.forEach((e) => {
|
this.fgStaffSid = response.data.fgStaffSid.split(',')
|
||||||
if (e.dictValue === value) {
|
}
|
||||||
bb = {
|
this.form.zgStaffName = response.data.zgNames
|
||||||
value: e.dictValue,
|
this.form.zgStaffSid = response.data.zgStaffSid
|
||||||
key: e.dictKey
|
console.log('编辑回显的数据', this.form)
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.form.orgLevelValue = bb.value
|
|
||||||
this.form.orgLevelKey = bb.key
|
|
||||||
},
|
|
||||||
changeOrgAttribute(value) {
|
|
||||||
let bb = null
|
|
||||||
this.orgAttribute_list.forEach((e) => {
|
|
||||||
if (e.dictValue === value) {
|
|
||||||
bb = {
|
|
||||||
key: e.dictKey,
|
|
||||||
value: e.dictValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.form.orgAttributeKey = bb.key
|
|
||||||
},
|
|
||||||
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
|
|
||||||
|
|
||||||
this.getPageList(this.page)
|
|
||||||
},
|
|
||||||
getPageList(data) { // 获取树形列表
|
|
||||||
pageList(data).then(res => {
|
|
||||||
console.log('返回子级:',res)
|
|
||||||
this.tableData = res.data.records
|
|
||||||
this.page.total = res.data.total
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getOrgTree() { // 获取树形列表
|
|
||||||
orgList({}).then(res => {
|
|
||||||
this.treedata = res.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
save() {
|
|
||||||
if (this.fgStaffSid.length > 0) {
|
|
||||||
this.form.fgStaffSid = this.fgStaffSid.join()
|
|
||||||
} else {
|
|
||||||
this.form.fgStaffName = ''
|
|
||||||
this.form.fgStaffSid = ''
|
|
||||||
}
|
|
||||||
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) {
|
|
||||||
// console.log(this.form)
|
|
||||||
putOrgtree(this.form).then(res => {
|
|
||||||
if (res.success) {
|
|
||||||
this.isshow = 'table'
|
|
||||||
this.getOrgTree()
|
|
||||||
this.handleNodeClick({ sid: this.form.psid })
|
|
||||||
this.$message({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
},
|
||||||
addOrgTree(this.form).then(res => {
|
deit(data) { // 节点编辑保存
|
||||||
if (res.success) {
|
this.getStaff(data.sid)
|
||||||
this.isshow = 'table'
|
this.getStaff2(data.sid)
|
||||||
this.getOrgTree()
|
console.log(data, 8888)
|
||||||
this.handleNodeClick({ sid: this.form.psid })
|
this.dialogVisible = true
|
||||||
this.$message({
|
this.form.sid = data.sid
|
||||||
message: res.msg,
|
// this.form.psid = null
|
||||||
type: 'success'
|
this.form.name = data.name
|
||||||
})
|
this.form.orgCode = data.orgCode
|
||||||
}
|
/* this.form.jwd = data.jwd*/
|
||||||
})
|
this.form.addrs = data.addrs
|
||||||
}
|
this.form.linkPerson = data.linkPerson
|
||||||
},
|
this.form.linkPhone = data.linkPhone
|
||||||
append(data) {
|
this.form.sort = data.sort
|
||||||
console.log(123456789, data)
|
this.form.zgStaffSid = data.zgSids
|
||||||
this.dialogTitle = '新增'
|
this.form.fgStaffSid = data.fgSids.split(',')
|
||||||
this.isshow = 'edit'
|
},
|
||||||
this.fgStaffSid = []
|
nodeSave() { // 节点编辑保存
|
||||||
this.form = Object.assign({}, this.formBackup)
|
console.log('这是保存nodeSave(0')
|
||||||
this.form.psid = data.sid || 0
|
this.form.fgStaffSid = this.form.fgStaffSid.join()
|
||||||
this.form.organizationSid = this.$store.getters.userInfo.orgSid
|
postOrgtree(this.form).then(res => {
|
||||||
this.form.address = data.orgAddress || data.address
|
|
||||||
this.form.dlxx = data.gisInfo || data.dlxx
|
|
||||||
this.getStaff(data.sid)
|
|
||||||
this.getStaff2(data.sid)
|
|
||||||
},
|
|
||||||
editRow(row) {
|
|
||||||
this.getStaff(row.sid)
|
|
||||||
this.getStaff2(row.sid)
|
|
||||||
this.dialogTitle = '编辑'
|
|
||||||
this.isshow = 'edit'
|
|
||||||
this.fgStaffSid = []
|
|
||||||
selectBySid(row.sid).then((response) => {
|
|
||||||
if (response.success) {
|
|
||||||
this.form = response.data
|
|
||||||
this.form.fgStaffName = response.data.fgNames
|
|
||||||
this.form.fgStaffSid = response.data.fgStaffSid
|
|
||||||
if (this.form.fgStaffSid) {
|
|
||||||
this.fgStaffSid = response.data.fgStaffSid.split(',')
|
|
||||||
}
|
|
||||||
this.form.zgStaffName = response.data.zgNames
|
|
||||||
this.form.zgStaffSid = response.data.zgStaffSid
|
|
||||||
console.log('编辑回显的数据', this.form)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
deit(data) { // 节点编辑保存
|
|
||||||
this.getStaff(data.sid)
|
|
||||||
this.getStaff2(data.sid)
|
|
||||||
console.log(data, 8888)
|
|
||||||
this.dialogVisible = true
|
|
||||||
this.form.sid = data.sid
|
|
||||||
// this.form.psid = null
|
|
||||||
this.form.name = data.name
|
|
||||||
this.form.orgCode = data.orgCode
|
|
||||||
/* this.form.jwd = data.jwd*/
|
|
||||||
this.form.addrs = data.addrs
|
|
||||||
this.form.linkPerson = data.linkPerson
|
|
||||||
this.form.linkPhone = data.linkPhone
|
|
||||||
this.form.sort = data.sort
|
|
||||||
this.form.zgStaffSid = data.zgSids
|
|
||||||
this.form.fgStaffSid = data.fgSids.split(',')
|
|
||||||
},
|
|
||||||
nodeSave() { // 节点编辑保存
|
|
||||||
console.log('这是保存nodeSave(0')
|
|
||||||
this.form.fgStaffSid = this.form.fgStaffSid.join()
|
|
||||||
postOrgtree(this.form).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.getOrgTree()
|
||||||
this.handleNodeClick({ sid: data.psid })
|
this.dialogVisible = false
|
||||||
this.$message({
|
this.$message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
},
|
||||||
},
|
remove(data) {
|
||||||
lookRow(row) { // 查看二维码
|
this.$confirm('确定要删除该组织吗, 是否继续?', '提示', {
|
||||||
this.isshow = 'ewm'
|
confirmButtonText: '确定',
|
||||||
getQrCode({ sid: row.sid }).then(res => {
|
cancelButtonText: '取消',
|
||||||
this.ewmForm = res.data
|
type: 'warning'
|
||||||
})
|
}).then(() => {
|
||||||
},
|
delOrgtree({
|
||||||
Printewm() {
|
sid: data.sid
|
||||||
this.$print(this.$refs.print) // 使用
|
}).then(res => {
|
||||||
},
|
this.getOrgTree()
|
||||||
mouseenter(data) {
|
this.handleNodeClick({
|
||||||
this.$set(data, 'del', true)
|
sid: data.psid
|
||||||
},
|
})
|
||||||
mouseleave(data) {
|
this.$message({
|
||||||
this.$set(data, 'del', false)
|
message: res.msg,
|
||||||
},
|
type: 'success'
|
||||||
onSearch() {
|
})
|
||||||
this.getPageList(this.page)
|
})
|
||||||
},
|
})
|
||||||
resetSearch() {
|
},
|
||||||
this.page.params.name = ''
|
lookRow(row) { // 查看二维码
|
||||||
this.getPageList(this.page)
|
this.isshow = 'ewm'
|
||||||
},
|
getQrCode({
|
||||||
// 主管人员
|
sid: row.sid
|
||||||
getStaff(orgSid) {
|
}).then(res => {
|
||||||
getStaff({ deptSid: orgSid }).then((res) => {
|
this.ewmForm = res.data
|
||||||
if (res.success) {
|
})
|
||||||
this.staffdata = res.data
|
},
|
||||||
}
|
Printewm() {
|
||||||
})
|
this.$print(this.$refs.print) // 使用
|
||||||
},
|
},
|
||||||
// 分管人员
|
mouseenter(data) {
|
||||||
getStaff2(orgSid) {
|
this.$set(data, 'del', true)
|
||||||
getStaffName({ deptSid: orgSid }).then(res => {
|
},
|
||||||
this.staffdata2 = res.data
|
mouseleave(data) {
|
||||||
console.log('分管人员', this.staffdata2)
|
this.$set(data, 'del', false)
|
||||||
})
|
},
|
||||||
|
onSearch() {
|
||||||
|
this.getPageList(this.page)
|
||||||
|
},
|
||||||
|
resetSearch() {
|
||||||
|
this.page.params.name = ''
|
||||||
|
this.getPageList(this.page)
|
||||||
|
},
|
||||||
|
// 主管人员
|
||||||
|
getStaff(orgSid) {
|
||||||
|
getStaff({
|
||||||
|
deptSid: orgSid
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.staffdata = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 分管人员
|
||||||
|
getStaff2(orgSid) {
|
||||||
|
getStaffName({
|
||||||
|
deptSid: orgSid
|
||||||
|
}).then(res => {
|
||||||
|
this.staffdata2 = res.data
|
||||||
|
console.log('分管人员', this.staffdata2)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.el-icon-arrow-right:before {
|
.el-icon-arrow-right:before {
|
||||||
content: '\e6e0';
|
content: '\e6e0';
|
||||||
color: #727272;
|
color: #727272;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped="scoped" lang="scss">
|
<style scoped="scoped" lang="scss">
|
||||||
.org-tree {
|
.org-tree {
|
||||||
width: 240px;
|
width: 240px;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
/*padding-right: 10px;*/
|
/*padding-right: 10px;*/
|
||||||
border: 1px solid #edf1f7;
|
border: 1px solid #edf1f7;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
}
|
|
||||||
|
|
||||||
.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 {
|
.org-table {
|
||||||
margin: 30px auto 0;
|
flex: 1;
|
||||||
/*width:750px;*/
|
// padding-left: 10px;
|
||||||
}
|
margin: 0 10px;
|
||||||
}
|
border: 1px solid #edf1f7;
|
||||||
|
min-height: 100%;
|
||||||
|
overflow-y: scroll;
|
||||||
|
|
||||||
.custom-tree-node {
|
.ewm {
|
||||||
position: relative;
|
margin: 30px auto 0;
|
||||||
overflow: hidden;
|
width: 560px;
|
||||||
width: 100%;
|
}
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
font-size: 14px;
|
|
||||||
padding-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.handle {
|
.ediut {
|
||||||
position: absolute;
|
margin: 30px auto 0;
|
||||||
right: 0;
|
/*width:750px;*/
|
||||||
|
}
|
||||||
.el-button--text {
|
|
||||||
font-size: 15px;
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.my-tabs {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.edit {
|
|
||||||
.el-form-item__label {
|
|
||||||
width: 100px !important;
|
|
||||||
display: inline-block !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input {
|
.custom-tree-node {
|
||||||
width: 70%;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.td_left {
|
.handle {
|
||||||
border-left: 0 solid #e6e9f0;
|
position: absolute;
|
||||||
}
|
right: 0;
|
||||||
|
|
||||||
|
.el-button--text {
|
||||||
|
font-size: 15px;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-tabs {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit {
|
||||||
|
.el-form-item__label {
|
||||||
|
width: 100px !important;
|
||||||
|
display: inline-block !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input {
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.td_left {
|
||||||
|
border-left: 0 solid #e6e9f0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -42,18 +42,16 @@
|
|||||||
<el-table-column prop="postLevel" label="职级" align="center"></el-table-column>
|
<el-table-column prop="postLevel" label="职级" align="center"></el-table-column>
|
||||||
<!-- <el-table-column prop="orgName" label="所属部门" align="center"></el-table-column> -->
|
<!-- <el-table-column prop="orgName" label="所属部门" align="center"></el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
|
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" />
|
||||||
|
|
||||||
<!-- 编辑岗位信息 -->
|
<!-- 编辑岗位信息 -->
|
||||||
<el-dialog :title="dialogTitle + '岗位信息'" :visible.sync="editDialog" width="40%">
|
<el-dialog :title="dialogTitle + '岗位信息'" :visible.sync="editDialog" width="40%">
|
||||||
<table class="e-table" cellspacing="0">
|
<table class="e-table" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>上级岗位</td>
|
<td>上级岗位</td>
|
||||||
<td> <!-- @change="changeParentSid" -->
|
<td> <!-- @change="changeParentSid" -->
|
||||||
<el-select v-model="roleForm.parentSid" filterable clearable placeholder="请选择"
|
<el-select v-model="roleForm.parentSid" filterable clearable placeholder="请选择" style="width:300px">
|
||||||
style="width:300px">
|
<el-option v-for="item in parentSidList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||||
<el-option v-for="item in parentSidList" :key="item.sid" :label="item.name"
|
|
||||||
:value="item.sid">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
@@ -67,14 +65,16 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>岗位职级</td>
|
<td>岗位职级</td>
|
||||||
<td>
|
<td>
|
||||||
<el-select v-model="roleForm.postLevel" @change="changeUPpostLevel" filterable placeholder="请选择" style="width:300px">
|
<el-select v-model="roleForm.postLevel" @change="changeUPpostLevel" filterable placeholder="请选择"
|
||||||
<el-option v-for="item in postLevelList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
|
style="width:300px">
|
||||||
</el-option>
|
<el-option v-for="item in postLevelList" :key="item.dictKey" :label="item.dictValue"
|
||||||
|
:value="item.dictKey">
|
||||||
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>岗位编码</td>
|
<td>岗位编码</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="roleForm.postCode" style="width:300px"></el-input>
|
<el-input v-model="roleForm.postCode" style="width:300px"></el-input>
|
||||||
</td>
|
</td>
|
||||||
@@ -116,11 +116,9 @@
|
|||||||
<table class="e-table" cellspacing="0">
|
<table class="e-table" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>上级岗位</td>
|
<td>上级岗位</td>
|
||||||
<td> <!-- @change="changeParentSid" -->
|
<td> <!-- @change="changeParentSid" -->
|
||||||
<el-select v-model="roleForm.parentSid" filterable clearable placeholder="请选择"
|
<el-select v-model="roleForm.parentSid" filterable clearable placeholder="请选择" style="width:300px">
|
||||||
style="width:300px">
|
<el-option v-for="item in parentSidList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||||
<el-option v-for="item in parentSidList" :key="item.sid" :label="item.name"
|
|
||||||
:value="item.sid">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
@@ -135,9 +133,9 @@
|
|||||||
<td>岗位职级</td>
|
<td>岗位职级</td>
|
||||||
<td>
|
<td>
|
||||||
<el-select v-model="roleForm.postLevel" @change="changePostLevel" filterable placeholder="请选择"
|
<el-select v-model="roleForm.postLevel" @change="changePostLevel" filterable placeholder="请选择"
|
||||||
style="width:300px">
|
style="width:300px">
|
||||||
<el-option v-for="item in postLevelList" :key="item.dictKey" :label="item.dictValue"
|
<el-option v-for="item in postLevelList" :key="item.dictKey" :label="item.dictValue"
|
||||||
:value="item.dictKey">
|
:value="item.dictKey">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
@@ -179,30 +177,38 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {delOrgroles, orgList, pageList, pullDown, putOrgroles, savePost,selectList} from '@/api/system/postManage/index.js'
|
import {
|
||||||
|
delOrgroles,
|
||||||
|
orgList,
|
||||||
|
pageList,
|
||||||
|
pullDown,
|
||||||
|
putOrgroles,
|
||||||
|
savePost,
|
||||||
|
selectList
|
||||||
|
} from '@/api/system/postManage/index.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
activeName: 'roleList',
|
activeName: 'roleList',
|
||||||
roleForm: {
|
roleForm: {
|
||||||
remarks: "",
|
remarks: "",
|
||||||
roleName: "",
|
roleName: "",
|
||||||
postCode: '',
|
postCode: '',
|
||||||
orgSid: '',
|
orgSid: '',
|
||||||
postLevel: '',
|
postLevel: '',
|
||||||
postLevelKey: '',
|
postLevelKey: '',
|
||||||
parentSid:''
|
parentSid: ''
|
||||||
},
|
},
|
||||||
formBackup: {},
|
formBackup: {},
|
||||||
search: {
|
search: {
|
||||||
name: '',
|
name: '',
|
||||||
orgSid: ''
|
orgSid: window.sessionStorage.getItem('orgSid')
|
||||||
},
|
},
|
||||||
orgName: '',
|
orgName: '',
|
||||||
page: {
|
page: {
|
||||||
total: 0, // 默认数据总数
|
total: 0, // 默认数据总数
|
||||||
current: 1, // 默认开始页面
|
current: 1, // 默认开始页面
|
||||||
size: 10, // 每页的数据条数
|
size: 10, // 每页的数据条数
|
||||||
},
|
},
|
||||||
@@ -214,25 +220,25 @@ export default {
|
|||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
},
|
},
|
||||||
// orgdata:[], // 部门
|
// orgdata:[], // 部门
|
||||||
checkedId: [],
|
checkedId: [],
|
||||||
checkedId1: [],
|
checkedId1: [],
|
||||||
checkedId2: [],
|
checkedId2: [],
|
||||||
treedata: [],
|
treedata: [],
|
||||||
treedata1: [],
|
treedata1: [],
|
||||||
treedata2: [],
|
treedata2: [],
|
||||||
postLevelList: [],
|
postLevelList: [],
|
||||||
parentSidList: [],
|
parentSidList: [],
|
||||||
// chace: [],
|
// chace: [],
|
||||||
// roleDialog: false,
|
// roleDialog: false,
|
||||||
// Thisrow: {},
|
// Thisrow: {},
|
||||||
// orgListAll:[]
|
// orgListAll:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.formBackup = Object.assign({}, this.roleForm),
|
this.formBackup = Object.assign({}, this.roleForm),
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getOrgList()
|
// this.getOrgList()
|
||||||
this.postLevel()
|
this.postLevel()
|
||||||
this.getParent()
|
this.getParent()
|
||||||
},
|
},
|
||||||
@@ -254,21 +260,24 @@ export default {
|
|||||||
this.roleTable = res.data.records
|
this.roleTable = res.data.records
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
postLevel(){
|
postLevel() {
|
||||||
pullDown({ psid: 0, type: 'postLevel' }).then((res)=>{
|
pullDown({
|
||||||
if(res.code==='200'){
|
psid: 0,
|
||||||
this.postLevelList=res.data
|
type: 'postLevel'
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === '200') {
|
||||||
|
this.postLevelList = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getParent(){
|
getParent() {
|
||||||
selectList().then((res)=>{
|
selectList().then((res) => {
|
||||||
if(res.code==='200'){
|
if (res.code === '200') {
|
||||||
this.parentSidList=res.data
|
this.parentSidList = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changePostLevel(value){
|
changePostLevel(value) {
|
||||||
let bb = null
|
let bb = null
|
||||||
this.postLevelList.forEach((e) => {
|
this.postLevelList.forEach((e) => {
|
||||||
if (e.dictKey == value) {
|
if (e.dictKey == value) {
|
||||||
@@ -278,10 +287,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.roleForm.postLevel=bb.name
|
this.roleForm.postLevel = bb.name
|
||||||
this.roleForm.postLevelKey=bb.value
|
this.roleForm.postLevelKey = bb.value
|
||||||
},
|
},
|
||||||
changeUPpostLevel(value){
|
changeUPpostLevel(value) {
|
||||||
let bb = null
|
let bb = null
|
||||||
this.postLevelList.forEach((e) => {
|
this.postLevelList.forEach((e) => {
|
||||||
if (e.dictKey == value) {
|
if (e.dictKey == value) {
|
||||||
@@ -291,8 +300,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.roleForm.postLevel=bb.name
|
this.roleForm.postLevel = bb.name
|
||||||
this.roleForm.postLevelKey=bb.value
|
this.roleForm.postLevelKey = bb.value
|
||||||
},
|
},
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
if (tab.name == 'addrole') {
|
if (tab.name == 'addrole') {
|
||||||
@@ -359,6 +368,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.reset()
|
this.reset()
|
||||||
|
this.getParent()
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.roleForm = {
|
this.roleForm = {
|
||||||
@@ -376,76 +386,76 @@ export default {
|
|||||||
getOrgList(row) {
|
getOrgList(row) {
|
||||||
this.roleDialog = true
|
this.roleDialog = true
|
||||||
this.checkedId = []
|
this.checkedId = []
|
||||||
// this.roleForm.roleName = row.roleName
|
// this.roleForm.roleName = row.roleName
|
||||||
this.Thisrow = row
|
this.Thisrow = row
|
||||||
this.loading = true
|
this.loading = true
|
||||||
let params = {
|
let params = {
|
||||||
// roleSid: row.sid,
|
// roleSid: row.sid,
|
||||||
// userType: '2'
|
// userType: '2'
|
||||||
}
|
}
|
||||||
|
|
||||||
orgList(params).then(res => {
|
orgList(params).then(res => {
|
||||||
this.treedata = res.data
|
this.treedata = res.data
|
||||||
this.treedata1 = res.data
|
this.treedata1 = res.data
|
||||||
this.treedata2 = res.data
|
this.treedata2 = res.data
|
||||||
// this.getTreeParentNode(res.data, this.checkedId)
|
// this.getTreeParentNode(res.data, this.checkedId)
|
||||||
// this.getTreeParentid(res.data)
|
// this.getTreeParentid(res.data)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// // 递归查询所有上级数据
|
// // 递归查询所有上级数据
|
||||||
// getTreeParentNode(menus, ids) {
|
// getTreeParentNode(menus, ids) {
|
||||||
// for (var i = 0; i < menus.length; i++) {
|
// for (var i = 0; i < menus.length; i++) {
|
||||||
// if (menus[i].children && menus[i].children.length != 0) {
|
// if (menus[i].children && menus[i].children.length != 0) {
|
||||||
// this.getTreeParentNode(menus[i].children, ids)
|
// this.getTreeParentNode(menus[i].children, ids)
|
||||||
// } else if (menus[i].isCheck) {
|
// } else if (menus[i].isCheck) {
|
||||||
// ids.push(menus[i].sid)
|
// ids.push(menus[i].sid)
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
// // 所有一级菜单ID
|
// // 所有一级菜单ID
|
||||||
// getTreeParentid(menus) {
|
// getTreeParentid(menus) {
|
||||||
// for (var i = 0; i < menus.length; i++) {
|
// for (var i = 0; i < menus.length; i++) {
|
||||||
// this.chace.push(menus[i].sid)
|
// this.chace.push(menus[i].sid)
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
// getCheckedKeys() {
|
// getCheckedKeys() {
|
||||||
// let _this = this
|
// let _this = this
|
||||||
// let roleMenus = []
|
// let roleMenus = []
|
||||||
// this.$refs.Tree.getCheckedKeys().forEach(val => {
|
// this.$refs.Tree.getCheckedKeys().forEach(val => {
|
||||||
// roleMenus.push({
|
// roleMenus.push({
|
||||||
// menuSid: val,
|
// menuSid: val,
|
||||||
// orgSid: _this.$store.getters.userInfo.orgSid,
|
// orgSid: _this.$store.getters.userInfo.orgSid,
|
||||||
// roleSid: _this.Thisrow.sid
|
// roleSid: _this.Thisrow.sid
|
||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
// let parentTrue = this.$refs.Tree.getHalfCheckedKeys()
|
// let parentTrue = this.$refs.Tree.getHalfCheckedKeys()
|
||||||
// for (let i = 0; i < parentTrue.length; i++) {
|
// for (let i = 0; i < parentTrue.length; i++) {
|
||||||
// for (let j = 0; j < this.chace.length; j++) {
|
// for (let j = 0; j < this.chace.length; j++) {
|
||||||
// if (parentTrue[i] == this.chace[j]) {
|
// if (parentTrue[i] == this.chace[j]) {
|
||||||
// parentTrue.splice(i, 1);
|
// parentTrue.splice(i, 1);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// parentTrue.forEach(val => {
|
// parentTrue.forEach(val => {
|
||||||
// roleMenus.push({
|
// roleMenus.push({
|
||||||
// menuSid: val,
|
// menuSid: val,
|
||||||
// orgSid: _this.$store.getters.userInfo.orgSid,
|
// orgSid: _this.$store.getters.userInfo.orgSid,
|
||||||
// roleSid: _this.Thisrow.sid
|
// roleSid: _this.Thisrow.sid
|
||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
// saveorgrolemenus({
|
// saveorgrolemenus({
|
||||||
// roleSid: _this.Thisrow.sid,
|
// roleSid: _this.Thisrow.sid,
|
||||||
// roleMenus: roleMenus
|
// roleMenus: roleMenus
|
||||||
// }).then(res => {
|
// }).then(res => {
|
||||||
// this.roleDialog = false
|
// this.roleDialog = false
|
||||||
// this.$message({
|
// this.$message({
|
||||||
// message: res.msg,
|
// message: res.msg,
|
||||||
// type: 'success'
|
// type: 'success'
|
||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
// },
|
// },
|
||||||
checkchange(data, checked, indeterminate) {
|
checkchange(data, checked, indeterminate) {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
|
|
||||||
@@ -461,7 +471,7 @@ export default {
|
|||||||
checkchange1(data, checked, indeterminate) {
|
checkchange1(data, checked, indeterminate) {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
this.roleForm.orgSid = data.sid
|
this.roleForm.orgSid = data.sid
|
||||||
// this.orgName = data.name
|
// this.orgName = data.name
|
||||||
let arr = []
|
let arr = []
|
||||||
arr = [data.sid];
|
arr = [data.sid];
|
||||||
this.$refs.Tree1.setCheckedKeys(arr);
|
this.$refs.Tree1.setCheckedKeys(arr);
|
||||||
@@ -471,7 +481,7 @@ export default {
|
|||||||
checkchange2(data, checked, indeterminate) {
|
checkchange2(data, checked, indeterminate) {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
this.roleForm.orgSid = data.sid
|
this.roleForm.orgSid = data.sid
|
||||||
// this.orgName = data.name
|
// this.orgName = data.name
|
||||||
let arr = []
|
let arr = []
|
||||||
arr = [data.sid];
|
arr = [data.sid];
|
||||||
this.$refs.Tree2.setCheckedKeys(arr);
|
this.$refs.Tree2.setCheckedKeys(arr);
|
||||||
@@ -490,7 +500,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-select > .el-input {
|
.el-select>.el-input {
|
||||||
display: block;
|
display: block;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,9 @@
|
|||||||
<el-tab-pane label="用户列表" name="roleList">
|
<el-tab-pane label="用户列表" name="roleList">
|
||||||
<user-manage-list :dataObj='dataObj' @status='isShow' @item='listObj'></user-manage-list>
|
<user-manage-list :dataObj='dataObj' @status='isShow' @item='listObj'></user-manage-list>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="新增用户" name="addrole">
|
<el-tab-pane label="新增用户" name="addrole">
|
||||||
<user-manage-add @status='isShow' :dataObj='childObj'></user-manage-add>
|
<user-manage-add @status='isShow' :dataObj='childObj'></user-manage-add>
|
||||||
</el-tab-pane>-->
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -37,9 +37,9 @@
|
|||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
if (tab.name == 'addrole') {
|
if (tab.name == 'addrole') {
|
||||||
this.dialogTitle = '新增'
|
this.dialogTitle = '新增'
|
||||||
// this.roleForm = Object.assign({}, this.formBackup)
|
// this.roleForm = Object.assign({}, this.formBackup)
|
||||||
} else {
|
} else {
|
||||||
// this.getroleOrgList()
|
// this.getroleOrgList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isShow(val) {
|
isShow(val) {
|
||||||
|
|||||||
@@ -1,73 +1,56 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="box-card">
|
<el-card class="box-card" style="padding-left: 50px;">
|
||||||
<table class="e-table" cellspacing="0">
|
|
||||||
<tr>
|
<el-checkbox class="checkbox" v-model="accountType" @change="canLoginChange">允许登录</el-checkbox>
|
||||||
<td>姓名</td>
|
|
||||||
<td>
|
<div style="display: flex;flex-direction: row;width: 100%;margin-top: 10px;">
|
||||||
<el-input v-model="form.name" style="width:300px"></el-input>
|
<div style="display: flex;flex-direction: row;flex: 1 ; align-items: center;">
|
||||||
</td>
|
<span style="width: 80px;text-align: right;"><span class="must">*</span> 用户名:</span>
|
||||||
</tr>
|
<el-input style="margin-left: 10px;flex: 1 " v-model="form.userName"></el-input>
|
||||||
<tr>
|
</div>
|
||||||
<td>用户类型</td>
|
<div style="display: flex;flex-direction: row;flex: 1 ;align-items: center;margin-left: 20px;">
|
||||||
<td>
|
<span style="width: 80px;text-align: right;"><span class="must">*</span> 姓名:</span>
|
||||||
<el-select v-model="form.userType" @change="$forceUpdate()" style="width:300px">
|
<el-input style="margin-left: 10px; flex: 1" v-model="form.name"></el-input>
|
||||||
<el-option v-for="(item, i) in userTypeData" :key="i" :label="item.name" :value="item.value">
|
</div>
|
||||||
</el-option>
|
</div>
|
||||||
</el-select>
|
|
||||||
</td>
|
<div style="display: flex;flex-direction: row;width: 100%;margin-top: 10px;">
|
||||||
</tr>
|
<div style="display: flex;flex-direction: row;flex: 1 ; align-items: center;">
|
||||||
<tr>
|
<span style="width: 80px;text-align: right;"><span class="must">*</span> 部门:</span>
|
||||||
<td>部门</td>
|
<el-select v-model="form.sysStaffOrg.orgName" placeholder="请选择" style="margin-left: 10px; flex: 0.8;">
|
||||||
<td>
|
<el-option hidden :key="form.sysStaffOrg.orgSid" :label="form.sysStaffOrg.orgName"
|
||||||
<el-select v-model="form.deptSid" placeholder="请选择" style="width:300px">
|
:value="form.sysStaffOrg.orgName"></el-option>
|
||||||
<el-option hidden :key="form.deptSid" :label="orgName" :value="form.deptSid"></el-option>
|
<el-tree :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
|
||||||
<el-tree :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
|
:default-checked-keys="checkedId" :default-expand-all='true' :check-strictly='true' :props="defaultProps"
|
||||||
:default-checked-keys="checkedId" :default-expand-all='true' :check-strictly='true'
|
@check-change="checkchange">
|
||||||
:props="defaultProps" @check-change="checkchange">
|
</el-tree>
|
||||||
</el-tree>
|
</el-select>
|
||||||
</el-select>
|
<el-checkbox class="checkbox" style="margin-left: 15px;" v-model="manageType"
|
||||||
<!--<el-select v-model="form.deptSid" @change="$forceUpdate()">
|
@change="manageTypeChange">主管</el-checkbox>
|
||||||
<el-option
|
</div>
|
||||||
v-for="(item, i) in treedata"
|
<div style="display: flex;flex-direction: row;flex: 1 ;align-items: center;margin-left: 20px;">
|
||||||
:key="i"
|
<span style="width: 80px;text-align: right;"><span class="must">*</span> 角色:</span>
|
||||||
:label="item.name"
|
<el-select v-model="form.roleSid" placeholder="请选择" style="margin-left: 10px; flex: 1" filterable multiple
|
||||||
:value="item.sid">
|
@change="roleChange">
|
||||||
</el-option>
|
<el-option v-for="(item,i) in roleListAll" :key="i" :label="item.name" :value="item.sid"></el-option>
|
||||||
</el-select>-->
|
</el-select>
|
||||||
</td>
|
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
</div>
|
||||||
<td>岗位</td>
|
|
||||||
<td>
|
<div style="display: flex;flex-direction: row;width: 100%;margin-top: 10px;">
|
||||||
<el-select v-model="form.postSid" @change="$forceUpdate()" style="width:300px">
|
<div style="display: flex;flex-direction: row;flex: 1 ; align-items: center;">
|
||||||
<el-option v-for="(item, i) in postSidData" :key="i" :label="item.name" :value="item.sid">
|
<span style="width: 80px;text-align: right;">备注:</span>
|
||||||
</el-option>
|
<el-input style="margin-left: 10px; flex: 0.8" v-model="form.remarks"></el-input>
|
||||||
</el-select>
|
<el-checkbox class="checkbox" style="margin-left: 15px;" v-model="userType"
|
||||||
<!--<el-input v-model="form.postSid"></el-input>-->
|
@change="supplierChange">供应商账号</el-checkbox>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<td>手机号码</td>
|
|
||||||
<td>
|
|
||||||
<el-input v-model="form.mobile" style="width:300px"></el-input>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>手机验证码</td>
|
|
||||||
<td>
|
|
||||||
<el-input v-model="form.verificationCode" placeholder="请输入验证码" style="width:300px">
|
|
||||||
<el-button v-show="showCode" slot="append" @click.native="getIdentifying">获取验证码</el-button>
|
|
||||||
<el-button v-show="!showCode" slot="append">{{phoneCodeCount}} s</el-button>
|
|
||||||
</el-input>
|
|
||||||
<!--<el-input v-model="form.verificationCode"></el-input>-->
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<div style="margin-top: 20px; text-align: center;">
|
<div style="margin-top: 20px; text-align: center;">
|
||||||
<el-button type="primary" @click="save()">保 存</el-button>
|
<el-button type="primary" @click="save()">保 存</el-button>
|
||||||
<!--<el-button type="warning" @click="cancel()">取 消</el-button>-->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -79,69 +62,107 @@
|
|||||||
userSingle,
|
userSingle,
|
||||||
orgList,
|
orgList,
|
||||||
postList,
|
postList,
|
||||||
getCode
|
getCode,
|
||||||
|
roleList,
|
||||||
} from '@/api/system/userManage/index.js'
|
} from '@/api/system/userManage/index.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
sid: '',
|
"userName": "",
|
||||||
name: '',
|
"name": "",
|
||||||
userType: '',
|
"sysStaffOrg": {
|
||||||
deptSid: '',
|
"orgSid": "",
|
||||||
postSid: '',
|
"orgName": "",
|
||||||
mobile: '',
|
"orgCode": "",
|
||||||
verificationCode: ''
|
"manageType": "3"
|
||||||
|
},
|
||||||
|
"sysUserRoles": [],
|
||||||
|
"remarks": "",
|
||||||
|
"userType": "1",
|
||||||
|
"accountType": "3",
|
||||||
|
"orgSid": window.sessionStorage.getItem('orgSid')
|
||||||
},
|
},
|
||||||
form1: {
|
accountType: false,
|
||||||
sid: '',
|
manageType: false,
|
||||||
},
|
userType: false,
|
||||||
userTypeData: [{
|
|
||||||
value: '1',
|
|
||||||
name: '员工'
|
|
||||||
}, {
|
|
||||||
value: '2',
|
|
||||||
name: '主管'
|
|
||||||
}, {
|
|
||||||
value: '3',
|
|
||||||
name: '经理'
|
|
||||||
}],
|
|
||||||
treedata: [],
|
treedata: [],
|
||||||
checkedId: [],
|
checkedId: [],
|
||||||
orgName: '',
|
// orgName: '',
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
},
|
},
|
||||||
postSidData: [],
|
roleListAll: []
|
||||||
showCode: true,
|
|
||||||
phoneCodeCount: '',
|
|
||||||
timer: null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: ['dataObj'],
|
props: ['dataObj'],
|
||||||
watch: {
|
// watch: {
|
||||||
dataObj: {
|
// dataObj: {
|
||||||
handler(val) {
|
// handler(val) {
|
||||||
this.form1.sid = val.sid
|
// this.form1.sid = val.sid
|
||||||
this.getUserSingle()
|
// this.getUserSingle()
|
||||||
this.getOrgList()
|
// this.getOrgList()
|
||||||
},
|
// },
|
||||||
deep: true,
|
// deep: true,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getOrgList()
|
this.getOrgList()
|
||||||
|
this.getRoleList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getRoleList() {
|
||||||
|
var param = {}
|
||||||
|
roleList(param).then(res => {
|
||||||
|
if (res.code === '200') {
|
||||||
|
this.roleListAll = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
canLoginChange(val) {
|
||||||
|
console.log("canLoginChange", val);
|
||||||
|
|
||||||
|
this.accountType = val
|
||||||
|
|
||||||
|
this.form.accountType = val ? "2" : "3"
|
||||||
|
|
||||||
|
},
|
||||||
|
manageTypeChange(val) {
|
||||||
|
console.log("manageTypeChange", val);
|
||||||
|
|
||||||
|
this.manageType = val
|
||||||
|
|
||||||
|
this.form.sysStaffOrg.manageType = val ? "1" : "3"
|
||||||
|
},
|
||||||
|
supplierChange(val) {
|
||||||
|
console.log("supplierChange", val);
|
||||||
|
this.userType = val
|
||||||
|
|
||||||
|
this.form.userType = val ? "3" : "1"
|
||||||
|
},
|
||||||
|
|
||||||
|
roleChange(val) {
|
||||||
|
console.log("roleChange", val);
|
||||||
|
this.form.sysUserRoles = []
|
||||||
|
for (var i = 0; i < val.length; i++) {
|
||||||
|
|
||||||
|
this.form.sysUserRoles.push({
|
||||||
|
roleSid: val[i]
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
getUserSingle() {
|
getUserSingle() {
|
||||||
userSingle(this.form1).then(res => {
|
userSingle(this.form1).then(res => {
|
||||||
if (res.code == '200') {
|
if (res.code == '200') {
|
||||||
this.form.sid = res.data.sid
|
this.form.sid = res.data.sid
|
||||||
this.form.name = res.data.name
|
this.form.name = res.data.name
|
||||||
this.form.userType = res.data.userType
|
this.form.userType = res.data.userType
|
||||||
this.form.deptSid = res.data.deptSid
|
this.form.orgSid = res.data.orgSid
|
||||||
this.orgName = res.data.departmentName
|
this.orgName = res.data.departmentName
|
||||||
this.form.postSid = res.data.postSid
|
this.form.postSid = res.data.postSid
|
||||||
this.form.mobile = res.data.mobile
|
this.form.mobile = res.data.mobile
|
||||||
@@ -149,29 +170,42 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取部门树形
|
// 获取部门树形
|
||||||
getOrgList(row) {
|
getOrgList() {
|
||||||
// this.roleDialog = true
|
// this.roleDialog = true
|
||||||
this.checkedId = []
|
this.checkedId = []
|
||||||
this.Thisrow = row
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
let params = {}
|
let params = {}
|
||||||
orgList(params).then(res => {
|
orgList(window.sessionStorage.getItem('orgSid')).then(res => {
|
||||||
this.treedata = res.data
|
this.treedata = res.data
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
treeNodeClick() {
|
||||||
|
this.$refs.el_select.visible = false
|
||||||
|
},
|
||||||
checkchange(data, checked, indeterminate) {
|
checkchange(data, checked, indeterminate) {
|
||||||
if (checked) {
|
|
||||||
|
|
||||||
this.form.deptSid = data.sid
|
console.log("checkchange", data);
|
||||||
this.orgName = data.name
|
if (checked) {
|
||||||
|
this.form.sysStaffOrg.orgSid = data.sid
|
||||||
|
this.form.sysStaffOrg.orgName = data.name
|
||||||
|
this.form.sysStaffOrg.orgCode = data.orgCode
|
||||||
let arr = []
|
let arr = []
|
||||||
arr = [data.sid];
|
arr = [data.sid];
|
||||||
this.$refs.Tree.setCheckedKeys(arr);
|
this.$refs.Tree.setCheckedKeys(arr);
|
||||||
this.form.postSid = ''
|
|
||||||
this.getPost(data.sid)
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this.form.orgSid = data.sid
|
||||||
|
// this.orgName = data.name
|
||||||
|
// let arr = []
|
||||||
|
// arr = [data.sid];
|
||||||
|
// this.$refs.Tree.setCheckedKeys(arr);
|
||||||
|
// this.form.postSid = ''
|
||||||
|
// this.getPost(data.sid)
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
getPost(orgSid) {
|
getPost(orgSid) {
|
||||||
let params = {
|
let params = {
|
||||||
@@ -182,8 +216,44 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
|
|
||||||
|
console.log("save", this.form);
|
||||||
|
|
||||||
|
if (this.form.userName == '') {
|
||||||
|
this.$message({
|
||||||
|
message: '账号不能为空',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.form.name == '') {
|
||||||
|
this.$message({
|
||||||
|
message: '姓名不能为空',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form.sysStaffOrg.orgSid == '' || this.form.sysStaffOrg.orgName == '') {
|
||||||
|
this.$message({
|
||||||
|
message: '部门不能为空',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form.sysUserRoles.length == 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '角色不能为空',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (this.form.sid) {
|
if (this.form.sid) {
|
||||||
userUpdata(this.form).then(res => {
|
userUpdatauserUpdata(this.form).then(res => {
|
||||||
if (res.code == '200') {
|
if (res.code == '200') {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
@@ -193,8 +263,6 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
let orgSid = this.$refs.Tree.getCheckedKeys()
|
|
||||||
this.form.deptSid = orgSid.toString()
|
|
||||||
userAdd(this.form).then(res => {
|
userAdd(this.form).then(res => {
|
||||||
if (res.code == '200') {
|
if (res.code == '200') {
|
||||||
this.$message({
|
this.$message({
|
||||||
@@ -210,14 +278,24 @@
|
|||||||
this.reset()
|
this.reset()
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
|
this.accountType = false
|
||||||
|
this.manageType = false
|
||||||
|
this.userType = false
|
||||||
|
|
||||||
this.form = {
|
this.form = {
|
||||||
sid: '',
|
"userName": "",
|
||||||
name: '',
|
"name": "",
|
||||||
userType: '',
|
"sysStaffOrg": {
|
||||||
deptSid: '',
|
"orgSid": "",
|
||||||
postSid: '',
|
"orgName": "",
|
||||||
mobile: '',
|
"orgCode": "",
|
||||||
verificationCode: ''
|
"manageType": "3"
|
||||||
|
},
|
||||||
|
"sysUserRoles": [],
|
||||||
|
"remarks": "",
|
||||||
|
"userType": "1",
|
||||||
|
"accountType": "3",
|
||||||
|
"orgSid": window.sessionStorage.getItem('orgSid')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//获取验证码
|
//获取验证码
|
||||||
@@ -261,4 +339,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.checkbox {
|
||||||
|
zoom: 130%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.must {
|
||||||
|
color: #f00;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,19 +7,19 @@
|
|||||||
<el-form-item label="用户名">
|
<el-form-item label="用户名">
|
||||||
<el-input v-model="page.params.userName" clearable></el-input>
|
<el-input v-model="page.params.userName" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="姓名">
|
<el-form-item label="姓名">
|
||||||
<el-input v-model="search.name" clearable></el-input>
|
<el-input v-model="page.params.name" clearable></el-input>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
<el-form-item label="角色">
|
<el-form-item label="角色">
|
||||||
<el-select v-model="page.params.roleSid" filterable clearable placeholder="请选择">
|
<el-select v-model="page.params.roleSid" filterable clearable placeholder="请选择">
|
||||||
<el-option v-for="item in roleListAll" :key="item.sid" :label="item.name" :value="item.sid"></el-option>
|
<el-option v-for="item in roleListAll" :key="item.sid" :label="item.name" :value="item.sid"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="部门"> -->
|
<!-- <el-form-item label="部门"> -->
|
||||||
<!-- <el-input v-model="page.params.orgName" clearable></el-input> -->
|
<!-- <el-input v-model="page.params.orgName" clearable></el-input> -->
|
||||||
<!-- <el-select v-model="search.roleSid" clearable placeholder="请选择">-->
|
<!-- <el-select v-model="search.roleSid" clearable placeholder="请选择">-->
|
||||||
<!-- <el-option v-for="(item,i) in roleListAll" :key="i" :label="item.name" :value="item.sid"></el-option>-->
|
<!-- <el-option v-for="(item,i) in roleListAll" :key="i" :label="item.name" :value="item.sid"></el-option>-->
|
||||||
<!-- </el-select>-->
|
<!-- </el-select>-->
|
||||||
<!-- </el-form-item> -->
|
<!-- </el-form-item> -->
|
||||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getOrgUserList(1)">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" size="small" @click="getOrgUserList(1)">查询</el-button>
|
||||||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<el-table :data="userTable" border style="width: 100%;">
|
<el-table :data="userTable" border style="width: 100%;">
|
||||||
<el-table-column label="序号" width="80px" type="index" align="center">
|
<el-table-column label="序号" width="80px" type="index" align="center">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="300px" align="center">
|
<el-table-column label="操作" width="350px" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button @click="setRole(scope.row)" type="primary" size="mini">
|
<el-button @click="setRole(scope.row)" type="primary" size="mini">
|
||||||
设置角色
|
设置角色
|
||||||
@@ -39,9 +39,12 @@
|
|||||||
<el-button @click="initPwd(scope.row)" type="danger" size="mini">
|
<el-button @click="initPwd(scope.row)" type="danger" size="mini">
|
||||||
初始化密码
|
初始化密码
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button @click="del(scope.row)" type="danger" size="mini">
|
<el-button @click="userinfoChange(scope.row)" type="primary" size="mini">
|
||||||
删除
|
编辑
|
||||||
</el-button>-->
|
</el-button>
|
||||||
|
<el-button @click="del(scope.row)" type="danger" size="mini">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="userName" label="用户名" align="center">
|
<el-table-column prop="userName" label="用户名" align="center">
|
||||||
@@ -50,10 +53,16 @@
|
|||||||
{{ scope.row.userName }}
|
{{ scope.row.userName }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="userType" label="用户类型" align="center"></el-table-column>
|
|
||||||
<el-table-column prop="name" label="姓名" align="center"></el-table-column>
|
<el-table-column prop="name" label="姓名" align="center"></el-table-column>
|
||||||
<!-- <el-table-column prop="departmentName" label="部门" align="center"></el-table-column> -->
|
<el-table-column prop="roleName" label="角色" align="center"></el-table-column>
|
||||||
<!-- <el-table-column prop="postName" label="岗位" align="center"></el-table-column> -->
|
<!-- <el-table-column label="角色名称" :formatter='sysRoleVosName'></el-table-column> -->
|
||||||
|
<!-- <el-table-column label="角色名称" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ sysRoleVosNames }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column prop="accountTypeValue" label="账户类型" align="center"></el-table-column>
|
||||||
|
<el-table-column prop="userTypeValue" label="用户类型" align="center"></el-table-column>
|
||||||
<el-table-column prop="isEnable" label="是否可用" align="center">
|
<el-table-column prop="isEnable" label="是否可用" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch v-model="scope.row.isEnable" active-value='1' inactive-value='0' active-color="#13ce66"
|
<el-switch v-model="scope.row.isEnable" active-value='1' inactive-value='0' active-color="#13ce66"
|
||||||
@@ -61,6 +70,7 @@
|
|||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" />
|
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" />
|
||||||
<!-- 角色设置 -->
|
<!-- 角色设置 -->
|
||||||
@@ -89,7 +99,7 @@
|
|||||||
:value="item.departmentSid"
|
:value="item.departmentSid"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select> -->
|
</el-select> -->
|
||||||
<el-cascader v-model="bm_Form.departmentSid" :options="treedata" :props="props"></el-cascader>
|
<!-- <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
|
<el-button type="primary" size='mini' @click="toNav('deptManage')" style="margin-left: 10px;" circle
|
||||||
icon="el-icon-plus"></el-button>
|
icon="el-icon-plus"></el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -100,59 +110,55 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 编辑信息 -->
|
<!-- 编辑信息 -->
|
||||||
<el-dialog title="编辑用户信息" :visible.sync="editDialog" width="40%">
|
<el-dialog title="编辑用户信息" :visible.sync="editDialog" width="60%">
|
||||||
<table class="e-table" cellspacing="0" style="margin-top: -30px;">
|
<el-form :model="form">
|
||||||
<tr>
|
|
||||||
<td>姓名</td>
|
<el-checkbox class="checkbox" v-model="accountType" @change="canLoginChange">允许登录</el-checkbox>
|
||||||
<td>
|
|
||||||
<el-input v-model="form.name" style="width:300px"></el-input>
|
<div style="display: flex;flex-direction: row;width: 100%;margin-top: 10px;">
|
||||||
</td>
|
<div style="display: flex;flex-direction: row;flex: 1 ; align-items: center;">
|
||||||
</tr>
|
<span style="width: 80px;text-align: right;"><span class="must">*</span> 用户名:</span>
|
||||||
<tr>
|
<el-input style="margin-left: 10px;flex: 1 " v-model="form.userName"></el-input>
|
||||||
<td>用户类型</td>
|
</div>
|
||||||
<td>
|
<div style="display: flex;flex-direction: row;flex: 1 ;align-items: center;margin-left: 20px;">
|
||||||
<el-select v-model="form.userTypeKey" @change="$forceUpdate()" style="width:300px">
|
<span style="width: 80px;text-align: right;"><span class="must">*</span> 姓名:</span>
|
||||||
<el-option v-for="(item, i) in userTypeData" :key="i" :label="item.name" :value="item.value">
|
<el-input style="margin-left: 10px; flex: 1" v-model="form.name"></el-input>
|
||||||
</el-option>
|
</div>
|
||||||
</el-select>
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<div style="display: flex;flex-direction: row;width: 100%;margin-top: 10px;">
|
||||||
<!-- <tr>
|
<div style="display: flex;flex-direction: row;flex: 1 ; align-items: center;">
|
||||||
<td>部门</td>
|
<span style="width: 80px;text-align: right;"><span class="must">*</span> 部门:</span>
|
||||||
<td>
|
<el-select v-model="form.sysStaffOrg.orgName" placeholder="请选择" style="margin-left: 10px; flex: 0.8;">
|
||||||
<el-select v-model="form.deptSid" placeholder="请选择" @change="$forceUpdate()" style="width:300px">
|
<el-option hidden :key="form.sysStaffOrg.orgSid" :label="form.sysStaffOrg.orgName"
|
||||||
<el-option hidden :key="form.deptSid" :label="orgName" :value="form.deptSid"></el-option>
|
:value="form.sysStaffOrg.orgName"></el-option>
|
||||||
<el-tree :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
|
<el-tree :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
|
||||||
:default-checked-keys="checkedId" :default-expand-all='true' :check-strictly='true'
|
:default-checked-keys="checkedId" :default-expand-all='true' :check-strictly='true'
|
||||||
:props="defaultProps" @check-change="checkchange">
|
:props="defaultProps" @check-change="checkchange">
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
<el-checkbox class="checkbox" style="margin-left: 15px;" v-model="manageType"
|
||||||
</tr> -->
|
@change="manageTypeChange">主管</el-checkbox>
|
||||||
<!-- <tr>
|
</div>
|
||||||
<td>岗位</td>
|
<div style="display: flex;flex-direction: row;flex: 1 ;align-items: center;margin-left: 20px;">
|
||||||
<td>
|
<span style="width:80px;text-align: right;"><span class="must">*</span> 角色:</span>
|
||||||
<el-select v-model="form.postSid" @change="$forceUpdate()" style="width:300px">
|
<el-select v-model="form.roleSid" placeholder="请选择" style="margin-left: 10px; flex: 1" filterable multiple
|
||||||
<el-option v-for="(item, i) in postSidData" :key="i" :label="item.name" :value="item.sid"></el-option>
|
@change="roleChange">
|
||||||
|
<el-option v-for="(item,i) in roleListAll" :key="i" :label="item.name" :value="item.sid"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
|
||||||
</tr> -->
|
</div>
|
||||||
<tr>
|
</div>
|
||||||
<td>手机号码</td>
|
|
||||||
<td>
|
<div style="display: flex;flex-direction: row;width: 100%;margin-top: 10px;">
|
||||||
<el-input v-model="form.userName" style="width:300px"></el-input>
|
<div style="display: flex;flex-direction: row;flex: 1 ; align-items: center;">
|
||||||
</td>
|
<span style="width: 80px;text-align: right;">备注:</span>
|
||||||
</tr>
|
<el-input style="margin-left: 10px; flex: 0.8" v-model="form.remarks"></el-input>
|
||||||
<!-- <tr>
|
<el-checkbox class="checkbox" style="margin-left: 15px;" v-model="userType"
|
||||||
<td>手机验证码</td>
|
@change="supplierChange">供应商账号</el-checkbox>
|
||||||
<td>
|
</div>
|
||||||
<el-input v-model="form.verificationCode" placeholder="请输入验证码" style="width:300px">
|
</div>
|
||||||
<el-button v-show="showCode" slot="append" @click.native="getIdentifying">获取验证码</el-button>
|
</el-form>
|
||||||
<el-button v-show="!showCode" slot="append">{{ phoneCodeCount }} s</el-button>
|
|
||||||
</el-input>
|
|
||||||
</td>
|
|
||||||
</tr> -->
|
|
||||||
</table>
|
|
||||||
<div style="margin-top: 20px; text-align: center;">
|
<div style="margin-top: 20px; text-align: center;">
|
||||||
<el-button type="primary" @click="save()">保 存</el-button>
|
<el-button type="primary" @click="save()">保 存</el-button>
|
||||||
<el-button @click="editDialog = false">关 闭</el-button>
|
<el-button @click="editDialog = false">关 闭</el-button>
|
||||||
@@ -172,40 +178,23 @@
|
|||||||
saveOrgRole,
|
saveOrgRole,
|
||||||
roleList,
|
roleList,
|
||||||
setRoleEnable,
|
setRoleEnable,
|
||||||
userUpdata
|
userUpdata,
|
||||||
|
userAdd,
|
||||||
|
userSingle,
|
||||||
|
getCode,
|
||||||
|
initUserInfo
|
||||||
} from '@/api/system/userManage/index.js'
|
} from '@/api/system/userManage/index.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editDialog: false,
|
editDialog: false,
|
||||||
form: {},
|
|
||||||
userTypeData: [{
|
|
||||||
value: '1',
|
|
||||||
name: '员工'
|
|
||||||
}, {
|
|
||||||
value: '2',
|
|
||||||
name: '主管'
|
|
||||||
}, {
|
|
||||||
value: '3',
|
|
||||||
name: '经理'
|
|
||||||
}],
|
|
||||||
checkedId: [],
|
checkedId: [],
|
||||||
orgName: '',
|
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
},
|
},
|
||||||
showCode: true,
|
|
||||||
postSidData: [],
|
|
||||||
phoneCodeCount: '',
|
|
||||||
roleListAll: [],
|
roleListAll: [],
|
||||||
props: {
|
|
||||||
value: 'sid',
|
|
||||||
label: 'name',
|
|
||||||
children: 'orgDepartmentVoList'
|
|
||||||
},
|
|
||||||
treedata: null,
|
|
||||||
page: {
|
page: {
|
||||||
total: 0, // 默认数据总数
|
total: 0, // 默认数据总数
|
||||||
current: 1, // 默认开始页面
|
current: 1, // 默认开始页面
|
||||||
@@ -219,11 +208,12 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
value: 'sid',
|
||||||
|
label: 'name',
|
||||||
|
children: 'orgDepartmentVoList'
|
||||||
|
},
|
||||||
userTable: [],
|
userTable: [],
|
||||||
// 设置角色
|
|
||||||
formLabelWidth: '100',
|
|
||||||
roleDialog: false,
|
|
||||||
roleList: [],
|
|
||||||
roleForm: {
|
roleForm: {
|
||||||
roleSid: '',
|
roleSid: '',
|
||||||
userSid: ''
|
userSid: ''
|
||||||
@@ -235,6 +225,10 @@
|
|||||||
departmentSid: ''
|
departmentSid: ''
|
||||||
},
|
},
|
||||||
bm_List: [],
|
bm_List: [],
|
||||||
|
// 设置角色
|
||||||
|
formLabelWidth: '100',
|
||||||
|
roleDialog: false,
|
||||||
|
roleList: [],
|
||||||
rules: {
|
rules: {
|
||||||
roleSid: [{
|
roleSid: [{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -246,7 +240,32 @@
|
|||||||
message: '请选择部门名称',
|
message: '请选择部门名称',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}]
|
}]
|
||||||
}
|
},
|
||||||
|
form: {
|
||||||
|
"userName": "",
|
||||||
|
"name": "",
|
||||||
|
"sysStaffOrg": {
|
||||||
|
"orgSid": "",
|
||||||
|
"orgName": "",
|
||||||
|
"orgCode": "",
|
||||||
|
"manageType": ""
|
||||||
|
},
|
||||||
|
"sysUserRoles": [],
|
||||||
|
"remarks": "",
|
||||||
|
"userType": "",
|
||||||
|
"accountType": "",
|
||||||
|
"orgSid": window.sessionStorage.getItem('orgSid')
|
||||||
|
},
|
||||||
|
accountType: false,
|
||||||
|
manageType: false,
|
||||||
|
userType: false,
|
||||||
|
treedata: [],
|
||||||
|
checkedId: [],
|
||||||
|
// orgName: '',
|
||||||
|
defaultProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'name'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: ['dataObj'],
|
props: ['dataObj'],
|
||||||
@@ -258,13 +277,88 @@
|
|||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
// 计算角色名称
|
||||||
|
sysRoleVosNames(val, row) {
|
||||||
|
console.log("sysRoleVosNames", val);
|
||||||
|
console.log("sysRoleVosNames", row);
|
||||||
|
var names = ''
|
||||||
|
|
||||||
|
// row.sysRoleVos.forEach((e) => {
|
||||||
|
// names += e.name + ","
|
||||||
|
// })
|
||||||
|
|
||||||
|
// return names.substring(names.length, names.length - 1)
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getOrgUserList()
|
this.getOrgUserList()
|
||||||
this.getRoleList()
|
this.getRoleList()
|
||||||
this.getOrgTree()
|
this.getOrgTree()
|
||||||
this.getOrgList()
|
// this.getOrgList()
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// sysRoleVosName(row) {
|
||||||
|
// console.log("sysRoleVosNames", row);
|
||||||
|
// var names = ''
|
||||||
|
|
||||||
|
// row.sysRoleVos.forEach((e) => {
|
||||||
|
// names += e.name + ","
|
||||||
|
// })
|
||||||
|
|
||||||
|
// return names.substring(names.length, names.length - 1)
|
||||||
|
// },
|
||||||
|
canLoginChange(val) {
|
||||||
|
console.log("canLoginChange", val);
|
||||||
|
|
||||||
|
this.accountType = val
|
||||||
|
|
||||||
|
this.form.accountType = val ? "2" : "3"
|
||||||
|
|
||||||
|
},
|
||||||
|
manageTypeChange(val) {
|
||||||
|
console.log("manageTypeChange", val);
|
||||||
|
|
||||||
|
this.manageType = val
|
||||||
|
|
||||||
|
this.form.sysStaffOrg.manageType = val ? "1" : "3"
|
||||||
|
},
|
||||||
|
supplierChange(val) {
|
||||||
|
console.log("supplierChange", val);
|
||||||
|
this.userType = val
|
||||||
|
|
||||||
|
this.form.userType = val ? "3" : "1"
|
||||||
|
},
|
||||||
|
|
||||||
|
roleChange(val) {
|
||||||
|
console.log("roleChange", val);
|
||||||
|
this.$forceUpdate()
|
||||||
|
this.form.sysUserRoles = []
|
||||||
|
for (var i = 0; i < val.length; i++) {
|
||||||
|
|
||||||
|
this.form.sysUserRoles.push({
|
||||||
|
roleSid: val[i]
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
checkchange(data, checked, indeterminate) {
|
||||||
|
|
||||||
|
console.log("checkchange", data);
|
||||||
|
if (checked) {
|
||||||
|
this.form.sysStaffOrg.orgSid = data.sid
|
||||||
|
this.form.sysStaffOrg.orgName = data.name
|
||||||
|
this.form.sysStaffOrg.orgCode = data.orgCode
|
||||||
|
let arr = []
|
||||||
|
arr = [data.sid];
|
||||||
|
this.$refs.Tree.setCheckedKeys(arr);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 列表 + 初始化
|
// 列表 + 初始化
|
||||||
getOrgUserList() {
|
getOrgUserList() {
|
||||||
userList(this.page).then(res => {
|
userList(this.page).then(res => {
|
||||||
@@ -304,17 +398,29 @@
|
|||||||
this.getOrgUserList()
|
this.getOrgUserList()
|
||||||
},
|
},
|
||||||
getOrgTree() { // 获取部门树形列表
|
getOrgTree() { // 获取部门树形列表
|
||||||
function treeArr(data) {
|
|
||||||
if (data.length > 0) {
|
this.checkedId = []
|
||||||
for (var i = 0; i < data.length; i++) {
|
// this.Thisrow = row
|
||||||
if (data[i].orgDepartmentVoList.length > 0) {
|
this.loading = true
|
||||||
treeArr(data[i].orgDepartmentVoList)
|
let params = {}
|
||||||
} else {
|
orgList(window.sessionStorage.getItem('orgSid')).then(res => {
|
||||||
delete data[i].orgDepartmentVoList
|
|
||||||
}
|
console.log("getOrgTree", res.data);
|
||||||
}
|
|
||||||
}
|
this.treedata = res.data
|
||||||
}
|
})
|
||||||
|
|
||||||
|
// 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 => {
|
// getOrgTree({organizationSid: this.$store.getters.userInfo.orgSid}).then(res => {
|
||||||
// let tree = res.data[0].orgDepartmentVoList
|
// let tree = res.data[0].orgDepartmentVoList
|
||||||
// treeArr(tree)
|
// treeArr(tree)
|
||||||
@@ -380,20 +486,16 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置部门 提交
|
save() {
|
||||||
save(formName) {
|
|
||||||
this.form.userType = this.form.userTypeKey;
|
|
||||||
userUpdata(this.form).then(res => {
|
userUpdata(this.form).then(res => {
|
||||||
if (res.code === '200') {
|
if (res.code == '200') {
|
||||||
this.getOrgUserList()
|
|
||||||
this.bm_Dialog = false
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
this.editDialog = false
|
this.editDialog = false
|
||||||
|
this.$emit('status', false)
|
||||||
}
|
}
|
||||||
this.reset()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initPwd(row) {
|
initPwd(row) {
|
||||||
@@ -414,10 +516,25 @@
|
|||||||
},
|
},
|
||||||
// 修改用户信息
|
// 修改用户信息
|
||||||
userinfoChange(row) {
|
userinfoChange(row) {
|
||||||
var postSid = row.postSid
|
initUserInfo(row).then(res => {
|
||||||
this.editDialog = true
|
if (res.code == '200') {
|
||||||
this.form = Object.assign({}, row)
|
this.editDialog = true
|
||||||
this.postSid = postSid
|
this.form = res.data
|
||||||
|
|
||||||
|
this.form.roleSid = []
|
||||||
|
for (let i = 0; i < res.data.sysUserRoles.length; i++) {
|
||||||
|
// if (res.data.sysUserRoles[i].checked === '0') {
|
||||||
|
this.form.roleSid.push(res.data.sysUserRoles[i].roleSid)
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.accountType = this.form.accountType != '3'
|
||||||
|
this.manageType = this.form.sysStaffOrg.manageType == '1'
|
||||||
|
this.userType = this.form.userType == '3'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
// this.$refs.Tree.setChecked(this.form.departmentSid, true, true)
|
// this.$refs.Tree.setChecked(this.form.departmentSid, true, true)
|
||||||
// })
|
// })
|
||||||
@@ -446,29 +563,29 @@
|
|||||||
this.$router.push('/' + src)
|
this.$router.push('/' + src)
|
||||||
},
|
},
|
||||||
// 获取部门树形
|
// 获取部门树形
|
||||||
getOrgList(row) {
|
// getOrgList(row) {
|
||||||
// this.roleDialog = true
|
// // this.roleDialog = true
|
||||||
this.checkedId = []
|
// this.checkedId = []
|
||||||
this.Thisrow = row
|
// this.Thisrow = row
|
||||||
this.loading = true
|
// this.loading = true
|
||||||
let params = {}
|
// let params = {}
|
||||||
orgList(params).then(res => {
|
// orgList(params).then(res => {
|
||||||
this.treedata = res.data
|
// this.treedata = res.data
|
||||||
})
|
// })
|
||||||
|
|
||||||
},
|
// },
|
||||||
checkchange(data, checked, indeterminate) {
|
// checkchange(data, checked, indeterminate) {
|
||||||
if (checked) {
|
// if (checked) {
|
||||||
this.form.deptSid = data.sid
|
// this.form.orgSid = data.sid
|
||||||
this.orgName = data.name
|
// this.orgName = data.name
|
||||||
let arr = []
|
// let arr = []
|
||||||
arr = [data.sid]
|
// arr = [data.sid]
|
||||||
this.$refs.Tree.setCheckedKeys(arr)
|
// this.$refs.Tree.setCheckedKeys(arr)
|
||||||
this.form.postSid = ''
|
// this.form.postSid = ''
|
||||||
this.getPost(data.sid)
|
// this.getPost(data.sid)
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
getPost(orgSid) {
|
getPost(orgSid) {
|
||||||
let params = {
|
let params = {
|
||||||
sid: orgSid
|
sid: orgSid
|
||||||
|
|||||||
Reference in New Issue
Block a user