Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
f333d3b9
提交
f333d3b9
authored
8月 17, 2020
作者:
tb53863844
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
93a0e870
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
586 行增加
和
507 行删除
+586
-507
index.jsx
one_stop_public/Table/index.jsx
+569
-505
isNewMobileTable.jsx
one_stop_public/Table/isNewMobileTable.jsx
+12
-1
index.jsx
one_stop_public/tableCompon/index.jsx
+5
-1
没有找到文件。
one_stop_public/Table/index.jsx
浏览文件 @
f333d3b9
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*/
*/
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Form
,
Row
,
Col
,
Input
,
message
}
from
'antd'
;
import
{
Form
,
Row
,
Col
,
Input
,
message
}
from
'antd'
;
import
UUID
from
'react-native-uuid'
;
import
{
Toast
}
from
'antd-mobile'
;
import
{
Toast
}
from
'antd-mobile'
;
import
router
from
'umi/router'
;
import
router
from
'umi/router'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
...
@@ -30,7 +30,7 @@ export default class ZdyTable extends Component {
...
@@ -30,7 +30,7 @@ export default class ZdyTable extends Component {
sqlData
:
{},
sqlData
:
{},
defaultValues
:
{},
defaultValues
:
{},
currentFormKey
:
null
,
currentFormKey
:
null
,
currentFormTitle
:
null
,
currentFormTitle
:
null
,
items
:
[],
items
:
[],
init
:
this
.
props
.
init
||
{},
init
:
this
.
props
.
init
||
{},
datas
:
{},
datas
:
{},
...
@@ -50,16 +50,18 @@ export default class ZdyTable extends Component {
...
@@ -50,16 +50,18 @@ export default class ZdyTable extends Component {
isChild
,
// 是否为子表单
isChild
,
// 是否为子表单
isQRCode
=
false
,
// 是否为二维码快捷发起
isQRCode
=
false
,
// 是否为二维码快捷发起
formDeafault
=
''
,
// 为二维码快捷发起默认值
formDeafault
=
''
,
// 为二维码快捷发起默认值
}
=
this
.
props
;
}
=
this
.
props
;
if
(
isPreview
||
isChild
)
{
if
(
isPreview
||
isChild
)
{
this
.
setState
({
this
.
setState
({
...
this
.
state
,
...
this
.
state
,
...
this
.
props
,
...
this
.
props
,
isReady
:
true
,
isReady
:
true
,
formConfig
:
{
...
this
.
state
.
formConfig
,
style
:
this
.
props
.
style
},
formConfig
:
{
...
this
.
state
.
formConfig
,
style
:
this
.
props
.
style
},
});
this
.
initExcel
({
datas
:
this
.
props
.
datas
,
trees
:
this
.
props
.
trees
})
},()
=>
this
.
initExcel
({
datas
:
this
.
props
.
datas
,
trees
:
this
.
props
.
trees
}));
return
;
return
;
}
}
...
@@ -90,7 +92,7 @@ export default class ZdyTable extends Component {
...
@@ -90,7 +92,7 @@ export default class ZdyTable extends Component {
}
}
const
obj
=
JSON
.
parse
(
val
.
form
.
content
);
const
obj
=
JSON
.
parse
(
val
.
form
.
content
);
const
xxx
=
obj
.
datas
[
obj
.
init
];
const
xxx
=
obj
.
datas
[
obj
.
init
];
const
fk
=
this
.
props
.
table
?
val
.
formKey
:
obj
.
init
;
const
fk
=
this
.
props
.
table
?
val
.
formKey
:
obj
.
init
;
this
.
setState
({
this
.
setState
({
datas
:
obj
.
datas
,
datas
:
obj
.
datas
,
width
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
width
:
xxx
.
width
,
width
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
width
:
xxx
.
width
,
...
@@ -98,7 +100,7 @@ export default class ZdyTable extends Component {
...
@@ -98,7 +100,7 @@ export default class ZdyTable extends Component {
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isRowCol
:
xxx
.
isRowCol
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isRowCol
:
xxx
.
isRowCol
,
mapData
,
mapData
,
currentFormKey
:
fk
,
currentFormKey
:
fk
,
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
fk
),
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
fk
),
sqlData
,
sqlData
,
isEdit
:
!
this
.
props
.
formKey
,
isEdit
:
!
this
.
props
.
formKey
,
items
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
items
:
xxx
.
items
,
items
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
items
:
xxx
.
items
,
...
@@ -106,7 +108,7 @@ export default class ZdyTable extends Component {
...
@@ -106,7 +108,7 @@ export default class ZdyTable extends Component {
appId
:
val
.
appId
,
appId
:
val
.
appId
,
isReady
:
true
,
isReady
:
true
,
formConfig
:
xxx
,
formConfig
:
xxx
,
},
()
=>
this
.
initExcel
(
obj
));
},
()
=>
this
.
initExcel
(
obj
));
return
;
return
;
}
}
if
(
isCg
===
'yes'
)
{
if
(
isCg
===
'yes'
)
{
...
@@ -150,7 +152,7 @@ export default class ZdyTable extends Component {
...
@@ -150,7 +152,7 @@ export default class ZdyTable extends Component {
datas
:
obj
.
datas
,
datas
:
obj
.
datas
,
isEdit
:
!
this
.
props
.
formKey
,
isEdit
:
!
this
.
props
.
formKey
,
currentFormKey
:
obj
.
init
,
currentFormKey
:
obj
.
init
,
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
obj
.
init
),
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
obj
.
init
),
width
:
xxx
.
width
,
width
:
xxx
.
width
,
isBorder
:
xxx
.
isBorder
,
isBorder
:
xxx
.
isBorder
,
isRowCol
:
xxx
.
isRowCol
,
isRowCol
:
xxx
.
isRowCol
,
...
@@ -163,7 +165,7 @@ export default class ZdyTable extends Component {
...
@@ -163,7 +165,7 @@ export default class ZdyTable extends Component {
defaultBinds
:
this
.
props
.
table
defaultBinds
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
:
xxx
.
defaultBinds
,
:
xxx
.
defaultBinds
,
},
()
=>
this
.
initExcel
(
obj
));
},
()
=>
this
.
initExcel
(
obj
));
return
;
return
;
}
}
if
(
if
(
...
@@ -199,11 +201,11 @@ export default class ZdyTable extends Component {
...
@@ -199,11 +201,11 @@ export default class ZdyTable extends Component {
}
}
const
obj
=
JSON
.
parse
(
val
.
unifiedServicePatternModel
.
content
);
const
obj
=
JSON
.
parse
(
val
.
unifiedServicePatternModel
.
content
);
const
xxx
=
obj
.
datas
[
this
.
props
.
formKey
?
this
.
props
.
formKey
:
obj
.
init
];
// 是否是存在历史表单传入值
const
xxx
=
obj
.
datas
[
this
.
props
.
formKey
?
this
.
props
.
formKey
:
obj
.
init
];
// 是否是存在历史表单传入值
const
fk
=
this
.
props
.
formKey
const
fk
=
this
.
props
.
formKey
?
this
.
props
.
formKey
?
this
.
props
.
formKey
:
val
.
taskFormKey
:
val
.
taskFormKey
?
val
.
taskFormKey
?
val
.
taskFormKey
:
obj
.
init
:
obj
.
init
this
.
setState
(
this
.
setState
(
{
{
appId
:
val
.
id
,
appId
:
val
.
id
,
...
@@ -215,7 +217,7 @@ export default class ZdyTable extends Component {
...
@@ -215,7 +217,7 @@ export default class ZdyTable extends Component {
defaultValues
:
val
.
unifiedServicePatternModel
.
defaultValues
,
defaultValues
:
val
.
unifiedServicePatternModel
.
defaultValues
,
isEdit
:
!
this
.
props
.
formKey
,
isEdit
:
!
this
.
props
.
formKey
,
currentFormKey
:
fk
,
currentFormKey
:
fk
,
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
fk
),
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
fk
),
defaultBinds
:
this
.
props
.
table
defaultBinds
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
:
xxx
.
defaultBinds
,
:
xxx
.
defaultBinds
,
...
@@ -241,172 +243,208 @@ export default class ZdyTable extends Component {
...
@@ -241,172 +243,208 @@ export default class ZdyTable extends Component {
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'公式配置有误'
,
e
);
console
.
log
(
'公式配置有误'
,
e
);
}
}
}
}
hfInstance
;
importExcel
=
(
res
)
=>
{
childExcel
=
(
sheetData
,
datas
,
tr
)
=>
{
if
(
tr
.
children
==
null
||
tr
.
children
.
length
==
0
){
const
{
datas
,
trees
}
=
this
.
configs
const
sheets
=
res
.
sheets
}
else
{
for
(
var
c
=
0
;
c
<
tr
.
children
.
length
;
c
++
){
for
(
var
s
=
0
;
s
<
sheets
.
length
;
s
++
)
{
this
.
childExcel
(
sheetData
,
datas
,
tr
.
children
[
c
])
const
uuid
=
sheets
[
s
].
key
;
}
const
items
=
[]
}
const
cc
=
sheets
[
s
].
cells
const
data
=
datas
[
tr
.
key
]
for
(
var
i
=
0
;
i
<
cc
.
length
;
i
++
)
{
const
all
=
[]
const
rows
=
[];
for
(
var
i
=
0
;
i
<
data
.
items
.
length
;
i
++
){
const
rr
=
cc
[
i
];
const
row
=
data
.
items
[
i
]
for
(
var
j
=
0
;
j
<
rr
.
length
;
j
++
)
{
const
r
=
[]
const
c
=
rr
[
j
];
for
(
var
j
=
0
;
j
<
row
.
length
;
j
++
){
if
(
c
.
value
==
null
||
c
.
value
==
''
)
{
const
col
=
row
[
j
]
rows
.
push
({
if
(
col
.
content
?.
comName
==
"Excel"
){
uuid
:
'id_'
+
UUID
.
v4
().
replace
(
/-/g
,
'2'
),
r
.
push
(
col
.
content
.
initialValue
)
row
:
c
.
rowSpan
,
}
else
{
col
:
c
.
colSpan
,
r
.
push
(
''
)
content
:
{
comName
:
'Excel'
,
cwidth
:
c
.
width
,
cheight
:
c
.
height
},
});
}
else
{
rows
.
push
({
uuid
:
'id_'
+
UUID
.
v4
().
replace
(
/-/g
,
'2'
),
row
:
c
.
rowSpan
,
col
:
c
.
colSpan
,
content
:
{
comName
:
'Excel'
,
initialValue
:
c
.
value
,
cwidth
:
c
.
width
,
cheight
:
c
.
height
},
});
}
}
}
}
all
.
push
(
r
)
items
.
push
(
rows
);
}
}
sheetData
[
tr
.
title
]
=
all
}
initExcel
=
(
configs
,
callback
)
=>
{
if
(
configs
==
null
||
configs
.
trees
==
null
)
return
const
sheetData
=
{}
const
charts
=
sheets
[
s
].
charts
;
for
(
var
key
in
configs
.
trees
){
if
(
charts
&&
charts
.
length
>
0
)
{
const
rows
=
[];
const
tr
=
configs
.
trees
[
key
]
for
(
var
j
=
0
;
j
<
charts
.
length
;
j
++
)
{
this
.
childExcel
(
sheetData
,
configs
.
datas
,
tr
)
const
chartModel
=
charts
[
j
];
}
rows
.
push
({
uuid
:
'id_'
+
UUID
.
v4
().
replace
(
/-/g
,
'2'
),
content
:
{
comName
:
'Echart'
,
columnIds
:
{
c1
:
[]
},
labelSpan
:
24
,
wrapperSpan
:
24
,
isLabel
:
false
,
formula
:
'return '
+
JSON
.
stringify
(
chartModel
.
option
),
},
});
items
.
push
(
rows
);
}
}
if
(
datas
[
uuid
]
==
null
){
trees
.
push
({
title
:
sheets
[
s
].
name
,
key
:
uuid
});
}
datas
[
uuid
]
=
{
width
:
400
,
max
:
1
,
isBorder
:
true
,
items
:
items
,
};
const
hfInstance
=
HyperFormula
.
buildFromSheets
(
sheetData
,
{});
}
this
.
initExcel
({
datas
,
trees
})
this
.
hfInstance
=
hfInstance
console
.
log
(
"公式导入excel成功"
)
if
(
callback
)
callback
()
}
}
getCellValue
=
(
i
,
j
,
currentTitle
)
=>
{
hfInstance
;
if
(
this
.
hfInstance
&&
currentTitle
){
childExcel
=
(
sheetData
,
datas
,
tr
)
=>
{
let
x
=
this
.
hfInstance
.
getCellValue
({
col
:
j
,
row
:
i
,
sheet
:
this
.
hfInstance
.
getSheetId
(
currentTitle
)
})
if
(
tr
.
children
==
null
||
tr
.
children
.
length
==
0
)
{
if
(
x
&&
x
.
value
!=
null
){
x
=
x
.
value
}
else
{
}
for
(
var
c
=
0
;
c
<
tr
.
children
.
length
;
c
++
)
{
this
.
childExcel
(
sheetData
,
datas
,
tr
.
children
[
c
])
return
x
;
}
}
componentWillReceiveProps
(
nextProps
)
{
const
{
postData
,
// 数据源
isCg
,
// 用户点击草稿页面进入
isForm
,
isPreview
,
// 是否为预览模式
isChild
,
// 是否为子表单
}
=
nextProps
;
if
(
isPreview
||
isChild
)
{
this
.
setState
({
...
this
.
state
,
...
nextProps
,
isReady
:
true
,
formConfig
:
{
...
this
.
state
.
formConfig
,
style
:
nextProps
.
style
},
});
this
.
initExcel
({
datas
:
nextProps
.
datas
,
trees
:
nextProps
.
trees
})
return
;
}
}
}
const
data
=
datas
[
tr
.
key
]
const
all
=
[]
for
(
var
i
=
0
;
i
<
data
.
items
.
length
;
i
++
)
{
const
row
=
data
.
items
[
i
]
const
r
=
[]
for
(
var
j
=
0
;
j
<
row
.
length
;
j
++
)
{
const
col
=
row
[
j
]
if
(
col
.
content
?.
comName
==
"Excel"
)
{
r
.
push
(
col
.
content
.
initialValue
)
}
else
{
r
.
push
(
''
)
}
try
{
}
const
val
=
postData
;
all
.
push
(
r
)
/**
}
* 数据源不同进行以下区别处理
* this.props.table有传入值表明需要渲染流程中最新表单
sheetData
[
tr
.
title
]
=
all
*/
if
(
isForm
)
{
}
// 由表格的操作按钮进入
configs
const
mapData
=
{};
initExcel
=
(
configs
,
callback
)
=>
{
const
sqlData
=
{};
const
dataObjs
=
val
.
form
.
dataObjModels
;
if
(
configs
==
null
||
configs
.
trees
==
null
)
return
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
const
dob
=
dataObjs
[
i
];
if
(
configs
.
trees
!=
null
)
this
.
configs
=
configs
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
const
sheetData
=
{}
}
for
(
var
key
in
configs
.
trees
)
{
}
const
sqls
=
val
.
form
.
sqlModels
;
const
tr
=
configs
.
trees
[
key
]
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
this
.
childExcel
(
sheetData
,
configs
.
datas
,
tr
)
const
dob
=
sqls
[
i
].
dataObjModel
;
}
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
const
hfInstance
=
HyperFormula
.
buildFromSheets
(
sheetData
,
{});
}
}
this
.
hfInstance
=
hfInstance
const
obj
=
JSON
.
parse
(
val
.
form
.
content
);
if
(
callback
)
callback
()
const
xxx
=
obj
.
datas
[
obj
.
init
];
}
this
.
setState
({
getCellValue
=
(
i
,
j
,
currentTitle
)
=>
{
datas
:
obj
.
datas
,
let
hfInstance
=
this
.
props
.
hfInstance
||
this
.
hfInstance
width
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
width
:
xxx
.
width
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isRowCol
:
xxx
.
isRowCol
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isBorder
:
xxx
.
isBorder
,
if
(
hfInstance
&&
currentTitle
)
{
mapData
,
let
x
=
hfInstance
.
getCellValue
({
col
:
j
,
row
:
i
,
sheet
:
hfInstance
.
getSheetId
(
currentTitle
)
})
currentFormKey
:
this
.
props
.
table
?
val
.
formKey
:
obj
.
init
,
if
(
x
&&
x
.
value
!=
null
)
{
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
fk
),
x
=
x
.
value
sqlData
,
isEdit
:
!
this
.
props
.
formKey
,
items
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
items
:
xxx
.
items
,
defaultValues
:
val
.
form
.
defaultValues
,
appId
:
val
.
appId
,
isReady
:
true
,
formConfig
:
xxx
,
},()
=>
this
.
initExcel
(
obj
));
return
;
}
}
if
(
isCg
===
'yes'
)
{
return
x
;
// 用户从编辑按钮进入
}
const
mapData
=
{};
const
sqlData
=
{};
}
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
componentWillReceiveProps
(
nextProps
)
{
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
const
{
const
dob
=
sqls
[
i
].
dataObjModel
;
postData
,
// 数据源
isCg
,
// 用户点击草稿页面进入
isForm
,
isPreview
,
// 是否为预览模式
isChild
,
// 是否为子表单
}
=
nextProps
;
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
if
(
isPreview
||
isChild
)
{
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
this
.
setState
({
}
...
this
.
state
,
}
...
nextProps
,
const
dataObjs
=
val
.
unifiedServicePatternModel
.
dataObjModels
;
isReady
:
true
,
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
formConfig
:
{
...
this
.
state
.
formConfig
,
style
:
nextProps
.
style
},
const
dob
=
dataObjs
[
i
]
;
},()
=>
this
.
initExcel
({
datas
:
nextProps
.
datas
,
trees
:
nextProps
.
trees
}))
;
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
return
;
}
try
{
const
val
=
postData
;
/**
* 数据源不同进行以下区别处理
* this.props.table有传入值表明需要渲染流程中最新表单
*/
if
(
isForm
)
{
// 由表格的操作按钮进入
const
mapData
=
{};
const
sqlData
=
{};
const
dataObjs
=
val
.
form
.
dataObjModels
;
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
const
dob
=
dataObjs
[
i
];
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
const
sqls
=
val
.
form
.
sqlModels
;
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
const
dob
=
sqls
[
i
].
dataObjModel
;
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
const
obj
=
JSON
.
parse
(
val
.
unifiedServicePatternModel
.
content
);
const
xxx
=
obj
.
datas
[
obj
.
init
];
this
.
setState
({
items
:
xxx
.
items
,
init
:
{
...
this
.
state
.
init
,
...
JSON
.
parse
(
val
.
content
)
},
datas
:
obj
.
datas
,
isEdit
:
!
this
.
props
.
formKey
,
currentFormKey
:
obj
.
init
,
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
obj
.
init
),
width
:
xxx
.
width
,
isBorder
:
xxx
.
isBorder
,
isRowCol
:
xxx
.
isRowCol
,
mapData
,
sqlData
,
defaultValues
:
val
.
unifiedServicePatternModel
.
defaultValues
,
appId
:
val
.
appId
,
isReady
:
true
,
formConfig
:
xxx
,
defaultBinds
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
:
xxx
.
defaultBinds
,
},()
=>
this
.
initExcel
(
obj
));
return
;
}
}
const
obj
=
JSON
.
parse
(
val
.
form
.
content
);
const
xxx
=
obj
.
datas
[
obj
.
init
];
this
.
setState
({
datas
:
obj
.
datas
,
width
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
width
:
xxx
.
width
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isRowCol
:
xxx
.
isRowCol
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isBorder
:
xxx
.
isBorder
,
mapData
,
currentFormKey
:
this
.
props
.
table
?
val
.
formKey
:
obj
.
init
,
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
fk
),
sqlData
,
isEdit
:
!
this
.
props
.
formKey
,
items
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
items
:
xxx
.
items
,
defaultValues
:
val
.
form
.
defaultValues
,
appId
:
val
.
appId
,
isReady
:
true
,
formConfig
:
xxx
,
},
()
=>
this
.
initExcel
(
obj
));
return
;
}
if
(
isCg
===
'yes'
)
{
// 用户从编辑按钮进入
const
mapData
=
{};
const
mapData
=
{};
const
sqlData
=
{};
const
sqlData
=
{};
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
...
@@ -426,208 +464,271 @@ export default class ZdyTable extends Component {
...
@@ -426,208 +464,271 @@ export default class ZdyTable extends Component {
}
}
}
}
const
obj
=
JSON
.
parse
(
val
.
unifiedServicePatternModel
.
content
);
const
obj
=
JSON
.
parse
(
val
.
unifiedServicePatternModel
.
content
);
const
xxx
=
obj
.
datas
[
this
.
props
.
formKey
?
this
.
props
.
formKey
:
obj
.
init
];
// 是否是存在历史表单传入值
const
xxx
=
obj
.
datas
[
obj
.
init
];
const
fk
=
this
.
props
.
formKey
?
this
.
props
.
formKey
:
val
.
taskFormKey
?
val
.
taskFormKey
:
obj
.
init
this
.
setState
({
this
.
setState
({
appId
:
val
.
id
,
items
:
xxx
.
items
,
init
:
{
...
this
.
state
.
init
,
...
JSON
.
parse
(
val
.
content
)
},
datas
:
obj
.
datas
,
datas
:
obj
.
datas
,
isEdit
:
!
this
.
props
.
formKey
,
currentFormKey
:
obj
.
init
,
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
obj
.
init
),
width
:
xxx
.
width
,
isBorder
:
xxx
.
isBorder
,
isRowCol
:
xxx
.
isRowCol
,
mapData
,
mapData
,
sqlData
,
sqlData
,
defaultValues
:
val
.
unifiedServicePatternModel
.
defaultValues
,
defaultValues
:
val
.
unifiedServicePatternModel
.
defaultValues
,
isEdit
:
!
this
.
props
.
formKey
,
appId
:
val
.
appId
,
currentFormKey
:
fk
,
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
fk
),
defaultBinds
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
:
xxx
.
defaultBinds
,
width
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
width
:
xxx
.
width
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isBorder
:
xxx
.
isBorder
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isRowCol
:
xxx
.
isRowCol
,
items
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
items
:
xxx
.
items
,
isReady
:
true
,
isReady
:
true
,
init
:
{
...
this
.
state
.
init
,
...(
val
.
isSecond
?
this
.
props
.
obj
:
{})
},
formConfig
:
xxx
,
formConfig
:
xxx
,
// init:this.props.get==="mobile"?!!val.content?JSON.parse(val.content):'':{},// 移动端默认值设置
defaultBinds
:
this
.
props
.
table
},()
=>
this
.
initExcel
(
obj
));
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
}
catch
(
e
)
{
:
xxx
.
defaultBinds
,
console
.
log
(
'公式配置有误'
,
e
);
},
()
=>
this
.
initExcel
(
obj
));
return
;
}
}
}
const
mapData
=
{};
const
sqlData
=
{};
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
const
dob
=
sqls
[
i
].
dataObjModel
;
checkAllHidden
=
row
=>
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
if
(
row
[
i
].
hidden
==
null
||
!
row
[
i
].
hidden
)
{
return
false
;
}
}
}
}
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
const
dataObjs
=
val
.
unifiedServicePatternModel
.
dataObjModels
;
delete
row
[
i
].
hidden
;
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
}
const
dob
=
dataObjs
[
i
];
return
true
;
};
countMax
=
items
=>
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
let
max
=
0
;
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
items
.
forEach
(
r
=>
{
if
(
r
.
length
>
max
)
{
max
=
r
.
length
;
}
});
return
max
;
};
getCurrentFormTitle
=
(
obj
,
key
)
=>
{
const
{
trees
}
=
obj
for
(
var
i
=
0
;
i
<
trees
.
length
;
i
++
){
if
(
trees
[
i
].
key
==
key
){
return
trees
[
i
].
title
}
}
}
}
}
const
obj
=
JSON
.
parse
(
val
.
unifiedServicePatternModel
.
content
);
render
()
{
const
xxx
=
obj
.
datas
[
this
.
props
.
formKey
?
this
.
props
.
formKey
:
obj
.
init
];
// 是否是存在历史表单传入值
const
fk
=
this
.
props
.
formKey
const
{
?
this
.
props
.
formKey
width
,
:
val
.
taskFormKey
isRowCol
,
?
val
.
taskFormKey
isBorder
,
:
obj
.
init
sqlData
,
this
.
setState
({
appId
:
val
.
id
,
datas
:
obj
.
datas
,
mapData
,
mapData
,
defaultBinds
,
sqlData
,
defaultValues
,
defaultValues
:
val
.
unifiedServicePatternModel
.
defaultValues
,
items
,
isEdit
:
!
this
.
props
.
formKey
,
init
,
currentFormKey
:
fk
,
modalTitle
,
currentFormTitle
:
this
.
getCurrentFormTitle
(
obj
,
fk
),
currentFormKey
,
defaultBinds
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
:
xxx
.
defaultBinds
,
currentFormTitle
,
width
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
width
:
xxx
.
width
,
isEdit
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isBorder
:
xxx
.
isBorder
,
datas
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isRowCol
:
xxx
.
isRowCol
,
isReady
,
items
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
items
:
xxx
.
items
,
formConfig
,
isReady
:
true
,
formCode
,
init
:
{
...
this
.
state
.
init
,
...(
val
.
isSecond
?
this
.
props
.
obj
:
{})
},
formId
,
formConfig
:
xxx
,
}
=
this
.
state
;
// init:this.props.get==="mobile"?!!val.content?JSON.parse(val.content):'':{},// 移动端默认值设置
const
{
},
()
=>
this
.
initExcel
(
obj
));
border
,
}
catch
(
e
)
{
get
,
console
.
log
(
'公式配置有误'
,
e
);
obj
,
}
index
,
}
fatherCode
,
routerState
,
// 场景设计器共享路由参数
checkAllHidden
=
row
=>
{
messageData
,
// 场景设计器共享变量参数 设计器监听到参数发生变化后会重新渲染组件
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
postData
,
if
(
row
[
i
].
hidden
==
null
||
!
row
[
i
].
hidden
)
{
modalInit
,
return
false
;
concealModel
,
// 场景设计器内置跳转函数
}
paddingBottom
,
}
taskAssignee
,
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
userId
,
delete
row
[
i
].
hidden
;
isDynamic
,
// 是否为大数据页面
}
isWebPrint
,
// 打印界面
return
true
;
isWebPrintEnd
,
};
isPreview
}
=
this
.
props
;
countMax
=
items
=>
{
let
style
=
{};
let
max
=
0
;
if
(
formConfig
.
style
!=
null
)
{
items
.
forEach
(
r
=>
{
try
{
if
(
r
.
length
>
max
)
{
style
=
JSON
.
parse
(
formConfig
.
style
);
max
=
r
.
length
;
}
catch
(
e
)
{
}
console
.
log
(
e
);
});
style
=
{};
return
max
;
};
getCurrentFormTitle
=
(
obj
,
key
)
=>
{
if
(
obj
==
null
)
return
const
{
trees
}
=
obj
if
(
trees
==
null
)
return
return
this
.
getT
(
trees
,
key
)
}
getCurrentFormTitle2
=
(
key
)
=>
{
if
(
this
.
configs
==
null
)
return
const
{
trees
}
=
this
.
configs
if
(
trees
==
null
)
return
return
this
.
getT
(
trees
,
key
)
}
getT
=
(
trees
,
key
)
=>
{
for
(
var
i
=
0
;
i
<
trees
.
length
;
i
++
)
{
if
(
trees
[
i
].
children
==
null
||
trees
[
i
].
children
.
length
==
0
){
if
(
trees
[
i
].
key
==
key
)
{
return
trees
[
i
].
title
}
}
}
else
{
return
this
.
getT
(
trees
[
i
].
children
,
key
)
}
}
const
formItemLayout
=
{
}
labelCol
:
{
}
xs
:
{
span
:
24
},
sm
:
{
span
:
24
},
render
()
{
},
wrapperCol
:
{
const
{
xs
:
{
span
:
24
},
width
,
sm
:
{
span
:
24
},
isRowCol
,
},
isBorder
,
};
sqlData
,
const
max
=
this
.
countMax
(
items
);
mapData
,
const
borderStyle
=
{
defaultBinds
,
borderRight
:
'1px solid gray'
,
defaultValues
,
borderTop
:
'1px solid gray'
,
items
,
borderLeft
:
'1px solid gray'
,
init
,
borderBottom
:
'1px solid gray'
,
modalTitle
,
};
currentFormKey
,
const
borderStyleTwo
=
{
currentFormTitle
,
// 处理隐藏组件边框样式问题
isEdit
,
borderRight
:
'1px solid gray'
,
datas
,
borderLeft
:
'1px solid gray'
,
isReady
,
borderTop
:
'1px solid gray'
,
formConfig
,
};
formCode
,
let
updateTime
;
formId
,
const
styleDiv
=
this
.
props
.
height
}
=
this
.
state
;
?
{
const
{
overflow
:
isDynamic
?
'hidden'
:
'auto'
,
border
,
// overflowY: isDynamic && 'auto',
get
,
width
:
'100%'
,
obj
,
height
:
this
.
props
.
height
,
index
,
paddingBottom
:
paddingBottom
!=
null
?
paddingBottom
:
isWebPrint
?
0
:
'10px'
,
fatherCode
,
}
routerState
,
// 场景设计器共享路由参数
:
{
messageData
,
// 场景设计器共享变量参数 设计器监听到参数发生变化后会重新渲染组件
overflow
:
isDynamic
?
'hidden'
:
'auto'
,
postData
,
// overflowY: isDynamic && 'auto',
modalInit
,
width
:
'100%'
,
concealModel
,
// 场景设计器内置跳转函数
paddingBottom
:
paddingBottom
!=
null
?
paddingBottom
:
isWebPrint
?
0
:
'10px'
,
paddingBottom
,
};
taskAssignee
,
if
(
!
isReady
)
return
<></>;
userId
,
if
(
this
.
props
.
postData
?.
isUpdate
)
{
isDynamic
,
// 是否为大数据页面
updateTime
=
moment
(
+
this
.
props
.
postData
?.
updateTime
).
format
(
'llll'
);
isWebPrint
,
// 打印界面
isWebPrintEnd
,
isPreview
}
=
this
.
props
;
let
style
=
{};
if
(
formConfig
.
style
!=
null
)
{
try
{
style
=
JSON
.
parse
(
formConfig
.
style
);
}
catch
(
e
)
{
console
.
log
(
e
);
style
=
{};
}
}
}
switch
(
get
)
{
const
formItemLayout
=
{
case
'web'
:
labelCol
:
{
return
(
xs
:
{
span
:
24
},
<>
sm
:
{
span
:
24
},
{
this
.
props
.
postData
?.
isUpdate
?
(
},
<
div
style=
{
{
margin
:
'100px 24px 24px'
}
}
>
wrapperCol
:
{
<
div
style=
{
{
textAlign
:
'center'
}
}
>
xs
:
{
span
:
24
},
<
img
style=
{
{
marginRight
:
30
}
}
src=
{
maintain
}
></
img
>
sm
:
{
span
:
24
},
</
div
>
},
<
p
};
style=
{
{
const
max
=
this
.
countMax
(
items
);
textAlign
:
'center'
,
const
borderStyle
=
{
width
:
'100%'
,
borderRight
:
'1px solid gray'
,
fontSize
:
'16px'
,
borderTop
:
'1px solid gray'
,
fontWeight
:
'bold'
,
borderLeft
:
'1px solid gray'
,
color
:
'#666666'
,
borderBottom
:
'1px solid gray'
,
}
}
};
>
const
borderStyleTwo
=
{
{
updateTime
!==
'Invalid date'
// 处理隐藏组件边框样式问题
?
`升级维护中,预计${updateTime ?? '一万年'}恢复使用,请耐心等待。`
borderRight
:
'1px solid gray'
,
:
'请耐心等待'
}
borderLeft
:
'1px solid gray'
,
</
p
>
borderTop
:
'1px solid gray'
,
};
let
updateTime
;
const
styleDiv
=
this
.
props
.
height
?
{
overflow
:
isDynamic
?
'hidden'
:
'auto'
,
// overflowY: isDynamic && 'auto',
width
:
'100%'
,
height
:
this
.
props
.
height
,
paddingBottom
:
paddingBottom
!=
null
?
paddingBottom
:
isWebPrint
?
0
:
'10px'
,
}
:
{
overflow
:
isDynamic
?
'hidden'
:
'auto'
,
// overflowY: isDynamic && 'auto',
width
:
'100%'
,
paddingBottom
:
paddingBottom
!=
null
?
paddingBottom
:
isWebPrint
?
0
:
'10px'
,
};
if
(
!
isReady
)
return
<></>;
if
(
this
.
props
.
postData
?.
isUpdate
)
{
updateTime
=
moment
(
+
this
.
props
.
postData
?.
updateTime
).
format
(
'llll'
);
}
switch
(
get
)
{
case
'web'
:
return
(
<>
{
this
.
props
.
postData
?.
isUpdate
?
(
<
div
style=
{
{
margin
:
'100px 24px 24px'
}
}
>
<
div
style=
{
{
textAlign
:
'center'
}
}
>
<
img
style=
{
{
marginRight
:
30
}
}
src=
{
maintain
}
></
img
>
</
div
>
</
div
>
)
:
(
<
p
style=
{
{
textAlign
:
'center'
,
width
:
'100%'
,
fontSize
:
'16px'
,
fontWeight
:
'bold'
,
color
:
'#666666'
,
}
}
>
{
updateTime
!==
'Invalid date'
?
`升级维护中,预计${updateTime ?? '一万年'}恢复使用,请耐心等待。`
:
'请耐心等待'
}
</
p
>
</
div
>
)
:
(
<
div
id=
"web_table"
>
<
div
id=
"web_table"
>
<
Form
className=
"login-form"
>
<
Form
className=
"login-form"
>
{
isEdit
&&
defaultBinds
{
isEdit
&&
defaultBinds
?
Object
.
keys
(
defaultBinds
).
map
(
k
=>
{
?
Object
.
keys
(
defaultBinds
).
map
(
k
=>
{
const
r
=
defaultBinds
[
k
];
const
r
=
defaultBinds
[
k
];
if
(
if
(
r
.
columnIds
==
null
||
r
.
columnIds
==
null
||
r
.
columnIds
.
length
<
2
||
r
.
columnIds
.
length
<
2
||
r
.
sqls
==
null
||
r
.
sqls
==
null
||
r
.
sqls
.
length
<
2
r
.
sqls
.
length
<
2
)
{
)
{
return
''
;
return
''
;
}
}
const
name
=
r
.
columnIds
[
r
.
columnIds
.
length
-
1
];
const
name
=
r
.
columnIds
[
r
.
columnIds
.
length
-
1
];
const
key
=
r
.
sqls
[
r
.
sqls
.
length
-
1
];
const
key
=
r
.
sqls
[
r
.
sqls
.
length
-
1
];
const
value
=
defaultValues
[
key
];
const
value
=
defaultValues
[
key
];
if
(
value
==
null
)
{
if
(
value
==
null
)
{
return
''
;
return
''
;
}
}
return
this
.
props
.
form
.
getFieldDecorator
(
name
,
{
return
this
.
props
.
form
.
getFieldDecorator
(
name
,
{
initialValue
:
value
,
initialValue
:
value
,
})(<
Input
type=
"hidden"
/>);
})(<
Input
type=
"hidden"
/>);
})
})
:
''
}
:
''
}
<
Row
>
<
Row
>
...
@@ -655,6 +756,7 @@ export default class ZdyTable extends Component {
...
@@ -655,6 +756,7 @@ export default class ZdyTable extends Component {
return
(
return
(
<
tr
key=
{
i
}
>
<
tr
key=
{
i
}
>
{
row
.
map
((
cell
,
j
)
=>
{
{
row
.
map
((
cell
,
j
)
=>
{
if
(
!
cell
.
content
)
{
if
(
!
cell
.
content
)
{
return
;
return
;
}
}
...
@@ -669,74 +771,77 @@ export default class ZdyTable extends Component {
...
@@ -669,74 +771,77 @@ export default class ZdyTable extends Component {
return
!
allhidden
&&
cell
.
hidden
?
(
return
!
allhidden
&&
cell
.
hidden
?
(
''
''
)
:
(
)
:
(
<
td
<
td
width=
{
width=
{
i
==
0
i
==
0
?
(
cell
.
content
!=
null
&&
cell
.
content
.
cwidth
!=
null
?
(
cell
.
content
!=
null
&&
cell
.
content
.
cwidth
!=
null
?
cell
.
content
.
cwidth
?
cell
.
content
.
cwidth
:
width
)
*
(
cell
.
col
?
cell
.
col
:
1
)
:
width
)
*
(
cell
.
col
?
cell
.
col
:
1
)
:
width
*
(
cell
.
col
?
cell
.
col
:
1
)
:
width
*
(
cell
.
col
?
cell
.
col
:
1
)
}
}
rowSpan=
{
cell
.
row
}
rowSpan=
{
cell
.
row
}
colSpan=
{
cell
.
col
}
colSpan=
{
cell
.
col
}
key=
{
j
}
key=
{
j
}
style=
{
{
style=
{
{
overflow
:
'auto'
,
overflow
:
'auto'
,
textAlign
:
textAlign
:
cell
.
content
&&
cell
.
content
.
calign
cell
.
content
&&
cell
.
content
.
calign
?
cell
.
content
.
calign
?
cell
.
content
.
calign
:
'left'
,
:
'left'
,
...(
isBorder
...(
isBorder
?
cell
?.
content
?.
comName
==
'InputHidden'
||
?
cell
?.
content
?.
comName
==
'InputHidden'
||
!
cell
?.
content
?.
comName
!
cell
?.
content
?.
comName
?
{}
?
{}
:
borderStyle
:
borderStyle
:
{}),
:
{}),
// position: cell.content&&cell.content.comName ==="InputHidden"&&'absolute',
// position: cell.content&&cell.content.comName ==="InputHidden"&&'absolute',
...
styles
,
...
styles
,
display
:
display
:
cell
.
content
&&
cell
.
content
&&
(
cell
.
content
.
comName
===
'InputHidden'
||
(
cell
.
content
.
comName
===
'InputHidden'
||
cell
.
content
.
isHidden
)
&&
cell
.
content
.
isHidden
)
&&
'none'
,
'none'
,
}
}
}
}
>
>
<
TableCom
<
TableCom
importExcel=
{
this
.
importExcel
}
getCellValue=
{
this
.
getCellValue
}
getCellValue=
{
this
.
getCellValue
}
isWebPrintEnd=
{
isWebPrintEnd
}
getCurrentFormTitle=
{
this
.
getCurrentFormTitle2
}
isWebPrint=
{
isWebPrint
}
hfInstance=
{
this
.
hfInstance
}
isPrint=
{
this
.
props
.
isPrint
}
isWebPrintEnd=
{
isWebPrintEnd
}
formCode=
{
formCode
}
// 当前表单code
isWebPrint=
{
isWebPrint
}
modalInit=
{
modalInit
}
isPrint=
{
this
.
props
.
isPrint
}
taskAssignee=
{
taskAssignee
}
// 提交人
formCode=
{
formCode
}
// 当前表单code
userId=
{
userId
}
modalInit=
{
modalInit
}
formId=
{
formId
}
// 当前表单Id
taskAssignee=
{
taskAssignee
}
// 提交人
i=
{
i
}
// 当前组件下标
userId=
{
userId
}
j=
{
j
}
// 当前行数下班
formId=
{
formId
}
// 当前表单Id
isPreview=
{
isPreview
}
i=
{
i
}
// 当前组件下标
fatherCode=
{
fatherCode
}
j=
{
j
}
// 当前行数下班
index=
{
index
}
isPreview=
{
isPreview
}
fatherObj=
{
this
.
props
.
fatherObj
}
fatherCode=
{
fatherCode
}
datas=
{
datas
}
index=
{
index
}
uuid=
{
cell
.
uuid
}
fatherObj=
{
this
.
props
.
fatherObj
}
isEdit=
{
isEdit
}
datas=
{
datas
}
formKey=
{
currentFormKey
}
uuid=
{
cell
.
uuid
}
currentFormTitle=
{
currentFormTitle
}
isEdit=
{
isEdit
}
init=
{
init
}
formKey=
{
currentFormKey
}
get=
{
get
}
// 区分移动端或wen端
currentFormTitle=
{
currentFormTitle
}
json=
{
cell
.
content
}
init=
{
init
}
obj=
{
obj
||
{}
}
// 是否存在默认值
get=
{
get
}
// 区分移动端或wen端
mapData=
{
mapData
}
json=
{
cell
.
content
}
form=
{
this
.
props
.
form
}
// antd form控件
obj=
{
obj
||
{}
}
// 是否存在默认值
sqlData=
{
sqlData
}
mapData=
{
mapData
}
defaultValues=
{
defaultValues
||
{}
}
// 接口中的默认值
form=
{
this
.
props
.
form
}
// antd form控件
routerState=
{
routerState
}
// 兼容表单设计器路由传参
sqlData=
{
sqlData
}
messageData=
{
messageData
}
// 场景设计器共享变量参数
defaultValues=
{
defaultValues
||
{}
}
// 接口中的默认值
concealModel=
{
concealModel
||
{}
}
// 场景设计器内置路由跳转函数
routerState=
{
routerState
}
// 兼容表单设计器路由传参
isDynamic=
{
isDynamic
}
// 是否为场景配置器调用
messageData=
{
messageData
}
// 场景设计器共享变量参数
/>
concealModel=
{
concealModel
||
{}
}
// 场景设计器内置路由跳转函数
</
td
>
isDynamic=
{
isDynamic
}
// 是否为场景配置器调用
);
/>
</
td
>
);
})
}
})
}
</
tr
>
</
tr
>
);
);
...
@@ -747,68 +852,71 @@ export default class ZdyTable extends Component {
...
@@ -747,68 +852,71 @@ export default class ZdyTable extends Component {
{
style
.
pageBreakAfter
!=
null
?
(
{
style
.
pageBreakAfter
!=
null
?
(
<
div
style=
{
{
pageBreakAfter
:
style
.
pageBreakAfter
}
}
></
div
>
<
div
style=
{
{
pageBreakAfter
:
style
.
pageBreakAfter
}
}
></
div
>
)
:
(
)
:
(
''
''
)
}
)
}
</
div
>
</
div
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
Form
>
</
Form
>
</
div
>
</
div
>
)
}
)
}
</>
</>
);
);
case
'mobile'
:
case
'mobile'
:
return
(
return
(
<>
<>
{
this
.
props
.
postData
?.
isUpdate
?
(
{
this
.
props
.
postData
?.
isUpdate
?
(
<
div
style=
{
{
margin
:
'100px 24px 24px'
}
}
>
<
div
style=
{
{
margin
:
'100px 24px 24px'
}
}
>
<
div
style=
{
{
textAlign
:
'center'
}
}
>
<
div
style=
{
{
textAlign
:
'center'
}
}
>
<
img
style=
{
{
width
:
'100%'
}
}
src=
{
maintain
}
></
img
>
<
img
style=
{
{
width
:
'100%'
}
}
src=
{
maintain
}
></
img
>
</
div
>
<
p
style=
{
{
textAlign
:
'center'
,
width
:
'100%'
,
fontSize
:
'16px'
,
fontWeight
:
'bold'
,
color
:
'#666666'
,
}
}
>
{
updateTime
!==
'Invalid date'
?
`升级维护中,预计${updateTime ?? '一万年'}恢复使用,请耐心等待。`
:
'请耐心等待'
}
</
p
>
</
div
>
</
div
>
)
:
(
<
p
style=
{
{
textAlign
:
'center'
,
width
:
'100%'
,
fontSize
:
'16px'
,
fontWeight
:
'bold'
,
color
:
'#666666'
,
}
}
>
{
updateTime
!==
'Invalid date'
?
`升级维护中,预计${updateTime ?? '一万年'}恢复使用,请耐心等待。`
:
'请耐心等待'
}
</
p
>
</
div
>
)
:
(
<
Form
{
...
formItemLayout
}
id=
"mobile_table"
className=
"login-form"
>
<
Form
{
...
formItemLayout
}
id=
"mobile_table"
className=
"login-form"
>
{
defaultBinds
{
defaultBinds
?
Object
.
keys
(
defaultBinds
).
map
(
k
=>
{
?
Object
.
keys
(
defaultBinds
).
map
(
k
=>
{
const
r
=
defaultBinds
[
k
];
const
r
=
defaultBinds
[
k
];
if
(
if
(
r
.
columnIds
==
null
||
r
.
columnIds
==
null
||
r
.
columnIds
.
length
<
2
||
r
.
columnIds
.
length
<
2
||
r
.
sqls
==
null
||
r
.
sqls
==
null
||
r
.
sqls
.
length
<
2
r
.
sqls
.
length
<
2
)
{
)
{
return
''
;
return
''
;
}
}
const
name
=
r
.
columnIds
[
r
.
columnIds
.
length
-
1
];
const
name
=
r
.
columnIds
[
r
.
columnIds
.
length
-
1
];
const
key
=
r
.
sqls
[
r
.
sqls
.
length
-
1
];
const
key
=
r
.
sqls
[
r
.
sqls
.
length
-
1
];
const
value
=
defaultValues
[
key
];
const
value
=
defaultValues
[
key
];
if
(
value
==
null
)
{
if
(
value
==
null
)
{
return
''
;
return
''
;
}
}
return
this
.
props
.
form
.
getFieldDecorator
(
name
,
{
return
this
.
props
.
form
.
getFieldDecorator
(
name
,
{
initialValue
:
value
,
initialValue
:
value
,
})(<
Input
type=
"hidden"
/>);
})(<
Input
type=
"hidden"
/>);
})
})
:
''
}
:
''
}
<
IsNewTable
<
IsNewTable
getCellValue=
{
this
.
getCellValue
}
getCellValue=
{
this
.
getCellValue
}
hfInstance=
{
this
.
hfInstance
}
getCurrentFormTitle=
{
this
.
getCurrentFormTitle2
}
taskAssignee=
{
taskAssignee
}
// 提交人
taskAssignee=
{
taskAssignee
}
// 提交人
userId=
{
userId
}
userId=
{
userId
}
importExcel=
{
this
.
importExcel
}
isPreview=
{
isPreview
}
isPreview=
{
isPreview
}
isRowCol=
{
isRowCol
}
isRowCol=
{
isRowCol
}
modalInit=
{
modalInit
}
modalInit=
{
modalInit
}
...
@@ -839,55 +947,11 @@ export default class ZdyTable extends Component {
...
@@ -839,55 +947,11 @@ export default class ZdyTable extends Component {
concealModel=
{
concealModel
||
{}
}
// 场景设计器内置路由跳转函数
concealModel=
{
concealModel
||
{}
}
// 场景设计器内置路由跳转函数
isDynamic=
{
isDynamic
}
// 是否为场景配置器调用
isDynamic=
{
isDynamic
}
// 是否为场景配置器调用
/>
/>
{
/* {
items.map((item, i) => {
const allhidden = this.checkAllHidden(items)
return (<div
key={i}
style={{
marginTop: 0,
background: '#ffffff',
paddingLeft: 12,
width: '100%',
flexWrap: 'wrap',
...style
}}>
{
item.map((ary, j) => {
return !allhidden && ary.hidden ? ""
: <><TableCom
formCode={formCode}
formId={formId}
i={i}
j={j}
index={index}
fatherCode={fatherCode}
datas={datas}
isEdit={isEdit}
fatherObj={this.props.fatherObj}
formKey={currentFormKey}
init={init}
get={get}
key={j}
sqlData={sqlData}
obj={obj || {}}
form={this.props.form}
mapData={mapData}
json={ary.content}
uuid={ary.uuid}
routerState={routerState} // 兼容表单设计器路由传参
defaultValues={defaultValues || {}}
messageData={messageData} // 场景设计器共享变量参数
/></>
})
}
</div>)
})
} */
}
</
Form
>
</
Form
>
)
}
)
}
</>
</>
);
);
}
}
}
}
}
}
one_stop_public/Table/isNewMobileTable.jsx
浏览文件 @
f333d3b9
...
@@ -39,7 +39,9 @@ export default class isNewTable extends Component {
...
@@ -39,7 +39,9 @@ export default class isNewTable extends Component {
concealModel
,
concealModel
,
taskAssignee
,
taskAssignee
,
currentFormTitle
,
currentFormTitle
,
getCellValue
getCellValue
,
hfInstance
,
getCurrentFormTitle
}
=
this
.
props
;
}
=
this
.
props
;
if
(
!
isEdit
)
{
if
(
!
isEdit
)
{
// 展示栏 暂不做处理
// 展示栏 暂不做处理
...
@@ -91,6 +93,7 @@ export default class isNewTable extends Component {
...
@@ -91,6 +93,7 @@ export default class isNewTable extends Component {
i=
{
i
}
i=
{
i
}
j=
{
j
}
j=
{
j
}
index=
{
index
}
index=
{
index
}
getCurrentFormTitle
fatherCode=
{
fatherCode
}
fatherCode=
{
fatherCode
}
datas=
{
datas
}
datas=
{
datas
}
isEdit=
{
isEdit
}
isEdit=
{
isEdit
}
...
@@ -98,6 +101,8 @@ export default class isNewTable extends Component {
...
@@ -98,6 +101,8 @@ export default class isNewTable extends Component {
formKey=
{
currentFormKey
}
formKey=
{
currentFormKey
}
currentFormTitle
currentFormTitle
getCellValue
getCellValue
hfInstance
initExcel=
{
this
.
props
.
initExcel
}
init=
{
init
}
init=
{
init
}
get=
{
get
}
get=
{
get
}
key=
{
j
}
key=
{
j
}
...
@@ -168,9 +173,12 @@ export default class isNewTable extends Component {
...
@@ -168,9 +173,12 @@ export default class isNewTable extends Component {
fatherCode=
{
fatherCode
}
fatherCode=
{
fatherCode
}
datas=
{
datas
}
datas=
{
datas
}
isEdit=
{
isEdit
}
isEdit=
{
isEdit
}
getCurrentFormTitle
importExcel=
{
this
.
props
.
importExcel
}
fatherObj=
{
this
.
props
.
fatherObj
}
fatherObj=
{
this
.
props
.
fatherObj
}
formKey=
{
currentFormKey
}
formKey=
{
currentFormKey
}
currentFormTitle
currentFormTitle
hfInstance
getCellValue
getCellValue
init=
{
init
}
init=
{
init
}
get=
{
get
}
get=
{
get
}
...
@@ -214,9 +222,12 @@ export default class isNewTable extends Component {
...
@@ -214,9 +222,12 @@ export default class isNewTable extends Component {
datas=
{
datas
}
datas=
{
datas
}
modalInit=
{
modalInit
}
modalInit=
{
modalInit
}
isEdit=
{
isEdit
}
isEdit=
{
isEdit
}
getCurrentFormTitle
fatherObj=
{
this
.
props
.
fatherObj
}
fatherObj=
{
this
.
props
.
fatherObj
}
formKey=
{
currentFormKey
}
formKey=
{
currentFormKey
}
importExcel=
{
this
.
props
.
importExcel
}
currentFormTitle
currentFormTitle
hfInstance
getCellValue
getCellValue
init=
{
init
}
init=
{
init
}
get=
{
get
}
get=
{
get
}
...
...
one_stop_public/tableCompon/index.jsx
浏览文件 @
f333d3b9
...
@@ -1144,6 +1144,7 @@ export default class tableCom extends Component {
...
@@ -1144,6 +1144,7 @@ export default class tableCom extends Component {
moment
:
moment
,
moment
:
moment
,
sql
:
this
.
sqlUtil
.
bind
(
this
,
base52
,
json
,
callback
),
sql
:
this
.
sqlUtil
.
bind
(
this
,
base52
,
json
,
callback
),
message
:
message
,
message
:
message
,
importExcel
:
this
.
props
.
importExcel
,
router
:
router
,
router
:
router
,
uuid
:
UUID
,
uuid
:
UUID
,
setValues
:
this
.
setValues
.
bind
(
this
,
base52
,
json
),
setValues
:
this
.
setValues
.
bind
(
this
,
base52
,
json
),
...
@@ -1483,12 +1484,16 @@ export default class tableCom extends Component {
...
@@ -1483,12 +1484,16 @@ export default class tableCom extends Component {
if
(
formKey
==
fk
)
{
if
(
formKey
==
fk
)
{
return
<>
片段表单key不能和自身相同
</>;
return
<>
片段表单key不能和自身相同
</>;
}
}
return
(
return
(
<>
<>
{
this
.
props
.
form
.
getFieldDecorator
(
this
.
props
.
uuid
,
{
{
this
.
props
.
form
.
getFieldDecorator
(
this
.
props
.
uuid
,
{
initialValue
:
fk
,
initialValue
:
fk
,
})(<
Input
type=
"hidden"
/>)
}{
' '
}
})(<
Input
type=
"hidden"
/>)
}{
' '
}
<
ZdyTable
<
ZdyTable
hfInstance=
{
this
.
props
.
hfInstance
}
currentFormTitle=
{
this
.
props
.
getCurrentFormTitle
(
fk
)
}
getCellValue=
{
getCellValue
}
taskAssignee=
{
taskAssignee
}
taskAssignee=
{
taskAssignee
}
isWebPrint=
{
this
.
props
.
isWebPrint
||
false
}
isWebPrint=
{
this
.
props
.
isWebPrint
||
false
}
userId=
{
userId
}
userId=
{
userId
}
...
@@ -2571,7 +2576,6 @@ export default class tableCom extends Component {
...
@@ -2571,7 +2576,6 @@ export default class tableCom extends Component {
break
;
break
;
case
'Select'
:
case
'Select'
:
console
.
log
();
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
initValue
,
initialValue
:
initValue
,
rules
:
rules
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论