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
c89192a7
Commit
c89192a7
authored
Dec 01, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12011507
parent
c906e5bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
50 deletions
+45
-50
index.jsx
src/pages/device/account/index.jsx
+45
-50
No files found.
src/pages/device/account/index.jsx
View file @
c89192a7
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-01 1
3:59:2
7
* @Last Modified time: 2022-12-01 1
5:05:1
7
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -772,65 +772,60 @@ function Model(props) {
...
@@ -772,65 +772,60 @@ function Model(props) {
break
;
break
;
}
}
};
};
const
[
request
,
setrequest
]
=
useState
();
useEffect
(()
=>
{
useEffect
(()
=>
{
const
fn
=
async
()
=>
{
const
fn
=
async
()
=>
{
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
'/base/paFormField/queryList'
,
url
:
'/base/paFormField/queryList'
,
params
:
{
params
:
{
formId
:
'2'
,
formId
:
'2'
,
},
});
if
(
res
?.
data
?.
dataList
)
{
let
column
=
[
{
title
:
'扩展字段'
,
valueType
:
'split'
,
},
},
];
});
res
?.
data
?.
dataList
?.
forEach
((
el
)
=>
{
if
(
res
?.
data
?.
dataList
)
{
column
.
push
({
let
column
=
[];
...
selectValueType
(
el
.
fieldChar
,
el
.
valueList
),
res
?.
data
?.
dataList
?.
forEach
((
el
)
=>
{
title
:
el
.
fieldName
,
column
.
push
({
dataIndex
:
el
.
id
,
...
selectValueType
(
el
.
fieldChar
,
el
.
valueList
),
key
:
el
.
id
,
title
:
el
.
fieldName
,
dataIndex
:
el
.
id
,
key
:
el
.
id
,
});
});
});
setnewfieldscolumns
(
column
);
}
},
fn2
=
async
()
=>
{
const
res
=
await
doFetch
({
url
:
urlParams
.
detail
,
params
:
{
id
:
drawer
?.
item
?.
id
},
});
});
setnewfieldscolumns
(
columns
.
concat
(
column
));
console
.
log
(
res
?.
data
?.
data
);
}
let
obj
=
{};
};
res
?.
data
?.
data
[
'equipmentCharList'
]?.
forEach
((
it
)
=>
{
obj
[
it
?.
fieldId
]
=
it
?.
fieldRealValue
;
});
console
.
log
(
'drawerpro:'
,
{
...(
res
?.
data
?.
data
??
{}),
...
obj
,
});
setrequest
(
{
...(
res
?.
data
?.
data
??
{}),
...
obj
,
}
??
{},
);
};
fn
();
fn
();
fn2
();
},
[]);
},
[]);
return
(
return
(
<>
<>
<
ProDescriptions
<
ProDescriptions
dataSource=
{
request
}
columns=
{
columns
}
/>
request=
{
async
()
=>
{
const
res
=
await
doFetch
({
url
:
urlParams
.
detail
,
params
:
{
id
:
drawer
?.
item
?.
id
},
});
let
obj
=
{};
res
?.
data
?.
data
[
equipmentCharList
]?.
forEach
((
it
)
=>
{
obj
[
it
?.
fieldId
]
=
it
?.
fieldRealValue
;
});
console
.
log
(
'drawerpro:'
,
{
...(
res
?.
data
?.
data
??
{}),
...
obj
,
});
return
{
success
:
true
,
data
:
{
...(
res
?.
data
?.
data
??
{}),
...
obj
,
}
??
{},
};
}
}
columns=
{
newfieldscolumns
}
/>
<
Divider
/>
<
Divider
/>
<
h3
className=
"page-title"
>
扩展字段
</
h3
>
<
h3
className=
"page-title"
style=
{
{
marginBottom
:
16
}
}
>
扩展字段
</
h3
>
<
ProDescriptions
dataSource=
{
request
}
columns=
{
newfieldscolumns
}
/>
</>
</>
);
);
};
};
...
...
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