Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
99930593
提交
99930593
编写于
6月 03, 2020
作者:
WodahsOrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lxm--动态代码表编辑器参数
上级
ac3b4c52
变更
5
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
288 行增加
和
50 行删除
+288
-50
app-checkbox-list.vue
src/components/app-checkbox-list/app-checkbox-list.vue
+61
-1
app-radio-group.vue
src/components/app-radio-group/app-radio-group.vue
+61
-1
dropdown-list-dynamic.vue
...omponents/dropdown-list-dynamic/dropdown-list-dynamic.vue
+49
-23
dropdown-list-mpicker.vue
...omponents/dropdown-list-mpicker/dropdown-list-mpicker.vue
+68
-2
dropdown-list.vue
src/components/dropdown-list/dropdown-list.vue
+49
-23
未找到文件。
src/components/app-checkbox-list/app-checkbox-list.vue
浏览文件 @
99930593
...
...
@@ -53,6 +53,38 @@ export default class AppCheckBox extends Vue {
*/
@
Prop
()
disabled
?:
boolean
;
/**
* 传入表单数据
*
* @type {*}
* @memberof DropDownList
*/
@
Prop
()
public
data
?:
any
;
/**
* 传入额外参数
*
* @type {*}
* @memberof DropDownList
*/
@
Prop
()
public
itemParam
?:
any
;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 获取启用禁用状态
*
...
...
@@ -166,6 +198,28 @@ export default class AppCheckBox extends Vue {
*/
public
items
:
any
[]
=
[];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof DropDownList
*/
public
handlePublicParams
(
arg
:
any
)
{
// 合并表单参数
arg
.
param
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
arg
.
context
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
/**
* vue 生命周期
*
...
...
@@ -181,7 +235,13 @@ export default class AppCheckBox extends Vue {
console
.
log
(
`----
${
this
.
tag
}
----$t('components.appCheckBox.notExist')`
);
}
}
else
if
(
Object
.
is
(
this
.
codelistType
,
"DYNAMIC"
))
{
this
.
codeListService
.
getItems
(
this
.
tag
).
then
((
res
:
any
)
=>
{
// 公共参数处理
let
data
:
any
=
{};
this
.
handlePublicParams
(
data
);
// 参数处理
let
_context
=
data
.
context
;
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
).
then
((
res
:
any
)
=>
{
this
.
items
=
res
;
}).
catch
((
error
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----$t('components.appCheckBox.notExist')`
);
...
...
src/components/app-radio-group/app-radio-group.vue
浏览文件 @
99930593
...
...
@@ -61,6 +61,14 @@ export default class AppRadioGroup extends Vue {
*/
@
Prop
()
public
codelistType
?:
string
;
/**
* 传入表单数据
*
* @type {*}
* @memberof DropDownList
*/
@
Prop
()
public
data
?:
any
;
/**
* 是否禁用
*
...
...
@@ -69,6 +77,30 @@ export default class AppRadioGroup extends Vue {
*/
@
Prop
()
public
disabled
?:
boolean
;
/**
* 传入额外参数
*
* @type {*}
* @memberof DropDownList
*/
@
Prop
()
public
itemParam
?:
any
;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 属性名称
*
...
...
@@ -99,6 +131,28 @@ export default class AppRadioGroup extends Vue {
*/
public
items
:
any
[]
=
[];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof DropDownList
*/
public
handlePublicParams
(
arg
:
any
)
{
// 合并表单参数
arg
.
param
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
arg
.
context
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
/**
* vue 生命周期
*
...
...
@@ -108,7 +162,13 @@ export default class AppRadioGroup extends Vue {
if
(
this
.
tag
&&
this
.
codelistType
==
'STATIC'
){
this
.
items
=
this
.
$store
.
getters
.
getCodeListItems
(
this
.
tag
);
}
else
if
(
this
.
tag
&&
this
.
codelistType
==
'DYNAMIC'
){
this
.
codeListService
.
getItems
(
this
.
tag
).
then
((
data
:
any
)
=>
{
// 公共参数处理
let
data
:
any
=
{};
this
.
handlePublicParams
(
data
);
// 参数处理
let
_context
=
data
.
context
;
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
).
then
((
res
:
any
)
=>
{
this
.
items
=
data
;
}).
catch
((
data
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在!`
);
...
...
src/components/dropdown-list-dynamic/dropdown-list-dynamic.vue
浏览文件 @
99930593
...
...
@@ -81,7 +81,7 @@ export default class DropDownListDynamic extends Vue {
@
Watch
(
'data'
,{
deep
:
true
})
onDataChange
(
newVal
:
any
,
val
:
any
){
if
(
newVal
){
this
.
handleOtherParam
();
}
}
...
...
@@ -145,26 +145,40 @@ export default class DropDownListDynamic extends Vue {
public
items
:
any
[]
=
[];
/**
* 处理额外参数
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
public
handleOtherParam
(){
if
(
this
.
itemParam
){
this
.
queryParam
=
{};
this
.
otherParam
=
this
.
itemParam
.
parentdata
;
if
(
this
.
otherParam
&&
Object
.
keys
(
this
.
otherParam
).
length
>
0
){
Object
.
keys
(
this
.
otherParam
).
forEach
((
item
:
any
)
=>
{
let
value
:
string
|
null
=
this
.
otherParam
[
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
});
})
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof DropDownListDynamic
*/
public
handlePublicParams
(
arg
:
any
)
{
// 合并表单参数
arg
.
param
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
arg
.
context
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
...
...
@@ -182,7 +196,13 @@ export default class DropDownListDynamic extends Vue {
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
}
}
else
if
(
this
.
tag
&&
Object
.
is
(
this
.
codelistType
,
"DYNAMIC"
)){
this
.
codeListService
.
getItems
(
this
.
tag
,{},
this
.
queryParam
).
then
((
res
:
any
)
=>
{
// 公共参数处理
let
data
:
any
=
{};
this
.
handlePublicParams
(
data
);
// 参数处理
let
_context
=
data
.
context
;
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
).
then
((
res
:
any
)
=>
{
this
.
items
=
res
;
}).
catch
((
error
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
...
...
@@ -199,7 +219,13 @@ export default class DropDownListDynamic extends Vue {
public
onClick
(
$event
:
any
){
if
(
$event
){
if
(
this
.
tag
&&
Object
.
is
(
this
.
codelistType
,
"DYNAMIC"
)){
this
.
codeListService
.
getItems
(
this
.
tag
,{},
this
.
queryParam
).
then
((
res
:
any
)
=>
{
// 公共参数处理
let
data
:
any
=
{};
this
.
handlePublicParams
(
data
);
// 参数处理
let
_context
=
data
.
context
;
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
).
then
((
res
:
any
)
=>
{
this
.
items
=
res
;
}).
catch
((
error
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
...
...
src/components/dropdown-list-mpicker/dropdown-list-mpicker.vue
浏览文件 @
99930593
...
...
@@ -84,6 +84,38 @@ export default class DropDownListMpicker extends Vue {
*/
@
Prop
()
public
placeholder
?:
string
;
/**
* 传入额外参数
*
* @type {*}
* @memberof DropDownListMpicker
*/
@
Prop
()
public
itemParam
?:
any
;
/**
* 视图上下文
*
* @type {*}
* @memberof DropDownListMpicker
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof DropDownListMpicker
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 传入表单数据
*
* @type {*}
* @memberof DropDownListMpicker
*/
@
Prop
()
public
data
?:
any
;
/**
* 计算属性(当前值)
* @type {any}
...
...
@@ -113,6 +145,28 @@ export default class DropDownListMpicker extends Vue {
*/
public
items
:
any
[]
=
[];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof DropDownList
*/
public
handlePublicParams
(
arg
:
any
)
{
// 合并表单参数
arg
.
param
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
arg
.
context
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
/**
* vue 生命周期
*
...
...
@@ -127,7 +181,13 @@ export default class DropDownListMpicker extends Vue {
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
}
}
else
if
(
this
.
tag
&&
Object
.
is
(
this
.
codelistType
,
"DYNAMIC"
)){
this
.
codeListService
.
getItems
(
this
.
tag
).
then
((
res
:
any
)
=>
{
// 公共参数处理
let
data
:
any
=
{};
this
.
handlePublicParams
(
data
);
// 参数处理
let
_context
=
data
.
context
;
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
).
then
((
res
:
any
)
=>
{
this
.
items
=
res
;
}).
catch
((
error
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
...
...
@@ -143,7 +203,13 @@ export default class DropDownListMpicker extends Vue {
*/
public
onClick
(
$event
:
any
){
if
(
this
.
tag
&&
Object
.
is
(
this
.
codelistType
,
"DYNAMIC"
)){
this
.
codeListService
.
getItems
(
this
.
tag
).
then
((
res
:
any
)
=>
{
// 公共参数处理
let
data
:
any
=
{};
this
.
handlePublicParams
(
data
);
// 参数处理
let
_context
=
data
.
context
;
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
).
then
((
res
:
any
)
=>
{
this
.
items
=
res
;
}).
catch
((
error
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
...
...
src/components/dropdown-list/dropdown-list.vue
浏览文件 @
99930593
...
...
@@ -81,7 +81,7 @@ export default class DropDownList extends Vue {
@
Watch
(
'data'
,{
deep
:
true
})
onDataChange
(
newVal
:
any
,
val
:
any
){
if
(
newVal
){
this
.
handleOtherParam
();
}
}
...
...
@@ -93,6 +93,22 @@ export default class DropDownList extends Vue {
*/
@
Prop
()
public
itemParam
?:
any
;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 是否禁用
* @type {any}
...
...
@@ -145,26 +161,24 @@ export default class DropDownList extends Vue {
public
items
:
any
[]
=
[];
/**
* 处理额外参数
*/
public
handleOtherParam
(){
if
(
this
.
itemParam
){
this
.
queryParam
=
{};
this
.
otherParam
=
this
.
itemParam
.
parentdata
;
if
(
this
.
otherParam
&&
Object
.
keys
(
this
.
otherParam
).
length
>
0
){
Object
.
keys
(
this
.
otherParam
).
forEach
((
item
:
any
)
=>
{
let
value
:
string
|
null
=
this
.
otherParam
[
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
});
})
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof DropDownList
*/
public
handlePublicParams
(
arg
:
any
)
{
// 合并表单参数
arg
.
param
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
arg
.
context
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
...
...
@@ -182,7 +196,13 @@ export default class DropDownList extends Vue {
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
}
}
else
if
(
this
.
tag
&&
Object
.
is
(
this
.
codelistType
,
"DYNAMIC"
)){
this
.
codeListService
.
getItems
(
this
.
tag
,{},
this
.
queryParam
).
then
((
res
:
any
)
=>
{
// 公共参数处理
let
data
:
any
=
{};
this
.
handlePublicParams
(
data
);
// 参数处理
let
_context
=
data
.
context
;
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
).
then
((
res
:
any
)
=>
{
this
.
items
=
res
;
}).
catch
((
error
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
...
...
@@ -199,7 +219,13 @@ export default class DropDownList extends Vue {
public
onClick
(
$event
:
any
){
if
(
$event
){
if
(
this
.
tag
&&
Object
.
is
(
this
.
codelistType
,
"DYNAMIC"
)){
this
.
codeListService
.
getItems
(
this
.
tag
,{},
this
.
queryParam
).
then
((
res
:
any
)
=>
{
// 公共参数处理
let
data
:
any
=
{};
this
.
handlePublicParams
(
data
);
// 参数处理
let
_context
=
data
.
context
;
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
).
then
((
res
:
any
)
=>
{
this
.
items
=
res
;
}).
catch
((
error
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----代码表不存在`
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录