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
7219878d
Commit
7219878d
authored
Nov 09, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11.9下午
parent
2e168ae0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
194 additions
and
131 deletions
+194
-131
authRoutes.js
config/authRoutes.js
+20
-1
index.jsx
src/pages/setting/factory/index.jsx
+8
-1
columns.js
src/pages/setting/production/columns.js
+17
-97
index.jsx
src/pages/setting/production/index.jsx
+72
-15
columns.js
src/pages/setting/section/columns.js
+7
-2
index.jsx
src/pages/setting/section/index.jsx
+40
-11
columns.js
src/pages/setting/workshop/columns.js
+2
-2
index.jsx
src/pages/setting/workshop/index.jsx
+28
-2
No files found.
config/authRoutes.js
View file @
7219878d
...
...
@@ -25,12 +25,31 @@ export default [
path
:
'/setting/factory'
,
component
:
'./setting/factory'
,
},
{
name
:
'车间管理'
,
path
:
'/setting/workshop'
,
component
:
'./setting/workshop'
,
},
{
name
:
'工段管理'
,
path
:
'/setting/section'
,
component
:
'./setting/section'
,
},
{
name
:
'产线管理'
,
path
:
'/setting/production'
,
component
:
'./setting/production'
,
},
],
},
{
name
:
"设备管理"
,
icon
:
'BulbOutlined'
,
path
:
'/device'
,
routes
:
[{
name
:
'设备台账'
,
path
:
'/setting/account'
,
component
:
'./setting/account'
,
}]
}
];
src/pages/setting/factory/index.jsx
View file @
7219878d
/* 工厂管理
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-09 14:44:44
*/
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
...
...
@@ -95,7 +102,7 @@ function Factory(props) {
let
res
=
await
doFetch
({
url
:
urlParams
.
remove
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'删除成功!'
);
setDraw
((
s
)
=>
({
setDraw
er
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
...
...
src/pages/setting/production/columns.js
View file @
7219878d
function
getcolumns
(
setdrawer
)
{
return
[
{
title
:
'产线代码'
,
dataIndex
:
'productionLineCode'
,
key
:
'productionLineCode'
},
{
title
:
'基础信息'
,
valueType
:
'split'
,
title
:
'产线名称'
,
dataIndex
:
'productionLineName'
,
key
:
'productionLineName'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'用户名'
,
dataIndex
:
'accountName'
,
formItemProps
:
{
rules
:
[
{
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
:
'factoryName'
,
key
:
'factoryId'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{}
},
},
{
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
:
'备注'
,
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
:
'所属车间'
,
dataIndex
:
'shopName'
,
key
:
'shopName'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
params
:
{}
},
},
];
}
...
...
src/pages/setting/production/index.jsx
View file @
7219878d
/* 产线管理
* @Author: Li Hanlin
* @Date: 2022-11-09 14:43:54
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-09 16:47:41
*/
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
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
message
}
from
'antd'
;
function
Produ
ction
(
props
)
{
function
Se
ction
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
visible
:
false
,
});
const
urlParams
=
{
save
:
'/auth/sysProductionLine/saveOrUpdate'
,
remove
:
'/auth/sysProductionLine/delete'
,
list
:
'/auth/sysProductionLine/queryPage'
,
detail
:
'/auth/sysProductionLine/getById'
,
};
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
...
...
@@ -44,9 +60,28 @@ function Production(props) {
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
row
,
title
:
'编辑'
,
params
:
{
id
:
row
.
id
},
detailpath
:
urlParams
.
detail
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
let
params
=
{
...
vals
,
};
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
id
:
row
.
id
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
},
}
}
...
...
@@ -63,8 +98,16 @@ function Production(props) {
title
:
'是否删除该用户?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
alert
(
0
);
onConfirm
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
urlParams
.
remove
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'删除成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}
}
btn=
{
{
...
...
@@ -83,23 +126,19 @@ function Production(props) {
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
detail
(
text
,
row
,
_
,
action
),
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
render
:
(
text
,
row
,
_
,
action
)
=>
[
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
)],
});
},
[]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"产线管理"
pagetitle=
{
<
h3
className=
"page-title"
>
产线管理
</
h3
>
}
columns=
{
columns
}
path=
"/ngic-auth/sysUser/query/page"
path=
{
urlParams
.
list
}
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
resizeable=
{
tru
e
}
resizeable=
{
fals
e
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
...
...
@@ -111,6 +150,23 @@ function Production(props) {
item
:
null
,
title
:
'新增'
,
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 +175,9 @@ function Production(props) {
<
DrawerPro
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
// detailpath={urlParams.detail}
// params={{ id: drawer?.item?.id }}
defaultFormValue=
{
drawer
?.
item
??
{}
}
formRef=
{
formRef
}
placement=
"right"
onClose=
{
()
=>
{
...
...
@@ -135,4 +192,4 @@ function Production(props) {
);
}
export
default
Production
;
\ No newline at end of file
export
default
Section
;
src/pages/setting/section/columns.js
View file @
7219878d
...
...
@@ -18,10 +18,15 @@ function getcolumns(setdrawer) {
{
title
:
'所属车间'
,
dataIndex
:
'shopName'
,
key
:
'shop
Name
'
,
key
:
'shop
Id
'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
params
:
{}
},
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
linkParams
:
{
factoryId
:
'factoryId'
,
//key 后面如果存在value 则该value会在调用接口时format
},
},
},
];
}
...
...
src/pages/setting/section/index.jsx
View file @
7219878d
/* 工段管理
* @Author: Li Hanlin
* @Date: 2022-11-09 14:43:54
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-09 16:48:08
*/
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
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
message
}
from
'antd'
;
function
Factory
(
props
)
{
function
Section
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
...
...
@@ -13,10 +22,10 @@ function Factory(props) {
});
const
urlParams
=
{
save
:
'/auth/sysS
hop
/saveOrUpdate'
,
remove
:
'/auth/sysS
hop
/delete'
,
list
:
'/auth/sysS
hop
/queryPage'
,
detail
:
'/auth/sysS
hop
/getById'
,
save
:
'/auth/sysS
ection
/saveOrUpdate'
,
remove
:
'/auth/sysS
ection
/delete'
,
list
:
'/auth/sysS
ection
/queryPage'
,
detail
:
'/auth/sysS
ection
/getById'
,
};
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
...
...
@@ -51,9 +60,28 @@ function Factory(props) {
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
row
,
title
:
'编辑'
,
params
:
{
id
:
row
.
id
},
detailpath
:
'/auth/sysSection/getById'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
let
params
=
{
...
vals
,
};
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
id
:
row
.
id
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
},
}
}
...
...
@@ -74,7 +102,7 @@ function Factory(props) {
let
res
=
await
doFetch
({
url
:
urlParams
.
remove
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'删除成功!'
);
set
Draw
((
s
)
=>
({
set
drawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
...
...
@@ -105,7 +133,7 @@ function Factory(props) {
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"车间管理"
pagetitle=
{
<
h3
className=
"page-title"
>
工段管理
</
h3
>
}
columns=
{
columns
}
path=
{
urlParams
.
list
}
actionRef=
{
actionRef
}
...
...
@@ -147,8 +175,9 @@ function Factory(props) {
<
DrawerPro
fields=
{
columns
}
detailpath=
{
urlParams
.
detail
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
// detailpath={urlParams.detail}
// params={{ id: drawer?.item?.id }}
defaultFormValue=
{
drawer
?.
item
??
{}
}
formRef=
{
formRef
}
placement=
"right"
onClose=
{
()
=>
{
...
...
@@ -163,4 +192,4 @@ function Factory(props) {
);
}
export
default
Factory
;
export
default
Section
;
src/pages/setting/workshop/columns.js
View file @
7219878d
...
...
@@ -15,9 +15,9 @@ function getcolumns(setdrawer) {
{
title
:
'所属工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factory
Code
'
,
key
:
'factory
Id
'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sys
Shop/queryPage
'
,
params
:
{}
},
options
:
{
path
:
'/auth/sys
Factory/getAllFactorySelection
'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
];
...
...
src/pages/setting/workshop/index.jsx
View file @
7219878d
/* 车间管理
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:18
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-09 14:44:18
*/
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
...
...
@@ -56,6 +63,24 @@ function Factory(props) {
item
:
row
,
title
:
'编辑'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
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
();
}
},
}));
},
}
}
...
...
@@ -69,14 +94,14 @@ function Factory(props) {
return
(
<
PremButton
pop=
{
{
title
:
'是否删除该
用户
?'
,
title
:
'是否删除该
车间
?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
urlParams
.
remove
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'删除成功!'
);
set
Draw
((
s
)
=>
({
set
drawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
...
...
@@ -151,6 +176,7 @@ function Factory(props) {
fields=
{
columns
}
// detailpath={urlParams.detail}
// params={{ id: drawer?.item?.id }}
defaultFormValue=
{
drawer
?.
item
??
{}
}
formRef=
{
formRef
}
placement=
"right"
onClose=
{
()
=>
{
...
...
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