Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
d624611c
提交
d624611c
authored
4月 14, 2020
作者:
wtj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改表单排版问题
上级
dcaeba18
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
58 行增加
和
57 行删除
+58
-57
index.js
one_stop_public/libs/formList/index.js
+5
-4
index.jsx
one_stop_public/tableCompon/index.jsx
+53
-53
没有找到文件。
one_stop_public/libs/formList/index.js
浏览文件 @
d624611c
...
@@ -731,7 +731,7 @@ class FormList extends React.Component {
...
@@ -731,7 +731,7 @@ class FormList extends React.Component {
{
form
.
getFieldDecorator
(
item
.
name
,
{
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Input
readOnly
=
{
!
isAdd
}
placeholder
=
"请输入"
/>
)}
})(
<
Input
style
=
{{
width
:
'70%'
}}
readOnly
=
{
!
isAdd
}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
<
/FormItem
>
);
);
}
}
...
@@ -771,7 +771,7 @@ class FormList extends React.Component {
...
@@ -771,7 +771,7 @@ class FormList extends React.Component {
{
form
.
getFieldDecorator
(
item
.
name
,
{
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Input
placeholder
=
"请输入"
/>
)}
})(
<
Input
style
=
{{
width
:
'70%'
}}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
<
/FormItem
>
);
);
}
else
if
(
number
.
indexOf
(
item
.
type
)
>
-
1
)
{
}
else
if
(
number
.
indexOf
(
item
.
type
)
>
-
1
)
{
...
@@ -818,7 +818,7 @@ class FormList extends React.Component {
...
@@ -818,7 +818,7 @@ class FormList extends React.Component {
{
form
.
getFieldDecorator
(
item
.
name
,
{
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Input
placeholder
=
"请输入"
/>
)}
})(
<
Input
style
=
{{
width
:
'70%'
}}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
<
/FormItem
>
);
);
}
}
...
@@ -832,11 +832,12 @@ class FormList extends React.Component {
...
@@ -832,11 +832,12 @@ class FormList extends React.Component {
if
(
querys
.
length
==
0
)
{
if
(
querys
.
length
==
0
)
{
return
''
;
return
''
;
}
}
return
(
return
(
<
Form
layout
=
"inline"
>
<
Form
layout
=
"inline"
>
<
Row
>
<
Row
>
{
querys
.
map
((
item
)
=>
{
querys
.
map
((
item
)
=>
<
Col
span
=
{
8
}
key
=
{
item
.
id
}
>
<
Col
style
=
{{
height
:
58
}}
span
=
{
8
}
key
=
{
item
.
id
}
>
{
this
.
getItem
(
true
,
form
,
{
{
this
.
getItem
(
true
,
form
,
{
...
item
,
...
item
,
isNull
:
true
isNull
:
true
...
...
one_stop_public/tableCompon/index.jsx
浏览文件 @
d624611c
...
@@ -505,15 +505,15 @@ export default class tableCom extends Component {
...
@@ -505,15 +505,15 @@ export default class tableCom extends Component {
}
}
} */
} */
if
(
!
this
.
props
.
isEdit
&&
this
.
props
.
fatherCode
)
{
if
(
!
this
.
props
.
isEdit
&&
this
.
props
.
fatherCode
)
{
if
(
bindObj
!=
null
){
if
(
bindObj
!=
null
){
dataColumn
.
base52
=
bindObj
.
base52
dataColumn
.
base52
=
bindObj
.
base52
}
else
{
}
else
{
dataColumn
.
base52
=
this
.
props
.
uuid
dataColumn
.
base52
=
this
.
props
.
uuid
}
}
}
}
if
(
this
.
dataFilter
.
includes
(
json
.
comName
)
||
json
.
comName
==
"TableSelect"
)
{
if
(
this
.
dataFilter
.
includes
(
json
.
comName
)
||
json
.
comName
==
"TableSelect"
)
{
const
obj2
=
{
...
obj
,
...
props
.
form
.
getFieldsValue
(),
...
props
.
defaultValues
[
this
.
props
.
formKey
]
}
const
obj2
=
{
...
obj
,
...
props
.
form
.
getFieldsValue
(),
...
props
.
defaultValues
[
this
.
props
.
formKey
]
}
this
.
getData
(
json
,
dataColumn
,
obj2
)
this
.
getData
(
json
,
dataColumn
,
obj2
)
...
@@ -676,71 +676,71 @@ export default class tableCom extends Component {
...
@@ -676,71 +676,71 @@ export default class tableCom extends Component {
}
}
break
;
break
;
case
"func"
:
case
"func"
:
if
(
json
.
funcs
!=
null
&&
json
.
funcs
!=
""
)
{
if
(
json
.
funcs
!=
null
&&
json
.
funcs
!=
""
)
{
let
enu
;
let
enu
;
try
{
try
{
this
.
getFunctionValue
(
json
.
funcs
,
{
base52
:
this
.
props
.
uuid
},
json
,()
=>
{
this
.
getFunctionValue
(
json
.
funcs
,
{
base52
:
this
.
props
.
uuid
},
json
,()
=>
{
if
(
init
!=
null
&&
Object
.
keys
(
init
).
length
>
0
)
{
if
(
init
!=
null
&&
Object
.
keys
(
init
).
length
>
0
)
{
let
base52
=
dataColumn
.
base52
let
base52
=
dataColumn
.
base52
let
vlu
=
this
.
props
.
form
.
getFieldValue
(
base52
)
let
vlu
=
this
.
props
.
form
.
getFieldValue
(
base52
)
if
(
vlu
instanceof
Array
){
if
(
vlu
instanceof
Array
){
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
){
if
(
vlu
.
includes
(
this
.
state
.
options
[
i
].
value
)){
if
(
vlu
.
includes
(
this
.
state
.
options
[
i
].
value
)){
labs
.
push
(
this
.
state
.
options
[
i
].
label
)
labs
.
push
(
this
.
state
.
options
[
i
].
label
)
}
}
}
}
}
else
{
}
else
{
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
){
if
(
vlu
==
this
.
state
.
options
[
i
].
value
){
if
(
vlu
==
this
.
state
.
options
[
i
].
value
){
labs
.
push
(
this
.
state
.
options
[
i
].
label
)
labs
.
push
(
this
.
state
.
options
[
i
].
label
)
break
;
break
;
}
}
}
}
}
}
this
.
setState
({
labels
:
labs
})
this
.
setState
({
labels
:
labs
})
}
else
if
(
!
this
.
props
.
isEdit
&&
Object
.
keys
(
obj
).
length
>
0
)
{
}
else
if
(
!
this
.
props
.
isEdit
&&
Object
.
keys
(
obj
).
length
>
0
)
{
let
base52
=
dataColumn
.
base52
let
base52
=
dataColumn
.
base52
const
vlu
=
obj
[
base52
]
const
vlu
=
obj
[
base52
]
const
labs
=
[]
const
labs
=
[]
if
(
vlu
instanceof
Array
){
if
(
vlu
instanceof
Array
){
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
){
if
(
vlu
.
includes
(
this
.
state
.
options
[
i
].
value
)){
if
(
vlu
.
includes
(
this
.
state
.
options
[
i
].
value
)){
labs
.
push
(
this
.
state
.
options
[
i
].
label
)
labs
.
push
(
this
.
state
.
options
[
i
].
label
)
}
}
}
}
}
else
{
}
else
{
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
){
if
(
vlu
==
this
.
state
.
options
[
i
].
value
){
if
(
vlu
==
this
.
state
.
options
[
i
].
value
){
labs
.
push
(
this
.
state
.
options
[
i
].
label
)
labs
.
push
(
this
.
state
.
options
[
i
].
label
)
break
;
break
;
}
}
}
}
}
}
this
.
setState
({
labels
:
labs
})
this
.
setState
({
labels
:
labs
})
}
}
})
;
})
;
}
catch
(
e
)
{
}
catch
(
e
)
{
message
.
error
(
"公式选项配置存在问题"
)
message
.
error
(
"公式选项配置存在问题"
)
}
}
}
}
...
@@ -940,7 +940,7 @@ export default class tableCom extends Component {
...
@@ -940,7 +940,7 @@ export default class tableCom extends Component {
}
}
sqlUtil
=
(
base52
,
json
,
orgCallback
,
sqlKey
,
params
,
callback
,
options
=
{})
=>
{
sqlUtil
=
(
base52
,
json
,
orgCallback
,
sqlKey
,
params
,
callback
,
options
=
{})
=>
{
//查缓存
//查缓存
var
isChange
=
false
;
var
isChange
=
false
;
const
{
sqlKeys
}
=
this
.
state
const
{
sqlKeys
}
=
this
.
state
...
@@ -1115,27 +1115,27 @@ export default class tableCom extends Component {
...
@@ -1115,27 +1115,27 @@ export default class tableCom extends Component {
return
return
} */
} */
const
base52
=
column
.
base52
const
base52
=
column
.
base52
try
{
try
{
var
fun1
=
new
Function
(
"obj"
,
"init"
,
"defaultValues"
,
"env"
,
"index"
,
"fatherCode"
,
"utils"
,
fun
);
var
fun1
=
new
Function
(
"obj"
,
"init"
,
"defaultValues"
,
"env"
,
"index"
,
"fatherCode"
,
"utils"
,
fun
);
let
obj
let
obj
if
(
!
this
.
props
.
isEdit
&&
this
.
props
.
fatherCode
){
if
(
!
this
.
props
.
isEdit
&&
this
.
props
.
fatherCode
){
obj
=
{
...
this
.
props
.
fatherObj
,
...
this
.
props
.
form
.
getFieldsValue
(),
...
this
.
props
.
defaultValues
[
this
.
props
.
formKey
]
}
obj
=
{
...
this
.
props
.
fatherObj
,
...
this
.
props
.
form
.
getFieldsValue
(),
...
this
.
props
.
defaultValues
[
this
.
props
.
formKey
]
}
}
else
{
}
else
{
obj
=
{
...
this
.
props
.
obj
,
...
this
.
props
.
form
.
getFieldsValue
(),
...
this
.
props
.
defaultValues
[
this
.
props
.
formKey
]
}
obj
=
{
...
this
.
props
.
obj
,
...
this
.
props
.
form
.
getFieldsValue
(),
...
this
.
props
.
defaultValues
[
this
.
props
.
formKey
]
}
}
}
const
value
=
fun1
(
obj
,
this
.
props
.
init
,
this
.
props
.
defaultValues
,
{
clientType
:
this
.
props
.
get
,
formCode
:
this
.
props
.
formCode
,
formId
:
this
.
props
.
formId
},
this
.
props
.
index
,
this
.
props
.
fatherCode
,
const
value
=
fun1
(
obj
,
this
.
props
.
init
,
this
.
props
.
defaultValues
,
{
clientType
:
this
.
props
.
get
,
formCode
:
this
.
props
.
formCode
,
formId
:
this
.
props
.
formId
},
this
.
props
.
index
,
this
.
props
.
fatherCode
,
{
{
moment
:
moment
,
moment
:
moment
,
sql
:
this
.
sqlUtil
.
bind
(
this
,
base52
,
json
,
callback
),
sql
:
this
.
sqlUtil
.
bind
(
this
,
base52
,
json
,
callback
),
message
:
message
,
router
:
router
,
message
:
message
,
router
:
router
,
setValues
:
this
.
setValues
.
bind
(
this
,
base52
,
json
),
setValues
:
this
.
setValues
.
bind
(
this
,
base52
,
json
),
req
:
this
.
reqUtil
.
bind
(
this
,
base52
,
json
,
callback
),
req
:
this
.
reqUtil
.
bind
(
this
,
base52
,
json
,
callback
),
md5
:
md5
,
md5
:
md5
,
render
:
this
.
getRender
,
base64
:
getBase64
render
:
this
.
getRender
,
base64
:
getBase64
},
},
...
@@ -1205,13 +1205,13 @@ export default class tableCom extends Component {
...
@@ -1205,13 +1205,13 @@ export default class tableCom extends Component {
}
}
})
})
}
}
const
bindObj
=
this
.
getColumn
(
'c1'
);
const
bindObj
=
this
.
getColumn
(
'c1'
);
let
dataColumn
=
this
.
props
.
fatherCode
!=
null
?
(
bindObj
?{...
bindObj
,
base52
:
`
${
this
.
props
.
fatherCode
}
.[
${
this
.
props
.
index
}
].
${
bindObj
.
base52
}
`
}:
let
dataColumn
=
this
.
props
.
fatherCode
!=
null
?
(
bindObj
?{...
bindObj
,
base52
:
`
${
this
.
props
.
fatherCode
}
.[
${
this
.
props
.
index
}
].
${
bindObj
.
base52
}
`
}:
{
base52
:
`
${
this
.
props
.
fatherCode
}
.[
${
this
.
props
.
index
}
].
${
this
.
props
.
uuid
}
`
})
{
base52
:
`
${
this
.
props
.
fatherCode
}
.[
${
this
.
props
.
index
}
].
${
this
.
props
.
uuid
}
`
})
:
bindObj
;
:
bindObj
;
if
(
this
.
props
.
fatherCode
==
null
&&
dataColumn
==
null
)
dataColumn
=
{
base52
:
this
.
props
.
uuid
}
if
(
this
.
props
.
fatherCode
==
null
&&
dataColumn
==
null
)
dataColumn
=
{
base52
:
this
.
props
.
uuid
}
/* if (this.props.fatherCode != null) {
/* if (this.props.fatherCode != null) {
...
@@ -1230,15 +1230,15 @@ export default class tableCom extends Component {
...
@@ -1230,15 +1230,15 @@ export default class tableCom extends Component {
}
}
} */
} */
if
(
!
this
.
props
.
isEdit
&&
this
.
props
.
fatherCode
)
{
if
(
!
this
.
props
.
isEdit
&&
this
.
props
.
fatherCode
)
{
if
(
bindObj
!=
null
){
if
(
bindObj
!=
null
){
dataColumn
.
base52
=
bindObj
.
base52
dataColumn
.
base52
=
bindObj
.
base52
}
else
{
}
else
{
dataColumn
.
base52
=
this
.
props
.
uuid
dataColumn
.
base52
=
this
.
props
.
uuid
}
}
}
}
this
.
getData
(
json
,
dataColumn
,
obj
)
this
.
getData
(
json
,
dataColumn
,
obj
)
if
(
json
.
formula
!=
null
&&
json
.
formula
!=
""
)
{
if
(
json
.
formula
!=
null
&&
json
.
formula
!=
""
)
{
this
.
getFunctionValue
(
json
.
formula
,
dataColumn
,
json
)
this
.
getFunctionValue
(
json
.
formula
,
dataColumn
,
json
)
...
@@ -1277,7 +1277,7 @@ export default class tableCom extends Component {
...
@@ -1277,7 +1277,7 @@ export default class tableCom extends Component {
});
});
}
else
if
(
!
this
.
props
.
isEdit
&&
Object
.
keys
(
obj
).
length
>
0
)
{
}
else
if
(
!
this
.
props
.
isEdit
&&
Object
.
keys
(
obj
).
length
>
0
)
{
let
base52
=
dataColumn
.
base52
let
base52
=
dataColumn
.
base52
if
(
this
.
props
.
fatherCode
)
{
if
(
this
.
props
.
fatherCode
)
{
const
x
=
base52
.
split
(
"."
)
const
x
=
base52
.
split
(
"."
)
...
@@ -1704,7 +1704,7 @@ export default class tableCom extends Component {
...
@@ -1704,7 +1704,7 @@ export default class tableCom extends Component {
if
(
this
.
props
.
fatherCode
==
null
&&
dataColumn
==
null
)
{
if
(
this
.
props
.
fatherCode
==
null
&&
dataColumn
==
null
)
{
dataColumn
=
{
base52
:
this
.
props
.
uuid
}
dataColumn
=
{
base52
:
this
.
props
.
uuid
}
}
}
if
(
!
dataColumn
.
isNull
)
{
if
(
dataColumn
.
isNull
!=
null
&&
!
dataColumn
.
isNull
)
{
required
=
true
;
required
=
true
;
}
}
...
@@ -1730,15 +1730,15 @@ export default class tableCom extends Component {
...
@@ -1730,15 +1730,15 @@ export default class tableCom extends Component {
}
}
}
}
if
(
!
isEdit
)
{
if
(
!
isEdit
)
{
if
(
this
.
props
.
fatherCode
)
{
if
(
this
.
props
.
fatherCode
)
{
if
(
bindObj
!=
null
){
if
(
bindObj
!=
null
){
dataColumn
.
base52
=
bindObj
.
base52
dataColumn
.
base52
=
bindObj
.
base52
}
else
{
}
else
{
dataColumn
.
base52
=
this
.
props
.
uuid
dataColumn
.
base52
=
this
.
props
.
uuid
}
}
}
}
...
@@ -1970,14 +1970,14 @@ export default class tableCom extends Component {
...
@@ -1970,14 +1970,14 @@ export default class tableCom extends Component {
if
(
json
.
objCode
==
null
||
json
.
objCode
==
""
)
{
if
(
json
.
objCode
==
null
||
json
.
objCode
==
""
)
{
cm
=
<></>
cm
=
<></>
}
}
cm
=
<
TableList
cm
=
<
TableList
loading=
{
this
.
props
.
loading
}
loading=
{
this
.
props
.
loading
}
showHeader=
{
json
.
showHeader
}
showHeader=
{
json
.
showHeader
}
isHiddenPage=
{
json
.
isHiddenPage
}
isHiddenPage=
{
json
.
isHiddenPage
}
pageSize=
{
json
.
pageSize
}
pageSize=
{
json
.
pageSize
}
value=
{
obj
[
dataColumn
.
base52
||
this
.
props
.
uuid
]
||
{}
}
value=
{
obj
[
dataColumn
.
base52
||
this
.
props
.
uuid
]
||
{}
}
objCode=
{
json
.
objCode
}
objCode=
{
json
.
objCode
}
sql=
{
json
.
filterSql
}
sql=
{
json
.
filterSql
}
rights=
{
json
.
rights
}
/>
rights=
{
json
.
rights
}
/>
break
;
break
;
default
:
default
:
...
@@ -2147,7 +2147,7 @@ export default class tableCom extends Component {
...
@@ -2147,7 +2147,7 @@ export default class tableCom extends Component {
disabled=
{
disabled
}
disabled=
{
disabled
}
placeholder=
{
json
.
placeholder
?
json
.
placeholder
:
'请输入'
+
(
title
?
title
:
''
)
}
placeholder=
{
json
.
placeholder
?
json
.
placeholder
:
'请输入'
+
(
title
?
title
:
''
)
}
>
>
</
MobileInputItem
>
</
MobileInputItem
>
</
div
>
</
div
>
</
Brief
>
</
Brief
>
...
@@ -2646,13 +2646,13 @@ export default class tableCom extends Component {
...
@@ -2646,13 +2646,13 @@ export default class tableCom extends Component {
</
Form
.
Item
>
</
Form
.
Item
>
);
);
}
else
{
}
else
{
return
cm
return
cm
}
}
}
else
{
}
else
{
return
(
return
(
<
Form
.
Item
<
Form
.
Item
>
>
{
cm
}
{
cm
}
</
Form
.
Item
>
</
Form
.
Item
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论