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
805d5ec4
Commit
805d5ec4
authored
Sep 18, 2023
by
左玲玲
😬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1619
parent
74b9d280
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
27 deletions
+13
-27
config.js
config/config.js
+1
-1
mtable.jsx
src/components/AutoTable/mtable.jsx
+0
-2
index.jsx
src/components/DrawerPro/index.jsx
+1
-1
index.jsx
src/components/TagView/index.jsx
+0
-9
index.jsx
src/pages/lease/contract/index.jsx
+6
-8
index.jsx
src/pages/lease/costanalysis/index.jsx
+4
-5
index.jsx
src/pages/lease/leasedevice/index.jsx
+1
-1
No files found.
config/config.js
View file @
805d5ec4
...
...
@@ -42,7 +42,7 @@ export default defineConfig({
publicPath
:
process
.
env
.
NODE_ENV
===
'production'
?
'./'
:
'/'
,
initialState
:
{},
model
:
{},
keepalive
:
keepalive
,
//
keepalive: keepalive,
layout
:
{
// https://umijs.org/zh-CN/plugins/plugin-layout
locale
:
false
,
...
...
src/components/AutoTable/mtable.jsx
View file @
805d5ec4
...
...
@@ -54,7 +54,6 @@ const Mtable = (props) => {
[
valueColumns
,
setvalueColumns
]
=
useState
({});
const
[
columnes
,
setcolumnes
]
=
useState
(
columns
??
[]);
const
[
newparames
,
setnewparams
]
=
useState
({});
//调用接口
const
request
=
async
(
params
,
sort
,
filter
)
=>
{
if
(
!
path
)
return
;
...
...
@@ -369,7 +368,6 @@ const Mtable = (props) => {
{
...
datas
}
size=
{
size
}
onSubmit=
{
(
params
)
=>
{
console
.
log
(
params
);
let
newparams
=
{},
curkey
=
Object
.
keys
(
params
)[
Object
.
keys
(
params
).
length
-
1
],
curval
=
Object
.
values
(
params
)[
Object
.
keys
(
params
).
length
-
1
];
...
...
src/components/DrawerPro/index.jsx
View file @
805d5ec4
...
...
@@ -21,7 +21,7 @@ function DrawerPro(props) {
placement=
"right"
closable=
{
true
}
getContainer=
{
false
}
style=
{
{
position
:
'absolute'
,
transform
:
'translateX(0)'
}
}
style=
{
{
position
:
'absolute'
,
transform
:
'translateX(0)'
,
zIndex
:
10
}
}
width=
{
'100%'
}
destroyOnClose=
{
true
}
{
...
props
}
...
...
src/components/TagView/index.jsx
View file @
805d5ec4
...
...
@@ -137,7 +137,6 @@ const TagView = ({ children, home }) => {
await
setrefresh
(
false
);
setrefresh
(
true
);
};
return
(
<>
<
RouteContext
.
Consumer
>
...
...
@@ -163,14 +162,6 @@ const TagView = ({ children, home }) => {
</
div
>
<
div
className=
{
styles
.
child
}
>
<
div
className=
{
styles
.
contianbox
}
>
{
/* <Scrollbars
thumbMinSize={10}
autoHide
style={{ width: '100%', height: '100%' }}
hideTracksWhenNotNeeded={true}
>
{refresh && children}
</Scrollbars> */
}
<
div
style=
{
{
width
:
"100%"
,
height
:
"100%"
}
}
>
{
refresh
&&
children
}
</
div
>
</
div
>
</
div
>
...
...
src/pages/lease/contract/index.jsx
View file @
805d5ec4
...
...
@@ -103,7 +103,7 @@ function Contract(props) {
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
),
[
amount
,
camount
]
=
useState
(
0
),
[
intelligenceList
,
cil
]
=
useState
([]),
[
flag
,
cflag
]
=
useState
(
false
);
[
extraparams
,
setextraparams
]
=
useState
({}
);
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
...
...
@@ -506,15 +506,13 @@ function Contract(props) {
}
useEffect
(()
=>
{
if
(
state
)
{
cflag
(
false
)
if
(
state
.
isFinish
==
1
)
{
setactiveTabKey
(
'1'
)
}
else
{
setactiveTabKey
(
'2'
)
}
set
Timeout
(()
=>
{
set
extraparams
({
'contractNo'
:
state
.
contractNo
})
tableRef
?.
current
?.
setFieldsValue
({
'contractNo'
:
state
.
contractNo
});
},
500
)
}
},
[
state
])
const
columns
=
useMemo
(()
=>
{
...
...
@@ -534,7 +532,7 @@ function Contract(props) {
const
tabList
=
useMemo
(()
=>
{
return
getcolumns
();
},
[
activeTabKey
]);
},
[
activeTabKey
,
extraparams
]);
const
pathconfig
=
useMemo
(()
=>
{
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defpath
;
...
...
@@ -614,10 +612,10 @@ function Contract(props) {
activeTabKey=
{
activeTabKey
}
onTabChange=
{
(
key
)
=>
{
setactiveTabKey
(
key
);
cflag
(
true
);
setextraparams
({}
);
}
}
formRef=
{
tableRef
}
extraparams=
{
state
?.
contractNo
&&
!
flag
?
{
'contractNo'
:
state
?.
contractNo
}
:
{}
}
extraparams=
{
extraparams
}
/>
<
DrawerPro
{
...
drawer
}
...
...
src/pages/lease/costanalysis/index.jsx
View file @
805d5ec4
...
...
@@ -42,7 +42,7 @@ const Costanalysis = () => {
},
[
activeKey
]);
const
tabList
=
useMemo
(()
=>
{
return
getcolumns
();
},
[
activeKey
]);
},
[
activeKey
,
extraparams
]);
const
rightExtra
=
(
text
,
row
,
_
,
action
)
=>
{
return
[
activeKey
==
'item-1'
&&
<
PremButton
...
...
@@ -194,8 +194,7 @@ const Costanalysis = () => {
catk
(
state
.
pageStatus
==
1
?
'item-1'
:
'item-2'
);
setextraparams
(
state
.
extraparams
);
}
},
[
state
])
},
[
state
]);
return
<
div
ref=
{
boxRef
}
>
<
AutoTable
pagetitle=
{
<
h3
className=
"page-title"
>
费用分析
</
h3
>
}
...
...
@@ -205,10 +204,9 @@ const Costanalysis = () => {
resizeable=
{
false
}
bordered=
{
false
}
x=
{
2500
}
extraparams=
{
extraparams
}
onTabChange=
{
(
key
)
=>
{
catk
(
key
);
setextraparams
({})
setextraparams
({})
;
}
}
activeTabKey=
{
activeKey
}
tabList=
{
tabList
}
...
...
@@ -226,6 +224,7 @@ const Costanalysis = () => {
}
}
}
}
extraparams=
{
extraparams
}
/>
...
...
src/pages/lease/leasedevice/index.jsx
View file @
805d5ec4
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
;
import
AutoTable
from
'@/components/AutoTable/mtable'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
...
...
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