Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
de6b3a3c
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,发现更多精彩内容 >>
提交
de6b3a3c
编写于
8月 12, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
差异文件
冲突解决
上级
a7ed3454
63e72f63
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
794 addition
and
794 deletion
+794
-794
o2web/source/x_component_process_FormDesigner/Module/Datagrid/datagrid.html
...ponent_process_FormDesigner/Module/Datagrid/datagrid.html
+5
-5
o2web/source/x_component_process_Xform/DatagridMobile.js
o2web/source/x_component_process_Xform/DatagridMobile.js
+142
-142
o2web/source/x_component_process_Xform/DatagridPC.js
o2web/source/x_component_process_Xform/DatagridPC.js
+647
-647
未找到文件。
o2web/source/x_component_process_FormDesigner/Module/Datagrid/datagrid.html
浏览文件 @
de6b3a3c
...
...
@@ -28,11 +28,11 @@
<td
class=
"editTableValue"
><input
type=
"color"
name=
"zebraColor"
value=
"text{$.zebraColor}"
class=
"editTableInput"
/></td>
</tr>
<!--<tr>-->
<!--<td class="editTableTitle">序号:</td>-->
<!--<td class="editTableValue">-->
<!--<input type="radio" name="sequence" value="yes" text{($.sequence=='yes')?'checked':''}/>显示-->
<!--<input type="radio" name="sequence" value="no" text{($.sequence=='no')?'checked':''}/>不显示-->
<!--</td>-->
<!--<td class="editTableTitle">序号:</td>-->
<!--<td class="editTableValue">-->
<!--<input type="radio" name="sequence" value="yes" text{($.sequence=='yes')?'checked':''}/>显示-->
<!--<input type="radio" name="sequence" value="no" text{($.sequence=='no')?'checked':''}/>不显示-->
<!--</td>-->
<!--</tr>-->
</table>
...
...
o2web/source/x_component_process_Xform/DatagridMobile.js
浏览文件 @
de6b3a3c
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
MWF
.
xApplication
.
process
.
Xform
.
DatagridMobile
=
new
Class
({
Implements
:
[
Events
],
Extends
:
MWF
.
APP$Module
,
isEdit
:
false
,
Implements
:
[
Events
],
Extends
:
MWF
.
APP$Module
,
isEdit
:
false
,
options
:
{
"
moduleEvents
"
:
[
"
queryLoad
"
,
"
postLoad
"
,
"
load
"
,
"
completeLineEdit
"
,
"
addLine
"
,
"
deleteLine
"
,
"
afterDeleteLine
"
,
"
editLine
"
]
},
...
...
@@ -15,13 +15,13 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
this
.
field
=
true
;
},
_loadUserInterface
:
function
(){
_loadUserInterface
:
function
(){
this
.
fireEvent
(
"
queryLoad
"
);
this
.
editModules
=
[];
this
.
editModules
=
[];
this
.
node
.
setStyle
(
"
overflow-x
"
,
"
hidden
"
);
this
.
node
.
setStyle
(
"
overflow-y
"
,
"
hidden
"
);
this
.
table
=
this
.
node
.
getElement
(
"
table
"
);
this
.
table
=
this
.
node
.
getElement
(
"
table
"
);
this
.
createMobileTable
();
...
...
@@ -35,22 +35,22 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
this
.
gridData
=
this
.
_getValue
();
this
.
totalModules
=
[];
this
.
_loadDatagridTitleModules
();
this
.
_loadDatagridTitleModules
();
if
(
this
.
editable
!=
false
){
if
(
this
.
editable
!=
false
){
this
.
_loadDatagridDataModules
();
//this._addTitleActionColumn();
this
.
_loadEditDatagrid
();
//this._loadReadDatagrid();
this
.
_loadEditDatagrid
();
//this._loadReadDatagrid();
this
.
fireEvent
(
"
postLoad
"
);
this
.
fireEvent
(
"
load
"
);
}
else
{
}
else
{
this
.
_loadDatagridDataModules
();
this
.
_loadReadDatagrid
();
this
.
_loadReadDatagrid
();
this
.
fireEvent
(
"
postLoad
"
);
this
.
fireEvent
(
"
load
"
);
}
},
}
},
createMobileTable
:
function
(){
var
mobileTable
=
new
Element
(
"
table
"
).
inject
(
this
.
node
);
mobileTable
.
set
(
this
.
json
.
properties
);
...
...
@@ -80,87 +80,87 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
this
.
table
=
mobileTable
;
},
_loadStyles
:
function
(){
//this.table.setStyles(this.json.tableStyles);
_loadStyles
:
function
(){
//this.table.setStyles(this.json.tableStyles);
this
.
node
.
setStyles
(
this
.
json
.
styles
);
var
tables
=
this
.
node
.
getElements
(
"
table
"
);
tables
.
each
(
function
(
table
){
table
.
setStyles
(
this
.
json
.
tableStyles
);
}.
bind
(
this
));
},
_getValue
:
function
(){
var
value
=
[];
value
=
this
.
_getBusinessData
();
if
(
!
value
){
if
(
this
.
json
.
defaultData
&&
this
.
json
.
defaultData
.
code
)
value
=
this
.
form
.
Macro
.
exec
(
this
.
json
.
defaultData
.
code
,
this
);
},
_getValue
:
function
(){
var
value
=
[];
value
=
this
.
_getBusinessData
();
if
(
!
value
){
if
(
this
.
json
.
defaultData
&&
this
.
json
.
defaultData
.
code
)
value
=
this
.
form
.
Macro
.
exec
(
this
.
json
.
defaultData
.
code
,
this
);
value
=
{
"
data
"
:
value
||
[]};
}
return
value
||
[];
},
_getValueText
:
function
(
idx
,
value
){
var
module
=
this
.
editModules
[
idx
];
if
(
module
){
switch
(
module
.
json
.
type
){
case
"
Select
"
:
for
(
var
i
=
0
;
i
<
module
.
json
.
itemValues
.
length
;
i
++
){
var
itemv
=
module
.
json
.
itemValues
[
i
];
var
arr
=
itemv
.
split
(
/
\|
/
);
var
text
=
arr
[
0
];
var
v
=
(
arr
.
length
>
1
)
?
arr
[
1
]
:
arr
[
0
];
if
(
value
===
v
)
return
text
;
}
}
return
value
||
[];
},
_getValueText
:
function
(
idx
,
value
){
var
module
=
this
.
editModules
[
idx
];
if
(
module
){
switch
(
module
.
json
.
type
){
case
"
Select
"
:
for
(
var
i
=
0
;
i
<
module
.
json
.
itemValues
.
length
;
i
++
){
var
itemv
=
module
.
json
.
itemValues
[
i
];
var
arr
=
itemv
.
split
(
/
\|
/
);
var
text
=
arr
[
0
];
var
v
=
(
arr
.
length
>
1
)
?
arr
[
1
]
:
arr
[
0
];
if
(
value
===
v
)
return
text
;
}
// var ops = module.node.getElements("option");
// for (var i=0; i<ops.length; i++){
// if (ops[i].value == value){
// return ops[i].get("text");
// }
// }
break
;
case
"
Radio
"
:
var
ops
=
module
.
node
.
getElements
(
"
input
"
);
for
(
var
i
=
0
;
i
<
ops
.
length
;
i
++
){
if
(
ops
[
i
].
value
==
value
){
return
ops
[
i
].
get
(
"
showText
"
);
}
}
break
;
case
"
Checkbox
"
:
var
ops
=
module
.
node
.
getElements
(
"
input
"
);
var
texts
=
[];
for
(
var
i
=
0
;
i
<
ops
.
length
;
i
++
){
if
(
value
.
indexOf
(
ops
[
i
].
value
)
!=
-
1
)
texts
.
push
(
ops
[
i
].
get
(
"
showText
"
));
}
if
(
texts
.
length
)
return
texts
.
join
(
"
,
"
);
break
;
case
"
Orgfield
"
:
case
"
Personfield
"
:
case
"
Org
"
:
//var v = module.getTextData();
//return v.text[0];
if
(
typeOf
(
value
)
===
"
array
"
){
var
textArray
=
[];
value
.
each
(
function
(
item
){
if
(
typeOf
(
item
)
===
"
object
"
){
textArray
.
push
(
item
.
name
+
((
item
.
unitName
)
?
"
(
"
+
item
.
unitName
+
"
)
"
:
""
)
);
}
else
{
textArray
.
push
(
item
);
// var ops = module.node.getElements("option");
// for (var i=0; i<ops.length; i++){
// if (ops[i].value == value){
// return ops[i].get("text");
// }
// }
break
;
case
"
Radio
"
:
var
ops
=
module
.
node
.
getElements
(
"
input
"
);
for
(
var
i
=
0
;
i
<
ops
.
length
;
i
++
){
if
(
ops
[
i
].
value
==
value
){
return
ops
[
i
].
get
(
"
showText
"
);
}
}.
bind
(
this
));
return
textArray
.
join
(
"
,
"
);
}
else
if
(
typeOf
(
value
)
===
"
object
"
){
return
value
.
name
+
((
value
.
unitName
)
?
"
(
"
+
value
.
unitName
+
"
)
"
:
""
);
}
else
{
return
value
;
}
break
;
}
}
return
value
;
},
}
break
;
case
"
Checkbox
"
:
var
ops
=
module
.
node
.
getElements
(
"
input
"
);
var
texts
=
[];
for
(
var
i
=
0
;
i
<
ops
.
length
;
i
++
){
if
(
value
.
indexOf
(
ops
[
i
].
value
)
!=
-
1
)
texts
.
push
(
ops
[
i
].
get
(
"
showText
"
));
}
if
(
texts
.
length
)
return
texts
.
join
(
"
,
"
);
break
;
case
"
Orgfield
"
:
case
"
Personfield
"
:
case
"
Org
"
:
//var v = module.getTextData();
//return v.text[0];
if
(
typeOf
(
value
)
===
"
array
"
){
var
textArray
=
[];
value
.
each
(
function
(
item
){
if
(
typeOf
(
item
)
===
"
object
"
){
textArray
.
push
(
item
.
name
+
((
item
.
unitName
)
?
"
(
"
+
item
.
unitName
+
"
)
"
:
""
)
);
}
else
{
textArray
.
push
(
item
);
}
}.
bind
(
this
));
return
textArray
.
join
(
"
,
"
);
}
else
if
(
typeOf
(
value
)
===
"
object
"
){
return
value
.
name
+
((
value
.
unitName
)
?
"
(
"
+
value
.
unitName
+
"
)
"
:
""
);
}
else
{
return
value
;
}
break
;
}
}
return
value
;
},
editValidation
:
function
(){
var
flag
=
true
;
...
...
@@ -173,8 +173,8 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
return
flag
;
},
_loadReadDatagrid
:
function
(){
this
.
gridData
=
this
.
_getValue
();
_loadReadDatagrid
:
function
(){
this
.
gridData
=
this
.
_getValue
();
var
titleHeaders
=
this
.
table
.
getElements
(
"
th
"
);
var
tds
=
this
.
table
.
getElements
(
"
td
"
);
...
...
@@ -249,7 +249,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
}
//this._loadTotal();
},
},
_loadEditDatagrid
:
function
(){
//this._createHelpNode();
...
...
@@ -490,7 +490,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
this
.
validationMode
();
},
_loadAddAction
:
function
(){
if
(
!
this
.
addAction
){
if
(
!
this
.
addAction
){
this
.
addAction
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
form
.
css
.
gridMobileActionNode
}).
inject
(
this
.
node
,
"
top
"
);
this
.
addAction
.
set
(
"
text
"
,
MWF
.
xApplication
.
process
.
Xform
.
LP
.
addLine
);
this
.
addAction
.
addEvent
(
"
click
"
,
function
(){
...
...
@@ -917,9 +917,9 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
tableNode
.
setStyle
(
"
margin-right
"
,
""
+
width
+
"
px
"
);
},
_loadDatagridStyle
:
function
(){
//var ths = this.node.getElements("th");
//ths.setStyles(this.form.css.datagridTitle);
_loadDatagridStyle
:
function
(){
//var ths = this.node.getElements("th");
//ths.setStyles(this.form.css.datagridTitle);
this
.
loadGridTitleStyle
();
this
.
loadGridContentStyle
();
...
...
@@ -927,10 +927,10 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
this
.
loadGridEditStyle
();
this
.
_loadTotal
();
this
.
_loadBorderStyle
();
this
.
_loadZebraStyle
();
this
.
_loadBorderStyle
();
this
.
_loadZebraStyle
();
this
.
_loadSequence
();
},
},
loadGridEditStyle
:
function
(){
if
(
this
.
table
){
...
...
@@ -962,15 +962,15 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
tds
.
setStyles
(
this
.
json
.
contentStyles
);
}
},
_loadZebraStyle
:
function
(){
_loadZebraStyle
:
function
(){
if
(
this
.
json
.
zebraColor
||
this
.
json
.
backgroundColor
){
var
tables
=
this
.
node
.
getElements
(
"
table
"
);
tables
.
each
(
function
(
table
){
this
.
_loadTableZebraStyle
(
table
);
}.
bind
(
this
));
}
},
},
_loadTableZebraStyle
:
function
(
table
){
var
trs
=
table
.
getElements
(
"
tr
"
);
for
(
var
i
=
0
;
i
<
trs
.
length
;
i
++
){
...
...
@@ -1033,7 +1033,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
tr
=
this
.
totalTable
.
insertRow
(
i
);
var
datath
=
new
Element
(
"
th
"
).
inject
(
tr
);
datath
.
set
(
"
text
"
,
m
.
module
.
node
.
get
(
"
text
"
));
// datath.setStyle("width", "30%");
// datath.setStyle("width", "30%");
datath
.
setStyles
(
this
.
json
.
titleStyles
);
tr
.
insertCell
(
1
).
setStyles
(
this
.
json
.
amountStyles
).
set
(
"
text
"
,
totalResaults
[
i
]
||
""
);
}
else
{
...
...
@@ -1064,15 +1064,15 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
}.
bind
(
this
));
}.
bind
(
this
));
},
_loadBorderStyle
:
function
(){
if
(
this
.
json
.
border
){
_loadBorderStyle
:
function
(){
if
(
this
.
json
.
border
){
var
tables
=
this
.
node
.
getElements
(
"
table
"
);
tables
.
each
(
function
(
table
){
this
.
_loadTableBorderStyle
(
table
)
}.
bind
(
this
));
}
},
}
},
_loadTableBorderStyle
:
function
(
table
){
table
.
setStyles
({
"
border-top
"
:
this
.
json
.
border
,
...
...
@@ -1090,9 +1090,9 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
"
background
"
:
"
transparent
"
});
},
_loadDatagridTitleModules
:
function
(){
var
ths
=
this
.
node
.
getElements
(
"
th
"
);
ths
.
each
(
function
(
th
){
_loadDatagridTitleModules
:
function
(){
var
ths
=
this
.
node
.
getElements
(
"
th
"
);
ths
.
each
(
function
(
th
){
var
json
=
this
.
form
.
_getDomjson
(
th
);
th
.
store
(
"
dataGrid
"
,
this
);
if
(
json
){
...
...
@@ -1100,25 +1100,25 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
this
.
form
.
modules
.
push
(
module
);
}
}.
bind
(
this
));
},
_loadDatagridDataModules
:
function
(){
var
tds
=
this
.
node
.
getElements
(
"
td
"
);
tds
.
each
(
function
(
td
){
var
json
=
this
.
form
.
_getDomjson
(
td
);
td
.
store
(
"
dataGrid
"
,
this
);
if
(
json
){
var
module
=
this
.
form
.
_loadModule
(
json
,
td
,
function
(){
},
_loadDatagridDataModules
:
function
(){
var
tds
=
this
.
node
.
getElements
(
"
td
"
);
tds
.
each
(
function
(
td
){
var
json
=
this
.
form
.
_getDomjson
(
td
);
td
.
store
(
"
dataGrid
"
,
this
);
if
(
json
){
var
module
=
this
.
form
.
_loadModule
(
json
,
td
,
function
(){
this
.
field
=
false
;
});
td
.
store
(
"
module
"
,
module
);
this
.
form
.
modules
.
push
(
module
);
}
}.
bind
(
this
));
},
_afterLoaded
:
function
(){
this
.
_loadDatagridStyle
();
td
.
store
(
"
module
"
,
module
);
this
.
form
.
modules
.
push
(
module
);
}
}.
bind
(
this
));
},
_afterLoaded
:
function
(){
this
.
_loadDatagridStyle
();
if
(
this
.
table
)
this
.
table
.
setStyle
(
"
display
"
,
"
none
"
);
},
},
resetData
:
function
(){
this
.
setData
(
this
.
_getValue
());
},
...
...
@@ -1216,15 +1216,15 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
return
this
.
totalResaults
;
},
isEmpty
:
function
(){
var
data
=
this
.
getData
();
if
(
!
data
)
return
true
;
if
(
typeOf
(
data
)
===
"
object
"
){
if
(
typeOf
(
data
.
data
)
!==
"
array
"
)
return
true
;
if
(
data
.
data
.
length
===
0
)
return
true
;
var
data
=
this
.
getData
();
if
(
!
data
)
return
true
;
if
(
typeOf
(
data
)
===
"
object
"
){
if
(
typeOf
(
data
.
data
)
!==
"
array
"
)
return
true
;
if
(
data
.
data
.
length
===
0
)
return
true
;
}
return
false
;
return
false
;
},
getData
:
function
(){
getData
:
function
(){
if
(
this
.
editable
!=
false
){
if
(
this
.
isEdit
)
this
.
_completeLineEdit
();
var
data
=
[];
...
...
@@ -1247,7 +1247,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
}
else
{
return
this
.
_getBusinessData
();
}
},
},
getAmount
:
function
(){
return
this
.
_loadTotal
();
},
...
...
@@ -1400,12 +1400,12 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
}
return
true
;
}
});
MWF
.
xApplication
.
process
.
Xform
.
DatagridMobile$Title
=
new
Class
({
Extends
:
MWF
.
APP$Module
,
_afterLoaded
:
function
(){
Extends
:
MWF
.
APP$Module
,
_afterLoaded
:
function
(){
this
.
dataGrid
=
this
.
node
.
retrieve
(
"
dataGrid
"
);
if
((
this
.
json
.
total
==
"
number
"
)
||
(
this
.
json
.
total
==
"
count
"
)){
this
.
dataGrid
.
totalModules
.
push
({
...
...
@@ -1414,14 +1414,14 @@ MWF.xApplication.process.Xform.DatagridMobile$Title = new Class({
"
type
"
:
this
.
json
.
total
})
}
// this.form._loadModules(this.node);
}
// this.form._loadModules(this.node);
}
});
MWF
.
xApplication
.
process
.
Xform
.
DatagridMobile$Data
=
new
Class
({
Extends
:
MWF
.
APP$Module
,
_afterLoaded
:
function
(){
//this.form._loadModules(this.node);
this
.
dataGrid
=
this
.
node
.
retrieve
(
"
dataGrid
"
);
Extends
:
MWF
.
APP$Module
,
_afterLoaded
:
function
(){
//this.form._loadModules(this.node);
this
.
dataGrid
=
this
.
node
.
retrieve
(
"
dataGrid
"
);
var
td
=
this
.
node
;
if
(
this
.
json
.
cellType
==
"
sequence
"
){
...
...
@@ -1451,5 +1451,5 @@ MWF.xApplication.process.Xform.DatagridMobile$Data = new Class({
this
.
dataGrid
.
editModules
.
push
(
module
);
}.
bind
(
this
));
}
}
}
});
\ No newline at end of file
o2web/source/x_component_process_Xform/DatagridPC.js
浏览文件 @
de6b3a3c
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录