Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
b09c337b
提交
b09c337b
编写于
12月 01, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ShineKOT 发布系统代码 [后台服务,演示应用]
上级
73ee698b
变更
35
隐藏空白字符变更
内嵌
并排
正在显示
35 个修改的文件
包含
3103 行增加
和
71 行删除
+3103
-71
ibizbook_en_US.ts
...Web/src/locale/lanres/entities/ibizbook/ibizbook_en_US.ts
+1
-0
ibizbook_zh_CN.ts
...Web/src/locale/lanres/entities/ibizbook/ibizbook_zh_CN.ts
+1
-0
main-menu-appmenu.ts
app_Web/src/mock/app/main-menu-appmenu/main-menu-appmenu.ts
+1
-1
ibizorder-dashboard-view-base.vue
...bizorder-dashboard-view/ibizorder-dashboard-view-base.vue
+659
-0
ibizorder-dashboard-view.less
...le/ibizorder-dashboard-view/ibizorder-dashboard-view.less
+29
-0
ibizorder-dashboard-view.vue
...ple/ibizorder-dashboard-view/ibizorder-dashboard-view.vue
+22
-0
page-register.ts
app_Web/src/pages/sample/index/page-register.ts
+1
-1
router.ts
app_Web/src/pages/sample/index/router.ts
+27
-27
state.ts
app_Web/src/store/modules/view-action/state.ts
+10
-11
main-menu-appmenu-base.vue
.../widgets/app/main-menu-appmenu/main-menu-appmenu-base.vue
+26
-26
main-menu-appmenu-model.ts
.../widgets/app/main-menu-appmenu/main-menu-appmenu-model.ts
+1
-1
guide-wizardpanel-model.ts
...ets/ibizbook/guide-wizardpanel/guide-wizardpanel-model.ts
+4
-0
main-multieditviewpanel-model.ts
.../main-multieditviewpanel/main-multieditviewpanel-model.ts
+3
-0
portal-components-chart-portlet-base.vue
...ts-chart-portlet/portal-components-chart-portlet-base.vue
+1
-1
portal-components-list2-portlet-base.vue
...ts-list2-portlet/portal-components-list2-portlet-base.vue
+339
-0
portal-components-list2-portlet-model.ts
...ts-list2-portlet/portal-components-list2-portlet-model.ts
+88
-0
portal-components-list2-portlet-service.ts
...-list2-portlet/portal-components-list2-portlet-service.ts
+11
-0
portal-components-list2-portlet.less
...onents-list2-portlet/portal-components-list2-portlet.less
+63
-0
portal-components-list2-portlet.vue
...ponents-list2-portlet/portal-components-list2-portlet.vue
+17
-0
usr-dashboard-base.vue
...rc/widgets/ibizorder/usr-dashboard/usr-dashboard-base.vue
+436
-0
usr-dashboard-model.ts
...rc/widgets/ibizorder/usr-dashboard/usr-dashboard-model.ts
+88
-0
usr-dashboard-service.ts
.../widgets/ibizorder/usr-dashboard/usr-dashboard-service.ts
+11
-0
usr-dashboard.less
...eb/src/widgets/ibizorder/usr-dashboard/usr-dashboard.less
+27
-0
usr-dashboard.vue
...Web/src/widgets/ibizorder/usr-dashboard/usr-dashboard.vue
+18
-0
usr-list-base.vue
app_Web/src/widgets/ibizorder/usr-list/usr-list-base.vue
+817
-0
usr-list-model.ts
app_Web/src/widgets/ibizorder/usr-list/usr-list-model.ts
+92
-0
usr-list-service.ts
app_Web/src/widgets/ibizorder/usr-list/usr-list-service.ts
+163
-0
usr-list.less
app_Web/src/widgets/ibizorder/usr-list/usr-list.less
+81
-0
usr-list.vue
app_Web/src/widgets/ibizorder/usr-list/usr-list.vue
+14
-0
IBIZBOOK.java
...src/main/java/cn/ibizlab/core/sample/domain/IBIZBOOK.java
+15
-0
h2_table.xml
demo-core/src/main/resources/liquibase/h2_table.xml
+2
-0
IBIZBOOKMapper.xml
.../main/resources/mapper/sample/ibizbook/IBIZBOOKMapper.xml
+3
-3
DemoSys.json
demo-core/src/main/resources/sysmodel/DemoSys.json
+14
-0
IBIZBOOKDTO.java
...api/src/main/java/cn/ibizlab/demoapi/dto/IBIZBOOKDTO.java
+17
-0
StaticDict.java
demo-util/src/main/java/cn/ibizlab/util/dict/StaticDict.java
+1
-0
未找到文件。
app_Web/src/locale/lanres/entities/ibizbook/ibizbook_en_US.ts
浏览文件 @
b09c337b
...
...
@@ -16,6 +16,7 @@ export default {
lendouttime
:
"借出日期"
,
returntime
:
"归还日期"
,
icon
:
"图标"
,
sailstate
:
"图书销售状态"
,
},
views
:
{
editview3
:
{
...
...
app_Web/src/locale/lanres/entities/ibizbook/ibizbook_zh_CN.ts
浏览文件 @
b09c337b
...
...
@@ -15,6 +15,7 @@ export default {
lendouttime
:
"借出日期"
,
returntime
:
"归还日期"
,
icon
:
"图标"
,
sailstate
:
"图书销售状态"
,
},
views
:
{
editview3
:
{
...
...
app_Web/src/mock/app/main-menu-appmenu/main-menu-appmenu.ts
浏览文件 @
b09c337b
...
...
@@ -1603,7 +1603,7 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
iconcls
:
''
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'AppFunc
45
'
,
appfunctag
:
'AppFunc
50
'
,
resourcetag
:
''
,
},
],
...
...
app_Web/src/pages/sample/ibizorder-dashboard-view/ibizorder-dashboard-view-base.vue
0 → 100644
浏览文件 @
b09c337b
<
template
>
<div
class=
"view-container deportalview ibizorder-dashboard-view entitydatakanbanviewcard"
>
<app-studioaction
:viewTitle=
"$t(model.srfCaption)"
viewName=
"ibizorderdashboardview"
></app-studioaction>
<card
class=
'view-card view-no-toolbar'
:disHover=
"true"
:padding=
"0"
:bordered=
"false"
>
<div
slot=
'title'
class=
"header-container"
>
<span
class=
'caption-info'
>
{{
$t
(
model
.
srfCaption
)
}}
</span>
</div>
<div
class=
'view-top-messages'
>
</div>
<div
class=
"content-container"
>
<div
class=
'view-body-messages'
>
</div>
<view
_dashboard
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"JSON.parse(JSON.stringify(context))"
:isEnableCustomized =
"false"
name=
"dashboard"
ref=
'dashboard'
@
load=
"dashboard_load($event)"
@
closeview=
"closeView($event)"
>
</view
_dashboard
>
</div>
<div
class=
'view-bottom-messages'
>
</div>
</card>
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Inject
}
from
'vue-property-decorator'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
IBIZOrderService
from
'@/service/ibizorder/ibizorder-service'
;
import
IBIZOrderAuthService
from
'@/authservice/ibizorder/ibizorder-auth-service'
;
import
PortalViewEngine
from
'@engine/view/portal-view-engine'
;
import
IBIZOrderUIService
from
'@/uiservice/ibizorder/ibizorder-ui-service'
;
@
Component
({
components
:
{
},
})
export
default
class
IBIZOrderDashboardViewBase
extends
Vue
{
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof IBIZOrderDashboardViewBase
*/
public
appEntityService
:
IBIZOrderService
=
new
IBIZOrderService
;
/**
* 实体UI服务对象
*
* @type IBIZOrderUIService
* @memberof IBIZOrderDashboardViewBase
*/
public
appUIService
:
IBIZOrderUIService
=
new
IBIZOrderUIService
(
this
.
$store
);
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof IBIZOrderDashboardViewBase
*/
@
Emit
()
public
viewDatasChange
(
val
:
any
):
any
{
return
val
;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof IBIZOrderDashboardViewBase
*/
@
Prop
()
public
viewdata
!
:
string
;
/**
* 传入视图参数
*
* @type {string}
* @memberof IBIZOrderDashboardViewBase
*/
@
Prop
()
public
viewparam
!
:
string
;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof IBIZOrderDashboardViewBase
*/
@
Prop
({
default
:
true
})
public
viewDefaultUsage
!
:
boolean
;
/**
* 视图默认使用
*
* @type {string}
* @memberof IBIZOrderDashboardViewBase
*/
@
Inject
({
from
:
'navModel'
,
default
:
'tab'
})
public
navModel
!
:
string
;
/**
* 视图标识
*
* @type {string}
* @memberof IBIZOrderDashboardViewBase
*/
public
viewtag
:
string
=
'7f65e6161c444d29e1f53f1cb76e92de'
;
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof IBIZOrderDashboardViewBase
*/
public
customViewNavContexts
:
any
=
{
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof IBIZOrderDashboardViewBase
*/
public
customViewParams
:
any
=
{
};
/**
* 视图模型数据
*
* @type {*}
* @memberof IBIZOrderDashboardViewBase
*/
public
model
:
any
=
{
srfCaption
:
'entities.ibizorder.views.dashboardview.caption'
,
srfTitle
:
'entities.ibizorder.views.dashboardview.title'
,
srfSubTitle
:
'entities.ibizorder.views.dashboardview.subtitle'
,
dataInfo
:
''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZOrderDashboardViewBase
*/
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
this
.
viewparams
=
{};
if
(
typeof
newVal
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
else
{
this
.
viewparams
=
Util
.
deepCopy
(
this
.
viewparam
);
}
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZOrderDashboardViewBase
*/
@
Watch
(
'viewdata'
)
onViewData
(
newVal
:
any
,
oldVal
:
any
)
{
const
_this
:
any
=
this
;
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
engine
)
{
this
.
$nextTick
(()
=>
{
_this
.
parseViewParam
();
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof IBIZOrderDashboardViewBase
*/
public
containerModel
:
any
=
{
view_dashboard
:
{
name
:
'dashboard'
,
type
:
'DASHBOARD'
},
wflinks
:
[],
};
/**
* 计数器刷新
*
* @memberof IBIZOrderDashboardViewBase
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 视图状态订阅对象
*
* @public
* @type {Subject<{action: string, data: any}>}
* @memberof IBIZOrderDashboardViewBase
*/
public
viewState
:
Subject
<
ViewState
>
=
new
Subject
();
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof IBIZOrderDashboardViewBase
*/
public
engine
:
PortalViewEngine
=
new
PortalViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof IBIZOrderDashboardViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
dashboard
:
this
.
$refs
.
dashboard
,
keyPSDEField
:
'ibizorder'
,
majorPSDEField
:
'ibizordername'
,
isLoadDefault
:
true
,
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof IBIZOrderDashboardViewBase
*/
public
navDataService
=
NavDataService
.
getInstance
(
this
.
$store
);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZOrderDashboardViewBase
*/
public
serviceStateEvent
:
Subscription
|
undefined
;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof IBIZOrderDashboardViewBase
*/
@
Prop
()
public
portletState
?:
any
;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZOrderDashboardViewBase
*/
public
portletStateEvent
:
Subscription
|
undefined
;
/**
* 应用上下文
*
* @type {*}
* @memberof IBIZOrderDashboardViewBase
*/
public
context
:
any
=
{};
/**
* 视图参数
*
* @type {*}
* @memberof IBIZOrderDashboardViewBase
*/
public
viewparams
:
any
=
{};
/**
* 视图缓存数据
*
* @type {*}
* @memberof IBIZOrderDashboardViewBase
*/
public
viewCacheData
:
any
;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof IBIZOrderDashboardViewBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 解析视图参数
*
* @public
* @memberof IBIZOrderDashboardViewBase
*/
public
parseViewParam
(
inputvalue
:
any
=
null
):
void
{
for
(
let
key
in
this
.
context
){
delete
this
.
context
[
key
];
}
if
(
this
.
$store
.
getters
.
getAppData
()
&&
this
.
$store
.
getters
.
getAppData
().
context
){
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
if
(
this
.
context
&&
this
.
context
.
srfparentkey
){
Object
.
assign
(
this
.
viewparams
,{
srfparentkey
:
this
.
context
.
srfparentkey
});
}
this
.
handleCustomViewData
();
this
.
$forceUpdate
();
return
;
}
const
path
=
(
this
.
$route
.
matched
[
this
.
$route
.
matched
.
length
-
1
]).
path
;
const
keys
:
Array
<
any
>
=
[];
const
curReg
=
this
.
$pathToRegExp
.
pathToRegexp
(
path
,
keys
);
const
matchArray
=
curReg
.
exec
(
this
.
$route
.
path
);
let
tempValue
:
Object
=
{};
keys
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
.
name
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
this
.
$viewTool
.
formatRouteParams
(
tempValue
,
this
.
$route
,
this
.
context
,
this
.
viewparams
);
if
(
inputvalue
){
Object
.
assign
(
this
.
context
,{
'ibizorder'
:
inputvalue
});
}
//初始化视图唯一标识
Object
.
assign
(
this
.
context
,{
srfsessionid
:
this
.
$util
.
createUUID
()});
this
.
handleCustomViewData
();
//初始化导航数据
this
.
initNavDataWithRoute
();
}
/**
* 处理自定义视图数据
*
* @memberof IBIZOrderDashboardViewBase
*/
public
handleCustomViewData
(){
if
(
Object
.
keys
(
this
.
customViewNavContexts
).
length
>
0
){
Object
.
keys
(
this
.
customViewNavContexts
).
forEach
((
item
:
any
)
=>
{
let
tempContext
:
any
=
{};
let
curNavContext
:
any
=
this
.
customViewNavContexts
[
item
];
this
.
handleCustomDataLogic
(
curNavContext
,
tempContext
,
item
);
Object
.
assign
(
this
.
context
,
tempContext
);
})
}
if
(
Object
.
keys
(
this
.
customViewParams
).
length
>
0
){
Object
.
keys
(
this
.
customViewParams
).
forEach
((
item
:
any
)
=>
{
let
tempParam
:
any
=
{};
let
curNavParam
:
any
=
this
.
customViewParams
[
item
];
this
.
handleCustomDataLogic
(
curNavParam
,
tempParam
,
item
);
Object
.
assign
(
this
.
viewparams
,
tempParam
);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof IBIZOrderDashboardViewBase
*/
public
handleCustomDataLogic
(
curNavData
:
any
,
tempData
:
any
,
item
:
string
){
// 直接值直接赋值
if
(
curNavData
.
isRawValue
){
if
(
Object
.
is
(
curNavData
.
value
,
"null"
)
||
Object
.
is
(
curNavData
.
value
,
""
)){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
curNavData
.
value
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
else
{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if
(
this
.
context
[(
curNavData
.
value
).
toLowerCase
()]
!=
null
){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
this
.
context
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
if
(
this
.
viewparams
[(
curNavData
.
value
).
toLowerCase
()]
!=
null
){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
this
.
viewparams
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
}
}
/**
* 初始化导航数据(路由模式)
*
* @memberof IBIZOrderDashboardViewBase
*/
public
initNavDataWithRoute
(
data
:
any
=
null
,
isNew
:
boolean
=
false
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavData
({
id
:
'ibizorder-dashboard-view'
,
tag
:
this
.
viewtag
,
srfkey
:
isNew
?
null
:
this
.
context
.
ibizorder
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof IBIZOrderDashboardViewBase
*/
public
initNavDataWithTab
(
data
:
any
=
null
,
isOnlyAdd
:
boolean
=
true
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
!
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavDataByOnly
({
id
:
'ibizorder-dashboard-view'
,
tag
:
this
.
viewtag
,
srfkey
:
this
.
context
.
ibizorder
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
},
isOnlyAdd
);
}
}
/**
* Vue声明周期
*
* @memberof IBIZOrderDashboardViewBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof IBIZOrderDashboardViewBase
*/
public
afterCreated
(){
let
_this
:
any
=
this
;
const
secondtag
=
_this
.
$util
.
createUUID
();
_this
.
$store
.
commit
(
'viewaction/createdView'
,
{
viewtag
:
_this
.
viewtag
,
secondtag
:
secondtag
});
_this
.
viewtag
=
secondtag
;
_this
.
parseViewParam
();
_this
.
serviceStateEvent
=
_this
.
navDataService
.
serviceState
.
subscribe
(({
action
,
name
,
data
}:{
action
:
string
,
name
:
any
,
data
:
any
})
=>
{
if
(
!
Object
.
is
(
name
,
'ibizorder-dashboard-view'
)){
return
;
}
if
(
Object
.
is
(
action
,
'viewrefresh'
))
{
_this
.
$nextTick
(()
=>
{
_this
.
parseViewParam
(
data
);
if
(
_this
.
engine
){
_this
.
engine
.
load
();
}
});
}
});
if
(
_this
.
portletState
){
_this
.
portletStateEvent
=
_this
.
portletState
.
subscribe
((
res
:
any
)
=>
{
if
(
!
Object
.
is
(
res
.
name
,
'IBIZOrderDashboardView'
)){
return
;
}
if
(
Object
.
is
(
res
.
action
,
'refresh'
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
){
_this
.
refresh
();
}
})
}
}
/**
* 销毁之前
*
* @memberof IBIZOrderDashboardViewBase
*/
public
beforeDestroy
()
{
this
.
$store
.
commit
(
'viewaction/removeView'
,
this
.
viewtag
);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof IBIZOrderDashboardViewBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof IBIZOrderDashboardViewBase
*/
public
afterMounted
(){
const
_this
:
any
=
this
;
_this
.
engineInit
();
if
(
_this
.
loadModel
&&
_this
.
loadModel
instanceof
Function
)
{
_this
.
loadModel
();
}
}
/**
* dashboard 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderDashboardViewBase
*/
public
dashboard_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'dashboard'
,
'load'
,
$event
);
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof IBIZOrderDashboardViewBase
*/
public
closeView
(
args
:
any
[]):
void
{
let
_view
:
any
=
this
;
if
(
_view
.
viewdata
)
{
_view
.
$emit
(
'viewdataschange'
,
[
args
]);
_view
.
$emit
(
'close'
,
[
args
]);
}
else
if
(
_view
.
$tabPageExp
)
{
_view
.
$tabPageExp
.
onClose
(
_view
.
$route
.
fullPath
);
}
}
/**
* 销毁视图回调
*
* @memberof IBIZOrderDashboardViewBase
*/
public
destroyed
(){
this
.
afterDestroyed
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBIZOrderDashboardViewBase
*/
public
afterDestroyed
(){
if
(
this
.
viewDefaultUsage
){
let
localStoreLength
=
Object
.
keys
(
localStorage
);
if
(
localStoreLength
.
length
>
0
){
localStoreLength
.
forEach
((
item
:
string
)
=>
{
if
(
item
.
startsWith
(
this
.
context
.
srfsessionid
)){
localStorage
.
removeItem
(
item
);
}
})
}
if
(
Object
.
is
(
this
.
navModel
,
"tab"
)){
this
.
navDataService
.
removeNavDataByTag
(
this
.
viewtag
);
}
if
(
this
.
serviceStateEvent
)
{
this
.
serviceStateEvent
.
unsubscribe
();
}
}
// 销毁计数器定时器
if
(
this
.
counterServiceArray
&&
this
.
counterServiceArray
.
length
>
0
){
this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
destroyCounter
&&
item
.
destroyCounter
instanceof
Function
){
item
.
destroyCounter
();
}
})
}
if
(
this
.
portletStateEvent
){
this
.
portletStateEvent
.
unsubscribe
();
}
}
/**
* 加载数据
*
* @memberof IBIZOrderDashboardViewBase
*/
public
loadModel
(){
if
(
this
.
context
.
ibizorder
){
this
.
appEntityService
.
getDataInfo
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),{},
false
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
return
;
}
const
{
data
:
_data
}
=
response
;
this
.
viewState
.
next
({
tag
:
'all-portlet'
,
action
:
'loadmodel'
,
data
:
_data
});
if
(
_data
.
ibizordername
)
{
Object
.
assign
(
this
.
model
,
{
dataInfo
:
_data
.
ibizordername
});
if
(
this
.
$tabPageExp
){
let
_this
:
any
=
this
;
this
.
$tabPageExp
.
setCurPageCaption
(
_this
.
$t
(
this
.
model
.
srfCaption
),
_this
.
$t
(
this
.
model
.
srfCaption
),
_this
.
model
.
dataInfo
);
}
if
(
this
.
$route
){
this
.
$route
.
meta
.
info
=
this
.
model
.
dataInfo
;
}
Object
.
assign
(
this
.
model
,
{
srfCaption
:
`
${
this
.
$t
(
this
.
model
.
srfCaption
)}
-
${
this
.
model
.
dataInfo
}
`
});
}
})
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './ibizorder-dashboard-view.less';
</
style
>
\ No newline at end of file
app_Web/src/pages/sample/ibizorder-dashboard-view/ibizorder-dashboard-view.less
0 → 100644
浏览文件 @
b09c337b
.ibizorder-dashboard-view{
position: relative;
}
.entitydatakanbanviewcard {
background-color: #F0F2F5;
box-shadow: none !important;
>.view-card {
background-color: #F0F2F5;
>.ivu-card-head{
display: none;
}
}
.portlet-card {
background-color: #f0f2f5;
}
.custom-card {
background-color: #ffffff;
margin: 5px;
box-shadow: 1px 1px 5px rgb(209, 205, 205);
.view-card {
background-color: #ffffff;
}
}
}
app_Web/src/pages/sample/ibizorder-dashboard-view/ibizorder-dashboard-view.vue
0 → 100644
浏览文件 @
b09c337b
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
IBIZOrderDashboardViewBase
from
'./ibizorder-dashboard-view-base.vue'
;
import
view_dashboard
from
'@widgets/ibizorder/usr-dashboard/usr-dashboard.vue'
;
@
Component
({
components
:
{
view_dashboard
,
},
beforeRouteEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
next
((
vm
:
any
)
=>
{
if
(
!
Object
.
is
(
vm
.
navModel
,
"route"
)){
vm
.
initNavDataWithTab
(
vm
.
viewCacheData
);
}
vm
.
$store
.
commit
(
'addCurPageViewtag'
,
{
fullPath
:
to
.
fullPath
,
viewtag
:
vm
.
viewtag
});
});
},
})
export
default
class
IBIZOrderDashboardView
extends
IBIZOrderDashboardViewBase
{
}
</
script
>
\ No newline at end of file
app_Web/src/pages/sample/index/page-register.ts
浏览文件 @
b09c337b
...
...
@@ -104,6 +104,7 @@ export const PageComponents = {
Vue
.
component
(
'ibizsample0003-f4-tree-exp-view'
,
()
=>
import
(
'@pages/sample/ibizsample0003-f4-tree-exp-view/ibizsample0003-f4-tree-exp-view.vue'
));
Vue
.
component
(
'ibizorder-f10-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-f10-edit-view/ibizorder-f10-edit-view.vue'
));
Vue
.
component
(
'ibizsample0003-stree-exp-view'
,
()
=>
import
(
'@pages/sample/ibizsample0003-stree-exp-view/ibizsample0003-stree-exp-view.vue'
));
Vue
.
component
(
'ibizorder-dashboard-view'
,
()
=>
import
(
'@pages/sample/ibizorder-dashboard-view/ibizorder-dashboard-view.vue'
));
Vue
.
component
(
'ibizorder-sedit-view4'
,
()
=>
import
(
'@pages/sample/ibizorder-sedit-view4/ibizorder-sedit-view4.vue'
));
Vue
.
component
(
'ibizsoftware-suit-grid-view9'
,
()
=>
import
(
'@pages/sample/ibizsoftware-suit-grid-view9/ibizsoftware-suit-grid-view9.vue'
));
Vue
.
component
(
'ibizbookhas-panel-list-view'
,
()
=>
import
(
'@pages/sample/ibizbookhas-panel-list-view/ibizbookhas-panel-list-view.vue'
));
...
...
@@ -143,7 +144,6 @@ export const PageComponents = {
Vue
.
component
(
'ibizsample0002-mpickup-view'
,
()
=>
import
(
'@pages/sample/ibizsample0002-mpickup-view/ibizsample0002-mpickup-view.vue'
));
Vue
.
component
(
'ibizorder-sf7-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-sf7-edit-view/ibizorder-sf7-edit-view.vue'
));
Vue
.
component
(
'ibizbookedit-view'
,
()
=>
import
(
'@pages/sample/ibizbookedit-view/ibizbookedit-view.vue'
));
Vue
.
component
(
'ibizbookdashboard-view'
,
()
=>
import
(
'@pages/sample/ibizbookdashboard-view/ibizbookdashboard-view.vue'
));
Vue
.
component
(
'ibizsample0001-sf5-edit-view'
,
()
=>
import
(
'@pages/sample/ibizsample0001-sf5-edit-view/ibizsample0001-sf5-edit-view.vue'
));
Vue
.
component
(
'ibizbookgroup-by-codelist-list-view'
,
()
=>
import
(
'@pages/sample/ibizbookgroup-by-codelist-list-view/ibizbookgroup-by-codelist-list-view.vue'
));
Vue
.
component
(
'ibizbookhas-panel-kan-ban-view'
,
()
=>
import
(
'@pages/sample/ibizbookhas-panel-kan-ban-view/ibizbookhas-panel-kan-ban-view.vue'
));
...
...
app_Web/src/pages/sample/index/router.ts
浏览文件 @
b09c337b
...
...
@@ -1596,6 +1596,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sample/ibizsample0003-stree-exp-view/ibizsample0003-stree-exp-view.vue'
),
},
{
path
:
'ibizorders/:ibizorder?/dashboardview/:dashboardview?'
,
meta
:
{
caption
:
'entities.ibizorder.views.dashboardview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibizorders'
,
parameterName
:
'ibizorder'
},
{
pathName
:
'dashboardview'
,
parameterName
:
'dashboardview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-dashboard-view/ibizorder-dashboard-view.vue'
),
},
{
path
:
'ibizorders/:ibizorder?/seditview4/:seditview4?'
,
meta
:
{
...
...
@@ -2142,20 +2156,6 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sample/ibizbookedit-view/ibizbookedit-view.vue'
),
},
{
path
:
'ibizbooks/:ibizbook?/dashboardview/:dashboardview?'
,
meta
:
{
caption
:
'entities.ibizbook.views.dashboardview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibizbooks'
,
parameterName
:
'ibizbook'
},
{
pathName
:
'dashboardview'
,
parameterName
:
'dashboardview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizbookdashboard-view/ibizbookdashboard-view.vue'
),
},
{
path
:
'ibizsample0002s/:ibizsample0002?/ibizsample0001s/:ibizsample0001?/sf5editview/:sf5editview?'
,
meta
:
{
...
...
@@ -2919,19 +2919,6 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-line-chart-view/ibizorder-line-chart-view.vue'
),
},
{
path
:
'/ibizbooks/:ibizbook?/dashboardview/:dashboardview?'
,
meta
:
{
caption
:
'entities.ibizbook.views.dashboardview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibizbooks'
,
parameterName
:
'ibizbook'
},
{
pathName
:
'dashboardview'
,
parameterName
:
'dashboardview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizbookdashboard-view/ibizbookdashboard-view.vue'
),
},
{
path
:
'/ibizcustomers/:ibizcustomer?/pickupgridview/:pickupgridview?'
,
meta
:
{
...
...
@@ -3389,6 +3376,19 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-bar-chart-view/ibizorder-bar-chart-view.vue'
),
},
{
path
:
'/ibizorders/:ibizorder?/dashboardview/:dashboardview?'
,
meta
:
{
caption
:
'entities.ibizorder.views.dashboardview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibizorders'
,
parameterName
:
'ibizorder'
},
{
pathName
:
'dashboardview'
,
parameterName
:
'dashboardview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-dashboard-view/ibizorder-dashboard-view.vue'
),
},
{
path
:
'/ibizuniproducts/:ibizuniproduct?/pickupgridview/:pickupgridview?'
,
meta
:
{
...
...
app_Web/src/store/modules/view-action/state.ts
浏览文件 @
b09c337b
...
...
@@ -214,6 +214,7 @@ export const viewstate: any = {
'ad37d44e57c18e4431a609968203c646'
,
'fdb297cd4b12374534413c3053aec1b8'
,
'f4c5c766fd5755b694e0401dddc4d1ad'
,
'7f65e6161c444d29e1f53f1cb76e92de'
,
'e7441fa67d425df343d996c745fb5d6b'
,
'756fecec409c3a955f0cd737259d27c7'
,
'2ccd29eeaeded3ea5a713a19cd67a83e'
,
...
...
@@ -254,7 +255,6 @@ export const viewstate: any = {
'84904c93ceea3ab6551555ee20c41e27'
,
'6b3607e849c8517fd7ae1cab583f7393'
,
'41d3da0d37fb0135ace813f1ba06bd39'
,
'427821f1e67ee5b79dde237e66a7b9c9'
,
'b1256beac1e95915b675893c61559b59'
,
'b8ae19200ec9d4e8e588bc31e3f9bcb4'
,
'09663b7a4e3dce70524d1b64e02b5e2d'
,
...
...
@@ -501,16 +501,6 @@ export const viewstate: any = {
refviews
:
[
],
},
{
viewtag
:
'427821f1e67ee5b79dde237e66a7b9c9'
,
viewmodule
:
'Sample'
,
viewname
:
'IBIZBOOKDashboardView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'f73da4cb47a88d3fe5b92716e0137741'
,
],
},
{
viewtag
:
'460fc1d5b6f2e2012b281df34d929f3b'
,
viewmodule
:
'Sample'
,
...
...
@@ -834,6 +824,15 @@ export const viewstate: any = {
refviews
:
[
],
},
{
viewtag
:
'7f65e6161c444d29e1f53f1cb76e92de'
,
viewmodule
:
'Sample'
,
viewname
:
'IBIZOrderDashboardView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'80c9ae9ed04e7107ed9fc93734a447d1'
,
viewmodule
:
'Sample'
,
...
...
app_Web/src/widgets/app/main-menu-appmenu/main-menu-appmenu-base.vue
浏览文件 @
b09c337b
...
...
@@ -548,6 +548,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case
'AppFunc29'
:
this
.
clickAppFunc29
(
item
);
return
;
case
'AppFunc50'
:
this
.
clickAppFunc50
(
item
);
return
;
case
'AppFunc18'
:
this
.
clickAppFunc18
(
item
);
return
;
...
...
@@ -776,9 +779,6 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case
'AppFunc48'
:
this
.
clickAppFunc48
(
item
);
return
;
case
'AppFunc45'
:
this
.
clickAppFunc45
(
item
);
return
;
case
'AppFunc17'
:
this
.
clickAppFunc17
(
item
);
return
;
...
...
@@ -1063,6 +1063,29 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 功能名称
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public
clickAppFunc50
(
item
:
any
=
{})
{
const
viewparam
:
any
=
{};
Object
.
assign
(
viewparam
,
{});
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'ibizorders'
,
parameterName
:
'ibizorder'
},
{
pathName
:
'dashboardview'
,
parameterName
:
'dashboardview'
},
];
const
path
:
string
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
{},
deResParameters
,
parameters
,
[],
viewparam
);
if
(
Object
.
is
(
this
.
$route
.
fullPath
,
path
)){
return
;
}
this
.
$nextTick
(
function
(){
this
.
$router
.
push
(
path
);
})
}
/**
* 补充示例数据
*
...
...
@@ -2813,29 +2836,6 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 功能名称
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public
clickAppFunc45
(
item
:
any
=
{})
{
const
viewparam
:
any
=
{};
Object
.
assign
(
viewparam
,
{});
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'ibizbooks'
,
parameterName
:
'ibizbook'
},
{
pathName
:
'dashboardview'
,
parameterName
:
'dashboardview'
},
];
const
path
:
string
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
{},
deResParameters
,
parameters
,
[],
viewparam
);
if
(
Object
.
is
(
this
.
$route
.
fullPath
,
path
)){
return
;
}
this
.
$nextTick
(
function
(){
this
.
$router
.
push
(
path
);
})
}
/**
* 图书列表(嵌入面板)
*
...
...
app_Web/src/widgets/app/main-menu-appmenu/main-menu-appmenu-model.ts
浏览文件 @
b09c337b
...
...
@@ -1693,7 +1693,7 @@ export default class MainMenuModel {
iconcls
:
''
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'AppFunc
45
'
,
appfunctag
:
'AppFunc
50
'
,
resourcetag
:
''
,
authtag
:
'Web-MainMenu-menuitem126'
,
},
...
...
app_Web/src/widgets/ibizbook/guide-wizardpanel/guide-wizardpanel-model.ts
浏览文件 @
b09c337b
...
...
@@ -74,6 +74,10 @@ export default class GuideModel {
name
:
'icon'
,
prop
:
'icon'
,
},
{
name
:
'sailstate'
,
prop
:
'sailstate'
,
},
]
}
...
...
app_Web/src/widgets/ibizbook/main-multieditviewpanel/main-multieditviewpanel-model.ts
浏览文件 @
b09c337b
...
...
@@ -60,6 +60,9 @@ export default class MainModel {
{
name
:
'icon'
,
},
{
name
:
'sailstate'
,
},
]
}
...
...
app_Web/src/widgets/ibizorder/portal-components-chart-portlet/portal-components-chart-portlet-base.vue
浏览文件 @
b09c337b
...
...
@@ -3,7 +3,7 @@
<p
class=
'portlet-title'
>
<span>
图表
订单金额区域图
</span>
</p>
<el-divider
class=
"divider"
></el-divider>
...
...
app_Web/src/widgets/ibizorder/portal-components-list2-portlet/portal-components-list2-portlet-base.vue
0 → 100644
浏览文件 @
b09c337b
<
template
>
<div
class=
'portlet portal-components-list2 '
:style=
"
{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<p
class=
'portlet-title'
>
<span>
订单列表
</span>
</p>
<el-divider
class=
"divider"
></el-divider>
<div
class=
"portlet-with-title"
>
<!-- 测试 -->
<view
_dashboard_sysportlet2_list
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
createAction=
"Create"
removeAction=
"Remove"
updateAction=
"Update"
fetchAction=
"FetchDefault"
:showBusyIndicator=
"true"
name=
"dashboard_sysportlet2_list"
ref=
'dashboard_sysportlet2_list'
@
closeview=
"closeView($event)"
>
</view
_dashboard_sysportlet2_list
>
</div>
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Model
,
Inject
}
from
'vue-property-decorator'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
ControlInterface
}
from
'@/interface/control'
;
import
{
UIActionTool
,
Util
,
ViewTool
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
IBIZOrderService
from
'@/service/ibizorder/ibizorder-service'
;
import
PortalComponentsList2Service
from
'./portal-components-list2-portlet-service'
;
import
IBIZOrderUIService
from
'@/uiservice/ibizorder/ibizorder-ui-service'
;
import
UIService
from
'@/uiservice/ui-service'
;
import
{
Environment
}
from
'@/environments/environment'
;
@
Component
({
components
:
{
}
})
export
default
class
IBIZOrderPortalComponentsList2Base
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof PortalComponentsList2Base
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof PortalComponentsList2Base
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof PortalComponentsList2Base
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof PortalComponentsList2Base
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof PortalComponentsList2Base
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof PortalComponentsList2Base
*/
public
getControlType
():
string
{
return
'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof PortalComponentsList2Base
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {PortalComponentsList2Service}
* @memberof PortalComponentsList2Base
*/
public
service
:
PortalComponentsList2Service
=
new
PortalComponentsList2Service
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof PortalComponentsList2Base
*/
public
appEntityService
:
IBIZOrderService
=
new
IBIZOrderService
({
$store
:
this
.
$store
});
/**
* 界面UI服务对象
*
* @type {IBIZOrderUIService}
* @memberof PortalComponentsList2Base
*/
public
appUIService
:
IBIZOrderUIService
=
new
IBIZOrderUIService
(
this
.
$store
);
/**
* 关闭视图
*
* @param {any} args
* @memberof PortalComponentsList2Base
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof PortalComponentsList2Base
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 长度
*
* @type {number}
* @memberof PortalComponentsList2Base
*/
@
Prop
()
public
height
?:
number
;
/**
* 宽度
*
* @type {number}
* @memberof PortalComponentsList2Base
*/
@
Prop
()
public
width
?:
number
;
/**
* 门户部件类型
*
* @type {number}
* @memberof PortalComponentsList2Base
*/
public
portletType
:
string
=
'list'
;
/**
* 视图默认使用
*
* @type {string}
* @memberof PortalComponentsList2Base
*/
@
Inject
({
from
:
'navModel'
,
default
:
'tab'
})
public
navModel
!
:
string
;
/**
* 界面行为模型数据
*
* @memberof PortalComponentsList2Base
*/
public
uiactionModel
:
any
=
{
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof PortalComponentsList2Base
*/
@
Prop
({
default
:
false
})
public
isAdaptiveSize
!
:
boolean
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PortalComponentsList2Base
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PortalComponentsList2Base
*/
public
getData
():
any
{
return
{};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof PortalComponentsList2Base
*/
get
getHeight
(){
if
(
!
this
.
$util
.
isEmpty
(
this
.
height
)
&&
!
this
.
$util
.
isNumberNaN
(
this
.
height
)){
if
(
this
.
height
==
0
){
return
'auto'
;
}
else
{
return
this
.
height
+
'px'
;
}
}
else
{
return
'400px'
;
}
}
/**
* 刷新
*
* @memberof PortalComponentsList2Base
*/
public
refresh
(
args
?:
any
)
{
this
.
viewState
.
next
({
tag
:
'dashboard_sysportlet2_list'
,
action
:
'refresh'
,
data
:
args
});
}
/**
* vue 生命周期
*
* @memberof PortalComponentsList2Base
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof PortalComponentsList2Base
*/
public
afterCreated
(){
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
Object
.
is
(
tag
,
"all-portlet"
)
&&
Object
.
is
(
action
,
'loadmodel'
)){
this
.
calcUIActionAuthState
(
data
);
}
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
const
refs
:
any
=
this
.
$refs
;
Object
.
keys
(
refs
).
forEach
((
_name
:
string
)
=>
{
this
.
viewState
.
next
({
tag
:
_name
,
action
:
action
,
data
:
data
});
});
});
}
}
/**
* vue 生命周期
*
* @memberof PortalComponentsList2Base
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PortalComponentsList2Base
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
/**
* 计算界面行为权限
*
* @memberof PortalComponentsList2Base
*/
public
calcUIActionAuthState
(
data
:
any
=
{})
{
// 如果是操作栏,不计算权限
if
(
this
.
portletType
&&
Object
.
is
(
'actionbar'
,
this
.
portletType
))
{
return
;
}
let
_this
:
any
=
this
;
let
uiservice
:
any
=
_this
.
appUIService
?
_this
.
appUIService
:
new
UIService
(
_this
.
$store
);
if
(
_this
.
uiactionModel
){
ViewTool
.
calcActionItemAuthState
(
data
,
_this
.
uiactionModel
,
uiservice
);
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './portal-components-list2-portlet.less';
</
style
>
app_Web/src/widgets/ibizorder/portal-components-list2-portlet/portal-components-list2-portlet-model.ts
0 → 100644
浏览文件 @
b09c337b
/**
* PortalComponentsList2 部件模型
*
* @export
* @class PortalComponentsList2Model
*/
export
default
class
PortalComponentsList2Model
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PortalComponentsList2Model
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'tp'
,
},
{
name
:
'endtime'
,
},
{
name
:
'wfstate'
,
},
{
name
:
'createdate'
,
},
{
name
:
'opinion'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'ordertype'
,
},
{
name
:
'detailnum'
,
},
{
name
:
'wfinstanceid'
,
},
{
name
:
'amount'
,
},
{
name
:
'orderuid'
,
},
{
name
:
'ibizorder'
,
prop
:
'ibizorderid'
,
},
{
name
:
'orderstate'
,
},
{
name
:
'starttime'
,
},
{
name
:
'updateman'
,
},
{
name
:
'wfstep'
,
},
{
name
:
'createman'
,
},
{
name
:
'ibizordername'
,
},
{
name
:
'ordertime'
,
},
{
name
:
'memo'
,
},
{
name
:
'ibizcustomername'
,
},
{
name
:
'ibizcustomerid'
,
},
]
}
}
app_Web/src/widgets/ibizorder/portal-components-list2-portlet/portal-components-list2-portlet-service.ts
0 → 100644
浏览文件 @
b09c337b
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* PortalComponentsList2 部件服务对象
*
* @export
* @class PortalComponentsList2Service
*/
export
default
class
PortalComponentsList2Service
extends
ControlService
{
}
app_Web/src/widgets/ibizorder/portal-components-list2-portlet/portal-components-list2-portlet.less
0 → 100644
浏览文件 @
b09c337b
// this is less
.portlet{
height: 100%;
width: 100%;
> .portlet-title{
padding: 14px 16px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
height: 52px;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
justify-content: space-between;
width:100%;
line-height: 22px;
font-size: 16px;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #304265;
font-weight: 600;
i{
margin-right: 5px;
}
>.portlet-action{
margin-left: 12px;
font-size: 14px;
>a{
padding: 6px;
}
}
}
> .divider {
margin: 0px 0px 11px 0px;
}
> .portlet-with-title{
width:100%;
height:calc(100% - 52px);
overflow:auto;
padding:0px 12px;
}
> .portlet-without-title{
width:100%;
height:100%;
overflow:auto;
padding:0px 12px;
}
.app-charts{
height: 100%!important;
}
.toolbar-container {
button{
margin: 6px 0px 4px 16px;
}
.ivu-badge{
.ivu-badge-count{
top: 0;
}
}
}
}
app_Web/src/widgets/ibizorder/portal-components-list2-portlet/portal-components-list2-portlet.vue
0 → 100644
浏览文件 @
b09c337b
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
IBIZOrderPortalComponentsList2Base
from
'./portal-components-list2-portlet-base.vue'
;
import
view_dashboard_sysportlet2_list
from
'@widgets/ibizorder/usr-list/usr-list.vue'
;
@
Component
({
components
:
{
view_dashboard_sysportlet2_list
,
}
})
export
default
class
IBIZOrderPortalComponentsList2
extends
IBIZOrderPortalComponentsList2Base
{
}
</
script
>
app_Web/src/widgets/ibizorder/usr-dashboard/usr-dashboard-base.vue
0 → 100644
浏览文件 @
b09c337b
<
template
>
<div
class=
'dashboard'
>
<row
v-if=
"isEnableCustomized"
>
<app-build
@
handleClick=
"handleClick"
></app-build>
</row>
<row
v-if=
"!isHasCustomized"
>
<i-col
:md=
"
{ span: 24, offset: 0 }">
<card
class=
"portlet-card"
:bordered=
"false"
dis-hover
:padding=
"0"
>
<span>
<div
class=
'portlet-container dashboard-viewdashboard-container1 '
:style=
"
{}">
<row>
<i-col
:md=
"
{ span: 24, offset: 0 }" :lg="{ span: 12, offset: 0 }">
<div
class=
"portlet-without-title"
>
<card
class=
"portlet-card custom-card"
:bordered=
"false"
dis-hover
:padding=
"10"
>
<span>
<view
_dashboard_sysportlet1
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:height=
"400"
:width=
"0"
name=
"dashboard_sysportlet1"
ref=
'dashboard_sysportlet1'
@
closeview=
"closeView($event)"
>
</view
_dashboard_sysportlet1
>
</span>
</card>
</div>
</i-col>
<i-col
:md=
"
{ span: 24, offset: 0 }" :lg="{ span: 12, offset: 0 }">
<div
class=
"portlet-without-title"
>
<card
class=
"portlet-card custom-card"
:bordered=
"false"
dis-hover
:padding=
"10"
>
<span>
<view
_dashboard_sysportlet2
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:height=
"400"
:width=
"0"
name=
"dashboard_sysportlet2"
ref=
'dashboard_sysportlet2'
@
closeview=
"closeView($event)"
>
</view
_dashboard_sysportlet2
>
</span>
</card>
</div>
</i-col>
</row>
</div>
</span>
</card>
</i-col>
</row>
<row
v-if=
"isHasCustomized"
style=
"width: 100%;min-height: calc(100% - 40px);"
>
<div
class=
"portlet-container"
style=
"position: relative;width:100%;"
>
<template
v-for=
"(item, index) of modelDta"
>
<div
:key=
"index"
:style=
"
{zIndex: 10, position: 'absolute', height: item.h*layoutRowH + 'px', width: `calc(100% / ${layoutColNum} * ${item.w})`,top: item.y*layoutRowH + 'px', left: `calc(100% / ${layoutColNum} * ${item.x})`}">
<component
:key=
"$util.createUUID()"
:is=
"item.componentName"
:name=
"item.portletCodeName"
:context=
"JSON.parse(JSON.stringify(context))"
:viewDefaultUsage=
"false"
:isAdaptiveSize=
"true"
:viewState=
"viewState"
></component>
</div>
</
template
>
</div>
</row>
</div>
</template>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Model
,
Inject
}
from
'vue-property-decorator'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
ControlInterface
}
from
'@/interface/control'
;
import
{
UIActionTool
,
Util
,
ViewTool
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
AppCenterService
from
"@service/app/app-center-service"
;
import
IBIZOrderService
from
'@/service/ibizorder/ibizorder-service'
;
import
UsrService
from
'./usr-dashboard-service'
;
import
IBIZOrderUIService
from
'@/uiservice/ibizorder/ibizorder-ui-service'
;
import
UtilService
from
'@/utilservice/util-service'
;
@
Component
({
components
:
{
}
})
export
default
class
UsrBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof UsrBase
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof UsrBase
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof UsrBase
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof UsrBase
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof UsrBase
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof UsrBase
*/
public
getControlType
():
string
{
return
'DASHBOARD'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof UsrBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {UsrService}
* @memberof UsrBase
*/
public
service
:
UsrService
=
new
UsrService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof UsrBase
*/
public
appEntityService
:
IBIZOrderService
=
new
IBIZOrderService
({
$store
:
this
.
$store
});
/**
* 转化数据
*
* @param {any} args
* @memberof UsrBase
*/
public
transformData
(
args
:
any
)
{
let
_this
:
any
=
this
;
if
(
_this
.
service
&&
_this
.
service
.
handleRequestData
instanceof
Function
&&
_this
.
service
.
handleRequestData
(
'transform'
,
_this
.
context
,
args
)){
return
_this
.
service
.
handleRequestData
(
'transform'
,
_this
.
context
,
args
)[
'data'
];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof UsrBase
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof UsrBase
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 是否支持看板定制
*
* @public
* @type {(boolean)}
* @memberof UsrBase
*/
@
Prop
()
public
isEnableCustomized
!
:
boolean
;
/**
* 是否已有看板定制
*
* @public
* @type {(boolean)}
* @memberof UsrBase
*/
public
isHasCustomized
:
boolean
=
false
;
/**
* 模型数据
*
* @public
* @type {(*)}
* @memberof UsrBase
*/
public
modelDta
:
any
;
/**
* modleId
*
* @type {string}
* @memberof UsrBase
*/
public
modelId
:
string
=
"dashboard_ibizorder_usr"
;
/**
* 建构功能服务对象
*
* @type {UtilService}
* @memberof UsrBase
*/
public
utilService
:
UtilService
=
new
UtilService
();
/**
* 功能服务名称
*
* @type {string}
* @memberof UsrBase
*/
public
utilServiceName
:
string
=
""
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof UsrBase
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof UsrBase
*/
public
getData
():
any
{
return
{};
}
/**
* vue 生命周期
*
* @memberof UsrBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof UsrBase
*/
public
afterCreated
(){
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
loadModel
();
}
});
}
}
/**
* 动态设计水平列数
*
* @memberof UsrBase
*/
public
layoutColNum
:
number
=
12
;
/**
* 动态设计单元格高度,80px
*
* @memberof UsrBase
*/
public
layoutRowH
:
number
=
80
;
/**
* 通知状态
*
* @memberof UsrBase
*/
public
notifyState
(){
this
.
$nextTick
(()
=>
{
if
(
this
.
isHasCustomized
)
{
if
(
this
.
modelDta
&&
this
.
modelDta
.
length
>
0
)
{
this
.
modelDta
.
forEach
((
item
:
any
)
=>
{
this
.
viewState
.
next
({
tag
:
item
.
portletCodeName
,
action
:
"load"
,
data
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
});
});
}
}
else
{
if
(
this
.
viewState
)
{
const
refs
:
any
=
this
.
$refs
;
Object
.
keys
(
refs
).
forEach
((
name
:
string
)
=>
{
this
.
viewState
.
next
({
tag
:
name
,
action
:
"load"
,
data
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
});
});
}
}
})
}
/**
* 加载布局与数据模型
*
* @memberof UsrBase
*/
public
loadModel
(){
if
(
this
.
isEnableCustomized
){
this
.
utilService
.
getService
(
this
.
utilServiceName
).
then
((
service
:
any
)
=>
{
service
.
loadModelData
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),{
modelid
:
this
.
modelId
,
utilServiceName
:
this
.
utilServiceName
}).
then
((
res
:
any
)
=>
{
if
(
res
&&
res
.
status
==
200
){
const
data
:
any
=
res
.
data
;
if
(
data
&&
data
.
length
>
0
){
this
.
isHasCustomized
=
true
;
this
.
modelDta
=
data
;
this
.
$forceUpdate
();
}
else
{
this
.
isHasCustomized
=
false
;
}
this
.
notifyState
();
}
else
{
console
.
error
(
"加载面板模型异常"
);
this
.
isHasCustomized
=
false
;
this
.
notifyState
();
}
}).
catch
((
error
:
any
)
=>
{
console
.
error
(
"加载面板模型异常"
);
console
.
error
(
error
);
this
.
isHasCustomized
=
false
;
this
.
notifyState
();
});
})
}
else
{
this
.
notifyState
();
}
}
/**
* 处理私人定制按钮
*
* @memberof UsrBase
*/
public
handleClick
(){
const
view
:
any
=
{
viewname
:
'app-portal-design'
,
title
:
(
this
.
$t
(
'app.dashBoard.handleClick.title'
)),
width
:
1600
,
placement
:
'DRAWER_RIGHT'
}
const
viewparam
:
any
=
{
modelid
:
this
.
modelId
,
utilServiceName
:
this
.
utilServiceName
,
appdeName
:
'IBIZOrder'
}
const
appdrawer
=
this
.
$appdrawer
.
openDrawer
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
viewparam
);
appdrawer
.
subscribe
((
result
:
any
)
=>
{
if
(
Object
.
is
(
result
.
ret
,
'OK'
)){
this
.
loadModel
();
}
});
}
/**
* vue 生命周期
*
* @memberof UsrBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof UsrBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './usr-dashboard.less';
</
style
>
\ No newline at end of file
app_Web/src/widgets/ibizorder/usr-dashboard/usr-dashboard-model.ts
0 → 100644
浏览文件 @
b09c337b
/**
* Usr 部件模型
*
* @export
* @class UsrModel
*/
export
default
class
UsrModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof UsrModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'tp'
,
},
{
name
:
'endtime'
,
},
{
name
:
'wfstate'
,
},
{
name
:
'createdate'
,
},
{
name
:
'opinion'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'ordertype'
,
},
{
name
:
'detailnum'
,
},
{
name
:
'wfinstanceid'
,
},
{
name
:
'amount'
,
},
{
name
:
'orderuid'
,
},
{
name
:
'ibizorder'
,
prop
:
'ibizorderid'
,
},
{
name
:
'orderstate'
,
},
{
name
:
'starttime'
,
},
{
name
:
'updateman'
,
},
{
name
:
'wfstep'
,
},
{
name
:
'createman'
,
},
{
name
:
'ibizordername'
,
},
{
name
:
'ordertime'
,
},
{
name
:
'memo'
,
},
{
name
:
'ibizcustomername'
,
},
{
name
:
'ibizcustomerid'
,
},
]
}
}
\ No newline at end of file
app_Web/src/widgets/ibizorder/usr-dashboard/usr-dashboard-service.ts
0 → 100644
浏览文件 @
b09c337b
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* Usr 部件服务对象
*
* @export
* @class UsrService
*/
export
default
class
UsrService
extends
ControlService
{
}
\ No newline at end of file
app_Web/src/widgets/ibizorder/usr-dashboard/usr-dashboard.less
0 → 100644
浏览文件 @
b09c337b
.dashboard {
flex-grow: 1;
height: 100%;
overflow: auto;
.portlet-without-title{
width: 100%;
}
.ivu-row{
.ivu-card{
.ivu-card-head{
border-bottom:0;
p{
display: flex;
height: 24px;
align-items: center;
.line{
width:100%;
border-bottom: 1px solid #e8eaec;
margin-left: 14px;
}
}
}
}
}
}
// this is less
app_Web/src/widgets/ibizorder/usr-dashboard/usr-dashboard.vue
0 → 100644
浏览文件 @
b09c337b
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
UsrBase
from
'./usr-dashboard-base.vue'
;
import
view_dashboard_sysportlet2
from
'@widgets/ibizorder/portal-components-list2-portlet/portal-components-list2-portlet.vue'
;
import
view_dashboard_sysportlet1
from
'@widgets/ibizorder/portal-components-chart-portlet/portal-components-chart-portlet.vue'
;
@
Component
({
components
:
{
view_dashboard_sysportlet2
,
view_dashboard_sysportlet1
,
}
})
export
default
class
Usr
extends
UsrBase
{
}
</
script
>
\ No newline at end of file
app_Web/src/widgets/ibizorder/usr-list/usr-list-base.vue
0 → 100644
浏览文件 @
b09c337b
<
template
>
<div
:class=
"['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"
>
<div
v-if=
"items.length > 0"
>
<div
v-for =
"item in items"
:key=
"item.srfkey"
:class=
"['app-list-item',
{'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<div
class=
"app-list-item-content"
>
<div
class=
"item-icon"
>
<template
v-if=
"item.srficon"
>
<img
:src=
"item.srficon"
/>
</
template
>
<
template
v-else
>
<img
src=
"/assets/img/noimage.png"
/>
</
template
>
</div>
<
template
>
<div
class=
"item-content-text"
>
<span
class=
"item-text"
>
{{
item
.
srfmajortext
}}
</span>
<span
v-if=
"item.srfdescription"
class=
"item-subtext"
>
{{
item
.
srfdescription
}}
</span>
</div>
</
template
>
</div>
<div
v-if=
"item.srfdate"
class=
"app-list-item-date"
>
<span
class=
"date"
>
{{ item.srfdate }}
</span>
</div>
<div
class=
"app-list-item-action"
>
<
template
v-for=
"(action,index) in Object.keys(ActionModel)"
>
<a
:key=
"index"
style=
"display: inline-block;margin: 0 12px;"
@
click=
"uiAction(item, action, $event)"
>
<i
:class=
"ActionModel[action].icon"
style=
"margin-right:2px;"
></i>
<span>
{{
ActionModel
[
action
].
caption
}}
</span>
</a>
</
template
>
</div>
</div>
<
template
v-if=
"isScrollBar"
>
<div
v-if=
"totalRecord>items.length"
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.loadmore'
)
}}
</div>
<div
v-else
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.nomore'
)
}}
</div>
</
template
>
</div>
<div
v-else
>
{{ $t('entities.ibizorder.usr_list.nodata') }}
</div>
<el-backtop
target=
".content-container .app-list"
></el-backtop>
</div>
</template>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Model
,
Inject
}
from
'vue-property-decorator'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
ControlInterface
}
from
'@/interface/control'
;
import
{
UIActionTool
,
Util
,
ViewTool
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
AppCenterService
from
"@service/app/app-center-service"
;
import
IBIZOrderService
from
'@/service/ibizorder/ibizorder-service'
;
import
UsrService
from
'./usr-list-service'
;
import
IBIZOrderUIService
from
'@/uiservice/ibizorder/ibizorder-ui-service'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
@
Component
({
components
:
{
}
})
export
default
class
UsrBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof UsrBase
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof UsrBase
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof UsrBase
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof UsrBase
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof UsrBase
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof UsrBase
*/
public
getControlType
():
string
{
return
'LIST'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof UsrBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {UsrService}
* @memberof UsrBase
*/
public
service
:
UsrService
=
new
UsrService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof UsrBase
*/
public
appEntityService
:
IBIZOrderService
=
new
IBIZOrderService
({
$store
:
this
.
$store
});
/**
* 转化数据
*
* @param {any} args
* @memberof UsrBase
*/
public
transformData
(
args
:
any
)
{
let
_this
:
any
=
this
;
if
(
_this
.
service
&&
_this
.
service
.
handleRequestData
instanceof
Function
&&
_this
.
service
.
handleRequestData
(
'transform'
,
_this
.
context
,
args
)){
return
_this
.
service
.
handleRequestData
(
'transform'
,
_this
.
context
,
args
)[
'data'
];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof UsrBase
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof UsrBase
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof UsrBase
*/
public
codeListService
:
CodeListService
=
new
CodeListService
({
$store
:
this
.
$store
});
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof UsrBase
*/
public
getDatas
():
any
[]
{
return
this
.
selections
;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof UsrBase
*/
public
getData
():
any
{
return
null
;
}
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof UsrBase
*/
@
Prop
({
default
:
false
})
public
isSelectFirstDefault
!
:
boolean
;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof UsrBase
*/
@
Prop
({
default
:
true
})
public
showBusyIndicator
?:
boolean
;
/**
* 部件行为--create
*
* @type {string}
* @memberof UsrBase
*/
@
Prop
()
public
createAction
!
:
string
;
/**
* 部件行为--remove
*
* @type {string}
* @memberof UsrBase
*/
@
Prop
()
public
removeAction
!
:
string
;
/**
* 部件行为--update
*
* @type {string}
* @memberof UsrBase
*/
@
Prop
()
public
updateAction
!
:
string
;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof UsrBase
*/
@
Prop
()
public
fetchAction
!
:
string
;
/**
* this引用
*
* @type {number}
* @memberof UsrBase
*/
public
thisRef
:
any
=
this
;
/**
* 当前页
*
* @type {number}
* @memberof UsrBase
*/
public
curPage
:
number
=
1
;
/**
* 数据
*
* @type {any[]}
* @memberof UsrBase
*/
public
items
:
any
[]
=
[];
/**
* 是否支持分页
*
* @type {boolean}
* @memberof UsrBase
*/
public
isEnablePagingBar
:
boolean
=
true
;
/**
* 分页条数
*
* @type {number}
* @memberof UsrBase
*/
public
limit
:
number
=
1000
;
/**
* 总条数
*
* @type {number}
* @memberof UsrBase
*/
public
totalRecord
:
number
=
0
;
/**
* 加载的数据是否附加在items之后
*
* @type {boolean}
* @memberof UsrBase
*/
public
isAddBehind
:
boolean
=
false
;
/**
* 是否有滚动条
*
* @type {boolean}
* @memberof UsrBase
*/
public
isScrollBar
:
boolean
=
false
;
/**
* 排序方向
*
* @type {string}
* @memberof UsrBase
*/
public
sortDir
:
string
=
''
;
/**
* 排序字段
*
* @type {string}
* @memberof UsrBase
*/
public
sortField
:
string
=
''
;
/**
* 选中数组
* @type {Array<any>}
* @memberof UsrBase
*/
public
selections
:
Array
<
any
>
=
[];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof UsrBase
*/
public
appStateEvent
:
Subscription
|
undefined
;
/**
* Vue声明周期,组件挂载完毕
*
* @memberof UsrBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof UsrBase
*/
public
afterMounted
()
{
const
loadMoreCallBack
:
any
=
this
.
throttle
(
this
.
loadMore
,
3000
);
this
.
$el
.
addEventListener
(
'scroll'
,
()
=>
{
if
(
this
.
$el
.
scrollHeight
>
this
.
$el
.
clientHeight
)
{
this
.
isScrollBar
=
true
;
}
else
{
this
.
isScrollBar
=
false
;
}
if
(
this
.
$el
.
scrollTop
+
this
.
$el
.
clientHeight
>=
this
.
$el
.
scrollHeight
)
{
loadMoreCallBack
();
}
})
}
/**
* Vue声明周期,组件创建完毕
*
* @memberof UsrBase
*/
public
created
()
{
this
.
afterCreated
()
}
/**
* 执行created后的逻辑
*
* @memberof UsrBase
*/
public
afterCreated
(){
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
this
.
name
,
tag
))
{
return
;
}
if
(
Object
.
is
(
action
,
'load'
))
{
this
.
curPage
=
1
;
this
.
items
=
[];
this
.
load
(
data
);
}
if
(
Object
.
is
(
action
,
'refresh'
))
{
this
.
refresh
(
data
);
}
});
}
if
(
AppCenterService
&&
AppCenterService
.
getMessageCenter
()){
this
.
appStateEvent
=
AppCenterService
.
getMessageCenter
().
subscribe
(({
name
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
name
,
"IBIZOrder"
)){
return
;
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
this
.
refresh
([
data
]);
}
})
}
}
/**
* vue 生命周期
*
* @memberof UsrBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof UsrBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
if
(
this
.
appStateEvent
){
this
.
appStateEvent
.
unsubscribe
();
}
}
/**
* 加载更多
*
* @memberof UsrBase
*/
public
loadMore
(){
if
(
this
.
totalRecord
>
this
.
items
.
length
){
this
.
curPage
=
++
this
.
curPage
;
this
.
isAddBehind
=
true
;
this
.
load
({});
}
}
/**
* 刷新
*
* @param {*} [args={}]
* @memberof Main
*/
public
refresh
(
args
?:
any
)
{
this
.
isAddBehind
=
true
;
this
.
load
(
args
);
}
/**
* 列表数据加载
*
* @public
* @param {*} [arg={}]
* @memberof UsrBase
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDashboardView'
+
(
this
.
$t
(
'app.list.notConfig.fetchAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{...
opt
};
const
page
:
any
=
{};
if
(
this
.
isEnablePagingBar
)
{
Object
.
assign
(
page
,
{
page
:
this
.
curPage
-
1
,
size
:
this
.
limit
});
}
// 设置排序
if
(
!
Object
.
is
(
this
.
sortDir
,
''
)
&&
!
Object
.
is
(
this
.
sortField
,
''
))
{
const
sort
:
string
=
this
.
sortField
+
","
+
this
.
sortDir
;
Object
.
assign
(
page
,
{
sort
:
sort
});
}
Object
.
assign
(
arg
,
page
);
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
if
(
this
.
viewparams
){
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
}
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)):{},
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
errorMessage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
}
return
;
}
const
data
:
any
=
response
.
data
;
if
(
!
this
.
isAddBehind
){
this
.
items
=
[];
}
if
(
data
&&
data
.
length
>
0
)
{
let
datas
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
datas
.
map
((
item
:
any
)
=>
{
Object
.
assign
(
item
,
{
isselected
:
false
});
});
this
.
totalRecord
=
response
.
total
;
this
.
items
.
push
(...
datas
);
this
.
items
=
this
.
arrayNonRepeatfy
(
this
.
items
);
}
this
.
isAddBehind
=
false
;
this
.
$emit
(
'load'
,
this
.
items
);
//在导航视图中,如已有选中数据,则右侧展开已选中数据的视图,如无选中数据则默认选中第一条
if
(
this
.
isSelectFirstDefault
){
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
){
this
.
selections
.
forEach
((
select
:
any
)
=>
{
const
index
=
this
.
items
.
findIndex
((
item
:
any
)
=>
Object
.
is
(
item
.
srfkey
,
select
.
srfkey
));
if
(
index
!=
-
1
){
this
.
handleClick
(
this
.
items
[
index
]);
}
})
}
else
{
this
.
handleClick
(
this
.
items
[
0
]);
}
}
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
});
}
/**
* 列表数据去重
*
* @param {Array<any>} [arr]
* @returns {void}
* @memberof UsrBase
*/
public
arrayNonRepeatfy
(
arr
:
Array
<
any
>
)
{
let
map
=
new
Map
();
let
array
=
new
Array
();
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
map
.
set
(
arr
[
i
].
srfkey
,
arr
[
i
]);
}
map
.
forEach
((
value
:
any
,
key
:
string
,
map
:
any
)
=>
{
array
.
push
(
value
);
});
return
array
;
}
/**
* 节流
*
* @param {Array<any>} [arr]
* @returns {void}
* @memberof UsrBase
*/
public
throttle
(
fn
:
any
,
wait
:
number
){
let
time
=
0
;
return
()
=>
{
let
now
=
Date
.
now
()
let
args
=
arguments
;
if
(
now
-
time
>
wait
){
fn
.
apply
(
this
,
args
)
time
=
now
;
}
}
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof UsrBase
*/
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDashboardView'
+
(
this
.
$t
(
'app.list.notConfig.removeAction'
)
as
string
)
});
return
;
}
if
(
datas
.
length
===
0
)
{
return
;
}
let
dataInfo
=
''
;
datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
let
srfmajortext
=
record
.
srfmajortext
;
if
(
index
<
5
)
{
if
(
!
Object
.
is
(
dataInfo
,
''
))
{
dataInfo
+=
'、'
;
}
dataInfo
+=
srfmajortext
;
}
else
{
return
false
;
}
});
if
(
datas
.
length
<
5
)
{
dataInfo
=
dataInfo
+
' 共'
+
datas
.
length
+
'条数据'
;
}
else
{
dataInfo
=
dataInfo
+
'...'
+
' 共'
+
datas
.
length
+
'条数据'
;
}
const
removeData
=
()
=>
{
let
keys
:
any
[]
=
[];
datas
.
forEach
((
data
:
any
)
=>
{
keys
.
push
(
data
.
srfkey
);
});
let
_removeAction
=
keys
.
length
>
1
?
'removeBatch'
:
this
.
removeAction
;
const
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
const
post
:
Promise
<
any
>
=
this
.
service
.
delete
(
_removeAction
,
Object
.
assign
(
context
,{
ibizorder
:
keys
.
join
(
';'
)
}),
Object
.
assign
({
ibizorder
:
keys
.
join
(
';'
)
},{
viewparams
:
this
.
viewparams
}),
this
.
showBusyIndicator
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.delDataFail'
)
as
string
)
+
','
+
response
.
info
});
return
;
}
else
{
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.deleteSuccess'
)
as
string
)
});
}
//删除items中已删除的项
datas
.
forEach
((
data
:
any
)
=>
{
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
this
.
items
.
splice
(
index
,
1
);
return
true
;
}
});
});
this
.
$emit
(
'remove'
,
null
);
this
.
selections
=
[];
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
reject
(
response
);
return
;
}
reject
(
response
);
});
});
}
dataInfo
=
dataInfo
.
replace
(
/
[
null
]
/g
,
''
).
replace
(
/
[
undefined
]
/g
,
''
).
replace
(
/
[
]
/g
,
''
);
this
.
$Modal
.
confirm
({
title
:
(
this
.
$t
(
'app.commonWords.warning'
)
as
string
),
content
:
(
this
.
$t
(
'app.list.confirmDel'
)
as
string
)
+
' '
+
dataInfo
+
','
+
(
this
.
$t
(
'app.list.notRecoverable'
)
as
string
)
,
onOk
:
()
=>
{
removeData
();
},
onCancel
:
()
=>
{
}
});
return
removeData
;
}
/**
* 保存
*
* @param {*} $event
* @returns {Promise<any>}
* @memberof UsrBase
*/
public
async
save
(
args
:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
){
let
_this
=
this
;
let
successItems
:
any
=
[];
let
errorItems
:
any
=
[];
let
errorMessage
:
any
=
[];
for
(
const
item
of
_this
.
items
)
{
try
{
if
(
Object
.
is
(
item
.
rowDataState
,
'create'
)){
if
(
!
this
.
createAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDashboardView'
+
(
this
.
$t
(
'app.list.notConfig.createAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
let
response
=
await
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
successItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)));
}
}
else
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
)){
if
(
!
this
.
updateAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.warning'
)
as
string
),
desc
:
'IBIZOrderDashboardView'
+
(
this
.
$t
(
'app.list.notConfig.updateAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
if
(
item
.
ibizorder
){
Object
.
assign
(
this
.
context
,{
ibizorder
:
item
.
ibizorder
});
}
let
response
=
await
this
.
service
.
add
(
this
.
updateAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
successItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)));
}
}
}
catch
(
error
)
{
errorItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
item
)));
errorMessage
.
push
(
error
);
}
}
this
.
$emit
(
'save'
,
successItems
);
this
.
refresh
();
if
(
errorItems
.
length
===
0
){
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
),
desc
:
item
.
majorentityname
+
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
)
+
'!'
});
console
.
error
(
errorMessage
[
index
]);
});
}
return
successItems
;
}
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof UsrBase
*/
public
onPanelDataChange
(
item
:
any
,
$event
:
any
)
{
Object
.
assign
(
item
,
$event
,
{
rowDataState
:
'update'
});
}
/**
* 选择数据
* @memberof UsrBase
*
*/
public
handleClick
(
args
:
any
)
{
this
.
clearSelection
();
args
.
isselected
=
!
args
.
isselected
;
this
.
selectchange
();
}
/**
* 双击数据
* @memberof UsrBase
*
*/
public
handleDblClick
(
args
:
any
)
{
this
.
$emit
(
'rowdblclick'
,
args
);
}
/**
* 触发事件
* @memberof UsrBase
*
*/
public
selectchange
()
{
this
.
selections
=
[];
this
.
items
.
map
((
item
:
any
)
=>
{
if
(
item
.
isselected
)
{
this
.
selections
.
push
(
item
);
}
});
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
/**
* 清除当前所有选中状态
*
* @memberof UsrBase
*/
public
clearSelection
(){
this
.
items
.
map
((
item
:
any
)
=>
{
Object
.
assign
(
item
,
{
isselected
:
false
});
});
}
/**
* 操作栏模型数据
*
* @type {*}
* @memberof UsrBase
*/
public
ActionModel
:
any
=
{
};
/**
* 操作列界面行为
*
* @param {*} data
* @param {*} tag
* @param {*} $event
* @memberof UsrBase
*/
public
uiAction
(
data
:
any
,
tag
:
any
,
$event
:
any
)
{
$event
.
stopPropagation
();
}
}
</
script
>
<
style
lang=
'less'
>
@import './usr-list.less';
</
style
>
\ No newline at end of file
app_Web/src/widgets/ibizorder/usr-list/usr-list-model.ts
0 → 100644
浏览文件 @
b09c337b
/**
* Usr 部件模型
*
* @export
* @class UsrModel
*/
export
default
class
UsrModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof UsrDashboard_sysportlet2_listMode
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'srfdescription'
,
prop
:
'orderstate'
,
dataType
:
'SSCODELIST'
,
},
{
name
:
'srfdate'
,
prop
:
'ordertime'
,
dataType
:
'DATE'
,
},
{
name
:
'srficon'
,
prop
:
'tp'
,
dataType
:
'LONGTEXT'
,
},
{
name
:
'srfmajortext'
,
prop
:
'ibizordername'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfkey'
,
prop
:
'ibizorderid'
,
dataType
:
'GUID'
,
},
{
name
:
'ibizcustomerid'
,
prop
:
'ibizcustomerid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'wfstep'
,
prop
:
'wfstep'
,
dataType
:
'SSCODELIST'
,
codelist
:{
tag
:
'ORDERSTEP'
,
codelistType
:
'STATIC'
},
},
{
name
:
'orderstate'
,
prop
:
'orderstate'
,
dataType
:
'SSCODELIST'
,
codelist
:{
tag
:
'ORDERSTATE'
,
codelistType
:
'STATIC'
},
},
{
name
:
'srfmstag'
,
},
{
name
:
'ibizorder'
,
prop
:
'ibizorderid'
,
dataType
:
'FONTKEY'
,
},
{
name
:
'size'
,
prop
:
'size'
},
{
name
:
'query'
,
prop
:
'query'
},
{
name
:
'sort'
,
prop
:
'sort'
},
{
name
:
'page'
,
prop
:
'page'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
]
}
}
\ No newline at end of file
app_Web/src/widgets/ibizorder/usr-list/usr-list-service.ts
0 → 100644
浏览文件 @
b09c337b
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
IBIZOrderService
from
'@/service/ibizorder/ibizorder-service'
;
import
UsrModel
from
'./usr-list-model'
;
/**
* Usr 部件服务对象
*
* @export
* @class UsrService
*/
export
default
class
UsrService
extends
ControlService
{
/**
* 订单服务对象
*
* @type {IBIZOrderService}
* @memberof UsrService
*/
public
appEntityService
:
IBIZOrderService
=
new
IBIZOrderService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof UsrService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of UsrService.
*
* @param {*} [opts={}]
* @memberof UsrService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
UsrModel
();
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UsrService
*/
@
Errorlog
public
search
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
FetchDefault
(
Context
,
Data
,
isloading
);
}
result
.
then
(
async
(
response
)
=>
{
await
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UsrService
*/
@
Errorlog
public
delete
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
remove
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UsrService
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Create
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UsrService
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
}
\ No newline at end of file
app_Web/src/widgets/ibizorder/usr-list/usr-list.less
0 → 100644
浏览文件 @
b09c337b
// this is less
.app-list {
height:100%;
flex-grow: 1;
overflow-y: auto;
.el-collapse-item__header.is-active{
color: #409eff;
background-color: #ecf5ff;
}
.el-collapse{
.el-collapse-item{
.el-collapse-item__wrap{
.el-collapse-item__content{
padding: 10px 0 10px 0;
}
}
}
}
.app-list-item {
line-height: 34px;
padding: 12px 6px;
min-height: 24px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f0f0f0;
.app-list-item-content {
width: 70%;
display: flex;
align-items: center;
.item-icon {
width: 40px;
height: 40px;
margin-right: 14px;
img {
width: 40px;
height: 40px;
border-radius: 50%;
}
}
.item-content-text {
display: flex;
flex-direction: column;
.item-text {
font-size: 18px;
font-weight: bold;
}
.item-subtext {
color: #8c8c8c;
}
}
}
.app-list-item-date {
position: relative;
color: #8c8c8c;
}
}
.app-list-item.isSelect {
background: #ecf5ff;
border-radius: 2px;
border-color: rgb(197, 197, 197);
}
.app-list-item:hover {
background: #ecf5ff;
}
.loadmore {
text-align: center;
padding: 10px;
text-decoration: underline;
color: #82bff7;
cursor: default;
}
}
.app-list-empty {
height:100%;
color: #909399;
display: flex;
justify-content: center;
align-items: center;
}
app_Web/src/widgets/ibizorder/usr-list/usr-list.vue
0 → 100644
浏览文件 @
b09c337b
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
UsrBase
from
'./usr-list-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
Usr
extends
UsrBase
{
}
</
script
>
\ No newline at end of file
demo-core/src/main/java/cn/ibizlab/core/sample/domain/IBIZBOOK.java
浏览文件 @
b09c337b
...
...
@@ -157,6 +157,13 @@ public class IBIZBOOK extends EntityMP implements Serializable {
@JSONField
(
name
=
"icon"
)
@JsonProperty
(
"icon"
)
private
String
icon
;
/**
* 图书销售状态
*/
@TableField
(
value
=
"sailstate"
)
@JSONField
(
name
=
"sailstate"
)
@JsonProperty
(
"sailstate"
)
private
String
sailstate
;
...
...
@@ -260,6 +267,14 @@ public class IBIZBOOK extends EntityMP implements Serializable {
this
.
modify
(
"icon"
,
icon
);
}
/**
* 设置 [图书销售状态]
*/
public
void
setSailstate
(
String
sailstate
)
{
this
.
sailstate
=
sailstate
;
this
.
modify
(
"sailstate"
,
sailstate
);
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
...
...
demo-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
b09c337b
...
...
@@ -61,6 +61,8 @@
</column>
<column
name=
"ICON"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
<column
name=
"SAILSTATE"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
</createTable>
</changeSet>
...
...
demo-core/src/main/resources/mapper/sample/ibizbook/IBIZBOOKMapper.xml
浏览文件 @
b09c337b
...
...
@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"IBIZBOOKResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`AUTHOR`, t1.`BOOKNUMBER`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZBOOKID`, t1.`IBIZBOOKNAME`, t1.`ICON`, t1.`LENDOUTTIME`, t1.`PRESS`, t1.`PRICE`, t1.`RETURNTIME`, t1.`SUBTEXT`, t1.`TYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZBOOK` t1 ) t1 where ibizbookid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`AUTHOR`, t1.`BOOKNUMBER`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZBOOKID`, t1.`IBIZBOOKNAME`, t1.`ICON`, t1.`LENDOUTTIME`, t1.`PRESS`, t1.`PRICE`, t1.`RETURNTIME`, t1.`S
AILSTATE`, t1.`S
UBTEXT`, t1.`TYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZBOOK` t1 ) t1 where ibizbookid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
...
...
@@ -27,12 +27,12 @@
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`AUTHOR`, t1.`BOOKNUMBER`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZBOOKID`, t1.`IBIZBOOKNAME`, t1.`ICON`, t1.`LENDOUTTIME`, t1.`PRESS`, t1.`PRICE`, t1.`RETURNTIME`, t1.`SUBTEXT`, t1.`TYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZBOOK` t1
<![CDATA[ SELECT t1.`AUTHOR`, t1.`BOOKNUMBER`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZBOOKID`, t1.`IBIZBOOKNAME`, t1.`ICON`, t1.`LENDOUTTIME`, t1.`PRESS`, t1.`PRICE`, t1.`RETURNTIME`, t1.`S
AILSTATE`, t1.`S
UBTEXT`, t1.`TYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZBOOK` t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`AUTHOR`, t1.`BOOKNUMBER`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZBOOKID`, t1.`IBIZBOOKNAME`, t1.`ICON`, t1.`LENDOUTTIME`, t1.`PRESS`, t1.`PRICE`, t1.`RETURNTIME`, t1.`SUBTEXT`, t1.`TYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZBOOK` t1
<![CDATA[ SELECT t1.`AUTHOR`, t1.`BOOKNUMBER`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZBOOKID`, t1.`IBIZBOOKNAME`, t1.`ICON`, t1.`LENDOUTTIME`, t1.`PRESS`, t1.`PRICE`, t1.`RETURNTIME`, t1.`S
AILSTATE`, t1.`S
UBTEXT`, t1.`TYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZBOOK` t1
]]>
</sql>
</mapper>
...
...
demo-core/src/main/resources/sysmodel/DemoSys.json
浏览文件 @
b09c337b
...
...
@@ -375,6 +375,20 @@
"key_field"
:
0
,
"show_order"
:
1000
,
"major_field"
:
0
},
{
"fieldname"
:
"SAILSTATE"
,
"codename"
:
"Sailstate"
,
"field_logic_name"
:
"图书销售状态"
,
"entity_name"
:
"IBIZBOOK"
,
"field_type"
:
"TEXT"
,
"nullable"
:
1
,
"physical_field"
:
1
,
"data_type"
:
"VARCHAR"
,
"data_length"
:
100
,
"key_field"
:
0
,
"show_order"
:
1000
,
"major_field"
:
0
}
],
"subEntitys"
:[
...
...
demo-provider/demo-provider-demoapi/src/main/java/cn/ibizlab/demoapi/dto/IBIZBOOKDTO.java
浏览文件 @
b09c337b
...
...
@@ -165,6 +165,15 @@ public class IBIZBOOKDTO extends DTOBase implements Serializable {
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
private
String
icon
;
/**
* 属性 [SAILSTATE]
*
*/
@JSONField
(
name
=
"sailstate"
)
@JsonProperty
(
"sailstate"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
private
String
sailstate
;
/**
* 设置 [IBIZBOOKNAME]
...
...
@@ -246,6 +255,14 @@ public class IBIZBOOKDTO extends DTOBase implements Serializable {
this
.
modify
(
"icon"
,
icon
);
}
/**
* 设置 [SAILSTATE]
*/
public
void
setSailstate
(
String
sailstate
){
this
.
sailstate
=
sailstate
;
this
.
modify
(
"sailstate"
,
sailstate
);
}
}
...
...
demo-util/src/main/java/cn/ibizlab/util/dict/StaticDict.java
浏览文件 @
b09c337b
...
...
@@ -377,6 +377,7 @@ public class StaticDict {
}
/**
* 代码表[年周(1~52)]
*/
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录