Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
T
TrainSys
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
苏州培训方案
TrainSys
提交
370b1696
提交
370b1696
编写于
9月 01, 2022
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lxm1993 发布系统代码 [TrainSys,网页端]
上级
f3904da6
变更
13
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
176 行增加
和
156 行删除
+176
-156
package.json
app_Web/package.json
+1
-1
model-service.ts
...ages/ibiz-core/src/service/model-service/model-service.ts
+1
-5
sandbox-instance.ts
...ore/src/service/model-service/sandbox/sandbox-instance.ts
+5
-12
app-global-action-service.ts
...rc/app-service/logic-service/app-global-action-service.ts
+2
-8
app-column-link.vue
...src/components/common/app-column-link/app-column-link.vue
+24
-2
view-container-base.tsx
...kages/ibiz-vue/src/view-container/view-container-base.tsx
+2
-9
deredirectview-base.tsx
app_Web/packages/ibiz-vue/src/view/deredirectview-base.tsx
+1
-9
view-base.tsx
app_Web/packages/ibiz-vue/src/view/view-base.tsx
+0
-25
grid-control-base.tsx
app_Web/packages/ibiz-vue/src/widgets/grid-control-base.tsx
+66
-78
auth-guard.ts
app_Web/src/utils/auth-guard/auth-guard.ts
+2
-5
h2_table.xml
trainsys-core/src/main/resources/liquibase/h2_table.xml
+2
-2
Main.json
...PSSYSAPPS/Web/PSAPPDATAENTITIES/Reginfo/PSFORMS/Main.json
+35
-0
ReginfoEditView.json
.../trainsys/PSSYSAPPS/Web/PSAPPDEVIEWS/ReginfoEditView.json
+35
-0
未找到文件。
app_Web/package.json
浏览文件 @
370b1696
...
...
@@ -72,7 +72,7 @@
"@interactjs/actions"
:
"^1.10.11"
,
"@interactjs/modifiers"
:
"^1.10.11"
,
"@interactjs/dev-tools"
:
"^1.10.11"
,
"@ibiz/dynamic-model-api"
:
"
0.0.61
"
,
"@ibiz/dynamic-model-api"
:
"
1.0.5
"
,
"@ibiz/model-location"
:
"^0.0.4"
,
"xgplayer"
:
"2.31.4"
,
"xlsx"
:
"^0.16.9"
...
...
app_Web/packages/ibiz-core/src/service/model-service/model-service.ts
浏览文件 @
370b1696
...
...
@@ -18,10 +18,6 @@ export class AppModelService extends PSModelServiceImpl { }
if
(
param
&&
param
.
srfsandboxtag
){
return
SandboxService
.
getInstance
().
getSandBoxInstance
(
param
.
srfsandboxtag
).
getModelService
(
param
);
}
else
{
if
(
param
&&
param
.
instTag
&&
param
.
instTag2
){
return
GlobalHelp
.
getModelServiceByTag
(
param
.
instTag
,
param
.
instTag2
);
}
else
{
return
GlobalHelp
.
getModelService
(
param
?.
srfdynainstid
);
}
return
GlobalHelp
.
getModelService
();
}
}
\ No newline at end of file
app_Web/packages/ibiz-core/src/service/model-service/sandbox/sandbox-instance.ts
浏览文件 @
370b1696
import
{
DynamicInstanceConfig
,
GlobalHelp
,
ModelInstanceHelp
}
from
"@ibiz/dynamic-model-api"
;
import
{
GlobalHelp
,
ModelInstanceHelp
}
from
"@ibiz/dynamic-model-api"
;
import
qs
from
'qs'
;
import
{
Http
}
from
"../../../utils/net/http"
;
import
{
AppServiceBase
}
from
"../../app-service/app-base.service"
;
...
...
@@ -45,7 +45,7 @@ export class SandboxInstance {
*/
public
async
initSandBox
()
{
const
service
=
new
AppModelService
();
this
.
help
=
await
GlobalHelp
.
sandboxInstall
(
service
,
async
(
strPath
:
string
,
config
:
DynamicInstanceConfig
)
=>
{
this
.
help
=
await
GlobalHelp
.
sandboxInstall
(
service
,
async
(
strPath
:
string
)
=>
{
let
url
:
string
=
''
;
const
Environment
=
AppServiceBase
.
getInstance
().
getAppEnvironment
();
if
(
Environment
.
bDynamic
)
{
...
...
@@ -55,17 +55,14 @@ export class SandboxInstance {
if
(
dynamodeltag
)
{
Object
.
assign
(
queryParam
,
{
dynamodeltag
});
}
if
(
config
)
{
Object
.
assign
(
queryParam
,
{
srfInstTag
:
config
.
instTag
,
srfInstTag2
:
config
.
instTag2
});
}
if
(
queryParam
&&
Object
.
keys
(
queryParam
).
length
>
0
)
{
url
+=
`?
${
qs
.
stringify
(
queryParam
)}
`
;
}
}
else
{
const
microAppService
=
AppServiceBase
.
getInstance
().
getMicroAppService
();
if
(
microAppService
&&
microAppService
.
getIsMicroApp
()
&&
microAppService
.
getMicroAppFolder
())
{
if
(
microAppService
&&
microAppService
.
getIsMicroApp
()
&&
microAppService
.
getMicroAppFolder
())
{
url
=
`./
${
microAppService
.
getMicroAppFolder
()}
/assets/model
${
strPath
}
`
;
}
else
{
}
else
{
url
=
`./assets/model
${
strPath
}
`
;
}
}
...
...
@@ -86,11 +83,7 @@ export class SandboxInstance {
* @memberof SandboxInstance
*/
public
async
getModelService
(
param
:
any
)
{
if
(
param
&&
param
.
instTag
&&
param
.
instTag2
)
{
return
this
.
help
.
getModelServiceByTag
(
param
.
instTag
,
param
.
instTag2
);
}
else
{
return
this
.
help
.
getModelService
(
param
?.
srfdynainstid
);
}
return
this
.
help
.
getModelService
();
}
}
\ No newline at end of file
app_Web/packages/ibiz-vue/src/app-service/logic-service/app-global-action-service.ts
浏览文件 @
370b1696
import
{
IPSAppDEUIAction
,
IPSAppView
,
IPSAppViewRef
,
IPSPanelContainer
,
IPSPanelField
,
IPSPanelItem
,
IPSPanelTabPage
,
IPSPanelTabPanel
,
IPSPanelUserControl
,
DynamicInstanceConfig
}
from
"@ibiz/dynamic-model-api"
;
import
{
IPSAppDEUIAction
,
IPSAppView
,
IPSAppViewRef
,
IPSPanelContainer
,
IPSPanelField
,
IPSPanelItem
,
IPSPanelTabPage
,
IPSPanelTabPanel
,
IPSPanelUserControl
}
from
"@ibiz/dynamic-model-api"
;
import
{
clearCookie
,
setCookie
}
from
"qx-util"
;
import
{
AppServiceBase
,
DataServiceHelp
,
GetModelService
,
Http
,
ModelTool
,
PluginService
,
removeSessionStorage
,
Util
,
ViewTool
}
from
"ibiz-core"
;
import
{
NavDataService
}
from
"../common-service/app-navdata-service"
;
...
...
@@ -765,13 +765,7 @@ export class AppGlobalService {
let
localdata
:
any
;
let
requestResult
:
Promise
<
any
>
;
let
copyContext
:
any
=
Util
.
deepCopy
(
_this
.
context
);
if
(
copyContext
.
srfdynainstid
)
{
let
dynainstParam
:
DynamicInstanceConfig
=
(
await
GetModelService
(
copyContext
)).
getDynaInsConfig
();
Object
.
assign
(
copyContext
,
dynainstParam
?
dynainstParam
:
{});
requestResult
=
_this
.
appEntityService
.
getCopyWorkflow
(
copyContext
);
}
else
{
requestResult
=
_this
.
appEntityService
.
getStandWorkflow
(
copyContext
);
}
requestResult
=
_this
.
appEntityService
.
getStandWorkflow
(
copyContext
);
requestResult
.
then
((
response
:
any
)
=>
{
const
{
data
:
targetData
,
status
:
status
}
=
response
;
if
(
status
!==
200
)
{
...
...
app_Web/packages/ibiz-vue/src/components/common/app-column-link/app-column-link.vue
浏览文件 @
370b1696
...
...
@@ -241,7 +241,7 @@ export default class AppColumnLink extends Vue {
* @param {*} params
* @memberof AppColumnLink
*/
private
async
openRedirectView
(
$event
:
any
,
context
:
any
,
params
:
any
)
{
private
async
openRedirectView
(
$event
:
any
,
context
:
any
,
params
:
any
)
{
let
targetRedirectView
:
IPSAppDERedirectView
=
this
.
linkview
.
viewModel
;
await
targetRedirectView
.
fill
(
true
);
if
(
...
...
@@ -254,6 +254,16 @@ export default class AppColumnLink extends Vue {
targetRedirectView
.
getPSAppDataEntity
(),
{
context
}
);
if
(
targetRedirectView
.
getPSAppViewNavContexts
())
{
const
localContextRef
:
any
=
Util
.
formatNavParam
(
targetRedirectView
.
getPSAppViewNavContexts
(),
true
);
const
_context
:
any
=
Util
.
computedNavData
(
this
.
data
,
context
,
params
,
localContextRef
);
Object
.
assign
(
context
,
_context
);
}
if
(
targetRedirectView
.
getPSAppViewNavParams
())
{
const
localContextRef
:
any
=
Util
.
formatNavParam
(
targetRedirectView
.
getPSAppViewNavParams
(),
true
);
const
_params
:
any
=
Util
.
computedNavData
(
this
.
data
,
context
,
params
,
localContextRef
);
Object
.
assign
(
params
,
_params
);
}
await
redirectUIService
.
loaded
();
const
redirectAppEntity
:
IPSAppDataEntity
|
null
=
targetRedirectView
.
getPSAppDataEntity
();
await
ViewTool
.
calcRedirectContext
(
context
,
this
.
data
,
redirectAppEntity
);
...
...
@@ -266,6 +276,18 @@ export default class AppColumnLink extends Vue {
if
(
!
result
)
{
return
;
}
const
data
=
result
.
srfdata
;
if
(
data
)
{
const
linkUrl
:
string
=
data
.
linkurl
;
if
(
linkUrl
&&
linkUrl
!==
''
)
{
if
(
linkUrl
.
startsWith
(
'http://'
)
||
linkUrl
.
startsWith
(
'https://'
))
{
window
.
open
(
linkUrl
,
'_blank'
);
}
else
{
this
.
$router
.
push
(
linkUrl
);
}
return
;
}
}
let
targetOpenViewRef
:
IPSAppViewRef
|
undefined
=
ViewTool
.
computeRedirectViewRef
(
targetRedirectView
,
params
,
result
);
if
(
!
targetOpenViewRef
)
{
return
;
...
...
@@ -347,7 +369,7 @@ export default class AppColumnLink extends Vue {
this
.
openDrawer
(
view
,
context
,
params
);
}
}
/**
* 打开页面关闭
*
...
...
app_Web/packages/ibiz-vue/src/view-container/view-container-base.tsx
浏览文件 @
370b1696
import
Vue
from
'vue'
;
import
qs
from
'qs'
;
import
{
DynamicInstanceConfig
,
IPSAppView
}
from
'@ibiz/dynamic-model-api'
;
import
{
IPSAppView
}
from
'@ibiz/dynamic-model-api'
;
import
{
AppServiceBase
,
GetModelService
,
SandboxInstance
,
Util
}
from
'ibiz-core'
;
import
{
AppNavHistory
}
from
'../app-service'
;
import
{
CommunicationService
}
from
'@ibiz/model-location'
;
...
...
@@ -165,13 +165,6 @@ export class ViewContainerBase extends Vue {
if
(
tempViewParam
&&
tempViewParam
.
hasOwnProperty
(
'srfsandboxtag'
))
{
await
this
.
initSandBoxInst
(
tempViewParam
);
}
if
(
tempViewParam
.
srfinsttag
&&
tempViewParam
.
srfinsttag2
)
{
let
dynainstParam
:
DynamicInstanceConfig
=
(
await
GetModelService
({
srfsandboxtag
:
tempViewParam
.
srfsandboxtag
,
instTag
:
tempViewParam
.
srfinsttag
,
instTag2
:
tempViewParam
.
srfinsttag2
})).
getDynaInsConfig
();
this
.
context
=
{
srfdynainstid
:
dynainstParam
.
id
};
}
if
(
tempViewParam
.
srfdynainstid
)
{
this
.
context
=
{
srfdynainstid
:
tempViewParam
.
srfdynainstid
};
}
// 补充沙箱实例参数(路由)
if
(
tempViewParam
&&
tempViewParam
.
hasOwnProperty
(
'srfsandboxtag'
))
{
Object
.
assign
(
this
.
context
,
{
'srfsandboxtag'
:
tempViewParam
.
srfsandboxtag
});
...
...
@@ -359,4 +352,4 @@ export class ViewContainerBase extends Vue {
});
return
tempValue
;
}
}
}
\ No newline at end of file
app_Web/packages/ibiz-vue/src/view/deredirectview-base.tsx
浏览文件 @
370b1696
import
{
VNode
}
from
'vue'
;
import
{
DynamicInstanceConfig
,
IPSAppDataEntity
,
IPSAppDERedirectView
,
IPSAppDEView
,
IPSAppView
,
IPSAppViewRef
,
IPSNavigateContext
,
IPSNavigateParam
}
from
"@ibiz/dynamic-model-api"
;
import
{
IPSAppDataEntity
,
IPSAppDERedirectView
,
IPSAppDEView
,
IPSAppView
,
IPSAppViewRef
,
IPSNavigateContext
,
IPSNavigateParam
}
from
"@ibiz/dynamic-model-api"
;
import
{
GetModelService
,
LogUtil
,
ModelTool
,
RedirectViewInterface
,
StringUtil
,
Util
,
ViewTool
}
from
"ibiz-core"
;
import
{
MainViewBase
}
from
"./mainview-base"
;
...
...
@@ -135,14 +135,6 @@ export class DeRedirectViewBase extends MainViewBase implements RedirectViewInte
}
Object
.
assign
(
tempViewParams
,
_viewParams
);
}
// 存在动态实例
let
splitArray
:
Array
<
any
>
=
result
.
param
.
split
(
":"
);
if
(
splitArray
&&
(
splitArray
.
length
==
3
))
{
let
curDynaInst
:
DynamicInstanceConfig
=
(
await
GetModelService
({
instTag
:
splitArray
[
2
],
instTag2
:
splitArray
[
1
]
}))?.
getDynaInsConfig
();
if
(
curDynaInst
)
{
Object
.
assign
(
tempContext
,
{
srfdynainstid
:
curDynaInst
.
id
});
}
}
if
(
targetOpenViewRef
.
getRefPSAppView
())
{
let
targetOpenView
:
IPSAppView
|
null
=
targetOpenViewRef
.
getRefPSAppView
();
if
(
!
targetOpenView
)
{
...
...
app_Web/packages/ibiz-vue/src/view/view-base.tsx
浏览文件 @
370b1696
...
...
@@ -2,7 +2,6 @@ import { Subject, Subscription } from 'rxjs';
import
{
IPSAppView
,
IPSControl
,
IPSLanguageRes
}
from
'@ibiz/dynamic-model-api'
;
import
{
ViewMessageService
,
Util
,
ViewTool
,
AppServiceBase
,
ViewContext
,
ModelTool
,
GetModelService
,
AppModelService
,
LogUtil
,
SandboxInstance
,
ViewInterface
,
appEngineService
,
throttle
}
from
'ibiz-core'
;
import
{
AppMessageBoxService
,
AppNavHistory
,
NavDataService
}
from
'../app-service'
;
import
{
DynamicInstanceConfig
}
from
'@ibiz/dynamic-model-api/dist/types/core'
;
import
{
createUUID
,
isNilOrEmpty
}
from
'qx-util'
;
import
{
ControlContainer
}
from
'../control-container/control-container'
;
...
...
@@ -736,7 +735,6 @@ export class ViewBase extends ControlContainer implements ViewInterface {
Object
.
assign
(
_this
.
viewparams
,
{
srfparentkey
:
_this
.
context
.
srfparentkey
});
}
_this
.
handleCustomViewData
();
_this
.
handleOtherViewData
();
return
;
}
const
path
=
(
_this
.
$route
.
matched
[
_this
.
$route
.
matched
.
length
-
1
]).
path
;
...
...
@@ -759,19 +757,11 @@ export class ViewBase extends ControlContainer implements ViewInterface {
if
(
_this
.
viewInstance
&&
ModelTool
.
getContainerAppEntityCodeName
(
this
.
viewInstance
))
{
Object
.
assign
(
_this
.
context
,
{
srfsessionid
:
Util
.
createUUID
()
});
}
if
(
_this
.
viewparams
.
srfinsttag
&&
_this
.
viewparams
.
srfinsttag2
&&
this
.
modelService
)
{
let
dynainstParam
:
DynamicInstanceConfig
=
this
.
modelService
.
getDynaInsConfig
();
Object
.
assign
(
_this
.
context
,
{
srfdynainstid
:
dynainstParam
.
id
});
}
if
(
_this
.
viewparams
&&
_this
.
viewparams
.
srfdynainstid
)
{
Object
.
assign
(
_this
.
context
,
{
srfdynainstid
:
this
.
viewparams
.
srfdynainstid
});
}
// 补充沙箱实例参数(路由)
if
(
_this
.
viewparams
&&
_this
.
viewparams
.
hasOwnProperty
(
'srfsandboxtag'
))
{
Object
.
assign
(
_this
.
context
,
{
'srfsandboxtag'
:
_this
.
viewparams
.
srfsandboxtag
});
}
_this
.
handleCustomViewData
();
_this
.
handleOtherViewData
();
}
/**
...
...
@@ -799,21 +789,6 @@ export class ViewBase extends ControlContainer implements ViewInterface {
}
}
/**
* 处理其他数据(多实例)
*
* @memberof ViewBase
*/
public
handleOtherViewData
()
{
let
appEnvironment
=
AppServiceBase
.
getInstance
().
getAppEnvironment
();
if
(
appEnvironment
.
bDynamic
&&
this
.
modelService
)
{
let
dynainstParam
:
DynamicInstanceConfig
=
this
.
modelService
.
getDynaInsConfig
();
if
(
dynainstParam
)
{
Object
.
assign
(
this
.
viewparams
,
{
srfinsttag
:
dynainstParam
.
instTag
,
srfinsttag2
:
dynainstParam
.
instTag2
});
}
}
}
/**
* 处理指定视图控制关系将父键转为父实体上下文
*
...
...
app_Web/packages/ibiz-vue/src/widgets/grid-control-base.tsx
浏览文件 @
370b1696
...
...
@@ -3,7 +3,7 @@ import { ViewTool, FormItemModel, Util, Verify, ModelTool, AppServiceBase, LogUt
import
{
MDControlBase
}
from
'./md-control-base'
;
import
{
AppGridService
}
from
'../ctrl-service/app-grid-service'
;
import
{
AppViewLogicService
}
from
'ibiz-vue'
;
import
{
IPSDEDataImport
,
DynamicInstanceConfig
,
IPSDEDataImportItem
,
IPSAppCodeList
,
IPSAppDataEntity
,
IPSAppDEField
,
IPSCodeList
,
IPSDEDataExport
,
IPSDEDataExportItem
,
IPSDEGrid
,
IPSDEGridColumn
,
IPSDEGridDataItem
,
IPSDEGridEditItem
,
IPSDEGridFieldColumn
,
IPSDEGridUAColumn
,
IPSDEUIAction
,
IPSDEUIActionGroup
,
IPSUIAction
,
IPSUIActionGroupDetail
,
IPSDEGridGroupColumn
,
IPSDEGridEditItemUpdate
,
IPSAppDEDataSet
,
IPSDEFValueRule
}
from
'@ibiz/dynamic-model-api'
;
import
{
IPSDEDataImport
,
IPSAppCodeList
,
IPSAppDataEntity
,
IPSAppDEField
,
IPSCodeList
,
IPSDEDataExport
,
IPSDEDataExportItem
,
IPSDEGrid
,
IPSDEGridColumn
,
IPSDEGridDataItem
,
IPSDEGridEditItem
,
IPSDEGridFieldColumn
,
IPSDEGridUAColumn
,
IPSDEUIAction
,
IPSDEUIActionGroup
,
IPSUIAction
,
IPSUIActionGroupDetail
,
IPSDEGridGroupColumn
,
IPSDEGridEditItemUpdate
,
IPSAppDEDataSet
,
IPSDEFValueRule
}
from
'@ibiz/dynamic-model-api'
;
import
axios
from
'axios'
;
import
moment
from
'moment'
;
...
...
@@ -358,11 +358,11 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
*/
public
importStateEvent
:
Subscription
|
undefined
;
/**
* @description 表格部件事件
* @type {(Subscription | undefined)}
* @memberof GridControlBase
*/
/**
* @description 表格部件事件
* @type {(Subscription | undefined)}
* @memberof GridControlBase
*/
public
gridControlEvent
:
Subscription
|
undefined
;
/**
...
...
@@ -607,7 +607,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
this
.
aggMode
=
this
.
controlInstance
.
aggMode
;
this
.
allColumnsInstance
=
this
.
controlInstance
.
getPSDEGridColumns
()
||
[];
// 计算主信息表格列名
this
.
initMajorInfoColName
();
this
.
initMajorInfoColName
();
//开启分组
if
(
this
.
isEnableGroup
)
{
const
groupCodeList
:
IPSAppCodeList
=
this
.
controlInstance
.
getGroupPSCodeList
()
as
IPSAppCodeList
;
...
...
@@ -624,17 +624,17 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
* 计算主信息表格列名
*
* @memberof GridControlBase
*/
public
initMajorInfoColName
(){
*/
public
initMajorInfoColName
()
{
if
(
this
.
allColumnsInstance
.
length
>
0
)
{
this
.
allColumnsInstance
.
forEach
((
column
:
any
)
=>
{
if
(
column
.
columnType
==
'DEFGRIDCOLUMN'
)
{
let
majorInfoField
=
column
.
getPSAppDEField
();
if
(
majorInfoField
&&
majorInfoField
.
majorField
)
{
this
.
majorInfoColName
=
majorInfoField
.
name
.
toLowerCase
();
}
}
})
this
.
allColumnsInstance
.
forEach
((
column
:
any
)
=>
{
if
(
column
.
columnType
==
'DEFGRIDCOLUMN'
)
{
let
majorInfoField
=
column
.
getPSAppDEField
();
if
(
majorInfoField
&&
majorInfoField
.
majorField
)
{
this
.
majorInfoColName
=
majorInfoField
.
name
.
toLowerCase
();
}
}
})
}
}
...
...
@@ -899,7 +899,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
}
}
}
if
(
tempMessage
)
{
if
(
tempMessage
)
{
this
.
errorMessages
.
push
(
tempMessage
);
}
}
...
...
@@ -934,7 +934,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
Object
.
assign
(
page
,
{
sort
:
sort
});
}
Object
.
assign
(
arg
,
page
);
const
parentdata
:
any
=
{
};
const
parentdata
:
any
=
{};
this
.
ctrlEvent
({
controlname
:
this
.
name
,
action
:
"beforeload"
,
data
:
parentdata
});
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:
opt
?
opt
:
{};
...
...
@@ -942,14 +942,8 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
// 多实例查询数据处理
let
appEnvironment
=
AppServiceBase
.
getInstance
().
getAppEnvironment
();
if
(
appEnvironment
.
bDynamic
)
{
if
(
tempViewParams
.
hasOwnProperty
(
"srfdynainstid"
))
{
let
dynainstParam
:
DynamicInstanceConfig
=
this
.
modelService
?.
getDynaInsConfig
();
Object
.
assign
(
tempViewParams
,
{
srfinsttag
:
dynainstParam
.
instTag
,
srfinsttag2
:
dynainstParam
.
instTag2
});
delete
tempViewParams
.
srfdynainstid
;
}
else
{
if
(
!
tempViewParams
.
hasOwnProperty
(
"srfinsttag"
))
{
Object
.
assign
(
tempViewParams
,
{
srfinsttag
:
"__srfstdinst__"
});
}
if
(
!
tempViewParams
.
hasOwnProperty
(
"srfinsttag"
))
{
Object
.
assign
(
tempViewParams
,
{
srfinsttag
:
"__srfstdinst__"
});
}
}
else
{
if
(
tempViewParams
.
hasOwnProperty
(
"srfwf"
))
{
...
...
@@ -1032,9 +1026,9 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
const
tempViewParam
=
Util
.
deepCopy
(
tempViewParams
);
Object
.
assign
(
tempViewParam
,
page
)
Object
.
keys
(
parentdata
)?.
forEach
((
key
:
string
)
=>
{
if
(
!
Object
.
is
(
key
,
'viewparams'
)
&&
parentdata
[
key
])
{
Object
.
assign
(
tempViewParam
,
{
[
key
]:
parentdata
[
key
]
})
}
if
(
!
Object
.
is
(
key
,
'viewparams'
)
&&
parentdata
[
key
])
{
Object
.
assign
(
tempViewParam
,
{
[
key
]:
parentdata
[
key
]
})
}
})
this
.
getAggData
(
tempContext
,
tempViewParam
);
}
...
...
@@ -1123,9 +1117,9 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
}
});
if
(
!
dataInfo
)
{
if
(
!
dataInfo
)
{
dataInfo
=
(
this
.
$t
(
'app.grid.selected'
)
as
string
)
+
_datas
.
length
+
(
this
.
$t
(
'app.grid.records'
)
as
string
)
+
(
this
.
$t
(
'app.grid.data'
)
as
string
);
}
else
{
}
else
{
if
(
_datas
.
length
<
5
)
{
dataInfo
=
dataInfo
+
' '
+
(
this
.
$t
(
'app.grid.total'
)
as
string
)
+
_datas
.
length
+
(
this
.
$t
(
'app.grid.records'
)
as
string
)
+
(
this
.
$t
(
'app.grid.data'
)
as
string
);
}
else
{
...
...
@@ -1138,23 +1132,23 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
_datas
.
forEach
((
data
:
any
)
=>
{
keys
.
push
(
data
.
srfkey
);
});
if
(
keys
.
length
===
0
)
{
if
(
keys
.
length
===
0
)
{
return
;
}
let
_removeAction
=
this
.
removeAction
;
// 临时模式批删除
if
(
Object
.
is
(
this
.
removeAction
,
'RemoveTemp'
)
&&
keys
.
length
>
1
)
{
if
(
Object
.
is
(
this
.
removeAction
,
'RemoveTemp'
)
&&
keys
.
length
>
1
)
{
_removeAction
=
'RemoveBatchTemp'
;
}
const
tempContext
:
any
=
Util
.
deepCopy
(
this
.
context
);
let
_keys
=
keys
.
length
>
1
?
keys
:
keys
[
0
];
const
arg
=
{
[
this
.
appDeCodeName
.
toLowerCase
()]:
_keys
};
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
});
let
promises
:
any
;
if
(
keys
&&
keys
.
length
>
1
)
{
let
promises
:
any
;
if
(
keys
&&
keys
.
length
>
1
)
{
let
promiseArr
:
any
=
[];
_keys
.
forEach
((
ele
:
any
)
=>
{
Object
.
assign
(
tempContext
,
{[
this
.
appDeCodeName
?.
toLowerCase
()]:
ele
});
_keys
.
forEach
((
ele
:
any
)
=>
{
Object
.
assign
(
tempContext
,
{
[
this
.
appDeCodeName
?.
toLowerCase
()]:
ele
});
if
(
this
.
viewparams
&&
Object
.
keys
(
this
.
viewparams
).
length
)
{
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
});
}
...
...
@@ -1162,8 +1156,8 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
promiseArr
.
push
(
this
.
service
.
delete
(
_removeAction
,
tempContext
,
arg
,
this
.
showBusyIndicator
));
})
promises
=
Promise
.
all
(
promiseArr
);
}
else
{
Object
.
assign
(
tempContext
,
{[
this
.
appDeCodeName
?.
toLowerCase
()]:
_keys
});
}
else
{
Object
.
assign
(
tempContext
,
{
[
this
.
appDeCodeName
?.
toLowerCase
()]:
_keys
});
if
(
this
.
viewparams
&&
Object
.
keys
(
this
.
viewparams
).
length
)
{
Object
.
assign
(
arg
,
{
viewparams
:
this
.
viewparams
});
}
...
...
@@ -1200,13 +1194,13 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
this
.
totalRecord
-=
_datas
.
length
;
this
.
ctrlEvent
({
controlname
:
this
.
name
,
action
:
"remove"
,
data
:
{}
});
this
.
selections
=
[];
}).
catch
(
async
(
error
:
any
)
=>
{
this
.
onControlResponse
(
'remove'
,
error
);
if
(
!
(
await
this
.
handleCtrlEvents
(
'onremoveerror'
,
{
action
:
this
.
removeAction
,
navParam
:
arg
,
data
:
error
?.
data
})))
{
return
;
}
this
.
$throw
(
error
,
'remove'
);
})
}).
catch
(
async
(
error
:
any
)
=>
{
this
.
onControlResponse
(
'remove'
,
error
);
if
(
!
(
await
this
.
handleCtrlEvents
(
'onremoveerror'
,
{
action
:
this
.
removeAction
,
navParam
:
arg
,
data
:
error
?.
data
})))
{
return
;
}
this
.
$throw
(
error
,
'remove'
);
})
}
dataInfo
=
dataInfo
.
replace
(
/
[
null
]
/g
,
''
).
replace
(
/
[
undefined
]
/g
,
''
);
...
...
@@ -1416,7 +1410,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
const
tempContext
=
Util
.
deepCopy
(
this
.
context
);
const
appEntity
=
this
.
controlInstance
.
getPSAppDataEntity
();
if
(
appEntity
)
{
Object
.
assign
(
tempContext
,
{
appEntityName
:
appEntity
.
codeName
});
Object
.
assign
(
tempContext
,
{
appEntityName
:
appEntity
.
codeName
});
}
let
container
:
Subject
<
any
>
=
_this
.
$appmodal
.
openModal
(
view
,
tempContext
,
this
.
getImportDataModel
());
this
.
importStateEvent
=
container
.
subscribe
((
result
:
any
)
=>
{
...
...
@@ -1427,7 +1421,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
}
});
}
else
{
this
.
handleCtrlEvents
(
'onimporterror'
).
then
((
res
:
boolean
)
=>
{});
this
.
handleCtrlEvents
(
'onimporterror'
).
then
((
res
:
boolean
)
=>
{
});
}
});
}
...
...
@@ -1542,14 +1536,8 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
let appModelObj = AppServiceBase.getInstance().getAppModelDataObject();
let appEnvironment = AppServiceBase.getInstance().getAppEnvironment();
if (appEnvironment.bDynamic) {
if (tempViewParams.hasOwnProperty("srfdynainstid")) {
let dynainstParam: DynamicInstanceConfig = this.modelService?.getDynaInsConfig();
Object.assign(tempViewParams, { srfinsttag: dynainstParam.instTag, srfinsttag2: dynainstParam.instTag2 });
delete tempViewParams.srfdynainstid;
} else {
if (!tempViewParams.hasOwnProperty("srfinsttag")) {
Object.assign(tempViewParams, { srfinsttag: "__srfstdinst__" });
}
if (!tempViewParams.hasOwnProperty("srfinsttag")) {
Object.assign(tempViewParams, { srfinsttag: "__srfstdinst__" });
}
} else {
if (tempViewParams.hasOwnProperty("srfwf")) {
...
...
@@ -1567,7 +1555,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
post.then((response: any) => {
this.onControlResponse('exportExcel', response);
if (!response || response.status !== 200) {
this.handleCtrlEvents('onexporterror', { data: response?.data }).then((result: boolean) => {});
this.handleCtrlEvents('onexporterror', { data: response?.data }).then((result: boolean) => {
});
this.$throw((this.$t('app.grid.exportfail') as string) + ',' + response.info, 'exportExcel');
return;
}
...
...
@@ -1580,15 +1568,15 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
}
}
});
}).catch((response: any) => {
this.onControlResponse('exportExcel', response);
this.handleCtrlEvents('onexporterror', { data: response?.data }).then((result: boolean) => {});
this.handleCtrlEvents('onexporterror', { data: response?.data }).then((result: boolean) => {
});
this.$throw(response, 'exportExcel');
});
}
});
}
/**
...
...
@@ -1632,7 +1620,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
responseType: 'blob'
}).then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('onexporterror', { navParam: params, data: this.items }).then((exportErrorResult: boolean) => {});
this.handleCtrlEvents('onexporterror', { navParam: params, data: this.items }).then((exportErrorResult: boolean) => {
});
return;
}
this.handleCtrlEvents('onexportsuccess', { navParam: params, data: this.items }).then((exportSuccessResult: boolean) => {
...
...
@@ -1651,9 +1639,9 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
URL.revokeObjectURL(elink.href); // 释放URL 对象
document.body.removeChild(elink);
})
}).catch((error: any) => {
this.handleCtrlEvents('onexporterror', { navParam: params, data: this.items }).then((result: boolean) => {});
this.handleCtrlEvents('onexporterror', { navParam: params, data: this.items }).then((result: boolean) => {
});
try {
const reader = new FileReader();
reader.readAsText(error.data, 'utf-8');
...
...
@@ -1666,7 +1654,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
}
})
});
}
/**
...
...
@@ -2290,9 +2278,9 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
if (!(dataEntity && dataSet && dataSet.codeName)) {
return;
}
DataServiceHelp.getInstance().getService(dataEntity, {
context
}).then((service: any) => {
DataServiceHelp.getInstance().getService(dataEntity, {
context
}).then((service: any) => {
if (service && dataSet.codeName) {
service.execute(dataSet.codeName,context, data).then((response: any) => {
service.execute(dataSet.codeName,
context, data).then((response: any) => {
_this.onControlResponse('getAggData', response);
if (!response.status || response.status !== 200) {
_this.$throw(response, 'getAggData');
...
...
@@ -2649,7 +2637,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
const
ctrlParams
=
this
.
controlInstance
.
getPSControlParam
()?.
ctrlParams
;
let
aggTitle
:
any
=
(
this
.
$t
(
'app.grid.dataaggregate.dataaggregate'
)
as
string
);
if
(
ctrlParams
&&
ctrlParams
.
hasOwnProperty
(
'AGGTITLE'
))
{
aggTitle
=
ctrlParams
.
AGGTITLE
aggTitle
=
ctrlParams
.
AGGTITLE
}
if
(
Object
.
is
(
this
.
aggMode
,
"PAGE"
))
{
columns
.
forEach
((
column
:
any
,
index
:
number
)
=>
{
...
...
@@ -2739,7 +2727,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
if
(
columnInstance
&&
this
.
remoteData
)
{
const
value
=
this
.
remoteData
[
columnInstance
.
aggField
?
columnInstance
.
aggField
.
toLowerCase
()
:
columnInstance
.
codeName
.
toLowerCase
()];
if
(
Object
.
is
(
columnInstance
.
aggMode
,
'USER'
)
&&
!
Util
.
isEmpty
(
value
))
{
sums
[
index
]
=
value
;
sums
[
index
]
=
value
;
}
if
(
!
isNaN
(
value
))
{
switch
(
columnInstance
.
aggMode
)
{
...
...
@@ -2772,9 +2760,9 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
* @memberof GridControlBase
*/
public
calcAggRowMergeCol
(
columns
:
any
[],
data
:
any
)
{
if
(
this
.
ctrlTriggerLogicMap
.
get
(
'calcaggrowmergecol'
))
{
return
this
.
ctrlTriggerLogicMap
.
get
(
'calcaggrowmergecol'
).
executeUILogic
({
arg
:
{
columns
,
data
}
});
}
if
(
this
.
ctrlTriggerLogicMap
.
get
(
'calcaggrowmergecol'
))
{
return
this
.
ctrlTriggerLogicMap
.
get
(
'calcaggrowmergecol'
).
executeUILogic
({
arg
:
{
columns
,
data
}
});
}
}
/**
...
...
@@ -2908,8 +2896,8 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
indexs
.
length
>
0
&&
data
.
details
.
forEach
((
detail
:
any
)
=>
{
if
(
!
Object
.
is
(
EntityFieldErrorCode
.
ERROR_OK
,
detail
.
fielderrortype
)
&&
detail
.
fieldname
)
{
// 解析错误信息
let
entityFieldError
=
new
EntityFieldError
(
detail
);
let
fieldErrorInfo
=
entityFieldError
.
fieldlogicname
+
entityFieldError
.
fielderrorinfo
;
let
entityFieldError
=
new
EntityFieldError
(
detail
);
let
fieldErrorInfo
=
entityFieldError
.
fieldlogicname
+
entityFieldError
.
fielderrorinfo
;
// 填充有detailModel字段的错误信息。
const
tempEditItem
:
any
=
this
.
findEditItemByField
(
detail
.
fieldname
);
...
...
@@ -2920,10 +2908,10 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
}
// notice显示的错误信息,默认只显示没有detailModel字段的错误信息,noticeAllFieldsError为true时显示所有的字段。
if
(
this
.
Environment
.
noticeAllFieldsError
||
!
tempEditItem
)
{
indexs
.
forEach
((
_index
:
any
)
=>
{
errorMsg
+=
`第
${
_index
+
1
}
行:
${
fieldErrorInfo
}
<br/>`
;
})
if
(
this
.
Environment
.
noticeAllFieldsError
||
!
tempEditItem
)
{
indexs
.
forEach
((
_index
:
any
)
=>
{
errorMsg
+=
`第
${
_index
+
1
}
行:
${
fieldErrorInfo
}
<br/>`
;
})
}
}
})
...
...
app_Web/src/utils/auth-guard/auth-guard.ts
浏览文件 @
370b1696
import
qs
from
'qs'
;
import
{
GlobalHelp
,
IPSAppView
,
DynamicInstanceConfig
}
from
'@ibiz/dynamic-model-api'
;
import
{
GlobalHelp
,
IPSAppView
}
from
'@ibiz/dynamic-model-api'
;
import
{
clearCookie
,
getCookie
,
SyncSeriesHook
}
from
'qx-util'
;
import
{
AppServiceBase
,
Http
,
getSessionStorage
,
setSessionStorage
,
AppModelService
,
Util
,
GetModelService
,
ViewTool
}
from
'ibiz-core'
;
import
{
AppCenterService
,
AppNoticeService
,
AppViewLogicService
,
NoticeHandler
}
from
'ibiz-vue'
;
...
...
@@ -210,7 +210,7 @@ export class AuthGuard {
AppServiceBase
.
getInstance
().
setViewLogicService
(
AppViewLogicService
.
getInstance
());
AppServiceBase
.
getInstance
().
setAppComponentService
(
AppComponentService
);
const
service
=
new
AppModelService
();
await
GlobalHelp
.
install
(
service
,
async
(
strPath
:
string
,
config
:
DynamicInstanceConfig
)
=>
{
await
GlobalHelp
.
install
(
service
,
async
(
strPath
:
string
)
=>
{
let
url
:
string
=
''
;
if
(
Environment
.
bDynamic
)
{
url
=
`
${
Environment
.
remoteDynaPath
}${
strPath
}
`
;
...
...
@@ -219,9 +219,6 @@ export class AuthGuard {
if
(
dynamodeltag
)
{
Object
.
assign
(
queryParam
,
{
dynamodeltag
});
}
if
(
config
)
{
Object
.
assign
(
queryParam
,
{
srfInstTag
:
config
.
instTag
,
srfInstTag2
:
config
.
instTag2
});
}
if
(
queryParam
&&
Object
.
keys
(
queryParam
).
length
>
0
)
{
url
+=
`?
${
qs
.
stringify
(
queryParam
)}
`
;
}
...
...
trainsys-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
370b1696
...
...
@@ -50,7 +50,7 @@
</changeSet>
<!--输出实体[BOOK]数据结构 -->
<changeSet
author=
"root"
id=
"tab-book-17
3
-3"
>
<changeSet
author=
"root"
id=
"tab-book-17
8
-3"
>
<createTable
tableName=
"T_BOOK"
>
<column
name=
"BOOKNAME"
remarks=
""
type=
"VARCHAR(200)"
>
</column>
...
...
@@ -194,7 +194,7 @@
</changeSet>
<!--输出实体[REGINFO]数据结构 -->
<changeSet
author=
"root"
id=
"tab-reginfo-3
6
-8"
>
<changeSet
author=
"root"
id=
"tab-reginfo-3
8
-8"
>
<createTable
tableName=
"T_REGINFO"
>
<column
name=
"UPDATEDATE"
remarks=
""
type=
"DATETIME"
>
</column>
...
...
trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSAPPS/Web/PSAPPDATAENTITIES/Reginfo/PSFORMS/Main.json
浏览文件 @
370b1696
...
...
@@ -216,6 +216,41 @@
"labelWidth"
:
130
,
"name"
:
"name"
,
"noPrivDisplayMode"
:
1
,
"getPSDEFDGroupLogics"
:
[
{
"groupOP"
:
"AND"
,
"logicCat"
:
"PANELVISIBLE"
,
"logicType"
:
"GROUP"
,
"name"
:
"表单成员[name][面板显示]逻辑"
,
"getPSDEFDLogics"
:
[
{
"groupOP"
:
"AND"
,
"logicType"
:
"GROUP"
,
"name"
:
"AND"
,
"getPSDEFDLogics"
:
[
{
"condOP"
:
"LT"
,
"dEFDName"
:
"Age"
,
"logicType"
:
"SINGLE"
,
"name"
:
"Age 小于(<) (113)"
,
"value"
:
"113"
}
],
"notMode"
:
false
}
],
"relatedDetailNames"
:
[
"age"
],
"notMode"
:
false
},
{
"groupOP"
:
"AND"
,
"logicCat"
:
"ITEMENABLE"
,
"logicType"
:
"GROUP"
,
"name"
:
"表单成员[name][表单项启用]逻辑"
,
"getPSDEFDLogics"
:
[
{
"condOP"
:
"GT"
,
"dEFDName"
:
"Age"
,
"logicType"
:
"SINGLE"
,
"name"
:
"Age 大于(>) (22)"
,
"value"
:
"22"
}
],
"relatedDetailNames"
:
[
"age"
],
"notMode"
:
false
}
],
"getPSEditor"
:
{
"editorType"
:
"TEXTBOX"
,
"name"
:
"name"
...
...
trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSAPPS/Web/PSAPPDEVIEWS/ReginfoEditView.json
浏览文件 @
370b1696
...
...
@@ -1202,6 +1202,41 @@
"labelWidth"
:
130
,
"name"
:
"name"
,
"noPrivDisplayMode"
:
1
,
"getPSDEFDGroupLogics"
:
[
{
"groupOP"
:
"AND"
,
"logicCat"
:
"PANELVISIBLE"
,
"logicType"
:
"GROUP"
,
"name"
:
"表单成员[name][面板显示]逻辑"
,
"getPSDEFDLogics"
:
[
{
"groupOP"
:
"AND"
,
"logicType"
:
"GROUP"
,
"name"
:
"AND"
,
"getPSDEFDLogics"
:
[
{
"condOP"
:
"LT"
,
"dEFDName"
:
"Age"
,
"logicType"
:
"SINGLE"
,
"name"
:
"Age 小于(<) (113)"
,
"value"
:
"113"
}
],
"notMode"
:
false
}
],
"relatedDetailNames"
:
[
"age"
],
"notMode"
:
false
},
{
"groupOP"
:
"AND"
,
"logicCat"
:
"ITEMENABLE"
,
"logicType"
:
"GROUP"
,
"name"
:
"表单成员[name][表单项启用]逻辑"
,
"getPSDEFDLogics"
:
[
{
"condOP"
:
"GT"
,
"dEFDName"
:
"Age"
,
"logicType"
:
"SINGLE"
,
"name"
:
"Age 大于(>) (22)"
,
"value"
:
"22"
}
],
"relatedDetailNames"
:
[
"age"
],
"notMode"
:
false
}
],
"getPSEditor"
:
{
"editorType"
:
"TEXTBOX"
,
"name"
:
"name"
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录