Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
b2e5d127
提交
b2e5d127
authored
4月 06, 2020
作者:
钟是志
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
0365ebf3
49140003
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
113 行增加
和
25 行删除
+113
-25
index.js
FormInsertDiy/HistoryForm/index.js
+0
-1
DetailPage.js
FormInsertDiy/MyApplyList/DetailPage.js
+21
-6
index.jsx
one_stop_public/Table/index.jsx
+80
-14
index.js
one_stop_public/libs/formList/index.js
+12
-4
没有找到文件。
FormInsertDiy/HistoryForm/index.js
浏览文件 @
b2e5d127
...
@@ -13,7 +13,6 @@ import styles from './index.less';
...
@@ -13,7 +13,6 @@ import styles from './index.less';
export
default
function
HistoryForm
(
props
)
{
export
default
function
HistoryForm
(
props
)
{
const
{
data
,
isNewForm
}
=
props
;
const
{
data
,
isNewForm
}
=
props
;
console
.
log
(
data
,
isNewForm
)
return
(
return
(
<
div
>
<
div
>
{
data
.
hisTaskForm
.
formKeys
&&
data
.
hisTaskForm
.
formKeys
.
length
>
0
{
data
.
hisTaskForm
.
formKeys
&&
data
.
hisTaskForm
.
formKeys
.
length
>
0
...
...
FormInsertDiy/MyApplyList/DetailPage.js
浏览文件 @
b2e5d127
...
@@ -4,9 +4,12 @@ import Shell from '@/baseComponent/Shell';
...
@@ -4,9 +4,12 @@ import Shell from '@/baseComponent/Shell';
import
HistoryForm
from
'@/webPublic/FormInsertDiy/HistoryForm'
;
import
HistoryForm
from
'@/webPublic/FormInsertDiy/HistoryForm'
;
import
{
getHistoryFormDetail
}
from
'../../Services'
;
import
{
getHistoryFormDetail
}
from
'../../Services'
;
import
withGoBack
from
'@/highOrderComponent/withGoBack'
;
import
withGoBack
from
'@/highOrderComponent/withGoBack'
;
import
SubmitButton
from
'@/webPublic/one_stop_public/AffairButton/SumbitButton'
;
import
{
ModalInfo
}
from
'@/baseComponent/Modal'
;
import
{
router
}
from
'umi'
;
// 查看详情, 传申报数据的code
// 查看详情, 传申报数据的code
let
DetailPage
=
({
form
,
code
})
=>
{
let
DetailPage
=
({
form
,
code
,
appId
})
=>
{
const
[
data
,
setData
]
=
useState
(
null
);
const
[
data
,
setData
]
=
useState
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
...
@@ -20,15 +23,27 @@ let DetailPage = ({ form, code }) => {
...
@@ -20,15 +23,27 @@ let DetailPage = ({ form, code }) => {
}
}
});
});
},
[]);
},
[]);
function
submitCb
(
res
)
{
ModalInfo
(
`提交
${
res
?
'成功'
:
'失败'
}
!`
,
{
onOk
:
()
=>
router
.
goBack
()
});
}
return
(
return
(
<
Shell
styleShell
=
{{
marginTop
:
0
}}
>
<
Shell
styleShell
=
{{
marginTop
:
0
}}
>
<
Spin
spinning
=
{
loading
}
>
<
Spin
spinning
=
{
loading
}
>
{
data
&&
(
{
data
&&
(
<
HistoryForm
<>
data
=
{
data
}
// 'affair/getIdFormDetail' 接口返回数据
<
HistoryForm
form
=
{
form
}
// form控件
data
=
{
data
}
// 'affair/getIdFormDetail' 接口返回数据
isNewForm
=
{
data
.
isSecond
??
false
}
// 是否渲染需要当前用户填写的审核表单 为false只会渲染历史回显表单
form
=
{
form
}
// form控件
/
>
isNewForm
=
{
data
.
isSecond
??
false
}
// 是否渲染需要当前用户填写的审核表单 为false只会渲染历史回显表单
/
>
{
data
.
isSecond
&&
(
<
div
style
=
{{
padding
:
16
,
textAlign
:
'center'
}}
>
<
SubmitButton
form
=
{
form
}
appId
=
{
appId
}
text
=
"提交"
callback
=
{
submitCb
}
/
>
<
/div
>
)}
<
/
>
)}
)}
<
/Spin
>
<
/Spin
>
<
/Shell
>
<
/Shell
>
...
...
one_stop_public/Table/index.jsx
浏览文件 @
b2e5d127
...
@@ -400,7 +400,9 @@ export default class ZdyTable extends Component {
...
@@ -400,7 +400,9 @@ export default class ZdyTable extends Component {
case
'web'
:
case
'web'
:
return
(
return
(
<
Form
{
...
formItemLayout
}
className=
"login-form"
>
<
Form
{
...
formItemLayout
}
className=
"login-form"
>
{
isEdit
&&
defaultBinds
?
Object
.
keys
(
defaultBinds
).
map
((
k
)
=>
{
{
isEdit
&&
defaultBinds
?
Object
.
keys
(
defaultBinds
).
map
((
k
)
=>
{
const
r
=
defaultBinds
[
k
]
const
r
=
defaultBinds
[
k
]
if
(
r
.
columnIds
==
null
||
r
.
columnIds
.
length
<
2
||
r
.
sqls
==
null
||
r
.
sqls
.
length
<
2
)
{
if
(
r
.
columnIds
==
null
||
r
.
columnIds
.
length
<
2
||
r
.
sqls
==
null
||
r
.
sqls
.
length
<
2
)
{
...
@@ -423,9 +425,18 @@ export default class ZdyTable extends Component {
...
@@ -423,9 +425,18 @@ export default class ZdyTable extends Component {
<
Row
>
<
Row
>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
div
style=
{
styleDiv
}
ref=
{
ref
=>
{
this
.
root
=
ref
}
}
<
div
style=
{
styleDiv
}
ref=
{
ref
=>
{
this
.
root
=
ref
}
}
>
>
<
table
style=
{
{
overflow
:
"auto"
,
margin
:
max
*
width
>
550
?
"auto"
:
''
,...
style
}
}
border=
{
border
}
cellSpacing=
"0"
cellPadding=
"0"
>
<
table
style=
{
{
overflow
:
"auto"
,
margin
:
max
*
width
>
550
?
"auto"
:
''
,
...
style
}
}
border=
{
border
}
cellSpacing=
"0"
cellPadding=
"0"
>
<
tbody
>
<
tbody
>
{
items
.
map
((
row
,
i
)
=>
{
{
items
.
map
((
row
,
i
)
=>
{
const
allhidden
=
this
.
checkAllHidden
(
row
)
const
allhidden
=
this
.
checkAllHidden
(
row
)
...
@@ -440,15 +451,43 @@ export default class ZdyTable extends Component {
...
@@ -440,15 +451,43 @@ export default class ZdyTable extends Component {
console
.
log
(
`第${i}行第${j}列样式配置有误,${e}`
)
console
.
log
(
`第${i}行第${j}列样式配置有误,${e}`
)
}
}
}
}
return
!
allhidden
&&
cell
.
hidden
?
""
:
<
td
width=
{
i
==
0
?((
cell
.
content
!=
null
&&
cell
.
content
.
cwidth
!=
null
?
cell
.
content
.
cwidth
:
width
)
*
(
cell
.
col
?
cell
.
col
:
1
))
:
width
*
(
cell
.
col
?
cell
.
col
:
1
)
}
rowSpan=
{
cell
.
row
}
colSpan=
{
cell
.
col
}
key=
{
j
}
style=
{
{
return
!
allhidden
&&
cell
.
hidden
?
overflow
:
"auto"
,
""
textAlign
:
cell
.
content
&&
cell
.
content
.
calign
?
cell
.
content
.
calign
:
"left"
,
:
<
td
...
isBorder
?(
cell
.
content
.
comName
==
"InputHidden"
||!
cell
?.
content
?.
comName
?{}:
borderStyle
):{},
width=
{
i
==
0
?
...
styles
((
cell
.
content
!=
null
&&
cell
.
content
.
cwidth
!=
null
?
cell
.
content
.
cwidth
:
width
)
*
(
cell
.
col
?
cell
.
col
:
1
))
}
}
>
:
width
*
(
cell
.
col
?
cell
.
col
:
1
)
}
rowSpan=
{
cell
.
row
}
<
TableCom
formCode=
{
formCode
}
formId=
{
formId
}
i=
{
i
}
j=
{
j
}
fatherCode=
{
fatherCode
}
index=
{
index
}
datas=
{
datas
}
uuid=
{
cell
.
uuid
}
isEdit=
{
isEdit
}
formKey=
{
currentFormKey
}
init=
{
init
}
get=
{
get
}
json=
{
cell
.
content
}
obj=
{
obj
||
{}
}
mapData=
{
mapData
}
form=
{
this
.
props
.
form
}
sqlData=
{
sqlData
}
defaultValues=
{
defaultValues
||
{}
}
/>
colSpan=
{
cell
.
col
}
key=
{
j
}
style=
{
{
overflow
:
"auto"
,
textAlign
:
cell
.
content
&&
cell
.
content
.
calign
?
cell
.
content
.
calign
:
"left"
,
...
isBorder
?(
cell
?.
content
?.
comName
==
"InputHidden"
||!
cell
?.
content
?.
comName
?{}:
borderStyle
):{},
...
styles
}
}
>
<
TableCom
formCode=
{
formCode
}
// 当前表单code
formId=
{
formId
}
// 当前表单Id
i=
{
i
}
// 当前组件下标
j=
{
j
}
// 当前行数下班
fatherCode=
{
fatherCode
}
index=
{
index
}
datas=
{
datas
}
uuid=
{
cell
.
uuid
}
isEdit=
{
isEdit
}
formKey=
{
currentFormKey
}
init=
{
init
}
get=
{
get
}
// 区分移动端或wen端
json=
{
cell
.
content
}
obj=
{
obj
||
{}
}
// 是否存在默认值
mapData=
{
mapData
}
form=
{
this
.
props
.
form
}
// antd form控件
sqlData=
{
sqlData
}
defaultValues=
{
defaultValues
||
{}
}
// 接口中的默认值
/>
</
td
>}
</
td
>}
)
)
...
@@ -493,11 +532,38 @@ export default class ZdyTable extends Component {
...
@@ -493,11 +532,38 @@ export default class ZdyTable extends Component {
{
{
items
.
map
((
item
,
i
)
=>
{
items
.
map
((
item
,
i
)
=>
{
const
allhidden
=
this
.
checkAllHidden
(
items
)
const
allhidden
=
this
.
checkAllHidden
(
items
)
return
(<
div
key=
{
i
}
style=
{
{
marginTop
:
0
,
background
:
'#ffffff'
,
paddingLeft
:
12
,
width
:
'100%'
,
flexWrap
:
'wrap'
,...
style
}
}
>
return
(<
div
key=
{
i
}
style=
{
{
marginTop
:
0
,
background
:
'#ffffff'
,
paddingLeft
:
12
,
width
:
'100%'
,
flexWrap
:
'wrap'
,
...
style
}
}
>
{
{
item
.
map
((
ary
,
j
)
=>
{
item
.
map
((
ary
,
j
)
=>
{
return
!
allhidden
&&
ary
.
hidden
?
""
return
!
allhidden
&&
ary
.
hidden
?
""
:
<><
TableCom
formCode=
{
formCode
}
formId=
{
formId
}
i=
{
i
}
j=
{
j
}
index=
{
index
}
fatherCode=
{
fatherCode
}
datas=
{
datas
}
isEdit=
{
isEdit
}
formKey=
{
currentFormKey
}
init=
{
init
}
get=
{
get
}
key=
{
j
}
sqlData=
{
sqlData
}
obj=
{
obj
||
{}
}
form=
{
this
.
props
.
form
}
mapData=
{
mapData
}
json=
{
ary
.
content
}
uuid=
{
ary
.
uuid
}
defaultValues=
{
defaultValues
||
{}
}
/></>
:
<><
TableCom
formCode=
{
formCode
}
formId=
{
formId
}
i=
{
i
}
j=
{
j
}
index=
{
index
}
fatherCode=
{
fatherCode
}
datas=
{
datas
}
isEdit=
{
isEdit
}
formKey=
{
currentFormKey
}
init=
{
init
}
get=
{
get
}
key=
{
j
}
sqlData=
{
sqlData
}
obj=
{
obj
||
{}
}
form=
{
this
.
props
.
form
}
mapData=
{
mapData
}
json=
{
ary
.
content
}
uuid=
{
ary
.
uuid
}
defaultValues=
{
defaultValues
||
{}
}
/></>
})
})
}
}
</
div
>)
</
div
>)
...
...
one_stop_public/libs/formList/index.js
浏览文件 @
b2e5d127
...
@@ -104,14 +104,23 @@ const CreateForm = Form.create()(props => {
...
@@ -104,14 +104,23 @@ const CreateForm = Form.create()(props => {
handleAdd
(
params
,
isAdd
);
handleAdd
(
params
,
isAdd
);
});
});
};
};
console
.
log
(
"isView"
,
isView
)
//需要获取动态表单
//需要获取动态表单
return
(
return
(
<
Modal
<
Modal
width
=
"700px"
width
=
"700px"
maskClosable
=
{
false
}
maskClosable
=
{
false
}
destroyOnClose
destroyOnClose
title
=
{
is
Add
?
'新增'
:
'编辑'
}
title
=
{
is
View
?
"查看详情"
:(
isAdd
?
'新增'
:
'编辑'
)
}
visible
=
{
modalVisible
}
visible
=
{
modalVisible
}
footer
=
{
isView
?
null
:[
<
Button
key
=
"back"
onClick
=
{()
=>
handleModalVisible
()}
>
取消
<
/Button>
,
<
Button
key
=
"submit"
type
=
"primary"
onClick
=
{
okHandle
}
>
确定
<
/Button
>
]}
onOk
=
{
okHandle
}
onOk
=
{
okHandle
}
onCancel
=
{()
=>
handleModalVisible
()}
onCancel
=
{()
=>
handleModalVisible
()}
>
>
...
@@ -872,6 +881,7 @@ class FormList extends React.Component {
...
@@ -872,6 +881,7 @@ class FormList extends React.Component {
}
=
this
.
props
;
}
=
this
.
props
;
const
{
const
{
showMobileDiv
,
showMobileDiv
,
isView
}
=
this
.
state
}
=
this
.
state
...
@@ -890,7 +900,7 @@ class FormList extends React.Component {
...
@@ -890,7 +900,7 @@ class FormList extends React.Component {
formItem
:
this
.
state
.
formItem
,
formItem
:
this
.
state
.
formItem
,
isAdd
:
this
.
state
.
isAdd
,
isAdd
:
this
.
state
.
isAdd
,
getItem
:
this
.
getItem
,
getItem
:
this
.
getItem
,
isView
:
isView
,
};
};
...
@@ -908,8 +918,6 @@ class FormList extends React.Component {
...
@@ -908,8 +918,6 @@ class FormList extends React.Component {
}
}
if
(
this
.
columns
.
length
>
0
&&
this
.
columns
[
this
.
columns
.
length
-
1
].
title
==
"操作"
){
if
(
this
.
columns
.
length
>
0
&&
this
.
columns
[
this
.
columns
.
length
-
1
].
title
==
"操作"
){
this
.
columns
[
this
.
columns
.
length
-
1
]
=
column
;
this
.
columns
[
this
.
columns
.
length
-
1
]
=
column
;
}
else
{
this
.
columns
.
push
(
column
);
}
}
}
else
{
}
else
{
const
column
=
{
const
column
=
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论