Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
3e09e4b6
o2oa
项目概览
fuyue82
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
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,发现更多精彩内容 >>
提交
3e09e4b6
编写于
3月 02, 2022
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
允许elementUI组件用于数据表格
上级
d384ddd0
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
168 addition
and
56 deletion
+168
-56
o2web/source/o2_core/polyfill.js
o2web/source/o2_core/polyfill.js
+8
-0
o2web/source/x_component_process_FormDesigner/Module/Datatable$Data.js
...x_component_process_FormDesigner/Module/Datatable$Data.js
+2
-1
o2web/source/x_component_process_FormDesigner/Module/Elcascader/elcascader.html
...nt_process_FormDesigner/Module/Elcascader/elcascader.html
+7
-0
o2web/source/x_component_process_FormDesigner/Module/Elselect/elselect.html
...ponent_process_FormDesigner/Module/Elselect/elselect.html
+8
-0
o2web/source/x_component_process_FormDesigner/Module/Elslider/elslider.html
...ponent_process_FormDesigner/Module/Elslider/elslider.html
+7
-0
o2web/source/x_component_process_FormDesigner/Module/Elswitch/elswitch.html
...ponent_process_FormDesigner/Module/Elswitch/elswitch.html
+7
-0
o2web/source/x_component_process_Xform/Elcascader.js
o2web/source/x_component_process_Xform/Elcascader.js
+51
-7
o2web/source/x_component_process_Xform/Elrate.js
o2web/source/x_component_process_Xform/Elrate.js
+5
-5
o2web/source/x_component_process_Xform/Elselect.js
o2web/source/x_component_process_Xform/Elselect.js
+49
-29
o2web/source/x_component_process_Xform/Elslider.js
o2web/source/x_component_process_Xform/Elslider.js
+9
-7
o2web/source/x_component_process_Xform/Elswitch.js
o2web/source/x_component_process_Xform/Elswitch.js
+15
-7
未找到文件。
o2web/source/o2_core/polyfill.js
浏览文件 @
3e09e4b6
...
...
@@ -62,3 +62,11 @@ if (!Array.prototype.findIndex) {
}
});
}
if
(
!
String
.
prototype
.
startsWith
)
{
Object
.
defineProperty
(
String
.
prototype
,
'
startsWith
'
,
{
value
:
function
(
search
,
pos
)
{
pos
=
!
pos
||
pos
<
0
?
0
:
+
pos
;
return
this
.
substring
(
pos
,
pos
+
search
.
length
)
===
search
;
}
});
}
\ No newline at end of file
o2web/source/x_component_process_FormDesigner/Module/Datatable$Data.js
浏览文件 @
3e09e4b6
...
...
@@ -22,7 +22,8 @@ MWF.xApplication.process.FormDesigner.Module.Datatable$Data = MWF.FCDatatable$Da
}
],
"
allowModules
"
:
[
"
textfield
"
,
"
number
"
,
"
personfield
"
,
"
orgfield
"
,
"
org
"
,
"
calendar
"
,
"
textarea
"
,
"
select
"
,
"
radio
"
,
"
checkbox
"
,
"
combox
"
,
"
image
"
,
"
label
"
,
"
htmleditor
"
,
"
tinymceeditor
"
,
"
button
"
,
"
imageclipper
"
,
"
address
"
,
"
attachment
"
,
"
elinput
"
,
"
elcheckbox
"
,
"
elselect
"
]
"
htmleditor
"
,
"
tinymceeditor
"
,
"
button
"
,
"
imageclipper
"
,
"
address
"
,
"
attachment
"
,
"
elinput
"
,
"
elcheckbox
"
,
"
elselect
"
,
"
elautocomplete
"
,
"
elnumber
"
,
"
elradio
"
,
"
elcascader
"
,
"
elswitch
"
,
"
elslider
"
,
"
eltime
"
,
"
eldate
"
,
"
eldatetime
"
,
"
elrate
"
]
},
initialize
:
function
(
form
,
options
){
...
...
o2web/source/x_component_process_FormDesigner/Module/Elcascader/elcascader.html
浏览文件 @
3e09e4b6
...
...
@@ -20,6 +20,13 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.el_disabled}}:
</td>
<td
class=
"editTableValue"
>
<input
type=
"radio"
name=
"disabled"
value=
"true"
text
{($.
disabled
)?'
checked
'
:
''}
/>
{{$.lp.yes}}
<input
type=
"radio"
name=
"disabled"
value=
"false"
text
{(!$.
disabled
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
</table>
<div
style=
"text-align: center; height:24px; padding-left: 5px; line-height: 24px; background-color: #EEE; border-bottom: 1px solid #ccc; border-top: 1px solid #999;font-weight:bold;"
>
{{$.lp.options}}
</div>
<div
style=
"border-bottom: 1px solid #cccccc"
>
...
...
o2web/source/x_component_process_FormDesigner/Module/Elselect/elselect.html
浏览文件 @
3e09e4b6
...
...
@@ -20,6 +20,14 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.el_disabled}}:
</td>
<td
class=
"editTableValue"
>
<input
type=
"radio"
name=
"disabled"
value=
"true"
text
{($.
disabled
)?'
checked
'
:
''}
/>
{{$.lp.yes}}
<input
type=
"radio"
name=
"disabled"
value=
"false"
text
{(!$.
disabled
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
</table>
<div
style=
"text-align: center; height:24px; padding-left: 5px; line-height: 24px; background-color: #EEE; border-bottom: 1px solid #ccc; border-top: 1px solid #999;font-weight:bold;"
>
{{$.lp.options}}
</div>
<table
width=
"100%"
border=
"0"
cellpadding=
"5"
cellspacing=
"0"
class=
"editTable"
>
...
...
o2web/source/x_component_process_FormDesigner/Module/Elslider/elslider.html
浏览文件 @
3e09e4b6
...
...
@@ -20,6 +20,13 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.el_disabled}}:
</td>
<td
class=
"editTableValue"
>
<input
type=
"radio"
name=
"disabled"
value=
"true"
text
{($.
disabled
)?'
checked
'
:
''}
/>
{{$.lp.yes}}
<input
type=
"radio"
name=
"disabled"
value=
"false"
text
{(!$.
disabled
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
</table>
<table
width=
"100%"
border=
"0"
cellpadding=
"5"
cellspacing=
"0"
class=
"editTable"
>
...
...
o2web/source/x_component_process_FormDesigner/Module/Elswitch/elswitch.html
浏览文件 @
3e09e4b6
...
...
@@ -20,6 +20,13 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.el_disabled}}:
</td>
<td
class=
"editTableValue"
>
<input
type=
"radio"
name=
"disabled"
value=
"true"
text
{($.
disabled
)?'
checked
'
:
''}
/>
{{$.lp.yes}}
<input
type=
"radio"
name=
"disabled"
value=
"false"
text
{(!$.
disabled
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
</table>
<table
width=
"100%"
border=
"0"
cellpadding=
"5"
cellspacing=
"0"
class=
"editTable"
>
...
...
o2web/source/x_component_process_Xform/Elcascader.js
浏览文件 @
3e09e4b6
...
...
@@ -57,10 +57,10 @@ MWF.xApplication.process.Xform.Elcascader = MWF.APPElcascader = new Class(
*/
"
elEvents
"
:
[
"
focus
"
,
"
blur
"
,
"
change
"
,
"
visible-change
"
,
"
remove-tag
"
,
"
expand-change
"
,
"
before-filter
"
]
},
_loadNode
:
function
(){
if
(
this
.
isReadonly
())
this
.
json
.
disabled
=
true
;
this
.
_loadNodeEdit
();
},
//
_loadNode: function(){
//
if (this.isReadonly()) this.json.disabled = true;
//
this._loadNodeEdit();
//
},
_appendVueData
:
function
(){
this
.
form
.
Macro
.
environment
.
data
.
check
(
this
.
json
.
id
);
this
.
json
[
this
.
json
.
id
]
=
this
.
_getBusinessData
();
...
...
@@ -90,7 +90,8 @@ MWF.xApplication.process.Xform.Elcascader = MWF.APPElcascader = new Class(
this
.
_loadOptions
();
if
(
this
.
json
.
props
.
multiple
===
true
)
if
(
!
this
.
json
[
this
.
json
.
id
]
||
!
this
.
json
[
this
.
json
.
id
].
length
)
this
.
json
[
this
.
json
.
id
]
=
[];
//if (this.json.props.multiple===true) if (!this.json[this.json.id] || !this.json[this.json.id].length) this.json[this.json.id] = [];
if
(
this
.
json
.
props
.
multiple
===
true
)
if
(
!
this
.
json
[
this
.
json
.
$id
]
||
!
this
.
json
[
this
.
json
.
$id
].
length
)
this
.
json
[
this
.
json
.
$id
]
=
[];
},
appendVueMethods
:
function
(
methods
){
if
(
this
.
json
.
filterMethod
&&
this
.
json
.
filterMethod
.
code
){
...
...
@@ -144,7 +145,7 @@ MWF.xApplication.process.Xform.Elcascader = MWF.APPElcascader = new Class(
if
(
!
this
.
json
.
props
)
this
.
json
.
props
=
{};
var
html
=
"
<el-cascader
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
id
+
"
\"
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
$
id
+
"
\"
"
;
html
+=
"
:clearable=
\"
clearable
\"
"
;
html
+=
"
:size=
\"
size
\"
"
;
html
+=
"
:filterable=
\"
filterable
\"
"
;
...
...
@@ -182,8 +183,51 @@ MWF.xApplication.process.Xform.Elcascader = MWF.APPElcascader = new Class(
html
+=
"
</el-cascader >
"
;
return
html
;
},
__setReadonly
:
function
(
data
){},
//
__setReadonly: function(data){},
getCheckedNodes
:
function
(
leafOnly
){
return
(
this
.
vm
)
?
this
.
vm
.
getCheckedNodes
(
leafOnly
)
:
null
;
},
__setReadonly
:
function
(
data
){
if
(
this
.
isReadonly
()){
this
.
_loadOptions
();
Promise
.
resolve
(
this
.
json
.
options
).
then
(
function
(
options
){
if
(
data
){
var
text
=
this
.
__getOptionsText
(
options
,
data
);
this
.
node
.
set
(
"
text
"
,
text
);
}
}.
bind
(
this
));
}
},
__getOptionsText
:
function
(
options
,
values
){
debugger
;
if
(
!!
this
.
json
.
props
.
multiple
){
var
text
=
[];
values
.
forEach
(
function
(
v
){
text
=
text
.
concat
(
this
.
__getOptionsTextValue
(
options
,
v
));
}.
bind
(
this
));
return
text
.
join
(
"
,
"
)
}
else
{
return
this
.
__getOptionsTextValue
(
options
,
values
).
join
(
"
,
"
);
}
},
__getOptionsTextValue
:
function
(
options
,
values
,
prefix
,
prefixLabel
){
var
text
=
[];
var
v
=
values
.
join
(
"
/
"
);
options
.
forEach
(
function
(
op
){
var
opValue
=
(
prefix
)
?
prefix
+
"
/
"
+
op
[
this
.
json
.
props
.
value
]
:
op
[
this
.
json
.
props
.
value
];
var
opLabel
=
(
prefixLabel
)
?
prefixLabel
+
"
/
"
+
op
[
this
.
json
.
props
.
label
]
:
op
[
this
.
json
.
props
.
label
];
if
(
opValue
==
v
)
{
text
.
push
(
opLabel
);
}
else
if
(
v
.
startsWith
(
opValue
)
&&
op
[
this
.
json
.
props
.
children
]
&&
op
[
this
.
json
.
props
.
children
].
length
){
text
=
text
.
concat
(
this
.
__getOptionsTextValue
(
op
[
this
.
json
.
props
.
children
],
values
,
opValue
,
opLabel
));
}
}.
bind
(
this
));
if
(
!
this
.
json
.
showAllLevels
){
return
text
.
map
(
function
(
t
){
return
t
.
substring
(
t
.
indexOf
(
"
/
"
)
+
1
,
t
.
length
);
});
}
else
{
return
text
;
}
}
});
o2web/source/x_component_process_Xform/Elrate.js
浏览文件 @
3e09e4b6
...
...
@@ -27,11 +27,11 @@ MWF.xApplication.process.Xform.Elrate = MWF.APPElrate = new Class(
*/
"
elEvents
"
:
[
"
change
"
]
},
_loadNode
:
function
(){
debugger
;
if
(
this
.
isReadonly
())
this
.
json
.
disabled
=
true
;
this
.
_loadNodeEdit
();
},
//
_loadNode: function(){
//
debugger;
//
if (this.isReadonly()) this.json.disabled = true;
//
this._loadNodeEdit();
//
},
_appendVueData
:
function
(){
if
(
!
this
.
json
.
max
)
this
.
json
.
max
=
""
;
if
(
!
this
.
json
.
isReadonly
)
this
.
json
.
isReadonly
=
false
;
...
...
o2web/source/x_component_process_Xform/Elselect.js
浏览文件 @
3e09e4b6
...
...
@@ -52,10 +52,10 @@ MWF.xApplication.process.Xform.Elselect = MWF.APPElselect = new Class(
*/
"
elEvents
"
:
[
"
focus
"
,
"
blur
"
,
"
change
"
,
"
visible-change
"
,
"
remove-tag
"
,
"
clear
"
]
},
_loadNode
:
function
(){
if
(
this
.
isReadonly
())
this
.
json
.
disabled
=
true
;
this
.
_loadNodeEdit
();
},
//
_loadNode: function(){
//
if (this.isReadonly()) this.json.disabled = true;
//
this._loadNodeEdit();
//
},
_appendVueData
:
function
(){
// this.form.Macro.environment.data.check(this.json.id);
// this.json[this.json.id] = this._getBusinessData();
...
...
@@ -216,32 +216,52 @@ MWF.xApplication.process.Xform.Elselect = MWF.APPElselect = new Class(
html
+=
"
</el-select>
"
;
return
html
;
},
_afterLoaded
:
function
(){
// _afterLoaded: function(){
// if (this.isReadonly()){
// this.node.hide();
// window.setTimeout(function(){
// var text = "";
// var nodes = this.node.getElements(".el-select__tags-text");
// if (nodes && nodes.length){
// nodes.forEach(function(n){
// text += ((text) ? ", " : "")+n.get("text");
// });
// }
// var node = new Element("div").inject(this.node, "before");
// this.node.destroy();
// this.node = node;
// this.node.set({
// "nodeId": this.json.id,
// "MWFType": this.json.type
// });
// this._loadDomEvents();
// //this.node.removeEvents("click");
// //this.node.empty();
// this.node.set("text", text);
// //this.node.show();
// }.bind(this), 20);
//
// }
// },
__setReadonly
:
function
(
data
){
if
(
this
.
isReadonly
()){
this
.
node
.
hide
();
window
.
setTimeout
(
function
(){
var
text
=
""
;
var
nodes
=
this
.
node
.
getElements
(
"
.el-select__tags-text
"
);
if
(
nodes
&&
nodes
.
length
){
nodes
.
forEach
(
function
(
n
){
text
+=
((
text
)
?
"
,
"
:
""
)
+
n
.
get
(
"
text
"
);
});
}
var
node
=
new
Element
(
"
div
"
).
inject
(
this
.
node
,
"
before
"
);
this
.
node
.
destroy
();
this
.
node
=
node
;
this
.
node
.
set
({
"
nodeId
"
:
this
.
json
.
id
,
"
MWFType
"
:
this
.
json
.
type
});
this
.
_loadDomEvents
();
//this.node.removeEvents("click");
//this.node.empty();
this
.
node
.
set
(
"
text
"
,
text
);
//this.node.show();
}.
bind
(
this
),
20
);
this
.
_loadOptions
();
Promise
.
resolve
(
this
.
json
.
options
).
then
(
function
(
options
){
var
values
=
(
o2
.
typeOf
(
data
)
!==
"
array
"
)
?
[
data
]
:
data
;
var
text
=
this
.
__getOptionsText
(
options
,
values
);
this
.
node
.
set
(
"
text
"
,
text
.
join
(
"
,
"
));
}.
bind
(
this
));
}
},
__setReadonly
:
function
(
data
){}
__getOptionsText
:
function
(
options
,
values
){
var
text
=
[];
options
.
forEach
(
function
(
op
){
if
(
op
.
value
){
if
(
values
.
indexOf
(
op
.
value
)
!=-
1
)
text
.
push
(
op
.
label
||
op
.
value
);
}
else
if
(
op
.
options
&&
op
.
options
.
length
){
text
=
text
.
concat
(
this
.
__getOptionsText
(
op
.
options
,
values
));
}
}.
bind
(
this
));
return
text
;
}
});
o2web/source/x_component_process_Xform/Elslider.js
浏览文件 @
3e09e4b6
...
...
@@ -43,10 +43,10 @@ MWF.xApplication.process.Xform.Elslider = MWF.APPElslider = new Class(
* //通过json对象操作Element组件
* json.disabled = true; //设置输入框为禁用
*/
_loadNode
:
function
(){
if
(
this
.
isReadonly
())
this
.
json
.
disabled
=
true
;
this
.
_loadNodeEdit
();
},
//
_loadNode: function(){
//
if (this.isReadonly()) this.json.disabled = true;
//
this._loadNodeEdit();
//
},
_appendVueData
:
function
(){
this
.
form
.
Macro
.
environment
.
data
.
check
(
this
.
json
.
id
);
this
.
json
[
this
.
json
.
id
]
=
this
.
_getBusinessData
();
...
...
@@ -97,7 +97,7 @@ MWF.xApplication.process.Xform.Elslider = MWF.APPElslider = new Class(
},
_createElementHtml
:
function
(){
var
html
=
"
<el-slider
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
id
+
"
\"
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
$
id
+
"
\"
"
;
html
+=
"
:max=
\"
max
\"
"
;
html
+=
"
:min=
\"
min
\"
"
;
html
+=
"
:step=
\"
step
\"
"
;
...
...
@@ -140,6 +140,8 @@ MWF.xApplication.process.Xform.Elslider = MWF.APPElslider = new Class(
html
+=
"
>
"
;
html
+=
"
</el-slider>
"
;
return
html
;
},
__setReadonly
:
function
(
data
){}
}
// __setReadonly: function(data){
//
// }
});
o2web/source/x_component_process_Xform/Elswitch.js
浏览文件 @
3e09e4b6
...
...
@@ -38,11 +38,11 @@ MWF.xApplication.process.Xform.Elswitch = MWF.APPElswitch = new Class(
* //通过json对象操作Element组件
* json.disabled = true; //设置输入框为禁用
*/
_loadNode
:
function
(){
debugger
;
if
(
this
.
isReadonly
())
this
.
json
.
disabled
=
true
;
this
.
_loadNodeEdit
();
},
//
_loadNode: function(){
//
debugger;
//
if (this.isReadonly()) this.json.disabled = true;
//
this._loadNodeEdit();
//
},
_appendVueData
:
function
(){
debugger
;
this
.
form
.
Macro
.
environment
.
data
.
check
(
this
.
json
.
id
);
...
...
@@ -94,7 +94,7 @@ MWF.xApplication.process.Xform.Elswitch = MWF.APPElswitch = new Class(
// },
_createElementHtml
:
function
(){
var
html
=
"
<el-switch
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
id
+
"
\"
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
$
id
+
"
\"
"
;
html
+=
"
:width=
\"
width
\"
"
;
html
+=
"
:active-text=
\"
activeText
\"
"
;
html
+=
"
:inactive-text=
\"
inactiveText
\"
"
;
...
...
@@ -133,5 +133,13 @@ MWF.xApplication.process.Xform.Elswitch = MWF.APPElswitch = new Class(
html
+=
"
</el-switch>
"
;
return
html
;
},
__setReadonly
:
function
(
data
){}
__setReadonly
:
function
(
data
){
if
(
this
.
isReadonly
()){
if
(
data
===
""
||
data
){
this
.
node
.
set
(
"
text
"
,
(
this
.
json
.
activeText
||
"
true
"
));
}
else
{
this
.
node
.
set
(
"
text
"
,
(
this
.
json
.
inactiveText
||
"
false
"
));
}
}
}
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录