Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
1d272f42
提交
1d272f42
编写于
11月 01, 2022
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mosher 发布系统代码 [后台服务,演示应用]
上级
0c670ce0
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
249 行增加
和
126 行删除
+249
-126
exp-view-engine.ts
app_Web/src/engine/view/exp-view-engine.ts
+195
-0
grid-exp-view-engine.ts
app_Web/src/engine/view/grid-exp-view-engine.ts
+7
-86
ibizorder-grid-exp-view-base.vue
.../ibizorder-grid-exp-view/ibizorder-grid-exp-view-base.vue
+14
-6
quicksearchform-searchform-base.vue
...searchform-searchform/quicksearchform-searchform-base.vue
+2
-2
grid-exp-viewgridexpbar-gridexpbar-base.vue
...ar-gridexpbar/grid-exp-viewgridexpbar-gridexpbar-base.vue
+31
-32
未找到文件。
app_Web/src/engine/view/exp-view-engine.ts
0 → 100644
浏览文件 @
1d272f42
import
ViewEngine
from
"./view-engine"
;
/**
* 导航视图引擎
*
* @export
* @class ExpViewEngine
* @extends {ViewEngine}
*/
export
class
ExpViewEngine
extends
ViewEngine
{
/**
* 导航栏部件
*
* @protected
* @type {*}
* @memberof ExpViewEngine
*/
protected
expBar
:
any
=
null
;
/**
* 是否真正选中
*
* @protected
* @type {boolean}
* @memberof ExpViewEngine
*/
protected
isRealSelected
:
boolean
=
false
;
/**
* 是否关闭导航视图
*
* @protected
* @type {boolean}
* @memberof ExpViewEngine
*/
protected
isCloseNavView
:
boolean
=
false
;
/**
* 引擎加载
*
* @memberof ExpViewEngine
*/
public
load
()
{
super
.
load
();
if
(
this
.
getExpBar
()
&&
this
.
isLoadDefault
)
{
const
tag
=
this
.
getExpBar
().
name
;
this
.
setViewState2
({
tag
:
tag
,
action
:
'load'
,
viewdata
:
this
.
view
.
viewparams
});
}
else
{
this
.
isLoadDefault
=
true
;
}
}
/**
* 搜索
*
* @param {*} data
* @memberof ExpViewEngine
*/
public
search
(
data
:
any
)
{
const
expBar
=
this
.
getExpBar
();
if
(
expBar
)
{
this
.
setViewState2
({
tag
:
expBar
.
name
,
action
:
'load'
,
viewdata
:
null
});
}
}
/**
* 关闭导航视图
*
* @memberof ExpViewEngine
*/
public
closeNavView
()
{
this
.
view
.
backSplit
=
this
.
view
.
split
;
this
.
view
.
split
=
1
;
this
.
view
.
navItem
=
null
;
this
.
isCloseNavView
=
true
;
}
/**
* 处理导航视图重绘(有选中项,且导航视图需要刷新则通知嵌入导航视图执行刷新逻辑)
*
* @memberof ExpViewEngine
*/
public
handleNavViewRefresh
(
tag
:
string
)
{
if
(
this
.
view
&&
this
.
view
.
viewState
&&
this
.
isRealSelected
)
{
this
.
setViewState2
({
tag
,
action
:
'load'
,
viewdata
:
this
.
view
.
viewparams
});
}
}
/**
* 事件处理
*
* @param {string} ctrlName 事件标识
* @param {string} eventName
* @param {*} args
* @memberof ExpViewEngine
*/
public
onCtrlEvent
(
ctrlName
:
string
,
eventName
:
string
,
args
:
any
)
{
const
expBar
=
this
.
getExpBar
();
if
(
ctrlName
===
expBar
?.
name
)
{
this
.
handleExpBarEvents
(
eventName
,
args
);
}
if
(
ctrlName
===
expBar
?.
xDataControlName
)
{
this
.
handleXDataControlEvents
(
eventName
,
args
);
}
}
/**
* 处理导航栏事件
*
* @protected
* @param {string} eventName
* @param {*} args
* @memberof ExpViewEngine
*/
protected
handleExpBarEvents
(
eventName
:
string
,
args
:
any
)
{
if
(
Object
.
is
(
eventName
,
'load'
))
{
this
.
view
.
$emit
(
'viewload'
,
args
);
}
if
(
Object
.
is
(
eventName
,
'selectionchange'
))
{
if
(
this
.
isCloseNavView
)
{
this
.
isCloseNavView
=
false
;
return
;
}
if
(
this
.
view
&&
args
&&
args
.
srfnavdata
&&
args
.
srfnavdata
.
context
&&
args
.
srfnavdata
.
context
.
viewpath
)
{
this
.
view
.
navItem
=
args
;
if
(
this
.
view
.
backSplit
!==
0
)
{
this
.
view
.
split
=
this
.
view
.
backSplit
;
}
// 计算真实选中值
if
(
args
&&
args
.
data
&&
args
.
data
[
0
])
{
const
selectedData
=
args
.
data
[
0
];
const
result
=
Object
.
keys
(
selectedData
).
find
((
key
:
string
)
=>
{
return
selectedData
[
key
]
!==
null
&&
key
!==
'srfchecked'
;
})
if
(
result
){
this
.
isRealSelected
=
true
;
}
else
{
this
.
isRealSelected
=
false
;
}
}
this
.
view
.
$forceUpdate
();
}
this
.
view
.
$emit
(
'viewdataschange'
,
args
?.
data
);
}
if
(
Object
.
is
(
eventName
,
'activated'
))
{
this
.
view
.
$emit
(
'viewdatasactivated'
,
args
);
}
}
/**
* 处理导航栏数据部件事件
*
* @protected
* @param {string} eventName
* @param {*} args
* @memberof ExpViewEngine
*/
protected
handleXDataControlEvents
(
eventName
:
string
,
args
:
any
)
{
if
(
Object
.
is
(
eventName
,
'beforeload'
))
{
this
.
handleBeforeLoad
(
args
);
}
}
/**
* 导航栏数据部件加载之前
*
* @protected
* @param {*} args
* @memberof ExpViewEngine
*/
protected
handleBeforeLoad
(
args
:
any
)
{
if
(
this
.
view
&&
this
.
view
.
quickGroupData
)
{
Object
.
assign
(
args
,
{
viewparams
:
this
.
view
.
quickGroupData
});
}
}
/**
* 获取导航栏
*
* @return {*}
* @memberof ExpViewEngine
*/
public
getExpBar
()
{
return
this
.
expBar
;
}
/**
* @description 视图销毁
* @memberof ExpViewEngine
*/
public
destroyed
()
{
this
.
expBar
=
null
;
}
}
\ No newline at end of file
app_Web/src/engine/view/grid-exp-view-engine.ts
浏览文件 @
1d272f42
import
ViewEngine
from
'./
view-engine'
;
import
{
ExpViewEngine
}
from
'./exp-
view-engine'
;
/**
* 表格导航视图界面引擎
...
...
@@ -7,24 +7,7 @@ import ViewEngine from './view-engine';
* @class GridExpViewEngine
* @extends {ViewEngine}
*/
export
default
class
GridExpViewEngine
extends
ViewEngine
{
/**
* 表格导航栏部件
*
* @type {*}
* @memberof GridExpViewEngine
*/
public
gridExpBar
:
any
=
null
;
/**
* Creates an instance of GridExpViewEngine.
*
* @memberof GridExpViewEngine
*/
constructor
()
{
super
();
}
export
default
class
GridExpViewEngine
extends
ExpViewEngine
{
/**
* 初始化引擎
...
...
@@ -33,79 +16,17 @@ export default class GridExpViewEngine extends ViewEngine {
* @memberof GridExpViewEngine
*/
public
init
(
options
:
any
):
void
{
this
.
gridE
xpBar
=
options
.
gridexpbar
;
this
.
e
xpBar
=
options
.
gridexpbar
;
super
.
init
(
options
);
}
/**
* 引擎加载
*
* @description 视图销毁
* @memberof GridExpViewEngine
*/
public
load
():
void
{
super
.
load
();
if
(
this
.
getGridExpBar
()
&&
this
.
isLoadDefault
)
{
const
tag
=
this
.
getGridExpBar
().
name
;
this
.
setViewState2
({
tag
:
tag
,
action
:
'load'
,
viewdata
:
this
.
view
.
viewparams
});
}
else
{
this
.
isLoadDefault
=
true
;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof GridExpViewEngine
*/
public
onCtrlEvent
(
ctrlName
:
string
,
eventName
:
string
,
args
:
any
):
void
{
super
.
onCtrlEvent
(
ctrlName
,
eventName
,
args
);
if
(
Object
.
is
(
ctrlName
,
'gridexpbar'
))
{
this
.
gridExpBarEvent
(
eventName
,
args
);
}
public
destroyed
()
{
super
.
destroyed
();
this
.
expBar
=
null
;
}
/**
* 表格导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof GridExpViewEngine
*/
public
gridExpBarEvent
(
eventName
:
string
,
args
:
any
):
void
{
if
(
Object
.
is
(
eventName
,
'load'
))
{
this
.
view
.
$emit
(
'viewload'
,
args
);
}
if
(
Object
.
is
(
eventName
,
'selectionchange'
))
{
this
.
view
.
$emit
(
'viewdataschange'
,
args
);
}
if
(
Object
.
is
(
eventName
,
'activated'
))
{
this
.
view
.
$emit
(
'viewdatasactivated'
,
args
);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof GridExpViewEngine
*/
public
getGridExpBar
():
any
{
return
this
.
gridExpBar
;
}
/**
* @description 销毁
* @memberof GridExpViewEngine
*/
public
destroy
()
{
super
.
destroy
();
this
.
gridExpBar
=
null
;
}
}
\ No newline at end of file
app_Web/src/pages/sample/ibizorder-grid-exp-view/ibizorder-grid-exp-view-base.vue
浏览文件 @
1d272f42
...
...
@@ -29,12 +29,12 @@
</div>
<div
slot=
"right"
>
<component
v-if=
"
selection.view && !Object.is(this.selection.view.viewname, '')
"
:is=
"
selection.view.viewname
"
v-if=
"
navItem && navItem.navView
"
:is=
"
navItem.navView
"
class=
"viewcontainer2"
:viewDefaultUsage=
"false"
:viewdata=
"JSON.stringify(
selection
.context)"
:viewparam=
"JSON.stringify(
selection.viewparam
)"
>
:viewdata=
"JSON.stringify(
navItem.srfnavdata
.context)"
:viewparam=
"JSON.stringify(
navItem.srfnavdata.viewparams
)"
>
</component>
</div>
</split>
...
...
@@ -788,10 +788,18 @@ export default class IBIZOrderGridExpViewBase extends Vue {
/**
* 分隔值
*
* @type {string}
* @type {number}
* @memberof IBIZOrderGridExpViewBase
*/
public
split
:
number
=
0.5
;
/**
* 导航项
*
* @type {*}
* @memberof IBIZOrderGridExpViewBase
*/
public
split
:
number
=
0.3
;
public
navItem
:
any
=
{}
;
/**
* split值变化事件
...
...
app_Web/src/widgets/ibizbook/quicksearchform-searchform/quicksearchform-searchform-base.vue
浏览文件 @
1d272f42
...
...
@@ -621,7 +621,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
List
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Calendar
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
};
...
...
@@ -657,7 +657,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/
public
loadDraft
(
opt
:
any
=
{},
mode
?:
string
):
void
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
List
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOK
Calendar
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
}
;
...
...
app_Web/src/widgets/ibizorder/grid-exp-viewgridexpbar-gridexpbar/grid-exp-viewgridexpbar-gridexpbar-base.vue
浏览文件 @
1d272f42
...
...
@@ -7,8 +7,9 @@
</div>
<div
class=
"container-header"
>
<div
class=
'search-container'
>
<i-input
:search=
"true"
@
on-change=
"($event) =>
{ this.searchText = $event.target.value; }"
<i-input
v-model=
"searchText"
:search=
"true"
:placeholder=
"placeholder"
@
on-search=
"onSearch"
>
</i-input>
...
...
@@ -348,15 +349,7 @@ export default class GridExpViewgridexpbarBase extends Vue implements ControlInt
* @type {(string)}
* @memberof GridExpViewgridexpbarBase
*/
public
searchText
:
string
=
""
;
/**
* 分割宽度
*
* @type {number}
* @memberof GridExpViewgridexpbarBase
*/
public
split
:
number
=
0.5
;
public
searchText
:
string
=
""
;
/**
...
...
@@ -446,7 +439,7 @@ export default class GridExpViewgridexpbarBase extends Vue implements ControlInt
* @memberof GridExpViewgridexpbarBase
*/
public
created
()
{
this
.
afterCreated
();
this
.
afterCreated
();
}
/**
...
...
@@ -530,36 +523,42 @@ export default class GridExpViewgridexpbarBase extends Vue implements ControlInt
* @memberof GridExpViewgridexpbarBase
*/
public
gridexpbar_selectionchange
(
args
:
any
[],
tag
?:
string
,
$event2
?:
any
):
void
{
let
tempContext
:
any
=
{};
let
tempViewParam
:
any
=
{};
const
tempContext
:
any
=
{};
const
tempViewParam
:
any
=
{};
if
(
args
.
length
===
0
)
{
this
.
calcToolbarItemState
(
true
);
return
;
}
const
arg
:
any
=
args
[
0
];
if
(
this
.
context
){
Object
.
assign
(
tempContext
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)));
const
arg
:
any
=
args
[
0
];
if
(
this
.
context
)
{
Object
.
assign
(
tempContext
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)));
}
Object
.
assign
(
tempContext
,
{
'ibizorder'
:
arg
[
'ibizorder'
]});
Object
.
assign
(
tempContext
,
{
srfparentdename
:
'IBIZOrder'
,
srfparentkey
:
arg
[
'ibizorder'
]});
if
(
this
.
navFilter
&&
!
Object
.
is
(
this
.
navFilter
,
""
))
{
Object
.
assign
(
tempViewParam
,
{
[
this
.
navFilter
]:
arg
[
'ibizorder'
]});
}
Object
.
assign
(
tempContext
,{
'ibizorder'
:
arg
[
'ibizorder'
]});
Object
.
assign
(
tempContext
,{
srfparentdename
:
'IBIZOrder'
,
srfparentkey
:
arg
[
'ibizorder'
]});
if
(
this
.
navFilter
&&
!
Object
.
is
(
this
.
navFilter
,
""
)){
Object
.
assign
(
tempViewParam
,{[
this
.
navFilter
]:
arg
[
'ibizorder'
]});
if
(
this
.
navPSDer
&&
!
Object
.
is
(
this
.
navPSDer
,
""
))
{
Object
.
assign
(
tempViewParam
,
{
[
this
.
navPSDer
]:
arg
[
'ibizorder'
]});
}
if
(
this
.
navPSDer
&&
!
Object
.
is
(
this
.
navPSDer
,
""
)){
Object
.
assign
(
tempViewParam
,{[
this
.
navPSDer
]:
arg
[
'ibizorder'
]});
if
(
this
.
navigateContext
&&
Object
.
keys
(
this
.
navigateContext
).
length
>
0
)
{
let
_context
:
any
=
this
.
$util
.
computedNavData
(
arg
,
tempContext
,
tempViewParam
,
this
.
navigateContext
);
Object
.
assign
(
tempContext
,
_context
);
}
if
(
this
.
navigateContext
&&
Object
.
keys
(
this
.
navigateContext
).
length
>
0
)
{
let
_
context
:
any
=
this
.
$util
.
computedNavData
(
arg
,
tempContext
,
tempViewParam
,
this
.
navigateContext
);
Object
.
assign
(
temp
Context
,
_context
);
if
(
this
.
navigateParams
&&
Object
.
keys
(
this
.
navigateParams
).
length
>
0
)
{
let
_
params
:
any
=
this
.
$util
.
computedNavData
(
arg
,
tempContext
,
tempViewParam
,
this
.
navigateParams
);
Object
.
assign
(
temp
ViewParam
,
_params
);
}
if
(
this
.
navigateParams
&&
Object
.
keys
(
this
.
navigateParams
).
length
>
0
){
let
_params
:
any
=
this
.
$util
.
computedNavData
(
arg
,
tempContext
,
tempViewParam
,
this
.
navigateParams
);
Object
.
assign
(
tempViewParam
,
_params
);
const
navItem
:
any
=
{
navView
:
this
.
navViewName
,
data
:
args
,
srfnavdata
:
{
context
:
tempContext
,
viewparams
:
tempViewParam
}
}
this
.
selection
=
{};
Object
.
assign
(
this
.
selection
,
{
view
:
{
viewname
:
this
.
navViewName
},
context
:
tempContext
,
viewparam
:
tempViewParam
});
this
.
calcToolbarItemState
(
false
);
this
.
$
forceUpdate
(
);
this
.
$
emit
(
'selectionchange'
,
navItem
);
}
/**
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录