Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
2b481d5a
提交
2b481d5a
编写于
12月 29, 2021
作者:
WodahsOrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:样式
上级
38fe9861
变更
25
隐藏空白字符变更
内嵌
并排
正在显示
25 个修改的文件
包含
245 行增加
和
111 行删除
+245
-111
IbizIconText.vue
...pl/r7/app_{{apps}}/src/components/render/IbizIconText.vue
+0
-27
index.scss
...sources/templ/r7/app_{{apps}}/src/custom/style/index.scss
+1
-0
form-control.ts
...rc/ibiz-core/modules/widgets/form-control/form-control.ts
+1
-57
control-service-base.ts
...ibiz-core/service/control-service/control-service-base.ts
+1
-0
http.ts
...ces/templ/r7/app_{{apps}}/src/ibiz-core/utils/net/http.ts
+2
-2
util.ts
...sources/templ/r7/app_{{apps}}/src/ibiz-core/utils/util.ts
+12
-2
main.ts
...core/src/main/resources/templ/r7/app_{{apps}}/src/main.ts
+1
-1
index.scss
...resources/templ/r7/app_{{apps}}/src/style/base/index.scss
+10
-0
index.scss
...ces/templ/r7/app_{{apps}}/src/style/components/index.scss
+1
-0
icon-text.scss
...7/app_{{apps}}/src/style/components/render/icon-text.scss
+27
-0
index.scss
...pl/r7/app_{{apps}}/src/style/components/render/index.scss
+1
-0
index.scss
...main/resources/templ/r7/app_{{apps}}/src/style/index.scss
+7
-14
index.scss
...esources/templ/r7/app_{{apps}}/src/style/mixin/index.scss
+32
-0
dark.scss
...resources/templ/r7/app_{{apps}}/src/style/theme/dark.scss
+4
-0
index.scss
...esources/templ/r7/app_{{apps}}/src/style/theme/index.scss
+1
-0
base.scss
...n/resources/templ/r7/app_{{apps}}/src/style/var/base.scss
+44
-0
component.scss
...ources/templ/r7/app_{{apps}}/src/style/var/component.scss
+11
-0
index.scss
.../resources/templ/r7/app_{{apps}}/src/style/var/index.scss
+4
-0
view.scss
...n/resources/templ/r7/app_{{apps}}/src/style/var/view.scss
+1
-0
widget.scss
...resources/templ/r7/app_{{apps}}/src/style/var/widget.scss
+4
-0
edit-view.scss
...rces/templ/r7/app_{{apps}}/src/style/views/edit-view.scss
+4
-0
index.scss
...esources/templ/r7/app_{{apps}}/src/style/views/index.scss
+1
-0
edit-form.scss
...es/templ/r7/app_{{apps}}/src/style/widgets/edit-form.scss
+4
-0
index.scss
...ources/templ/r7/app_{{apps}}/src/style/widgets/index.scss
+1
-0
{{ctrls@FORM}}-form-service.ts.hbs
...}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-service.ts.hbs
+70
-8
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/IbizIconText.vue
浏览文件 @
2b481d5a
...
@@ -46,32 +46,5 @@ const extraClass = {
...
@@ -46,32 +46,5 @@ const extraClass = {
</template>
</template>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
// 基线对齐
.ibiz-icon-text__icon
,
.ibiz-icon-text__icon-img
{
vertical-align
:
bottom
;
}
// 默认大小
.ibiz-icon-text--default
{
font-size
:
16px
;
.ibiz-icon-text__icon
,
.ibiz-icon-text__icon-img
{
width
:
16px
;
height
:
16px
;
}
}
.ibiz-icon-text--large
{
font-size
:
24px
;
.ibiz-icon-text__icon
,
.ibiz-icon-text__icon-img
{
width
:
24px
;
height
:
24px
;
}
}
// 位置
.ibiz-icon-text--left
.ibiz-icon-text__text
{
margin-left
:
5px
;
}
.ibiz-icon-text--right
.ibiz-icon-text__text
{
margin-right
:
5px
;
}
</
style
>
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/custom/style/index.scss
0 → 100644
浏览文件 @
2b481d5a
// todo 用户级样式
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/form-control/form-control.ts
浏览文件 @
2b481d5a
...
@@ -115,7 +115,7 @@ export class FormControl extends MainControl {
...
@@ -115,7 +115,7 @@ export class FormControl extends MainControl {
}
}
/**
/**
* @description 使用
保存
功能模块
* @description 使用
加载
功能模块
* @param {FormControlProps} props 传入的props
* @param {FormControlProps} props 传入的props
* @return {*}
* @return {*}
* @memberof FormControl
* @memberof FormControl
...
@@ -169,62 +169,6 @@ export class FormControl extends MainControl {
...
@@ -169,62 +169,6 @@ export class FormControl extends MainControl {
}
}
};
};
/**
* @description 使用删除功能模块
* @param {FormControlProps} props 传入的props
* @return {*}
* @memberof FormControl
*/
public
useRemove
(
props
:
FormControlProps
)
{
const
{
viewSubject
,
controlName
}
=
this
.
controlState
;
/**
* 删除行为
*
* @param [opt={}]
* @return {*}
*/
const
save
=
async
(
opt
:
any
=
{})
=>
{
try
{
// 获取需要的状态变量
const
{
controlService
,
context
,
viewParams
,
showBusyIndicator
,
data
}
=
this
.
controlState
;
// TODO 值规则校验处理
// 判断实体行为存在
const
{
updateAction
,
createAction
}
=
this
.
controlState
.
controlAction
;
const
saveAction
:
any
=
data
.
srfuf
==
'1'
?
updateAction
:
createAction
;
if
(
!
saveAction
)
{
return
;
}
// 处理请求参数
let
_context
=
deepCopy
(
context
);
let
_viewParams
=
deepCopy
(
viewParams
);
// TODO 关系界面保存通知处理,做成异步。
// TODO 拷贝相关。
// 发起请求处理与解析请求
const
response
=
await
controlService
.
get
(
saveAction
,
_context
,
{
viewParams
:
_viewParams
},
showBusyIndicator
);
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
// TODO 统一Error格式
return
;
}
// 请求后处理
this
.
controlState
.
data
=
response
.
data
;
// TODO 表单onFormLoad
}
catch
(
error
)
{
// TODO 错误异常处理
}
};
// 订阅viewSubject,监听load行为
// 订阅viewSubject,监听load行为
if
(
viewSubject
)
{
if
(
viewSubject
)
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/service/control-service/control-service-base.ts
浏览文件 @
2b481d5a
...
@@ -18,6 +18,7 @@ export class ControlServiceBase {
...
@@ -18,6 +18,7 @@ export class ControlServiceBase {
* @param [opts={}]
* @param [opts={}]
*/
*/
public
handleResponse
(
response
:
any
,
opts
:
any
=
{})
{
public
handleResponse
(
response
:
any
,
opts
:
any
=
{})
{
// todo srfuf判断
return
response
;
return
response
;
}
}
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/utils/net/http.ts
浏览文件 @
2b481d5a
import
{
hasValue
}
from
'@ibiz-core'
;
import
{
isExist
}
from
'@ibiz-core'
;
import
axios
from
'axios'
;
import
axios
from
'axios'
;
import
qs
from
'qs'
;
import
qs
from
'qs'
;
import
{
Subject
}
from
'rxjs'
;
import
{
Subject
}
from
'rxjs'
;
...
@@ -258,7 +258,7 @@ export class Http {
...
@@ -258,7 +258,7 @@ export class Http {
if
(
params
&&
(
Object
.
keys
(
params
).
length
>
0
))
{
if
(
params
&&
(
Object
.
keys
(
params
).
length
>
0
))
{
let
tempParam
:
any
=
{};
let
tempParam
:
any
=
{};
Object
.
keys
(
params
).
forEach
((
item
:
string
)
=>
{
Object
.
keys
(
params
).
forEach
((
item
:
string
)
=>
{
if
(
item
.
startsWith
(
'srf'
)
&&
hasValue
(
params
[
item
]))
{
if
(
item
.
startsWith
(
'srf'
)
&&
isExist
(
params
[
item
]))
{
tempParam
[
item
]
=
params
[
item
];
tempParam
[
item
]
=
params
[
item
];
}
}
});
});
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/utils/util.ts
浏览文件 @
2b481d5a
...
@@ -16,10 +16,20 @@ export function deepCopy(data: Record<any, any>): Record<any, any>{
...
@@ -16,10 +16,20 @@ export function deepCopy(data: Record<any, any>): Record<any, any>{
* @param {*} arg
* @param {*} arg
* @return {*} {boolean}
* @return {*} {boolean}
*/
*/
export
function
hasValue
(
arg
:
any
):
boolean
{
export
function
isExist
(
arg
:
any
):
boolean
{
return
arg
!==
undefined
&&
arg
!==
null
&&
arg
===
arg
;
return
arg
!==
undefined
&&
arg
!==
null
&&
arg
===
arg
;
}
}
/**
* @description 是否拥有某个方法
* @param {*} arg 校验对象
* @param fnName 方法名
* @return {*}
*/
export
function
hasFunction
(
arg
:
any
,
fnName
:
string
):
boolean
{
return
arg
[
fnName
]
&&
arg
[
fnName
]
instanceof
Function
;
}
/**
/**
* @description 获取当前数据值类型
* @description 获取当前数据值类型
* @export
* @export
...
@@ -245,4 +255,4 @@ function contains(value: any, value2: any): boolean {
...
@@ -245,4 +255,4 @@ function contains(value: any, value2: any): boolean {
return
reg
.
test
(
S
+
arr
.
join
(
S
)
+
S
);
return
reg
.
test
(
S
+
arr
.
join
(
S
)
+
S
);
}
}
return
false
;
return
false
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/main.ts
浏览文件 @
2b481d5a
import
'font-awesome/css/font-awesome.min.css'
import
'font-awesome/css/font-awesome.min.css'
import
'@/style/index.scss'
import
Router
from
'@/router'
;
import
Router
from
'@/router'
;
import
Antd
from
'ant-design-vue'
;
import
Antd
from
'ant-design-vue'
;
import
'ant-design-vue/dist/antd.css'
;
import
'ant-design-vue/dist/antd.css'
;
import
'@/style/index.scss'
import
App
from
'./App.vue'
import
App
from
'./App.vue'
createApp
(
App
).
use
(
Router
).
use
(
Antd
).
mount
(
'#app'
)
createApp
(
App
).
use
(
Router
).
use
(
Antd
).
mount
(
'#app'
)
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/base/index.scss
0 → 100644
浏览文件 @
2b481d5a
// 基础通用样式,重置网站基础样式。
html
,
body
{
width
:
100%
;
height
:
100%
;
}
body
{
margin
:
0
;
}
// 滚动条样式
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/components/index.scss
0 → 100644
浏览文件 @
2b481d5a
@use
'./render'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/components/render/icon-text.scss
0 → 100644
浏览文件 @
2b481d5a
// 基线对齐
.ibiz-icon-text__icon
,
.ibiz-icon-text__icon-img
{
vertical-align
:
bottom
;
}
// 默认样式
.ibiz-icon-text--default
{
font-size
:
var
(
--
ibiz-icon-text-font-size-md
);
.ibiz-icon-text__icon
,
.ibiz-icon-text__icon-img
{
width
:
var
(
--
ibiz-icon-text-icon-width-md
);
height
:
var
(
--
ibiz-icon-text-icon-height-md
);
}
}
// large的样式
.ibiz-icon-text--large
{
font-size
:
var
(
--
ibiz-icon-text-font-size-lg
);
.ibiz-icon-text__icon
,
.ibiz-icon-text__icon-img
{
width
:
var
(
--
ibiz-icon-text-icon-width-lg
);
height
:
var
(
--
ibiz-icon-text-icon-height-lg
);
}
}
// 位置变化的样式
.ibiz-icon-text--left
.ibiz-icon-text__text
{
margin-left
:
5px
;
}
.ibiz-icon-text--right
.ibiz-icon-text__text
{
margin-right
:
5px
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/components/render/index.scss
0 → 100644
浏览文件 @
2b481d5a
@use
'./icon-text.scss'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/index.scss
浏览文件 @
2b481d5a
// 通用样式
@use
'./base'
;
@use
'./components'
;
html
,
body
{
@use
'./widgets'
;
height
:
100%
;
@use
'./views'
;
}
@use
'./var'
;
body
{
@use
'./theme'
;
margin
:
0
;
@use
'../custom/style'
}
// 视图样式
.ibiz-view__caption
{
font-weight
:
600
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/mixin/index.scss
0 → 100644
浏览文件 @
2b481d5a
// 清除浮动
@mixin
clearfix
{
&
:
:
before
,
&::
after
{
display
:
table
;
content
:
''
;
}
&
:
:
after
{
clear
:
both
;
}
}
// Placeholder文本颜色修改,兼容各种浏览器
@mixin
placeholder
(
$color
:
var
(
--
ibiz-text-color-placeholder
))
{
// Firefox
&
:
:-
moz-placeholder
{
color
:
$color
;
opacity
:
1
;
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
}
// Internet Explorer 10+
&
:
-
ms-input-placeholder
{
color
:
$color
;
}
// Safari and Chrome
&
:
:-
webkit-input-placeholder
{
color
:
$color
;
}
&
:placeholder-shown
{
text-overflow
:
ellipsis
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/theme/dark.scss
0 → 100644
浏览文件 @
2b481d5a
// 主题样式覆盖
.ibiz-theme-dark
:root
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/theme/index.scss
0 → 100644
浏览文件 @
2b481d5a
@use
'./dark.scss'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/var/base.scss
0 → 100644
浏览文件 @
2b481d5a
// 基础通用变量
:root
{
// 字体
--ibiz-font-family
:
-
apple-system
,
BlinkMacSystemFont
,
Tahoma
,
Arial
,
"Hiragino Sans GB"
,
"Microsoft YaHei"
,
sans-serif
;
--ibiz-font-weight-primary
:
500
;
--ibiz-font-weight-bold
:
600
;
--ibiz-font-line-height
:
24px
;
// 字体大小
--ibiz-font-size-xs
:
12px
;
--ibiz-font-size-sm
:
14px
;
--ibiz-font-size-md
:
16px
;
--ibiz-font-size-lg
:
20px
;
--ibiz-font-size-xl
:
22px
;
// 字体颜色
--ibiz-text-color-primary
:
#303133
;
--ibiz-text-color-regular
:
#606266
;
--ibiz-text-color-secondary
:
#909399
;
--ibiz-text-color-placeholder
:
#c0c4cc
;
--ibiz-text-color-disabled
:
#bbb
;
--ibiz-text-color-inverse
:
#fff
;
// 反转色,深色背景下使用
// 颜色
--ibiz-color-white
:
#fff
;
--ibiz-color-black
:
#000
;
--ibiz-color-primary
:
#409eff
;
//重要的,常用于激活色
--ibiz-color-success
:
#67c23a
;
--ibiz-color-warning
:
#e6a23c
;
--ibiz-color-danger
:
#f56c6c
;
--ibiz-color-error
:
#f56c6c
;
--ibiz-color-info
:
#909399
;
--ibiz-bg-color
:
#f5f7fa
;
//默认背景色
--ibiz-bg-color-disabled
:
#f5f7fa
;
//禁用背景色
// 边框
--ibiz-border-color
:
#dcdfe6
;
--ibiz-border-width
:
1
;
--ibiz-border-style
:
solid
;
--ibiz-border-color-hover
:
#c0c4cc
;
--ibiz-border-color-disabled
:
#e4e7ed
;
--ibiz-border-base
:
var
(
--
ibiz-border-width-base
)
var
(
--
ibiz-border-style-base
)
var
(
--
ibiz-border-color-base
);
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/var/component.scss
0 → 100644
浏览文件 @
2b481d5a
// render 绘制组件样式
// icon-text
.ibiz-icon-text
{
--ibiz-icon-text-font-size-md
:
var
(
--
ibiz-font-size-md
);
--ibiz-icon-text-icon-width-md
:
var
(
--
ibiz-font-size-md
);
--ibiz-icon-text-icon-height-md
:
var
(
--
ibiz-font-size-md
);
--ibiz-icon-text-font-size-lg
:
var
(
--
ibiz-font-size-lg
);
--ibiz-icon-text-icon-width-lg
:
var
(
--
ibiz-font-size-lg
);
--ibiz-icon-text-icon-height-lg
:
var
(
--
ibiz-font-size-lg
);
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/var/index.scss
0 → 100644
浏览文件 @
2b481d5a
@use
'./base'
;
@use
'./component'
;
@use
'./widget'
;
@use
'./view'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/var/view.scss
0 → 100644
浏览文件 @
2b481d5a
// ibiz-edit-view
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/var/widget.scss
0 → 100644
浏览文件 @
2b481d5a
// EditForm
:root
{
--ibiz-form-font-size
:
var
(
--
ibiz-font-size-base
,
12px
);
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/views/edit-view.scss
0 → 100644
浏览文件 @
2b481d5a
.ibiz-view-container
{
height
:
100%
;
width
:
100%
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/views/index.scss
0 → 100644
浏览文件 @
2b481d5a
// 视图样式汇总
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/edit-form.scss
0 → 100644
浏览文件 @
2b481d5a
.ibiz-control
{
height
:
100%
;
width
:
100%
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/index.scss
0 → 100644
浏览文件 @
2b481d5a
// 部件样式汇总
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-service.ts.hbs
浏览文件 @
2b481d5a
import { ControlServiceBase } from '@ibiz-core';
import { ControlServiceBase, hasFunction } from '@ibiz-core';
import { createUUID } from 'qx-util';
import {
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service } from '@service/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
-service';
import {
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service } from '@service/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
-service';
import { ControlVO } from './
{{
lowerCase
ctrl
.
codeName
}}
-form-config';
import { ControlVO } from './
{{
lowerCase
ctrl
.
codeName
}}
-form-config';
...
@@ -9,6 +10,24 @@ export class ControlService extends ControlServiceBase {
...
@@ -9,6 +10,24 @@ export class ControlService extends ControlServiceBase {
*/
*/
public entityService:
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service = new
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service();
public entityService:
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service = new
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service();
/**
* 加载草稿数据
*
* @param [context={}] 上下文参数
* @param [data={}] 视图参数
* @param opts
* @return {*}
*/
public async loadDraft(context: any, data: any, opts: { action: string; isLoading?: boolean }): Promise
<any>
{
const { context: Context, data: Data } = this.handleRequestData(context, data, opts);
// todo主键
const action = hasFunction(this.entityService, opts.action) ? opts.action : 'GetDraft';
const response = await this.entityService[opts.action](Context, Data, opts.isLoading);
// this.setRemoteCopyData(response);
response.data = new ControlVO(response.data);
return this.handleResponse(response, opts);
}
/**
/**
* 加载数据
* 加载数据
*
*
...
@@ -19,16 +38,59 @@ export class ControlService extends ControlServiceBase {
...
@@ -19,16 +38,59 @@ export class ControlService extends ControlServiceBase {
*/
*/
public async get(context: any, data: any, opts: { action: string; isLoading?: boolean }): Promise
<any>
{
public async get(context: any, data: any, opts: { action: string; isLoading?: boolean }): Promise
<any>
{
const { context: Context, data: Data } = this.handleRequestData(context, data, opts);
const { context: Context, data: Data } = this.handleRequestData(context, data, opts);
let response: any;
const action = hasFunction(this.entityService, opts.action) ? opts.action : 'GET';
const _entityService: any = this.entityService;
const response = await this.entityService[opts.action](Context, Data, opts.isLoading);
if (_entityService[opts.action]
&&
_entityService[opts.action] instanceof Function) {
response = await _entityService[opts.action](Context, Data, opts.isLoading);
} else {
response = await this.entityService.Get(Context, Data, opts.isLoading);
}
// this.setRemoteCopyData(response);
// this.setRemoteCopyData(response);
response.data = new ControlVO(response.data);
response.data = new ControlVO(response.data);
return this.handleResponse(response, opts);
return this.handleResponse(response, opts);
}
}
/**
* 创建数据
*
* @param [context={}] 上下文参数
* @param [data={}] 视图参数
* @param opts
* @return {*}
*/
public async create(context: any, data: any, opts: { action: string; isLoading?: boolean }): Promise
<any>
{
const { context: Context, data: Data } = this.handleRequestData(context, data, opts);
const action = hasFunction(this.entityService, opts.action) ? opts.action : 'Create';
const response = await this.entityService[opts.action](Context, Data, opts.isLoading);
response.data = new ControlVO(response.data);
return this.handleResponse(response, opts);
}
/**
* 删除数据
*
* @param [context={}] 上下文参数
* @param [data={}] 视图参数
* @param opts
* @return {*}
*/
public async delete(context: any, data: any, opts: { action: string; isLoading?: boolean }): Promise
<any>
{
const { context: Context, data: Data } = this.handleRequestData(context, data, opts);
const action = hasFunction(this.entityService, opts.action) ? opts.action : 'Remove';
const response = await this.entityService[opts.action](Context, Data, opts.isLoading);
response.data = new ControlVO(response.data);
return this.handleResponse(response, opts);
}
/**
* 更新数据
*
* @param [context={}] 上下文参数
* @param [data={}] 视图参数
* @param opts
* @return {*}
*/
public async update(context: any, data: any, opts: { action: string; isLoading?: boolean }): Promise
<any>
{
const { context: Context, data: Data } = this.handleRequestData(context, data, opts);
const action = hasFunction(this.entityService, opts.action) ? opts.action : 'Update';
const response = await this.entityService[opts.action](Context, Data, opts.isLoading);
response.data = new ControlVO(response.data);
return this.handleResponse(response, opts);
}
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录