|
|
@ -77,6 +77,8 @@ |
|
|
|
import { NsMessage } from '/nerv-lib/component'; |
|
|
|
import { formConfig, formConfig2 } from './config'; |
|
|
|
import { mockData, mockData2, treeData, treeData2 } from './mock'; |
|
|
|
import { origanizemanage } from '/@/api/origanizemanage'; |
|
|
|
|
|
|
|
export default defineComponent({ |
|
|
|
name: 'OrderListIndex', |
|
|
|
setup() { |
|
|
@ -141,12 +143,11 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
const tableConfig = { |
|
|
|
// title: '企业管理', |
|
|
|
// api: { |
|
|
|
// url: '/carbon_emission/device/getGatewayList', |
|
|
|
// method: 'post', |
|
|
|
// }, |
|
|
|
value: mockData.value, |
|
|
|
title: '用户管理', |
|
|
|
api: origanizemanage.userList, |
|
|
|
params: { |
|
|
|
orgId: JSON.parse(sessionStorage.getItem('userInfo')).orgId, |
|
|
|
}, |
|
|
|
listField: 'data.records', |
|
|
|
headerActions: [ |
|
|
|
{ |
|
|
@ -157,10 +158,11 @@ |
|
|
|
opMap.type = 'add'; |
|
|
|
opMap.fuc = (formData: any) => { |
|
|
|
console.log(formData, 'formData'); |
|
|
|
mockData.value.push({ |
|
|
|
id: Math.random().toString().slice(2, 6), |
|
|
|
...cloneDeep(formData), |
|
|
|
}); |
|
|
|
// origanizemanage.addUser |
|
|
|
// mockData.value.push({ |
|
|
|
// id: Math.random().toString().slice(2, 6), |
|
|
|
// ...cloneDeep(formData), |
|
|
|
// }); |
|
|
|
}; |
|
|
|
visible.value = true; |
|
|
|
}, |
|
|
@ -214,10 +216,6 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
params: { |
|
|
|
page: 0, |
|
|
|
pageSize: 10, |
|
|
|
}, |
|
|
|
columns: [ |
|
|
|
{ |
|
|
|
title: '序号', |
|
|
@ -231,16 +229,16 @@ |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '账号', |
|
|
|
dataIndex: 'zhanghao', |
|
|
|
dataIndex: 'accountNo', |
|
|
|
sorter: { |
|
|
|
compare: (a, b) => a.zhanghao - b.zhanghao, |
|
|
|
compare: (a, b) => a.accountNo - b.accountNo, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '姓名', |
|
|
|
dataIndex: 'name', |
|
|
|
dataIndex: 'realName', |
|
|
|
sorter: { |
|
|
|
compare: (a, b) => a.name - b.name, |
|
|
|
compare: (a, b) => a.realName - b.realName, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -252,7 +250,7 @@ |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '手机号', |
|
|
|
dataIndex: 'phone', |
|
|
|
dataIndex: 'telephone', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '邮箱', |
|
|
@ -260,15 +258,30 @@ |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '组织关系', |
|
|
|
dataIndex: 'relation', |
|
|
|
dataIndex: 'deptInfo', |
|
|
|
customRender: (value) => { |
|
|
|
return value.record.deptInfo.orgName; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '部门角色', |
|
|
|
dataIndex: 'role', |
|
|
|
title: '部门/角色', |
|
|
|
dataIndex: 'orgInfo', |
|
|
|
customRender: (value) => { |
|
|
|
// // console.log(value.record.orgInfo.orgName, 'ss'); |
|
|
|
// console.log( |
|
|
|
// value.record.userRoleList.map((item) => { |
|
|
|
// return `${value.record.orgInfo.orgName}/${item.roleName}`; |
|
|
|
// }), |
|
|
|
// ); |
|
|
|
// value.record.userRoleList.map((item) => { |
|
|
|
// return `${value.record.orgInfo.orgName}/${item.roleName}`; |
|
|
|
// }); |
|
|
|
// return `${value.record.orgInfo.orgName}/`; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '状态', |
|
|
|
dataIndex: 'status', |
|
|
|
dataIndex: 'userStatus', |
|
|
|
}, |
|
|
|
], |
|
|
|
columnActions: { |
|
|
@ -355,7 +368,7 @@ |
|
|
|
formConfig: { |
|
|
|
schemas: [ |
|
|
|
{ |
|
|
|
field: 'zhanghao', |
|
|
|
field: 'accountNo', |
|
|
|
label: '账号名', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
@ -364,7 +377,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'name', |
|
|
|
field: 'realName', |
|
|
|
label: '姓名', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
@ -373,7 +386,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'phone', |
|
|
|
field: 'telephone', |
|
|
|
label: '手机号', |
|
|
|
component: 'NsInput', |
|
|
|
componentProps: { |
|
|
@ -391,7 +404,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'status', |
|
|
|
field: 'userStatus', |
|
|
|
label: '用户状态', |
|
|
|
component: 'NsSelect', |
|
|
|
componentProps: { |
|
|
|