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
83519c19
Commit
83519c19
authored
Nov 28, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1128
parent
09b97e6e
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
813 additions
and
365 deletions
+813
-365
settings.json
.vscode/settings.json
+1
-1
authRoutes.js
config/authRoutes.js
+108
-89
index.jsx
src/pages/repair/failure/index.jsx
+2
-2
index.jsx
src/pages/repair/track/index.jsx
+1
-3
columns.js
src/pages/setting/organization/columns.js
+0
-1
index.jsx
src/pages/setting/organization/index.jsx
+1
-1
columns.js
src/pages/system/dictionary/columns.js
+70
-0
index.jsx
src/pages/system/dictionary/index.jsx
+264
-0
columns.js
src/pages/system/field/columns.js
+100
-0
index.jsx
src/pages/system/field/index.jsx
+264
-0
columns.js
src/pages/treezll/columns.js
+0
-109
index.jsx
src/pages/treezll/index.jsx
+0
-151
tree.js
src/pages/treezll/tree.js
+0
-5
index.jsx
src/pages/welcome/index.jsx
+2
-3
No files found.
.vscode/settings.json
View file @
83519c19
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
"editor.formatOnSave"
:
true
,
"editor.formatOnSave"
:
true
,
"prettier.requireConfig"
:
true
,
"prettier.requireConfig"
:
true
,
"editor.defaultFormatter"
:
"esbenp.prettier-vscode"
,
"editor.defaultFormatter"
:
"esbenp.prettier-vscode"
,
"cSpell.words"
:
[
"onselecte"
,
"setdrawer"
]
"cSpell.words"
:
[
"onselecte"
,
"setdrawer"
,
"Sider"
]
}
}
config/authRoutes.js
View file @
83519c19
export
default
[
export
default
[
{
{
"path"
:
"/welcome"
,
path
:
'/welcome'
,
"name"
:
"欢迎"
,
name
:
'欢迎'
,
"icon"
:
"smile"
,
icon
:
'smile'
,
"component"
:
"./Welcome"
component
:
'./Welcome'
,
},
},
{
{
"name"
:
"基础设置"
,
name
:
'基础设置'
,
"icon"
:
"setting"
,
icon
:
'setting'
,
"path"
:
"/setting"
,
path
:
'/setting'
,
"routes"
:
[
routes
:
[
{
{
"name"
:
"用户管理"
,
name
:
'用户管理'
,
"path"
:
"/setting/users"
,
path
:
'/setting/users'
,
"component"
:
"./setting/users"
component
:
'./setting/users'
,
},
},
{
{
"name"
:
"角色管理"
,
name
:
'角色管理'
,
"path"
:
"/setting/role"
,
path
:
'/setting/role'
,
"component"
:
"./setting/role"
component
:
'./setting/role'
,
},
},
{
{
"name"
:
"组织管理"
,
name
:
'组织管理'
,
"path"
:
"/setting/organization"
,
path
:
'/setting/organization'
,
"component"
:
"./setting/organization"
component
:
'./setting/organization'
,
},
},
{
{
"name"
:
"工厂管理"
,
name
:
'工厂管理'
,
"path"
:
"/setting/factory"
,
path
:
'/setting/factory'
,
"component"
:
"./setting/factory"
component
:
'./setting/factory'
,
},
},
{
{
"name"
:
"车间管理"
,
name
:
'车间管理'
,
"path"
:
"/setting/workshop"
,
path
:
'/setting/workshop'
,
"component"
:
"./setting/workshop"
component
:
'./setting/workshop'
,
},
},
{
{
"name"
:
"工段管理"
,
name
:
'工段管理'
,
"path"
:
"/setting/section"
,
path
:
'/setting/section'
,
"component"
:
"./setting/section"
component
:
'./setting/section'
,
},
},
{
{
"name"
:
"产线管理"
,
name
:
'产线管理'
,
"path"
:
"/setting/production"
,
path
:
'/setting/production'
,
"component"
:
"./setting/production"
component
:
'./setting/production'
,
}
},
]
],
},
},
{
{
"name"
:
"设备管理"
,
name
:
'设备管理'
,
"icon"
:
"bulb"
,
icon
:
'bulb'
,
"path"
:
"/device"
,
path
:
'/device'
,
"routes"
:
[
routes
:
[
{
{
"name"
:
"设备台账"
,
name
:
'设备台账'
,
"path"
:
"/device/account"
,
path
:
'/device/account'
,
"component"
:
"./device/account"
component
:
'./device/account'
,
},
},
{
{
"name"
:
"设备类型"
,
name
:
'设备类型'
,
"path"
:
"/device/type"
,
path
:
'/device/type'
,
"component"
:
"./device/type"
component
:
'./device/type'
,
},
},
{
{
"name"
:
"设备型号"
,
name
:
'设备型号'
,
"path"
:
"/device/model"
,
path
:
'/device/model'
,
"component"
:
"./device/model"
component
:
'./device/model'
,
},
},
{
{
"name"
:
"设备供应商"
,
name
:
'设备供应商'
,
"path"
:
"/device/supplier"
,
path
:
'/device/supplier'
,
"component"
:
"./device/supplier"
component
:
'./device/supplier'
,
}
},
]
],
},
},
{
{
"name"
:
"维修管理"
,
name
:
'维修管理'
,
"path"
:
"/repair"
,
path
:
'/repair'
,
"icon"
:
"tool"
,
icon
:
'tool'
,
"routes"
:
[
routes
:
[
{
{
"name"
:
"故障报修"
,
name
:
'故障报修'
,
"path"
:
"/repair/failure"
,
path
:
'/repair/failure'
,
"icon"
:
""
,
icon
:
''
,
"component"
:
"./repair/failure"
component
:
'./repair/failure'
,
}
},
]
],
}
},
];
{
\ No newline at end of file
name
:
'系统管理'
,
path
:
'/system'
,
icon
:
'desktop'
,
routes
:
[
{
name
:
'数据字典'
,
path
:
'/system/dictionary'
,
icon
:
''
,
component
:
'./system/dictionary'
,
},
{
name
:
'扩展字段'
,
path
:
'/system/field'
,
icon
:
''
,
component
:
'./system/field'
,
},
],
},
];
src/pages/repair/failure/index.jsx
View file @
83519c19
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-25 09:18:03
* @Date: 2022-11-25 09:18:03
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-2
5 17:42:18
* @Last Modified time: 2022-11-2
8 10:50:21
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -206,7 +206,7 @@ function Failure(props) {
...
@@ -206,7 +206,7 @@ function Failure(props) {
<
DrawerPro
<
DrawerPro
fields=
{
drawer
?.
val
==
'add'
?
columns_add
:
columns
}
fields=
{
drawer
?.
val
==
'add'
?
columns_add
:
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
//
detailpath="/ngic-auth/sysUser/query/detail"
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
placement=
"right"
placement=
"right"
...
...
src/pages/repair/track/index.jsx
View file @
83519c19
...
@@ -119,8 +119,6 @@ function Track(props) {
...
@@ -119,8 +119,6 @@ function Track(props) {
<
DrawerPro
<
DrawerPro
fields=
{
columns
}
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
placement=
"right"
placement=
"right"
onClose=
{
()
=>
{
onClose=
{
()
=>
{
...
@@ -135,4 +133,4 @@ function Track(props) {
...
@@ -135,4 +133,4 @@ function Track(props) {
);
);
}
}
export
default
Track
;
export
default
Track
;
\ No newline at end of file
src/pages/setting/organization/columns.js
View file @
83519c19
...
@@ -12,7 +12,6 @@ function getcolumns(setdrawer) {
...
@@ -12,7 +12,6 @@ function getcolumns(setdrawer) {
},
},
],
],
},
},
initialValue
:
'默认值'
,
},
},
{
{
title
:
'组织类型'
,
title
:
'组织类型'
,
...
...
src/pages/setting/organization/index.jsx
View file @
83519c19
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-24 11:16:02
* @Date: 2022-11-24 11:16:02
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-2
5 14:29
:36
* @Last Modified time: 2022-11-2
8 15:43
:36
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
...
...
src/pages/system/dictionary/columns.js
0 → 100644
View file @
83519c19
function
getcolumns
(
setdrawer
)
{
return
[
{
title
:
'数据编号'
,
dataIndex
:
'dataCode'
,
key
:
'dataCode'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'数据名称'
,
dataIndex
:
'title'
,
key
:
'dataName'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'数据类型'
,
dataIndex
:
'dataTypeName'
,
key
:
'dataType'
,
valueType
:
'input'
,
search
:
false
,
fieldProps
:
{
disabled
:
true
,
},
},
{
title
:
'描述'
,
dataIndex
:
'describe'
,
key
:
'describe'
,
valueType
:
'input'
,
search
:
false
,
fieldProps
:
{
disabled
:
true
,
},
},
{
title
:
'上级组织'
,
dataIndex
:
'parentKey'
,
key
:
'parentKey'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
fieldProps
:
{
placeholder
:
'请输入'
,
disabled
:
true
,
},
search
:
false
,
},
];
}
export
default
getcolumns
;
src/pages/system/dictionary/index.jsx
0 → 100644
View file @
83519c19
/* 数据字典
* @Author: Li Hanlin
* @Date: 2022-11-24 11:16:02
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-28 10:53:27
*/
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
Type
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setDrawer
]
=
useState
({
visible
:
false
,
});
const
urlParams
=
{
save
:
'/base/sysEtcData/save'
,
remove
:
'/base/sysEtcData/delete'
,
list
:
'/base/sysData/query/tree'
,
detail
:
'/base/sysEtcData/detail'
,
};
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
,
// detailpath: urlParams.detail,
// params:
{
id
:
row
.
key
},
item
:
{
...
row
,
departmentName
:
row
.
title
,
},
title
:
'编辑'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
vals
);
let
params
=
{
...
vals
,
id
:
row
.
key
,
parentId
:
row
.
parentKey
,
departmentType
:
row
.
departmentType
,
};
console
.
log
(
params
);
delete
params
.
title
;
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'编辑成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
addChild
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setDrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
detailpath
:
null
,
item
:
{
parentKey
:
row
.
title
,
departmentTypeName
:
'部门类型'
,
},
title
:
'新增组织'
,
val
:
'addChild'
,
onFinish
:
async
(
vals
)
=>
{
let
params
=
{
...
vals
,
parentId
:
row
.
key
,
equipmentTypeName
:
vals
.
title
,
departmentType
:
'1'
,
};
delete
params
.
title
;
delete
params
.
parentKey
;
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增组织成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
},
}
}
>
新增组织
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除该设备类型?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
urlParams
.
remove
,
params
:
{
id
:
row
.
key
}
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'删除成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setDrawer
);
if
(
drawer
?.
val
==
'add'
||
drawer
?.
val
==
'edit'
)
{
defcolumn
[
3
].
hideInForm
=
true
;
}
else
{
defcolumn
[
3
].
hideInForm
=
false
;
}
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
addChild
(
text
,
row
,
_
,
action
),
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
});
},
[
drawer
.
val
]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
{
<
h3
className=
"page-title"
>
数据字典
</
h3
>
}
columns=
{
columns
}
path=
{
urlParams
.
list
}
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
resizeable=
{
false
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
type
:
'primary'
,
onClick
:
()
=>
{
setDrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
{
departmentTypeName
:
'公司类型'
,
},
title
:
'新增'
,
detailpath
:
null
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
let
params
=
{
...
vals
,
departmentType
:
0
,
};
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
},
},
}
}
pagination=
{
false
}
/>
<
DrawerPro
fields=
{
columns
}
defaultFormValue=
{
drawer
?.
item
??
{}
}
formRef=
{
formRef
}
placement=
"right"
onClose=
{
()
=>
{
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
}
}
{
...
drawer
}
/>
</
div
>
);
}
export
default
Type
;
src/pages/system/field/columns.js
0 → 100644
View file @
83519c19
function
getcolumns
(
setdrawer
)
{
return
[
{
title
:
'表单名称'
,
dataIndex
:
'formName'
,
// key: 'formName',
fieldProps
:
{
disabled
:
true
,
},
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
disabled
:
true
,
},
],
},
hideInForm
:
false
,
hideInTable
:
true
,
search
:
false
,
},
{
title
:
'字段名称'
,
dataIndex
:
'fieldName'
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
hideInForm
:
false
,
},
{
title
:
'字段类型'
,
dataIndex
:
'fieldCharName'
,
key
:
'fieldChar'
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
valueType
:
'select'
,
options
:
[
{
label
:
'输入框'
,
value
:
'1'
,
},
{
label
:
'下拉单选型'
,
value
:
'2'
,
},
{
label
:
'单选项型'
,
value
:
'3'
,
},
{
label
:
'下拉多选型'
,
value
:
'4'
,
},
],
},
{
title
:
'选项内容'
,
dataIndex
:
'fieldCharValue'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
hideInForm
:
{
fieldChar
:
[
'1'
],
},
search
:
false
,
},
{
title
:
'排序号'
,
dataIndex
:
'sort'
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
},
],
},
search
:
false
,
},
];
}
export
default
getcolumns
;
src/pages/system/field/index.jsx
0 → 100644
View file @
83519c19
/* 扩展字段
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-28 15:57:26
*/
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
,
useEffect
}
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
,
Dropdown
,
Menu
,
Layout
,
Button
,
Image
,
Space
,
Divider
,
Tabs
}
from
'antd'
;
import
TreeRender
from
'@/components/TreeRender'
;
import
{
ProDescriptions
}
from
'@ant-design/pro-components'
;
import
InitForm
from
'@/components/InitForm'
;
const
{
Sider
,
Content
}
=
Layout
;
function
Field
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
(),
[
drawer
,
setDrawer
]
=
useState
({
visible
:
false
,
}),
[
items
,
setitems
]
=
useState
([]),
[
extraparams
,
setextraparams
]
=
useState
({}),
urlParams
=
{
save
:
'/base/paFormField/save'
,
remove
:
'/asset/equipment/deleteById'
,
list
:
'/base/paFormField/queryPage'
,
detail
:
'/asset/equipment/detail'
,
formList
:
'/base/paForm/queryList'
,
};
useEffect
(()
=>
{
const
fn
=
async
()
=>
{
const
result
=
await
doFetch
({
url
:
urlParams
.
formList
,
params
:
{},
});
console
.
log
(
result
);
if
(
!
result
?.
data
?.
dataList
.
length
==
0
)
{
setitems
(
result
?.
data
?.
dataList
.
map
((
it
,
index
)
=>
{
return
{
key
:
it
.
id
,
label
:
it
.
formName
,
};
}),
);
setDrawer
((
s
)
=>
({
...
s
,
formName
:
result
?.
data
?.
dataList
[
0
]?.
formName
,
formId
:
result
?.
data
?.
dataList
[
0
]?.
id
,
}));
}
};
fn
();
},
[]);
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setDrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
title
:
'编辑'
,
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
();
}
},
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除该设备?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
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=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setDrawer
);
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
200
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
)],
});
},
[]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
className=
"ant-card-head"
>
<
div
className=
"ant-card-head-wrapper"
>
<
div
className=
"ant-card-head-title"
>
<
h3
className=
"page-title"
>
设备台账
</
h3
>
</
div
>
</
div
>
</
div
>
<
Layout
style=
{
{
height
:
'100%'
}
}
>
<
Sider
theme=
"light"
width=
{
300
}
>
<
div
>
<
h3
style=
{
{
fontWeight
:
600
,
paddingLeft
:
24
,
paddingRight
:
24
,
paddingTop
:
24
,
paddingBottom
:
8
,
}
}
>
表单信息
</
h3
>
<
Menu
onClick=
{
async
(
e
)
=>
{
// console.log(e);
setextraparams
({
formId
:
e
?.
key
,
});
setDrawer
((
s
)
=>
({
...
s
,
formName
:
items
[
e
?.
key
],
formId
:
e
?.
key
,
}));
}
}
style=
{
{
width
:
'100%'
,
}
}
defaultSelectedKeys=
{
[
'1'
]
}
mode=
"inline"
items=
{
items
}
/>
</
div
>
</
Sider
>
<
Content
>
<
AutoTable
pagetitle=
{
<
h3
style=
{
{
marginBottom
:
0
,
fontWeight
:
400
}
}
>
字段信息
</
h3
>
}
columns=
{
columns
}
path=
{
urlParams
.
list
}
params=
{
{
formId
:
'1'
}
}
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
resizeable=
{
false
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
type
:
'primary'
,
onClick
:
()
=>
{
console
.
log
(
drawer
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
{
fieldChar
:
'1'
,
formName
:
drawer
?.
formName
,
formId
:
drawer
?.
formId
,
},
title
:
'新增'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
vals
);
let
params
=
{
...
vals
,
formId
:
drawer
?.
formId
,
};
delete
params
.
formName
;
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'新增成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}));
},
},
}
}
// x={1500}
extraparams=
{
extraparams
}
/>
</
Content
>
</
Layout
>
<
DrawerPro
fields=
{
columns
}
formRef=
{
formRef
}
defaultFormValue=
{
drawer
?.
item
??
{}
}
placement=
"right"
onClose=
{
()
=>
{
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
item
:
null
,
detailpath
:
null
,
params
:
null
,
}));
}
}
{
...
drawer
}
/>
</
div
>
);
}
export
default
Field
;
src/pages/treezll/columns.js
deleted
100644 → 0
View file @
09b97e6e
function
getcolumns
(
setdrawer
)
{
return
[
{
title
:
'基础信息'
,
valueType
:
'split'
,
},
{
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
:
{
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
:
'此项为必填项'
,
},
],
},
},
]
}
export
default
getcolumns
;
src/pages/treezll/index.jsx
deleted
100644 → 0
View file @
09b97e6e
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
Divider
}
from
"antd"
;
import
TreeRender
from
'@/components/TreeRender'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
treeoptions
from
"./tree"
;
function
Treezll
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
visible
:
false
,
}),
[
nodeId
,
setnode
]
=
useState
(
""
);
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
);
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
detail
(
text
,
row
,
_
,
action
),
edit
(
text
,
row
,
_
,
action
),
remove
(
text
,
row
,
_
,
action
),
],
})
},
[]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"左玲玲"
columns=
{
columns
}
path=
"/ngic-auth/sysUser/query/page"
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
resizeable=
{
true
}
childposition=
"left"
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
},
},
}
}
>
<
TreeRender
{
...
treeoptions
}
onselected=
{
(
vals
)
=>
{
setnode
(
vals
[
0
]
??
""
);
}
}
style=
{
{
borderRight
:
"1px solid rgba(0, 0, 0, 0.06)"
,
paddingRight
:
15
}
}
/>
</
AutoTable
>
<
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
Treezll
;
\ No newline at end of file
src/pages/treezll/tree.js
deleted
100644 → 0
View file @
09b97e6e
export
default
{
url
:
"/ngic-workmanship/pmMaterieType/queryTreeList"
,
deleteurl
:
"/ngic-workmanship/pmMaterieType/deleteById"
,
saveurl
:
"/ngic-workmanship/pmMaterieType/save"
}
\ No newline at end of file
src/pages/welcome/index.jsx
View file @
83519c19
...
@@ -96,7 +96,6 @@ function Welcome(props) {
...
@@ -96,7 +96,6 @@ function Welcome(props) {
<
AutoTable
<
AutoTable
pagetitle=
"系统首页"
pagetitle=
"系统首页"
columns=
{
columns
}
columns=
{
columns
}
path=
"/ngic-auth/sysUser/query/page"
actionRef=
{
actionRef
}
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
pageextra=
{
'add'
}
resizeable=
{
true
}
resizeable=
{
true
}
...
@@ -119,7 +118,7 @@ function Welcome(props) {
...
@@ -119,7 +118,7 @@ function Welcome(props) {
<
DrawerPro
<
DrawerPro
fields=
{
columns
}
fields=
{
columns
}
detailpath=
"/ngic-auth/sysUser/query/detail"
//
detailpath="/ngic-auth/sysUser/query/detail"
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
placement=
"right"
placement=
"right"
...
@@ -135,4 +134,4 @@ function Welcome(props) {
...
@@ -135,4 +134,4 @@ function Welcome(props) {
);
);
}
}
export
default
Welcome
;
export
default
Welcome
;
\ No newline at end of file
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