Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
ems3.3
Commits
2e168ae0
Commit
2e168ae0
authored
2 years ago
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022.11.9
parent
b3a18d30
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
278 additions
and
1156 deletions
+278
-1156
authRoutes.js
config/authRoutes.js
+32
-15
defaultSettings.js
config/defaultSettings.js
+3
-3
routes.js
config/routes.js
+2
-0
app.jsx
src/app.jsx
+14
-2
global.less
src/global.less
+34
-10
index.jsx
src/pages/Test/index.jsx
+0
-163
Welcome.jsx
src/pages/Welcome.jsx
+2
-535
columns.js
src/pages/setting/factory/columns.js
+6
-1
index.jsx
src/pages/setting/factory/index.jsx
+68
-17
columns.js
src/pages/setting/section/columns.js
+17
-97
index.jsx
src/pages/setting/section/index.jsx
+41
-13
columns.js
src/pages/setting/workshop/columns.js
+14
-97
index.jsx
src/pages/setting/workshop/index.jsx
+44
-14
columns.js
src/pages/zll/columns.js
+0
-32
index.jsx
src/pages/zll/index.jsx
+0
-146
tablist.js
src/pages/zll/tablist.js
+0
-10
request.js
src/utils/request.js
+1
-1
No files found.
config/authRoutes.js
View file @
2e168ae0
export
default
[
export
default
[
{
"path"
:
"/welcome"
,
"name"
:
"欢迎"
,
"icon"
:
"smile"
,
"component"
:
"./Welcome"
},
{
path
:
'/welcome'
,
name
:
'欢迎'
,
icon
:
'smile'
,
component
:
'./Welcome'
},
{
"name"
:
"表格"
,
"icon"
:
"table"
,
"path"
:
"/system"
,
"routes"
:
[{
"name"
:
"表格列表"
,
"path"
:
"/system/staff"
,
"unkeepalive"
:
true
,
"component"
:
"./Welcome"
},
{
"name"
:
"测试"
,
"path"
:
"/system/jiagou"
,
"component"
:
"./Test"
},
{
"component"
:
"./404"
}]
},
{
"name"
:
"左玲玲"
,
"path"
:
"/zll"
,
"icon"
:
"eye"
,
"component"
:
"./zll"
},
{
{
"name"
:
"基础设置"
,
name
:
'基础设置'
,
"icon"
:
"setting"
,
icon
:
'setting'
,
"path"
:
"/setting"
,
path
:
'/setting'
,
"routes"
:
[
routes
:
[
{
{
"name"
:
"工厂管理"
,
name
:
'用户管理'
,
"path"
:
"/setting/factory"
,
path
:
'/setting/users'
,
"component"
:
"./setting/factory"
component
:
'./setting/users'
,
}
},
]
{
}
name
:
'角色管理'
,
path
:
'/setting/role'
,
component
:
'./setting/role'
,
},
{
name
:
'组织管理'
,
path
:
'/setting/organization'
,
component
:
'./setting/organization'
,
},
{
name
:
'工厂管理'
,
path
:
'/setting/factory'
,
component
:
'./setting/factory'
,
},
{
name
:
'车间管理'
,
path
:
'/setting/workshop'
,
component
:
'./setting/workshop'
,
},
],
},
];
];
This diff is collapsed.
Click to expand it.
config/defaultSettings.js
View file @
2e168ae0
const
Settings
=
{
const
Settings
=
{
title
:
'
basepro
'
,
title
:
'
设备管理系统
'
,
name
:
'
basepro
'
,
name
:
'
设备管理系统
'
,
navTheme
:
'
light
'
,
navTheme
:
'
dark
'
,
primaryColor
:
'#1890ff'
,
primaryColor
:
'#1890ff'
,
layout
:
'side'
,
layout
:
'side'
,
contentWidth
:
'Fluid'
,
contentWidth
:
'Fluid'
,
...
...
This diff is collapsed.
Click to expand it.
config/routes.js
View file @
2e168ae0
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
let
allauth
=
authRoutes
;
// .map((it) => ({ ...it, wrappers: ['@/wrappers/auth'] }));
let
allauth
=
authRoutes
;
// .map((it) => ({ ...it, wrappers: ['@/wrappers/auth'] }));
console
.
log
(
allauth
);
export
default
[
export
default
[
{
{
path
:
'/user'
,
path
:
'/user'
,
...
...
This diff is collapsed.
Click to expand it.
src/app.jsx
View file @
2e168ae0
...
@@ -12,6 +12,8 @@ import routes from '../config/authRoutes';
...
@@ -12,6 +12,8 @@ import routes from '../config/authRoutes';
const
{
LinkOutlined
}
=
Ant4Icons
;
const
{
LinkOutlined
}
=
Ant4Icons
;
const
isDev
=
process
.
env
.
NODE_ENV
===
'development'
;
const
isDev
=
process
.
env
.
NODE_ENV
===
'development'
;
// const isDev = false
console
.
log
(
isDev
);
const
loginPath
=
'/user/login'
;
const
loginPath
=
'/user/login'
;
/**
/**
...
@@ -47,14 +49,12 @@ export async function getInitialState() {
...
@@ -47,14 +49,12 @@ export async function getInitialState() {
}
}
return
undefined
;
return
undefined
;
};
// 如果是登录页面,不执行
};
// 如果是登录页面,不执行
if
(
history
.
location
.
pathname
!==
loginPath
&&
token
)
{
if
(
history
.
location
.
pathname
!==
loginPath
&&
token
)
{
const
currentUserData
=
await
fetchUserInfo
();
const
currentUserData
=
await
fetchUserInfo
();
let
menuData
;
let
menuData
;
if
(
currentUserData
?.
data
?.
userName
)
{
if
(
currentUserData
?.
data
?.
userName
)
{
menuData
=
await
getmenuData
();
menuData
=
await
getmenuData
();
}
}
/* isdev */
/* isdev */
if
(
isDev
)
{
if
(
isDev
)
{
menuData
=
{
menuData
=
{
...
@@ -73,12 +73,23 @@ export async function getInitialState() {
...
@@ -73,12 +73,23 @@ export async function getInitialState() {
collapsed
:
false
,
collapsed
:
false
,
};
};
}
}
let
menuData
=
{};
if
(
isDev
)
{
menuData
=
{
recentUsePermList
:
[],
collectPerm
:
[],
userHavePermList
:
routes
,
};
}
return
{
return
{
fetchUserInfo
,
fetchUserInfo
,
settings
:
defaultSettings
,
settings
:
defaultSettings
,
getmenuData
,
getmenuData
,
collapsed
:
false
,
collapsed
:
false
,
tagList
:
[],
tagList
:
[],
newMenu
:
menuData
,
};
};
}
}
...
@@ -130,6 +141,7 @@ export const layout = ({ initialState, setInitialState }) => {
...
@@ -130,6 +141,7 @@ export const layout = ({ initialState, setInitialState }) => {
userId
:
initialState
?.
currentUser
?.
id
,
userId
:
initialState
?.
currentUser
?.
id
,
},
},
request
:
(
params
,
defaultMenuData
)
=>
{
request
:
(
params
,
defaultMenuData
)
=>
{
console
.
log
(
initialState
);
let
lastArr
=
initialState
?.
newMenu
?.
userHavePermList
let
lastArr
=
initialState
?.
newMenu
?.
userHavePermList
?
JSON
.
parse
(
JSON
.
stringify
(
initialState
?.
newMenu
?.
userHavePermList
))
?
JSON
.
parse
(
JSON
.
stringify
(
initialState
?.
newMenu
?.
userHavePermList
))
:
[],
:
[],
...
...
This diff is collapsed.
Click to expand it.
src/global.less
View file @
2e168ae0
...
@@ -58,13 +58,14 @@ ol {
...
@@ -58,13 +58,14 @@ ol {
width: 100%;
width: 100%;
overflow-x: auto;
overflow-x: auto;
&-thead > tr,
&-thead>tr,
&-tbody > tr {
&-tbody>tr {
> th,
> td {
>th,
>td {
white-space: pre;
white-space: pre;
>
span {
>span {
display: block;
display: block;
}
}
}
}
...
@@ -196,6 +197,7 @@ ol {
...
@@ -196,6 +197,7 @@ ol {
display: flex !important;
display: flex !important;
flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
}
.ant-pro {
.ant-pro {
display: flex;
display: flex;
align-items: center;
align-items: center;
...
@@ -311,7 +313,7 @@ ol {
...
@@ -311,7 +313,7 @@ ol {
}
}
.lightblue {
.lightblue {
>
td:first-child {
>td:first-child {
position: relative;
position: relative;
&::before {
&::before {
...
@@ -333,14 +335,14 @@ ol {
...
@@ -333,14 +335,14 @@ ol {
width: 100%;
width: 100%;
padding-left: 0 !important;
padding-left: 0 !important;
>
span:first-child {
>span:first-child {
flex: 1;
flex: 1;
>
span:first-child {
>span:first-child {
display: none !important;
display: none !important;
}
}
>
.ant-spin-nested-loading {
>.ant-spin-nested-loading {
width: 100%;
width: 100%;
}
}
}
}
...
@@ -367,23 +369,45 @@ ol {
...
@@ -367,23 +369,45 @@ ol {
padding-top: 0 !important;
padding-top: 0 !important;
}
}
}
}
//editor fixed
//editor fixed
.bf-link-editor .buttons {
.bf-link-editor .buttons {
box-sizing: content-box !important;
box-sizing: content-box !important;
}
}
.bf-container {
.bf-container {
display: flex !important;
display: flex !important;
flex-direction: column !important;
flex-direction: column !important;
.bf-content {
.bf-content {
flex: 1 !important;
flex: 1 !important;
}
}
}
}
.container,
.container,
.diycard {
.diycard {
height: 100% !important;
height: 100% !important;
}
}
.runtime-keep-alive-layout {
.runtime-keep-alive-layout {
>
div {
>div {
height: 100% !important;
height: 100% !important;
}
}
}
}
.page-title {
margin-bottom: 0;
font-weight: 700;
}
.page-title::before {
content: '|';
width: 4px;
position: relative;
top: 2px;
left: 2px;
color: #1890FF;
background-color: #1890FF;
margin-right: 10px;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/Test/index.jsx
deleted
100644 → 0
View file @
b3a18d30
import
React
,
{
useState
,
useMemo
}
from
'react'
;
import
{
Divider
}
from
'antd'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
export
default
()
=>
{
const
[
activeTabKey
,
onTabChange
]
=
useState
(
'0'
);
//配置式table
const
columns
=
useMemo
(()
=>
{
return
[
{
title
:
'用户名'
,
dataIndex
:
'accountName'
,
key
:
'accountName'
,
search
:
false
,
},
{
title
:
'姓名'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
},
{
title
:
'组织'
,
dataIndex
:
'departmentName'
,
key
:
'departmentName'
,
},
{
title
:
'工厂'
,
dataIndex
:
'factoryName'
,
key
:
'factoryName'
,
},
{
title
:
'负责仓库'
,
dataIndex
:
'chargeStoreName'
,
key
:
'chargeStoreName'
,
},
{
title
:
'角色'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
key
:
'telephone'
,
},
{
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
},
];
},
[]);
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
},
}
}
>
编辑
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除该用户?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
alert
(
0
);
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
tableprops
=
{
pagetitle
:
'左001号'
,
addconfig
:
{
access
:
'sysDepartment_save'
,
btn
:
{
disabled
:
true
,
onClick
:
()
=>
{
alert
(
0
);
},
},
},
exportconfig
:
{
access
:
'havePrem'
,
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
alert
(
1
);
},
},
},
pageextra
:
activeTabKey
==
'0'
?
'none'
:
activeTabKey
==
'1'
?
'add'
:
'export'
,
tabList
:
[
{
tab
:
'全部'
,
key
:
'0'
,
},
{
tab
:
'未完成'
,
key
:
'1'
,
},
{
tab
:
'已完成'
,
key
:
'2'
,
},
],
activeTabKey
,
onTabChange
,
columns
,
path
:
'/ngic-auth/sysUser/query/page'
,
resizeable
:
false
};
return
(
<
div
>
<
h3
>
配置式按钮
</
h3
>
<
AutoTable
{
...
tableprops
}
/>
<
h3
style=
{
{
margin
:
'12px 0'
}
}
>
自定义按钮
</
h3
>
<
AutoTable
pagetitle=
{
'左玲玲'
}
pageextra=
{
<
PremButton
btn=
{
{
key
:
'add'
,
disabled
:
false
,
type
:
'primary'
,
onClick
:
()
=>
{
alert
(
1
);
},
}
}
access=
"havePrem"
>
炸了哦
</
PremButton
>
}
columns=
{
columns
}
path=
"/ngic-auth/sysUser/query/page"
/>
</
div
>
);
};
This diff is collapsed.
Click to expand it.
src/pages/Welcome.jsx
View file @
2e168ae0
import
*
as
React
from
'react'
;
import
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
moment
from
'moment'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
{
factorySelect
,
shopSelectByFactory
,
storeselectionBox
,
sectionSelectByShops
,
userSelect
,
departmentTree
,
roleSelect
,
}
from
'@/services/system'
;
import
PremButton
from
'@/components/PremButton'
;
import
{
TreeSelect
}
from
'antd'
;
const
tabList
=
[
{
key
:
'1'
,
tab
:
'正式用户'
,
},
{
key
:
'2'
,
tab
:
'用户申请'
,
},
];
function
Welcome
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
[
drawer
,
setdrawer
]
=
useState
({
visible
:
false
,
});
const
columns
=
useMemo
(()
=>
{
export
default
()
=>
<>
欢迎
</>;
if
(
activeTabKey
==
'1'
)
{
return
[
{
title
:
'基础信息'
,
valueType
:
'split'
,
},
{
title
:
'用户名'
,
dataIndex
:
'accountName'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
initialValue
:
'默认值'
,
hideInForm
:
false
,
convertValue
:
(
value
)
=>
{
return
`标题:
${
value
}
`
;
},
transform
:
(
value
)
=>
{
return
{
title
:
`
${
value
}
-转换`
,
};
},
search
:
false
,
render
:
(
text
,
row
)
=>
{
return
<
a
onClick=
{
()
=>
{}
}
>
{
text
}
</
a
>;
},
},
{
title
:
'姓名'
,
dataIndex
:
'userName'
,
key
:
'userId'
,
hideInForm
:
{
accountName
:
{
reverse
:
[
'1'
,
'2'
,
'5'
],
},
remark
:
[
'3'
],
},
search
:
false
,
},
{
title
:
'组织'
,
dataIndex
:
'departmentName'
,
key
:
'departmentId'
,
valueType
:
'Cascader'
,
mode
:
'multiple'
,
fieldProps
:
{
placeholder
:
'请选择'
,
},
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
options
:
{
path
:
'/ngic-auth/sysDepartment/query/tree'
,
params
:
{},
},
},
{
title
:
'工厂'
,
dataIndex
:
'factoryName'
,
key
:
'factoryIdList'
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
mode
:
'multiple'
,
allowClear
:
true
,
},
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
options
:
{
path
:
'/ngic-auth/sysFactory/selectionBox'
,
params
:
{},
},
},
{
title
:
'负责仓库'
,
dataIndex
:
'chargeStoreName'
,
key
:
'storeIdList'
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
mode
:
'multiple'
,
},
options
:
{
path
:
'/ngic-auth/sysStore/selectionBox'
,
linkParams
:
{
factoryIdList
:
''
,
},
},
},
{
title
:
'角色'
,
dataIndex
:
'roleName'
,
key
:
'roleIdList'
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
mode
:
'multiple'
,
},
options
:
{
path
:
'/ngic-auth/sysRole/queryAllSelectList'
,
params
:
{},
},
},
{
title
:
'直属领导'
,
dataIndex
:
'parentName'
,
key
:
'parentId'
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
options
:
{
path
:
'/ngic-auth/sysUser/queryParentSelectionByUserId'
,
params
:
{},
},
},
{
title
:
'额外信息'
,
valueType
:
'split'
,
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
search
:
false
,
},
{
title
:
'邮箱'
,
dataIndex
:
'mailNo'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
search
:
false
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
valueType
:
'editor'
,
search
:
false
,
colProps
:
{
span
:
24
},
initialValue
:
'<p>Hello <b>World!</b></p>'
,
},
{
title
:
'上传样式-图片'
,
dataIndex
:
'uploadImage'
,
key
:
'uploadImage'
,
valueType
:
'uploadImage'
,
fieldProps
:
{
limit
:
2
,
},
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
detail
(
text
,
row
,
_
,
action
),
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
},
];
}
else
{
return
[
{
title
:
'用户名'
,
dataIndex
:
'accountName'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
initialValue
:
'默认值'
,
hideInForm
:
false
,
convertValue
:
(
value
)
=>
{
return
`标题:
${
value
}
`
;
},
transform
:
(
value
)
=>
{
return
{
title
:
`
${
value
}
-转换`
,
};
},
search
:
false
,
render
:
(
text
,
row
)
=>
{
return
<
a
onClick=
{
()
=>
{}
}
>
{
text
}
</
a
>;
},
},
{
title
:
'姓名'
,
dataIndex
:
'userName'
,
key
:
'userId'
,
hideInForm
:
{
accountName
:
{
reverse
:
[
'1'
,
'2'
,
'5'
],
},
remark
:
[
'3'
],
},
search
:
false
,
},
{
title
:
'组织'
,
dataIndex
:
'departmentName'
,
key
:
'departmentId'
,
valueType
:
'treeSelect'
,
fieldProps
:
{
placeholder
:
'请选择'
,
},
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
options
:
{
path
:
'/ngic-auth/sysDepartment/query/tree'
,
params
:
{},
},
},
{
title
:
'工厂'
,
dataIndex
:
'factoryName'
,
key
:
'factoryIdList'
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
mode
:
'multiple'
,
},
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
options
:
{
path
:
'/ngic-auth/sysFactory/selectionBox'
,
params
:
{},
},
},
{
title
:
'负责仓库'
,
dataIndex
:
'chargeStoreName'
,
key
:
'storeIdList'
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
mode
:
'multiple'
,
},
options
:
{
path
:
'/ngic-auth/sysStore/selectionBox'
,
linkParams
:
{
factoryIdList
:
''
,
},
},
},
{
title
:
'角色'
,
dataIndex
:
'roleName'
,
key
:
'roleIdList'
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
mode
:
'multiple'
,
},
options
:
{
path
:
'/ngic-auth/sysRole/queryAllSelectList'
,
params
:
{},
},
},
{
title
:
'直属领导'
,
dataIndex
:
'parentName'
,
key
:
'parentId'
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
options
:
{
path
:
'/ngic-auth/sysUser/queryParentSelectionByUserId'
,
params
:
{},
},
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
search
:
false
,
},
{
title
:
'邮箱'
,
dataIndex
:
'mailNo'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
search
:
false
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
valueType
:
'editor'
,
search
:
false
,
colProps
:
{
span
:
24
},
},
{
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
detail
(
text
,
row
,
_
,
action
),
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
},
];
}
},
[
activeTabKey
]);
const
reset
=
(
text
,
row
,
_
,
action
)
=>
{
return
;
};
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
`${row.userName}的详细信息`
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
row
,
title
:
'编辑'
,
val
:
'edit'
,
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除该用户?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
alert
(
0
);
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"用户列表"
columns=
{
columns
}
activeTabKey=
{
activeTabKey
}
path=
{
activeTabKey
==
'1'
?
'/ngic-auth/sysUser/query/page'
:
'/ngic-auth/sysAccountApply/queryList'
}
actionRef=
{
actionRef
}
onTabChange=
{
setactiveTabKey
}
tabList=
{
tabList
}
pageextra=
{
'add'
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
},
},
}
}
nocardtab=
{
true
}
/>
<
DrawerPro
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
}
}
{
...
drawer
}
/>
</
div
>
);
}
export
default
Welcome
;
This diff is collapsed.
Click to expand it.
src/pages/setting/factory/columns.js
View file @
2e168ae0
function
getcolumns
(
setdrawer
)
{
function
getcolumns
(
setdrawer
)
{
return
[
return
[
{
title
:
'工厂编码'
,
dataIndex
:
'factoryCode'
,
key
:
'factoryCode'
},
{
title
:
'工厂编码'
,
dataIndex
:
'factoryCode'
,
key
:
'factoryCode'
},
{
title
:
'工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factoryName'
},
{
title
:
'工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factoryName'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
];
];
}
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/setting/factory/index.jsx
View file @
2e168ae0
...
@@ -4,14 +4,23 @@ import DrawerPro from '@/components/DrawerPro';
...
@@ -4,14 +4,23 @@ import DrawerPro from '@/components/DrawerPro';
import
AutoTable
from
'@/components/AutoTable'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
getcolumns
from
'./columns'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
message
}
from
'antd'
;
function
Factory
(
props
)
{
function
Factory
(
props
)
{
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
formRef
=
useRef
();
formRef
=
useRef
();
const
[
drawer
,
set
d
rawer
]
=
useState
({
const
[
drawer
,
set
D
rawer
]
=
useState
({
visible
:
false
,
visible
:
false
,
});
});
const
urlParams
=
{
save
:
'/auth/sysFactory/saveOrUpdate'
,
remove
:
'/auth/sysFactory/delete'
,
list
:
'/auth/sysFactory/queryPage'
,
detail
:
'/auth/sysFactory/getById'
,
};
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
<
PremButton
<
PremButton
...
@@ -19,7 +28,7 @@ function Factory(props) {
...
@@ -19,7 +28,7 @@ function Factory(props) {
size
:
'small'
,
size
:
'small'
,
type
:
'link'
,
type
:
'link'
,
onClick
:
()
=>
{
onClick
:
()
=>
{
set
d
rawer
((
s
)
=>
({
set
D
rawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
item
:
row
,
item
:
row
,
...
@@ -41,12 +50,31 @@ function Factory(props) {
...
@@ -41,12 +50,31 @@ function Factory(props) {
btn=
{
{
btn=
{
{
size
:
'small'
,
size
:
'small'
,
onClick
:
()
=>
{
onClick
:
()
=>
{
set
d
rawer
((
s
)
=>
({
set
D
rawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
item
:
row
,
item
:
row
,
title
:
'编辑'
,
title
:
'编辑'
,
val
:
'edit'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
let
params
=
{
...
vals
,
id
:
row
.
id
,
};
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
}));
},
},
}
}
}
}
...
@@ -63,8 +91,16 @@ function Factory(props) {
...
@@ -63,8 +91,16 @@ function Factory(props) {
title
:
'是否删除该用户?'
,
title
:
'是否删除该用户?'
,
okText
:
'确认'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
onConfirm
:
async
()
=>
{
alert
(
0
);
let
res
=
await
doFetch
({
url
:
urlParams
.
remove
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'删除成功!'
);
setDraw
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
},
}
}
}
}
btn=
{
{
btn=
{
{
...
@@ -78,25 +114,21 @@ function Factory(props) {
...
@@ -78,25 +114,21 @@ function Factory(props) {
};
};
const
columns
=
useMemo
(()
=>
{
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
set
d
rawer
);
let
defcolumn
=
getcolumns
(
set
D
rawer
);
return
defcolumn
.
concat
({
return
defcolumn
.
concat
({
title
:
'操作'
,
title
:
'操作'
,
valueType
:
'option'
,
valueType
:
'option'
,
width
:
150
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
render
:
(
text
,
row
,
_
,
action
)
=>
[
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
)],
detail
(
text
,
row
,
_
,
action
),
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
});
});
},
[]);
},
[]);
return
(
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
<
AutoTable
pagetitle=
"工厂管理"
pagetitle=
{
<
h3
className=
"page-title"
>
工厂管理
</
h3
>
}
columns=
{
columns
}
columns=
{
columns
}
path=
"/auth/sysFactory/queryPage"
path=
{
urlParams
.
list
}
actionRef=
{
actionRef
}
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
pageextra=
{
'add'
}
resizeable=
{
false
}
resizeable=
{
false
}
...
@@ -105,12 +137,30 @@ function Factory(props) {
...
@@ -105,12 +137,30 @@ function Factory(props) {
btn
:
{
btn
:
{
disabled
:
false
,
disabled
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
set
d
rawer
((
s
)
=>
({
set
D
rawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
item
:
null
,
item
:
null
,
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
let
params
=
{
...
vals
,
};
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
}));
},
},
},
},
...
@@ -119,12 +169,13 @@ function Factory(props) {
...
@@ -119,12 +169,13 @@ function Factory(props) {
<
DrawerPro
<
DrawerPro
fields=
{
columns
}
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
// detailpath={urlParams.detail}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
// params={{ id: drawer?.item?.id }}
defaultFormValue=
{
drawer
?.
item
??
{}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
placement=
"right"
placement=
"right"
onClose=
{
()
=>
{
onClose=
{
()
=>
{
set
d
rawer
((
s
)
=>
({
set
D
rawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
}));
}));
...
...
This diff is collapsed.
Click to expand it.
src/pages/setting/section/columns.js
View file @
2e168ae0
function
getcolumns
(
setdrawer
)
{
function
getcolumns
(
setdrawer
)
{
return
[
return
[
{
title
:
'工段代码'
,
dataIndex
:
'sectionCode'
,
key
:
'sectionCode'
},
{
{
title
:
'基础信息'
,
title
:
'工段名称'
,
valueType
:
'split'
,
dataIndex
:
'sectionName'
,
key
:
'sectionName'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
},
{
{
title
:
'用户名'
,
title
:
'所属工厂'
,
dataIndex
:
'accountName'
,
dataIndex
:
'factoryName'
,
formItemProps
:
{
key
:
'factoryId'
,
rules
:
[
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
{
valueType
:
'select'
,
required
:
false
,
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{}
},
message
:
'此项为必填项'
,
},
],
},
initialValue
:
'默认值'
,
hideInForm
:
false
,
search
:
false
,
render
:
(
text
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
?.((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
}}
>
{
text
}
<
/a
>
);
},
},
{
title
:
'姓名'
,
dataIndex
:
'userName'
,
key
:
'userId'
,
hideInForm
:
{
accountName
:
{
reverse
:
[
'1'
,
'2'
,
'5'
],
},
remark
:
[
'3'
],
},
search
:
false
,
},
{
title
:
'额外信息'
,
valueType
:
'split'
,
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
search
:
false
,
},
{
title
:
'邮箱'
,
dataIndex
:
'mailNo'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
search
:
false
,
},
},
{
{
title
:
'备注'
,
title
:
'所属车间'
,
dataIndex
:
'remark'
,
dataIndex
:
'shopName'
,
valueType
:
'editor'
,
key
:
'shopName'
,
search
:
false
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
colProps
:
{
span
:
24
},
valueType
:
'select'
,
initialValue
:
'<p>Hello <b>World!</b></p>'
,
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
params
:
{}
},
},
{
title
:
'上传样式-图片'
,
dataIndex
:
'uploadImage'
,
key
:
'uploadImage'
,
valueType
:
'uploadImage'
,
fieldProps
:
{
limit
:
2
,
},
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
},
},
];
];
}
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/setting/section/index.jsx
View file @
2e168ae0
...
@@ -5,13 +5,20 @@ import AutoTable from '@/components/AutoTable';
...
@@ -5,13 +5,20 @@ import AutoTable from '@/components/AutoTable';
import
PremButton
from
'@/components/PremButton'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
getcolumns
from
'./columns'
;
function
Section
(
props
)
{
function
Factory
(
props
)
{
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
formRef
=
useRef
();
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
const
[
drawer
,
setdrawer
]
=
useState
({
visible
:
false
,
visible
:
false
,
});
});
const
urlParams
=
{
save
:
'/auth/sysShop/saveOrUpdate'
,
remove
:
'/auth/sysShop/delete'
,
list
:
'/auth/sysShop/queryPage'
,
detail
:
'/auth/sysShop/getById'
,
};
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
<
PremButton
<
PremButton
...
@@ -63,8 +70,16 @@ function Section(props) {
...
@@ -63,8 +70,16 @@ function Section(props) {
title
:
'是否删除该用户?'
,
title
:
'是否删除该用户?'
,
okText
:
'确认'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
onConfirm
:
async
()
=>
{
alert
(
0
);
let
res
=
await
doFetch
({
url
:
urlParams
.
remove
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'删除成功!'
);
setDraw
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
},
}
}
}
}
btn=
{
{
btn=
{
{
...
@@ -83,23 +98,19 @@ function Section(props) {
...
@@ -83,23 +98,19 @@ function Section(props) {
title
:
'操作'
,
title
:
'操作'
,
valueType
:
'option'
,
valueType
:
'option'
,
width
:
150
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
render
:
(
text
,
row
,
_
,
action
)
=>
[
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
)],
detail
(
text
,
row
,
_
,
action
),
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
});
});
},
[]);
},
[]);
return
(
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
<
AutoTable
pagetitle=
"
工段
管理"
pagetitle=
"
车间
管理"
columns=
{
columns
}
columns=
{
columns
}
path=
"/ngic-auth/sysUser/query/page"
path=
{
urlParams
.
list
}
actionRef=
{
actionRef
}
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
pageextra=
{
'add'
}
resizeable=
{
tru
e
}
resizeable=
{
fals
e
}
addconfig=
{
{
addconfig=
{
{
// access: 'sysDepartment_save',
// access: 'sysDepartment_save',
btn
:
{
btn
:
{
...
@@ -111,6 +122,23 @@ function Section(props) {
...
@@ -111,6 +122,23 @@ function Section(props) {
item
:
null
,
item
:
null
,
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
let
params
=
{
...
vals
,
};
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
setDraw
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
}));
},
},
},
},
...
@@ -119,7 +147,7 @@ function Section(props) {
...
@@ -119,7 +147,7 @@ function Section(props) {
<
DrawerPro
<
DrawerPro
fields=
{
columns
}
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
detailpath=
{
urlParams
.
detail
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
placement=
"right"
placement=
"right"
...
@@ -135,4 +163,4 @@ function Section(props) {
...
@@ -135,4 +163,4 @@ function Section(props) {
);
);
}
}
export
default
Section
;
export
default
Factory
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/setting/workshop/columns.js
View file @
2e168ae0
function
getcolumns
(
setdrawer
)
{
function
getcolumns
(
setdrawer
)
{
return
[
return
[
{
{
title
:
'基础信息'
,
title
:
'车间代码'
,
valueType
:
'split'
,
dataIndex
:
'shopCode'
,
key
:
'shopCode'
,
formItemProps
:
{
rules
:
[{
required
:
false
,
message
:
'此项为必填项'
}]
},
},
},
{
{
title
:
'用户名'
,
title
:
'车间名称'
,
dataIndex
:
'accountName'
,
dataIndex
:
'shopName'
,
formItemProps
:
{
key
:
'shopName'
,
rules
:
[
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
initialValue
:
'默认值'
,
hideInForm
:
false
,
search
:
false
,
render
:
(
text
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
?.((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
}}
>
{
text
}
<
/a
>
);
},
},
{
title
:
'姓名'
,
dataIndex
:
'userName'
,
key
:
'userId'
,
hideInForm
:
{
accountName
:
{
reverse
:
[
'1'
,
'2'
,
'5'
],
},
remark
:
[
'3'
],
},
search
:
false
,
},
{
title
:
'额外信息'
,
valueType
:
'split'
,
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
search
:
false
,
},
{
title
:
'邮箱'
,
dataIndex
:
'mailNo'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
search
:
false
,
},
},
{
{
title
:
'备注'
,
title
:
'所属工厂名称'
,
dataIndex
:
'remark'
,
dataIndex
:
'factoryName'
,
valueType
:
'editor'
,
key
:
'factoryCode'
,
search
:
false
,
valueType
:
'select'
,
colProps
:
{
span
:
24
},
options
:
{
path
:
'/auth/sysShop/queryPage'
,
params
:
{}
},
initialValue
:
'<p>Hello <b>World!</b></p>'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'上传样式-图片'
,
dataIndex
:
'uploadImage'
,
key
:
'uploadImage'
,
valueType
:
'uploadImage'
,
fieldProps
:
{
limit
:
2
,
},
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
},
},
];
];
}
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/setting/workshop/index.jsx
View file @
2e168ae0
...
@@ -4,14 +4,23 @@ import DrawerPro from '@/components/DrawerPro';
...
@@ -4,14 +4,23 @@ import DrawerPro from '@/components/DrawerPro';
import
AutoTable
from
'@/components/AutoTable'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
getcolumns
from
'./columns'
;
import
{
message
}
from
'antd'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
function
Workshop
(
props
)
{
function
Factory
(
props
)
{
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
formRef
=
useRef
();
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
const
[
drawer
,
setdrawer
]
=
useState
({
visible
:
false
,
visible
:
false
,
});
});
const
urlParams
=
{
save
:
'/auth/sysShop/saveOrUpdate'
,
remove
:
'/auth/sysShop/delete'
,
list
:
'/auth/sysShop/queryPage'
,
detail
:
'/auth/sysShop/getById'
,
};
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
<
PremButton
<
PremButton
...
@@ -63,8 +72,16 @@ function Workshop(props) {
...
@@ -63,8 +72,16 @@ function Workshop(props) {
title
:
'是否删除该用户?'
,
title
:
'是否删除该用户?'
,
okText
:
'确认'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
onConfirm
:
async
()
=>
{
alert
(
0
);
let
res
=
await
doFetch
({
url
:
urlParams
.
remove
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'删除成功!'
);
setDraw
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
},
}
}
}
}
btn=
{
{
btn=
{
{
...
@@ -83,23 +100,19 @@ function Workshop(props) {
...
@@ -83,23 +100,19 @@ function Workshop(props) {
title
:
'操作'
,
title
:
'操作'
,
valueType
:
'option'
,
valueType
:
'option'
,
width
:
150
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
render
:
(
text
,
row
,
_
,
action
)
=>
[
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
)],
detail
(
text
,
row
,
_
,
action
),
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
});
});
},
[]);
},
[]);
return
(
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
<
AutoTable
pagetitle=
"车间管理"
pagetitle=
{
<
h3
className=
"page-title"
>
车间管理
</
h3
>
}
columns=
{
columns
}
columns=
{
columns
}
path=
"/ngic-auth/sysUser/query/page"
path=
{
urlParams
.
list
}
actionRef=
{
actionRef
}
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
pageextra=
{
'add'
}
resizeable=
{
tru
e
}
resizeable=
{
fals
e
}
addconfig=
{
{
addconfig=
{
{
// access: 'sysDepartment_save',
// access: 'sysDepartment_save',
btn
:
{
btn
:
{
...
@@ -111,6 +124,23 @@ function Workshop(props) {
...
@@ -111,6 +124,23 @@ function Workshop(props) {
item
:
null
,
item
:
null
,
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
let
params
=
{
...
vals
,
};
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
setDraw
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
}));
},
},
},
},
...
@@ -119,8 +149,8 @@ function Workshop(props) {
...
@@ -119,8 +149,8 @@ function Workshop(props) {
<
DrawerPro
<
DrawerPro
fields=
{
columns
}
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
// detailpath={urlParams.detail}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
//
params={{ id: drawer?.item?.id }}
formRef=
{
formRef
}
formRef=
{
formRef
}
placement=
"right"
placement=
"right"
onClose=
{
()
=>
{
onClose=
{
()
=>
{
...
@@ -135,4 +165,4 @@ function Workshop(props) {
...
@@ -135,4 +165,4 @@ function Workshop(props) {
);
);
}
}
export
default
Workshop
;
export
default
Factory
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/zll/columns.js
deleted
100644 → 0
View file @
b3a18d30
function
getcolumns
(
setdrawer
)
{
return
[
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
valueType
:
'dateYear'
},
{
title
:
'修改人'
,
dataIndex
:
'updateUserName'
,
key
:
'updateUserId'
,
valueType
:
'select'
,
mode
:
'tags'
,
options
:
[
{
label
:
'123'
,
value
:
'1'
},
{
label
:
'123'
,
value
:
'12'
},
{
label
:
'123'
,
value
:
'123'
},
{
label
:
'123'
,
value
:
'1231'
},
],
formItemProps
:
{
rules
:
[{
required
:
false
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'创建人'
,
dataIndex
:
'createUserName'
,
key
:
'createUserName'
},
{
title
:
'更新时间'
,
dataIndex
:
'updateTime'
,
key
:
'updateTime'
},
{
title
:
'用户名'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
valueType
:
'uploadImage'
,
mode
:
'tags'
,
},
{
title
:
'姓名'
,
dataIndex
:
'fullName'
,
key
:
'fullName'
},
{
title
:
'电话'
,
dataIndex
:
'telephone'
,
key
:
'telephone'
},
];
}
export
default
getcolumns
;
This diff is collapsed.
Click to expand it.
src/pages/zll/index.jsx
deleted
100644 → 0
View file @
b3a18d30
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
tabList
from
'./tablist'
;
function
Zll
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
visible
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
"1"
);
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
row
.
userName
+
'的详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
row
,
title
:
'编辑'
,
val
:
'edit'
,
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除该用户?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
alert
(
0
);
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
,
activeTabKey
);
return
activeTabKey
==
"1"
?
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
detail
(
text
,
row
,
_
,
action
),
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
})
:
defcolumn
;
},
[
activeTabKey
]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"左玲玲"
columns=
{
columns
}
path=
"/ngic-auth/sysUser/query/page"
actionRef=
{
actionRef
}
pageextra=
{
activeTabKey
==
"1"
?
'add'
:
'none'
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
},
},
}
}
tabList=
{
tabList
}
activeTabKey=
{
activeTabKey
}
onTabChange=
{
(
key
)
=>
{
setactiveTabKey
(
key
)
}
}
/>
<
DrawerPro
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
}
}
{
...
drawer
}
/>
</
div
>
);
}
export
default
Zll
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/zll/tablist.js
deleted
100644 → 0
View file @
b3a18d30
export
default
[
{
key
:
"1"
,
tab
:
'未完成'
},
{
key
:
"2"
,
tab
:
'已完成'
}
]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/utils/request.js
View file @
2e168ae0
...
@@ -32,7 +32,7 @@ const errorHandler = (error) => {
...
@@ -32,7 +32,7 @@ const errorHandler = (error) => {
const
errorText
=
codeMessage
[
response
.
status
]
||
response
.
statusText
;
const
errorText
=
codeMessage
[
response
.
status
]
||
response
.
statusText
;
const
{
status
,
url
}
=
response
;
const
{
status
,
url
}
=
response
;
if
(
status
==
'401'
||
status
==
'302'
)
{
if
(
status
==
'401'
||
status
==
'302'
)
{
window
.
location
.
href
=
'http://idp.nangaoyun.com:8080/login'
;
//
window.location.href = 'http://idp.nangaoyun.com:8080/login';
}
}
}
else
if
(
!
response
)
{
}
else
if
(
!
response
)
{
notification
.
error
({
notification
.
error
({
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment