Commit 678e7294 authored by TZW's avatar TZW

location

parent 1a2118b9
......@@ -24,7 +24,8 @@ const loginOut = async () => {
if (window.location.pathname !== '/user/login' && !redirect) {
localStorage.clear();
history.replace(logoutRedirectUrl);
// history.replace(logoutRedirectUrl);
window.location.href(logoutRedirectUrl);
}
};
......
......@@ -2,7 +2,12 @@ import { doFetch } from '@/utils/doFetch';
import { Image } from 'antd';
import fieldsDetail from '@/utils/fieldsDetail';
import { useState, useEffect } from 'react';
function getcolumns(setdrawer, options) {
function getcolumns(setdrawer, usermsg) {
console.log(usermsg);
const options = usermsg?.map((it) => ({
label: `${it?.username}-${it?.fullName}`,
value: it?.id,
}));
return [
{
title: '用户名',
......@@ -12,12 +17,18 @@ function getcolumns(setdrawer, options) {
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
valueType: 'select',
options,
fieldProps: {
onChange: (e) => {
console.log(e);
},
},
},
{
title: '姓名',
dataIndex: 'fullName',
width: 100,
key: 'fullName',
hideInForm: true,
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
render: (text, row) => {
return (
......@@ -104,10 +115,22 @@ function getcolumns(setdrawer, options) {
hideInTable: true,
dataIndex: 'telephone',
key: 'telephone',
fieldProps: {
disabled: true,
},
hideInTable: true,
search: false,
},
{
title: '邮箱',
dataIndex: 'mailNo',
key: 'mailNo',
hideInTable: true,
search: false,
fieldProps: {
disabled: true,
},
},
{ title: '邮箱', dataIndex: 'mailNo', key: 'mailNo', hideInTable: true, search: false },
{
title: '公司名称',
align: 'center',
......@@ -115,6 +138,7 @@ function getcolumns(setdrawer, options) {
width: 120,
key: 'organizationId',
valueType: 'select',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
options: { path: '/auth/sysDepartment/query/organization/selectbox', params: {} },
},
{
......@@ -123,6 +147,7 @@ function getcolumns(setdrawer, options) {
align: 'center',
valueType: 'treeSelect',
dataIndex: 'departmentName',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
key: 'departmentId',
options: {
path: '/auth/sysDepartment/query/children/tree',
......@@ -138,7 +163,7 @@ function getcolumns(setdrawer, options) {
key: 'factoryNames',
hideInTable: true,
hideInForm: true,
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
formItemProps: { rules: [{ required: false, message: '此项为必填项' }] },
},
{
title: '负责车间',
......@@ -147,7 +172,7 @@ function getcolumns(setdrawer, options) {
align: 'center',
hideInTable: true,
hideInForm: true,
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
formItemProps: { rules: [{ required: false, message: '此项为必填项' }] },
},
{
title: '角色名称',
......@@ -268,6 +293,7 @@ function getcolumns(setdrawer, options) {
// hideInTable: true,
dataIndex: 'statusName',
key: 'status',
fieldProps: { disabled: true },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
valueType: 'radio',
options: [
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-16 10:48:21
* @Last Modified time: 2022-12-16 11:18:33
*/
import * as React from 'react';
......@@ -147,10 +147,7 @@ function User(props) {
url: '/auth/sysUser/queryLikeIotUsername',
params: { username: initialState?.currentUser?.username },
});
return res?.data?.dataList.map((it) => ({
label: `${it?.username}-${it?.fullName}`,
value: it?.id,
}));
return res?.data?.dataList;
});
console.log(data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment