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
0b3c170b
Commit
0b3c170b
authored
Jan 11, 2023
by
TZW
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.100.234.193:9527/wuhao/ems3.3
parents
f1f9f22e
bc16f269
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
373 additions
and
75 deletions
+373
-75
index.jsx
src/components/InitForm/EditTable/index.jsx
+9
-8
columns.js
src/pages/check/plan/columns.js
+124
-30
index.jsx
src/pages/check/plan/index.jsx
+226
-25
Project.jsx
src/pages/check/standard/Project.jsx
+7
-6
index.jsx
src/pages/check/standard/index.jsx
+7
-6
No files found.
src/components/InitForm/EditTable/index.jsx
View file @
0b3c170b
...
...
@@ -74,6 +74,7 @@ const EditTable = (props) => {
if
(
Array
.
isArray
(
it
.
options
))
{
options
=
{
fieldProps
:
{
...
it
?.
fieldProps
,
options
:
[...
it
.
options
],
},
};
...
...
src/pages/check/plan/columns.js
View file @
0b3c170b
import
{
Popconfirm
,
Switch
}
from
'antd'
;
function
getcolumns
(
setdrawer
,
run
)
{
import
dayjs
from
'dayjs'
;
function
getcolumns
(
setdrawer
)
{
const
disabledDate
=
(
current
)
=>
{
// Can not select days before today and today
return
current
&&
current
<
dayjs
().
endOf
(
'day'
);
};
const
columns
=
[
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
editable
:
false
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
editable
:
false
,
},
{
title
:
'工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factoryId'
,
hideInForm
:
true
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{},
},
editable
:
false
,
},
{
title
:
'车间名称'
,
dataIndex
:
'shopName'
,
key
:
'shopId'
,
hideInForm
:
true
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
options
:
{
path
:
'/auth/sysShop/getAllShopSelection'
,
params
:
{},
},
editable
:
false
,
},
{
title
:
'下次点检日期'
,
dataIndex
:
'checkPlanDate'
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
fieldProps
:
{
disabledDate
,
},
valueType
:
'date'
,
hideInSearch
:
true
,
},
];
return
[
{
tab
:
'未完成'
,
...
...
@@ -48,6 +115,10 @@ function getcolumns(setdrawer, run) {
key
:
'factoryId'
,
hideInForm
:
true
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{},
...
...
@@ -59,8 +130,12 @@ function getcolumns(setdrawer, run) {
key
:
'shopId'
,
hideInForm
:
true
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
options
:
{
path
:
'/auth/sysShop/get
ShopSelectionByFactory
'
,
path
:
'/auth/sysShop/get
AllShopSelection
'
,
linkParams
:
{
factoryId
:
''
,
},
...
...
@@ -122,8 +197,9 @@ function getcolumns(setdrawer, run) {
hideInSearch
:
true
,
valueType
:
'digit'
,
hideInForm
:
{
checkLoop
:
[
1
],
checkLoop
:
[
1
,
undefined
],
},
precision
:
0
,
},
{
title
:
'下次点检日期'
,
...
...
@@ -131,6 +207,9 @@ function getcolumns(setdrawer, run) {
key
:
'planCheckDateList'
,
hideInForm
:
true
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
>
{
row
.
planCheckDate
}
<
/span>
;
},
},
{
title
:
'状态'
,
...
...
@@ -153,32 +232,10 @@ function getcolumns(setdrawer, run) {
},
],
},
{
title
:
'启用/停用'
,
dataIndex
:
'checkEnable'
,
key
:
'checkEnable'
,
hideInForm
:
true
,
hideInSearch
:
true
,
valueType
:
'switch'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
Popconfirm
title
=
"是否开启或停用?"
onConfirm
=
{()
=>
{
if
(
row
.
checkEnable
==
1
)
{
run
({
url
:
"/check/umEquipmentCheckPlan/enable"
,
params
:
{
id
:
row
.
id
,
checkEnable
:
2
}
})
}
}}
okText
=
"确定"
cancelText
=
"取消"
>
<
Switch
checked
=
{
row
.
checkEnable
==
1
?
true
:
false
}
checkedChildren
=
"开启"
unCheckedChildren
=
"停用"
defaultChecked
=
{
false
}
/
>
<
/Popconfirm
>
}
},
{
title
:
'选择设备'
,
dataIndex
:
'
equipmentId
'
,
key
:
'
equipmentId
'
,
dataIndex
:
'
paramList
'
,
key
:
'
paramList
'
,
formItemProps
:
{
rules
:
[
{
...
...
@@ -193,6 +250,9 @@ function getcolumns(setdrawer, run) {
colProps
:
{
span
:
24
,
},
path
:
'/asset/equipment/list/user/shop'
,
columns
,
hideInDescriptions
:
true
,
},
],
pathconfig
:
{
...
...
@@ -215,6 +275,25 @@ function getcolumns(setdrawer, run) {
title
:
'点检计划单号'
,
dataIndex
:
'checkNo'
,
key
:
'checkNo'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
title
:
'详情'
,
val
:
'detail'
,
type
:
'detail'
,
title
:
'详细信息'
,
item
:
row
,
}));
}}
>
{
row
?.
checkNo
}
<
/a
>
);
},
},
{
title
:
'设备编号'
,
...
...
@@ -230,7 +309,12 @@ function getcolumns(setdrawer, run) {
title
:
'工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factoryId'
,
hideInForm
:
true
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{},
...
...
@@ -240,10 +324,17 @@ function getcolumns(setdrawer, run) {
title
:
'车间名称'
,
dataIndex
:
'shopName'
,
key
:
'shopId'
,
hideInForm
:
true
,
valueType
:
'select'
,
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
params
:
{},
path
:
'/auth/sysShop/getAllShopSelection'
,
linkParams
:
{
factoryId
:
''
,
},
},
},
{
...
...
@@ -289,6 +380,9 @@ function getcolumns(setdrawer, run) {
dataIndex
:
'endDate'
,
key
:
'endDateList'
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
>
{
row
.
endDate
}
<
/span>
;
},
},
{
title
:
'状态'
,
...
...
src/pages/check/plan/index.jsx
View file @
0b3c170b
This diff is collapsed.
Click to expand it.
src/pages/check/standard/Project.jsx
View file @
0b3c170b
...
...
@@ -17,7 +17,7 @@ function Project({ equipmentCheckStandardId }) {
let
pathconf
=
procolumns
(
setdrawer
)?.
pathconfig
??
{};
return
pathconf
;
},
[]);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
...
...
@@ -82,8 +82,8 @@ function Project({ equipmentCheckStandardId }) {
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
onConfirm
:
async
()
=>
{
await
runAsync
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
...
...
@@ -120,6 +120,7 @@ function Project({ equipmentCheckStandardId }) {
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
type
:
'primary'
,
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
...
@@ -152,11 +153,11 @@ function Project({ equipmentCheckStandardId }) {
}));
}
}
{
...
drawer
}
onFinish=
{
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
if
(
drawer
?.
val
==
'add'
)
{
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
,
equipmentCheckStandardId
}
});
await
runAsync
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
,
equipmentCheckStandardId
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
,
equipmentCheckStandardId
}
});
await
runAsync
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
,
equipmentCheckStandardId
}
});
}
}
}
/>
...
...
src/pages/check/standard/index.jsx
View file @
0b3c170b
...
...
@@ -17,7 +17,7 @@ function Standard(props) {
let
pathconf
=
getcolumns
(
setdrawer
)?.
pathconfig
??
{};
return
pathconf
;
},
[]);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
...
...
@@ -103,8 +103,8 @@ function Standard(props) {
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
onConfirm
:
async
()
=>
{
await
runAsync
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
...
...
@@ -144,6 +144,7 @@ function Standard(props) {
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
type
:
'primary'
,
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
...
@@ -175,11 +176,11 @@ function Standard(props) {
}));
}
}
{
...
drawer
}
onFinish=
{
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
if
(
drawer
?.
val
==
'add'
)
{
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
await
runAsync
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
await
runAsync
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
>
...
...
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