Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
9ee22c20
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,发现更多精彩内容 >>
提交
9ee22c20
编写于
11月 03, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查询中增加视图功能
上级
f17a8d06
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
235 addition
and
132 deletion
+235
-132
o2web/source/o2_core/o2/widget/JavascriptEditor.js
o2web/source/o2_core/o2/widget/JavascriptEditor.js
+16
-0
o2web/source/x_component_process_FormDesigner/Module/Statement/statement.html
...nent_process_FormDesigner/Module/Statement/statement.html
+36
-32
o2web/source/x_component_process_FormDesigner/Property.js
o2web/source/x_component_process_FormDesigner/Property.js
+1
-0
o2web/source/x_component_query_StatementDesigner/$Statement/statementDesigner.html
...query_StatementDesigner/$Statement/statementDesigner.html
+6
-0
o2web/source/x_component_query_StatementDesigner/Statement.js
...b/source/x_component_query_StatementDesigner/Statement.js
+54
-2
o2web/source/x_component_query_StatementDesigner/lp/zh-cn.js
o2web/source/x_component_query_StatementDesigner/lp/zh-cn.js
+2
-0
o2web/source/x_component_query_StatementDesigner/widget/ViewFilter.js
.../x_component_query_StatementDesigner/widget/ViewFilter.js
+120
-98
未找到文件。
o2web/source/o2_core/o2/widget/JavascriptEditor.js
浏览文件 @
9ee22c20
...
...
@@ -371,6 +371,22 @@ o2.widget.JavascriptEditor = new Class({
setValue
:
function
(
v
){
if
(
this
.
editor
)
this
.
editor
.
setValue
(
v
);
},
insertValue
:
function
(
v
){
if
(
this
.
editor
){
switch
(
this
.
options
.
type
.
toLowerCase
())
{
case
"
ace
"
:
this
.
editor
.
insert
(
v
);
break
;
case
"
monaco
"
:
// this.editor.getModel().applyEdits([{
this
.
editor
.
executeEdits
(
""
,
[{
range
:
monaco
.
Range
.
fromPositions
(
this
.
editor
.
getPosition
()),
text
:
v
}]);
break
;
}
}
},
getValue
:
function
(){
return
(
this
.
editor
)
?
this
.
editor
.
getValue
()
:
""
;
},
...
...
o2web/source/x_component_process_FormDesigner/Module/Statement/statement.html
浏览文件 @
9ee22c20
...
...
@@ -25,6 +25,8 @@
<div
class=
"MWFMaplist"
name=
"titleStyles"
title=
"标题样式"
></div>
<div
class=
"MWFMaplist"
name=
"itemStyles"
title=
"数据样式"
></div>
</div>
<div
title=
"查询"
class=
"MWFTab"
>
<div>
<table
width=
"100%"
border=
"0"
cellpadding=
"5"
cellspacing=
"0"
class=
"editTable"
>
...
...
@@ -95,8 +97,10 @@
</tr>
<tr>
<td
class=
"editTableTitle"
>
路径:
</td>
<td
class=
"editTableValue"
><input
type=
"text"
class=
"editTableInput pathInput_vf"
/></td>
注:路径的写法是"表别名.字段名",如:o.title
<td
class=
"editTableValue"
>
<input
type=
"text"
class=
"editTableInput pathInput_vf"
/>
<div
style=
"color: #999"
>
注:路径的写法是"表别名.字段名",如:o.title
</div>
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
数据类型:
</td>
...
...
@@ -107,22 +111,22 @@
<option
value=
"booleanValue"
>
布尔
</option>
</select></td>
</tr>
<!-- <tr style="display:none">--
>
<!-- <td class="editTableTitle"></td>--
>
<!-- <td class="editTableValue">--
>
<!-- <input type="radio" class="restrictFilterInput_vf" value="restrict" name="text{$.id}viewFilterType" checked/>作为默认过滤条件<br>--
>
<!-- <input type="radio" class="customFilterInput_vf" value="custom" name="text{$.id}viewFilterType"/>作为自定义过滤数据-->
<!-- </td>--
>
<!-- </tr>--
>
<tr
style=
"display:none"
>
<td
class=
"editTableTitle"
></td
>
<td
class=
"editTableValue"
>
<input
type=
"radio"
class=
"restrictFilterInput_vf"
value=
"restrict"
name=
"text{$.id}viewFilterType"
checked
/>
作为默认过滤条件
<br
>
<input
type=
"radio"
class=
"customFilterInput_vf"
value=
"custom"
name=
"text{$.id}viewFilterType"
/>
作为自定义过滤数据
</td
>
</tr
>
</table>
<table
id=
"text{$.pid}viewFilterRestrict"
width=
"100%"
border=
"0"
cellpadding=
"5"
cellspacing=
"0"
class=
"editTable"
>
<!-- <tr>--
>
<!-- <td class="editTableTitle">逻辑:</td>--
>
<!-- <td class="editTableValue"><select class="logicInput_vf">--
>
<!-- <option selected value="and">并且(and)</option>--
>
<!-- <option value="or">或者(or)</option>--
>
<!-- </select></td>--
>
<!-- </tr>--
>
<tr
style=
"display:none;"
>
<td
class=
"editTableTitle"
>
逻辑:
</td
>
<td
class=
"editTableValue"
><select
class=
"logicInput_vf"
>
<option
selected
value=
"and"
>
并且(and)
</option
>
<option
value=
"or"
>
或者(or)
</option
>
</select></td
>
</tr
>
<tr>
<td
class=
"editTableTitle"
>
比较:
</td>
...
...
@@ -138,28 +142,28 @@
<option
value=
"range"
>
范围(range)
</option>
</select></td>
</tr>
<!-- <tr style="display:none">--
>
<!-- <td class="editTableTitle">值:</td>--
>
<!-- <td class="editTableValue">--
>
<!-- <input type="text" class="editTableInput valueTextInput_vf" style="display: block"/>--
>
<!-- <input type="number" class="editTableInput valueNumberInput_vf" style="display: none"/>--
>
<!-- <input type="text" class="editTableInput valueDatetimeInput_vf" style="display: none" readonly/>--
>
<!-- <input type="text" class="editTableInput valueDateInput_vf" style="display: none" readonly/>--
>
<!-- <input type="text" class="editTableInput valueTimeInput_vf" style="display: none" readonly/>--
>
<!-- <select class="valueBooleanInput_vf" style="display: none">--
>
<!-- <option value="true" selected>是(True)</option>--
>
<!-- <option value="false">否(False)</option>--
>
<!-- </select>--
>
<!-- </td>--
>
<!-- </tr>--
>
<tr
style=
"display:none"
>
<td
class=
"editTableTitle"
>
值:
</td
>
<td
class=
"editTableValue"
>
<input
type=
"text"
class=
"editTableInput valueTextInput_vf"
style=
"display: block"
/
>
<input
type=
"number"
class=
"editTableInput valueNumberInput_vf"
style=
"display: none"
/
>
<input
type=
"text"
class=
"editTableInput valueDatetimeInput_vf"
style=
"display: none"
readonly
/
>
<input
type=
"text"
class=
"editTableInput valueDateInput_vf"
style=
"display: none"
readonly
/
>
<input
type=
"text"
class=
"editTableInput valueTimeInput_vf"
style=
"display: none"
readonly
/
>
<select
class=
"valueBooleanInput_vf"
style=
"display: none"
>
<option
value=
"true"
selected
>
是(True)
</option
>
<option
value=
"false"
>
否(False)
</option
>
</select
>
</td
>
</tr
>
</table>
<div
title=
"值"
class=
"MWFFilterFormulaArea"
></div>
</div>
<div
class=
"actionAreaNode_vf"
></div>
<div
style=
"height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee"
>
默认过滤条件
</div>
<div
class=
"listAreaNode_vf"
style=
"min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"
></div>
<!-- <div style="display:none; height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee">自定义过滤数据</div>--
>
<!-- <div class="fieldListAreaNode_vf" style="display:none; min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>--
>
<div
style=
"display:none; height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee"
>
自定义过滤数据
</div
>
<div
class=
"fieldListAreaNode_vf"
style=
"display:none; min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"
></div
>
</div>
<div
class=
"MWFScriptArea"
name=
"defaultSelectedScript"
title=
"默认选中行脚本"
></div>
</div>
...
...
o2web/source/x_component_process_FormDesigner/Property.js
浏览文件 @
9ee22c20
...
...
@@ -84,6 +84,7 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
this
.
loadSourceTestRestful
();
this
.
loadSidebarPosition
();
this
.
loadViewFilter
();
this
.
loadStatementFilter
();
this
.
loadDocumentTempleteSelect
();
// this.loadScriptIncluder();
// this.loadDictionaryIncluder();
...
...
o2web/source/x_component_query_StatementDesigner/$Statement/statementDesigner.html
浏览文件 @
9ee22c20
...
...
@@ -56,6 +56,12 @@
</div>
<div
class=
"o2_statement_statementDesignerTableArea_field"
>
<div
style=
"margin-left: 30px;"
class=
"o2_statement_statementDesignerTitle"
>
{{$.lp.field}}:
</div>
<select>
</select>
</div>
</div>
<!-- <div class="o2_statement_statementJpqlTabNode" style="{{if $.data.type!='select'}} display: none {{end if}}"></div>-->
...
...
o2web/source/x_component_query_StatementDesigner/Statement.js
浏览文件 @
9ee22c20
...
...
@@ -209,6 +209,9 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
this
.
dynamicTableSelect
=
this
.
areaNode
.
getElement
(
"
.o2_statement_statementDesignerSelectTable
"
);
this
.
officialTableSelect
=
this
.
officialTableArea
.
getElement
(
"
select
"
);
this
.
fieldSelect
=
this
.
areaNode
.
getElement
(
"
.o2_statement_statementDesignerTableArea_field
"
).
getElement
(
"
select
"
);
this
.
loadFieldSelect
();
this
.
dynamicTableContent
=
this
.
areaNode
.
getElement
(
"
.o2_statement_statementDesignerTableContent
"
);
this
.
jpqlTabNode
=
this
.
areaNode
.
getElement
(
"
.o2_statement_statementJpqlTabNode
"
);
...
...
@@ -263,6 +266,30 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
this
.
loadVerticalResize
();
}.
bind
(
this
));
},
loadFieldSelect
:
function
(){
this
.
fieldSelect
.
empty
();
var
d
=
this
.
data
;
var
className
=
d
.
entityCategory
===
"
dynamic
"
?
d
.
table
:
d
.
entityClassName
;
if
(
!
className
)
return
;
o2
.
Actions
.
load
(
"
x_query_assemble_designer
"
).
QueryAction
.
getEntityProperties
(
className
,
d
.
entityCategory
,
function
(
json
){
var
option
=
new
Element
(
"
option
"
,
{
"
text
"
:
""
,
"
value
"
:
""
}).
inject
(
this
.
fieldSelect
);
option
.
store
(
"
type
"
,
d
.
entityCategory
);
option
.
store
(
"
tableName
"
,
className
);
(
json
.
data
||
[]).
each
(
function
(
field
)
{
var
option
=
new
Element
(
"
option
"
,
{
"
text
"
:
field
.
name
+
(
field
.
description
?
(
"
-
"
+
field
.
description
)
:
""
),
"
value
"
:
field
.
name
}).
inject
(
this
.
fieldSelect
);
option
.
store
(
"
field
"
,
field
);
option
.
store
(
"
type
"
,
d
.
entityCategory
);
option
.
store
(
"
tableName
"
,
className
);
}.
bind
(
this
))
}.
bind
(
this
)
)
},
loadVerticalResize
:
function
(){
this
.
verticalResize
=
new
Drag
(
this
.
resizeNode
,
{
"
snap
"
:
10
,
...
...
@@ -569,7 +596,9 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
this
.
customTableArea
.
hide
();
break
;
}
this
.
json
.
entityCategory
=
entityCategory
this
.
json
.
entityCategory
=
entityCategory
;
this
.
loadFieldSelect
();
if
(
this
.
view
&&
this
.
view
.
property
&&
this
.
view
.
property
.
viewFilter
)
this
.
view
.
property
.
viewFilter
.
setPathInputSelectOptions
();
}.
bind
(
this
));
//@todo change table
this
.
officialTableSelect
.
addEvent
(
"
change
"
,
function
(
e
)
{
...
...
@@ -579,7 +608,8 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
if
(
entityClassName
){
this
.
changeEditorEntityClassName
(
entityClassName
.
split
(
"
.
"
).
getLast
()
);
}
this
.
loadFieldSelect
();
if
(
this
.
view
&&
this
.
view
.
property
&&
this
.
view
.
property
.
viewFilter
)
this
.
view
.
property
.
viewFilter
.
setPathInputSelectOptions
();
// var className = e.target.options[e.target.selectedIndex].value;
// if (this.json.type=="select"){
...
...
@@ -629,6 +659,26 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
this
.
viewPage
.
enableTab
(
true
);
}
}.
bind
(
this
));
this
.
fieldSelect
.
addEvent
(
"
change
"
,
function
(
ev
)
{
var
option
=
ev
.
target
.
options
[
ev
.
target
.
selectedIndex
];
var
type
=
option
.
retrieve
(
"
type
"
);
var
field
=
option
.
retrieve
(
"
field
"
);
if
(
!
field
)
return
;
if
(
this
.
countJpqlPage
&&
this
.
countJpqlPage
.
isShow
&&
!
this
.
countJpqlPage
.
disabled
){
if
(
this
.
data
.
format
===
"
script
"
&&
this
.
countScriptEditor
.
jsEditor
){
this
.
countScriptEditor
.
jsEditor
.
insertValue
(
field
.
name
);
}
else
{
this
.
countEditor
.
insertValue
(
field
.
name
);
}
}
else
{
if
(
this
.
data
.
format
===
"
script
"
&&
this
.
scriptEditor
.
jsEditor
){
this
.
scriptEditor
.
jsEditor
.
insertValue
(
field
.
name
);
}
else
{
this
.
editor
.
insertValue
(
field
.
name
);
}
}
}.
bind
(
this
))
},
changeEditorEntityClassName
:
function
(
entityClassName
){
if
(
this
.
json
.
format
==
"
jpql
"
)
{
...
...
@@ -686,10 +736,12 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
this
.
json
.
table
=
name
;
this
.
json
.
tableObj
=
items
[
0
].
data
;
this
.
changeEditorEntityClassName
(
name
);
this
.
loadFieldSelect
();
if
(
this
.
view
&&
this
.
view
.
property
&&
this
.
view
.
property
.
viewFilter
)
this
.
view
.
property
.
viewFilter
.
setPathInputSelectOptions
();
}
else
{
this
.
dynamicTableContent
.
set
(
"
text
"
,
""
);
this
.
json
.
table
=
""
;
this
.
loadFieldSelect
();
if
(
this
.
view
&&
this
.
view
.
property
&&
this
.
view
.
property
.
viewFilter
)
this
.
view
.
property
.
viewFilter
.
setPathInputSelectOptions
();
}
}.
bind
(
this
)
...
...
o2web/source/x_component_query_StatementDesigner/lp/zh-cn.js
浏览文件 @
9ee22c20
MWF
.
xApplication
.
query
=
MWF
.
xApplication
.
query
||
{};
MWF
.
xApplication
.
query
.
StatementDesigner
=
MWF
.
xApplication
.
query
.
StatementDesigner
||
{};
if
(
!
MWF
.
APPDSMD
)
MWF
.
APPDSMD
=
MWF
.
xApplication
.
query
.
StatementDesigner
;
MWF
.
xApplication
.
query
.
ViewDesigner
=
MWF
.
xApplication
.
query
.
ViewDesigner
||
{};
MWF
.
xDesktop
.
requireApp
(
"
query.ViewDesigner
"
,
"
lp.
"
+
MWF
.
language
,
null
,
false
);
MWF
.
xApplication
.
query
.
StatementDesigner
.
LP
=
Object
.
merge
(
MWF
.
xApplication
.
query
.
ViewDesigner
.
LP
,
{
...
...
@@ -19,6 +20,7 @@ MWF.xApplication.query.StatementDesigner.LP = Object.merge( MWF.xApplication.que
"
saveStatementNotice
"
:
"
请先保存!
"
,
"
noViewNotice
"
:
"
未创建视图,请先创建视图!
"
,
"
previewNotSelectStatementNotice
"
:
"
只有语句类型为‘Select’才可以预览
"
,
"
field
"
:
"
字段
"
,
"
statementFormat
"
:
"
如何创建语句:
"
,
"
statementJpql
"
:
"
直接编写JPQL创建语句
"
,
...
...
o2web/source/x_component_query_StatementDesigner/widget/ViewFilter.js
浏览文件 @
9ee22c20
MWF
.
xApplication
.
query
=
MWF
.
xApplication
.
query
||
{};
MWF
.
xApplication
.
query
.
StatementDesigner
=
MWF
.
xApplication
.
query
.
StatementDesigner
||
{};
if
(
!
MWF
.
APPDSMD
)
MWF
.
APPDSMD
=
MWF
.
xApplication
.
query
.
StatementDesigner
;
MWF
.
xApplication
.
query
.
StatementDesigner
.
widget
=
MWF
.
xApplication
.
query
.
StatementDesigner
.
widget
||
{};
if
(
!
MWF
.
APPDSMD
.
LP
){
MWF
.
xDesktop
.
requireApp
(
"
query.StatementDesigner
"
,
"
lp.
"
+
MWF
.
language
,
null
,
false
);
}
MWF
.
xApplication
.
query
.
StatementDesigner
.
widget
.
ViewFilter
=
new
Class
({
Implements
:
[
Options
,
Events
],
...
...
@@ -25,11 +29,24 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
},
load
:
function
(
data
)
{
this
.
getInputNodes
();
this
.
createActionNode
();
//this.createAddNode();
//this.loadIdentitys();
this
.
loadData
();
var
_load
=
function
()
{
this
.
getInputNodes
();
this
.
createActionNode
();
//this.createAddNode();
//this.loadIdentitys();
this
.
loadData
();
}.
bind
(
this
)
if
(
this
.
app
.
statement
&&
this
.
app
.
statement
.
data
){
this
.
statementData
=
this
.
app
.
statement
.
data
;
_load
();
}
else
if
(
this
.
options
.
statementId
){
o2
.
Actions
.
load
(
"
x_query_assemble_designer
"
).
StatementAction
.
get
(
this
.
options
.
statementId
,
function
(
json
)
{
this
.
statementData
=
json
;
_load
();
}.
bind
(
this
))
}
else
{
_load
();
}
},
loadData
:
function
()
{
if
(
this
.
filtrData
.
filtrData
&&
this
.
filtrData
.
filtrData
.
length
)
{
...
...
@@ -146,7 +163,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
this
.
valueDateInput
=
this
.
inputAreaNode
.
getElement
(
"
.valueDateInput_vf
"
);
this
.
valueTimeInput
=
this
.
inputAreaNode
.
getElement
(
"
.valueTimeInput_vf
"
);
if
(
this
.
app
.
statement
.
view
)
{
if
(
this
.
app
.
statement
&&
this
.
app
.
statement
.
view
)
{
var
dataId
=
this
.
app
.
statement
.
view
.
data
.
id
;
this
.
filterValueType
=
this
.
inputAreaNode
.
getElements
(
"
[name='
"
+
dataId
+
"
viewFilterValueType']
"
);
...
...
@@ -203,82 +220,79 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
this
.
pathInputSelect
.
addEvent
(
"
change
"
,
function
(
ev
)
{
var
option
=
ev
.
target
.
options
[
ev
.
target
.
selectedIndex
];
if
(
!
this
.
statementData
)
return
;
debugger
;
var
type
=
option
.
retrieve
(
"
type
"
);
var
d
=
this
.
app
.
statement
.
data
;
if
(
type
===
"
dynamic
"
){
var
field
=
option
.
retrieve
(
"
field
"
);
if
(
field
){
this
.
titleInput
.
set
(
"
value
"
,
field
.
description
||
field
.
name
);
if
(
field
.
name
){
var
path
=
this
.
pathInput
.
get
(
"
value
"
);
if
(
path
.
indexOf
(
"
.
"
)
>
-
1
){
path
=
path
.
split
(
"
.
"
)[
0
]
+
"
.
"
+
field
.
name
;
}
else
{
var
alias
;
var
tableName
=
option
.
retrieve
(
"
tableName
"
);
if
(
d
.
data
.
indexOf
(
tableName
)
>
-
1
){
var
str
=
d
.
data
.
split
(
tableName
)[
1
].
trim
();
if
(
str
.
indexOf
(
"
"
)
)
alias
=
str
.
split
(
"
"
)[
0
];
}
path
=
alias
?
(
alias
+
"
.
"
+
field
.
name
)
:
field
.
name
;
var
d
=
this
.
statementData
;
var
field
=
option
.
retrieve
(
"
field
"
);
if
(
field
){
this
.
titleInput
.
set
(
"
value
"
,
field
.
description
||
field
.
name
);
if
(
field
.
name
){
var
path
=
this
.
pathInput
.
get
(
"
value
"
);
if
(
path
.
indexOf
(
"
.
"
)
>
-
1
){
path
=
path
.
split
(
"
.
"
)[
0
]
+
"
.
"
+
field
.
name
;
}
else
{
var
alias
;
var
tableName
=
option
.
retrieve
(
"
tableName
"
);
if
(
d
.
data
.
indexOf
(
tableName
)
>
-
1
){
var
str
=
d
.
data
.
split
(
tableName
)[
1
].
trim
();
if
(
str
.
indexOf
(
"
"
)
)
alias
=
str
.
split
(
"
"
)[
0
];
}
this
.
pathInput
.
set
(
"
value
"
,
path
)
;
path
=
alias
?
(
alias
+
"
.
"
+
field
.
name
)
:
field
.
name
;
}
if
(
field
.
type
){
var
t
;
switch
(
field
.
type
)
{
case
"
string
"
:
case
"
stringList
"
:
case
"
stringLob
"
:
case
"
stringMap
"
:
t
=
"
textValue
"
;
break
;
case
"
integer
"
:
case
"
long
"
:
case
"
double
"
:
case
"
integerList
"
:
case
"
longList
"
:
case
"
doubleList
"
:
t
=
"
numberValue
"
;
break
;
case
"
dateTime
"
:
t
=
"
dateTimeValue
"
;
break
;
case
"
date
"
:
t
=
"
dateValue
"
;
break
;
case
"
time
"
:
t
=
"
timeValue
"
;
break
;
case
"
boolean
"
:
case
"
booleanList
"
:
t
=
"
booleanValue
"
;
break
;
default
:
t
=
"
textValue
"
;
break
;
}
for
(
var
i
=
0
;
i
<
this
.
datatypeInput
.
options
.
length
;
i
++
)
{
if
(
this
.
datatypeInput
.
options
[
i
].
value
===
t
)
{
this
.
datatypeInput
.
options
[
i
].
set
(
"
selected
"
,
true
);
this
.
switchInputDisplay
();
if
(
this
.
datatypeInput
.
onchange
)
this
.
datatypeInput
.
onchange
();
break
;
}
this
.
pathInput
.
set
(
"
value
"
,
path
);
}
if
(
field
.
type
){
var
t
;
switch
((
field
.
type
||
"
string
"
).
toLowerCase
())
{
case
"
string
"
:
case
"
stringList
"
:
case
"
stringLob
"
:
case
"
stringMap
"
:
t
=
"
textValue
"
;
break
;
case
"
integer
"
:
case
"
long
"
:
case
"
double
"
:
case
"
integerList
"
:
case
"
longList
"
:
case
"
doubleList
"
:
t
=
"
numberValue
"
;
break
;
case
"
dateTime
"
:
case
"
date
"
:
t
=
"
dateTimeValue
"
;
break
;
// t = "dateValue";
// break;
case
"
time
"
:
t
=
"
timeValue
"
;
break
;
case
"
boolean
"
:
case
"
booleanList
"
:
t
=
"
booleanValue
"
;
break
;
default
:
t
=
"
textValue
"
;
break
;
}
for
(
var
i
=
0
;
i
<
this
.
datatypeInput
.
options
.
length
;
i
++
)
{
if
(
this
.
datatypeInput
.
options
[
i
].
value
===
t
)
{
this
.
datatypeInput
.
options
[
i
].
set
(
"
selected
"
,
true
);
this
.
switchInputDisplay
();
if
(
this
.
datatypeInput
.
onchange
)
this
.
datatypeInput
.
onchange
();
break
;
}
}
}
else
{
this
.
titleInput
.
set
(
"
value
"
,
""
);
this
.
pathInput
.
set
(
"
value
"
,
""
);
this
.
datatypeInput
.
options
[
0
].
set
(
"
selected
"
,
true
);
this
.
switchInputDisplay
();
if
(
this
.
datatypeInput
.
onchange
)
this
.
datatypeInput
.
onchange
();
}
}
else
if
(
type
===
"
official
"
){
}
else
{
this
.
titleInput
.
set
(
"
value
"
,
""
);
this
.
pathInput
.
set
(
"
value
"
,
""
);
this
.
datatypeInput
.
options
[
0
].
set
(
"
selected
"
,
true
);
this
.
switchInputDisplay
();
if
(
this
.
datatypeInput
.
onchange
)
this
.
datatypeInput
.
onchange
();
}
}.
bind
(
this
))
}.
bind
(
this
))
;
this
.
setPathInputSelectOptions
()
//if (this.app.statement.view){
...
...
@@ -330,40 +344,48 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
},
setPathInputSelectOptions
:
function
(){
debugger
;
var
d
=
this
.
app
.
statement
.
d
ata
;
var
d
=
this
.
statementD
ata
;
this
.
pathInputSelect
.
empty
();
if
(
d
.
entityCategory
===
'
dynamic
'
&&
d
.
table
){
o2
.
Actions
.
load
(
"
x_query_assemble_designer
"
).
TableAction
.
get
(
d
.
table
,
function
(
json
){
if
(
json
.
data
.
data
){
if
(
!
this
.
statementData
)
return
;
var
fun
=
function
(
tableName
)
{
o2
.
Actions
.
load
(
"
x_query_assemble_designer
"
).
QueryAction
.
getEntityProperties
(
d
.
entityCategory
===
"
dynamic
"
?
d
.
table
:
d
.
entityClassName
,
d
.
entityCategory
,
function
(
json
){
var
ps
=
this
.
pathInput
.
get
(
"
value
"
).
split
(
"
.
"
);
var
p
=
ps
[
1
]
?
ps
[
1
]
:
ps
[
0
];
var
option
=
new
Element
(
"
option
"
,
{
"
text
"
:
""
,
"
value
"
:
""
}).
inject
(
this
.
pathInputSelect
);
option
.
store
(
"
type
"
,
"
dynamic
"
);
option
.
store
(
"
tableName
"
,
json
.
data
.
name
);
var
fieldJson
=
JSON
.
parse
(
json
.
data
.
data
);
fieldJson
.
fieldList
.
each
(
function
(
field
)
{
option
.
store
(
"
type
"
,
d
.
entityCategory
);
option
.
store
(
"
tableName
"
,
tableName
);
(
json
.
data
||
[]).
each
(
function
(
field
)
{
var
option
=
new
Element
(
"
option
"
,
{
"
text
"
:
field
.
name
+
(
field
.
description
?
(
"
-
"
+
field
.
description
)
:
""
),
"
value
"
:
field
.
name
,
"
selected
"
:
(
field
.
name
===
p
)
}).
inject
(
this
.
pathInputSelect
);
option
.
store
(
"
field
"
,
field
);
option
.
store
(
"
type
"
,
"
dynamic
"
);
option
.
store
(
"
tableName
"
,
json
.
data
.
name
);
option
.
store
(
"
type
"
,
d
.
entityCategory
);
option
.
store
(
"
tableName
"
,
tableName
);
}.
bind
(
this
))
}
}.
bind
(
this
))
}
else
if
(
d
.
entityCategory
===
'
official
'
){
this
.
pathInputSelect
.
empty
();
}.
bind
(
this
)
)
}.
bind
(
this
);
if
(
d
.
entityCategory
===
"
dynamic
"
){
if
(
d
.
table
){
o2
.
Actions
.
load
(
"
x_query_assemble_designer
"
).
TableAction
.
get
(
d
.
table
,
function
(
json
){
fun
(
json
.
data
.
name
)
})
}
}
else
{
fun
(
d
.
entityClassName
.
split
(
"
.
"
).
getLast
()
)
}
},
switchInputDisplay
:
function
()
{
var
id
=
""
;
if
(
this
.
app
.
statement
.
view
)
{
id
=
this
.
app
.
statement
.
view
.
data
.
id
;
}
else
{
return
;
}
var
config
=
{
...
...
@@ -505,7 +527,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
this
.
verificationNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
verificationNode
}).
inject
(
this
.
inputAreaNode
);
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
verificationTextNode
,
"
text
"
:
this
.
app
.
lp
.
mastInputParameter
"
text
"
:
MWF
.
APPDSMD
.
LP
.
mastInputParameter
}).
inject
(
this
.
verificationNode
);
this
.
parameterInput
.
focus
();
this
.
parameterInput
.
setStyle
(
"
background-color
"
,
"
#fbe8e8
"
);
...
...
@@ -529,7 +551,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
}
// if (data.comparison=="range" && !data.otherValue){
// this.verificationNode = new Element("div", {"styles": this.css.verificationNode}).inject(this.inputAreaNode);
// new Element("div", {"styles": this.css.verificationTextNode, "text":
this.app.lp
.mastInputPath}).inject(this.verificationNode);
// new Element("div", {"styles": this.css.verificationTextNode, "text":
MWF.APPDSMD.LP
.mastInputPath}).inject(this.verificationNode);
// }
return
true
;
},
...
...
@@ -538,7 +560,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
this
.
verificationNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
verificationNode
}).
inject
(
this
.
inputAreaNode
);
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
verificationTextNode
,
"
text
"
:
this
.
app
.
lp
.
mastInputTitle
"
text
"
:
MWF
.
APPDSMD
.
LP
.
mastInputTitle
}).
inject
(
this
.
verificationNode
);
this
.
titleInput
.
focus
();
this
.
titleInput
.
setStyle
(
"
background-color
"
,
"
#fbe8e8
"
);
...
...
@@ -562,7 +584,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
}
if
(
!
data
.
path
||
data
.
path
.
indexOf
(
"
.
"
)
<
1
)
{
this
.
verificationNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
verificationNode
}).
inject
(
this
.
inputAreaNode
);
var
text
=
!
data
.
path
?
this
.
app
.
lp
.
mastInputPath
:
this
.
app
.
lp
.
pathExecption
;
var
text
=
!
data
.
path
?
MWF
.
APPDSMD
.
LP
.
mastInputPath
:
MWF
.
APPDSMD
.
LP
.
pathExecption
;
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
verificationTextNode
,
"
text
"
:
text
...
...
@@ -872,7 +894,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter.Item = new Class({
}.
bind
(
this
));
},
getText
:
function
()
{
var
lp
=
this
.
app
.
lp
.
filter
;
var
lp
=
MWF
.
APPDSMD
.
LP
.
filter
;
if
(
this
.
data
.
formatType
===
"
numberValue
"
)
{
return
this
.
data
.
title
+
"
"
+
this
.
data
.
parameter
+
"
"
+
this
.
data
.
value
;
}
else
{
...
...
@@ -903,7 +925,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter.Item = new Class({
},
deleteItem
:
function
(
e
)
{
var
_self
=
this
;
this
.
filter
.
app
.
confirm
(
"
warn
"
,
e
,
this
.
app
.
lp
.
delete_filterItem_title
,
this
.
app
.
lp
.
delete_filterItem
,
300
,
120
,
function
()
{
this
.
filter
.
app
.
confirm
(
"
warn
"
,
e
,
MWF
.
APPDSMD
.
LP
.
delete_filterItem_title
,
MWF
.
APPDSMD
.
LP
.
delete_filterItem
,
300
,
120
,
function
()
{
_self
.
destroy
();
this
.
close
();
},
function
()
{
...
...
@@ -939,7 +961,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemCustom = new Clas
this
.
filter
.
setData
(
this
.
data
);
},
getText
:
function
()
{
var
lp
=
this
.
app
.
lp
.
filter
;
var
lp
=
MWF
.
APPDSMD
.
LP
.
filter
;
return
this
.
data
.
title
+
"
(
"
+
this
.
data
.
path
+
"
)
"
;
},
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录