Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
85038e3e
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
85038e3e
编写于
9月 01, 2021
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
datatemplate拆分情况下的问题
上级
5a42abbf
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
47 addition
and
6 deletion
+47
-6
o2web/source/x_component_process_Xform/Datatemplate.js
o2web/source/x_component_process_Xform/Datatemplate.js
+47
-6
未找到文件。
o2web/source/x_component_process_Xform/Datatemplate.js
浏览文件 @
85038e3e
...
...
@@ -840,6 +840,30 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
return
this
.
_getBusinessData
();
}
},
_getSectionKey
:
function
(){
if
(
this
.
json
.
section
!==
"
yes
"
){
return
""
;
}
else
{
switch
(
this
.
json
.
sectionBy
){
case
"
person
"
:
return
layout
.
desktop
.
session
.
user
.
id
;
case
"
unit
"
:
return
(
this
.
form
.
businessData
.
task
)
?
this
.
form
.
businessData
.
task
.
unit
:
""
;
case
"
activity
"
:
return
(
this
.
form
.
businessData
.
work
)
?
this
.
form
.
businessData
.
work
.
activity
:
""
;
case
"
splitValue
"
:
return
(
this
.
form
.
businessData
.
work
)
?
this
.
form
.
businessData
.
work
.
splitValue
:
""
;
case
"
script
"
:
if
(
this
.
json
.
sectionByScript
&&
this
.
json
.
sectionByScript
.
code
){
return
this
.
form
.
Macro
.
exec
(
this
.
json
.
sectionByScript
.
code
,
this
)
||
""
;
}
else
{
return
""
;
}
default
:
return
""
;
}
}
},
createErrorNode
:
function
(
text
){
var
node
=
new
Element
(
"
div
"
);
var
iconNode
=
new
Element
(
"
div
"
,
{
...
...
@@ -1049,6 +1073,10 @@ MWF.xApplication.process.Xform.Datatemplate.Line = new Class({
load
:
function
(){
this
.
node
.
set
(
"
html
"
,
this
.
template
.
templateHtml
);
var
moduleNodes
=
this
.
form
.
_getModuleNodes
(
this
.
node
);
//拆分状态
var
sectionKey
=
this
.
template
.
_getSectionKey
();
moduleNodes
.
each
(
function
(
node
)
{
if
(
node
.
get
(
"
MWFtype
"
)
!==
"
form
"
)
{
var
_self
=
this
;
...
...
@@ -1063,8 +1091,12 @@ MWF.xApplication.process.Xform.Datatemplate.Line = new Class({
var
index
=
this
.
options
.
index
;
var
id
=
this
.
template
.
json
.
id
+
"
..
"
+
index
+
"
..
"
+
json
.
id
;
var
id
;
if
(
sectionKey
){
id
=
this
.
template
.
json
.
id
+
"
..
"
+
sectionKey
+
"
..
"
+
index
+
"
..
"
+
json
.
id
;
}
else
{
id
=
this
.
template
.
json
.
id
+
"
..
"
+
index
+
"
..
"
+
json
.
id
;
}
json
.
id
=
id
;
node
.
set
(
"
id
"
,
id
);
...
...
@@ -1072,7 +1104,7 @@ MWF.xApplication.process.Xform.Datatemplate.Line = new Class({
if
(
json
.
type
===
"
Attachment
"
||
json
.
type
===
"
AttachmentDg
"
){
json
.
type
=
"
AttachmentDg
"
;
json
.
ignoreSite
=
true
;
json
.
site
=
this
.
getAttachmentSite
(
json
,
templateJsonId
);
json
.
site
=
this
.
getAttachmentSite
(
json
,
templateJsonId
,
sectionKey
);
}
if
(
this
.
form
.
all
[
id
])
this
.
form
.
all
[
id
]
=
null
;
...
...
@@ -1136,7 +1168,7 @@ MWF.xApplication.process.Xform.Datatemplate.Line = new Class({
get
:
function
(
templateJsonId
){
return
this
.
all_templateId
[
templateJsonId
];
},
getAttachmentSite
:
function
(
json
,
templateJsonId
){
getAttachmentSite
:
function
(
json
,
templateJsonId
,
sectionKey
){
//确保site最长为64,否则后台会报错
var
index
=
this
.
options
.
index
;
...
...
@@ -1144,12 +1176,21 @@ MWF.xApplication.process.Xform.Datatemplate.Line = new Class({
var
baseSite
;
baseSite
=
"
.
"
+
index
+
"
.
"
+
(
json
.
site
||
templateJsonId
);
var
maxLength
=
64
-
baseSite
.
length
;
var
maxLength
;
var
sectionId
=
""
;
if
(
sectionKey
){
maxLength
=
Math
.
floor
((
63
-
baseSite
.
length
)
/
2
);
sectionId
=
(
sectionKey
.
length
>
maxLength
)
?
sectionKey
.
substr
(
sectionKey
.
length
-
maxLength
,
maxLength
)
:
sectionKey
;
sectionId
=
"
.
"
+
sectionId
;
}
else
{
maxLength
=
64
-
baseSite
.
length
;
}
var
templateId
=
this
.
template
.
json
.
id
;
templateId
=
(
templateId
.
length
>
maxLength
)
?
templateId
.
substr
(
templateId
.
length
-
maxLength
,
maxLength
)
:
templateId
;
return
templateId
+
baseSite
;
return
templateId
+
sectionId
+
baseSite
;
},
setEvents
:
function
(
module
,
id
)
{
if
(
this
.
template
.
addActionIdList
.
contains
(
id
)){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录