Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
a8976a85
提交
a8976a85
编写于
11月 11, 2022
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mosher 发布系统代码 [后台服务,演示应用]
上级
170a8301
变更
11
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
1426 行增加
和
1089 行删除
+1426
-1089
app-index-view-appmenu-base.vue
...pp/app-index-view-appmenu/app-index-view-appmenu-base.vue
+13
-8
icon-menu-appmenu-base.vue
.../widgets/app/icon-menu-appmenu/icon-menu-appmenu-base.vue
+16
-11
main-menu-appmenu-base.vue
.../widgets/app/main-menu-appmenu/main-menu-appmenu-base.vue
+451
-446
book-calendar-major-state-calendar-base.vue
...tate-calendar/book-calendar-major-state-calendar-base.vue
+135
-89
custom-calendar-calendar-base.vue
...ustom-calendar-calendar/custom-calendar-calendar-base.vue
+135
-89
ibizbookmonth-calendar-base.vue
...ok/ibizbookmonth-calendar/ibizbookmonth-calendar-base.vue
+135
-89
ibizbookpanel-calendar-base.vue
...ok/ibizbookpanel-calendar/ibizbookpanel-calendar-base.vue
+135
-89
ibizbooktimeline-calendar-base.vue
...zbooktimeline-calendar/ibizbooktimeline-calendar-base.vue
+135
-89
order-calendar-navigation-calendar-base.vue
...tion-calendar/order-calendar-navigation-calendar-base.vue
+135
-89
order-calendar-timeline-navigation-calendar-base.vue
...ndar/order-calendar-timeline-navigation-calendar-base.vue
+135
-89
h2_table.xml
demo-core/src/main/resources/liquibase/h2_table.xml
+1
-1
未找到文件。
app_Web/src/widgets/app/app-index-view-appmenu/app-index-view-appmenu-base.vue
浏览文件 @
a8976a85
...
@@ -559,16 +559,21 @@ export default class AppIndexViewBase extends Vue implements ControlInterface {
...
@@ -559,16 +559,21 @@ export default class AppIndexViewBase extends Vue implements ControlInterface {
* @memberof AppIndexViewBase
* @memberof AppIndexViewBase
*/
*/
public
click
(
item
:
any
)
{
public
click
(
item
:
any
)
{
if
(
item
)
{
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
item
}).
then
((
res
:
boolean
)
=>
{
let
navDataService
=
NavDataService
.
getInstance
();
if
(
!
res
)
{
if
(
Object
.
is
(
this
.
navModel
,
"route"
)){
return
;
navDataService
.
removeNavData
(
this
.
viewtag
);
}
}
switch
(
item
.
appfunctag
)
{
if
(
item
)
{
default
:
let
navDataService
=
NavDataService
.
getInstance
();
console
.
warn
(
'未指定应用功能'
);
if
(
Object
.
is
(
this
.
navModel
,
"route"
)){
navDataService
.
removeNavData
(
this
.
viewtag
);
}
switch
(
item
.
appfunctag
)
{
default
:
console
.
warn
(
'未指定应用功能'
);
}
}
}
}
}
)
}
}
...
...
app_Web/src/widgets/app/icon-menu-appmenu/icon-menu-appmenu-base.vue
浏览文件 @
a8976a85
...
@@ -450,19 +450,24 @@ export default class IconMenuBase extends Vue implements ControlInterface {
...
@@ -450,19 +450,24 @@ export default class IconMenuBase extends Vue implements ControlInterface {
* @memberof IconMenuBase
* @memberof IconMenuBase
*/
*/
public
click
(
item
:
any
)
{
public
click
(
item
:
any
)
{
if
(
item
)
{
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
item
}).
then
((
res
:
boolean
)
=>
{
let
navDataService
=
NavDataService
.
getInstance
();
if
(
!
res
)
{
if
(
Object
.
is
(
this
.
navModel
,
"route"
)){
return
;
navDataService
.
removeNavData
(
this
.
viewtag
);
}
}
switch
(
item
.
appfunctag
)
{
if
(
item
)
{
case
'AppFunc75'
:
let
navDataService
=
NavDataService
.
getInstance
();
this
.
clickAppFunc75
(
item
);
if
(
Object
.
is
(
this
.
navModel
,
"route"
)){
return
;
navDataService
.
removeNavData
(
this
.
viewtag
);
default
:
}
console
.
warn
(
'未指定应用功能'
);
switch
(
item
.
appfunctag
)
{
case
'AppFunc75'
:
this
.
clickAppFunc75
(
item
);
return
;
default
:
console
.
warn
(
'未指定应用功能'
);
}
}
}
}
}
)
}
}
/**
/**
...
...
app_Web/src/widgets/app/main-menu-appmenu/main-menu-appmenu-base.vue
浏览文件 @
a8976a85
...
@@ -637,454 +637,459 @@ export default class MainMenuBase extends Vue implements ControlInterface {
...
@@ -637,454 +637,459 @@ export default class MainMenuBase extends Vue implements ControlInterface {
* @memberof MainMenuBase
* @memberof MainMenuBase
*/
*/
public
click
(
item
:
any
)
{
public
click
(
item
:
any
)
{
if
(
item
)
{
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
item
}).
then
((
res
:
boolean
)
=>
{
let
navDataService
=
NavDataService
.
getInstance
();
if
(
!
res
)
{
if
(
Object
.
is
(
this
.
navModel
,
"route"
)){
return
;
navDataService
.
removeNavData
(
this
.
viewtag
);
}
}
switch
(
item
.
appfunctag
)
{
if
(
item
)
{
case
'AppFunc66'
:
let
navDataService
=
NavDataService
.
getInstance
();
this
.
clickAppFunc66
(
item
);
if
(
Object
.
is
(
this
.
navModel
,
"route"
)){
return
;
navDataService
.
removeNavData
(
this
.
viewtag
);
case
'UsrAppFunc1108357066'
:
}
this
.
clickUsrAppFunc1108357066
(
item
);
switch
(
item
.
appfunctag
)
{
return
;
case
'AppFunc66'
:
case
'Auto338'
:
this
.
clickAppFunc66
(
item
);
this
.
clickAuto338
(
item
);
return
;
return
;
case
'UsrAppFunc1108357066'
:
case
'Auto222'
:
this
.
clickUsrAppFunc1108357066
(
item
);
this
.
clickAuto222
(
item
);
return
;
return
;
case
'Auto338'
:
case
'AppFunc'
:
this
.
clickAuto338
(
item
);
this
.
clickAppFunc
(
item
);
return
;
return
;
case
'Auto222'
:
case
'AppFunc89'
:
this
.
clickAuto222
(
item
);
this
.
clickAppFunc89
(
item
);
return
;
return
;
case
'AppFunc'
:
case
'AppFunc70'
:
this
.
clickAppFunc
(
item
);
this
.
clickAppFunc70
(
item
);
return
;
return
;
case
'AppFunc89'
:
case
'AppFunc50'
:
this
.
clickAppFunc89
(
item
);
this
.
clickAppFunc50
(
item
);
return
;
return
;
case
'AppFunc70'
:
case
'AppFunc82'
:
this
.
clickAppFunc70
(
item
);
this
.
clickAppFunc82
(
item
);
return
;
return
;
case
'AppFunc50'
:
case
'Auto393'
:
this
.
clickAppFunc50
(
item
);
this
.
clickAuto393
(
item
);
return
;
return
;
case
'AppFunc82'
:
case
'AppFunc31'
:
this
.
clickAppFunc82
(
item
);
this
.
clickAppFunc31
(
item
);
return
;
return
;
case
'Auto393'
:
case
'Auto319'
:
this
.
clickAuto393
(
item
);
this
.
clickAuto319
(
item
);
return
;
return
;
case
'AppFunc31'
:
case
'AppFunc23'
:
this
.
clickAppFunc31
(
item
);
this
.
clickAppFunc23
(
item
);
return
;
return
;
case
'Auto319'
:
case
'Auto279'
:
this
.
clickAuto319
(
item
);
this
.
clickAuto279
(
item
);
return
;
return
;
case
'AppFunc23'
:
case
'Auto129'
:
this
.
clickAppFunc23
(
item
);
this
.
clickAuto129
(
item
);
return
;
return
;
case
'Auto279'
:
case
'Auto371'
:
this
.
clickAuto279
(
item
);
this
.
clickAuto371
(
item
);
return
;
return
;
case
'Auto129'
:
case
'Auto111'
:
this
.
clickAuto129
(
item
);
this
.
clickAuto111
(
item
);
return
;
return
;
case
'Auto371'
:
case
'Auto106'
:
this
.
clickAuto371
(
item
);
this
.
clickAuto106
(
item
);
return
;
return
;
case
'Auto111'
:
case
'Auto155'
:
this
.
clickAuto111
(
item
);
this
.
clickAuto155
(
item
);
return
;
return
;
case
'Auto106'
:
case
'Auto151'
:
this
.
clickAuto106
(
item
);
this
.
clickAuto151
(
item
);
return
;
return
;
case
'Auto155'
:
case
'Auto81'
:
this
.
clickAuto155
(
item
);
this
.
clickAuto81
(
item
);
return
;
return
;
case
'Auto151'
:
case
'Auto114'
:
this
.
clickAuto151
(
item
);
this
.
clickAuto114
(
item
);
return
;
return
;
case
'Auto81'
:
case
'AppFunc32'
:
this
.
clickAuto81
(
item
);
this
.
clickAppFunc32
(
item
);
return
;
return
;
case
'Auto114'
:
case
'Auto173'
:
this
.
clickAuto114
(
item
);
this
.
clickAuto173
(
item
);
return
;
return
;
case
'AppFunc32'
:
case
'AppFunc42'
:
this
.
clickAppFunc32
(
item
);
this
.
clickAppFunc42
(
item
);
return
;
return
;
case
'Auto173'
:
case
'AppFunc46'
:
this
.
clickAuto173
(
item
);
this
.
clickAppFunc46
(
item
);
return
;
return
;
case
'AppFunc42'
:
case
'AppFunc56'
:
this
.
clickAppFunc42
(
item
);
this
.
clickAppFunc56
(
item
);
return
;
return
;
case
'AppFunc46'
:
case
'AppFunc58'
:
this
.
clickAppFunc46
(
item
);
this
.
clickAppFunc58
(
item
);
return
;
return
;
case
'AppFunc56'
:
case
'AppFunc57'
:
this
.
clickAppFunc56
(
item
);
this
.
clickAppFunc57
(
item
);
return
;
return
;
case
'AppFunc58'
:
case
'AppFunc59'
:
this
.
clickAppFunc58
(
item
);
this
.
clickAppFunc59
(
item
);
return
;
return
;
case
'AppFunc57'
:
case
'AppFunc60'
:
this
.
clickAppFunc57
(
item
);
this
.
clickAppFunc60
(
item
);
return
;
return
;
case
'AppFunc59'
:
case
'AppFunc41'
:
this
.
clickAppFunc59
(
item
);
this
.
clickAppFunc41
(
item
);
return
;
return
;
case
'AppFunc60'
:
case
'Auto337'
:
this
.
clickAppFunc60
(
item
);
this
.
clickAuto337
(
item
);
return
;
return
;
case
'AppFunc41'
:
case
'Auto402'
:
this
.
clickAppFunc41
(
item
);
this
.
clickAuto402
(
item
);
return
;
return
;
case
'Auto337'
:
case
'AppFunc64'
:
this
.
clickAuto337
(
item
);
this
.
clickAppFunc64
(
item
);
return
;
return
;
case
'Auto402'
:
case
'AppFunc49'
:
this
.
clickAuto402
(
item
);
this
.
clickAppFunc49
(
item
);
return
;
return
;
case
'AppFunc64'
:
case
'AppFunc51'
:
this
.
clickAppFunc64
(
item
);
this
.
clickAppFunc51
(
item
);
return
;
return
;
case
'AppFunc49'
:
case
'AppFunc36'
:
this
.
clickAppFunc49
(
item
);
this
.
clickAppFunc36
(
item
);
return
;
return
;
case
'AppFunc51'
:
case
'AppFunc43'
:
this
.
clickAppFunc51
(
item
);
this
.
clickAppFunc43
(
item
);
return
;
return
;
case
'AppFunc36'
:
case
'Auto176'
:
this
.
clickAppFunc36
(
item
);
this
.
clickAuto176
(
item
);
return
;
return
;
case
'AppFunc43'
:
case
'Auto286'
:
this
.
clickAppFunc43
(
item
);
this
.
clickAuto286
(
item
);
return
;
return
;
case
'Auto176'
:
case
'Auto124'
:
this
.
clickAuto176
(
item
);
this
.
clickAuto124
(
item
);
return
;
return
;
case
'Auto286'
:
case
'AppFunc2'
:
this
.
clickAuto286
(
item
);
this
.
clickAppFunc2
(
item
);
return
;
return
;
case
'Auto124'
:
case
'AppFunc3'
:
this
.
clickAuto124
(
item
);
this
.
clickAppFunc3
(
item
);
return
;
return
;
case
'AppFunc2'
:
case
'AppFunc4'
:
this
.
clickAppFunc2
(
item
);
this
.
clickAppFunc4
(
item
);
return
;
return
;
case
'AppFunc3'
:
case
'AppFunc5'
:
this
.
clickAppFunc3
(
item
);
this
.
clickAppFunc5
(
item
);
return
;
return
;
case
'AppFunc4'
:
case
'AppFunc6'
:
this
.
clickAppFunc4
(
item
);
this
.
clickAppFunc6
(
item
);
return
;
return
;
case
'AppFunc5'
:
case
'AppFunc54'
:
this
.
clickAppFunc5
(
item
);
this
.
clickAppFunc54
(
item
);
return
;
return
;
case
'AppFunc6'
:
case
'AppFunc55'
:
this
.
clickAppFunc6
(
item
);
this
.
clickAppFunc55
(
item
);
return
;
return
;
case
'AppFunc54'
:
case
'AppFunc7'
:
this
.
clickAppFunc54
(
item
);
this
.
clickAppFunc7
(
item
);
return
;
return
;
case
'AppFunc55'
:
case
'AppFunc8'
:
this
.
clickAppFunc55
(
item
);
this
.
clickAppFunc8
(
item
);
return
;
return
;
case
'AppFunc7'
:
case
'AppFunc9'
:
this
.
clickAppFunc7
(
item
);
this
.
clickAppFunc9
(
item
);
return
;
return
;
case
'AppFunc8'
:
case
'AppFunc10'
:
this
.
clickAppFunc8
(
item
);
this
.
clickAppFunc10
(
item
);
return
;
return
;
case
'AppFunc9'
:
case
'AppFunc11'
:
this
.
clickAppFunc9
(
item
);
this
.
clickAppFunc11
(
item
);
return
;
return
;
case
'AppFunc10'
:
case
'AppFunc12'
:
this
.
clickAppFunc10
(
item
);
this
.
clickAppFunc12
(
item
);
return
;
return
;
case
'AppFunc11'
:
case
'AppFunc13'
:
this
.
clickAppFunc11
(
item
);
this
.
clickAppFunc13
(
item
);
return
;
return
;
case
'AppFunc12'
:
case
'AppFunc17'
:
this
.
clickAppFunc12
(
item
);
this
.
clickAppFunc17
(
item
);
return
;
return
;
case
'AppFunc13'
:
case
'AppFunc65'
:
this
.
clickAppFunc13
(
item
);
this
.
clickAppFunc65
(
item
);
return
;
return
;
case
'AppFunc17'
:
case
'AppFunc20'
:
this
.
clickAppFunc17
(
item
);
this
.
clickAppFunc20
(
item
);
return
;
return
;
case
'AppFunc65'
:
case
'AppFunc21'
:
this
.
clickAppFunc65
(
item
);
this
.
clickAppFunc21
(
item
);
return
;
return
;
case
'AppFunc20'
:
case
'AppFunc29'
:
this
.
clickAppFunc20
(
item
);
this
.
clickAppFunc29
(
item
);
return
;
return
;
case
'AppFunc21'
:
case
'AppFunc72'
:
this
.
clickAppFunc21
(
item
);
this
.
clickAppFunc72
(
item
);
return
;
return
;
case
'AppFunc29'
:
case
'Auto375'
:
this
.
clickAppFunc29
(
item
);
this
.
clickAuto375
(
item
);
return
;
return
;
case
'AppFunc72'
:
case
'Auto66'
:
this
.
clickAppFunc72
(
item
);
this
.
clickAuto66
(
item
);
return
;
return
;
case
'Auto375'
:
case
'Auto96'
:
this
.
clickAuto375
(
item
);
this
.
clickAuto96
(
item
);
return
;
return
;
case
'Auto66'
:
case
'Auto235'
:
this
.
clickAuto66
(
item
);
this
.
clickAuto235
(
item
);
return
;
return
;
case
'Auto96'
:
case
'AppFunc74'
:
this
.
clickAuto96
(
item
);
this
.
clickAppFunc74
(
item
);
return
;
return
;
case
'Auto235'
:
case
'AppFunc73'
:
this
.
clickAuto235
(
item
);
this
.
clickAppFunc73
(
item
);
return
;
return
;
case
'AppFunc74'
:
case
'AppFunc14'
:
this
.
clickAppFunc74
(
item
);
this
.
clickAppFunc14
(
item
);
return
;
return
;
case
'AppFunc73'
:
case
'AppFunc15'
:
this
.
clickAppFunc73
(
item
);
this
.
clickAppFunc15
(
item
);
return
;
return
;
case
'AppFunc14'
:
case
'AppFunc16'
:
this
.
clickAppFunc14
(
item
);
this
.
clickAppFunc16
(
item
);
return
;
return
;
case
'AppFunc15'
:
case
'AppFunc19'
:
this
.
clickAppFunc15
(
item
);
this
.
clickAppFunc19
(
item
);
return
;
return
;
case
'AppFunc16'
:
case
'AppFunc71'
:
this
.
clickAppFunc16
(
item
);
this
.
clickAppFunc71
(
item
);
return
;
return
;
case
'AppFunc19'
:
case
'AppFunc25'
:
this
.
clickAppFunc19
(
item
);
this
.
clickAppFunc25
(
item
);
return
;
return
;
case
'AppFunc71'
:
case
'AppFunc26'
:
this
.
clickAppFunc71
(
item
);
this
.
clickAppFunc26
(
item
);
return
;
return
;
case
'AppFunc25'
:
case
'AppFunc27'
:
this
.
clickAppFunc25
(
item
);
this
.
clickAppFunc27
(
item
);
return
;
return
;
case
'AppFunc26'
:
case
'Auto25'
:
this
.
clickAppFunc26
(
item
);
this
.
clickAuto25
(
item
);
return
;
return
;
case
'AppFunc27'
:
case
'Auto387'
:
this
.
clickAppFunc27
(
item
);
this
.
clickAuto387
(
item
);
return
;
return
;
case
'Auto25'
:
case
'Auto320'
:
this
.
clickAuto25
(
item
);
this
.
clickAuto320
(
item
);
return
;
return
;
case
'Auto387'
:
case
'Auto3'
:
this
.
clickAuto387
(
item
);
this
.
clickAuto3
(
item
);
return
;
return
;
case
'Auto320'
:
case
'Auto2'
:
this
.
clickAuto320
(
item
);
this
.
clickAuto2
(
item
);
return
;
return
;
case
'Auto3'
:
case
'Auto213'
:
this
.
clickAuto3
(
item
);
this
.
clickAuto213
(
item
);
return
;
return
;
case
'Auto2'
:
case
'AppFunc45'
:
this
.
clickAuto2
(
item
);
this
.
clickAppFunc45
(
item
);
return
;
return
;
case
'Auto213'
:
case
'AppFunc48'
:
this
.
clickAuto213
(
item
);
this
.
clickAppFunc48
(
item
);
return
;
return
;
case
'AppFunc45'
:
case
'Auto299'
:
this
.
clickAppFunc45
(
item
);
this
.
clickAuto299
(
item
);
return
;
return
;
case
'AppFunc48'
:
case
'AppFunc90'
:
this
.
clickAppFunc48
(
item
);
this
.
clickAppFunc90
(
item
);
return
;
return
;
case
'Auto299'
:
case
'AppFunc91'
:
this
.
clickAuto299
(
item
);
this
.
clickAppFunc91
(
item
);
return
;
return
;
case
'AppFunc90'
:
case
'AppFunc35'
:
this
.
clickAppFunc90
(
item
);
this
.
clickAppFunc35
(
item
);
return
;
return
;
case
'AppFunc91'
:
case
'Auto296'
:
this
.
clickAppFunc91
(
item
);
this
.
clickAuto296
(
item
);
return
;
return
;
case
'AppFunc35'
:
case
'AppFunc85'
:
this
.
clickAppFunc35
(
item
);
this
.
clickAppFunc85
(
item
);
return
;
return
;
case
'Auto296'
:
case
'AppFunc86'
:
this
.
clickAuto296
(
item
);
this
.
clickAppFunc86
(
item
);
return
;
return
;
case
'AppFunc85'
:
case
'AppFunc94'
:
this
.
clickAppFunc85
(
item
);
this
.
clickAppFunc94
(
item
);
return
;
return
;
case
'AppFunc86'
:
case
'AppFunc22'
:
this
.
clickAppFunc86
(
item
);
this
.
clickAppFunc22
(
item
);
return
;
return
;
case
'AppFunc94'
:
case
'UsrAppFunc1109441753'
:
this
.
clickAppFunc94
(
item
);
this
.
clickUsrAppFunc1109441753
(
item
);
return
;
return
;
case
'AppFunc22'
:
case
'AppFunc75'
:
this
.
clickAppFunc22
(
item
);
this
.
clickAppFunc75
(
item
);
return
;
return
;
case
'UsrAppFunc1109441753'
:
case
'AppFunc78'
:
this
.
clickUsrAppFunc1109441753
(
item
);
this
.
clickAppFunc78
(
item
);
return
;
return
;
case
'AppFunc75'
:
case
'Auto67'
:
this
.
clickAppFunc75
(
item
);
this
.
clickAuto67
(
item
);
return
;
return
;
case
'AppFunc78'
:
case
'Auto39'
:
this
.
clickAppFunc78
(
item
);
this
.
clickAuto39
(
item
);
return
;
return
;
case
'Auto67'
:
case
'AppFunc95'
:
this
.
clickAuto67
(
item
);
this
.
clickAppFunc95
(
item
);
return
;
return
;
case
'Auto39'
:
case
'AppFunc88'
:
this
.
clickAuto39
(
item
);
this
.
clickAppFunc88
(
item
);
return
;
return
;
case
'AppFunc95'
:
case
'AppFunc79'
:
this
.
clickAppFunc95
(
item
);
this
.
clickAppFunc79
(
item
);
return
;
return
;
case
'AppFunc88'
:
case
'AppFunc80'
:
this
.
clickAppFunc88
(
item
);
this
.
clickAppFunc80
(
item
);
return
;
return
;
case
'AppFunc79'
:
case
'AppFunc81'
:
this
.
clickAppFunc79
(
item
);
this
.
clickAppFunc81
(
item
);
return
;
return
;
case
'AppFunc80'
:
case
'AppFunc83'
:
this
.
clickAppFunc80
(
item
);
this
.
clickAppFunc83
(
item
);
return
;
return
;
case
'AppFunc81'
:
case
'AppFunc84'
:
this
.
clickAppFunc81
(
item
);
this
.
clickAppFunc84
(
item
);
return
;
return
;
case
'AppFunc83'
:
case
'AppFunc96'
:
this
.
clickAppFunc83
(
item
);
this
.
clickAppFunc96
(
item
);
return
;
return
;
case
'AppFunc84'
:
case
'AppFunc97'
:
this
.
clickAppFunc84
(
item
);
this
.
clickAppFunc97
(
item
);
return
;
return
;
case
'AppFunc96'
:
case
'AppFunc98'
:
this
.
clickAppFunc96
(
item
);
this
.
clickAppFunc98
(
item
);
return
;
return
;
case
'AppFunc97'
:
case
'UsrAppFunc1109902486'
:
this
.
clickAppFunc97
(
item
);
this
.
clickUsrAppFunc1109902486
(
item
);
return
;
return
;
case
'AppFunc98'
:
case
'UsrAppFunc1109992105'
:
this
.
clickAppFunc98
(
item
);
this
.
clickUsrAppFunc1109992105
(
item
);
return
;
return
;
case
'UsrAppFunc1109902486'
:
case
'AppFunc127'
:
this
.
clickUsrAppFunc1109902486
(
item
);
this
.
clickAppFunc127
(
item
);
return
;
return
;
case
'UsrAppFunc1109992105'
:
case
'AppFunc100'
:
this
.
clickUsrAppFunc1109992105
(
item
);
this
.
clickAppFunc100
(
item
);
return
;
return
;
case
'AppFunc127'
:
case
'UsrAppFunc1102681676'
:
this
.
clickAppFunc127
(
item
);
this
.
clickUsrAppFunc1102681676
(
item
);
return
;
return
;
case
'AppFunc100'
:
case
'AppFunc101'
:
this
.
clickAppFunc100
(
item
);
this
.
clickAppFunc101
(
item
);
return
;
return
;
case
'UsrAppFunc1102681676'
:
case
'AppFunc125'
:
this
.
clickUsrAppFunc1102681676
(
item
);
this
.
clickAppFunc125
(
item
);
return
;
return
;
case
'AppFunc101'
:
case
'AppFunc128'
:
this
.
clickAppFunc101
(
item
);
this
.
clickAppFunc128
(
item
);
return
;
return
;
case
'AppFunc125'
:
case
'AppFunc129'
:
this
.
clickAppFunc125
(
item
);
this
.
clickAppFunc129
(
item
);
return
;
return
;
case
'AppFunc128'
:
case
'AppFunc126'
:
this
.
clickAppFunc128
(
item
);
this
.
clickAppFunc126
(
item
);
return
;
return
;
case
'AppFunc129'
:
case
'AppFunc102'
:
this
.
clickAppFunc129
(
item
);
this
.
clickAppFunc102
(
item
);
return
;
return
;
case
'AppFunc126'
:
case
'AppFunc103'
:
this
.
clickAppFunc126
(
item
);
this
.
clickAppFunc103
(
item
);
return
;
return
;
case
'AppFunc102'
:
case
'AppFunc104'
:
this
.
clickAppFunc102
(
item
);
this
.
clickAppFunc104
(
item
);
return
;
return
;
case
'AppFunc103'
:
case
'AppFunc105'
:
this
.
clickAppFunc103
(
item
);
this
.
clickAppFunc105
(
item
);
return
;
return
;
case
'AppFunc104'
:
case
'AppFunc106'
:
this
.
clickAppFunc104
(
item
);
this
.
clickAppFunc106
(
item
);
return
;
return
;
case
'AppFunc105'
:
case
'AppFunc107'
:
this
.
clickAppFunc105
(
item
);
this
.
clickAppFunc107
(
item
);
return
;
return
;
case
'AppFunc106'
:
case
'AppFunc108'
:
this
.
clickAppFunc106
(
item
);
this
.
clickAppFunc108
(
item
);
return
;
return
;
case
'AppFunc107'
:
case
'AppFunc109'
:
this
.
clickAppFunc107
(
item
);
this
.
clickAppFunc109
(
item
);
return
;
return
;
case
'AppFunc108'
:
case
'AppFunc99'
:
this
.
clickAppFunc108
(
item
);
this
.
clickAppFunc99
(
item
);
return
;
return
;
case
'AppFunc109'
:
case
'AppFunc110'
:
this
.
clickAppFunc109
(
item
);
this
.
clickAppFunc110
(
item
);
return
;
return
;
case
'AppFunc99'
:
case
'AppFunc111'
:
this
.
clickAppFunc99
(
item
);
this
.
clickAppFunc111
(
item
);
return
;
return
;
case
'AppFunc110'
:
case
'AppFunc112'
:
this
.
clickAppFunc110
(
item
);
this
.
clickAppFunc112
(
item
);
return
;
return
;
case
'AppFunc111'
:
case
'UsrAppFunc1103578816'
:
this
.
clickAppFunc111
(
item
);
this
.
clickUsrAppFunc1103578816
(
item
);
return
;
return
;
case
'AppFunc112'
:
case
'AppFunc113'
:
this
.
clickAppFunc112
(
item
);
this
.
clickAppFunc113
(
item
);
return
;
return
;
case
'UsrAppFunc1103578816'
:
case
'AppFunc114'
:
this
.
clickUsrAppFunc1103578816
(
item
);
this
.
clickAppFunc114
(
item
);
return
;
return
;
case
'AppFunc113'
:
case
'UsrAppFunc1103276204'
:
this
.
clickAppFunc113
(
item
);
this
.
clickUsrAppFunc1103276204
(
item
);
return
;
return
;
case
'AppFunc114'
:
case
'UsrAppFunc1103793182'
:
this
.
clickAppFunc114
(
item
);
this
.
clickUsrAppFunc1103793182
(
item
);
return
;
return
;
case
'UsrAppFunc1103276204'
:
case
'UsrAppFunc1104195725'
:
this
.
clickUsrAppFunc1103276204
(
item
);
this
.
clickUsrAppFunc1104195725
(
item
);
return
;
return
;
case
'UsrAppFunc1103793182'
:
case
'AppFunc115'
:
this
.
clickUsrAppFunc1103793182
(
item
);
this
.
clickAppFunc115
(
item
);
return
;
return
;
case
'UsrAppFunc1104195725'
:
case
'AppFunc116'
:
this
.
clickUsrAppFunc1104195725
(
item
);
this
.
clickAppFunc116
(
item
);
return
;
return
;
case
'AppFunc115'
:
case
'AppFunc117'
:
this
.
clickAppFunc115
(
item
);
this
.
clickAppFunc117
(
item
);
return
;
return
;
case
'AppFunc116'
:
case
'AppFunc118'
:
this
.
clickAppFunc116
(
item
);
this
.
clickAppFunc118
(
item
);
return
;
return
;
case
'AppFunc117'
:
case
'AppFunc119'
:
this
.
clickAppFunc117
(
item
);
this
.
clickAppFunc119
(
item
);
return
;
return
;
case
'AppFunc118'
:
case
'AppFunc120'
:
this
.
clickAppFunc118
(
item
);
this
.
clickAppFunc120
(
item
);
return
;
return
;
case
'AppFunc119'
:
case
'AppFunc121'
:
this
.
clickAppFunc119
(
item
);
this
.
clickAppFunc121
(
item
);
return
;
return
;
case
'AppFunc120'
:
case
'AppFunc123'
:
this
.
clickAppFunc120
(
item
);
this
.
clickAppFunc123
(
item
);
return
;
return
;
case
'AppFunc121'
:
case
'AppFunc122'
:
this
.
clickAppFunc121
(
item
);
this
.
clickAppFunc122
(
item
);
return
;
return
;
case
'AppFunc123'
:
case
'AppFunc124'
:
this
.
clickAppFunc123
(
item
);
this
.
clickAppFunc124
(
item
);
return
;
return
;
case
'AppFunc122'
:
default
:
this
.
clickAppFunc122
(
item
);
console
.
warn
(
'未指定应用功能'
);
return
;
case
'AppFunc124'
:
this
.
clickAppFunc124
(
item
);
return
;
default
:
console
.
warn
(
'未指定应用功能'
);
}
}
}
}
}
)
}
}
...
...
app_Web/src/widgets/ibizbook/book-calendar-major-state-calendar/book-calendar-major-state-calendar-base.vue
浏览文件 @
a8976a85
...
@@ -649,7 +649,7 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
...
@@ -649,7 +649,7 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
// 处理events数据
// 处理events数据
let
_this
=
this
;
let
_this
=
this
;
let
handleEvents
=
()
=>
{
let
handleEvents
=
()
=>
{
if
(
_this
.
isSelectFirstDefault
){
if
(
_this
.
isSelectFirstDefault
){
// 模拟$event数据
// 模拟$event数据
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
...
@@ -673,29 +673,49 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
...
@@ -673,29 +673,49 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
api
.
updateSize
();
api
.
updateSize
();
}
}
}
}
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
handleEvents
();
handleEvents
();
return
;
return
;
}
else
{
}
else
{
this
.
searchArgCache
=
arg
;
this
.
searchArgCache
=
arg
;
}
}
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforeload'
,
{
viewparams
:
arg
}).
then
((
beforeLoadRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeLoadRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
});
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
});
return
;
}
this
.
handleCtrlEvents
(
'onloadsuccess'
,
{
data
:
response
.
data
}).
then
((
loadSuccessRes
:
boolean
)
=>
{
if
(
!
loadSuccessRes
)
{
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
})
}
}
/**
/**
...
@@ -742,68 +762,74 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
...
@@ -742,68 +762,74 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
* @memberof BookCalendarMajorStateBase
* @memberof BookCalendarMajorStateBase
*/
*/
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
// 处理event数据
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
$event
}).
then
((
res
:
boolean
)
=>
{
let
event
:
any
=
{};
if
(
!
res
)
{
if
(
isOriginData
){
return
;
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
}
else
{
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
}
// 点击选中样式
let
JSelement
:
any
=
null
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
this
.
selectedEventElement
=
JSelement
;
// 处理event数据
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
let
event
:
any
=
{};
}
if
(
isOriginData
){
// 处理上下文数据
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
let
_this
=
this
;
}
else
{
let
view
:
any
=
{};
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item"
:
_context
.
ibizbook
=
event
.
ibizbook
;
view
=
this
.
getEditView
(
"ibizbook"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
}
container
.
subscribe
((
result
:
any
)
=>
{
// 点击选中样式
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
let
JSelement
:
any
=
null
;
return
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
// 刷新日历
this
.
selectedEventElement
=
JSelement
;
_this
.
refresh
();
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
});
}
}
// 处理上下文数据
let
_this
=
this
;
let
view
:
any
=
{};
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item"
:
_context
.
ibizbook
=
event
.
ibizbook
;
view
=
this
.
getEditView
(
"ibizbook"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
// 刷新日历
_this
.
refresh
();
});
}
})
}
}
/**
/**
...
@@ -841,20 +867,40 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
...
@@ -841,20 +867,40 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
_context
.
ibizbook
=
$event
.
event
.
_def
.
extendedProps
.
ibizbook
;
_context
.
ibizbook
=
$event
.
event
.
_def
.
extendedProps
.
ibizbook
;
break
;
break
;
}
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
}
);
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforedrop'
,
{
viewparams
:
arg
}).
then
((
beforeDropRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeDropRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
})
}
this
.
handleCtrlEvents
(
'ondropsuccess'
,
{
data
:
response
.
data
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
})
})
});
});
}
}
...
...
app_Web/src/widgets/ibizbook/custom-calendar-calendar/custom-calendar-calendar-base.vue
浏览文件 @
a8976a85
...
@@ -555,7 +555,7 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
...
@@ -555,7 +555,7 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
// 处理events数据
// 处理events数据
let
_this
=
this
;
let
_this
=
this
;
let
handleEvents
=
()
=>
{
let
handleEvents
=
()
=>
{
if
(
_this
.
isSelectFirstDefault
){
if
(
_this
.
isSelectFirstDefault
){
// 模拟$event数据
// 模拟$event数据
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
...
@@ -579,29 +579,49 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
...
@@ -579,29 +579,49 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
api
.
updateSize
();
api
.
updateSize
();
}
}
}
}
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
handleEvents
();
handleEvents
();
return
;
return
;
}
else
{
}
else
{
this
.
searchArgCache
=
arg
;
this
.
searchArgCache
=
arg
;
}
}
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforeload'
,
{
viewparams
:
arg
}).
then
((
beforeLoadRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeLoadRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
});
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
});
return
;
}
this
.
handleCtrlEvents
(
'onloadsuccess'
,
{
data
:
response
.
data
}).
then
((
loadSuccessRes
:
boolean
)
=>
{
if
(
!
loadSuccessRes
)
{
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
})
}
}
/**
/**
...
@@ -637,68 +657,74 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
...
@@ -637,68 +657,74 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
* @memberof CustomCalendarBase
* @memberof CustomCalendarBase
*/
*/
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
// 处理event数据
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
$event
}).
then
((
res
:
boolean
)
=>
{
let
event
:
any
=
{};
if
(
!
res
)
{
if
(
isOriginData
){
return
;
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
}
else
{
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
}
// 点击选中样式
let
JSelement
:
any
=
null
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
this
.
selectedEventElement
=
JSelement
;
// 处理event数据
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
let
event
:
any
=
{};
}
if
(
isOriginData
){
// 处理上下文数据
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
let
_this
=
this
;
}
else
{
let
view
:
any
=
{};
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item"
:
_context
.
ibizbook
=
event
.
ibizbook
;
view
=
this
.
getEditView
(
"ibizbook"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
}
container
.
subscribe
((
result
:
any
)
=>
{
// 点击选中样式
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
let
JSelement
:
any
=
null
;
return
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
// 刷新日历
this
.
selectedEventElement
=
JSelement
;
_this
.
refresh
();
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
});
}
}
// 处理上下文数据
let
_this
=
this
;
let
view
:
any
=
{};
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item"
:
_context
.
ibizbook
=
event
.
ibizbook
;
view
=
this
.
getEditView
(
"ibizbook"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
// 刷新日历
_this
.
refresh
();
});
}
})
}
}
/**
/**
...
@@ -736,20 +762,40 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
...
@@ -736,20 +762,40 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
_context
.
ibizbook
=
$event
.
event
.
_def
.
extendedProps
.
ibizbook
;
_context
.
ibizbook
=
$event
.
event
.
_def
.
extendedProps
.
ibizbook
;
break
;
break
;
}
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
}
);
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforedrop'
,
{
viewparams
:
arg
}).
then
((
beforeDropRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeDropRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
})
}
this
.
handleCtrlEvents
(
'ondropsuccess'
,
{
data
:
response
.
data
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
})
})
});
});
}
}
...
...
app_Web/src/widgets/ibizbook/ibizbookmonth-calendar/ibizbookmonth-calendar-base.vue
浏览文件 @
a8976a85
...
@@ -822,7 +822,7 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
...
@@ -822,7 +822,7 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
// 处理events数据
// 处理events数据
let
_this
=
this
;
let
_this
=
this
;
let
handleEvents
=
()
=>
{
let
handleEvents
=
()
=>
{
if
(
_this
.
isSelectFirstDefault
){
if
(
_this
.
isSelectFirstDefault
){
// 模拟$event数据
// 模拟$event数据
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
...
@@ -846,29 +846,49 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
...
@@ -846,29 +846,49 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
api
.
updateSize
();
api
.
updateSize
();
}
}
}
}
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
handleEvents
();
handleEvents
();
return
;
return
;
}
else
{
}
else
{
this
.
searchArgCache
=
arg
;
this
.
searchArgCache
=
arg
;
}
}
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforeload'
,
{
viewparams
:
arg
}).
then
((
beforeLoadRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeLoadRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
return
;
}
}
// 默认选中第一项
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
this
.
events
=
response
.
data
;
post
.
then
((
response
:
any
)
=>
{
handleEvents
();
if
(
!
response
||
response
.
status
!==
200
)
{
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
if
(
!
loadErrorRes
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
if
(
response
.
data
&&
response
.
data
.
message
)
{
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
});
return
;
}
this
.
handleCtrlEvents
(
'onloadsuccess'
,
{
data
:
response
.
data
}).
then
((
loadSuccessRes
:
boolean
)
=>
{
if
(
!
loadSuccessRes
)
{
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
})
}
}
/**
/**
...
@@ -915,68 +935,74 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
...
@@ -915,68 +935,74 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
* @memberof IBIZBOOKMONTHBase
* @memberof IBIZBOOKMONTHBase
*/
*/
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
// 处理event数据
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
$event
}).
then
((
res
:
boolean
)
=>
{
let
event
:
any
=
{};
if
(
!
res
)
{
if
(
isOriginData
){
return
;
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
}
else
{
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
}
// 点击选中样式
let
JSelement
:
any
=
null
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
this
.
selectedEventElement
=
JSelement
;
// 处理event数据
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
let
event
:
any
=
{};
}
if
(
isOriginData
){
// 处理上下文数据
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
let
_this
=
this
;
}
else
{
let
view
:
any
=
{};
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item1"
:
_context
.
ibizbook
=
event
.
ibizbook
;
view
=
this
.
getEditView
(
"ibizbook"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
}
container
.
subscribe
((
result
:
any
)
=>
{
// 点击选中样式
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
let
JSelement
:
any
=
null
;
return
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
// 刷新日历
this
.
selectedEventElement
=
JSelement
;
_this
.
refresh
();
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
});
}
}
// 处理上下文数据
let
_this
=
this
;
let
view
:
any
=
{};
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item1"
:
_context
.
ibizbook
=
event
.
ibizbook
;
view
=
this
.
getEditView
(
"ibizbook"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
// 刷新日历
_this
.
refresh
();
});
}
})
}
}
/**
/**
...
@@ -1014,20 +1040,40 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
...
@@ -1014,20 +1040,40 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
_context
.
ibizbook
=
$event
.
event
.
_def
.
extendedProps
.
ibizbook
;
_context
.
ibizbook
=
$event
.
event
.
_def
.
extendedProps
.
ibizbook
;
break
;
break
;
}
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
}
);
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforedrop'
,
{
viewparams
:
arg
}).
then
((
beforeDropRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeDropRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
})
}
this
.
handleCtrlEvents
(
'ondropsuccess'
,
{
data
:
response
.
data
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
})
})
});
});
}
}
...
...
app_Web/src/widgets/ibizbook/ibizbookpanel-calendar/ibizbookpanel-calendar-base.vue
浏览文件 @
a8976a85
...
@@ -732,7 +732,7 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
...
@@ -732,7 +732,7 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
// 处理events数据
// 处理events数据
let
_this
=
this
;
let
_this
=
this
;
let
handleEvents
=
()
=>
{
let
handleEvents
=
()
=>
{
if
(
_this
.
isSelectFirstDefault
){
if
(
_this
.
isSelectFirstDefault
){
// 模拟$event数据
// 模拟$event数据
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
...
@@ -756,29 +756,49 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
...
@@ -756,29 +756,49 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
api
.
updateSize
();
api
.
updateSize
();
}
}
}
}
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
handleEvents
();
handleEvents
();
return
;
return
;
}
else
{
}
else
{
this
.
searchArgCache
=
arg
;
this
.
searchArgCache
=
arg
;
}
}
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforeload'
,
{
viewparams
:
arg
}).
then
((
beforeLoadRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeLoadRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
return
;
}
}
// 默认选中第一项
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
this
.
events
=
response
.
data
;
post
.
then
((
response
:
any
)
=>
{
handleEvents
();
if
(
!
response
||
response
.
status
!==
200
)
{
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
if
(
!
loadErrorRes
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
if
(
response
.
data
&&
response
.
data
.
message
)
{
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
});
return
;
}
this
.
handleCtrlEvents
(
'onloadsuccess'
,
{
data
:
response
.
data
}).
then
((
loadSuccessRes
:
boolean
)
=>
{
if
(
!
loadSuccessRes
)
{
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
})
}
}
/**
/**
...
@@ -814,68 +834,74 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
...
@@ -814,68 +834,74 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
* @memberof IBIZBOOKPANELBase
* @memberof IBIZBOOKPANELBase
*/
*/
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
// 处理event数据
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
$event
}).
then
((
res
:
boolean
)
=>
{
let
event
:
any
=
{};
if
(
!
res
)
{
if
(
isOriginData
){
return
;
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
}
else
{
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
}
// 点击选中样式
let
JSelement
:
any
=
null
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
this
.
selectedEventElement
=
JSelement
;
// 处理event数据
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
let
event
:
any
=
{};
}
if
(
isOriginData
){
// 处理上下文数据
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
let
_this
=
this
;
}
else
{
let
view
:
any
=
{};
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item1"
:
_context
.
ibizbook
=
event
.
ibizbook
;
view
=
this
.
getEditView
(
"ibizbook"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
}
container
.
subscribe
((
result
:
any
)
=>
{
// 点击选中样式
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
let
JSelement
:
any
=
null
;
return
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
// 刷新日历
this
.
selectedEventElement
=
JSelement
;
_this
.
refresh
();
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
});
}
}
// 处理上下文数据
let
_this
=
this
;
let
view
:
any
=
{};
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item1"
:
_context
.
ibizbook
=
event
.
ibizbook
;
view
=
this
.
getEditView
(
"ibizbook"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
// 刷新日历
_this
.
refresh
();
});
}
})
}
}
/**
/**
...
@@ -913,20 +939,40 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
...
@@ -913,20 +939,40 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
_context
.
ibizbook
=
$event
.
event
.
_def
.
extendedProps
.
ibizbook
;
_context
.
ibizbook
=
$event
.
event
.
_def
.
extendedProps
.
ibizbook
;
break
;
break
;
}
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
}
);
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforedrop'
,
{
viewparams
:
arg
}).
then
((
beforeDropRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeDropRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
})
}
this
.
handleCtrlEvents
(
'ondropsuccess'
,
{
data
:
response
.
data
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
})
})
});
});
}
}
...
...
app_Web/src/widgets/ibizbook/ibizbooktimeline-calendar/ibizbooktimeline-calendar-base.vue
浏览文件 @
a8976a85
...
@@ -838,7 +838,7 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
...
@@ -838,7 +838,7 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
// 处理events数据
// 处理events数据
let
_this
=
this
;
let
_this
=
this
;
let
handleEvents
=
()
=>
{
let
handleEvents
=
()
=>
{
if
(
_this
.
isSelectFirstDefault
){
if
(
_this
.
isSelectFirstDefault
){
// 模拟$event数据
// 模拟$event数据
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
...
@@ -862,29 +862,49 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
...
@@ -862,29 +862,49 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
api
.
updateSize
();
api
.
updateSize
();
}
}
}
}
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
handleEvents
();
handleEvents
();
return
;
return
;
}
else
{
}
else
{
this
.
searchArgCache
=
arg
;
this
.
searchArgCache
=
arg
;
}
}
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforeload'
,
{
viewparams
:
arg
}).
then
((
beforeLoadRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeLoadRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
return
;
}
}
// 默认选中第一项
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
this
.
events
=
response
.
data
;
post
.
then
((
response
:
any
)
=>
{
handleEvents
();
if
(
!
response
||
response
.
status
!==
200
)
{
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
if
(
!
loadErrorRes
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
if
(
response
.
data
&&
response
.
data
.
message
)
{
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
});
return
;
}
this
.
handleCtrlEvents
(
'onloadsuccess'
,
{
data
:
response
.
data
}).
then
((
loadSuccessRes
:
boolean
)
=>
{
if
(
!
loadSuccessRes
)
{
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
})
}
}
/**
/**
...
@@ -920,68 +940,74 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
...
@@ -920,68 +940,74 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
* @memberof IBIZBOOKTIMELINEBase
* @memberof IBIZBOOKTIMELINEBase
*/
*/
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
// 处理event数据
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
$event
}).
then
((
res
:
boolean
)
=>
{
let
event
:
any
=
{};
if
(
!
res
)
{
if
(
isOriginData
){
return
;
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
}
else
{
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
}
// 点击选中样式
let
JSelement
:
any
=
null
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
this
.
selectedEventElement
=
JSelement
;
// 处理event数据
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
let
event
:
any
=
{};
}
if
(
isOriginData
){
// 处理上下文数据
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
let
_this
=
this
;
}
else
{
let
view
:
any
=
{};
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item1"
:
_context
.
ibizbook
=
event
.
ibizbook
;
view
=
this
.
getEditView
(
"ibizbook"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
}
container
.
subscribe
((
result
:
any
)
=>
{
// 点击选中样式
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
let
JSelement
:
any
=
null
;
return
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
// 刷新日历
this
.
selectedEventElement
=
JSelement
;
_this
.
refresh
();
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
});
}
}
// 处理上下文数据
let
_this
=
this
;
let
view
:
any
=
{};
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item1"
:
_context
.
ibizbook
=
event
.
ibizbook
;
view
=
this
.
getEditView
(
"ibizbook"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
// 刷新日历
_this
.
refresh
();
});
}
})
}
}
/**
/**
...
@@ -1019,20 +1045,40 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
...
@@ -1019,20 +1045,40 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
_context
.
ibizbook
=
$event
.
event
.
_def
.
extendedProps
.
ibizbook
;
_context
.
ibizbook
=
$event
.
event
.
_def
.
extendedProps
.
ibizbook
;
break
;
break
;
}
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
}
);
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforedrop'
,
{
viewparams
:
arg
}).
then
((
beforeDropRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeDropRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
})
}
this
.
handleCtrlEvents
(
'ondropsuccess'
,
{
data
:
response
.
data
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
})
})
});
});
}
}
...
...
app_Web/src/widgets/ibizorder/order-calendar-navigation-calendar/order-calendar-navigation-calendar-base.vue
浏览文件 @
a8976a85
...
@@ -570,7 +570,7 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
...
@@ -570,7 +570,7 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
// 处理events数据
// 处理events数据
let
_this
=
this
;
let
_this
=
this
;
let
handleEvents
=
()
=>
{
let
handleEvents
=
()
=>
{
if
(
_this
.
isSelectFirstDefault
){
if
(
_this
.
isSelectFirstDefault
){
// 模拟$event数据
// 模拟$event数据
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
...
@@ -594,29 +594,49 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
...
@@ -594,29 +594,49 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
api
.
updateSize
();
api
.
updateSize
();
}
}
}
}
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
handleEvents
();
handleEvents
();
return
;
return
;
}
else
{
}
else
{
this
.
searchArgCache
=
arg
;
this
.
searchArgCache
=
arg
;
}
}
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforeload'
,
{
viewparams
:
arg
}).
then
((
beforeLoadRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeLoadRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
});
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
});
return
;
}
this
.
handleCtrlEvents
(
'onloadsuccess'
,
{
data
:
response
.
data
}).
then
((
loadSuccessRes
:
boolean
)
=>
{
if
(
!
loadSuccessRes
)
{
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
})
}
}
/**
/**
...
@@ -674,68 +694,74 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
...
@@ -674,68 +694,74 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
* @memberof OrderCalendarNavigationBase
* @memberof OrderCalendarNavigationBase
*/
*/
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
// 处理event数据
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
$event
}).
then
((
res
:
boolean
)
=>
{
let
event
:
any
=
{};
if
(
!
res
)
{
if
(
isOriginData
){
return
;
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
}
else
{
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
}
// 点击选中样式
let
JSelement
:
any
=
null
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
this
.
selectedEventElement
=
JSelement
;
// 处理event数据
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
let
event
:
any
=
{};
}
if
(
isOriginData
){
// 处理上下文数据
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
let
_this
=
this
;
}
else
{
let
view
:
any
=
{};
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item1"
:
_context
.
ibizorder
=
event
.
ibizorder
;
view
=
this
.
getEditView
(
"ibizorder"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
}
container
.
subscribe
((
result
:
any
)
=>
{
// 点击选中样式
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
let
JSelement
:
any
=
null
;
return
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
// 刷新日历
this
.
selectedEventElement
=
JSelement
;
_this
.
refresh
();
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
});
}
}
// 处理上下文数据
let
_this
=
this
;
let
view
:
any
=
{};
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item1"
:
_context
.
ibizorder
=
event
.
ibizorder
;
view
=
this
.
getEditView
(
"ibizorder"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
// 刷新日历
_this
.
refresh
();
});
}
})
}
}
/**
/**
...
@@ -773,20 +799,40 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
...
@@ -773,20 +799,40 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
_context
.
ibizorder
=
$event
.
event
.
_def
.
extendedProps
.
ibizorder
;
_context
.
ibizorder
=
$event
.
event
.
_def
.
extendedProps
.
ibizorder
;
break
;
break
;
}
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
}
);
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforedrop'
,
{
viewparams
:
arg
}).
then
((
beforeDropRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeDropRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
})
}
this
.
handleCtrlEvents
(
'ondropsuccess'
,
{
data
:
response
.
data
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
})
})
});
});
}
}
...
...
app_Web/src/widgets/ibizorder/order-calendar-timeline-navigation-calendar/order-calendar-timeline-navigation-calendar-base.vue
浏览文件 @
a8976a85
...
@@ -563,7 +563,7 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
...
@@ -563,7 +563,7 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
Object
.
assign
(
arg
,
{
viewparams
:
tempViewParams
});
// 处理events数据
// 处理events数据
let
_this
=
this
;
let
_this
=
this
;
let
handleEvents
=
()
=>
{
let
handleEvents
=
()
=>
{
if
(
_this
.
isSelectFirstDefault
){
if
(
_this
.
isSelectFirstDefault
){
// 模拟$event数据
// 模拟$event数据
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
let
tempEvent
=
JSON
.
parse
(
JSON
.
stringify
(
_this
.
events
.
length
>
0
?
_this
.
events
[
0
]:{}));
...
@@ -587,29 +587,49 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
...
@@ -587,29 +587,49 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
api
.
updateSize
();
api
.
updateSize
();
}
}
}
}
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
if
(
JSON
.
stringify
(
arg
)
===
JSON
.
stringify
(
this
.
searchArgCache
))
{
handleEvents
();
handleEvents
();
return
;
return
;
}
else
{
}
else
{
this
.
searchArgCache
=
arg
;
this
.
searchArgCache
=
arg
;
}
}
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforeload'
,
{
viewparams
:
arg
}).
then
((
beforeLoadRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeLoadRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
});
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
});
return
;
}
this
.
handleCtrlEvents
(
'onloadsuccess'
,
{
data
:
response
.
data
}).
then
((
loadSuccessRes
:
boolean
)
=>
{
if
(
!
loadSuccessRes
)
{
return
;
}
// 默认选中第一项
this
.
events
=
response
.
data
;
handleEvents
();
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'onloaderror'
,
{
viewparams
:
arg
}).
then
((
loadErrorRes
:
boolean
)
=>
{
if
(
!
loadErrorRes
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
})
}
}
/**
/**
...
@@ -667,68 +687,74 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
...
@@ -667,68 +687,74 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
* @memberof OrderCalendarTimelineNavigationBase
* @memberof OrderCalendarTimelineNavigationBase
*/
*/
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
public
onEventClick
(
$event
:
any
,
isOriginData
:
boolean
=
false
,
$event2
?:
any
)
{
// 处理event数据
this
.
handleCtrlEvents
(
'onselectionchange'
,
{
data
:
$event
}).
then
((
res
:
boolean
)
=>
{
let
event
:
any
=
{};
if
(
!
res
)
{
if
(
isOriginData
){
return
;
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
}
else
{
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
}
// 点击选中样式
let
JSelement
:
any
=
null
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
this
.
selectedEventElement
=
JSelement
;
// 处理event数据
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
let
event
:
any
=
{};
}
if
(
isOriginData
){
// 处理上下文数据
event
=
JSON
.
parse
(
JSON
.
stringify
(
$event
));
let
_this
=
this
;
}
else
{
let
view
:
any
=
{};
event
=
Object
.
assign
({
title
:
$event
.
event
.
title
,
start
:
$event
.
event
.
start
,
end
:
$event
.
event
.
end
},
$event
.
event
.
extendedProps
);
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item1"
:
_context
.
ibizorder
=
event
.
ibizorder
;
view
=
this
.
getEditView
(
"ibizorder"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
}
container
.
subscribe
((
result
:
any
)
=>
{
// 点击选中样式
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
let
JSelement
:
any
=
null
;
return
;
if
(
!
isOriginData
&&
$event
.
el
){
JSelement
=
$event
.
el
;
}
else
if
(
isOriginData
&&
$event2
&&
$event2
.
currentTarget
){
JSelement
=
$event2
.
currentTarget
;
}
if
(
JSelement
){
this
.
calendarClass
=
"calendar"
;
if
(
this
.
selectedEventElement
){
this
.
selectedEventElement
.
classList
.
remove
(
"selected-event"
);
}
}
// 刷新日历
this
.
selectedEventElement
=
JSelement
;
_this
.
refresh
();
this
.
selectedEventElement
.
classList
.
add
(
"selected-event"
);
});
}
}
// 处理上下文数据
let
_this
=
this
;
let
view
:
any
=
{};
let
_context
:
any
=
Object
.
assign
({},
this
.
context
);
let
_viewparams
:
any
=
Object
.
assign
({
start
:
event
.
start
,
end
:
event
.
end
},
this
.
viewparams
);
switch
(
event
.
itemType
)
{
case
"item1"
:
_context
.
ibizorder
=
event
.
ibizorder
;
view
=
this
.
getEditView
(
"ibizorder"
);
break
;
}
this
.
selections
=
[
event
];
// 导航栏中不需要打开视图,只要抛出选中数据
if
(
this
.
isSelectFirstDefault
){
this
.
$emit
(
"selectionchange"
,
this
.
selections
);
return
;
}
// 根据打开模式打开视图
if
(
!
view
.
viewname
){
return
;
}
else
if
(
Object
.
is
(
view
.
placement
,
'INDEXVIEWTAB'
)
||
Object
.
is
(
view
.
placement
,
''
))
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
JSON
.
parse
(
JSON
.
stringify
(
_context
))]
,
_viewparams
);
this
.
$router
.
push
(
routePath
);
}
else
{
let
container
:
Subject
<
any
>
=
new
Subject
();
if
(
Object
.
is
(
view
.
placement
,
'POPOVER'
))
{
container
=
this
.
$apppopover
.
openPop
(
isOriginData
?
$event2
:
$event
.
jsEvent
,
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
Object
.
is
(
view
.
placement
,
'POPUPMODAL'
))
{
container
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
else
if
(
view
.
placement
.
startsWith
(
'DRAWER'
))
{
container
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
_viewparams
);
}
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
// 刷新日历
_this
.
refresh
();
});
}
})
}
}
/**
/**
...
@@ -766,20 +792,40 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
...
@@ -766,20 +792,40 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
_context
.
ibizorder
=
$event
.
event
.
_def
.
extendedProps
.
ibizorder
;
_context
.
ibizorder
=
$event
.
event
.
_def
.
extendedProps
.
ibizorder
;
break
;
break
;
}
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
}
);
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
this
.
handleCtrlEvents
(
'onbeforedrop'
,
{
viewparams
:
arg
}).
then
((
beforeDropRes
:
boolean
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
beforeDropRes
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
const
post
:
Promise
<
any
>
=
this
.
service
.
update
(
itemType
,
JSON
.
parse
(
JSON
.
stringify
(
_context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
.
data
&&
response
.
data
.
message
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
})
}
this
.
handleCtrlEvents
(
'ondropsuccess'
,
{
data
:
response
.
data
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
})
},
(
response
:
any
)
=>
{
this
.
handleCtrlEvents
(
'ondroperror'
,
{
data
:
response
&&
response
.
data
?
response
.
data
:
[]
}).
then
((
res
:
boolean
)
=>
{
if
(
!
res
)
{
return
;
}
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
})
})
});
});
}
}
...
...
demo-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
a8976a85
...
@@ -172,7 +172,7 @@
...
@@ -172,7 +172,7 @@
<!--输出实体[IBIZBOOK]数据结构 -->
<!--输出实体[IBIZBOOK]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-80
4
-7"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-80
5
-7"
>
<createTable
tableName=
"T_IBIZBOOK"
>
<createTable
tableName=
"T_IBIZBOOK"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
</column>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录