Merge branch 'main' of http://123.60.103.97:3000/xuziqiang/SaaS-lib
This commit is contained in:
@@ -1,13 +1,4 @@
|
|||||||
// import request from '@/utils/request';
|
|
||||||
|
|
||||||
// export function login(data) {
|
|
||||||
// return request({
|
|
||||||
// url: '/carbon-smart/api/user/queryUserByPage',
|
|
||||||
// method: 'post',
|
|
||||||
// data,
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
export const origanizemanage = {
|
export const origanizemanage = {
|
||||||
list: '/carbon-smart/api/user/queryUserByPage',
|
userList: '/carbon-smart/api/user/queryUserByPage',
|
||||||
|
addUser: '/carbon-smart/api/user/save',
|
||||||
};
|
};
|
||||||
|
@@ -73,6 +73,7 @@ export const appConfig = {
|
|||||||
accountCode: 'userId',
|
accountCode: 'userId',
|
||||||
accountName: 'realName',
|
accountName: 'realName',
|
||||||
accountRealName: 'realName',
|
accountRealName: 'realName',
|
||||||
|
orgId: 'orgId',
|
||||||
});
|
});
|
||||||
return { data: { ...trD } };
|
return { data: { ...trD } };
|
||||||
});
|
});
|
||||||
|
@@ -13,7 +13,7 @@ export const formConfig = [
|
|||||||
schemas: [
|
schemas: [
|
||||||
{
|
{
|
||||||
label: '账号',
|
label: '账号',
|
||||||
field: 'zhanghao',
|
field: 'accountNo',
|
||||||
component: 'NsInput',
|
component: 'NsInput',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入账号',
|
placeholder: '请输入账号',
|
||||||
@@ -28,7 +28,7 @@ export const formConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '姓名',
|
label: '姓名',
|
||||||
field: 'name',
|
field: 'realName',
|
||||||
component: 'NsInput',
|
component: 'NsInput',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入姓名',
|
placeholder: '请输入姓名',
|
||||||
@@ -55,7 +55,7 @@ export const formConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '手机号',
|
label: '手机号',
|
||||||
field: 'phone',
|
field: 'telephone',
|
||||||
component: 'NsInput',
|
component: 'NsInput',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入手机号',
|
placeholder: '请输入手机号',
|
||||||
|
@@ -77,6 +77,8 @@
|
|||||||
import { NsMessage } from '/nerv-lib/component';
|
import { NsMessage } from '/nerv-lib/component';
|
||||||
import { formConfig, formConfig2 } from './config';
|
import { formConfig, formConfig2 } from './config';
|
||||||
import { mockData, mockData2, treeData, treeData2 } from './mock';
|
import { mockData, mockData2, treeData, treeData2 } from './mock';
|
||||||
|
import { origanizemanage } from '/@/api/origanizemanage';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'OrderListIndex',
|
name: 'OrderListIndex',
|
||||||
setup() {
|
setup() {
|
||||||
@@ -141,12 +143,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const tableConfig = {
|
const tableConfig = {
|
||||||
// title: '企业管理',
|
title: '用户管理',
|
||||||
// api: {
|
api: origanizemanage.userList,
|
||||||
// url: '/carbon_emission/device/getGatewayList',
|
params: {
|
||||||
// method: 'post',
|
orgId: JSON.parse(sessionStorage.getItem('userInfo')).orgId,
|
||||||
// },
|
},
|
||||||
value: mockData.value,
|
|
||||||
listField: 'data.records',
|
listField: 'data.records',
|
||||||
headerActions: [
|
headerActions: [
|
||||||
{
|
{
|
||||||
@@ -157,10 +158,11 @@
|
|||||||
opMap.type = 'add';
|
opMap.type = 'add';
|
||||||
opMap.fuc = (formData: any) => {
|
opMap.fuc = (formData: any) => {
|
||||||
console.log(formData, 'formData');
|
console.log(formData, 'formData');
|
||||||
mockData.value.push({
|
// origanizemanage.addUser
|
||||||
id: Math.random().toString().slice(2, 6),
|
// mockData.value.push({
|
||||||
...cloneDeep(formData),
|
// id: Math.random().toString().slice(2, 6),
|
||||||
});
|
// ...cloneDeep(formData),
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
},
|
},
|
||||||
@@ -214,10 +216,6 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
params: {
|
|
||||||
page: 0,
|
|
||||||
pageSize: 10,
|
|
||||||
},
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
@@ -231,16 +229,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '账号',
|
title: '账号',
|
||||||
dataIndex: 'zhanghao',
|
dataIndex: 'accountNo',
|
||||||
sorter: {
|
sorter: {
|
||||||
compare: (a, b) => a.zhanghao - b.zhanghao,
|
compare: (a, b) => a.accountNo - b.accountNo,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
dataIndex: 'name',
|
dataIndex: 'realName',
|
||||||
sorter: {
|
sorter: {
|
||||||
compare: (a, b) => a.name - b.name,
|
compare: (a, b) => a.realName - b.realName,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -252,7 +250,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '手机号',
|
title: '手机号',
|
||||||
dataIndex: 'phone',
|
dataIndex: 'telephone',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '邮箱',
|
title: '邮箱',
|
||||||
@@ -260,15 +258,30 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '组织关系',
|
title: '组织关系',
|
||||||
dataIndex: 'relation',
|
dataIndex: 'deptInfo',
|
||||||
|
customRender: (value) => {
|
||||||
|
return value.record.deptInfo.orgName;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '部门角色',
|
title: '部门/角色',
|
||||||
dataIndex: 'role',
|
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: '状态',
|
title: '状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'userStatus',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
columnActions: {
|
columnActions: {
|
||||||
@@ -355,7 +368,7 @@
|
|||||||
formConfig: {
|
formConfig: {
|
||||||
schemas: [
|
schemas: [
|
||||||
{
|
{
|
||||||
field: 'zhanghao',
|
field: 'accountNo',
|
||||||
label: '账号名',
|
label: '账号名',
|
||||||
component: 'NsInput',
|
component: 'NsInput',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
@@ -364,7 +377,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'realName',
|
||||||
label: '姓名',
|
label: '姓名',
|
||||||
component: 'NsInput',
|
component: 'NsInput',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
@@ -373,7 +386,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'phone',
|
field: 'telephone',
|
||||||
label: '手机号',
|
label: '手机号',
|
||||||
component: 'NsInput',
|
component: 'NsInput',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
@@ -391,7 +404,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'userStatus',
|
||||||
label: '用户状态',
|
label: '用户状态',
|
||||||
component: 'NsSelect',
|
component: 'NsSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
@@ -5,11 +5,11 @@ export const tableConfig = {
|
|||||||
listField: 'data.records', // 数据集合
|
listField: 'data.records', // 数据集合
|
||||||
totalField: 'data.total', // 数据总数
|
totalField: 'data.total', // 数据总数
|
||||||
|
|
||||||
pageFieldOffset: 1, //前端页码1开始,后端0 偏移量 1
|
pageFieldOffset: 0, //前端页码1开始,后端0 偏移量 1
|
||||||
pageSizeOptions: ['10', '20', '40'], // 分页设置种类
|
pageSizeOptions: ['10', '20', '40'], // 分页设置种类
|
||||||
defaultPageSize: 10, // 默认每页数量
|
defaultPageSize: 10, // 默认每页数量
|
||||||
paramsPageSizeField: 'pageSize',
|
paramsPageSizeField: 'pageSize',
|
||||||
paramsPageField: 'pageNumber',
|
paramsPageField: 'pageNum',
|
||||||
paramsOrderField: 'order',
|
paramsOrderField: 'order',
|
||||||
columnActions: {
|
columnActions: {
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
Reference in New Issue
Block a user