Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-Mob-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-Mob-R7-Res
提交
fc714bc6
提交
fc714bc6
编写于
9月 29, 2020
作者:
KK
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
组件提示统一 调整
上级
1801913c
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
51 行增加
和
56 行删除
+51
-56
app-mob-file-upload.vue
src/components/app-mob-file-upload/app-mob-file-upload.vue
+0
-4
app-mob-picker.vue
src/components/app-mob-picker/app-mob-picker.vue
+7
-7
app-mob-picture.vue
src/components/app-mob-picture/app-mob-picture.vue
+42
-43
app-mob-recorder.vue
src/components/app-mob-recorder/app-mob-recorder.vue
+1
-1
MOBMDCTRLBase.ts
src/ibiz-core/widgets/MOBMDCTRLBase.ts
+1
-1
未找到文件。
src/components/app-mob-file-upload/app-mob-file-upload.vue
浏览文件 @
fc714bc6
...
...
@@ -147,10 +147,8 @@ export default class AppMobFileUpload extends Vue {
'Content-Type'
:
'multipart/form-data'
}
}
Loading
.
show
();
Axios
.
post
(
this
.
uploadUrl
,
params
,
config
).
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
data
&&
response
.
status
===
200
)
{
Loading
.
hidden
();
let
data
:
any
=
response
.
data
;
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
this
.
devFiles
.
push
(
Object
.
assign
({},
data
,
{
...
...
@@ -159,11 +157,9 @@ export default class AppMobFileUpload extends Vue {
}
this
.
onSuccess
(
data
,
file
,
this
.
files
);
}
else
{
Loading
.
hidden
();
this
.
onError
(
response
,
file
,
this
.
files
);
}
}).
catch
((
response
:
any
)
=>
{
Loading
.
hidden
();
this
.
onError
(
response
,
file
,
this
.
files
);
});
}
...
...
src/components/app-mob-picker/app-mob-picker.vue
浏览文件 @
fc714bc6
...
...
@@ -342,11 +342,11 @@ export default class AppPicker extends Vue {
this
.
inputState
=
false
;
Object
.
assign
(
_param
,
{
query
:
query
});
if
(
!
this
.
service
)
{
this
.
$noti
fy
({
type
:
'danger'
,
message
:
this
.
$t
(
"missingParameters"
)
+
'service'
}
)
this
.
$noti
ce
.
error
(
this
.
$t
(
"missingParameters"
)
+
'service'
)
}
else
if
(
!
this
.
acParams
.
serviceName
)
{
this
.
$noti
fy
({
type
:
'danger'
,
message
:
this
.
$t
(
"missingParameters"
)
+
'serviceName'
}
)
this
.
$noti
ce
.
error
(
this
.
$t
(
"missingParameters"
)
+
'serviceName'
)
}
else
if
(
!
this
.
acParams
.
interfaceName
)
{
this
.
$noti
fy
({
type
:
'danger'
,
message
:
this
.
$t
(
"missingParameters"
)
+
'interfaceName'
}
)
this
.
$noti
ce
.
error
(
this
.
$t
(
"missingParameters"
)
+
'interfaceName'
)
}
else
{
let
{
serviceName
:
_serviceName
,
interfaceName
:
_interfaceName
}:
{
serviceName
:
string
,
interfaceName
:
string
}
=
this
.
acParams
;
const
appEntityServiceConstructor
=
window
.
appEntityServiceConstructor
;
...
...
@@ -354,7 +354,7 @@ export default class AppPicker extends Vue {
if
(
entityService
&&
entityService
[
_interfaceName
]
&&
entityService
[
_interfaceName
]
instanceof
Function
)
{
entityService
[
_interfaceName
](
_context
,
_param
).
then
((
response
:
any
)
=>
{
if
(
!
response
)
{
this
.
$noti
fy
({
type
:
'danger'
,
message
:
`
${
this
.
$t
(
"requestException"
)}
`
}
)
this
.
$noti
ce
.
error
(
`
${
this
.
$t
(
"requestException"
)}
`
)
}
else
{
this
.
items
=
[...
response
.
data
];
}
...
...
@@ -551,7 +551,7 @@ export default class AppPicker extends Vue {
private
openRedirectView
(
$event
:
any
,
view
:
any
,
data
:
any
):
void
{
this
.
$http
.
get
(
view
.
url
,
data
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$noti
fy
({
type
:
'danger'
,
message
:
`
${
this
.
$t
(
"requestException"
)}
`
}
);
this
.
$noti
ce
.
error
(
`
${
this
.
$t
(
"requestException"
)}
`
);
}
if
(
response
.
status
===
401
)
{
return
;
...
...
@@ -603,7 +603,7 @@ export default class AppPicker extends Vue {
}
}).
catch
((
response
:
any
)
=>
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$noti
fy
({
type
:
'danger'
,
message
:
`
${
this
.
$t
(
'systemIsAbnormal'
)}
`
}
);
this
.
$noti
ce
.
error
(
`
${
this
.
$t
(
'systemIsAbnormal'
)}
`
);
return
;
}
if
(
response
.
status
===
401
)
{
...
...
@@ -622,7 +622,7 @@ export default class AppPicker extends Vue {
return
;
}
if
(
!
this
.
data
||
!
this
.
valueitem
||
!
this
.
data
[
this
.
valueitem
])
{
this
.
$noti
fy
({
type
:
'danger'
,
message
:
`
${
this
.
$t
(
'valueItemIsAbnormal'
)}
`
}
);
this
.
$noti
ce
.
error
(
`
${
this
.
$t
(
'valueItemIsAbnormal'
)}
`
);
return
;
}
// 公共参数处理
...
...
src/components/app-mob-picture/app-mob-picture.vue
浏览文件 @
fc714bc6
...
...
@@ -130,7 +130,7 @@ export default class AppMobPicture extends Vue {
public
beforeRead
(
file
:
any
,
detail
:
any
):
boolean
{
this
.
dataProcess
();
if
(
file
&&
Array
.
isArray
(
file
))
{
this
.
$noti
fy
({
type
:
'warning'
,
message
:
`
${
this
.
$t
(
'one_doc'
)}
`
}
);
this
.
$noti
ce
.
warning
(
`
${
this
.
$t
(
'one_doc'
)}
`
);
return
false
;
}
return
true
;
...
...
@@ -152,7 +152,7 @@ export default class AppMobPicture extends Vue {
'Content-Type'
:
'multipart/form-data'
}
}
Loading
.
show
();
Axios
.
post
(
this
.
uploadUrl
,
params
,
config
).
then
((
response
:
any
)
=>
{
Loading
.
hidden
();
if
(
response
&&
response
.
data
&&
response
.
status
===
200
)
{
...
...
@@ -165,11 +165,10 @@ export default class AppMobPicture extends Vue {
this
.
onError
(
response
,
file
,
this
.
files
);
}
}).
catch
((
response
:
any
)
=>
{
Loading
.
hidden
();
this
.
onError
(
response
,
file
,
this
.
files
);
});
}
// MOB LOGIC END
/**
* 是否支持多个上传
...
...
@@ -359,44 +358,6 @@ export default class AppMobPicture extends Vue {
});
}
/**
* vue 生命周期
*
* @memberof AppMobPicture
*/
public
created
()
{
this
.
platform
=
Capacitor
.
getPlatform
();
if
(
this
.
formState
)
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
((
$event
:
any
)
=>
{
// 表单加载完成
if
(
Object
.
is
(
$event
.
type
,
'load'
))
{
if
(
this
.
value
)
{
this
.
files
=
JSON
.
parse
(
this
.
value
);
}
this
.
dataProcess
();
}
// 表单保存完成 和 表单项更新
if
(
Object
.
is
(
$event
.
type
,
"save"
)
||
Object
.
is
(
$event
.
type
,
"updateformitem"
))
{
this
.
dataProcess
();
}
});
}
}
/**
* vue 生命周期
*
* @memberof AppMobPicture
*/
public
mounted
()
{
this
.
appData
=
this
.
$store
.
getters
.
getAppData
();
if
(
this
.
value
)
{
this
.
files
=
JSON
.
parse
(
this
.
value
);
}
this
.
dataProcess
();
this
.
changeLabelStyle
();
}
/**
* 修改label默认样式
* @memberof AppMobPicture
...
...
@@ -475,7 +436,7 @@ export default class AppMobPicture extends Vue {
* @memberof AppMobPicture
*/
public
onError
(
error
:
any
,
file
:
any
,
fileList
:
any
)
{
this
.
$noti
fy
({
type
:
'danger'
,
message
:
`
${
this
.
$t
(
'upload_failed'
)}
`
}
);
this
.
$noti
ce
.
error
(
`
${
this
.
$t
(
'upload_failed'
)}
`
);
}
/**
...
...
@@ -527,6 +488,44 @@ export default class AppMobPicture extends Vue {
let
base
=
image
.
base64String
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
this
.
files
});
}
/**
* vue 生命周期
*
* @memberof AppMobPicture
*/
public
created
()
{
this
.
platform
=
Capacitor
.
getPlatform
();
if
(
this
.
formState
)
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
((
$event
:
any
)
=>
{
// 表单加载完成
if
(
Object
.
is
(
$event
.
type
,
'load'
))
{
if
(
this
.
value
)
{
this
.
files
=
JSON
.
parse
(
this
.
value
);
}
this
.
dataProcess
();
}
// 表单保存完成 和 表单项更新
if
(
Object
.
is
(
$event
.
type
,
"save"
)
||
Object
.
is
(
$event
.
type
,
"updateformitem"
))
{
this
.
dataProcess
();
}
});
}
}
/**
* vue 生命周期
*
* @memberof AppMobPicture
*/
public
mounted
()
{
this
.
appData
=
this
.
$store
.
getters
.
getAppData
();
if
(
this
.
value
)
{
this
.
files
=
JSON
.
parse
(
this
.
value
);
}
this
.
dataProcess
();
this
.
changeLabelStyle
();
}
}
</
script
>
...
...
src/components/app-mob-recorder/app-mob-recorder.vue
浏览文件 @
fc714bc6
...
...
@@ -641,7 +641,7 @@ export default class AppMobRecorder extends Vue {
* @memberof AppMobRecorder
*/
public
onError
(
error
:
any
,
file
:
any
,
fileList
:
any
)
{
this
.
$noti
fy
({
type
:
'danger'
,
message
:
`
${
this
.
$t
(
'uploadfailed'
)}
`
}
);
this
.
$noti
ce
.
error
(
`
${
this
.
$t
(
'uploadfailed'
)}
`
);
}
/**
...
...
src/ibiz-core/widgets/MOBMDCTRLBase.ts
浏览文件 @
fc714bc6
...
...
@@ -348,7 +348,7 @@ export class MOBMDCTRLBase extends ControlBase {
Object
.
assign
(
data
,
parentdata
);
const
response
:
any
=
await
this
.
service
.
search
(
this
.
fetchAction
,
this
.
context
,
data
,
this
.
showBusyIndicator
);
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$noti
fy
({
type
:
'danger'
,
message
:
response
.
error
.
message
});
this
.
$noti
ce
.
error
({
type
:
'danger'
,
message
:
response
.
error
.
message
});
return
response
;
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录