Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
f618dc27
提交
f618dc27
authored
2月 17, 2023
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化代码
上级
57df4c91
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
1008 行增加
和
998 行删除
+1008
-998
ZdyTable.jsx
one_stop_public/Table/ZdyTable.jsx
+1008
-998
没有找到文件。
one_stop_public/Table/ZdyTable.jsx
浏览文件 @
f618dc27
...
@@ -17,1049 +17,1059 @@ import { isJSON } from '@/webPublic/one_stop_public/copy';
...
@@ -17,1049 +17,1059 @@ import { isJSON } from '@/webPublic/one_stop_public/copy';
import
getActiveJson
from
'@/webPublic/one_stop_public/Table/getActiveJson'
;
import
getActiveJson
from
'@/webPublic/one_stop_public/Table/getActiveJson'
;
export
default
class
ZdyTable
extends
Component
{
export
default
class
ZdyTable
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
// console.log(props);
// console.log(props);
this
.
state
=
{
this
.
state
=
{
objRealTime
:
{},
objRealTime
:
{},
isChange
:
false
,
isChange
:
false
,
selects
:
new
Map
(),
selects
:
new
Map
(),
left
:
0
,
left
:
0
,
top
:
0
,
top
:
0
,
max
:
4
,
max
:
4
,
formId
:
null
,
formId
:
null
,
formCode
:
null
,
formCode
:
null
,
width
:
100
,
width
:
100
,
mapData
:
{},
mapData
:
{},
defaultBinds
:
{},
defaultBinds
:
{},
sqlData
:
{},
sqlData
:
{},
defaultValues
:
{},
defaultValues
:
{},
currentFormKey
:
null
,
currentFormKey
:
null
,
currentFormTitle
:
null
,
currentFormTitle
:
null
,
items
:
[],
items
:
[],
init
:
this
.
props
.
init
||
{},
init
:
this
.
props
.
init
||
{},
datas
:
{},
datas
:
{},
isEdit
:
true
,
isEdit
:
true
,
isRowCol
:
false
,
isRowCol
:
false
,
isReady
:
false
,
isReady
:
false
,
formConfig
:
{},
formConfig
:
{},
};
};
}
}
componentDidMount
()
{
componentDidMount
()
{
const
{
const
{
postData
,
// 数据源
postData
,
// 数据源
isCg
,
// 用户点击草稿页面进入
isCg
,
// 用户点击草稿页面进入
isForm
,
isForm
,
isPreview
,
// 是否为预览模式
isPreview
,
// 是否为预览模式
isChild
,
// 是否为子表单
isChild
,
// 是否为子表单
isQRCode
=
false
,
// 是否为二维码快捷发起
isQRCode
=
false
,
// 是否为二维码快捷发起
formDeafault
=
''
,
// 为二维码快捷发起默认值
formDeafault
=
''
,
// 为二维码快捷发起默认值
}
=
this
.
props
;
}
=
this
.
props
;
if
(
isPreview
||
isChild
)
{
if
(
isPreview
||
isChild
)
{
this
.
initExcel
(
this
.
initExcel
(
{
{
datas
:
this
.
props
.
datas
,
datas
:
this
.
props
.
datas
,
trees
:
this
.
props
.
trees
,
trees
:
this
.
props
.
trees
,
},
},
()
=>
{
()
=>
{
this
.
setState
({
this
.
setState
({
...
this
.
state
,
...
this
.
state
,
...
this
.
props
,
...
this
.
props
,
formConfig
:
{
formConfig
:
{
...
this
.
state
.
formConfig
,
...
this
.
state
.
formConfig
,
style
:
this
.
props
.
style
,
style
:
this
.
props
.
style
,
},
},
isReady
:
true
,
isReady
:
true
,
viewMode
:
viewMode
:
this
.
props
.
currentFormKey
&&
this
.
props
.
currentFormKey
&&
this
.
props
.
datas
&&
this
.
props
.
datas
&&
this
.
props
.
datas
[
this
.
props
.
currentFormKey
]
this
.
props
.
datas
[
this
.
props
.
currentFormKey
]
?
this
.
props
.
datas
[
this
.
props
.
currentFormKey
].
viewMode
?
this
.
props
.
datas
[
this
.
props
.
currentFormKey
].
viewMode
:
null
,
:
null
,
});
});
},
},
);
);
return
;
return
;
}
}
const
val
=
postData
;
const
val
=
postData
;
try
{
try
{
/**
/**
* 数据源不同进行以下区别处理
* 数据源不同进行以下区别处理
* this.props.table有传入值表明需要渲染流程中最新表单
* this.props.table有传入值表明需要渲染流程中最新表单
*/
*/
if
(
isForm
)
{
if
(
isForm
)
{
// 由表格的操作按钮进入
// 由表格的操作按钮进入
const
mapData
=
{};
const
mapData
=
{};
const
sqlData
=
{};
const
sqlData
=
{};
const
dataObjs
=
val
.
form
.
dataObjModels
;
const
dataObjs
=
val
.
form
.
dataObjModels
;
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
const
dob
=
dataObjs
[
i
];
const
dob
=
dataObjs
[
i
];
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
const
sqls
=
val
.
form
.
sqlModels
;
const
sqls
=
val
.
form
.
sqlModels
;
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
const
dob
=
sqls
[
i
].
dataObjModel
;
const
dob
=
sqls
[
i
].
dataObjModel
;
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
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
.
initExcel
(
obj
,
()
=>
{
this
.
initExcel
(
obj
,
()
=>
{
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
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isBorder
:
xxx
.
isBorder
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isBorder
:
xxx
.
isBorder
,
viewMode
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
viewMode
:
xxx
.
viewMode
,
viewMode
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
viewMode
:
xxx
.
viewMode
,
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
,
defaultValues
:
val
.
form
.
defaultValues
,
defaultValues
:
val
.
form
.
defaultValues
,
appId
:
val
.
appId
,
appId
:
val
.
appId
,
isReady
:
true
,
isReady
:
true
,
formConfig
:
xxx
,
formConfig
:
xxx
,
});
});
});
});
return
;
return
;
}
}
if
(
isCg
===
'yes'
)
{
if
(
isCg
===
'yes'
)
{
// 用户从编辑按钮进入
// 用户从编辑按钮进入
if
(
if
(
val
.
unifiedServicePatternModel
.
isDefaultError
!=
null
&&
val
.
unifiedServicePatternModel
.
isDefaultError
!=
null
&&
val
.
unifiedServicePatternModel
.
isDefaultError
val
.
unifiedServicePatternModel
.
isDefaultError
)
{
)
{
if
(
this
.
props
.
get
===
'web'
)
{
if
(
this
.
props
.
get
===
'web'
)
{
message
.
error
(
'当前办理人数较多,服务繁忙,请稍后再试!'
);
message
.
error
(
'当前办理人数较多,服务繁忙,请稍后再试!'
);
}
else
{
}
else
{
Toast
.
fail
(
'当前办理人数较多,服务繁忙,请稍后再试!'
);
Toast
.
fail
(
'当前办理人数较多,服务繁忙,请稍后再试!'
);
}
}
router
.
goBack
();
router
.
goBack
();
return
;
return
;
}
}
const
mapData
=
{};
const
mapData
=
{};
const
sqlData
=
{};
const
sqlData
=
{};
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
const
dob
=
sqls
[
i
].
dataObjModel
;
const
dob
=
sqls
[
i
].
dataObjModel
;
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
const
dataObjs
=
val
.
unifiedServicePatternModel
.
dataObjModels
;
const
dataObjs
=
val
.
unifiedServicePatternModel
.
dataObjModels
;
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
const
dob
=
dataObjs
[
i
];
const
dob
=
dataObjs
[
i
];
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
const
obj
=
JSON
.
parse
(
val
.
unifiedServicePatternModel
.
content
);
const
obj
=
JSON
.
parse
(
val
.
unifiedServicePatternModel
.
content
);
const
xxx
=
obj
.
datas
[
obj
.
init
];
const
xxx
=
obj
.
datas
[
obj
.
init
];
this
.
initExcel
(
obj
,
()
=>
{
this
.
initExcel
(
obj
,
()
=>
{
this
.
setState
({
this
.
setState
({
items
:
xxx
.
items
,
items
:
xxx
.
items
,
init
:
{
...
this
.
state
.
init
,
...
JSON
.
parse
(
val
.
content
)
},
init
:
{
...
this
.
state
.
init
,
...
JSON
.
parse
(
val
.
content
)
},
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
,
viewMode
:
xxx
.
viewMode
,
viewMode
:
xxx
.
viewMode
,
isRowCol
:
xxx
.
isRowCol
,
isRowCol
:
xxx
.
isRowCol
,
mapData
,
mapData
,
sqlData
,
sqlData
,
defaultValues
:
val
.
unifiedServicePatternModel
.
defaultValues
,
defaultValues
:
val
.
unifiedServicePatternModel
.
defaultValues
,
appId
:
val
.
appId
,
appId
:
val
.
appId
,
isReady
:
true
,
isReady
:
true
,
formConfig
:
xxx
,
formConfig
:
xxx
,
defaultBinds
:
this
.
props
.
table
defaultBinds
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
:
xxx
.
defaultBinds
,
:
xxx
.
defaultBinds
,
});
});
});
});
return
;
return
;
}
}
if
(
if
(
val
.
unifiedServicePatternModel
.
isDefaultError
!=
null
&&
val
.
unifiedServicePatternModel
.
isDefaultError
!=
null
&&
val
.
unifiedServicePatternModel
.
isDefaultError
val
.
unifiedServicePatternModel
.
isDefaultError
)
{
)
{
if
(
this
.
props
.
get
==
'web'
)
{
if
(
this
.
props
.
get
==
'web'
)
{
message
.
error
(
'当前办理人数较多,服务繁忙,请稍后再试!'
);
message
.
error
(
'当前办理人数较多,服务繁忙,请稍后再试!'
);
}
else
{
}
else
{
Toast
.
fail
(
'当前办理人数较多,服务繁忙,请稍后再试!'
);
Toast
.
fail
(
'当前办理人数较多,服务繁忙,请稍后再试!'
);
}
}
router
.
goBack
();
router
.
goBack
();
return
;
return
;
}
}
const
mapData
=
{};
const
mapData
=
{};
const
sqlData
=
{};
const
sqlData
=
{};
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
const
dob
=
sqls
[
i
].
dataObjModel
;
const
dob
=
sqls
[
i
].
dataObjModel
;
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
const
dataObjs
=
val
.
unifiedServicePatternModel
.
dataObjModels
;
const
dataObjs
=
val
.
unifiedServicePatternModel
.
dataObjModels
;
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
const
dob
=
dataObjs
[
i
];
const
dob
=
dataObjs
[
i
];
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
if
(
!
isJSON
(
val
.
unifiedServicePatternModel
.
content
))
{
if
(
!
isJSON
(
val
.
unifiedServicePatternModel
.
content
))
{
console
.
error
(
'unifiedServicePatternModel.content 不是一个JSON字符串 请查看配置'
);
console
.
error
(
'unifiedServicePatternModel.content 不是一个JSON字符串 请查看配置'
);
}
}
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
;
// console.log('231--------');
// console.log('231--------');
this
.
initExcel
(
obj
,
()
=>
this
.
initExcel
(
obj
,
()
=>
this
.
setState
(
this
.
setState
(
{
{
appId
:
val
.
id
,
appId
:
val
.
id
,
formId
:
val
.
id
,
formId
:
val
.
id
,
formCode
:
val
.
code
,
formCode
:
val
.
code
,
datas
:
obj
.
datas
,
datas
:
obj
.
datas
,
mapData
,
mapData
,
sqlData
,
sqlData
,
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
,
width
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
width
:
xxx
.
width
,
width
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
width
:
xxx
.
width
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isBorder
:
xxx
.
isBorder
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isBorder
:
xxx
.
isBorder
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isRowCol
:
xxx
.
isRowCol
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isRowCol
:
xxx
.
isRowCol
,
viewMode
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
viewMode
:
xxx
.
viewMode
,
viewMode
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
viewMode
:
xxx
.
viewMode
,
items
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
items
:
xxx
.
items
,
items
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
items
:
xxx
.
items
,
isReady
:
true
,
isReady
:
true
,
init
:
{
...
this
.
state
.
init
,
...(
val
.
isSecond
?
this
.
props
.
obj
:
{})
},
// 重新发起就拿obj 里面的值给初始值
init
:
{
...
this
.
state
.
init
,
...(
val
.
isSecond
?
this
.
props
.
obj
:
{})
},
// 重新发起就拿obj 里面的值给初始值
formConfig
:
xxx
,
formConfig
:
xxx
,
// init:this.props.get==="mobile"?!!val.content?JSON.parse(val.content):'':{},// 移动端默认值设置
// init:this.props.get==="mobile"?!!val.content?JSON.parse(val.content):'':{},// 移动端默认值设置
},
},
()
=>
{
()
=>
{
/**
/**
* 为二维码快捷发起时自动设置新默认值
* 为二维码快捷发起时自动设置新默认值
*/
*/
if
(
isQRCode
)
{
if
(
isQRCode
)
{
this
.
props
.
form
.
setFieldsValue
(
formDeafault
);
this
.
props
.
form
.
setFieldsValue
(
formDeafault
);
}
}
this
.
initExcel
(
obj
);
this
.
initExcel
(
obj
);
},
},
),
),
);
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'公式配置有误/Table/index-262'
,
e
);
console
.
log
(
'公式配置有误/Table/index-262'
,
e
);
}
}
}
}
importExcel
=
(
res
,
callback
)
=>
{
importExcel
=
(
res
,
callback
)
=>
{
if
(
this
.
props
.
importExcel
)
{
if
(
this
.
props
.
importExcel
)
{
this
.
props
.
importExcel
(
res
,
callback
);
this
.
props
.
importExcel
(
res
,
callback
);
return
;
return
;
}
}
const
{
datas
,
trees
}
=
this
.
configs
;
const
{
const
sheets
=
res
.
sheets
;
datas
,
trees
,
}
=
this
.
configs
;
const
sheets
=
res
.
sheets
;
for
(
var
s
=
0
;
s
<
sheets
.
length
;
s
++
)
{
for
(
var
s
=
0
;
s
<
sheets
.
length
;
s
++
)
{
const
uuid
=
sheets
[
s
].
key
;
const
uuid
=
sheets
[
s
].
key
;
const
items
=
[];
const
items
=
[];
const
cc
=
sheets
[
s
].
cells
;
const
cc
=
sheets
[
s
].
cells
;
for
(
var
i
=
0
;
i
<
cc
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
cc
.
length
;
i
++
)
{
const
rows
=
[];
const
rows
=
[];
const
rr
=
cc
[
i
];
const
rr
=
cc
[
i
];
for
(
var
j
=
0
;
j
<
rr
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
rr
.
length
;
j
++
)
{
const
c
=
rr
[
j
];
const
c
=
rr
[
j
];
if
(
c
.
value
==
null
||
c
.
value
==
''
)
{
if
(
c
.
value
==
null
||
c
.
value
==
''
)
{
rows
.
push
({
rows
.
push
({
uuid
:
'id_'
+
UUID
.
v4
().
replace
(
/-/g
,
'2'
),
uuid
:
'id_'
+
UUID
.
v4
()
row
:
c
.
rowSpan
,
.
replace
(
/-/g
,
'2'
),
col
:
c
.
colSpan
,
row
:
c
.
rowSpan
,
content
:
{
col
:
c
.
colSpan
,
comName
:
'Excel'
,
content
:
{
cwidth
:
c
.
width
,
comName
:
'Excel'
,
cheight
:
c
.
height
,
cwidth
:
c
.
width
,
},
cheight
:
c
.
height
,
});
},
}
else
{
});
rows
.
push
({
}
else
{
uuid
:
'id_'
+
UUID
.
v4
().
replace
(
/-/g
,
'2'
),
rows
.
push
({
row
:
c
.
rowSpan
,
uuid
:
'id_'
+
UUID
.
v4
()
col
:
c
.
colSpan
,
.
replace
(
/-/g
,
'2'
),
content
:
{
row
:
c
.
rowSpan
,
comName
:
'Excel'
,
col
:
c
.
colSpan
,
initialValue
:
c
.
value
,
content
:
{
cwidth
:
c
.
width
,
comName
:
'Excel'
,
cheight
:
c
.
height
,
initialValue
:
c
.
value
,
},
cwidth
:
c
.
width
,
});
cheight
:
c
.
height
,
}
},
}
});
items
.
push
(
rows
);
}
}
}
items
.
push
(
rows
);
}
const
charts
=
sheets
[
s
].
charts
;
const
charts
=
sheets
[
s
].
charts
;
if
(
charts
&&
charts
.
length
>
0
)
{
if
(
charts
&&
charts
.
length
>
0
)
{
const
rows
=
[];
const
rows
=
[];
for
(
var
j
=
0
;
j
<
charts
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
charts
.
length
;
j
++
)
{
const
chartModel
=
charts
[
j
];
const
chartModel
=
charts
[
j
];
rows
.
push
({
rows
.
push
({
uuid
:
'id_'
+
UUID
.
v4
().
replace
(
/-/g
,
'2'
),
uuid
:
'id_'
+
UUID
.
v4
()
content
:
{
.
replace
(
/-/g
,
'2'
),
comName
:
'Echart'
,
content
:
{
columnIds
:
{
c1
:
[]
},
comName
:
'Echart'
,
labelSpan
:
24
,
columnIds
:
{
c1
:
[]
},
wrapperSpan
:
24
,
labelSpan
:
24
,
isLabel
:
false
,
wrapperSpan
:
24
,
formula
:
'return '
+
JSON
.
stringify
(
chartModel
.
option
),
isLabel
:
false
,
},
formula
:
'return '
+
JSON
.
stringify
(
chartModel
.
option
),
});
},
items
.
push
(
rows
);
});
}
items
.
push
(
rows
);
}
}
if
(
datas
[
uuid
]
==
null
)
{
}
trees
.
push
({
if
(
datas
[
uuid
]
==
null
)
{
title
:
sheets
[
s
].
name
,
trees
.
push
({
key
:
uuid
,
title
:
sheets
[
s
].
name
,
});
key
:
uuid
,
}
});
datas
[
uuid
]
=
{
}
width
:
400
,
datas
[
uuid
]
=
{
max
:
1
,
width
:
400
,
isBorder
:
true
,
max
:
1
,
items
:
items
,
isBorder
:
true
,
};
items
:
items
,
}
};
this
.
initExcel
(
}
{
this
.
initExcel
(
datas
,
{
trees
,
datas
,
},
trees
,
()
=>
{
},
this
.
setState
({
isChange
:
!
this
.
state
.
isChange
},
()
=>
{
()
=>
{
if
(
callback
)
callback
();
this
.
setState
({
isChange
:
!
this
.
state
.
isChange
},
()
=>
{
});
if
(
callback
)
callback
();
});
console
.
log
(
'公式导入excel成功'
);
console
.
log
(
'公式导入excel成功'
);
},
},
);
);
};
};
hfInstance
;
hfInstance
;
childExcel
=
(
sheetData
,
datas
,
tr
)
=>
{
childExcel
=
(
sheetData
,
datas
,
tr
)
=>
{
if
(
tr
.
children
==
null
||
tr
.
children
.
length
==
0
)
{
if
(
tr
.
children
==
null
||
tr
.
children
.
length
==
0
)
{
}
else
{
}
else
{
for
(
var
c
=
0
;
c
<
tr
.
children
.
length
;
c
++
)
{
for
(
var
c
=
0
;
c
<
tr
.
children
.
length
;
c
++
)
{
this
.
childExcel
(
sheetData
,
datas
,
tr
.
children
[
c
]);
this
.
childExcel
(
sheetData
,
datas
,
tr
.
children
[
c
]);
}
}
}
}
const
data
=
datas
[
tr
.
key
];
const
data
=
datas
[
tr
.
key
];
const
all
=
[];
const
all
=
[];
if
(
data
&&
data
.
item
)
{
if
(
data
&&
data
.
item
)
{
for
(
var
i
=
0
;
i
<
data
.
items
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
data
.
items
.
length
;
i
++
)
{
const
row
=
data
.
items
[
i
];
const
row
=
data
.
items
[
i
];
const
r
=
[];
const
r
=
[];
for
(
var
j
=
0
;
j
<
row
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
row
.
length
;
j
++
)
{
const
col
=
row
[
j
];
const
col
=
row
[
j
];
if
(
col
.
content
?.
comName
==
'Excel'
)
{
if
(
col
.
content
?.
comName
==
'Excel'
)
{
r
.
push
(
col
.
content
.
initialValue
);
r
.
push
(
col
.
content
.
initialValue
);
}
else
{
}
else
{
r
.
push
(
''
);
r
.
push
(
''
);
}
}
}
}
all
.
push
(
r
);
all
.
push
(
r
);
}
}
}
}
sheetData
[
tr
.
title
]
=
all
;
sheetData
[
tr
.
title
]
=
all
;
};
};
configs
;
configs
;
initExcel
=
(
configs
,
callback
)
=>
{
initExcel
=
(
configs
,
callback
)
=>
{
this
.
configs
=
configs
;
this
.
configs
=
configs
;
// console.log(configs);
// console.log(configs);
if
(
configs
==
null
||
configs
.
trees
==
null
)
{
if
(
configs
==
null
||
configs
.
trees
==
null
)
{
if
(
callback
)
callback
();
if
(
callback
)
callback
();
return
;
return
;
}
}
const
sheetData
=
{};
const
sheetData
=
{};
for
(
var
key
in
configs
.
trees
)
{
for
(
var
key
in
configs
.
trees
)
{
const
tr
=
configs
.
trees
[
key
];
const
tr
=
configs
.
trees
[
key
];
this
.
childExcel
(
sheetData
,
configs
.
datas
,
tr
);
this
.
childExcel
(
sheetData
,
configs
.
datas
,
tr
);
}
}
const
hfInstance
=
HyperFormula
.
buildFromSheets
(
sheetData
,
{});
const
hfInstance
=
HyperFormula
.
buildFromSheets
(
sheetData
,
{});
this
.
hfInstance
=
hfInstance
;
this
.
hfInstance
=
hfInstance
;
if
(
callback
)
callback
();
if
(
callback
)
callback
();
};
};
getCellValue
=
(
i
,
j
,
currentTitle
)
=>
{
getCellValue
=
(
i
,
j
,
currentTitle
)
=>
{
let
hfInstance
=
this
.
props
.
hfInstance
?
this
.
props
.
hfInstance
:
this
.
hfInstance
;
let
hfInstance
=
this
.
props
.
hfInstance
?
this
.
props
.
hfInstance
:
this
.
hfInstance
;
if
(
hfInstance
&&
currentTitle
)
{
if
(
hfInstance
&&
currentTitle
)
{
let
x
=
hfInstance
.
getCellValue
({
let
x
=
hfInstance
.
getCellValue
({
col
:
j
,
col
:
j
,
row
:
i
,
row
:
i
,
sheet
:
hfInstance
.
getSheetId
(
currentTitle
),
sheet
:
hfInstance
.
getSheetId
(
currentTitle
),
});
});
if
(
x
&&
x
.
value
!=
null
)
{
if
(
x
&&
x
.
value
!=
null
)
{
x
=
x
.
value
;
x
=
x
.
value
;
}
}
return
x
;
return
x
;
}
}
};
};
componentWillReceiveProps
(
nextProps
)
{
componentWillReceiveProps
(
nextProps
)
{
const
{
const
{
postData
,
// 数据源
postData
,
// 数据源
isCg
,
// 用户点击草稿页面进入
isCg
,
// 用户点击草稿页面进入
isForm
,
isForm
,
isPreview
,
// 是否为预览模式
isPreview
,
// 是否为预览模式
isChild
,
// 是否为子表单
isChild
,
// 是否为子表单
}
=
nextProps
;
}
=
nextProps
;
if
(
isPreview
||
isChild
)
{
if
(
isPreview
||
isChild
)
{
this
.
setState
(
this
.
setState
(
{
{
...
this
.
state
,
...
this
.
state
,
...
nextProps
,
...
nextProps
,
isReady
:
true
,
isReady
:
true
,
viewMode
:
viewMode
:
nextProps
.
currentFormKey
&&
nextProps
.
datas
&&
nextProps
.
datas
[
nextProps
.
currentFormKey
]
nextProps
.
currentFormKey
&&
nextProps
.
datas
&&
nextProps
.
datas
[
nextProps
.
currentFormKey
]
?
nextProps
.
datas
[
nextProps
.
currentFormKey
].
viewMode
?
nextProps
.
datas
[
nextProps
.
currentFormKey
].
viewMode
:
null
,
:
null
,
formConfig
:
{
formConfig
:
{
...
this
.
state
.
formConfig
,
...
this
.
state
.
formConfig
,
style
:
nextProps
.
style
,
style
:
nextProps
.
style
,
},
},
},
},
()
=>
()
=>
this
.
initExcel
({
this
.
initExcel
({
datas
:
nextProps
.
datas
,
datas
:
nextProps
.
datas
,
trees
:
nextProps
.
trees
,
trees
:
nextProps
.
trees
,
}),
}),
);
);
return
;
return
;
}
}
try
{
try
{
const
val
=
postData
;
const
val
=
postData
;
/**
/**
* 数据源不同进行以下区别处理
* 数据源不同进行以下区别处理
* this.props.table有传入值表明需要渲染流程中最新表单
* this.props.table有传入值表明需要渲染流程中最新表单
*/
*/
if
(
isForm
)
{
if
(
isForm
)
{
// 由表格的操作按钮进入
// 由表格的操作按钮进入
const
mapData
=
{};
const
mapData
=
{};
const
sqlData
=
{};
const
sqlData
=
{};
const
dataObjs
=
val
.
form
.
dataObjModels
;
const
dataObjs
=
val
.
form
.
dataObjModels
;
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
const
dob
=
dataObjs
[
i
];
const
dob
=
dataObjs
[
i
];
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
const
sqls
=
val
.
form
.
sqlModels
;
const
sqls
=
val
.
form
.
sqlModels
;
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
const
dob
=
sqls
[
i
].
dataObjModel
;
const
dob
=
sqls
[
i
].
dataObjModel
;
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
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
];
this
.
initExcel
(
obj
,
()
=>
{
this
.
initExcel
(
obj
,
()
=>
{
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
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isRowCol
:
xxx
.
isRowCol
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isRowCol
:
xxx
.
isRowCol
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isBorder
:
xxx
.
isBorder
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
formKey
].
isBorder
:
xxx
.
isBorder
,
mapData
,
mapData
,
currentFormKey
:
this
.
props
.
table
?
val
.
formKey
:
obj
.
init
,
currentFormKey
:
this
.
props
.
table
?
val
.
formKey
:
obj
.
init
,
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
,
defaultValues
:
val
.
form
.
defaultValues
,
defaultValues
:
val
.
form
.
defaultValues
,
appId
:
val
.
appId
,
appId
:
val
.
appId
,
isReady
:
true
,
isReady
:
true
,
formConfig
:
xxx
,
formConfig
:
xxx
,
});
});
});
});
return
;
return
;
}
}
if
(
isCg
===
'yes'
)
{
if
(
isCg
===
'yes'
)
{
// 用户从编辑按钮进入
// 用户从编辑按钮进入
const
mapData
=
{};
const
mapData
=
{};
const
sqlData
=
{};
const
sqlData
=
{};
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
const
dob
=
sqls
[
i
].
dataObjModel
;
const
dob
=
sqls
[
i
].
dataObjModel
;
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
const
dataObjs
=
val
.
unifiedServicePatternModel
.
dataObjModels
;
const
dataObjs
=
val
.
unifiedServicePatternModel
.
dataObjModels
;
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
const
dob
=
dataObjs
[
i
];
const
dob
=
dataObjs
[
i
];
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
const
obj
=
JSON
.
parse
(
val
.
unifiedServicePatternModel
.
content
);
const
obj
=
JSON
.
parse
(
val
.
unifiedServicePatternModel
.
content
);
const
xxx
=
obj
.
datas
[
obj
.
init
];
const
xxx
=
obj
.
datas
[
obj
.
init
];
this
.
initExcel
(
obj
,
()
=>
{
this
.
initExcel
(
obj
,
()
=>
{
this
.
setState
({
this
.
setState
({
items
:
xxx
.
items
,
items
:
xxx
.
items
,
init
:
{
...
this
.
state
.
init
,
...
JSON
.
parse
(
val
.
content
)
},
init
:
{
...
this
.
state
.
init
,
...
JSON
.
parse
(
val
.
content
)
},
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
,
mapData
,
mapData
,
sqlData
,
sqlData
,
defaultValues
:
val
.
unifiedServicePatternModel
.
defaultValues
,
defaultValues
:
val
.
unifiedServicePatternModel
.
defaultValues
,
appId
:
val
.
appId
,
appId
:
val
.
appId
,
isReady
:
true
,
isReady
:
true
,
formConfig
:
xxx
,
formConfig
:
xxx
,
defaultBinds
:
this
.
props
.
table
defaultBinds
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
?
obj
.
datas
[
val
.
taskFormKey
].
defaultBinds
:
xxx
.
defaultBinds
,
:
xxx
.
defaultBinds
,
});
});
});
});
return
;
return
;
}
}
const
mapData
=
{};
const
mapData
=
{};
const
sqlData
=
{};
const
sqlData
=
{};
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
const
sqls
=
val
.
unifiedServicePatternModel
.
sqlModels
;
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
sqls
.
length
;
i
++
)
{
const
dob
=
sqls
[
i
].
dataObjModel
;
const
dob
=
sqls
[
i
].
dataObjModel
;
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
sqlData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
const
dataObjs
=
val
.
unifiedServicePatternModel
.
dataObjModels
;
const
dataObjs
=
val
.
unifiedServicePatternModel
.
dataObjModels
;
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
dataObjs
.
length
;
i
++
)
{
const
dob
=
dataObjs
[
i
];
const
dob
=
dataObjs
[
i
];
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
dob
.
columnModels
.
length
;
j
++
)
{
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
mapData
[
dob
.
columnModels
[
j
].
base52
]
=
dob
.
columnModels
[
j
];
}
}
}
}
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
];
// 是否是存在历史表单传入值
if
(
this
.
props
.
isQuery
)
return
;
if
(
this
.
props
.
isQuery
)
return
;
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
.
initExcel
(
obj
,
()
=>
{
this
.
initExcel
(
obj
,
()
=>
{
this
.
setState
({
this
.
setState
({
appId
:
val
.
id
,
appId
:
val
.
id
,
datas
:
obj
.
datas
,
datas
:
obj
.
datas
,
mapData
,
mapData
,
sqlData
,
sqlData
,
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
,
width
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
width
:
xxx
.
width
,
width
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
width
:
xxx
.
width
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isBorder
:
xxx
.
isBorder
,
isBorder
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isBorder
:
xxx
.
isBorder
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isRowCol
:
xxx
.
isRowCol
,
isRowCol
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
isRowCol
:
xxx
.
isRowCol
,
items
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
items
:
xxx
.
items
,
items
:
this
.
props
.
table
?
obj
.
datas
[
val
.
taskFormKey
].
items
:
xxx
.
items
,
isReady
:
true
,
isReady
:
true
,
init
:
{
init
:
{
...
this
.
state
.
init
,
...
this
.
state
.
init
,
...(
val
.
isSecond
?
this
.
props
.
obj
:
{}),
...(
val
.
isSecond
?
this
.
props
.
obj
:
{}),
},
},
formConfig
:
xxx
,
formConfig
:
xxx
,
// init:this.props.get==="mobile"?!!val.content?JSON.parse(val.content):'':{},// 移动端默认值设置
// init:this.props.get==="mobile"?!!val.content?JSON.parse(val.content):'':{},// 移动端默认值设置
});
});
});
});
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'公式配置有误Table/index.jsx/572'
,
e
);
console
.
log
(
'公式配置有误Table/index.jsx/572'
,
e
);
}
}
}
}
checkAllHidden
=
(
row
)
=>
{
checkAllHidden
=
(
row
)
=>
{
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
if
(
row
[
i
].
hidden
==
null
||
!
row
[
i
].
hidden
)
{
if
(
row
[
i
].
hidden
==
null
||
!
row
[
i
].
hidden
)
{
return
false
;
return
false
;
}
}
}
}
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
delete
row
[
i
].
hidden
;
delete
row
[
i
].
hidden
;
}
}
return
true
;
return
true
;
};
};
countMax
=
(
items
)
=>
{
countMax
=
(
items
)
=>
{
let
max
=
0
;
let
max
=
0
;
items
.
forEach
((
r
)
=>
{
items
.
forEach
((
r
)
=>
{
if
(
r
.
length
>
max
)
{
if
(
r
.
length
>
max
)
{
max
=
r
.
length
;
max
=
r
.
length
;
}
}
});
});
return
max
;
return
max
;
};
};
getCurrentFormTitle
=
(
obj
,
key
)
=>
{
getCurrentFormTitle
=
(
obj
,
key
)
=>
{
if
(
obj
==
null
)
return
;
if
(
obj
==
null
)
return
;
const
{
trees
}
=
obj
;
const
{
trees
}
=
obj
;
if
(
trees
==
null
)
return
;
if
(
trees
==
null
)
return
;
return
this
.
getT
(
trees
,
key
);
return
this
.
getT
(
trees
,
key
);
};
};
getCurrentFormTitle2
=
(
key
)
=>
{
getCurrentFormTitle2
=
(
key
)
=>
{
if
(
this
.
configs
==
null
)
return
;
if
(
this
.
configs
==
null
)
return
;
const
trees
=
this
.
configs
&&
this
.
configs
.
trees
?
this
.
configs
.
trees
:
this
.
props
.
trees
;
const
trees
=
this
.
configs
&&
this
.
configs
.
trees
?
this
.
configs
.
trees
:
this
.
props
.
trees
;
if
(
trees
==
null
)
return
;
if
(
trees
==
null
)
return
;
return
this
.
getT
(
trees
,
key
);
return
this
.
getT
(
trees
,
key
);
};
};
setRealTimeValues
=
(
obj
)
=>
{
setRealTimeValues
=
(
obj
)
=>
{
this
.
setState
({
objRealTime
:
obj
});
this
.
setState
({
objRealTime
:
obj
});
};
};
getT
=
(
trees
,
key
)
=>
{
getT
=
(
trees
,
key
)
=>
{
for
(
var
i
in
trees
)
{
for
(
var
i
in
trees
)
{
if
(
trees
[
i
].
key
==
key
)
{
if
(
trees
[
i
].
key
==
key
)
{
return
trees
[
i
].
title
;
return
trees
[
i
].
title
;
}
}
if
(
trees
[
i
].
children
!=
null
&&
trees
[
i
].
children
.
length
>
0
)
{
if
(
trees
[
i
].
children
!=
null
&&
trees
[
i
].
children
.
length
>
0
)
{
const
x
=
this
.
getT
(
trees
[
i
].
children
,
key
);
const
x
=
this
.
getT
(
trees
[
i
].
children
,
key
);
if
(
x
!=
null
)
return
x
;
if
(
x
!=
null
)
return
x
;
}
}
}
}
return
null
;
return
null
;
};
};
render
()
{
render
()
{
const
{
const
{
width
,
width
,
isRowCol
,
isRowCol
,
isBorder
,
isBorder
,
sqlData
,
sqlData
,
mapData
,
mapData
,
defaultBinds
,
defaultBinds
,
defaultValues
,
defaultValues
,
items
,
items
,
init
,
init
,
currentFormKey
,
currentFormKey
,
currentFormTitle
,
currentFormTitle
,
isEdit
,
isEdit
,
datas
,
datas
,
isReady
,
isReady
,
formConfig
,
formConfig
,
formCode
,
formCode
,
formId
,
formId
,
viewMode
,
viewMode
,
}
=
this
.
state
;
}
=
this
.
state
;
const
{
const
{
border
,
border
,
obj
,
obj
,
index
,
index
,
fatherCode
,
fatherCode
,
routerState
,
// 场景设计器共享路由参数
routerState
,
// 场景设计器共享路由参数
messageData
,
// 场景设计器共享变量参数 设计器监听到参数发生变化后会重新渲染组件
messageData
,
// 场景设计器共享变量参数 设计器监听到参数发生变化后会重新渲染组件
postData
,
postData
,
modalInit
,
modalInit
,
concealModel
,
// 场景设计器内置跳转函数
concealModel
,
// 场景设计器内置跳转函数
paddingBottom
,
paddingBottom
,
taskAssignee
,
taskAssignee
,
userId
,
userId
,
isDynamic
,
// 是否为大数据页面
isDynamic
,
// 是否为大数据页面
isWebPrint
,
// 打印界面
isWebPrint
,
// 打印界面
isWebPrintEnd
,
isWebPrintEnd
,
isPreview
,
isPreview
,
}
=
this
.
props
;
}
=
this
.
props
;
const
trees
=
this
.
configs
&&
this
.
configs
.
trees
?
this
.
configs
.
trees
:
this
.
props
.
trees
;
const
trees
=
this
.
configs
&&
this
.
configs
.
trees
?
this
.
configs
.
trees
:
this
.
props
.
trees
;
let
get
;
let
get
;
if
(
viewMode
!=
null
&&
viewMode
!=
''
)
{
if
(
viewMode
!=
null
&&
viewMode
!=
''
)
{
get
=
viewMode
;
get
=
viewMode
;
}
else
{
}
else
{
get
=
this
.
props
.
get
;
get
=
this
.
props
.
get
;
}
}
let
style
=
{};
let
style
=
{};
if
(
formConfig
.
style
!=
null
)
{
if
(
formConfig
.
style
!=
null
)
{
try
{
try
{
style
=
JSON
.
parse
(
formConfig
.
style
);
style
=
JSON
.
parse
(
formConfig
.
style
);
}
catch
(
e
)
{
}
catch
(
e
)
{
//console.log(e);
//console.log(e);
style
=
{};
style
=
{};
}
}
}
}
const
formItemLayout
=
{
const
formItemLayout
=
{
labelCol
:
{
labelCol
:
{
xs
:
{
span
:
24
},
xs
:
{
span
:
24
},
sm
:
{
span
:
24
},
sm
:
{
span
:
24
},
},
},
wrapperCol
:
{
wrapperCol
:
{
xs
:
{
span
:
24
},
xs
:
{
span
:
24
},
sm
:
{
span
:
24
},
sm
:
{
span
:
24
},
},
},
};
};
const
max
=
this
.
countMax
(
items
);
const
max
=
this
.
countMax
(
items
);
const
borderStyle
=
{
const
borderStyle
=
{
borderRight
:
'1px solid gray'
,
borderRight
:
'1px solid gray'
,
borderTop
:
'1px solid gray'
,
borderTop
:
'1px solid gray'
,
borderLeft
:
'1px solid gray'
,
borderLeft
:
'1px solid gray'
,
borderBottom
:
'1px solid gray'
,
borderBottom
:
'1px solid gray'
,
};
};
let
updateTime
;
let
updateTime
;
const
styleDiv
=
this
.
props
.
height
const
styleDiv
=
this
.
props
.
height
?
{
?
{
overflow
:
isDynamic
?
'hidden'
:
'auto'
,
overflow
:
isDynamic
?
'hidden'
:
'auto'
,
// overflowY: isDynamic && 'auto',
// overflowY: isDynamic && 'auto',
width
:
'100%'
,
width
:
'100%'
,
height
:
this
.
props
.
height
,
height
:
this
.
props
.
height
,
paddingBottom
:
paddingBottom
!=
null
?
paddingBottom
:
isWebPrint
?
0
:
'0px'
,
paddingBottom
:
paddingBottom
!=
null
?
paddingBottom
:
isWebPrint
?
0
:
'0px'
,
}
}
:
{
:
{
overflow
:
isDynamic
?
'hidden'
:
'auto'
,
overflow
:
isDynamic
?
'hidden'
:
'auto'
,
// overflowY: isDynamic && 'auto',
// overflowY: isDynamic && 'auto',
width
:
'100%'
,
width
:
'100%'
,
paddingBottom
:
paddingBottom
!=
null
?
paddingBottom
:
isWebPrint
?
0
:
'0px'
,
paddingBottom
:
paddingBottom
!=
null
?
paddingBottom
:
isWebPrint
?
0
:
'0px'
,
};
};
if
(
!
isReady
)
return
<></>;
if
(
!
isReady
)
return
<></>;
if
(
this
.
props
.
postData
?.
isUpdate
)
{
if
(
this
.
props
.
postData
?.
isUpdate
)
{
updateTime
=
moment
(
+
this
.
props
.
postData
?.
updateTime
).
format
(
'llll'
);
updateTime
=
moment
(
+
this
.
props
.
postData
?.
updateTime
)
}
.
format
(
'llll'
);
switch
(
get
)
{
}
case
'web'
:
switch
(
get
)
{
// this.props.form.validateFields()
case
'web'
:
// .then((values) => {
// this.props.form.validateFields()
// })
// .then((values) => {
// .catch(error => console.log(error));
// })
return
(
// .catch(error => console.log(error));
<>
return
(
{
this
.
props
.
postData
?.
isUpdate
?
(
<>
<
div
style=
{
{
margin
:
'100px 24px 24px'
}
}
>
{
this
.
props
.
postData
?.
isUpdate
?
(
<
div
style=
{
{
textAlign
:
'center'
}
}
>
<
div
style=
{
{
margin
:
'100px 24px 24px'
}
}
>
<
img
style=
{
{
marginRight
:
30
}
}
src=
{
maintain
}
/>
<
div
style=
{
{
textAlign
:
'center'
}
}
>
</
div
>
<
img
style=
{
{
marginRight
:
30
}
}
src=
{
maintain
}
/>
<
p
</
div
>
style=
{
{
<
p
textAlign
:
'center'
,
style=
{
{
width
:
'100%'
,
textAlign
:
'center'
,
fontSize
:
'16px'
,
width
:
'100%'
,
fontWeight
:
'bold'
,
fontSize
:
'16px'
,
color
:
'#666666'
,
fontWeight
:
'bold'
,
}
}
>
color
:
'#666666'
,
{
updateTime
!==
'Invalid date'
}
}
>
?
`升级维护中,预计${updateTime ?? '一万年'}恢复使用,请耐心等待。`
{
updateTime
!==
'Invalid date'
:
'请耐心等待'
}
?
`升级维护中,预计${updateTime ?? '一万年'}恢复使用,请耐心等待。`
</
p
>
:
'请耐心等待'
}
</
div
>
</
p
>
)
:
(
</
div
>
<
div
id=
"web_table"
>
)
:
(
<
Form
className=
"login-form"
>
<
div
id=
'web_table'
>
{
isEdit
&&
defaultBinds
<
Form
className=
'login-form'
>
?
Object
.
keys
(
defaultBinds
).
map
((
k
)
=>
{
{
isEdit
&&
defaultBinds
const
r
=
defaultBinds
[
k
];
?
Object
.
keys
(
defaultBinds
)
if
(
.
map
((
k
)
=>
{
r
.
columnIds
==
null
||
const
r
=
defaultBinds
[
k
];
r
.
columnIds
.
length
<
2
||
if
(
r
.
sqls
==
null
||
r
.
columnIds
==
null
||
r
.
sqls
.
length
<
2
r
.
columnIds
.
length
<
2
||
)
{
r
.
sqls
==
null
||
return
''
;
r
.
sqls
.
length
<
2
}
)
{
const
name
=
r
.
columnIds
[
r
.
columnIds
.
length
-
1
];
return
''
;
const
key
=
r
.
sqls
[
r
.
sqls
.
length
-
1
];
}
const
value
=
defaultValues
[
key
];
const
name
=
r
.
columnIds
[
r
.
columnIds
.
length
-
1
];
const
key
=
r
.
sqls
[
r
.
sqls
.
length
-
1
];
const
value
=
defaultValues
[
key
];
if
(
value
===
null
||
value
===
undefined
)
{
if
(
value
===
null
||
value
===
undefined
)
{
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
>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
div
<
div
data
-
page
-
formkey=
{
currentFormKey
}
data
-
page
-
formkey=
{
currentFormKey
}
style=
{
styleDiv
}
style=
{
styleDiv
}
ref=
{
(
ref
)
=>
{
ref=
{
(
ref
)
=>
{
this
.
root
=
ref
;
this
.
root
=
ref
;
}
}
>
}
}
>
<
table
<
table
style=
{
{
style=
{
{
overflow
:
'auto'
,
overflow
:
'auto'
,
margin
:
max
*
width
>
550
?
'1px auto'
:
''
,
// 禅道 27868
margin
:
max
*
width
>
550
?
'1px auto'
:
''
,
// 禅道 27868
marginBottom
:
isWebPrint
?
(
isWebPrintEnd
?
'5px'
:
0
)
:
'1px'
,
marginBottom
:
isWebPrint
?
(
isWebPrintEnd
?
'5px'
:
0
)
:
'1px'
,
...
style
,
...
style
,
}
}
}
}
border=
{
border
}
border=
{
border
}
cellSpacing=
"0"
cellSpacing=
'0'
cellPadding=
"0"
>
cellPadding=
'0'
>
<
tbody
>
<
tbody
>
{
items
.
map
((
row
,
i
)
=>
{
{
items
.
map
((
row
,
i
)
=>
{
const
allhidden
=
this
.
checkAllHidden
(
row
);
const
allhidden
=
this
.
checkAllHidden
(
row
);
// console.log(row);
// console.log(row);
return
(
return
(
<
tr
key=
{
i
}
>
<
tr
key=
{
i
}
>
{
row
.
map
((
cell
,
j
)
=>
{
{
row
.
map
((
cell
,
j
)
=>
{
if
(
!
cell
.
content
)
{
if
(
!
cell
.
content
)
{
return
;
return
;
}
}
if
(
cell
.
uuid
)
{
if
(
cell
.
uuid
)
{
if
(
cell
.
content
)
{
if
(
cell
.
content
)
{
cell
.
content
=
{
cell
.
content
=
{
...
cell
.
content
,
...
cell
.
content
,
...
getActiveJson
(
currentFormKey
,
cell
.
uuid
),
...
getActiveJson
(
currentFormKey
,
cell
.
uuid
),
};
};
if
(
window
.
zdyTableTemplateWillMountProps
?.
allDisabled
)
{
if
(
window
.
zdyTableTemplateWillMountProps
?.
allDisabled
)
{
cell
.
content
.
disabled
=
true
;
cell
.
content
.
disabled
=
true
;
}
}
}
}
// 27282 双选会报名后管理员修改举办时间 但是单位申请信息么有随着更新
// 27282 双选会报名后管理员修改举办时间 但是单位申请信息么有随着更新
}
}
let
styles
=
{};
let
styles
=
{};
// console.log(cell.content);
// console.log(cell.content);
if
(
cell
.
content
&&
cell
.
content
.
styles
)
{
if
(
cell
.
content
&&
cell
.
content
.
styles
)
{
try
{
try
{
styles
=
JSON
.
parse
(
cell
.
content
.
styles
);
styles
=
JSON
.
parse
(
cell
.
content
.
styles
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
`第${i}行第${j}列样式配置有误,${e}`
);
console
.
log
(
`第${i}行第${j}列样式配置有误,${e}`
);
}
}
}
}
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
}
data
-
cell
-
id=
{
data
-
cell
-
id=
{
cell
.
uuid
||
'no_uuid_'
+
Math
.
random
().
slice
(
0
,
6
)
cell
.
uuid
||
'no_uuid_'
+
Math
.
random
()
}
.
slice
(
0
,
6
)
data
-
com
-
name=
{
cell
.
content
?.
comName
||
'empty'
}
}
style=
{
{
data
-
com
-
name=
{
cell
.
content
?.
comName
||
'empty'
}
overflow
:
'auto'
,
style=
{
{
textAlign
:
overflow
:
'auto'
,
cell
.
content
&&
cell
.
content
.
calign
textAlign
:
?
cell
.
content
.
calign
cell
.
content
&&
cell
.
content
.
calign
:
'left'
,
?
cell
.
content
.
calign
...(
isBorder
:
'left'
,
?
cell
?.
content
?.
comName
==
'InputHidden'
||
...(
isBorder
!
cell
?.
content
?.
comName
?
cell
?.
content
?.
comName
===
'InputHidden'
||
?
{}
!
cell
?.
content
?.
comName
:
borderStyle
?
{}
:
{}),
:
borderStyle
// position: cell.content&&cell.content.comName ==="InputHidden"&&'absolute',
:
{}),
...
styles
,
// position: cell.content&&cell.content.comName ==="InputHidden"&&'absolute',
display
:
...
styles
,
cell
.
content
&&
display
:
(
cell
.
content
.
comName
===
'InputHidden'
||
cell
.
content
&&
cell
.
content
.
isHidden
)
&&
(
cell
.
content
.
comName
===
'InputHidden'
||
'none'
,
cell
.
content
.
isHidden
)
&&
}
}
>
'none'
,
<
TableCom
}
}
>
taskId=
{
this
.
props
.
taskId
}
<
TableCom
importExcel=
{
this
.
importExcel
}
taskId=
{
this
.
props
.
taskId
}
getCellValue=
{
this
.
getCellValue
}
importExcel=
{
this
.
importExcel
}
getCurrentFormTitle=
{
this
.
getCurrentFormTitle2
}
getCellValue=
{
this
.
getCellValue
}
hfInstance=
{
this
.
hfInstance
}
getCurrentFormTitle=
{
this
.
getCurrentFormTitle2
}
isWebPrintEnd=
{
isWebPrintEnd
}
hfInstance=
{
this
.
hfInstance
}
isWebPrint=
{
isWebPrint
}
isWebPrintEnd=
{
isWebPrintEnd
}
isPrint=
{
this
.
props
.
isPrint
}
isWebPrint=
{
isWebPrint
}
formCode=
{
formCode
}
// 当前表单code
isPrint=
{
this
.
props
.
isPrint
}
modalInit=
{
modalInit
}
formCode=
{
formCode
}
// 当前表单code
taskAssignee=
{
taskAssignee
}
// 提交人
modalInit=
{
modalInit
}
userId=
{
userId
}
taskAssignee=
{
taskAssignee
}
// 提交人
formId=
{
formId
}
// 当前表单Id
userId=
{
userId
}
i=
{
i
}
// 当前组件下标
formId=
{
formId
}
// 当前表单Id
j=
{
j
}
// 当前行数下班
i=
{
i
}
// 当前组件下标
isPreview=
{
isPreview
}
j=
{
j
}
// 当前行数下班
fatherCode=
{
fatherCode
}
isPreview=
{
isPreview
}
index=
{
index
}
fatherCode=
{
fatherCode
}
fatherObj=
{
this
.
props
.
fatherObj
}
index=
{
index
}
datas=
{
datas
}
fatherObj=
{
this
.
props
.
fatherObj
}
uuid=
{
cell
.
uuid
}
datas=
{
datas
}
setRealTimeValues=
{
this
.
setRealTimeValues
}
uuid=
{
cell
.
uuid
}
isEdit=
{
isEdit
}
setRealTimeValues=
{
this
.
setRealTimeValues
}
formKey=
{
currentFormKey
}
isEdit=
{
isEdit
}
currentFormTitle=
{
currentFormTitle
}
formKey=
{
currentFormKey
}
init=
{
init
}
currentFormTitle=
{
currentFormTitle
}
get=
{
get
}
// 区分移动端或wen端
init=
{
init
}
json=
{
cell
.
content
}
get=
{
get
}
// 区分移动端或wen端
obj=
{
{
...
obj
,
...
this
.
state
.
objRealTime
}
||
{}
}
// 是否存在默认值
json=
{
cell
.
content
}
mapData=
{
mapData
}
obj=
{
{
...
obj
,
...
this
.
state
.
objRealTime
}
||
{}
}
// 是否存在默认值
form=
{
this
.
props
.
form
}
// antd form控件
mapData=
{
mapData
}
sqlData=
{
sqlData
}
form=
{
this
.
props
.
form
}
// antd form控件
defaultValues=
{
defaultValues
||
{}
}
// 接口中的默认值
sqlData=
{
sqlData
}
routerState=
{
routerState
}
// 兼容表单设计器路由传参
defaultValues=
{
defaultValues
||
{}
}
// 接口中的默认值
messageData=
{
messageData
}
// 场景设计器共享变量参数
routerState=
{
routerState
}
// 兼容表单设计器路由传参
concealModel=
{
concealModel
||
{}
}
// 场景设计器内置路由跳转函数
messageData=
{
messageData
}
// 场景设计器共享变量参数
isDynamic=
{
isDynamic
}
// 是否为场景配置器调用
concealModel=
{
concealModel
||
{}
}
// 场景设计器内置路由跳转函数
trees=
{
trees
}
isDynamic=
{
isDynamic
}
// 是否为场景配置器调用
/>
trees=
{
trees
}
</
td
>
/>
);
</
td
>
})
}
);
</
tr
>
})
}
);
</
tr
>
})
}
);
</
tbody
>
})
}
</
table
>
</
tbody
>
</
table
>
{
style
.
pageBreakAfter
!=
null
?
(
{
style
.
pageBreakAfter
!=
null
?
(
<
div
style=
{
{
pageBreakAfter
:
style
.
pageBreakAfter
}
}
/>
<
div
style=
{
{
pageBreakAfter
:
style
.
pageBreakAfter
}
}
/>
)
:
(
)
:
(
''
''
)
}
)
}
</
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
style=
{
{
width
:
'100%'
}
}
src=
{
maintain
}
/>
</
div
>
</
div
>
<
p
<
p
style=
{
{
style=
{
{
textAlign
:
'center'
,
textAlign
:
'center'
,
width
:
'100%'
,
width
:
'100%'
,
fontSize
:
'16px'
,
fontSize
:
'16px'
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
color
:
'#666666'
,
color
:
'#666666'
,
}
}
>
}
}
>
{
updateTime
!==
'Invalid date'
{
updateTime
!==
'Invalid date'
?
`升级维护中,预计${updateTime ?? '一万年'}恢复使用,请耐心等待。`
?
`升级维护中,预计${updateTime ?? '一万年'}恢复使用,请耐心等待。`
:
'请耐心等待'
}
:
'请耐心等待'
}
</
p
>
</
p
>
</
div
>
</
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
)
const
r
=
defaultBinds
[
k
];
.
map
((
k
)
=>
{
if
(
const
r
=
defaultBinds
[
k
];
r
.
columnIds
==
null
||
if
(
r
.
columnIds
.
length
<
2
||
r
.
columnIds
==
null
||
r
.
sqls
==
null
||
r
.
columnIds
.
length
<
2
||
r
.
sqls
.
length
<
2
r
.
sqls
==
null
||
)
{
r
.
sqls
.
length
<
2
return
''
;
)
{
}
return
''
;
const
name
=
r
.
columnIds
[
r
.
columnIds
.
length
-
1
];
}
const
key
=
r
.
sqls
[
r
.
sqls
.
length
-
1
];
const
name
=
r
.
columnIds
[
r
.
columnIds
.
length
-
1
];
const
value
=
defaultValues
[
key
];
const
key
=
r
.
sqls
[
r
.
sqls
.
length
-
1
];
const
value
=
defaultValues
[
key
];
if
(
value
===
null
||
value
===
undefined
)
{
if
(
value
===
null
||
value
===
undefined
)
{
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
taskId=
{
this
.
props
.
taskId
}
taskId=
{
this
.
props
.
taskId
}
getCellValue=
{
this
.
getCellValue
}
getCellValue=
{
this
.
getCellValue
}
hfInstance=
{
this
.
hfInstance
}
hfInstance=
{
this
.
hfInstance
}
getCurrentFormTitle=
{
this
.
getCurrentFormTitle2
}
getCurrentFormTitle=
{
this
.
getCurrentFormTitle2
}
taskAssignee=
{
taskAssignee
}
// 提交人
taskAssignee=
{
taskAssignee
}
// 提交人
userId=
{
userId
}
userId=
{
userId
}
importExcel=
{
this
.
importExcel
}
importExcel=
{
this
.
importExcel
}
isPreview=
{
isPreview
}
isPreview=
{
isPreview
}
trees=
{
trees
}
trees=
{
trees
}
setRealTimeValues=
{
this
.
setRealTimeValues
}
setRealTimeValues=
{
this
.
setRealTimeValues
}
isRowCol=
{
isRowCol
}
isRowCol=
{
isRowCol
}
modalInit=
{
modalInit
}
modalInit=
{
modalInit
}
items=
{
items
}
items=
{
items
}
checkAllHidden=
{
this
.
checkAllHidden
}
checkAllHidden=
{
this
.
checkAllHidden
}
isBorder=
{
isBorder
}
isBorder=
{
isBorder
}
borderStyle=
{
borderStyle
}
borderStyle=
{
borderStyle
}
fatherCode=
{
fatherCode
}
fatherCode=
{
fatherCode
}
index=
{
index
}
index=
{
index
}
datas=
{
datas
}
datas=
{
datas
}
isEdit=
{
isEdit
}
isEdit=
{
isEdit
}
currentFormKey=
{
currentFormKey
}
currentFormKey=
{
currentFormKey
}
currentFormTitle=
{
currentFormTitle
}
currentFormTitle=
{
currentFormTitle
}
init=
{
init
}
init=
{
init
}
get=
{
get
}
get=
{
get
}
obj=
{
{
...
obj
,
...
this
.
state
.
objRealTime
}
}
obj=
{
{
...
obj
,
...
this
.
state
.
objRealTime
}
}
mapData=
{
mapData
}
mapData=
{
mapData
}
form=
{
this
.
props
.
form
}
form=
{
this
.
props
.
form
}
sqlData=
{
sqlData
}
sqlData=
{
sqlData
}
defaultValues=
{
defaultValues
}
defaultValues=
{
defaultValues
}
width=
{
width
}
width=
{
width
}
formCode=
{
formCode
}
formCode=
{
formCode
}
style=
{
style
}
style=
{
style
}
routerState=
{
routerState
}
// 兼容表单设计器路由传参
routerState=
{
routerState
}
// 兼容表单设计器路由传参
messageData=
{
messageData
}
// 场景设计器共享变量参数
messageData=
{
messageData
}
// 场景设计器共享变量参数
formId=
{
formId
}
formId=
{
formId
}
fatherObj=
{
this
.
props
.
fatherObj
}
fatherObj=
{
this
.
props
.
fatherObj
}
concealModel=
{
concealModel
||
{}
}
// 场景设计器内置路由跳转函数
concealModel=
{
concealModel
||
{}
}
// 场景设计器内置路由跳转函数
isDynamic=
{
isDynamic
}
// 是否为场景配置器调用
isDynamic=
{
isDynamic
}
// 是否为场景配置器调用
/>
/>
</
Form
>
</
Form
>
)
}
)
}
</>
</>
);
);
}
}
}
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论