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
提交
3ee480c0
提交
3ee480c0
编写于
6月 10, 2020
作者:
KK
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
编辑器导航参数处理调整
上级
46d29c00
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
88 行增加
和
85 行删除
+88
-85
app-mob-check-list.vue
src/components/app-mob-check-list/app-mob-check-list.vue
+46
-9
app-mob-mpicker.vue
src/components/app-mob-mpicker/app-mob-mpicker.vue
+11
-28
app-mob-picker.vue
src/components/app-mob-picker/app-mob-picker.vue
+5
-22
app-mob-select.vue
src/components/app-mob-select/app-mob-select.vue
+26
-26
未找到文件。
src/components/app-mob-check-list/app-mob-check-list.vue
浏览文件 @
3ee480c0
...
...
@@ -83,7 +83,7 @@
* 导航参数
*
* @type {*}
* @memberof App
Selec
t
* @memberof App
CheckLis
t
*/
@
Prop
({
default
:
{}
})
protected
navigateParam
?:
any
;
...
...
@@ -91,7 +91,7 @@
* 导航上下文
*
* @type {*}
* @memberof App
Selec
t
* @memberof App
CheckLis
t
*/
@
Prop
({
default
:
{}
})
protected
navigateContext
?:
any
;
...
...
@@ -99,7 +99,7 @@
* 应用上下文
*
* @type {*}
* @memberof App
Selec
t
* @memberof App
CheckLis
t
*/
@
Prop
({
default
:
{}
})
protected
context
?:
any
;
...
...
@@ -107,11 +107,33 @@
* 是否缓存
*
* @type {*}
* @memberof App
Selec
t
* @memberof App
CheckLis
t
*/
@
Prop
({
default
:
true
})
protected
isCache
?:
boolean
;
/**
* 传入表单数据
*
* @type {*}
* @memberof AppCheckList
*/
@
Prop
()
public
data
?:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof AppCheckList
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 生命周期
*
* @type {*}
* @memberof AppCheckList
*/
public
created
()
{
if
(
this
.
tag
&&
this
.
type
)
{
if
(
Object
.
is
(
this
.
type
,
"dynamic"
))
{
...
...
@@ -125,11 +147,9 @@
});
}
else
{
// 处理导航参数、上下文参数
let
_context
:
any
=
{};
let
_queryParam
:
any
=
{};
Object
.
assign
(
_context
,
this
.
context
,
this
.
navigateContext
);
Object
.
assign
(
_queryParam
,
this
.
navigateParam
);
this
.
options
=
this
.
$store
.
getters
.
getCodeListItems
(
this
.
tag
,
this
.
isCache
,
{
...
_context
},
_queryParam
);
let
param
:
any
=
{};
this
.
handleOtherParam
(
param
);
this
.
options
=
this
.
$store
.
getters
.
getCodeListItems
(
this
.
tag
,
this
.
isCache
,
param
.
context
,
param
.
param
);
}
}
}
...
...
@@ -153,6 +173,23 @@
select
.
value
=
this
.
curValue
;
}
/**
* 处理额外参数
*/
public
handleOtherParam
(
arg
:
any
)
{
if
(
!
this
.
data
)
{
return
false
;
}
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
const
param
=
this
.
$viewTool
.
doEditorItemParam
({
context
:
this
.
navigateContext
,
param
:
this
.
navigateParam
},
this
.
context
,
this
.
viewparams
,
this
.
data
);
Object
.
assign
(
arg
.
context
,
param
.
context
);
Object
.
assign
(
arg
.
param
,
param
.
param
);
return
true
;
}
/**
* 清空值
* @memberof @memberof AppCheckList
...
...
src/components/app-mob-mpicker/app-mob-mpicker.vue
浏览文件 @
3ee480c0
...
...
@@ -233,34 +233,17 @@ export default class AppMobMpicker extends Vue {
* @memberof AppMobMpicker
*/
public
handlePublicParams
(
arg
:
any
):
boolean
{
// if (!this.itemParam) {
// return true;
// }
// if (!this.data) {
// this.$notify({ type: "danger", message: "表单数据异常!" });
// return false;
// }
// 合并表单参数
let
_context
:
any
=
{};
let
_params
:
any
=
{};
Object
.
assign
(
_context
,
this
.
context
,
this
.
navigateContext
);
Object
.
assign
(
_params
,
this
.
viewparams
,
this
.
navigateParam
);
arg
.
param
=
_params
;
arg
.
context
=
_context
;
// 附加参数处理
// if (this.itemParam.context) {
// let _context = this.$util.formatData(this.data,this.itemParam.context);
// Object.assign(arg.context, {});
// }
// if (this.itemParam.param) {
// let _param = this.$util.formatData(this.data,this.itemParam.param);
// Object.assign(arg.param, {});
// }
// if (this.itemParam.parentdata) {
// let _parentdata = this.$util.formatData(this.data,this.itemParam.parentdata);
// Object.assign(arg.param, {});
// }
return
true
;
if
(
!
this
.
data
)
{
return
false
;
}
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
const
param
=
this
.
$viewTool
.
doEditorItemParam
({
context
:
this
.
navigateContext
,
param
:
this
.
navigateParam
},
this
.
context
,
this
.
viewparams
,
this
.
data
);
Object
.
assign
(
arg
.
context
,
param
.
context
);
Object
.
assign
(
arg
.
param
,
param
.
param
);
return
true
;
}
/**
...
...
src/components/app-mob-picker/app-mob-picker.vue
浏览文件 @
3ee480c0
...
...
@@ -694,33 +694,16 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public
handlePublicParams
(
arg
:
any
):
boolean
{
if
(
!
this
.
itemParam
)
{
return
true
;
}
if
(
!
this
.
data
)
{
this
.
$notify
({
type
:
'danger'
,
message
:
this
.
$t
(
'formDataIsAbnormal'
)
+
""
});
return
false
;
}
// 合并表单参数
let
_context
:
any
=
{};
let
_params
:
any
=
{};
Object
.
assign
(
_context
,
this
.
context
,
this
.
navigateContext
);
Object
.
assign
(
_params
,
this
.
viewparams
,
this
.
navigateParam
);
arg
.
param
=
JSON
.
parse
(
JSON
.
stringify
(
_params
));
arg
.
context
=
JSON
.
parse
(
JSON
.
stringify
(
_context
));
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
// let _context = this.$util.formatData(this.data,this.itemParam.context);
Object
.
assign
(
arg
.
context
,
{});
}
if
(
this
.
itemParam
.
param
)
{
// let _param = this.$util.formatData(this.data,this.itemParam.param);
Object
.
assign
(
arg
.
param
,
{});
}
if
(
this
.
itemParam
.
parentdata
)
{
// let _parentdata = this.$util.formatData(this.data,this.itemParam.parentdata);
Object
.
assign
(
arg
.
param
,
{});
}
const
param
=
this
.
$viewTool
.
doEditorItemParam
({
context
:
this
.
navigateContext
,
param
:
this
.
navigateParam
},
this
.
context
,
this
.
viewparams
,
this
.
data
);
Object
.
assign
(
arg
.
context
,
param
.
context
);
Object
.
assign
(
arg
.
param
,
param
.
param
);
return
true
;
}
...
...
src/components/app-mob-select/app-mob-select.vue
浏览文件 @
3ee480c0
...
...
@@ -142,6 +142,14 @@ export default class AppSelect extends Vue {
*/
@
Prop
({
default
:
true
})
protected
isCache
?:
boolean
;
/**
* 视图参数
*
* @type {*}
* @memberof AppMobMpicker
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 是否被缓存
*
...
...
@@ -160,7 +168,7 @@ export default class AppSelect extends Vue {
@
Watch
(
'data'
,
{
deep
:
true
})
onDataChange
(
newVal
:
any
,
val
:
any
)
{
if
(
newVal
)
{
this
.
handleOtherParam
();
//
this.handleOtherParam();
}
}
...
...
@@ -191,11 +199,12 @@ export default class AppSelect extends Vue {
Loading
.
show
(
this
.
$t
(
'app.loadding'
));
}
// 处理导航参数、上下文参数
let
_context
:
any
=
{};
let
_queryParam
:
any
=
{};
Object
.
assign
(
_context
,
this
.
context
,
this
.
navigateContext
);
Object
.
assign
(
_queryParam
,
this
.
queryParam
,
this
.
navigateParam
);
let
response
:
any
=
await
this
.
codeListService
.
getItems
(
this
.
tag
,
this
.
isCache
,
{
...
_context
},
_queryParam
);
let
param
:
any
=
{};
const
bcancel
:
boolean
=
this
.
handleOtherParam
(
param
);
if
(
!
bcancel
){
return
}
let
response
:
any
=
await
this
.
codeListService
.
getItems
(
this
.
tag
,
this
.
isCache
,
param
.
context
,
param
.
param
);
if
(
!
this
.
isCached
)
{
Loading
.
hidden
();
}
...
...
@@ -220,27 +229,18 @@ export default class AppSelect extends Vue {
/**
* 处理额外参数
*/
public
handleOtherParam
()
{
if
(
!
this
.
itemParam
)
{
return
;
public
handleOtherParam
(
arg
:
any
)
{
if
(
!
this
.
data
)
{
return
false
;
}
this
.
queryParam
=
{};
let
parentdata
:
any
=
this
.
itemParam
.
parentdata
;
if
(
!
(
parentdata
&&
Object
.
keys
(
parentdata
).
length
>
0
))
{
return
;
}
Object
.
keys
(
parentdata
).
forEach
((
item
:
any
)
=>
{
let
value
:
string
|
null
=
parentdata
[
item
];
if
(
value
&&
value
.
startsWith
(
"%"
)
&&
value
.
endsWith
(
"%"
))
{
const
key
=
value
.
substring
(
1
,
value
.
length
-
1
);
if
(
this
.
data
&&
this
.
data
.
hasOwnProperty
(
key
))
{
value
=
(
this
.
data
[
key
]
!==
null
&&
this
.
data
[
key
]
!==
undefined
)
?
this
.
data
[
key
]
:
null
;
}
else
{
value
=
null
;
}
}
Object
.
assign
(
this
.
queryParam
,
{
[
item
]:
value
});
});
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
const
param
=
this
.
$viewTool
.
doEditorItemParam
({
context
:
this
.
navigateContext
,
param
:
this
.
navigateParam
},
this
.
context
,
this
.
viewparams
,
this
.
data
);
Object
.
assign
(
arg
.
context
,
param
.
context
);
Object
.
assign
(
arg
.
param
,
param
.
param
);
return
true
;
}
}
</
script
>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录