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
769d3272
Commit
769d3272
authored
Dec 14, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
56838b91
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
9 deletions
+38
-9
index.jsx
src/components/InitForm/index.jsx
+9
-2
global.less
src/global.less
+7
-1
columns.js
src/pages/device/account/columns.js
+2
-0
index.jsx
src/pages/device/account/index.jsx
+2
-3
index.jsx
src/pages/system/rules/index.jsx
+18
-3
No files found.
src/components/InitForm/index.jsx
View file @
769d3272
...
...
@@ -8,7 +8,7 @@ import {
ProFormList
,
ProCard
,
}
from
'@ant-design/pro-components'
;
import
moment
from
'moment'
;
import
moment
,
{
defaultFormat
}
from
'moment'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
styles
from
'./index.less'
;
import
FormItems
from
'./FormItems'
;
...
...
@@ -92,6 +92,7 @@ function InitForm({
params
=
{},
detailpath
=
''
,
defaultFormValue
=
{},
detailFormat
,
submitter
,
fields
,
extendField
=
''
,
...
...
@@ -102,7 +103,8 @@ function InitForm({
})
{
let
proformRef
=
useRef
();
proformRef
=
formRef
??
proformRef
;
console
.
log
(
detailpath
);
console
.
log
(
detailFormat
());
return
(
<
ProForm
style=
{
{
overflow
:
'hidden'
}
}
...
...
@@ -133,6 +135,11 @@ function InitForm({
...
obj
,
...
defaultFormValue
,
};
}
else
if
(
detailFormat
)
{
return
{
...
detailFormat
(
res
?.
data
),
...
defaultFormValue
,
};
}
return
{
...(
res
?.
data
?.
data
??
{}),
...
...
src/global.less
View file @
769d3272
...
...
@@ -387,7 +387,13 @@ ol {
.container,
.diycard {
height: unset
height: 100%;
}
.ant-drawer-wrapper-body {
.diycard {
height: unset;
}
}
.runtime-keep-alive-layout {
...
...
src/pages/device/account/columns.js
View file @
769d3272
...
...
@@ -24,6 +24,7 @@ function getcolumns(setdrawer) {
align
:
'center'
,
dataIndex
:
'positionNo'
,
search
:
false
,
hideInTable
:
true
,
key
:
'positionNo'
,
},
{
...
...
@@ -139,6 +140,7 @@ function getcolumns(setdrawer) {
},
{
title
:
'设备原值(万元)'
,
valueType
:
'digit'
,
search
:
false
,
hideInTable
:
true
,
align
:
'center'
,
...
...
src/pages/device/account/index.jsx
View file @
769d3272
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-14 1
4:13:17
* @Last Modified time: 2022-12-14 1
5:00:29
*/
import
*
as
React
from
'react'
;
...
...
@@ -2079,7 +2079,6 @@ function Model(props) {
id
:
drawer
?.
title
==
'编辑'
?
drawer
?.
item
?.
id
:
''
,
equipmentCharReqList
,
};
//console.log(params, '!!!!');
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
...
...
@@ -2107,7 +2106,7 @@ function Model(props) {
const
containderef
=
useRef
();
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
className=
"ant-card-head"
>
<
div
className=
"ant-card-head"
style=
{
{
backgroundColor
:
'white'
}
}
>
<
div
className=
"ant-card-head-wrapper"
>
<
div
className=
"ant-card-head-title"
>
<
h3
className=
"page-title"
>
设备台账
</
h3
>
...
...
src/pages/system/rules/index.jsx
View file @
769d3272
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-
02 18:35:26
* @Last Modified time: 2022-12-
14 15:55:13
*/
import
*
as
React
from
'react'
;
...
...
@@ -62,10 +62,24 @@ function Rules(props) {
visible
:
true
,
detailpath
:
urlParams
.
detail
,
params
:
{
noTypeId
:
row
?.
id
},
detailFormat
:
(
res
)
=>
{
console
.
log
(
'res:'
,
res
);
let
nrList
=
{};
res
?.
data
?.
nrList
?.
forEach
((
it
)
=>
{
if
(
it
?.
noRuleCode
==
'increasing_order'
)
{
nrList
.
other
=
it
;
}
else
{
nrList
.
value
.
push
(
it
);
}
});
delete
res
?.
data
?.
nrList
;
console
.
log
(
res
?.
data
?.
nrList
);
// res.data.nrList = nrList;
return
res
;
},
title
:
'编辑'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
//console.log(1);
let
params
=
{
...
vals
,
id
:
row
.
id
,
...
...
@@ -100,7 +114,7 @@ function Rules(props) {
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
urlParams
.
remove
,
params
:
{
i
d
:
row
.
id
}
});
let
res
=
await
doFetch
({
url
:
urlParams
.
remove
,
params
:
{
noTypeI
d
:
row
.
id
}
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'删除成功!'
);
setDrawer
((
s
)
=>
({
...
...
@@ -155,6 +169,7 @@ function Rules(props) {
title
:
'新增'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
'vals:'
,
vals
);
let
params
=
{
...
vals
,
};
...
...
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