Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
aee90f35
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 搜索 >>
提交
aee90f35
编写于
5月 20, 2021
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数据模板
上级
43f4229a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
36 addition
and
21 deletion
+36
-21
o2web/source/x_component_process_Xform/Datatemplate.js
o2web/source/x_component_process_Xform/Datatemplate.js
+36
-21
未找到文件。
o2web/source/x_component_process_Xform/Datatemplate.js
浏览文件 @
aee90f35
...
...
@@ -217,8 +217,6 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
//设置节点外的操作:添加、删除、导入、导出
this
.
setOuterActionsEvents
();
debugger
;
//隐藏节点
this
.
node
.
getChildren
().
hide
();
...
...
@@ -399,7 +397,6 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
"
data
"
:
this
.
data
}]);
Array
.
each
(
sectionKeyList
,
function
(
sectionKey
,
i
)
{
debugger
;
var
list
=
this
.
data
[
sectionKey
];
this
.
fireEvent
(
"
beforeloadSectionLines
"
,
[{
"
sectionKey
"
:
sectionKey
,
...
...
@@ -478,6 +475,7 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
this
.
setData
(
data
);
},
_addLine
:
function
(
ev
,
sectionKey
,
d
){
if
(
this
.
isMax
()
){
var
text
=
MWF
.
xApplication
.
process
.
Xform
.
LP
.
maxItemCountNotice
.
replace
(
"
{n}
"
,
this
.
json
.
maxCount
);
this
.
form
.
notice
(
text
,
"
info
"
);
...
...
@@ -489,7 +487,8 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
if
(
this
.
unionMode
){
var
key
=
sectionKey
||
"
$union
"
;
this
.
newLineSectionKey
=
key
;
var
sectionData
=
data
[
key
]
||
[];
if
(
!
data
[
key
])
data
[
key
]
=
[];
var
sectionData
=
data
[
key
];
sectionData
.
push
(
d
||
{});
var
index
=
sectionData
.
length
-
1
;
this
.
newLineIndex
=
index
;
...
...
@@ -507,7 +506,6 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
return
newLine
;
},
_insertLine
:
function
(
ev
,
beforeLine
){
debugger
;
if
(
this
.
isMax
()
){
var
text
=
MWF
.
xApplication
.
process
.
Xform
.
LP
.
maxItemCountNotice
.
replace
(
"
{n}
"
,
this
.
json
.
maxCount
);
this
.
form
.
notice
(
text
,
"
info
"
);
...
...
@@ -538,7 +536,6 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
return
newLine
;
},
_insertLineByIndex
:
function
(
ev
,
sectionKey
,
index
,
d
){
debugger
;
if
(
this
.
isMax
()
){
var
text
=
MWF
.
xApplication
.
process
.
Xform
.
LP
.
maxItemCountNotice
.
replace
(
"
{n}
"
,
this
.
json
.
maxCount
);
this
.
form
.
notice
(
text
,
"
info
"
);
...
...
@@ -549,6 +546,7 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
if
(
sectionKey
){
//区段合并后的数据
this
.
newLineSectionKey
=
sectionKey
;
data
=
this
.
getData
();
if
(
!
data
[
sectionKey
])
data
[
sectionKey
]
=
[];
var
sectionData
=
data
[
sectionKey
];
if
(
o2
.
typeOf
(
sectionData
)
!==
"
array
"
||
sectionData
.
length
<
index
)
return
null
;
sectionData
.
splice
(
index
,
0
,
d
||
{});
...
...
@@ -567,7 +565,6 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
return
newLine
;
},
_deleteSelectedLine
:
function
(
ev
){
debugger
;
var
selectedLine
=
this
.
lineList
.
filter
(
function
(
line
)
{
return
line
.
selected
;
});
if
(
selectedLine
.
length
===
0
){
this
.
form
.
notice
(
MWF
.
xApplication
.
process
.
Xform
.
LP
.
selectItemNotice
,
"
info
"
);
...
...
@@ -597,9 +594,13 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
var
_self
=
this
;
var
data
=
_self
.
getData
();
var
saveFlag
=
false
;
lines
.
reverse
().
each
(
function
(
line
){
_self
.
fireEvent
(
"
deleteLine
"
,
[
line
]);
if
(
line
.
deleteAttachment
())
saveFlag
=
true
;
if
(
line
.
options
.
sectionKey
){
//区段合并后的数据
var
sectionData
=
data
[
line
.
options
.
sectionKey
];
sectionData
.
splice
(
line
.
options
.
indexInSection
,
1
);
...
...
@@ -611,6 +612,7 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
});
_self
.
setData
(
data
);
if
(
saveFlag
)
this
.
form
.
saveFormData
();
},
_deleteLine
:
function
(
ev
,
line
){
if
(
this
.
isMin
()
){
...
...
@@ -620,15 +622,16 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
}
var
_self
=
this
;
this
.
form
.
confirm
(
"
warn
"
,
ev
,
MWF
.
xApplication
.
process
.
Xform
.
LP
.
deleteDatagridLineTitle
,
MWF
.
xApplication
.
process
.
Xform
.
LP
.
deleteDatagridLine
,
300
,
120
,
function
(){
_self
.
_del
Single
Line
(
line
);
_self
.
_delLine
(
line
);
this
.
close
();
},
function
(){
this
.
close
();
},
null
,
null
,
this
.
form
.
json
.
confirmStyle
);
},
_del
Single
Line
:
function
(
line
){
_delLine
:
function
(
line
){
this
.
fireEvent
(
"
deleteLine
"
,
[
line
]);
var
saveFlag
=
line
.
deleteAttachment
();
//使用数据驱动
var
data
=
this
.
getData
();
if
(
line
.
options
.
sectionKey
){
//区段合并后的数据
...
...
@@ -639,9 +642,9 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
}
this
.
setData
(
data
);
this
.
fireEvent
(
"
afterDeleteLine
"
);
if
(
saveFlag
)
this
.
form
.
saveFormData
();
},
_checkSelectAll
:
function
()
{
debugger
;
var
selectData
=
this
.
selectAllSelector
.
getData
();
var
selected
;
if
(
o2
.
typeOf
(
selectData
)
===
"
array
"
){
...
...
@@ -659,7 +662,6 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
if
(
this
.
selectAllSelector
)
this
.
selectAllSelector
.
setData
(
this
.
json
.
outerSelectAllSelectedValue
);
},
unselectAll
:
function
(){
debugger
;
this
.
selected
=
false
;
if
(
this
.
selectAllSelector
.
getOptionsObj
){
var
options
=
this
.
selectAllSelector
.
getOptionsObj
();
...
...
@@ -844,7 +846,7 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
// if( ev ){
// this._deleteLine(ev, line);
// }else{
this
.
_del
Single
Line
(
line
);
this
.
_delLine
(
line
);
// }
},
/**
...
...
@@ -933,7 +935,7 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
// if( ev ){
// this._deleteLine(ev, line);
// }else{
this
.
_del
Single
Line
(
line
);
this
.
_delLine
(
line
);
// }
},
/**
...
...
@@ -1004,7 +1006,6 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
this
.
importer
.
destroySimulateModule
();
}
if
(
this
.
editable
!==
false
){
debugger
;
// var data = [];
// this.lineList.each(function(line, index){
// data.push(line.getData())
...
...
@@ -1290,6 +1291,13 @@ MWF.xApplication.process.Xform.Datatemplate.Line = new Class({
if
(
this
.
form
.
forms
[
id
])
this
.
form
.
forms
[
id
]
=
null
;
var
module
=
this
.
form
.
_loadModule
(
json
,
node
,
function
()
{});
if
(
json
.
type
===
"
Attachment
"
||
json
.
type
===
"
AttachmentDg
"
){
module
.
addEvent
(
"
change
"
,
function
(){
_self
.
form
.
saveFormData
();
}.
bind
(
this
))
}
this
.
form
.
modules
.
push
(
module
);
this
.
modules
.
push
(
module
);
...
...
@@ -1451,6 +1459,20 @@ MWF.xApplication.process.Xform.Datatemplate.Line = new Class({
},
setData
:
function
(
data
)
{
this
.
template
.
_setLineData
(
this
,
data
);
},
deleteAttachment
:
function
(){
var
saveFlag
=
false
;
for
(
var
key
in
this
.
allField
){
var
module
=
this
.
allField
[
key
];
if
(
module
.
json
.
type
===
"
Attachment
"
||
module
.
json
.
type
===
"
AttachmentDg
"
){
var
array
=
module
.
_getBusinessData
();
(
array
||
[]).
each
(
function
(
d
){
saveFlag
=
true
;
this
.
form
.
workAction
.
deleteAttachment
(
d
.
id
,
this
.
form
.
businessData
.
work
.
id
);
}.
bind
(
this
))
}
}
return
saveFlag
;
}
});
...
...
@@ -1727,7 +1749,6 @@ MWF.xApplication.process.Xform.Datatemplate.Importer = new Class({
}.
bind
(
this
));
},
destroySimulateModule
:
function
(){
debugger
;
if
(
!
this
.
simelateModuleMap
)
return
;
var
keys
=
Object
.
keys
(
this
.
simelateModuleMap
);
keys
.
each
(
function
(
key
,
i
)
{
...
...
@@ -1746,7 +1767,6 @@ MWF.xApplication.process.Xform.Datatemplate.Importer = new Class({
}
},
loadSimulateModule
:
function
(){
debugger
;
if
(
this
.
simelateModuleMap
){
this
.
destroySimulateModule
();
}
...
...
@@ -2011,8 +2031,6 @@ MWF.xApplication.process.Xform.Datatemplate.Importer = new Class({
checkData
:
function
(
fieldArray
,
idata
){
var
flag
=
true
;
debugger
;
var
lp
=
MWF
.
xApplication
.
process
.
Xform
.
LP
;
var
columnText
=
lp
.
importValidationColumnText
;
var
columnTextExcel
=
lp
.
importValidationColumnTextExcel
;
...
...
@@ -2388,8 +2406,6 @@ MWF.xApplication.process.Xform.Datatemplate.ExcelUtils = new Class({
if
(
!
di
.
s
.
alignment
)
di
.
s
.
alignment
=
{};
di
.
s
.
alignment
.
wrapText
=
true
;
debugger
;
if
(
dateIndexArray
&&
dateIndexArray
.
length
){
var
colName
=
key
.
replace
(
/
\d
+/g
,
''
);
//清除数字
var
rowNum
=
key
.
replace
(
colName
,
''
);
...
...
@@ -2430,7 +2446,6 @@ MWF.xApplication.process.Xform.Datatemplate.ExcelUtils = new Class({
if
(
workbook
.
Sheets
.
hasOwnProperty
(
sheet
))
{
// fromTo = workbook.Sheets[sheet]['!ref'];
// console.log(fromTo);
debugger
;
var
worksheet
=
workbook
.
Sheets
[
sheet
];
if
(
dateColArray
&&
typeOf
(
dateColArray
)
==
"
array
"
&&
dateColArray
.
length
){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录