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
2c4a903a
Commit
2c4a903a
authored
Dec 05, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12051737
parent
e02a2378
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
561 additions
and
374 deletions
+561
-374
authRoutes.js
config/authRoutes.js
+145
-144
index.jsx
src/pages/device/type/index.jsx
+6
-3
index.jsx
src/pages/repair/fault/index.jsx
+159
-159
RepairOrderHandle.jsx
src/pages/repair/platform/RepairOrderHandle.jsx
+44
-6
index.jsx
src/pages/repair/platform/index.jsx
+203
-60
index.jsx
src/pages/setting/organization/index.jsx
+2
-1
index.jsx
src/pages/system/dictionary/index.jsx
+2
-1
No files found.
config/authRoutes.js
View file @
2c4a903a
export
default
[
{
"path"
:
"/welcome"
,
"name"
:
"欢迎"
,
"icon"
:
"smile"
,
"component"
:
"./Welcome"
},
{
"name"
:
"基础设置"
,
"icon"
:
"setting"
,
"path"
:
"/setting"
,
"routes"
:
[
{
"name"
:
"用户管理"
,
"path"
:
"/setting/users"
,
"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"
},
{
"name"
:
"工段管理"
,
"path"
:
"/setting/section"
,
"component"
:
"./setting/section"
},
{
"name"
:
"产线管理"
,
"path"
:
"/setting/production"
,
"component"
:
"./setting/production"
}
]
},
{
"name"
:
"设备管理"
,
"icon"
:
"bulb"
,
"path"
:
"/device"
,
"routes"
:
[
{
"name"
:
"设备台账"
,
"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"
}
]
},
{
"name"
:
"维修管理"
,
"path"
:
"/repair"
,
"icon"
:
"tool"
,
"routes"
:
[
{
"name"
:
"故障报修"
,
"path"
:
"/repair/failure"
,
"icon"
:
""
,
"component"
:
"./repair/failure"
},
{
"name"
:
"接单平台"
,
"path"
:
"/repair/platform"
,
"icon"
:
""
,
"component"
:
"./repair/platform"
},
{
"name"
:
"故障设置"
,
"path"
:
"/repair/fault"
,
"icon"
:
""
,
"component"
:
"./repair/fault"
},
{
"name"
:
"外协工单"
,
"path"
:
"/repair/outsourcing"
,
"icon"
:
""
,
"component"
:
"./repair/outsourcing"
},
{
"name"
:
"维修工单"
,
"path"
:
"/repair/order"
,
"icon"
:
""
,
"component"
:
"./repair/order"
},
{
"name"
:
"追踪工单"
,
"path"
:
"/repair/track"
,
"icon"
:
""
,
"component"
:
"./repair/track"
}
]
},
{
"name"
:
"系统管理"
,
"path"
:
"/system"
,
"icon"
:
"desktop"
,
"routes"
:
[
{
"name"
:
"数据字典"
,
"path"
:
"/system/dictionary"
,
"icon"
:
""
,
"component"
:
"./system/dictionary"
},
{
"name"
:
"扩展字段"
,
"path"
:
"/system/field"
,
"icon"
:
""
,
"component"
:
"./system/field"
},
{
"name"
:
"编号规则"
,
"path"
:
"/system/rules"
,
"icon"
:
""
,
"component"
:
"./system/rules"
}
]
}
];
\ No newline at end of file
{
path
:
'/welcome'
,
name
:
'欢迎'
,
icon
:
'smile'
,
component
:
'./Welcome'
,
},
{
name
:
'基础设置'
,
icon
:
'setting'
,
path
:
'/setting'
,
routes
:
[
{
name
:
'用户管理'
,
path
:
'/setting/users'
,
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'
,
},
{
name
:
'工段管理'
,
path
:
'/setting/section'
,
component
:
'./setting/section'
,
},
{
name
:
'产线管理'
,
path
:
'/setting/production'
,
component
:
'./setting/production'
,
},
],
},
{
name
:
'设备管理'
,
icon
:
'bulb'
,
path
:
'/device'
,
routes
:
[
{
name
:
'设备台账'
,
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'
,
},
],
},
{
name
:
'维修管理'
,
path
:
'/repair'
,
icon
:
'tool'
,
routes
:
[
{
name
:
'接单平台'
,
path
:
'/repair/platform'
,
icon
:
''
,
component
:
'./repair/platform'
,
},
{
name
:
'故障报修'
,
path
:
'/repair/failure'
,
icon
:
''
,
component
:
'./repair/failure'
,
},
{
name
:
'故障设置'
,
path
:
'/repair/fault'
,
icon
:
''
,
component
:
'./repair/fault'
,
},
{
name
:
'外协工单'
,
path
:
'/repair/outsourcing'
,
icon
:
''
,
component
:
'./repair/outsourcing'
,
},
{
name
:
'维修工单'
,
path
:
'/repair/order'
,
icon
:
''
,
component
:
'./repair/order'
,
},
{
name
:
'追踪工单'
,
path
:
'/repair/track'
,
icon
:
''
,
component
:
'./repair/track'
,
},
],
},
{
name
:
'系统管理'
,
path
:
'/system'
,
icon
:
'desktop'
,
routes
:
[
{
name
:
'数据字典'
,
path
:
'/system/dictionary'
,
icon
:
''
,
component
:
'./system/dictionary'
,
},
{
name
:
'扩展字段'
,
path
:
'/system/field'
,
icon
:
''
,
component
:
'./system/field'
,
},
{
name
:
'编号规则'
,
path
:
'/system/rules'
,
icon
:
''
,
component
:
'./system/rules'
,
},
],
},
];
src/pages/device/type/index.jsx
View file @
2c4a903a
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-1
1-15 10:13:24
* @Last Modified time: 2022-1
2-05 16:43:45
*/
import
*
as
React
from
'react'
;
...
...
@@ -175,7 +175,6 @@ function Type(props) {
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setDrawer
);
console
.
log
(
drawer
);
if
(
drawer
?.
val
==
'add'
||
drawer
?.
val
==
'edit'
)
{
defcolumn
[
1
].
hideInForm
=
true
;
}
else
{
...
...
@@ -191,7 +190,7 @@ function Type(props) {
remove
(
text
,
row
,
_
,
action
),
],
});
},
[
drawer
.
val
]);
},
[
drawer
?
.
val
]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
...
...
@@ -202,6 +201,7 @@ function Type(props) {
actionRef=
{
actionRef
}
pageextra=
{
'add'
}
resizeable=
{
false
}
rowKey=
{
'key'
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
...
...
@@ -213,8 +213,11 @@ function Type(props) {
visible
:
true
,
item
:
null
,
title
:
'新增'
,
detailpath
:
''
,
params
:
{},
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
drawer
);
let
params
=
{
...
vals
,
parentId
:
0
,
...
...
src/pages/repair/fault/index.jsx
View file @
2c4a903a
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
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
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
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
const
pathconfig
=
{
"enableadd"
:
true
,
"enableedit"
:
true
,
"enabledelete"
:
true
,
"enabledetail"
:
true
,
"add"
:
"/repair/umFaultSetting/save"
,
"edit"
:
"/repair/umFaultSetting/save"
,
"list"
:
"/repair/umFaultSetting/queryList"
,
"delete"
:
"/repair/umFaultSetting/deleteById"
,
"detail"
:
""
const
pathconfig
=
{
enableadd
:
true
,
enableedit
:
true
,
enabledelete
:
true
,
enabledetail
:
true
,
add
:
'/repair/umFaultSetting/save'
,
edit
:
'/repair/umFaultSetting/save'
,
list
:
'/repair/umFaultSetting/queryList'
,
delete
:
'/repair/umFaultSetting/deleteById'
,
detail
:
''
,
};
function
Fault
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
});
function
Fault
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
});
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
actionRef
?.
current
?.
reload
();
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
},
});
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
actionRef
?.
current
?.
reload
();
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
},
});
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'编辑'
,
val
:
'edit'
,
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
);
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
pathconfig
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
pathconfig
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
pathconfig
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
},
[]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
{
<
h3
className=
"page-title"
>
故障类型
</
h3
>
}
columns=
{
columns
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'
编辑
'
,
val
:
'
edit
'
,
item
:
null
,
title
:
'
新增
'
,
val
:
'
add
'
,
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
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
)
=>
[
pathconfig
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
pathconfig
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
pathconfig
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
},
[]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"故障设置"
columns=
{
columns
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
},
},
}
}
/>
<
DrawerPro
fields=
{
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
}
{
...
drawer
}
onFinish=
{
(
vals
)
=>
{
if
(
drawer
?.
val
==
'add'
)
{
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
</
div
>
);
}
<
DrawerPro
fields=
{
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
}
{
...
drawer
}
onFinish=
{
(
vals
)
=>
{
if
(
drawer
?.
val
==
'add'
)
{
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
</
div
>
);
}
export
default
Fault
;
\ No newline at end of file
export
default
Fault
;
src/pages/repair/platform/RepairOrderHandle.jsx
View file @
2c4a903a
...
...
@@ -2,14 +2,15 @@
* @Author: Li Hanlin
* @Date: 2022-12-05 11:13:26
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-05 1
4:29:57
* @Last Modified time: 2022-12-05 1
6:31:25
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
InitForm
from
'@/components/InitForm'
;
const
App
=
({
type
,
id
})
=>
{
import
{
doFetch
}
from
'@/utils/doFetch'
;
const
App
=
({
type
,
id
,
actionRef
,
url
,
setdrawer
})
=>
{
let
columns
=
[];
if
(
type
==
'jd'
)
{
if
(
type
==
'
wx
jd'
)
{
columns
=
[
{
title
:
'协助维修人员'
,
...
...
@@ -17,9 +18,14 @@ const App = ({ type, id }) => {
key
:
'repairAssistList'
,
valueType
:
'select'
,
options
:
{
path
:
'/repair/umRepairOrder/selection'
,
params
:
{
id
}
},
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
mode
:
'multiple'
,
},
},
];
}
else
if
(
type
==
'pd'
)
{
}
else
if
(
type
==
'
wx
pd'
)
{
columns
=
[
{
title
:
'维修人员'
,
...
...
@@ -35,6 +41,33 @@ const App = ({ type, id }) => {
key
:
'faultDescription'
,
valueType
:
'select'
,
options
:
{
path
:
'/repair/umRepairOrder/selection'
,
params
:
{
id
}
},
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
mode
:
'multiple'
,
},
},
];
}
else
if
(
type
==
'zzpd'
)
{
columns
=
[
{
title
:
'追踪人员'
,
dataIndex
:
'trackAssistList'
,
key
:
'trackAssistList'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysUser/selection'
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
];
}
else
if
(
type
==
'wpd'
)
{
columns
=
[
{
title
:
'外协人员'
,
dataIndex
:
'otherUnitsAssistList'
,
key
:
'otherUnitsAssistList'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysUser/selection'
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
];
}
...
...
@@ -44,17 +77,22 @@ const App = ({ type, id }) => {
fields=
{
columns
}
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
vals
.
repairAssistList
=
vals
?.
repairAssistList
.
map
((
it
)
=>
{
return
{
assistUserId
:
it
,
};
});
let
params
=
{
...
vals
,
id
,
};
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
url
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'操作成功!'
);
set
D
rawer
((
s
)
=>
({
set
d
rawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
...
...
src/pages/repair/platform/index.jsx
View file @
2c4a903a
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-05 10:13:42
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-05 1
3:17:26
* @Last Modified time: 2022-12-05 1
7:32:09
*/
import
*
as
React
from
'react'
;
...
...
@@ -60,67 +60,174 @@ function Platform(props) {
};
// 接单按钮
const
receiveBtn
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'接单'
,
val
:
'only'
,
type
:
'jd'
,
}));
},
}
}
>
接单
</
PremButton
>
);
};
// 派单按钮
const
dispatchBtn
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'派单'
,
val
:
'add'
,
}));
},
}
}
>
派单
</
PremButton
>
);
const
receiveBtn
=
(
text
,
row
,
_
,
action
,
activeTab
)
=>
{
if
(
row
?.
status
==
0
||
row
?.
status
==
1
)
{
if
(
activeTab
==
'2'
)
{
// 追踪
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'primary'
,
onClick
:
async
()
=>
{
debugger
;
// setdrawer((s) => (
{
// ...s,
// type: null,
//
}));
console
.
log
(
'zzjd'
);
let
params
=
{
id
:
row
?.
id
,
};
let
res
=
await
doFetch
({
url
:
'/repair/umTrackOrder/orderReceiving'
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'操作成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}
}
>
接单2
</
PremButton
>
);
}
else
if
(
activeTab
==
'3'
)
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'primary'
,
onClick
:
async
()
=>
{
let
params
=
{
...
vals
,
id
,
};
let
res
=
await
doFetch
({
url
:
'/repair/umOtherUnitsOrder/orderReceiving'
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'操作成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
}
}
>
接单3
</
PremButton
>
);
}
else
if
(
activeTab
==
'1'
)
{
// 维修
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'接单'
,
val
:
'only'
,
type
:
'wxjd'
,
}));
},
}
}
>
接单1
</
PremButton
>
);
}
}
else
{
if
(
activeTab
==
'2'
)
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'派单'
,
type
:
'zzpd'
,
val
:
'only'
,
}));
},
}
}
>
派单
</
PremButton
>
);
}
else
if
(
activeTab
==
'1'
)
{
// 维修
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'派单'
,
type
:
'wxpd'
,
val
:
'only'
,
}));
},
}
}
>
派单
</
PremButton
>
);
}
else
if
(
activeTab
==
'3'
)
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'派单'
,
type
:
'wpd'
,
val
:
'only'
,
}));
},
}
}
>
派单
</
PremButton
>
);
}
}
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defcolumn
.
concat
(
{
let
actions
=
{
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
if
(
row
?.
status
==
0
||
row
?.
status
==
1
)
{
return
[
receiveBtn
(
text
,
row
,
_
,
action
)];
}
else
{
return
[
dispatchBtn
(
text
,
row
,
_
,
action
)];
}
},
});
render
:
(
text
,
row
,
_
,
action
)
=>
receiveBtn
(
text
,
row
,
_
,
action
,
activeTabKey
),
};
return
defcolumn
.
concat
(
actions
);
},
[
activeTabKey
]);
const
pathconfig
=
useMemo
(()
=>
{
...
...
@@ -130,10 +237,46 @@ function Platform(props) {
function
selectType
(
type
)
{
switch
(
type
)
{
case
'jd'
:
return
<
OrderHandle
type=
"jd"
id=
{
drawer
?.
item
.
id
}
/>;
case
'pd'
:
return
<
OrderHandle
type=
"pd"
id=
{
drawer
?.
item
.
id
}
/>;
case
'wxjd'
:
return
(
<
OrderHandle
type=
"wxjd"
id=
{
drawer
?.
item
.
id
}
url=
{
'/repair/umRepairOrder/orderReceiving'
}
actionRef=
{
actionRef
}
setdrawer=
{
setdrawer
}
/>
);
case
'wxpd'
:
return
(
<
OrderHandle
type=
"wxpd"
actionRef=
{
actionRef
}
setdrawer=
{
setdrawer
}
id=
{
drawer
?.
item
.
id
}
url=
{
'/repair/umRepairOrder/dispatchById'
}
/>
);
case
'zzpd'
:
return
(
<
OrderHandle
type=
"zzpd"
actionRef=
{
actionRef
}
setdrawer=
{
setdrawer
}
id=
{
drawer
?.
item
.
id
}
url=
{
'/repair/umTrackOrder/dispatchById'
}
/>
);
case
'wpd'
:
return
(
<
OrderHandle
type=
"wpd"
setdrawer=
{
setdrawer
}
actionRef=
{
actionRef
}
id=
{
drawer
?.
item
.
id
}
url=
{
'/repair/umOtherUnitsOrder/dispatchById'
}
/>
);
default
:
break
;
}
...
...
@@ -145,8 +288,8 @@ function Platform(props) {
columns=
{
columns
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
actionRef=
{
actionRef
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
tru
e
}
//
pageextra={pathconfig?.enableadd ? 'add' : null}
resizeable=
{
fals
e
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
...
...
src/pages/setting/organization/index.jsx
View file @
2c4a903a
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-24 11:16:02
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-1
1-28 15:43:36
* @Last Modified time: 2022-1
2-05 16:20:22
*/
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
...
...
@@ -202,6 +202,7 @@ function Type(props) {
columns=
{
columns
}
path=
{
urlParams
.
list
}
actionRef=
{
actionRef
}
rowKey=
{
'key'
}
pageextra=
{
'add'
}
resizeable=
{
false
}
addconfig=
{
{
...
...
src/pages/system/dictionary/index.jsx
View file @
2c4a903a
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-24 11:16:02
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-1
1-30 14:02:16
* @Last Modified time: 2022-1
2-05 16:20:55
*/
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
...
...
@@ -200,6 +200,7 @@ function Type(props) {
columns=
{
columns
}
path=
{
urlParams
.
list
}
actionRef=
{
actionRef
}
rowKey=
{
'key'
}
resizeable=
{
false
}
addconfig=
{
{
// access: 'sysDepartment_save',
...
...
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