Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
f3761fac
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,发现更多精彩内容 >>
提交
f3761fac
编写于
11月 04, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查询里增加了视图
上级
9c8a6f95
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
101 addition
and
15 deletion
+101
-15
o2web/source/x_component_process_FormDesigner/Module/Statement.js
...urce/x_component_process_FormDesigner/Module/Statement.js
+11
-1
o2web/source/x_component_process_FormDesigner/Module/StatementSelector.js
...omponent_process_FormDesigner/Module/StatementSelector.js
+10
-0
o2web/source/x_component_process_FormDesigner/Property.js
o2web/source/x_component_process_FormDesigner/Property.js
+1
-1
o2web/source/x_component_process_Xform/StatementSelector.js
o2web/source/x_component_process_Xform/StatementSelector.js
+47
-2
o2web/source/x_component_query_StatementDesigner/Statement.js
...b/source/x_component_query_StatementDesigner/Statement.js
+15
-7
o2web/source/x_component_query_StatementDesigner/widget/ViewFilter.js
.../x_component_query_StatementDesigner/widget/ViewFilter.js
+17
-4
未找到文件。
o2web/source/x_component_process_FormDesigner/Module/Statement.js
浏览文件 @
f3761fac
...
...
@@ -83,7 +83,11 @@ MWF.xApplication.process.FormDesigner.Module.Statement = MWF.FCStatement = new C
}
MWF
.
Actions
.
get
(
"
x_query_assemble_designer
"
).
getStatement
(
this
.
json
[
"
queryStatement
"
].
id
,
function
(
json
){
var
viewData
=
JSON
.
decode
(
json
.
data
.
view
);
var
viewData
=
JSON
.
decode
(
json
.
data
.
view
||
""
);
if
(
!
viewData
||
!
viewData
.
data
){
return
;
}
this
.
viewData
=
viewData
;
if
(
this
.
json
.
actionbar
===
"
show
"
){
...
...
@@ -113,11 +117,17 @@ MWF.xApplication.process.FormDesigner.Module.Statement = MWF.FCStatement = new C
this
.
_createViewNode
(
function
(){
if
(
callback
)
callback
();
}.
bind
(
this
));
if
(
this
.
property
&&
this
.
property
.
viewFilter
){
this
.
property
.
viewFilter
.
resetStatementData
(
this
.
json
[
"
queryStatement
"
].
id
);
}
}
else
{
this
.
iconNode
.
setStyle
(
"
display
"
,
"
block
"
);
if
(
this
.
viewNode
)
this
.
viewNode
.
destroy
();
this
.
node
.
setStyles
(
this
.
css
.
moduleNode
);
if
(
callback
)
callback
();
if
(
this
.
property
&&
this
.
property
.
viewFilter
){
this
.
property
.
viewFilter
.
resetStatementData
();
}
}
},
_setEditStyle
:
function
(
name
,
input
,
oldValue
){
...
...
o2web/source/x_component_process_FormDesigner/Module/StatementSelector.js
浏览文件 @
f3761fac
...
...
@@ -21,5 +21,15 @@ MWF.xApplication.process.FormDesigner.Module.StatementSelector = MWF.FCStatement
this
.
form
=
form
;
this
.
container
=
null
;
this
.
containerNode
=
null
;
},
_checkView
:
function
(
callback
){
if
(
this
.
property
&&
this
.
property
.
viewFilter
){
if
(
this
.
json
[
"
queryStatement
"
]
&&
this
.
json
[
"
queryStatement
"
]
!=
"
none
"
){
this
.
property
.
viewFilter
.
resetStatementData
(
this
.
json
[
"
queryStatement
"
].
id
);
}
else
{
this
.
property
.
viewFilter
.
resetStatementData
();
}
}
}
});
o2web/source/x_component_process_FormDesigner/Property.js
浏览文件 @
f3761fac
...
...
@@ -525,7 +525,7 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
nodes
.
each
(
function
(
node
){
MWF
.
xDesktop
.
requireApp
(
"
query.StatementDesigner
"
,
"
widget.ViewFilter
"
,
function
(){
var
_slef
=
this
;
new
MWF
.
xApplication
.
query
.
StatementDesigner
.
widget
.
ViewFilter
(
node
,
this
.
form
.
designer
,
{
"
filtrData
"
:
filtrData
,
"
customData
"
:
null
},
{
this
.
viewFilter
=
new
MWF
.
xApplication
.
query
.
StatementDesigner
.
widget
.
ViewFilter
(
node
,
this
.
form
.
designer
,
{
"
filtrData
"
:
filtrData
,
"
customData
"
:
null
},
{
"
statementId
"
:
this
.
data
.
queryStatement
?
this
.
data
.
queryStatement
.
id
:
""
,
"
withForm
"
:
true
,
"
onChange
"
:
function
(
ids
){
...
...
o2web/source/x_component_process_Xform/StatementSelector.js
浏览文件 @
f3761fac
...
...
@@ -20,7 +20,7 @@ MWF.xApplication.process.Xform.StatementSelector = MWF.APPStatementSelector = n
var
viewJson
=
{
"
application
"
:
viewData
.
appName
,
"
statementName
"
:
viewData
.
name
,
"
view
Id
"
:
viewData
.
id
,
"
statement
Id
"
:
viewData
.
id
,
"
isTitle
"
:
this
.
json
.
isTitle
||
"
yes
"
,
"
select
"
:
this
.
json
.
select
||
"
single
"
,
"
titleStyles
"
:
this
.
json
.
titleStyles
,
...
...
@@ -72,6 +72,7 @@ MWF.xApplication.process.Xform.StatementSelector = MWF.APPStatementSelector = n
"
text
"
:
MWF
.
LP
.
process
.
button
.
ok
,
"
action
"
:
function
(){
//if (callback) callback(_self.view.selectedItems);
debugger
;
if
(
callback
)
callback
(
_self
.
view
.
getData
());
this
.
close
();
}
...
...
@@ -113,6 +114,50 @@ MWF.xApplication.process.Xform.StatementSelector = MWF.APPStatementSelector = n
// }.bind(this));
}.
bind
(
this
));
}
}
},
doResult
:
function
(
data
){
if
(
this
.
json
.
result
===
"
script
"
){
this
.
selectedData
=
data
;
return
(
this
.
json
.
selectedScript
.
code
)
?
this
.
form
.
Macro
.
exec
(
this
.
json
.
selectedScript
.
code
,
this
)
:
""
;
}
else
{
Object
.
each
(
this
.
json
.
selectedSetValues
,
function
(
v
,
k
){
var
value
=
""
;
data
.
each
(
function
(
d
,
idx
){
// Object.each(d, function(dv, dk){
// if (dk===v) value = (value) ? (value+", "+dv) : dv;
// }.bind(this));
var
pathList
=
v
.
split
(
"
.
"
);
for
(
var
i
=
0
;
i
<
pathList
.
length
;
i
++
){
var
p
=
pathList
[
i
];
if
(
(
/
(
^
[
1-9
]\d
*$
)
/
.
test
(
p
))
)
p
=
p
.
toInt
();
if
(
d
[
p
]
){
d
=
d
[
p
];
}
else
{
d
=
""
;
break
;
}
}
if
(
typeOf
(
d
)
===
"
array
"
||
typeOf
(
d
)
===
"
object
"
)
{
d
=
JSON
.
stringify
(
d
);
}
value
=
(
value
)
?
(
value
+
"
,
"
+
d
)
:
d
;
}.
bind
(
this
));
var
field
=
this
.
form
.
all
[
k
];
if
(
field
){
field
.
setData
(
value
);
if
(
value
){
if
(
field
.
descriptionNode
)
field
.
descriptionNode
.
setStyle
(
"
display
"
,
"
none
"
);
}
else
{
if
(
field
.
descriptionNode
)
field
.
descriptionNode
.
setStyle
(
"
display
"
,
"
block
"
);
}
}
}.
bind
(
this
));
}
},
});
o2web/source/x_component_query_StatementDesigner/Statement.js
浏览文件 @
f3761fac
...
...
@@ -53,7 +53,7 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
if
(
!
this
.
json
.
type
)
this
.
json
.
type
=
"
select
"
;
if
(
!
this
.
json
.
format
)
this
.
json
.
format
=
"
jpql
"
;
if
(
!
this
.
json
.
entityCategory
)
this
.
json
.
entityCategory
=
"
official
"
;
if
(
!
this
.
json
.
entityClassName
)
this
.
json
.
entityClassName
=
"
com.x.processplatform.core.entity.content.Task
"
;
if
(
!
this
.
json
.
entityClassName
)
this
.
json
.
entityClassName
=
"
"
;
//"
com.x.processplatform.core.entity.content.Task";
},
autoSave
:
function
()
{
this
.
autoSaveTimerID
=
window
.
setInterval
(
function
()
{
...
...
@@ -609,6 +609,10 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
this
.
changeEditorEntityClassName
(
entityClassName
.
split
(
"
.
"
).
getLast
()
);
}
this
.
loadFieldSelect
();
this
.
json
.
table
=
""
;
this
.
json
.
tableObj
=
null
;
if
(
this
.
view
&&
this
.
view
.
property
&&
this
.
view
.
property
.
viewFilter
)
this
.
view
.
property
.
viewFilter
.
setPathInputSelectOptions
();
// var className = e.target.options[e.target.selectedIndex].value;
...
...
@@ -665,7 +669,7 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
var
type
=
option
.
retrieve
(
"
type
"
);
var
field
=
option
.
retrieve
(
"
field
"
);
if
(
!
field
)
return
;
var
text
=
"
"
+
field
.
name
;
var
text
=
field
.
name
;
if
(
this
.
countJpqlPage
&&
this
.
countJpqlPage
.
isShow
&&
!
this
.
countJpqlPage
.
disabled
){
if
(
this
.
data
.
format
===
"
script
"
&&
this
.
countScriptEditor
.
jsEditor
){
this
.
countScriptEditor
.
jsEditor
.
insertValue
(
text
);
...
...
@@ -736,6 +740,10 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
this
.
dynamicTableContent
.
set
(
"
text
"
,
name
);
this
.
json
.
table
=
name
;
this
.
json
.
tableObj
=
items
[
0
].
data
;
this
.
officialTableSelect
.
options
[
0
].
set
(
"
selected
"
,
true
);
this
.
json
.
entityClassName
=
""
;
this
.
changeEditorEntityClassName
(
name
);
this
.
loadFieldSelect
();
if
(
this
.
view
&&
this
.
view
.
property
&&
this
.
view
.
property
.
viewFilter
)
this
.
view
.
property
.
viewFilter
.
setPathInputSelectOptions
();
...
...
@@ -755,9 +763,9 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
// this.designer.notice(this.designer.lp.inputStatementData, "error");
// return false;
// }
o2
.
require
(
"
o2.widget.Mask
"
,
null
,
false
);
this
.
runMask
=
new
o2
.
widget
.
Mask
();
this
.
runMask
.
loadNode
(
this
.
node
);
//
o2.require("o2.widget.Mask", null, false);
//
this.runMask = new o2.widget.Mask();
//
this.runMask.loadNode(this.node);
this
.
saveSilence
(
function
()
{
debugger
;
...
...
@@ -776,9 +784,9 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
if
(
flag
)
this
.
view
.
loadViewData
();
}
this
.
setColumnDataPath
(
json
);
this
.
runMask
.
hide
();
//
this.runMask.hide();
}.
bind
(
this
),
function
()
{
if
(
this
.
runMask
)
this
.
runMask
.
hide
();
//
if (this.runMask) this.runMask.hide();
}.
bind
(
this
))
// var json = this.jsonEditor.editor.getValue();
...
...
o2web/source/x_component_query_StatementDesigner/widget/ViewFilter.js
浏览文件 @
f3761fac
...
...
@@ -349,9 +349,9 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
},
setPathInputSelectOptions
:
function
(){
debugger
;
var
d
=
this
.
statementData
;
this
.
pathInputSelect
.
empty
();
if
(
!
this
.
statementData
)
return
;
var
d
=
this
.
statementData
;
var
fun
=
function
(
tableName
)
{
o2
.
Actions
.
load
(
"
x_query_assemble_designer
"
).
QueryAction
.
getEntityProperties
(
d
.
entityCategory
===
"
dynamic
"
?
d
.
table
:
d
.
entityClassName
,
...
...
@@ -375,6 +375,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
}.
bind
(
this
)
)
}.
bind
(
this
);
if
(
d
.
entityCategory
===
"
dynamic
"
){
if
(
d
.
table
){
o2
.
Actions
.
load
(
"
x_query_assemble_designer
"
).
TableAction
.
get
(
d
.
table
,
function
(
json
){
...
...
@@ -385,6 +386,21 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
fun
(
d
.
entityClassName
.
split
(
"
.
"
).
getLast
()
)
}
},
resetStatementData
:
function
(
statementId
,
callback
){
if
(
statementId
&&
statementId
!==
"
none
"
){
this
.
options
.
statementId
=
statementId
;
o2
.
Actions
.
load
(
"
x_query_assemble_designer
"
).
StatementAction
.
get
(
statementId
,
function
(
json
)
{
this
.
statementData
=
json
.
data
;
this
.
setPathInputSelectOptions
();
if
(
callback
)
callback
();
}.
bind
(
this
))
}
else
{
this
.
options
.
statementId
=
""
;
this
.
statementData
=
null
;
this
.
setPathInputSelectOptions
();
if
(
callback
)
callback
();
}
},
switchInputDisplay
:
function
()
{
var
formatType
=
this
.
datatypeInput
.
options
[
this
.
datatypeInput
.
selectedIndex
].
value
;
...
...
@@ -499,7 +515,6 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
}.
bind
(
this
));
},
modifyOrAddFilterItem
:
function
()
{
debugger
;
var
flag
;
if
(
this
.
currentFilterItem
)
{
flag
=
this
.
modifyFilterItem
();
...
...
@@ -879,7 +894,6 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
}
catch
(
e
)
{
}
debugger
;
if
(
this
.
options
.
withForm
){
this
.
switchInputDisplay
();
}
else
{
...
...
@@ -993,7 +1007,6 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
this
.
fireEvent
(
"
change
"
);
},
getData
:
function
()
{
debugger
;
var
data
=
[];
var
customData
=
[];
this
.
items
.
each
(
function
(
item
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录