Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xform
Project
Project
Details
Activity
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
田翔
xform
Commits
0ad1bf75
Commit
0ad1bf75
authored
Aug 06, 2024
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 初始化调用隐藏与自动计算接口
parent
22d225f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
process.js
src/apis/process.js
+11
-0
index.js
src/core/Account/index.js
+4
-3
index.js
src/core/widgets/advanced/RelationForm/index.js
+3
-1
No files found.
src/apis/process.js
View file @
0ad1bf75
...
@@ -333,6 +333,17 @@ export function GetTableDataInfo({ accountName, id, timeLimit }) {
...
@@ -333,6 +333,17 @@ export function GetTableDataInfo({ accountName, id, timeLimit }) {
});
});
}
}
//支持默认隐藏和自动计算
export
function
GetTableDataInfoExtend
({
accountName
,
id
,
timeLimit
})
{
return
request
({
// headers: {
// 'Civ-Site': window?.globalConfig?.userInfo?.site
// },
url
:
`
${
BASEURL
}
/GetTableDataInfoExtend?accountName=
${
accountName
}
&id=
${
id
}
&timeLimit=
${
timeLimit
}
`
,
method
:
'GET'
,
});
}
/**
/**
* @Description: 保存单条数据,使用JsonToHtml去编译
* @Description: 保存单条数据,使用JsonToHtml去编译
* @Date: 2021/11/1
* @Date: 2021/11/1
...
...
src/core/Account/index.js
View file @
0ad1bf75
...
@@ -18,6 +18,7 @@ import {
...
@@ -18,6 +18,7 @@ import {
GetAccountTree
,
GetAccountTree
,
GetAccountPageList
,
GetAccountPageList
,
GetTableDataInfo
,
GetTableDataInfo
,
GetTableDataInfoExtend
,
EditTableDataInfo
,
EditTableDataInfo
,
SaveTableDataInfo
,
SaveTableDataInfo
,
DeleteTableDataInfo
,
DeleteTableDataInfo
,
...
@@ -115,9 +116,9 @@ const Account = (props, ref) => {
...
@@ -115,9 +116,9 @@ const Account = (props, ref) => {
if
(
type
===
'编辑'
&&
timeLimit
)
{
if
(
type
===
'编辑'
&&
timeLimit
)
{
Limit
=
Number
(
timeLimit
)
Limit
=
Number
(
timeLimit
)
}
}
const
{
code
,
data
,
msg
}
=
await
GetTableDataInfo
({
accountName
:
params
.
accountName
,
id
:
row
.
ID
,
timeLimit
:
Limit
});
const
{
code
,
data
,
msg
}
=
await
GetTableDataInfo
Extend
({
accountName
:
params
.
accountName
,
id
:
row
.
ID
,
timeLimit
:
Limit
});
if
(
code
===
0
)
{
if
(
code
===
0
)
{
saveClick
(
editField
,
formJson
,
data
,
type
);
saveClick
(
editField
,
data
.
formJson
,
data
.
value
,
type
);
}
else
{
}
else
{
message
.
error
(
msg
);
message
.
error
(
msg
);
}
}
...
@@ -251,7 +252,7 @@ const Account = (props, ref) => {
...
@@ -251,7 +252,7 @@ const Account = (props, ref) => {
child
[
s
].
disabled
=
true
;
child
[
s
].
disabled
=
true
;
}
}
if
(
field
.
includes
(
s
))
{
if
(
field
.
includes
(
s
))
{
child
[
s
].
hidden
=
false
;
//
child[s].hidden = false;
hidden
=
false
;
hidden
=
false
;
}
else
{
}
else
{
child
[
s
].
hidden
=
true
;
child
[
s
].
hidden
=
true
;
...
...
src/core/widgets/advanced/RelationForm/index.js
View file @
0ad1bf75
...
@@ -165,7 +165,9 @@ const RelationForm = (props) => {
...
@@ -165,7 +165,9 @@ const RelationForm = (props) => {
})
})
}
}
let
relationForm
=
addons
.
getValue
(
'relationForm'
)
||
{
configs
:
[],
data
:
[],
table
:
[]
}
let
relationForm
=
addons
.
getValue
(
'relationForm'
)
||
{
configs
:
[],
data
:
[],
table
:
[]
}
window
.
configsLocal
.
push
({
...
schema
,
id
:
schema
.
$id
,
queryWheres
:
queryWheres
.
map
(
v
=>
({
fieldName
:
v
.
field
,
fieldValue
:
v
.
value
}))
})
if
(
!
window
.
configsLocal
?.
length
||
!
window
.
configsLocal
?.
some
(
s
=>
s
.
$id
===
schema
.
$id
))
{
window
.
configsLocal
.
push
({
...
schema
,
id
:
schema
.
$id
,
queryWheres
:
queryWheres
.
map
(
v
=>
({
fieldName
:
v
.
field
,
fieldValue
:
v
.
value
}))
})
}
addons
.
setValue
(
'relationForm'
,
{
addons
.
setValue
(
'relationForm'
,
{
...
relationForm
,
...
relationForm
,
configs
:
window
.
configsLocal
,
configs
:
window
.
configsLocal
,
...
...
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