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
fd65ec2a
Commit
fd65ec2a
authored
Nov 10, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11.10
parent
7219878d
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
333 additions
and
221 deletions
+333
-221
authRoutes.js
config/authRoutes.js
+25
-8
proxy.js
config/proxy.js
+1
-1
FormItems.jsx
src/components/InitForm/FormItems.jsx
+22
-19
index.jsx
src/pages/device/account/index.jsx
+7
-0
columns.js
src/pages/device/model/columns.js
+16
-77
index.jsx
src/pages/device/model/index.jsx
+79
-20
columns.js
src/pages/device/supplier/columns.js
+67
-56
index.jsx
src/pages/device/supplier/index.jsx
+79
-21
index.jsx
src/pages/setting/factory/index.jsx
+5
-3
index.jsx
src/pages/setting/organization/index.jsx
+3
-1
columns.js
src/pages/setting/production/columns.js
+7
-2
index.jsx
src/pages/setting/production/index.jsx
+6
-4
index.jsx
src/pages/setting/role/index.jsx
+2
-1
columns.js
src/pages/setting/section/columns.js
+1
-1
index.jsx
src/pages/setting/section/index.jsx
+5
-3
index.jsx
src/pages/setting/users/index.jsx
+3
-1
index.jsx
src/pages/setting/workshop/index.jsx
+5
-3
No files found.
config/authRoutes.js
View file @
fd65ec2a
...
@@ -43,13 +43,30 @@ export default [
...
@@ -43,13 +43,30 @@ export default [
],
],
},
},
{
{
name
:
"设备管理"
,
name
:
'设备管理'
,
icon
:
'
BulbOutlined
'
,
icon
:
'
bulb
'
,
path
:
'/device'
,
path
:
'/device'
,
routes
:
[{
routes
:
[
name
:
'设备台账'
,
{
path
:
'/setting/account'
,
name
:
'设备台账'
,
component
:
'./setting/account'
,
path
:
'/device/account'
,
}]
component
:
'./device/account'
,
}
},
{
name
:
'设备类型'
,
path
:
'/device/type'
,
component
:
'./device/type'
,
},
{
name
:
'设备型号'
,
path
:
'/device/model'
,
component
:
'./device/model'
,
},
{
name
:
'设备供应商'
,
path
:
'/device/supplier'
,
component
:
'./device/supplier'
,
},
],
},
];
];
config/proxy.js
View file @
fd65ec2a
...
@@ -22,7 +22,7 @@ export default {
...
@@ -22,7 +22,7 @@ export default {
changeOrigin
:
true
,
changeOrigin
:
true
,
},
},
'/staticfile/'
:
{
'/staticfile/'
:
{
target
:
'http://192.168.40.
2
/'
,
target
:
'http://192.168.40.
68:9088
/'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
'^/staticfile'
:
''
,
'^/staticfile'
:
''
,
...
...
src/components/InitForm/FormItems.jsx
View file @
fd65ec2a
...
@@ -38,7 +38,7 @@ import EditTable from './EditTable';
...
@@ -38,7 +38,7 @@ import EditTable from './EditTable';
import
EditorItem
from
'./EditorItem'
;
import
EditorItem
from
'./EditorItem'
;
import
defaultSetting
from
'../../../config/defaultSettings'
;
import
defaultSetting
from
'../../../config/defaultSettings'
;
const
{
Image
,
Form
,
Upload
,
Col
,
Pagination
,
Avatar
,
Dropdown
,
Menu
,
Tabs
}
=
Antd
;
const
{
Image
,
Form
,
Upload
,
Col
,
Pagination
,
Avatar
,
Dropdown
,
Menu
,
Tabs
,
message
}
=
Antd
;
const
AntdCheckBox
=
Antd
.
Checkbox
;
const
AntdCheckBox
=
Antd
.
Checkbox
;
const
FormItems
=
{
const
FormItems
=
{
...
@@ -75,7 +75,6 @@ const FormItems = {
...
@@ -75,7 +75,6 @@ const FormItems = {
CheckboxItem
,
CheckboxItem
,
RadioItem
,
RadioItem
,
};
};
function
upperCase
(
str
)
{
function
upperCase
(
str
)
{
const
newStr
=
str
.
slice
(
0
,
1
).
toUpperCase
()
+
str
.
slice
(
1
);
const
newStr
=
str
.
slice
(
0
,
1
).
toUpperCase
()
+
str
.
slice
(
1
);
return
newStr
;
return
newStr
;
...
@@ -468,7 +467,6 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) {
...
@@ -468,7 +467,6 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) {
label=
{
item
.
title
}
label=
{
item
.
title
}
placeholder=
{
`请选择${item.title}`
}
placeholder=
{
`请选择${item.title}`
}
params=
{
params
}
params=
{
params
}
mode=
{
item
?.
mode
}
request=
{
async
(
parse
)
=>
{
request=
{
async
(
parse
)
=>
{
let
result
=
{};
let
result
=
{};
for
(
let
key
in
curlinkparams
)
{
for
(
let
key
in
curlinkparams
)
{
...
@@ -528,7 +526,6 @@ function NolinkSelect({ item, colProps }) {
...
@@ -528,7 +526,6 @@ function NolinkSelect({ item, colProps }) {
label=
{
item
.
title
}
label=
{
item
.
title
}
placeholder=
{
`请选择${item.title}`
}
placeholder=
{
`请选择${item.title}`
}
showSearch
showSearch
mode=
{
item
?.
mode
}
{
...
options
}
{
...
options
}
/>
/>
</>
</>
...
@@ -560,7 +557,6 @@ function LinkTreeSelect({ item, colProps, formRef, name, curindex }) {
...
@@ -560,7 +557,6 @@ function LinkTreeSelect({ item, colProps, formRef, name, curindex }) {
...
item
?.
fieldProps
,
...
item
?.
fieldProps
,
fieldNames
:
{
label
:
'title'
,
value
:
'key'
,
children
:
'children'
},
fieldNames
:
{
label
:
'title'
,
value
:
'key'
,
children
:
'children'
},
showSearch
:
false
,
showSearch
:
false
,
multiple
:
item
?.
mode
===
'multiple'
,
}
}
}
}
formItemProps=
{
item
.
formItemProps
}
formItemProps=
{
item
.
formItemProps
}
name=
{
curkey
}
name=
{
curkey
}
...
@@ -628,14 +624,12 @@ function NolinkTreeSelect({ item, colProps }) {
...
@@ -628,14 +624,12 @@ function NolinkTreeSelect({ item, colProps }) {
...
item
?.
fieldProps
,
...
item
?.
fieldProps
,
fieldNames
:
{
label
:
'title'
,
value
:
'key'
,
children
:
'children'
},
fieldNames
:
{
label
:
'title'
,
value
:
'key'
,
children
:
'children'
},
showSearch
:
true
,
showSearch
:
true
,
multiple
:
item
?.
mode
===
'multiple'
,
}
}
}
}
formItemProps=
{
item
.
formItemProps
}
formItemProps=
{
item
.
formItemProps
}
name=
{
item
.
key
??
item
.
dataIndex
}
name=
{
item
.
key
??
item
.
dataIndex
}
colProps=
{
item
.
colProps
??
colProps
}
colProps=
{
item
.
colProps
??
colProps
}
label=
{
item
.
title
}
label=
{
item
.
title
}
placeholder=
{
`请选择${item.title}`
}
placeholder=
{
`请选择${item.title}`
}
multiple
{
...
options
}
{
...
options
}
/>
/>
</>
</>
...
@@ -876,8 +870,7 @@ function LinkCascader({ item, colProps, formRef, name, curindex }) {
...
@@ -876,8 +870,7 @@ function LinkCascader({ item, colProps, formRef, name, curindex }) {
fieldProps=
{
{
fieldProps=
{
{
...
item
?.
fieldProps
,
...
item
?.
fieldProps
,
fieldNames
:
{
label
:
'title'
,
value
:
'key'
,
children
:
'children'
},
fieldNames
:
{
label
:
'title'
,
value
:
'key'
,
children
:
'children'
},
showSearch
:
true
,
showSearch
:
false
,
multiple
:
item
?.
mode
===
'multiple'
,
}
}
}
}
formItemProps=
{
item
.
formItemProps
}
formItemProps=
{
item
.
formItemProps
}
name=
{
curkey
}
name=
{
curkey
}
...
@@ -944,7 +937,6 @@ function NolinkCascader({ item, colProps }) {
...
@@ -944,7 +937,6 @@ function NolinkCascader({ item, colProps }) {
...
item
?.
fieldProps
,
...
item
?.
fieldProps
,
fieldNames
:
{
label
:
'title'
,
value
:
'key'
,
children
:
'children'
},
fieldNames
:
{
label
:
'title'
,
value
:
'key'
,
children
:
'children'
},
showSearch
:
true
,
showSearch
:
true
,
multiple
:
item
?.
mode
===
'multiple'
,
}
}
}
}
formItemProps=
{
item
.
formItemProps
}
formItemProps=
{
item
.
formItemProps
}
name=
{
item
.
key
??
item
.
dataIndex
}
name=
{
item
.
key
??
item
.
dataIndex
}
...
@@ -1016,12 +1008,14 @@ function Slider({ item, colProps }) {
...
@@ -1016,12 +1008,14 @@ function Slider({ item, colProps }) {
//uploadbtn
//uploadbtn
function
UploadBtn
({
item
,
colProps
})
{
function
UploadBtn
({
item
,
colProps
})
{
let
token
=
`Bearer
${
localStorage
.
getItem
(
'TOKENES'
)}
`
;
return
(
return
(
<>
<>
<
ProFormUploadButton
<
ProFormUploadButton
fieldProps=
{
{
fieldProps=
{
{
...
item
?.
fieldProps
,
...
item
?.
fieldProps
,
action
:
defaultSetting
.
proxypath
+
'/ngic-base-business/sysAttachment/uploadFile'
,
action
:
defaultSetting
.
proxypath
+
'/base/sysAttachment/uploadFile'
,
headers
:
{
Authorization
:
token
},
onPreview
:
(
file
)
=>
{
onPreview
:
(
file
)
=>
{
let
url
=
''
;
let
url
=
''
;
if
(
file
.
response
)
{
if
(
file
.
response
)
{
...
@@ -1052,15 +1046,15 @@ function UploadBtn({ item, colProps }) {
...
@@ -1052,15 +1046,15 @@ function UploadBtn({ item, colProps }) {
colProps=
{
item
.
colProps
??
colProps
}
colProps=
{
item
.
colProps
??
colProps
}
label=
{
item
.
title
}
label=
{
item
.
title
}
title=
{
`上传${item.title}`
}
title=
{
`上传${item.title}`
}
max=
{
item
.
max
}
/>
/>
</>
</>
);
);
}
}
function
UploadImg
({
value
,
onChange
,
fieldProps
})
{
function
UploadImg
({
value
,
onChange
,
fieldProps
})
{
let
token
=
`Bearer
${
localStorage
.
getItem
(
'TOKENES'
)}
`
;
const
[
image
,
setImage
]
=
useState
({});
const
[
image
,
setImage
]
=
useState
({});
let
token
=
'18e1081d54f57af2fdeac1964cc981e7'
;
function
beforeUpload
(
file
)
{
function
beforeUpload
(
file
)
{
const
isJpgOrPng
=
const
isJpgOrPng
=
file
.
type
===
'image/jpg'
||
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
;
file
.
type
===
'image/jpg'
||
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
;
...
@@ -1074,12 +1068,12 @@ function UploadImg({ value, onChange, fieldProps }) {
...
@@ -1074,12 +1068,12 @@ function UploadImg({ value, onChange, fieldProps }) {
// maxCount 最大数量
// maxCount 最大数量
const
defaultconfig
=
{
const
defaultconfig
=
{
name
:
'file'
,
name
:
'file'
,
action
:
defaultSetting
.
proxypath
+
'/
ngic-base-business
/sysAttachment/uploadFile'
,
action
:
defaultSetting
.
proxypath
+
'/
base
/sysAttachment/uploadFile'
,
accept
:
'.jpg,.png,.jpeg'
,
accept
:
'.jpg,.png,.jpeg'
,
listType
:
'picture-card'
,
listType
:
'picture-card'
,
beforeUpload
:
beforeUpload
,
beforeUpload
:
beforeUpload
,
defaultFileList
:
value
,
defaultFileList
:
value
,
headers
:
{
token
},
headers
:
{
Authorization
:
token
},
onChange
(
info
)
{
onChange
(
info
)
{
let
{
let
{
file
:
{
name
,
status
,
response
},
file
:
{
name
,
status
,
response
},
...
@@ -1090,7 +1084,7 @@ function UploadImg({ value, onChange, fieldProps }) {
...
@@ -1090,7 +1084,7 @@ function UploadImg({ value, onChange, fieldProps }) {
message
.
error
(
`
${
info
.
file
.
name
}
上传失败`
);
message
.
error
(
`
${
info
.
file
.
name
}
上传失败`
);
}
else
if
(
status
===
'done'
)
{
}
else
if
(
status
===
'done'
)
{
const
transfile
=
fileList
.
map
((
it
)
=>
{
const
transfile
=
fileList
.
map
((
it
)
=>
{
return
it
?.
response
?
it
?.
response
.
data
.
dataList
[
0
]
:
it
;
return
it
?.
response
?
it
?.
response
?.
data
?
.
dataList
[
0
]
:
it
;
});
});
onChange
(
transfile
);
onChange
(
transfile
);
}
}
...
@@ -1122,6 +1116,7 @@ function UploadImg({ value, onChange, fieldProps }) {
...
@@ -1122,6 +1116,7 @@ function UploadImg({ value, onChange, fieldProps }) {
<
div
style=
{
{
marginTop
:
8
}
}
>
上传图片
</
div
>
<
div
style=
{
{
marginTop
:
8
}
}
>
上传图片
</
div
>
</
div
>
</
div
>
);
);
console
.
log
(
value
?.
length
,
fieldProps
.
limit
);
return
(
return
(
<>
<>
<
Image
<
Image
...
@@ -1175,12 +1170,14 @@ function UploadImage({ item, colProps }) {
...
@@ -1175,12 +1170,14 @@ function UploadImage({ item, colProps }) {
// uploadDragger
// uploadDragger
function
UploadDragger
({
item
,
colProps
})
{
function
UploadDragger
({
item
,
colProps
})
{
let
token
=
`Bearer
${
localStorage
.
getItem
(
'TOKENES'
)}
`
;
return
(
return
(
<>
<>
<
ProFormUploadDragger
<
ProFormUploadDragger
fieldProps=
{
{
fieldProps=
{
{
...
item
?.
fieldProps
,
...
item
?.
fieldProps
,
action
:
defaultSetting
.
proxypath
+
'/ngic-base-business/sysAttachment/uploadFile'
,
action
:
defaultSetting
.
proxypath
+
'/base/sysAttachment/uploadFile'
,
headers
:
{
Authorization
:
token
},
onPreview
:
(
file
)
=>
{
onPreview
:
(
file
)
=>
{
let
url
=
''
;
let
url
=
''
;
if
(
file
.
response
)
{
if
(
file
.
response
)
{
...
@@ -1227,14 +1224,20 @@ function Editor({ item, colProps, formRef }) {
...
@@ -1227,14 +1224,20 @@ function Editor({ item, colProps, formRef }) {
// }}
// }}
transform=
{
(
value
)
=>
{
transform=
{
(
value
)
=>
{
return
{
return
{
[
curkey
]:
value
.
toHTML
(),
[
curkey
]:
value
&&
value
?.
toHTML
?.
(),
};
};
}
}
}
}
name=
{
curkey
}
name=
{
curkey
}
label=
{
item
.
title
}
label=
{
item
.
title
}
{
...
item
.
formItemProps
}
{
...
item
.
formItemProps
}
>
>
<
EditorItem
item=
{
item
}
params=
{
item
.
params
}
formRef=
{
formRef
}
curkey=
{
curkey
}
/>
<
EditorItem
serverURL=
{
defaultSetting
.
proxypath
+
'/base/sysAttachment/uploadFile'
}
item=
{
item
}
params=
{
item
.
params
}
formRef=
{
formRef
}
curkey=
{
curkey
}
/>
</
ProForm
.
Item
>
</
ProForm
.
Item
>
</
Col
>
</
Col
>
);
);
...
...
src/pages/device/account/index.jsx
View file @
fd65ec2a
/*
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-10 09:39:56
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
...
...
src/pages/device/model/columns.js
View file @
fd65ec2a
import
{
Image
}
from
'antd'
;
function
getcolumns
(
setdrawer
)
{
function
getcolumns
(
setdrawer
)
{
return
[
return
[
{
{
title
:
'基础信息'
,
title
:
'设备型号'
,
valueType
:
'split'
,
dataIndex
:
'equipmentModelName'
,
},
key
:
'equipmentModelName'
,
{
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
:
'userName'
,
key
:
'userId'
,
hideInForm
:
{
accountName
:
{
reverse
:
[
'1'
,
'2'
,
'5'
],
},
remark
:
[
'3'
],
},
search
:
false
,
},
{
title
:
'额外信息'
,
valueType
:
'split'
,
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
formItemProps
:
{
formItemProps
:
{
rules
:
[
rules
:
[
{
{
...
@@ -63,45 +13,34 @@ function getcolumns(setdrawer) {
...
@@ -63,45 +13,34 @@ function getcolumns(setdrawer) {
},
},
],
],
},
},
search
:
false
,
},
{
title
:
'邮箱'
,
dataIndex
:
'mailNo'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
search
:
false
,
},
},
{
{
title
:
'备注'
,
title
:
'备注'
,
dataIndex
:
'remark'
,
dataIndex
:
'modelDescription'
,
valueType
:
'editor'
,
key
:
'modelDescription'
,
initialValue
:
'默认值'
,
hideInForm
:
false
,
search
:
false
,
search
:
false
,
colProps
:
{
span
:
24
},
initialValue
:
'<p>Hello <b>World!</b></p>'
,
},
},
{
{
title
:
'上传样式-图片'
,
title
:
'设备图片'
,
dataIndex
:
'uploadImage'
,
dataIndex
:
'pictureUrl'
,
key
:
'uploadImage'
,
key
:
'picList'
,
search
:
false
,
valueType
:
'uploadImage'
,
valueType
:
'uploadImage'
,
fieldProps
:
{
fieldProps
:
{
limit
:
2
,
limit
:
1
,
},
},
formItemProps
:
{
formItemProps
:
{
rules
:
[
rules
:
[
{
{
required
:
fals
e
,
required
:
tru
e
,
message
:
'此项为必填项'
,
message
:
'此项为必填项'
,
},
},
],
],
},
},
hideInTable
:
false
,
render
:
(
text
,
row
)
=>
<
Image
width
=
{
70
}
src
=
{
row
.
pictureUrl
}
/>
,
},
},
];
];
}
}
...
...
src/pages/device/model/index.jsx
View file @
fd65ec2a
/* 设备型号
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-10 15:12:23
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
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
Model
(
props
)
{
function
Model
(
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
:
'/asset/equipmentModel/save'
,
remove
:
'/asset/equipmentModel/deleteById'
,
list
:
'/asset/equipmentModel/queryList'
,
detail
:
'/asset/equipmentModel/queryById'
,
};
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
<
PremButton
<
PremButton
...
@@ -19,7 +35,7 @@ function Model(props) {
...
@@ -19,7 +35,7 @@ function Model(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 +57,32 @@ function Model(props) {
...
@@ -41,12 +57,32 @@ function Model(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
,
title
:
'编辑'
,
title
:
'编辑'
,
val
:
'edit'
,
val
:
'edit'
,
detailpath
:
urlParams
.
detail
,
params
:
{
id
:
row
.
id
},
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 +99,16 @@ function Model(props) {
...
@@ -63,8 +99,16 @@ function Model(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
(
'删除成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
},
}
}
}
}
btn=
{
{
btn=
{
{
...
@@ -78,39 +122,55 @@ function Model(props) {
...
@@ -78,39 +122,55 @@ function Model(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=
"/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
:
{
disabled
:
false
,
disabled
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
set
d
rawer
((
s
)
=>
({
set
D
rawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
item
:
null
,
item
:
null
,
detailpath
:
null
,
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
// console.log(1);
console
.
log
(
drawer
);
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 +179,11 @@ function Model(props) {
...
@@ -119,12 +179,11 @@ function Model(props) {
<
DrawerPro
<
DrawerPro
fields=
{
columns
}
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
defaultFormValue=
{
drawer
?.
item
??
{}
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
placement=
"right"
placement=
"right"
onClose=
{
()
=>
{
onClose=
{
()
=>
{
set
d
rawer
((
s
)
=>
({
set
D
rawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
}));
}));
...
@@ -135,4 +194,4 @@ function Model(props) {
...
@@ -135,4 +194,4 @@ function Model(props) {
);
);
}
}
export
default
Model
;
export
default
Model
;
\ No newline at end of file
src/pages/device/supplier/columns.js
View file @
fd65ec2a
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
Switch
}
from
'antd'
;
function
getcolumns
(
setdrawer
)
{
function
getcolumns
(
setdrawer
)
{
return
[
return
[
{
{
title
:
'基础信息'
,
title
:
'供应商编号'
,
valueType
:
'split'
,
dataIndex
:
'supplierNo'
,
key
:
'supplierNo'
,
hideInForm
:
{
accountName
:
{
reverse
:
[
'1'
,
'2'
,
'5'
],
},
remark
:
[
'3'
],
},
},
},
{
{
title
:
'用户名'
,
title
:
'供应商名称'
,
dataIndex
:
'accountName'
,
dataIndex
:
'supplierName'
,
key
:
'supplierName'
,
formItemProps
:
{
formItemProps
:
{
rules
:
[
rules
:
[
{
{
...
@@ -15,46 +25,11 @@ function getcolumns(setdrawer) {
...
@@ -15,46 +25,11 @@ function getcolumns(setdrawer) {
},
},
],
],
},
},
initialValue
:
'默认值'
,
hideInForm
:
false
,
search
:
false
,
render
:
(
text
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
?.((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
}}
>
{
text
}
<
/a
>
);
},
},
},
{
{
title
:
'姓名'
,
title
:
'电话'
,
dataIndex
:
'userName'
,
key
:
'userId'
,
hideInForm
:
{
accountName
:
{
reverse
:
[
'1'
,
'2'
,
'5'
],
},
remark
:
[
'3'
],
},
search
:
false
,
},
{
title
:
'额外信息'
,
valueType
:
'split'
,
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
dataIndex
:
'telephone'
,
key
:
'telephone'
,
formItemProps
:
{
formItemProps
:
{
rules
:
[
rules
:
[
{
{
...
@@ -63,11 +38,11 @@ function getcolumns(setdrawer) {
...
@@ -63,11 +38,11 @@ function getcolumns(setdrawer) {
},
},
],
],
},
},
search
:
false
,
},
},
{
{
title
:
'邮箱'
,
title
:
'邮箱'
,
dataIndex
:
'mailNo'
,
dataIndex
:
'email'
,
key
:
'email'
,
formItemProps
:
{
formItemProps
:
{
rules
:
[
rules
:
[
{
{
...
@@ -76,24 +51,37 @@ function getcolumns(setdrawer) {
...
@@ -76,24 +51,37 @@ function getcolumns(setdrawer) {
},
},
],
],
},
},
search
:
false
,
},
},
{
{
title
:
'备注'
,
title
:
'地址'
,
dataIndex
:
'remark'
,
dataIndex
:
'address'
,
valueType
:
'editor'
,
key
:
'address'
,
search
:
false
,
formItemProps
:
{
colProps
:
{
span
:
24
},
rules
:
[
initialValue
:
'<p>Hello <b>World!</b></p>'
,
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
},
},
{
{
title
:
'上传样式-图片'
,
title
:
'评分'
,
dataIndex
:
'uploadImage'
,
dataIndex
:
'score'
,
key
:
'uploadImage'
,
formItemProps
:
{
valueType
:
'uploadImage'
,
rules
:
[
fieldProps
:
{
{
limit
:
2
,
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
},
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
valueType
:
'radio'
,
formItemProps
:
{
formItemProps
:
{
rules
:
[
rules
:
[
{
{
...
@@ -102,6 +90,29 @@ function getcolumns(setdrawer) {
...
@@ -102,6 +90,29 @@ function getcolumns(setdrawer) {
},
},
],
],
},
},
render
:
(
text
,
row
)
=>
{
return
(
<
Switch
checkedChildren
=
"启用"
unCheckedChildren
=
"禁用"
defaultChecked
=
{
row
.
status
==
1
}
onChange
=
{(
flag
)
=>
{
// console.log(e);
if
(
flag
)
{
doFetch
({
url
:
'/asset/equipmentSupplier/update/status'
,
params
:
{
id
:
row
.
id
,
status
:
'1'
},
});
}
else
{
doFetch
({
url
:
'/asset/equipmentSupplier/update/status'
,
params
:
{
id
:
row
.
id
,
status
:
'2'
},
});
}
}}
/
>
);
},
},
},
];
];
}
}
...
...
src/pages/device/supplier/index.jsx
View file @
fd65ec2a
/* 设备供应商
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-10 16:57:58
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
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
Supplier
(
props
)
{
function
Supplier
(
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
:
'/asset/equipmentSupplier/save'
,
remove
:
'/asset/equipmentSupplier/deleteById'
,
list
:
'/asset/equipmentSupplier/queryList'
,
detail
:
'/asset/equipmentSupplier/query/detail'
,
detail_nocp
:
'/asset/equipmentSupplier/queryById'
,
};
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
<
PremButton
<
PremButton
...
@@ -19,7 +36,7 @@ function Supplier(props) {
...
@@ -19,7 +36,7 @@ function Supplier(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 +58,32 @@ function Supplier(props) {
...
@@ -41,12 +58,32 @@ function Supplier(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
,
detailpath
:
urlParams
.
detail
,
params
:
{
id
:
drawer
?.
item
?.
id
},
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
();
}
},
}));
}));
},
},
}
}
}
}
...
@@ -60,11 +97,19 @@ function Supplier(props) {
...
@@ -60,11 +97,19 @@ function Supplier(props) {
return
(
return
(
<
PremButton
<
PremButton
pop=
{
{
pop=
{
{
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
(
'删除成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
},
}
}
}
}
btn=
{
{
btn=
{
{
...
@@ -78,39 +123,53 @@ function Supplier(props) {
...
@@ -78,39 +123,53 @@ function Supplier(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=
"/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
:
{
disabled
:
false
,
disabled
:
false
,
type
:
'primary'
,
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
)
=>
{
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 +178,11 @@ function Supplier(props) {
...
@@ -119,12 +178,11 @@ function Supplier(props) {
<
DrawerPro
<
DrawerPro
fields=
{
columns
}
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
defaultFormValue=
{
drawer
?.
item
??
{}
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
placement=
"right"
placement=
"right"
onClose=
{
()
=>
{
onClose=
{
()
=>
{
set
d
rawer
((
s
)
=>
({
set
D
rawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
}));
}));
...
@@ -135,4 +193,4 @@ function Supplier(props) {
...
@@ -135,4 +193,4 @@ function Supplier(props) {
);
);
}
}
export
default
Supplier
;
export
default
Supplier
;
\ No newline at end of file
src/pages/setting/factory/index.jsx
View file @
fd65ec2a
/* 工厂管理
/* 工厂管理
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Date: 2022-11-09 14:44:44
* @Last Modified by:
Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-
09 14:44:4
4
* @Last Modified time: 2022-11-
10 15:41:2
4
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -95,7 +95,7 @@ function Factory(props) {
...
@@ -95,7 +95,7 @@ function Factory(props) {
return
(
return
(
<
PremButton
<
PremButton
pop=
{
{
pop=
{
{
title
:
'是否删除该
用户
?'
,
title
:
'是否删除该
工厂
?'
,
okText
:
'确认'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
onConfirm
:
async
()
=>
{
...
@@ -142,12 +142,14 @@ function Factory(props) {
...
@@ -142,12 +142,14 @@ function Factory(props) {
addconfig=
{
{
addconfig=
{
{
// access: 'sysDepartment_save',
// access: 'sysDepartment_save',
btn
:
{
btn
:
{
type
:
'primary'
,
disabled
:
false
,
disabled
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
setDrawer
((
s
)
=>
({
setDrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
item
:
null
,
item
:
null
,
detailpath
:
null
,
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
...
...
src/pages/setting/organization/index.jsx
View file @
fd65ec2a
...
@@ -103,12 +103,14 @@ function Organization(props) {
...
@@ -103,12 +103,14 @@ function Organization(props) {
addconfig=
{
{
addconfig=
{
{
// access: 'sysDepartment_save',
// access: 'sysDepartment_save',
btn
:
{
btn
:
{
type
:
'primary'
,
disabled
:
false
,
disabled
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
item
:
null
,
item
:
null
,
detailpath
:
null
,
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
}));
}));
...
@@ -135,4 +137,4 @@ function Organization(props) {
...
@@ -135,4 +137,4 @@ function Organization(props) {
);
);
}
}
export
default
Organization
;
export
default
Organization
;
\ No newline at end of file
src/pages/setting/production/columns.js
View file @
fd65ec2a
...
@@ -18,10 +18,15 @@ function getcolumns(setdrawer) {
...
@@ -18,10 +18,15 @@ function getcolumns(setdrawer) {
{
{
title
:
'所属车间'
,
title
:
'所属车间'
,
dataIndex
:
'shopName'
,
dataIndex
:
'shopName'
,
key
:
'shop
Name
'
,
key
:
'shop
Id
'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
valueType
:
'select'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
params
:
{}
},
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
linkParams
:
{
factoryId
:
''
,
//key 后面如果存在value 则该value会在调用接口时format
},
},
},
},
];
];
}
}
...
...
src/pages/setting/production/index.jsx
View file @
fd65ec2a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-09 14:43:54
* @Date: 2022-11-09 14:43:54
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-
09 16:47:4
1
* @Last Modified time: 2022-11-
10 16:25:1
1
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -67,11 +67,11 @@ function Section(props) {
...
@@ -67,11 +67,11 @@ function Section(props) {
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
id
:
row
.
id
,
};
};
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
url
:
urlParams
.
save
,
params
,
params
,
id
:
row
.
id
,
});
});
if
(
res
.
code
===
'0000'
)
{
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
message
.
success
(
'新增成功!'
);
...
@@ -95,7 +95,7 @@ function Section(props) {
...
@@ -95,7 +95,7 @@ function Section(props) {
return
(
return
(
<
PremButton
<
PremButton
pop=
{
{
pop=
{
{
title
:
'是否删除该
用户
?'
,
title
:
'是否删除该
产线
?'
,
okText
:
'确认'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
onConfirm
:
async
()
=>
{
...
@@ -142,12 +142,14 @@ function Section(props) {
...
@@ -142,12 +142,14 @@ function Section(props) {
addconfig=
{
{
addconfig=
{
{
// access: 'sysDepartment_save',
// access: 'sysDepartment_save',
btn
:
{
btn
:
{
type
:
'primary'
,
disabled
:
false
,
disabled
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
item
:
null
,
item
:
null
,
detailpath
:
null
,
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
...
@@ -160,7 +162,7 @@ function Section(props) {
...
@@ -160,7 +162,7 @@ function Section(props) {
});
});
if
(
res
.
code
===
'0000'
)
{
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
message
.
success
(
'新增成功!'
);
set
Draw
((
s
)
=>
({
set
drawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
}));
}));
...
...
src/pages/setting/role/index.jsx
View file @
fd65ec2a
...
@@ -103,6 +103,7 @@ function Role(props) {
...
@@ -103,6 +103,7 @@ function Role(props) {
addconfig=
{
{
addconfig=
{
{
// access: 'sysDepartment_save',
// access: 'sysDepartment_save',
btn
:
{
btn
:
{
type
:
'primary'
,
disabled
:
false
,
disabled
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
@@ -135,4 +136,4 @@ function Role(props) {
...
@@ -135,4 +136,4 @@ function Role(props) {
);
);
}
}
export
default
Role
;
export
default
Role
;
\ No newline at end of file
src/pages/setting/section/columns.js
View file @
fd65ec2a
...
@@ -24,7 +24,7 @@ function getcolumns(setdrawer) {
...
@@ -24,7 +24,7 @@ function getcolumns(setdrawer) {
options
:
{
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
linkParams
:
{
linkParams
:
{
factoryId
:
'
factoryId
'
,
//key 后面如果存在value 则该value会在调用接口时format
factoryId
:
''
,
//key 后面如果存在value 则该value会在调用接口时format
},
},
},
},
},
},
...
...
src/pages/setting/section/index.jsx
View file @
fd65ec2a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-09 14:43:54
* @Date: 2022-11-09 14:43:54
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-
09 16:48:08
* @Last Modified time: 2022-11-
10 15:37:21
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -95,7 +95,7 @@ function Section(props) {
...
@@ -95,7 +95,7 @@ function Section(props) {
return
(
return
(
<
PremButton
<
PremButton
pop=
{
{
pop=
{
{
title
:
'是否删除该
用户
?'
,
title
:
'是否删除该
工段
?'
,
okText
:
'确认'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
onConfirm
:
async
()
=>
{
...
@@ -142,12 +142,14 @@ function Section(props) {
...
@@ -142,12 +142,14 @@ function Section(props) {
addconfig=
{
{
addconfig=
{
{
// access: 'sysDepartment_save',
// access: 'sysDepartment_save',
btn
:
{
btn
:
{
type
:
'primary'
,
disabled
:
false
,
disabled
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
item
:
null
,
item
:
null
,
detailpath
:
null
,
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
...
@@ -160,7 +162,7 @@ function Section(props) {
...
@@ -160,7 +162,7 @@ function Section(props) {
});
});
if
(
res
.
code
===
'0000'
)
{
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
message
.
success
(
'新增成功!'
);
set
Draw
((
s
)
=>
({
set
drawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
}));
}));
...
...
src/pages/setting/users/index.jsx
View file @
fd65ec2a
...
@@ -103,12 +103,14 @@ function Users(props) {
...
@@ -103,12 +103,14 @@ function Users(props) {
addconfig=
{
{
addconfig=
{
{
// access: 'sysDepartment_save',
// access: 'sysDepartment_save',
btn
:
{
btn
:
{
type
:
'primary'
,
disabled
:
false
,
disabled
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
item
:
null
,
item
:
null
,
detailpath
:
null
,
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
}));
}));
...
@@ -135,4 +137,4 @@ function Users(props) {
...
@@ -135,4 +137,4 @@ function Users(props) {
);
);
}
}
export
default
Users
;
export
default
Users
;
\ No newline at end of file
src/pages/setting/workshop/index.jsx
View file @
fd65ec2a
/* 车间管理
/* 车间管理
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:18
* @Date: 2022-11-09 14:44:18
* @Last Modified by:
Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-
09 14:44:18
* @Last Modified time: 2022-11-
10 15:36:27
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -141,12 +141,14 @@ function Factory(props) {
...
@@ -141,12 +141,14 @@ function Factory(props) {
addconfig=
{
{
addconfig=
{
{
// access: 'sysDepartment_save',
// access: 'sysDepartment_save',
btn
:
{
btn
:
{
type
:
'primary'
,
disabled
:
false
,
disabled
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
item
:
null
,
item
:
null
,
detailpath
:
null
,
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
...
@@ -159,7 +161,7 @@ function Factory(props) {
...
@@ -159,7 +161,7 @@ function Factory(props) {
});
});
if
(
res
.
code
===
'0000'
)
{
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
message
.
success
(
'新增成功!'
);
set
Draw
((
s
)
=>
({
set
drawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
}));
}));
...
...
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