Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
32da45e0
o2oa
项目概览
weixin_42566577
/
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,发现更多精彩内容 >>
提交
32da45e0
编写于
9月 11, 2021
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
elementUI组件支持数据模板
上级
4c3aa92a
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
144 addition
and
159 deletion
+144
-159
o2web/source/x_component_process_FormDesigner/Module/$ElElement.js
...rce/x_component_process_FormDesigner/Module/$ElElement.js
+1
-0
o2web/source/x_component_process_Xform/$ElModule.js
o2web/source/x_component_process_Xform/$ElModule.js
+24
-15
o2web/source/x_component_process_Xform/$Elinput.js
o2web/source/x_component_process_Xform/$Elinput.js
+16
-5
o2web/source/x_component_process_Xform/$Module.js
o2web/source/x_component_process_Xform/$Module.js
+12
-15
o2web/source/x_component_process_Xform/Elcascader.js
o2web/source/x_component_process_Xform/Elcascader.js
+1
-17
o2web/source/x_component_process_Xform/Elcheckbox.js
o2web/source/x_component_process_Xform/Elcheckbox.js
+18
-8
o2web/source/x_component_process_Xform/Elcommon.js
o2web/source/x_component_process_Xform/Elcommon.js
+47
-17
o2web/source/x_component_process_Xform/Elinput.js
o2web/source/x_component_process_Xform/Elinput.js
+1
-28
o2web/source/x_component_process_Xform/Elradio.js
o2web/source/x_component_process_Xform/Elradio.js
+19
-7
o2web/source/x_component_process_Xform/Elselect.js
o2web/source/x_component_process_Xform/Elselect.js
+1
-17
o2web/source/x_component_process_Xform/Elslider.js
o2web/source/x_component_process_Xform/Elslider.js
+1
-15
o2web/source/x_component_process_Xform/Elswitch.js
o2web/source/x_component_process_Xform/Elswitch.js
+1
-15
o2web/source/x_component_process_Xform/Form.js
o2web/source/x_component_process_Xform/Form.js
+2
-0
未找到文件。
o2web/source/x_component_process_FormDesigner/Module/$ElElement.js
浏览文件 @
32da45e0
...
...
@@ -202,6 +202,7 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new
case
"
name
"
:
this
.
setPropertyName
();
break
;
case
"
id
"
:
this
.
setPropertyId
();
break
;
case
"
buttonRadio
"
:
case
"
vueSlot
"
:
if
(
this
.
isPropertyLoaded
)
if
(
this
.
vm
)
this
.
resetElement
();
break
;
default
:
;
}
...
...
o2web/source/x_component_process_Xform/$ElModule.js
浏览文件 @
32da45e0
...
...
@@ -47,16 +47,20 @@ o2.xApplication.process.Xform.$ElModule = MWF.APP$ElModule = new Class(
this
.
_loadUserInterface
();
}
},
_checkVmodel
:
function
(){
var
nodes
=
this
.
node
.
querySelectorAll
(
"
*[v-model]
"
);
this
.
vModels
=
[];
nodes
.
forEach
(
function
(
node
){
var
model
=
node
.
get
(
"
v-model
"
);
if
(
model
){
this
.
form
.
Macro
.
environment
.
data
.
check
(
model
);
this
.
vModels
.
push
(
model
);
_checkVmodel
:
function
(
text
){
if
(
text
){
this
.
vModels
=
[];
var
reg
=
/
(?:
v-model
)(?:
.lazy|.number|.trim
)?(?:\s
*=
\s
*
)(?:[
"'
])?([^
"'
]
*
)
/g
;
var
arr
;
while
((
arr
=
reg
.
exec
(
text
))
!==
null
)
{
if
(
arr
.
length
>
1
&&
arr
[
1
]){
var
modelId
=
this
.
json
.
id
.
substring
(
0
,
this
.
json
.
id
.
lastIndexOf
(
"
..
"
));
modelId
=
(
modelId
)
?
modelId
+
"
..
"
+
arr
[
1
]
:
arr
[
1
];
this
.
json
[
arr
[
1
]]
=
this
.
getBusinessDataById
(
null
,
modelId
);
this
.
vModels
.
push
(
arr
[
1
]);
}
}
}
.
bind
(
this
));
}
},
_loadUserInterface
:
function
(){
...
...
@@ -73,6 +77,7 @@ o2.xApplication.process.Xform.$ElModule = MWF.APP$ElModule = new Class(
this
.
_createVueApp
();
},
_createVueApp
:
function
(){
if
(
this
.
json
.
vueSlot
)
this
.
_checkVmodel
(
this
.
json
.
vueSlot
);
if
(
!
this
.
vm
)
this
.
_loadVue
(
this
.
_mountVueApp
.
bind
(
this
));
},
...
...
@@ -111,20 +116,22 @@ o2.xApplication.process.Xform.$ElModule = MWF.APP$ElModule = new Class(
},
appendVueWatch
:
function
(
app
){
if
(
this
.
vModels
&&
this
.
vModels
.
length
){
app
.
watch
=
{};
app
.
watch
=
app
.
watch
||
{};
this
.
vModels
.
forEach
(
function
(
m
){
app
.
watch
[
m
]
=
function
(
val
,
oldVal
){
var
modelId
=
this
.
json
.
id
.
substring
(
0
,
this
.
json
.
id
.
lastIndexOf
(
"
..
"
));
modelId
=
(
modelId
)
?
modelId
+
"
..
"
+
m
:
m
;
this
.
setBusinessDataById
(
val
,
modelId
);
}.
bind
(
this
);
}.
bind
(
this
));
}
},
appendVueMethods
:
function
(
methods
){},
appendVueExtend
:
function
(
app
){
if
(
!
app
.
methods
)
app
.
methods
=
{};
this
.
options
.
elEvents
.
forEach
(
function
(
k
){
this
.
_createEventFunction
(
app
,
k
);
}.
bind
(
this
));
//
if (!app.methods) app.methods = {};
//
this.options.elEvents.forEach(function(k){
//
this._createEventFunction(app, k);
//
}.bind(this));
},
appendVueEvents
:
function
(
methods
){
this
.
options
.
elEvents
.
forEach
(
function
(
k
){
...
...
@@ -159,6 +166,8 @@ o2.xApplication.process.Xform.$ElModule = MWF.APP$ElModule = new Class(
var
d
=
this
.
form
.
Macro
.
exec
(
this
.
json
.
vueData
.
code
,
this
);
this
.
json
=
Object
.
merge
(
d
,
this
.
json
);
}
if
(
this
.
json
.
$id
===
this
.
json
.
id
)
this
.
form
.
Macro
.
environment
.
data
.
check
(
this
.
json
.
$id
);
this
.
json
[
this
.
json
.
$id
]
=
this
.
_getBusinessData
();
this
.
_appendVueData
();
return
this
.
json
;
},
...
...
o2web/source/x_component_process_Xform/$Elinput.js
浏览文件 @
32da45e0
...
...
@@ -11,24 +11,35 @@ Object.assign(o2.APP$Elinput.prototype, {
__setValue
:
function
(
value
){
this
.
moduleValueAG
=
null
;
this
.
_setBusinessData
(
value
);
this
.
json
[
this
.
json
.
id
]
=
value
;
if
(
this
.
readonly
||
this
.
json
.
isReadonly
)
this
.
node
.
set
(
"
text
"
,
value
);
this
.
json
[
this
.
json
.
$
id
]
=
value
;
this
.
__setReadonly
(
value
);
this
.
fieldModuleLoaded
=
true
;
return
value
;
},
__setData
:
function
(
data
){
var
old
=
this
.
getInputData
();
this
.
_setBusinessData
(
data
);
this
.
json
[
this
.
json
.
id
]
=
data
;
if
(
this
.
readonly
||
this
.
json
.
isReadonly
)
this
.
node
.
set
(
"
text
"
,
value
);
this
.
json
[
this
.
json
.
$
id
]
=
data
;
this
.
__setReadonly
(
data
);
if
(
old
!==
data
)
this
.
fireEvent
(
"
change
"
);
this
.
moduleValueAG
=
null
;
this
.
validationMode
();
},
__setReadonly
:
function
(
data
){
if
(
this
.
readonly
||
this
.
json
.
isReadonly
)
this
.
node
.
set
(
"
text
"
,
data
);
},
getInputData
:
function
(){
return
this
.
json
[
this
.
json
.
id
];
return
this
.
json
[
this
.
json
.
$
id
];
},
// _getVueModelBindId: function(){
// if (this.json.id.indexOf("..")!==-1){
// this.json["$id"] ="__"+this.json.id.replace(/\.\./g, "_")
// }else{
// this.json["$id"] = this.json.id;
// }
// },
_loadNodeEdit
:
function
(){
this
.
json
[
"
$id
"
]
=
(
this
.
json
.
id
.
indexOf
(
"
..
"
)
!==-
1
)
?
this
.
json
.
id
.
replace
(
/
\.\.
/g
,
"
_
"
)
:
this
.
json
.
id
;
this
.
node
.
appendHTML
(
this
.
_createElementHtml
(),
"
before
"
);
var
input
=
this
.
node
.
getPrevious
();
...
...
o2web/source/x_component_process_Xform/$Module.js
浏览文件 @
32da45e0
...
...
@@ -12,6 +12,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
/**
* 组件加载前触发。当前组件的queryLoad事件运行时还没有在form里注册,通过this.form.get("fieldId")不能获取到当前组件,需要用this.target获取。
* @event MWF.xApplication.process.Xform.$Module#queryLoad
* @event MWF.xApplication.process.Xform.$Module#queryLoad
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
...
...
@@ -449,18 +450,16 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
if
(
evdata
)
evdata
.
check
(
key
,
v
);
}
},
getBusinessDataById
:
function
(
d
){
getBusinessDataById
:
function
(
d
,
id
){
var
data
=
d
||
this
.
form
.
businessData
.
data
;
//var evdata = this.form.Macro.environment.data
;
var
thisId
=
id
||
this
.
json
.
id
;
//对id类似于 xx..0..xx 的字段进行拆分
if
(
this
.
json
.
id
.
indexOf
(
"
..
"
)
<
1
){
//if (!data.hasOwnProperty(this.json.id)) evdata.add(this.json.id, data[this.json.id]||"");
return
data
[
this
.
json
.
id
];
if
(
thisId
.
indexOf
(
"
..
"
)
<
1
){
return
data
[
thisId
];
}
else
{
var
idList
=
this
.
json
.
i
d
.
split
(
"
..
"
);
var
idList
=
this
I
d
.
split
(
"
..
"
);
idList
=
idList
.
map
(
function
(
d
){
return
d
.
test
(
/^
\d
+$/
)
?
d
.
toInt
()
:
d
;
});
//var data = this.form.businessData.data;
var
lastIndex
=
idList
.
length
-
1
;
for
(
var
i
=
0
;
i
<=
lastIndex
;
i
++
){
...
...
@@ -468,11 +467,8 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
if
(
!
id
&&
id
!==
0
)
return
null
;
if
(
[
"
object
"
,
"
array
"
].
contains
(
o2
.
typeOf
(
data
))
){
if
(
i
===
lastIndex
){
//if (!data.hasOwnProperty(id)) evdata.add(id, data[id]||"");
return
data
[
id
];
}
else
{
//if (!data.hasOwnProperty(id)) evdata.add(id, {});
//evdata = evdata[id];
data
=
data
[
id
];
}
}
else
{
...
...
@@ -490,17 +486,18 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
evdata
.
check
(
id
,
v
);
}
},
setBusinessDataById
:
function
(
v
){
setBusinessDataById
:
function
(
v
,
id
){
debugger
;
//对id类似于 xx..0..xx 的字段进行拆分
var
evdata
=
this
.
form
.
Macro
.
environment
.
data
;
var
data
=
this
.
form
.
businessData
.
data
;
if
(
this
.
json
.
id
.
indexOf
(
"
..
"
)
<
1
){
data
[
this
.
json
.
id
]
=
v
;
this
.
_checkEvdata
(
evdata
,
this
.
json
.
id
,
v
);
var
thisId
=
id
||
this
.
json
.
id
;
if
(
thisId
.
indexOf
(
"
..
"
)
<
1
){
data
[
thisId
]
=
v
;
this
.
_checkEvdata
(
evdata
,
thisId
,
v
);
//this.form.businessData.data[this.json.id] = v;
}
else
{
var
idList
=
this
.
json
.
i
d
.
split
(
"
..
"
);
var
idList
=
this
I
d
.
split
(
"
..
"
);
idList
=
idList
.
map
(
function
(
d
){
return
d
.
test
(
/^
\d
+$/
)
?
d
.
toInt
()
:
d
;
});
//var data = this.form.businessData.data;
...
...
o2web/source/x_component_process_Xform/Elcascader.js
浏览文件 @
32da45e0
...
...
@@ -139,23 +139,7 @@ MWF.xApplication.process.Xform.Elcascader = MWF.APPElcascader = new Class(
html
+=
"
</el-cascader >
"
;
return
html
;
},
__setValue
:
function
(
value
){
this
.
moduleValueAG
=
null
;
this
.
_setBusinessData
(
value
);
this
.
json
[
this
.
json
.
id
]
=
value
;
//if (this.readonly || this.json.isReadonly) this.node.set("text", value);
this
.
fieldModuleLoaded
=
true
;
return
value
;
},
__setData
:
function
(
data
){
var
old
=
this
.
getInputData
();
this
.
_setBusinessData
(
data
);
this
.
json
[
this
.
json
.
id
]
=
data
;
//if (this.readonly || this.json.isReadonly) this.node.set("text", value);
if
(
old
!==
data
)
this
.
fireEvent
(
"
change
"
);
this
.
moduleValueAG
=
null
;
this
.
validationMode
();
},
__setReadonly
:
function
(
data
){},
getCheckedNodes
:
function
(
leafOnly
){
return
(
this
.
vm
)
?
this
.
vm
.
getCheckedNodes
(
leafOnly
)
:
null
;
}
...
...
o2web/source/x_component_process_Xform/Elcheckbox.js
浏览文件 @
32da45e0
...
...
@@ -113,8 +113,9 @@ MWF.xApplication.process.Xform.Elcheckbox = MWF.APPElcheckbox = new Class(
_createElementHtml
:
function
(
radioValues
){
debugger
;
this
.
json
[
"
$id
"
]
=
(
this
.
json
.
id
.
indexOf
(
"
..
"
)
!==-
1
)
?
this
.
json
.
id
.
replace
(
/
\.\.
/g
,
"
_
"
)
:
this
.
json
.
id
;
var
html
=
"
<el-checkbox-group class='o2_vue' style='box-sizing: border-box!important'
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
id
+
"
\"
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
$
id
+
"
\"
"
;
html
+=
"
:text-color=
\"
textColor
\"
"
;
html
+=
"
:fill=
\"
fillColor
\"
"
;
html
+=
"
:size=
\"
size
\"
"
;
...
...
@@ -196,11 +197,11 @@ MWF.xApplication.process.Xform.Elcheckbox = MWF.APPElcheckbox = new Class(
},
__setValue
:
function
(
value
){
this
.
_setBusinessData
(
value
);
this
.
json
[
this
.
json
.
id
]
=
(
value
)
?
value
:
[];
this
.
json
[
this
.
json
.
$
id
]
=
(
value
)
?
value
:
[];
},
__setData
:
function
(
data
){
this
.
_setBusinessData
(
data
);
this
.
json
[
this
.
json
.
id
]
=
data
;
this
.
json
[
this
.
json
.
$
id
]
=
data
;
this
.
validationMode
();
this
.
fireEvent
(
"
setData
"
);
},
...
...
@@ -256,9 +257,9 @@ MWF.xApplication.process.Xform.Elcheckbox = MWF.APPElcheckbox = new Class(
};
},
_createVueData
:
function
(){
this
.
form
.
Macro
.
environment
.
data
.
check
(
this
.
json
.
id
);
this
.
json
[
this
.
json
.
id
]
=
this
.
_getBusinessData
();
if
(
!
this
.
json
[
this
.
json
.
id
]
||
!
this
.
json
[
this
.
json
.
id
].
length
)
this
.
json
[
this
.
json
.
id
]
=
[];
if
(
this
.
json
.
$id
===
this
.
json
.
id
)
this
.
form
.
Macro
.
environment
.
data
.
check
(
this
.
json
.
$
id
);
this
.
json
[
this
.
json
.
$
id
]
=
this
.
_getBusinessData
();
if
(
!
this
.
json
[
this
.
json
.
$id
]
||
!
this
.
json
[
this
.
json
.
$id
].
length
)
this
.
json
[
this
.
json
.
$
id
]
=
[];
if
(
this
.
json
.
vueData
&&
this
.
json
.
vueData
.
code
){
var
d
=
this
.
form
.
Macro
.
exec
(
this
.
json
.
vueData
.
code
,
this
);
...
...
@@ -277,6 +278,7 @@ MWF.xApplication.process.Xform.Elcheckbox = MWF.APPElcheckbox = new Class(
"
id
"
:
this
.
json
.
id
,
"
MWFType
"
:
this
.
json
.
type
});
this
.
_loadVueCss
();
this
.
_loadDomEvents
();
this
.
_afterLoaded
();
this
.
fireEvent
(
"
postLoad
"
);
...
...
@@ -284,7 +286,15 @@ MWF.xApplication.process.Xform.Elcheckbox = MWF.APPElcheckbox = new Class(
},
getInputData
:
function
(){
return
this
.
json
[
this
.
json
.
id
];
return
this
.
json
[
this
.
json
.
$
id
];
},
_loadVueCss
:
function
(){
if
(
this
.
styleNode
){
this
.
node
.
removeClass
(
this
.
styleNode
.
get
(
"
id
"
));
}
if
(
this
.
json
.
vueCss
&&
this
.
json
.
vueCss
.
code
){
this
.
styleNode
=
this
.
node
.
loadCssText
(
this
.
json
.
vueCss
.
code
,
{
"
notInject
"
:
true
});
this
.
styleNode
.
inject
(
this
.
node
,
"
before
"
);
}
}
});
o2web/source/x_component_process_Xform/Elcommon.js
浏览文件 @
32da45e0
...
...
@@ -77,11 +77,17 @@ o2.xApplication.process.Xform.Elcommon = o2.APPElcommon = new Class(
// },
_createVueExtend
:
function
(){
if
(
this
.
tmpVueData
){
Object
.
keys
(
this
.
tmpVueData
).
each
(
function
(
k
){
this
.
form
.
Macro
.
environment
.
data
.
check
(
k
,
this
.
tmpVueData
[
k
]);
// if (this.tmpVueData){
// Object.keys(this.tmpVueData).each(function(k){
// this.form.Macro.environment.data.check(k, this.tmpVueData[k]);
// }.bind(this));
// }
if
(
this
.
vModels
&&
this
.
vModels
.
length
){
this
.
vModels
.
forEach
(
function
(
m
){
if
(
!
this
.
json
.
hasOwnProperty
(
m
))
this
.
json
[
m
]
=
""
;
}.
bind
(
this
));
}
var
app
=
{};
if
(
this
.
json
.
vueApp
&&
this
.
json
.
vueApp
.
code
)
app
=
this
.
form
.
Macro
.
exec
(
this
.
json
.
vueApp
.
code
,
this
);
if
(
app
.
data
){
...
...
@@ -89,9 +95,10 @@ o2.xApplication.process.Xform.Elcommon = o2.APPElcommon = new Class(
switch
(
ty
){
case
"
object
"
:
Object
.
keys
(
app
.
data
).
each
(
function
(
k
){
this
.
form
.
Macro
.
environment
.
data
.
add
(
k
,
app
.
data
[
k
]);
if
(
!
this
.
json
.
hasOwnProperty
(
k
))
this
.
json
[
k
]
=
app
.
data
[
k
];
//this.form.Macro.environment.data.add(k, app.data[k]);
}.
bind
(
this
));
app
.
data
=
this
.
form
.
Macro
.
environment
.
data
;
app
.
data
=
this
.
this
.
json
;
// app.data = this.json;
// app.data = Object.merge(this.json, this.form.Macro.environment.data);
break
;
...
...
@@ -104,15 +111,18 @@ o2.xApplication.process.Xform.Elcommon = o2.APPElcommon = new Class(
//_self.form.Macro.environment.data.add(_self.json.id, d);
Object
.
keys
(
d
).
each
(
function
(
k
){
_self
.
form
.
Macro
.
environment
.
data
.
add
(
k
,
d
[
k
]);
if
(
!
_self
.
json
.
hasOwnProperty
(
k
))
_self
.
json
[
k
]
=
d
[
k
];
//_self.form.Macro.environment.data.add(k, d[k]);
});
//var data = Object.merge(_slef.json);
return
_self
.
form
.
Macro
.
environment
.
data
;
//return _self.form.Macro.environment.data;
return
_self
.
json
;
};
break
;
}
}
else
{
app
.
data
=
this
.
form
.
Macro
.
environment
.
data
;
//app.data = this.form.Macro.environment.data;
app
.
data
=
this
.
json
;
}
var
_self
=
this
;
...
...
@@ -121,6 +131,9 @@ o2.xApplication.process.Xform.Elcommon = o2.APPElcommon = new Class(
_self
.
_afterMounted
(
this
.
$el
);
if
(
mountedFun
&&
o2
.
typeOf
(
mountedFun
)
==
"
function
"
)
return
mountedFun
.
apply
(
this
);
};
this
.
appendVueWatch
(
app
);
return
app
;
},
...
...
@@ -142,17 +155,34 @@ o2.xApplication.process.Xform.Elcommon = o2.APPElcommon = new Class(
// this.styleNode.inject(this.node, "before");
// }
// },
_filterHtml
:
function
(
html
){
var
tmp
=
new
Element
(
"
div
"
,
{
"
html
"
:
html
});
var
nodes
=
tmp
.
querySelectorAll
(
"
*[v-model]
"
);
this
.
tmpVueData
=
{};
nodes
.
forEach
(
function
(
node
){
this
.
tmpVueData
[
node
.
get
(
"
v-model
"
)]
=
""
;
}.
bind
(
this
));
return
html
;
// _filterHtml: function(html){
// var tmp = new Element("div", {"html": html});
// var nodes = tmp.querySelectorAll("*[v-model]");
// this.tmpVueData = {};
// nodes.forEach(function(node){
// this.tmpVueData[node.get("v-model")] = "";
// }.bind(this));
// return html;
// },
_checkVmodel
:
function
(
text
){
if
(
text
){
this
.
vModels
=
[];
var
reg
=
/
(?:
v-model
)(?:
.lazy|.number|.trim
)?(?:\s
*=
\s
*
)(?:[
"'
])?([^
"'
]
*
)
/g
;
var
arr
;
while
((
arr
=
reg
.
exec
(
text
))
!==
null
)
{
if
(
arr
.
length
>
1
&&
arr
[
1
]){
var
modelId
=
this
.
json
.
id
.
substring
(
0
,
this
.
json
.
id
.
lastIndexOf
(
"
..
"
));
modelId
=
(
modelId
)
?
modelId
+
"
..
"
+
arr
[
1
]
:
arr
[
1
];
this
.
json
[
arr
[
1
]]
=
this
.
getBusinessDataById
(
null
,
modelId
);
this
.
vModels
.
push
(
arr
[
1
]);
}
}
}
},
_createElementHtml
:
function
(){
var
html
=
this
.
json
.
vueTemplate
||
""
;
return
this
.
_filterHtml
(
html
);
if
(
html
)
this
.
_checkVmodel
(
html
);
// return this._filterHtml(html);
return
html
;
}
});
o2web/source/x_component_process_Xform/Elinput.js
浏览文件 @
32da45e0
...
...
@@ -21,11 +21,6 @@ MWF.xApplication.process.Xform.Elinput = MWF.APPElinput = new Class(
"
elEvents
"
:
[
"
focus
"
,
"
blur
"
,
"
change
"
,
"
input
"
,
"
clear
"
]
},
_appendVueData
:
function
(){
this
.
form
.
Macro
.
environment
.
data
.
check
(
this
.
json
.
$id
);
//if (!this.json[this.json.id]){
this
.
json
[
this
.
json
.
$id
]
=
this
.
_getBusinessData
();
//}
if
(
!
this
.
json
.
maxlength
)
this
.
json
.
maxlength
=
""
;
if
(
!
this
.
json
.
minlength
)
this
.
json
.
minlength
=
""
;
if
(
!
this
.
json
.
showWordLimit
)
this
.
json
.
showWordLimit
=
false
;
...
...
@@ -53,7 +48,6 @@ MWF.xApplication.process.Xform.Elinput = MWF.APPElinput = new Class(
// },
_createElementHtml
:
function
(){
debugger
;
this
.
json
[
"
$id
"
]
=
this
.
json
.
id
.
replace
(
/
\.\.
/g
,
"
_
"
);
var
html
=
"
<el-input
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
$id
+
"
\"
"
;
html
+=
"
:maxlength=
\"
maxlength
\"
"
;
...
...
@@ -100,26 +94,5 @@ MWF.xApplication.process.Xform.Elinput = MWF.APPElinput = new Class(
html
+=
"
</el-input>
"
;
return
html
;
},
__setValue
:
function
(
value
){
this
.
moduleValueAG
=
null
;
this
.
_setBusinessData
(
value
);
this
.
json
[
this
.
json
.
$id
]
=
value
;
if
(
this
.
readonly
||
this
.
json
.
isReadonly
)
this
.
node
.
set
(
"
text
"
,
value
);
this
.
fieldModuleLoaded
=
true
;
return
value
;
},
__setData
:
function
(
data
){
var
old
=
this
.
getInputData
();
this
.
_setBusinessData
(
data
);
this
.
json
[
this
.
json
.
$id
]
=
data
;
if
(
this
.
readonly
||
this
.
json
.
isReadonly
)
this
.
node
.
set
(
"
text
"
,
value
);
if
(
old
!==
data
)
this
.
fireEvent
(
"
change
"
);
this
.
moduleValueAG
=
null
;
this
.
validationMode
();
},
getInputData
:
function
(){
debugger
;
return
this
.
json
[
this
.
json
.
$id
];
},
}
});
o2web/source/x_component_process_Xform/Elradio.js
浏览文件 @
32da45e0
...
...
@@ -98,8 +98,10 @@ MWF.xApplication.process.Xform.Elradio = MWF.APPElradio = new Class(
},
_createElementHtml
:
function
(
radioValues
){
this
.
json
[
"
$id
"
]
=
(
this
.
json
.
id
.
indexOf
(
"
..
"
)
!==-
1
)
?
this
.
json
.
id
.
replace
(
/
\.\.
/g
,
"
_
"
)
:
this
.
json
.
id
;
var
html
=
"
<el-radio-group class='o2_vue' style='box-sizing: border-box!important'
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
id
+
"
\"
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
$
id
+
"
\"
"
;
html
+=
"
:text-color=
\"
textColor
\"
"
;
html
+=
"
:fill=
\"
fillColor
\"
"
;
html
+=
"
:size=
\"
size
\"
"
;
...
...
@@ -157,12 +159,12 @@ MWF.xApplication.process.Xform.Elradio = MWF.APPElradio = new Class(
__setValue
:
function
(
value
){
this
.
moduleValueAG
=
null
;
this
.
_setBusinessData
(
value
);
this
.
json
[
this
.
json
.
id
]
=
value
;
this
.
json
[
this
.
json
.
$
id
]
=
value
;
},
__setData
:
function
(
data
){
this
.
moduleValueAG
=
null
;
this
.
_setBusinessData
(
data
);
this
.
json
[
this
.
json
.
id
]
=
data
;
this
.
json
[
this
.
json
.
$
id
]
=
data
;
this
.
validationMode
();
this
.
fireEvent
(
"
setData
"
);
},
...
...
@@ -219,8 +221,8 @@ MWF.xApplication.process.Xform.Elradio = MWF.APPElradio = new Class(
};
},
_createVueData
:
function
(){
this
.
form
.
Macro
.
environment
.
data
.
check
(
this
.
json
.
id
);
this
.
json
[
this
.
json
.
id
]
=
this
.
_getBusinessData
();
if
(
this
.
json
.
$id
===
this
.
json
.
id
)
this
.
form
.
Macro
.
environment
.
data
.
check
(
this
.
json
.
$
id
);
this
.
json
[
this
.
json
.
$
id
]
=
this
.
_getBusinessData
();
// if (!this.json[this.json.id]){
// this.json[this.json.id] = this._getBusinessData();
// }
...
...
@@ -236,12 +238,14 @@ MWF.xApplication.process.Xform.Elradio = MWF.APPElradio = new Class(
return
this
.
json
;
},
_afterMounted
:
function
(
el
){
this
.
node
=
el
;
this
.
node
.
set
({
"
id
"
:
this
.
json
.
id
,
"
MWFType
"
:
this
.
json
.
type
});
this
.
_loadVueCss
();
this
.
_loadDomEvents
();
this
.
_afterLoaded
();
this
.
fireEvent
(
"
postLoad
"
);
...
...
@@ -249,7 +253,15 @@ MWF.xApplication.process.Xform.Elradio = MWF.APPElradio = new Class(
},
getInputData
:
function
(){
return
this
.
json
[
this
.
json
.
id
];
return
this
.
json
[
this
.
json
.
$
id
];
},
_loadVueCss
:
function
(){
if
(
this
.
styleNode
){
this
.
node
.
removeClass
(
this
.
styleNode
.
get
(
"
id
"
));
}
if
(
this
.
json
.
vueCss
&&
this
.
json
.
vueCss
.
code
){
this
.
styleNode
=
this
.
node
.
loadCssText
(
this
.
json
.
vueCss
.
code
,
{
"
notInject
"
:
true
});
this
.
styleNode
.
inject
(
this
.
node
,
"
before
"
);
}
}
});
o2web/source/x_component_process_Xform/Elselect.js
浏览文件 @
32da45e0
...
...
@@ -171,21 +171,5 @@ MWF.xApplication.process.Xform.Elselect = MWF.APPElselect = new Class(
html
+=
"
</el-select>
"
;
return
html
;
},
__setValue
:
function
(
value
){
this
.
moduleValueAG
=
null
;
this
.
_setBusinessData
(
value
);
this
.
json
[
this
.
json
.
id
]
=
value
;
//if (this.readonly || this.json.isReadonly) this.node.set("text", value);
this
.
fieldModuleLoaded
=
true
;
return
value
;
},
__setData
:
function
(
data
){
var
old
=
this
.
getInputData
();
this
.
_setBusinessData
(
data
);
this
.
json
[
this
.
json
.
id
]
=
data
;
//if (this.readonly || this.json.isReadonly) this.node.set("text", value);
if
(
old
!==
data
)
this
.
fireEvent
(
"
change
"
);
this
.
moduleValueAG
=
null
;
this
.
validationMode
();
},
__setReadonly
:
function
(
data
){}
});
o2web/source/x_component_process_Xform/Elslider.js
浏览文件 @
32da45e0
...
...
@@ -127,19 +127,5 @@ MWF.xApplication.process.Xform.Elslider = MWF.APPElslider = new Class(
html
+=
"
</el-slider>
"
;
return
html
;
},
__setValue
:
function
(
value
){
this
.
moduleValueAG
=
null
;
this
.
_setBusinessData
(
value
);
this
.
json
[
this
.
json
.
id
]
=
value
;
this
.
fieldModuleLoaded
=
true
;
return
value
;
},
__setData
:
function
(
data
){
var
old
=
this
.
getInputData
();
this
.
_setBusinessData
(
data
);
this
.
json
[
this
.
json
.
id
]
=
data
;
if
(
old
!==
data
)
this
.
fireEvent
(
"
change
"
);
this
.
moduleValueAG
=
null
;
this
.
validationMode
();
},
__setReadonly
:
function
(
data
){}
});
o2web/source/x_component_process_Xform/Elswitch.js
浏览文件 @
32da45e0
...
...
@@ -126,19 +126,5 @@ MWF.xApplication.process.Xform.Elswitch = MWF.APPElswitch = new Class(
html
+=
"
</el-switch>
"
;
return
html
;
},
__setValue
:
function
(
value
){
this
.
moduleValueAG
=
null
;
this
.
_setBusinessData
(
value
);
this
.
json
[
this
.
json
.
id
]
=
value
;
this
.
fieldModuleLoaded
=
true
;
return
value
;
},
__setData
:
function
(
data
){
var
old
=
this
.
getInputData
();
this
.
_setBusinessData
(
data
);
this
.
json
[
this
.
json
.
id
]
=
data
;
if
(
old
!==
data
)
this
.
fireEvent
(
"
change
"
);
this
.
moduleValueAG
=
null
;
this
.
validationMode
();
},
__setReadonly
:
function
(
data
){}
});
o2web/source/x_component_process_Xform/Form.js
浏览文件 @
32da45e0
...
...
@@ -1486,9 +1486,11 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class(
pathList
=
pathList
||
[];
if
(
typeOf
(
data
)
===
"
object
"
)
{
for
(
var
key
in
data
)
{
//if (key.substring(0,2)!=="__"){
var
pList
=
Array
.
clone
(
pathList
);
pList
.
push
(
key
);
this
.
setModifedData
(
data
[
key
],
pList
);
//}
}
}
else
if
(
typeOf
(
data
)
===
"
array
"
)
{
var
od
=
this
.
getOrigianlPathData
(
pathList
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录