Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
481c7462
提交
481c7462
编写于
1月 05, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhouweidong 发布系统代码 [ibz-dst,应用]
上级
24237821
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
35 行增加
和
15 行删除
+35
-15
meta-models.ts
app_web/src/mock/entity/meta-models/meta-models.ts
+27
-5
meta-model-grid-view-base.vue
...s/lite/meta-model-grid-view/meta-model-grid-view-base.vue
+1
-1
meta-model-service-base.ts
app_web/src/service/meta-model/meta-model-service-base.ts
+2
-4
meta-model-ui-service-base.ts
...eb/src/uiservice/meta-model/meta-model-ui-service-base.ts
+2
-2
h2_table.xml
ibzdst-core/src/main/resources/liquibase/h2_table.xml
+1
-1
MetaModelResource.java
.../src/main/java/cn/ibizlab/api/rest/MetaModelResource.java
+2
-2
未找到文件。
app_web/src/mock/entity/meta-models/meta-models.ts
浏览文件 @
481c7462
...
@@ -86,21 +86,43 @@ mock.onDelete(new RegExp(/^\/metamodels\/batch$/)).reply((config: any) => {
...
@@ -86,21 +86,43 @@ mock.onDelete(new RegExp(/^\/metamodels\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
// exportFile
// exportFile
mock
.
on
Post
(
new
RegExp
(
/^
\/
metamodels
\/
exportfile$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Get
(
new
RegExp
(
/^
\/
metamodels
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
exportfile$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:metamodel 方法: exportFile"
);
console
.
groupCollapsed
(
"实体:metamodel 方法: exportFile"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// exportFile
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
metamodels
\/([
a-zA-Z0-9
\-\;]{1,35})\/
exportfile$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
{}
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}
];
return
[
status
,
data
];
});
});
// Select
// Select
...
...
app_web/src/pages/lite/meta-model-grid-view/meta-model-grid-view-base.vue
浏览文件 @
481c7462
...
@@ -386,7 +386,7 @@ export default class MetaModelGridViewBase extends Vue {
...
@@ -386,7 +386,7 @@ export default class MetaModelGridViewBase extends Vue {
public
toolBarModels
:
any
=
{
public
toolBarModels
:
any
=
{
tbitem1_import
:
{
name
:
'tbitem1_import'
,
actiontarget
:
'NONE'
,
caption
:
'模型导入'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'import'
,
target
:
'NONE'
}
},
tbitem1_import
:
{
name
:
'tbitem1_import'
,
actiontarget
:
'NONE'
,
caption
:
'模型导入'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'import'
,
target
:
'NONE'
}
},
tbitem1_export
:
{
name
:
'tbitem1_export'
,
actiontarget
:
'NONE'
,
caption
:
'模型导出'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'export'
,
target
:
'
MULTI
KEY'
}
},
tbitem1_export
:
{
name
:
'tbitem1_export'
,
actiontarget
:
'NONE'
,
caption
:
'模型导出'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'export'
,
target
:
'
SINGLE
KEY'
}
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem3
:
{
name
:
'tbitem3'
,
actiontarget
:
'NONE'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem3
:
{
name
:
'tbitem3'
,
actiontarget
:
'NONE'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
...
...
app_web/src/service/meta-model/meta-model-service-base.ts
浏览文件 @
481c7462
...
@@ -48,10 +48,8 @@ export default class MetaModelServiceBase extends EntityService {
...
@@ -48,10 +48,8 @@ export default class MetaModelServiceBase extends EntityService {
* @memberof MetaModelServiceBase
* @memberof MetaModelServiceBase
*/
*/
public
async
exportFile
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
exportFile
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/metamodels/exportfile`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
get
(
`/metamodels/
${
context
.
metamodel
}
/exportfile`
,
data
,
isloading
);
res
.
data
.
metamodel
=
data
.
metamodel
;
return
res
;
return
res
;
}
}
/**
/**
...
...
app_web/src/uiservice/meta-model/meta-model-ui-service-base.ts
浏览文件 @
481c7462
...
@@ -194,7 +194,7 @@ export default class MetaModelUIServiceBase extends UIService {
...
@@ -194,7 +194,7 @@ export default class MetaModelUIServiceBase extends UIService {
let
parentViewParam
:
any
=
{};
let
parentViewParam
:
any
=
{};
const
_this
:
any
=
actionContext
;
const
_this
:
any
=
actionContext
;
const
_args
:
any
[]
=
Util
.
deepCopy
(
args
);
const
_args
:
any
[]
=
Util
.
deepCopy
(
args
);
const
actionTarget
:
string
|
null
=
'
MULTI
KEY'
;
const
actionTarget
:
string
|
null
=
'
SINGLE
KEY'
;
Object
.
assign
(
context
,
{
metamodel
:
'%metamodel%'
});
Object
.
assign
(
context
,
{
metamodel
:
'%metamodel%'
});
Object
.
assign
(
params
,
{
id
:
'%metamodel%'
});
Object
.
assign
(
params
,
{
id
:
'%metamodel%'
});
Object
.
assign
(
params
,
{
name
:
'%name%'
});
Object
.
assign
(
params
,
{
name
:
'%name%'
});
...
@@ -234,7 +234,7 @@ export default class MetaModelUIServiceBase extends UIService {
...
@@ -234,7 +234,7 @@ export default class MetaModelUIServiceBase extends UIService {
}
}
const
backend
=
()
=>
{
const
backend
=
()
=>
{
const
curService
:
MetaModelService
=
new
MetaModelService
();
const
curService
:
MetaModelService
=
new
MetaModelService
();
curService
.
exportFile
Batch
(
context
,
data
,
true
).
then
((
response
:
any
)
=>
{
curService
.
exportFile
(
context
,
data
,
true
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
message
});
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
message
});
return
;
return
;
...
...
ibzdst-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
481c7462
...
@@ -328,7 +328,7 @@
...
@@ -328,7 +328,7 @@
<!--输出实体[META_MODEL]数据结构 -->
<!--输出实体[META_MODEL]数据结构 -->
<changeSet
author=
"root"
id=
"tab-meta_model-6
8
-12"
>
<changeSet
author=
"root"
id=
"tab-meta_model-6
9
-12"
>
<createTable
tableName=
"IBZMODEL"
>
<createTable
tableName=
"IBZMODEL"
>
<column
name=
"MODELID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"MODELID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODEL_MODELID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODEL_MODELID"
/>
...
...
ibzdst-provider/ibzdst-provider-api/src/main/java/cn/ibizlab/api/rest/MetaModelResource.java
浏览文件 @
481c7462
...
@@ -49,7 +49,7 @@ public class MetaModelResource {
...
@@ -49,7 +49,7 @@ public class MetaModelResource {
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaModel-ExportFile-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaModel-ExportFile-all')"
)
@ApiOperation
(
value
=
"导出文件"
,
tags
=
{
"模型"
},
notes
=
"导出文件"
)
@ApiOperation
(
value
=
"导出文件"
,
tags
=
{
"模型"
},
notes
=
"导出文件"
)
@RequestMapping
(
method
=
RequestMethod
.
POS
T
,
value
=
"/metamodels/{metamodel_id}/exportfile"
)
@RequestMapping
(
method
=
RequestMethod
.
GE
T
,
value
=
"/metamodels/{metamodel_id}/exportfile"
)
public
ResponseEntity
<
Void
>
exportFile
(
@PathVariable
(
"metamodel_id"
)
String
metamodel_id
,
@RequestBody
MetaModelDTO
metamodeldto
)
{
public
ResponseEntity
<
Void
>
exportFile
(
@PathVariable
(
"metamodel_id"
)
String
metamodel_id
,
@RequestBody
MetaModelDTO
metamodeldto
)
{
MetaModel
domain
=
metamodelMapping
.
toDomain
(
metamodeldto
);
MetaModel
domain
=
metamodelMapping
.
toDomain
(
metamodeldto
);
domain
.
setId
(
metamodel_id
);
domain
.
setId
(
metamodel_id
);
...
@@ -59,7 +59,7 @@ public class MetaModelResource {
...
@@ -59,7 +59,7 @@ public class MetaModelResource {
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaModel-ExportFile-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaModel-ExportFile-all')"
)
@ApiOperation
(
value
=
"批量处理[导出文件]"
,
tags
=
{
"模型"
},
notes
=
"批量处理[导出文件]"
)
@ApiOperation
(
value
=
"批量处理[导出文件]"
,
tags
=
{
"模型"
},
notes
=
"批量处理[导出文件]"
)
@RequestMapping
(
method
=
RequestMethod
.
POS
T
,
value
=
"/metamodels/exportfilebatch"
)
@RequestMapping
(
method
=
RequestMethod
.
GE
T
,
value
=
"/metamodels/exportfilebatch"
)
public
ResponseEntity
<
Void
>
exportFileBatch
(
@RequestBody
List
<
MetaModelDTO
>
metamodeldtos
)
{
public
ResponseEntity
<
Void
>
exportFileBatch
(
@RequestBody
List
<
MetaModelDTO
>
metamodeldtos
)
{
List
<
MetaModel
>
domains
=
metamodelMapping
.
toDomain
(
metamodeldtos
);
List
<
MetaModel
>
domains
=
metamodelMapping
.
toDomain
(
metamodeldtos
);
boolean
result
=
metamodelService
.
exportFileBatch
(
domains
);
boolean
result
=
metamodelService
.
exportFileBatch
(
domains
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录