Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
fc11a999
提交
fc11a999
编写于
6月 08, 2020
作者:
WodahsOrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数据选择,动态代码表,自动完成类编辑器上下文参数处理
上级
e561d524
变更
10
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
246 行增加
和
177 行删除
+246
-177
app-autocomplete.vue
src/components/app-autocomplete/app-autocomplete.vue
+20
-12
app-checkbox-list.vue
src/components/app-checkbox-list/app-checkbox-list.vue
+22
-14
app-embed-picker.vue
src/components/app-embed-picker/app-embed-picker.vue
+26
-22
app-mpicker.vue
src/components/app-mpicker/app-mpicker.vue
+22
-14
app-picker-select-view.vue
...ponents/app-picker-select-view/app-picker-select-view.vue
+58
-53
app-radio-group.vue
src/components/app-radio-group/app-radio-group.vue
+22
-14
app-span.vue
src/components/app-span/app-span.vue
+12
-4
app-tree-picker.vue
src/components/app-tree-picker/app-tree-picker.vue
+32
-28
codelist.vue
src/components/codelist/codelist.vue
+16
-8
dropdown-list-mpicker.vue
...omponents/dropdown-list-mpicker/dropdown-list-mpicker.vue
+16
-8
未找到文件。
src/components/app-autocomplete/app-autocomplete.vue
浏览文件 @
fc11a999
...
@@ -100,12 +100,20 @@ export default class AppAutocomplete extends Vue {
...
@@ -100,12 +100,20 @@ export default class AppAutocomplete extends Vue {
@
Prop
()
public
name
!
:
string
;
@
Prop
()
public
name
!
:
string
;
/**
/**
*
编辑器
参数
*
局部上下文导航
参数
*
*
* @type {
string
}
* @type {
any
}
* @memberof AppAutocomplete
* @memberof AppAutocomplete
*/
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppAutocomplete
*/
@
Prop
()
public
localParam
!
:
any
;
/**
/**
* 值项名称
* 值项名称
...
@@ -119,7 +127,7 @@ export default class AppAutocomplete extends Vue {
...
@@ -119,7 +127,7 @@ export default class AppAutocomplete extends Vue {
* 值
* 值
*
*
* @type {*}
* @type {*}
* @memberof App
Picker
* @memberof App
Autocomplete
*/
*/
@
Model
(
'change'
)
public
value
?:
any
;
@
Model
(
'change'
)
public
value
?:
any
;
...
@@ -127,7 +135,7 @@ export default class AppAutocomplete extends Vue {
...
@@ -127,7 +135,7 @@ export default class AppAutocomplete extends Vue {
* 当前值
* 当前值
*
*
* @type {string}
* @type {string}
* @memberof App
Picker
* @memberof App
Autocomplete
*/
*/
public
curvalue
:
string
=
''
;
public
curvalue
:
string
=
''
;
...
@@ -160,7 +168,7 @@ export default class AppAutocomplete extends Vue {
...
@@ -160,7 +168,7 @@ export default class AppAutocomplete extends Vue {
*
*
* @param {*} newVal
* @param {*} newVal
* @param {*} oldVal
* @param {*} oldVal
* @memberof App
Picker
* @memberof App
Autocomplete
*/
*/
@
Watch
(
'value'
)
@
Watch
(
'value'
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
...
@@ -277,19 +285,19 @@ export default class AppAutocomplete extends Vue {
...
@@ -277,19 +285,19 @@ export default class AppAutocomplete extends Vue {
*/
*/
public
handlePublicParams
(
arg
:
any
):
boolean
{
public
handlePublicParams
(
arg
:
any
):
boolean
{
if
(
!
this
.
data
)
{
if
(
!
this
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
appPicker.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.appPicker
.formdataException'
)
as
any
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
AppAutocomplete.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.AppAutocomplete
.formdataException'
)
as
any
)
});
return
false
;
return
false
;
}
}
// 合并表单参数
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
return
true
;
return
true
;
...
...
src/components/app-checkbox-list/app-checkbox-list.vue
浏览文件 @
fc11a999
...
@@ -57,23 +57,31 @@ export default class AppCheckBox extends Vue {
...
@@ -57,23 +57,31 @@ export default class AppCheckBox extends Vue {
* 传入表单数据
* 传入表单数据
*
*
* @type {*}
* @type {*}
* @memberof
DropDownList
* @memberof
AppCheckBox
*/
*/
@
Prop
()
public
data
?:
any
;
@
Prop
()
public
data
?:
any
;
/**
/**
*
传入额外
参数
*
局部上下文导航
参数
*
*
* @type {*}
* @type {any}
* @memberof DropDownList
* @memberof AppCheckBox
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppCheckBox
*/
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
/**
* 视图上下文
* 视图上下文
*
*
* @type {*}
* @type {*}
* @memberof App
Autocomplete
* @memberof App
CheckBox
*/
*/
@
Prop
()
public
context
!
:
any
;
@
Prop
()
public
context
!
:
any
;
...
@@ -81,7 +89,7 @@ export default class AppCheckBox extends Vue {
...
@@ -81,7 +89,7 @@ export default class AppCheckBox extends Vue {
* 视图参数
* 视图参数
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
CheckBox
*/
*/
@
Prop
()
public
viewparams
!
:
any
;
@
Prop
()
public
viewparams
!
:
any
;
...
@@ -203,19 +211,19 @@ export default class AppCheckBox extends Vue {
...
@@ -203,19 +211,19 @@ export default class AppCheckBox extends Vue {
*
*
* @param {*} arg
* @param {*} arg
* @returns
* @returns
* @memberof
DropDownList
* @memberof
AppCheckBox
*/
*/
public
handlePublicParams
(
arg
:
any
)
{
public
handlePublicParams
(
arg
:
any
)
{
// 合并表单参数
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
}
}
...
@@ -253,7 +261,7 @@ export default class AppCheckBox extends Vue {
...
@@ -253,7 +261,7 @@ export default class AppCheckBox extends Vue {
/**
/**
* 监听表单数据变化
* 监听表单数据变化
*
*
* @memberof App
OrgSelect
* @memberof App
CheckBox
*/
*/
@
Watch
(
'data'
,{
immediate
:
true
,
deep
:
true
})
@
Watch
(
'data'
,{
immediate
:
true
,
deep
:
true
})
onDataChange
(
newVal
:
any
,
oldVal
:
any
)
{
onDataChange
(
newVal
:
any
,
oldVal
:
any
)
{
...
...
src/components/app-embed-picker/app-embed-picker.vue
浏览文件 @
fc11a999
...
@@ -62,7 +62,7 @@ export default class AppEmbedPicker extends Vue {
...
@@ -62,7 +62,7 @@ export default class AppEmbedPicker extends Vue {
* 表单数据
* 表单数据
*
*
* @type {*}
* @type {*}
* @memberof AppPicker
* @memberof App
Embed
Picker
*/
*/
@
Prop
()
public
data
!
:
any
;
@
Prop
()
public
data
!
:
any
;
...
@@ -95,7 +95,7 @@ export default class AppEmbedPicker extends Vue {
...
@@ -95,7 +95,7 @@ export default class AppEmbedPicker extends Vue {
* 值项名称
* 值项名称
*
*
* @type {string}
* @type {string}
* @memberof AppPicker
* @memberof App
Embed
Picker
*/
*/
@
Prop
()
public
valueItem
?:
string
;
@
Prop
()
public
valueItem
?:
string
;
...
@@ -103,7 +103,7 @@ export default class AppEmbedPicker extends Vue {
...
@@ -103,7 +103,7 @@ export default class AppEmbedPicker extends Vue {
* 关联视图名称
* 关联视图名称
*
*
* @type {string}
* @type {string}
* @memberof AppPicker
* @memberof App
Embed
Picker
*/
*/
@
Prop
()
public
refviewname
?:
string
;
@
Prop
()
public
refviewname
?:
string
;
...
@@ -127,17 +127,25 @@ export default class AppEmbedPicker extends Vue {
...
@@ -127,17 +127,25 @@ export default class AppEmbedPicker extends Vue {
* 属性项名称
* 属性项名称
*
*
* @type {string}
* @type {string}
* @memberof AppPicker
* @memberof App
Embed
Picker
*/
*/
@
Prop
()
public
name
!
:
string
;
@
Prop
()
public
name
!
:
string
;
/**
/**
*
关联视图
参数
*
局部上下文导航
参数
*
*
* @type {
*
}
* @type {
any
}
* @memberof AppEmbedPicker
* @memberof AppEmbedPicker
*/
*/
@
Prop
()
public
itemParam
:
any
;
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppEmbedPicker
*/
@
Prop
()
public
localParam
!
:
any
;
/**
/**
* 是否忽略之变化
* 是否忽略之变化
...
@@ -160,8 +168,8 @@ export default class AppEmbedPicker extends Vue {
...
@@ -160,8 +168,8 @@ export default class AppEmbedPicker extends Vue {
*
*
* @memberof AppEmbedPicker
* @memberof AppEmbedPicker
*/
*/
public
setViewParam
(
activeData
:
any
)
{
public
setViewParam
()
{
if
(
!
this
.
itemParam
||
!
activeD
ata
)
{
if
(
!
this
.
d
ata
)
{
return
;
return
;
}
}
let
arg
:
any
=
{};
let
arg
:
any
=
{};
...
@@ -169,17 +177,13 @@ export default class AppEmbedPicker extends Vue {
...
@@ -169,17 +177,13 @@ export default class AppEmbedPicker extends Vue {
let
param
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
let
param
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
let
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
let
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
// 附加参数处理
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
formatData
(
activeData
,
context
,
this
.
itemParam
.
context
);
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localContext
);
Object
.
assign
(
context
,
_context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
activeData
,
param
,
this
.
itemParam
.
param
);
Object
.
assign
(
param
,
_param
);
}
}
if
(
this
.
itemParam
.
parentdata
)
{
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_par
entdata
=
this
.
$util
.
formatData
(
activeData
,
param
,
this
.
itemParam
.
parentdata
);
let
_par
am
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localParam
);
Object
.
assign
(
param
,
_parentdata
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
this
.
viewdata
=
JSON
.
stringify
(
context
);
this
.
viewdata
=
JSON
.
stringify
(
context
);
this
.
viewparam
=
JSON
.
stringify
(
param
);
this
.
viewparam
=
JSON
.
stringify
(
param
);
...
@@ -196,7 +200,7 @@ export default class AppEmbedPicker extends Vue {
...
@@ -196,7 +200,7 @@ export default class AppEmbedPicker extends Vue {
onActivedataChange
(
newVal
:
any
,
oldVal
:
any
)
{
onActivedataChange
(
newVal
:
any
,
oldVal
:
any
)
{
const
newFormData
:
any
=
JSON
.
parse
(
newVal
);
const
newFormData
:
any
=
JSON
.
parse
(
newVal
);
const
oldDormData
:
any
=
JSON
.
parse
(
oldVal
);
const
oldDormData
:
any
=
JSON
.
parse
(
oldVal
);
this
.
setViewParam
(
newFormData
);
this
.
setViewParam
();
if
(
!
this
.
refreshitems
||
this
.
ignorefieldvaluechange
)
{
if
(
!
this
.
refreshitems
||
this
.
ignorefieldvaluechange
)
{
return
;
return
;
}
}
...
@@ -215,7 +219,7 @@ export default class AppEmbedPicker extends Vue {
...
@@ -215,7 +219,7 @@ export default class AppEmbedPicker extends Vue {
if
(
this
.
formState
)
{
if
(
this
.
formState
)
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
Object
.
is
(
'load'
,
action
))
{
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
setViewParam
(
JSON
.
parse
(
this
.
data
)
);
this
.
setViewParam
();
}
}
});
});
}
}
...
...
src/components/app-mpicker/app-mpicker.vue
浏览文件 @
fc11a999
...
@@ -45,12 +45,20 @@ export default class AppMpicker extends Vue {
...
@@ -45,12 +45,20 @@ export default class AppMpicker extends Vue {
@
Prop
()
curvalue
?:
any
;
@
Prop
()
curvalue
?:
any
;
/**
/**
*
表单项
参数
*
局部上下文导航
参数
*
*
* @type {any}
* @type {any}
* @memberof AppPicker
* @memberof AppMpicker
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppMpicker
*/
*/
@
Prop
()
public
itemParam
:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
/**
* 表单项名称
* 表单项名称
...
@@ -61,7 +69,7 @@ export default class AppMpicker extends Vue {
...
@@ -61,7 +69,7 @@ export default class AppMpicker extends Vue {
* 视图上下文
* 视图上下文
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Mpicker
*/
*/
@
Prop
()
public
context
!
:
any
;
@
Prop
()
public
context
!
:
any
;
...
@@ -69,7 +77,7 @@ export default class AppMpicker extends Vue {
...
@@ -69,7 +77,7 @@ export default class AppMpicker extends Vue {
* 视图参数
* 视图参数
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Mpicker
*/
*/
@
Prop
()
public
viewparams
!
:
any
;
@
Prop
()
public
viewparams
!
:
any
;
...
@@ -77,7 +85,7 @@ export default class AppMpicker extends Vue {
...
@@ -77,7 +85,7 @@ export default class AppMpicker extends Vue {
* AC参数
* AC参数
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Mpicker
*/
*/
@
Prop
({
default
:
()
=>
{}})
public
acParams
?:
any
;
@
Prop
({
default
:
()
=>
{}})
public
acParams
?:
any
;
...
@@ -85,7 +93,7 @@ export default class AppMpicker extends Vue {
...
@@ -85,7 +93,7 @@ export default class AppMpicker extends Vue {
* 应用实体主信息属性名称
* 应用实体主信息属性名称
*
*
* @type {string}
* @type {string}
* @memberof App
Autocomplete
* @memberof App
Mpicker
*/
*/
@
Prop
({
default
:
'srfmajortext'
})
public
deMajorField
!
:
string
;
@
Prop
({
default
:
'srfmajortext'
})
public
deMajorField
!
:
string
;
...
@@ -93,7 +101,7 @@ export default class AppMpicker extends Vue {
...
@@ -93,7 +101,7 @@ export default class AppMpicker extends Vue {
* 应用实体主键属性名称
* 应用实体主键属性名称
*
*
* @type {string}
* @type {string}
* @memberof App
Autocomplete
* @memberof App
Mpicker
*/
*/
@
Prop
({
default
:
'srfkey'
})
public
deKeyField
!
:
string
;
@
Prop
({
default
:
'srfkey'
})
public
deKeyField
!
:
string
;
...
@@ -101,7 +109,7 @@ export default class AppMpicker extends Vue {
...
@@ -101,7 +109,7 @@ export default class AppMpicker extends Vue {
* 表单服务
* 表单服务
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Mpicker
*/
*/
@
Prop
()
public
service
?:
any
;
@
Prop
()
public
service
?:
any
;
...
@@ -242,19 +250,19 @@ export default class AppMpicker extends Vue {
...
@@ -242,19 +250,19 @@ export default class AppMpicker extends Vue {
*/
*/
public
handlePublicParams
(
arg
:
any
):
boolean
{
public
handlePublicParams
(
arg
:
any
):
boolean
{
if
(
!
this
.
activeData
)
{
if
(
!
this
.
activeData
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
appPicker.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.appP
icker.formdataException'
)
as
any
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
AppMpicker.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.AppMp
icker.formdataException'
)
as
any
)
});
return
false
;
return
false
;
}
}
// 合并表单参数
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
activeData
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
let
_context
=
this
.
$util
.
computedNavData
(
this
.
activeData
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
activeData
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
let
_param
=
this
.
$util
.
computedNavData
(
this
.
activeData
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
return
true
;
return
true
;
...
...
src/components/app-picker-select-view/app-picker-select-view.vue
浏览文件 @
fc11a999
<
template
>
<
template
>
<div
class=
"app-picker-select-view"
>
<div
class=
"app-picker-select-view"
>
<Dropdown
:visible=
"visible"
trigger=
"custom"
style=
"left:0px;width: 100%"
@
on-clickoutside=
"() =>
{triggerMenu(false);}" >
<Dropdown
:visible=
"visible"
trigger=
"custom"
style=
"left:0px;width: 100%"
@
on-clickoutside=
"() =>
{triggerMenu(false);}" >
<Input
v-if=
"isSingleSelect"
v-model=
"queryValue"
class=
"tree-input"
type=
"text"
:placeholder=
"placeholder ? placeholder : $t('components.
appPicker
SelectView.placeholder')"
:disabled=
"disabled"
@
on-change=
"OnInputChange"
@
on-focus=
"()=>
{triggerMenu(true);}" >
<Input
v-if=
"isSingleSelect"
v-model=
"queryValue"
class=
"tree-input"
type=
"text"
:placeholder=
"placeholder ? placeholder : $t('components.
AppPickerSelectView
SelectView.placeholder')"
:disabled=
"disabled"
@
on-change=
"OnInputChange"
@
on-focus=
"()=>
{triggerMenu(true);}" >
<template
v-slot:suffix
>
<template
v-slot:suffix
>
<i
v-if=
"queryValue && !disabled"
class=
'el-icon-circle-close'
@
click=
"onClear"
></i>
<i
v-if=
"queryValue && !disabled"
class=
'el-icon-circle-close'
@
click=
"onClear"
></i>
<Icon
:type=
"visible ? 'ios-arrow-up' : 'ios-arrow-down'"
class=
"icon-arrow"
@
click=
"() =>
{triggerMenu();}">
</Icon>
<Icon
:type=
"visible ? 'ios-arrow-up' : 'ios-arrow-down'"
class=
"icon-arrow"
@
click=
"() =>
{triggerMenu();}">
</Icon>
...
@@ -34,12 +34,12 @@ import { ViewTool } from '@/utils/view-tool/view-tool';
...
@@ -34,12 +34,12 @@ import { ViewTool } from '@/utils/view-tool/view-tool';
@
Component
({
@
Component
({
})
})
export
default
class
AppPickerSelectView
extends
Vue
{
export
default
class
AppPickerSelectView
SelectView
extends
Vue
{
/**
/**
* 视图上下文
* 视图上下文
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
PickerSelectView
*/
*/
@
Prop
()
public
context
!
:
any
;
@
Prop
()
public
context
!
:
any
;
...
@@ -47,7 +47,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -47,7 +47,7 @@ export default class AppPickerSelectView extends Vue {
* 视图参数
* 视图参数
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
PickerSelectView
*/
*/
@
Prop
()
public
viewparams
!
:
any
;
@
Prop
()
public
viewparams
!
:
any
;
...
@@ -55,7 +55,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -55,7 +55,7 @@ export default class AppPickerSelectView extends Vue {
* 是否单选
* 是否单选
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
PickerSelectView
*/
*/
@
Prop
({
default
:
'true'
})
public
isSingleSelect
!
:
any
;
@
Prop
({
default
:
'true'
})
public
isSingleSelect
!
:
any
;
...
@@ -63,7 +63,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -63,7 +63,7 @@ export default class AppPickerSelectView extends Vue {
* 当前多选框选中值的key集合
* 当前多选框选中值的key集合
*
*
* @type {string}
* @type {string}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
keySet
:
any
=
[];
public
keySet
:
any
=
[];
...
@@ -71,7 +71,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -71,7 +71,7 @@ export default class AppPickerSelectView extends Vue {
* 当前多选框选中项对象集合
* 当前多选框选中项对象集合
*
*
* @type {string}
* @type {string}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
selectItems
:
Array
<
any
>
=
[];
public
selectItems
:
Array
<
any
>
=
[];
...
@@ -79,7 +79,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -79,7 +79,7 @@ export default class AppPickerSelectView extends Vue {
* 所有操作过的下拉选项对象集合
* 所有操作过的下拉选项对象集合
*
*
* @type {string}
* @type {string}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
items
:
Array
<
any
>
=
[];
public
items
:
Array
<
any
>
=
[];
...
@@ -87,7 +87,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -87,7 +87,7 @@ export default class AppPickerSelectView extends Vue {
* 视图参数
* 视图参数
*
*
* @type {string}
* @type {string}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
viewparam
:
any
=
JSON
.
stringify
(
this
.
viewparams
);
public
viewparam
:
any
=
JSON
.
stringify
(
this
.
viewparams
);
...
@@ -95,7 +95,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -95,7 +95,7 @@ export default class AppPickerSelectView extends Vue {
* 视图上下文
* 视图上下文
*
*
* @type {string}
* @type {string}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
viewdata
:
any
=
JSON
.
stringify
(
this
.
context
);
public
viewdata
:
any
=
JSON
.
stringify
(
this
.
context
);
...
@@ -103,7 +103,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -103,7 +103,7 @@ export default class AppPickerSelectView extends Vue {
* 表单数据
* 表单数据
*
*
* @type {*}
* @type {*}
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
@
Prop
()
public
data
!
:
any
;
@
Prop
()
public
data
!
:
any
;
...
@@ -111,7 +111,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -111,7 +111,7 @@ export default class AppPickerSelectView extends Vue {
* 值
* 值
*
*
* @type {*}
* @type {*}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
@
Prop
()
public
value
:
any
;
@
Prop
()
public
value
:
any
;
...
@@ -119,7 +119,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -119,7 +119,7 @@ export default class AppPickerSelectView extends Vue {
* 是否启用
* 是否启用
*
*
* @type {boolean}
* @type {boolean}
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
@
Prop
({
default
:
false
})
public
disabled
!
:
boolean
;
@
Prop
({
default
:
false
})
public
disabled
!
:
boolean
;
...
@@ -127,7 +127,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -127,7 +127,7 @@ export default class AppPickerSelectView extends Vue {
* 应用实体主信息属性名称
* 应用实体主信息属性名称
*
*
* @type {string}
* @type {string}
* @memberof App
Autocomplete
* @memberof App
PickerSelectView
*/
*/
@
Prop
({
default
:
'srfmajortext'
})
public
deMajorField
!
:
string
;
@
Prop
({
default
:
'srfmajortext'
})
public
deMajorField
!
:
string
;
...
@@ -135,7 +135,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -135,7 +135,7 @@ export default class AppPickerSelectView extends Vue {
* 应用实体主键属性名称
* 应用实体主键属性名称
*
*
* @type {string}
* @type {string}
* @memberof App
Autocomplete
* @memberof App
PickerSelectView
*/
*/
@
Prop
({
default
:
'srfkey'
})
public
deKeyField
!
:
string
;
@
Prop
({
default
:
'srfkey'
})
public
deKeyField
!
:
string
;
...
@@ -143,7 +143,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -143,7 +143,7 @@ export default class AppPickerSelectView extends Vue {
* 输入框值(搜索值)
* 输入框值(搜索值)
*
*
* @type {string}
* @type {string}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
queryValue
:
any
=
''
;
public
queryValue
:
any
=
''
;
...
@@ -151,7 +151,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -151,7 +151,7 @@ export default class AppPickerSelectView extends Vue {
* 值项名称
* 值项名称
*
*
* @type {string}
* @type {string}
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
@
Prop
()
public
valueitem
!
:
string
;
@
Prop
()
public
valueitem
!
:
string
;
...
@@ -159,7 +159,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -159,7 +159,7 @@ export default class AppPickerSelectView extends Vue {
* 关联视图名称
* 关联视图名称
*
*
* @type {string}
* @type {string}
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
@
Prop
()
public
pickupView
?:
any
;
@
Prop
()
public
pickupView
?:
any
;
...
@@ -167,7 +167,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -167,7 +167,7 @@ export default class AppPickerSelectView extends Vue {
* 数据链接视图参数
* 数据链接视图参数
*
*
* @type {*}
* @type {*}
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
@
Prop
()
public
linkview
?:
any
;
@
Prop
()
public
linkview
?:
any
;
...
@@ -175,7 +175,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -175,7 +175,7 @@ export default class AppPickerSelectView extends Vue {
* 提示信息
* 提示信息
*
*
* @type {string}
* @type {string}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
@
Prop
()
public
placeholder
!
:
string
;
@
Prop
()
public
placeholder
!
:
string
;
...
@@ -183,23 +183,31 @@ export default class AppPickerSelectView extends Vue {
...
@@ -183,23 +183,31 @@ export default class AppPickerSelectView extends Vue {
* 属性项名称
* 属性项名称
*
*
* @type {string}
* @type {string}
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
@
Prop
()
public
name
!
:
string
;
@
Prop
()
public
name
!
:
string
;
/**
/**
*
编辑器
参数
*
局部上下文导航
参数
*
*
* @type {
*
}
* @type {
any
}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
@
Prop
()
public
itemParam
:
any
;
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppPickerSelectView
*/
@
Prop
()
public
localParam
!
:
any
;
/**
/**
* 下拉显示控制变量
* 下拉显示控制变量
*
*
* @type {string}
* @type {string}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
visible
:
boolean
=
false
;
public
visible
:
boolean
=
false
;
...
@@ -207,7 +215,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -207,7 +215,7 @@ export default class AppPickerSelectView extends Vue {
* 父视图数据
* 父视图数据
*
*
* @type {string}
* @type {string}
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
srfparentdata
:
any
=
{};
public
srfparentdata
:
any
=
{};
...
@@ -215,7 +223,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -215,7 +223,7 @@ export default class AppPickerSelectView extends Vue {
* 输入框change事件
* 输入框change事件
*
*
* @param $event 事件对象
* @param $event 事件对象
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
OnInputChange
(
$event
:
any
){
public
OnInputChange
(
$event
:
any
){
let
_viewdata
=
Object
.
assign
({
query
:
this
.
queryValue
},
JSON
.
parse
(
this
.
viewdata
))
;
let
_viewdata
=
Object
.
assign
({
query
:
this
.
queryValue
},
JSON
.
parse
(
this
.
viewdata
))
;
...
@@ -226,7 +234,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -226,7 +234,7 @@ export default class AppPickerSelectView extends Vue {
* 输入框change事件
* 输入框change事件
*
*
* @param $event 事件对象
* @param $event 事件对象
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
triggerMenu
(
visible
?:
boolean
){
public
triggerMenu
(
visible
?:
boolean
){
if
(
this
.
disabled
){
if
(
this
.
disabled
){
...
@@ -244,26 +252,23 @@ export default class AppPickerSelectView extends Vue {
...
@@ -244,26 +252,23 @@ export default class AppPickerSelectView extends Vue {
*
*
* @param {*} arg
* @param {*} arg
* @returns
* @returns
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
public
handlePublicParams
(
arg
:
any
):
boolean
{
public
handlePublicParams
(
arg
:
any
):
boolean
{
if
(
!
this
.
itemParam
)
{
return
true
;
}
if
(
!
this
.
data
)
{
if
(
!
this
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
appPickerSelectView.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.appPicker
SelectView.formdataException'
)
as
any
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
AppPickerSelectViewSelectView.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.AppPickerSelectView
SelectView.formdataException'
)
as
any
)
});
return
false
;
return
false
;
}
}
// 合并表单参数
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
}
if
(
this
.
itemParam
.
param
)
{
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
return
true
;
return
true
;
...
@@ -274,7 +279,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -274,7 +279,7 @@ export default class AppPickerSelectView extends Vue {
*
*
* @param {*} newVal
* @param {*} newVal
* @param {*} oldVal
* @param {*} oldVal
* @memberof App
FormDRUIPart
* @memberof App
PickerSelectView
*/
*/
@
Watch
(
'data'
,{
deep
:
true
})
@
Watch
(
'data'
,{
deep
:
true
})
onActivedataChange
(
newVal
:
any
,
oldVal
:
any
)
{
onActivedataChange
(
newVal
:
any
,
oldVal
:
any
)
{
...
@@ -294,14 +299,14 @@ export default class AppPickerSelectView extends Vue {
...
@@ -294,14 +299,14 @@ export default class AppPickerSelectView extends Vue {
*
*
* @param {*} newVal
* @param {*} newVal
* @param {*} oldVal
* @param {*} oldVal
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
@
Watch
(
'value'
,
{
deep
:
true
})
@
Watch
(
'value'
,
{
deep
:
true
})
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
this
.
isSingleSelect
){
if
(
this
.
isSingleSelect
){
this
.
queryValue
=
newVal
;
this
.
queryValue
=
newVal
;
if
(
!
this
.
data
||
!
this
.
valueitem
||
!
this
.
data
[
this
.
valueitem
])
{
if
(
!
this
.
data
||
!
this
.
valueitem
||
!
this
.
data
[
this
.
valueitem
])
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
appPickerSelectView.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.appPickerSelectView.editor'
)
as
any
)
+
this
.
name
+
(
this
.
$t
(
'components.appPicker
SelectView.valueitemException'
)
as
any
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.
AppPickerSelectViewSelectView.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.AppPickerSelectViewSelectView.editor'
)
as
any
)
+
this
.
name
+
(
this
.
$t
(
'components.AppPickerSelectView
SelectView.valueitemException'
)
as
any
)
});
}
else
{
}
else
{
let
_viewparam
=
JSON
.
parse
(
this
.
viewparam
);
let
_viewparam
=
JSON
.
parse
(
this
.
viewparam
);
_viewparam
.
selectedData
=
[{
srfkey
:
this
.
data
[
this
.
valueitem
],
srfmajortext
:
this
.
value
}];
_viewparam
.
selectedData
=
[{
srfkey
:
this
.
data
[
this
.
valueitem
],
srfmajortext
:
this
.
value
}];
...
@@ -330,7 +335,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -330,7 +335,7 @@ export default class AppPickerSelectView extends Vue {
/**
/**
* 生命周期
* 生命周期
*
*
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
created
()
{
public
created
()
{
// 公共参数处理
// 公共参数处理
...
@@ -347,7 +352,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -347,7 +352,7 @@ export default class AppPickerSelectView extends Vue {
/**
/**
* vue 生命周期
* vue 生命周期
*
*
* @memberof
SelectType
* @memberof
AppPickerSelectView
*/
*/
public
destroyed
()
{
public
destroyed
()
{
...
@@ -357,7 +362,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -357,7 +362,7 @@ export default class AppPickerSelectView extends Vue {
* 设置值
* 设置值
*
*
* @param {*} item
* @param {*} item
* @memberof App
TreePicker
* @memberof App
PickerSelectView
*/
*/
public
onViewdatasChange
(
$event
:
any
)
{
public
onViewdatasChange
(
$event
:
any
)
{
if
(
$event
.
length
==
0
){
if
(
$event
.
length
==
0
){
...
@@ -409,11 +414,11 @@ export default class AppPickerSelectView extends Vue {
...
@@ -409,11 +414,11 @@ export default class AppPickerSelectView extends Vue {
/**
/**
* 打开链接视图
* 打开链接视图
*
*
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
public
openLinkView
(
$event
:
any
):
void
{
public
openLinkView
(
$event
:
any
):
void
{
if
(
!
this
.
data
||
!
this
.
valueitem
||
!
this
.
data
[
this
.
valueitem
])
{
if
(
!
this
.
data
||
!
this
.
valueitem
||
!
this
.
data
[
this
.
valueitem
])
{
console
.
error
({
title
:
(
this
.
$t
(
'components.
appPickerSelectView.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.appPickerSelectView.editor'
)
as
any
)
+
this
.
name
+
(
this
.
$t
(
'components.appPicker
SelectView.valueitemException'
)
as
any
)
});
console
.
error
({
title
:
(
this
.
$t
(
'components.
AppPickerSelectViewSelectView.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.AppPickerSelectViewSelectView.editor'
)
as
any
)
+
this
.
name
+
(
this
.
$t
(
'components.AppPickerSelectView
SelectView.valueitemException'
)
as
any
)
});
return
;
return
;
}
}
// 公共参数处理
// 公共参数处理
...
@@ -447,7 +452,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -447,7 +452,7 @@ export default class AppPickerSelectView extends Vue {
* @private
* @private
* @param {string} viewpath
* @param {string} viewpath
* @param {*} data
* @param {*} data
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
private
openIndexViewTab
(
view
:
any
,
context
:
any
,
param
:
any
):
void
{
private
openIndexViewTab
(
view
:
any
,
context
:
any
,
param
:
any
):
void
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
context
]
,
param
);
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
this
.
context
,
view
.
deResParameters
,
view
.
parameters
,
[
context
]
,
param
);
...
@@ -461,7 +466,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -461,7 +466,7 @@ export default class AppPickerSelectView extends Vue {
* @param {*} $event
* @param {*} $event
* @param {*} view
* @param {*} view
* @param {*} data
* @param {*} data
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
private
openPopOver
(
$event
:
any
,
view
:
any
,
context
:
any
,
param
:
any
):
void
{
private
openPopOver
(
$event
:
any
,
view
:
any
,
context
:
any
,
param
:
any
):
void
{
let
container
:
Subject
<
any
>
=
this
.
$apppopover
.
openPop
(
$event
,
view
,
context
,
param
);
let
container
:
Subject
<
any
>
=
this
.
$apppopover
.
openPop
(
$event
,
view
,
context
,
param
);
...
@@ -480,7 +485,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -480,7 +485,7 @@ export default class AppPickerSelectView extends Vue {
* @private
* @private
* @param {*} view
* @param {*} view
* @param {*} data
* @param {*} data
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
private
openPopupModal
(
view
:
any
,
context
:
any
,
param
:
any
):
void
{
private
openPopupModal
(
view
:
any
,
context
:
any
,
param
:
any
):
void
{
let
container
:
Subject
<
any
>
=
this
.
$appmodal
.
openModal
(
view
,
context
,
param
);
let
container
:
Subject
<
any
>
=
this
.
$appmodal
.
openModal
(
view
,
context
,
param
);
...
@@ -498,7 +503,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -498,7 +503,7 @@ export default class AppPickerSelectView extends Vue {
* @private
* @private
* @param {*} view
* @param {*} view
* @param {*} data
* @param {*} data
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
private
openDrawer
(
view
:
any
,
context
:
any
,
param
:
any
):
void
{
private
openDrawer
(
view
:
any
,
context
:
any
,
param
:
any
):
void
{
let
container
:
Subject
<
any
>
=
this
.
$appdrawer
.
openDrawer
(
view
,
context
,
param
);
let
container
:
Subject
<
any
>
=
this
.
$appdrawer
.
openDrawer
(
view
,
context
,
param
);
...
@@ -514,7 +519,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -514,7 +519,7 @@ export default class AppPickerSelectView extends Vue {
* 打开页面关闭
* 打开页面关闭
*
*
* @param {*} result
* @param {*} result
* @memberof AppPicker
* @memberof AppPicker
SelectView
*/
*/
public
openViewClose
(
result
:
any
)
{
public
openViewClose
(
result
:
any
)
{
let
item
:
any
=
{};
let
item
:
any
=
{};
...
@@ -536,7 +541,7 @@ export default class AppPickerSelectView extends Vue {
...
@@ -536,7 +541,7 @@ export default class AppPickerSelectView extends Vue {
* 下拉选中回调
* 下拉选中回调
*
*
* @param {*} selects 当前选中的key值集合
* @param {*} selects 当前选中的key值集合
* @memberof App
Mpicker
* @memberof App
PickerSelectView
*/
*/
public
onSelectChange
(
selects
:
any
)
{
public
onSelectChange
(
selects
:
any
)
{
let
val
:
Array
<
any
>
=
[];
let
val
:
Array
<
any
>
=
[];
...
...
src/components/app-radio-group/app-radio-group.vue
浏览文件 @
fc11a999
...
@@ -65,14 +65,14 @@ export default class AppRadioGroup extends Vue {
...
@@ -65,14 +65,14 @@ export default class AppRadioGroup extends Vue {
* 传入表单数据
* 传入表单数据
*
*
* @type {*}
* @type {*}
* @memberof
DropDownList
* @memberof
AppRadioGroup
*/
*/
@
Prop
()
public
data
?:
any
;
@
Prop
()
public
data
?:
any
;
/**
/**
* 监听表单数据变化
* 监听表单数据变化
*
*
* @memberof App
OrgSelect
* @memberof App
RadioGroup
*/
*/
@
Watch
(
'data'
,{
immediate
:
true
,
deep
:
true
})
@
Watch
(
'data'
,{
immediate
:
true
,
deep
:
true
})
onDataChange
(
newVal
:
any
,
oldVal
:
any
)
{
onDataChange
(
newVal
:
any
,
oldVal
:
any
)
{
...
@@ -103,18 +103,26 @@ export default class AppRadioGroup extends Vue {
...
@@ -103,18 +103,26 @@ export default class AppRadioGroup extends Vue {
@
Prop
()
public
disabled
?:
boolean
;
@
Prop
()
public
disabled
?:
boolean
;
/**
/**
*
传入额外
参数
*
局部上下文导航
参数
*
*
* @type {*}
* @type {any}
* @memberof DropDownList
* @memberof AppRadioGroup
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppRadioGroup
*/
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
/**
* 视图上下文
* 视图上下文
*
*
* @type {*}
* @type {*}
* @memberof App
Autocomplete
* @memberof App
RadioGroup
*/
*/
@
Prop
()
public
context
!
:
any
;
@
Prop
()
public
context
!
:
any
;
...
@@ -122,7 +130,7 @@ export default class AppRadioGroup extends Vue {
...
@@ -122,7 +130,7 @@ export default class AppRadioGroup extends Vue {
* 视图参数
* 视图参数
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
RadioGroup
*/
*/
@
Prop
()
public
viewparams
!
:
any
;
@
Prop
()
public
viewparams
!
:
any
;
...
@@ -161,19 +169,19 @@ export default class AppRadioGroup extends Vue {
...
@@ -161,19 +169,19 @@ export default class AppRadioGroup extends Vue {
*
*
* @param {*} arg
* @param {*} arg
* @returns
* @returns
* @memberof
DropDownList
* @memberof
AppRadioGroup
*/
*/
public
handlePublicParams
(
arg
:
any
)
{
public
handlePublicParams
(
arg
:
any
)
{
// 合并表单参数
// 合并表单参数
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
}
}
...
...
src/components/app-span/app-span.vue
浏览文件 @
fc11a999
...
@@ -72,12 +72,20 @@ export default class AppSpan extends Vue {
...
@@ -72,12 +72,20 @@ export default class AppSpan extends Vue {
@
Prop
()
public
data
?:
any
;
@
Prop
()
public
data
?:
any
;
/**
/**
*
传入额外
参数
*
局部上下文导航
参数
*
*
* @type {*}
* @type {any}
* @memberof AppSpan
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppSpan
* @memberof AppSpan
*/
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
/**
* 视图上下文
* 视图上下文
...
...
src/components/app-tree-picker/app-tree-picker.vue
浏览文件 @
fc11a999
...
@@ -36,7 +36,7 @@ export default class AppTreePicker extends Vue {
...
@@ -36,7 +36,7 @@ export default class AppTreePicker extends Vue {
* 视图上下文
* 视图上下文
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
TreePicker
*/
*/
@
Prop
()
public
context
!
:
any
;
@
Prop
()
public
context
!
:
any
;
...
@@ -44,7 +44,7 @@ export default class AppTreePicker extends Vue {
...
@@ -44,7 +44,7 @@ export default class AppTreePicker extends Vue {
* 视图参数
* 视图参数
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
TreePicker
*/
*/
@
Prop
()
public
viewparams
!
:
any
;
@
Prop
()
public
viewparams
!
:
any
;
...
@@ -52,7 +52,7 @@ export default class AppTreePicker extends Vue {
...
@@ -52,7 +52,7 @@ export default class AppTreePicker extends Vue {
* 表单数据
* 表单数据
*
*
* @type {*}
* @type {*}
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
*/
@
Prop
()
public
data
!
:
any
;
@
Prop
()
public
data
!
:
any
;
...
@@ -68,7 +68,7 @@ export default class AppTreePicker extends Vue {
...
@@ -68,7 +68,7 @@ export default class AppTreePicker extends Vue {
* 是否启用
* 是否启用
*
*
* @type {boolean}
* @type {boolean}
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
*/
@
Prop
({
default
:
false
})
public
disabled
!
:
boolean
;
@
Prop
({
default
:
false
})
public
disabled
!
:
boolean
;
...
@@ -101,7 +101,7 @@ export default class AppTreePicker extends Vue {
...
@@ -101,7 +101,7 @@ export default class AppTreePicker extends Vue {
* 值项名称
* 值项名称
*
*
* @type {string}
* @type {string}
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
*/
@
Prop
()
public
valueItem
?:
string
;
@
Prop
()
public
valueItem
?:
string
;
...
@@ -109,7 +109,7 @@ export default class AppTreePicker extends Vue {
...
@@ -109,7 +109,7 @@ export default class AppTreePicker extends Vue {
* 关联视图名称
* 关联视图名称
*
*
* @type {string}
* @type {string}
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
*/
@
Prop
()
public
refviewname
?:
string
;
@
Prop
()
public
refviewname
?:
string
;
...
@@ -125,17 +125,25 @@ export default class AppTreePicker extends Vue {
...
@@ -125,17 +125,25 @@ export default class AppTreePicker extends Vue {
* 属性项名称
* 属性项名称
*
*
* @type {string}
* @type {string}
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
*/
@
Prop
()
public
name
!
:
string
;
@
Prop
()
public
name
!
:
string
;
/**
/**
*
关联视图
参数
*
局部上下文导航
参数
*
*
* @type {*}
* @type {any}
* @memberof AppTreePicker
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppTreePicker
* @memberof AppTreePicker
*/
*/
@
Prop
()
public
itemParam
:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
/**
* 是否忽略之变化
* 是否忽略之变化
...
@@ -210,8 +218,8 @@ export default class AppTreePicker extends Vue {
...
@@ -210,8 +218,8 @@ export default class AppTreePicker extends Vue {
*
*
* @memberof AppTreePicker
* @memberof AppTreePicker
*/
*/
public
setViewParam
(
activeData
:
any
)
{
public
setViewParam
()
{
if
(
!
this
.
itemParam
||
!
activeD
ata
)
{
if
(
!
this
.
d
ata
)
{
return
;
return
;
}
}
let
arg
:
any
=
{};
let
arg
:
any
=
{};
...
@@ -219,17 +227,13 @@ export default class AppTreePicker extends Vue {
...
@@ -219,17 +227,13 @@ export default class AppTreePicker extends Vue {
let
param
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
let
param
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
let
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
let
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
// 附加参数处理
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
formatData
(
activeData
,
context
,
this
.
itemParam
.
context
);
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localContext
);
Object
.
assign
(
context
,
_context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
if
(
this
.
itemParam
.
param
)
{
let
_param
=
this
.
$util
.
formatData
(
activeData
,
param
,
this
.
itemParam
.
param
);
Object
.
assign
(
param
,
_param
);
}
}
if
(
this
.
itemParam
.
parentdata
)
{
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_par
entdata
=
this
.
$util
.
formatData
(
activeData
,
param
,
this
.
itemParam
.
parentdata
);
let
_par
am
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localParam
);
Object
.
assign
(
param
,
_parentdata
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
this
.
viewdata
=
JSON
.
stringify
(
context
);
this
.
viewdata
=
JSON
.
stringify
(
context
);
this
.
viewparam
=
JSON
.
stringify
(
param
);
this
.
viewparam
=
JSON
.
stringify
(
param
);
...
@@ -240,13 +244,13 @@ export default class AppTreePicker extends Vue {
...
@@ -240,13 +244,13 @@ export default class AppTreePicker extends Vue {
*
*
* @param {*} newVal
* @param {*} newVal
* @param {*} oldVal
* @param {*} oldVal
* @memberof App
FormDRUIPart
* @memberof App
TreePicker
*/
*/
@
Watch
(
'data'
)
@
Watch
(
'data'
)
onActivedataChange
(
newVal
:
any
,
oldVal
:
any
)
{
onActivedataChange
(
newVal
:
any
,
oldVal
:
any
)
{
const
newFormData
:
any
=
JSON
.
parse
(
newVal
);
const
newFormData
:
any
=
JSON
.
parse
(
newVal
);
const
oldDormData
:
any
=
JSON
.
parse
(
oldVal
);
const
oldDormData
:
any
=
JSON
.
parse
(
oldVal
);
this
.
setViewParam
(
newFormData
);
this
.
setViewParam
();
if
(
!
this
.
refreshitems
||
this
.
ignorefieldvaluechange
)
{
if
(
!
this
.
refreshitems
||
this
.
ignorefieldvaluechange
)
{
return
;
return
;
}
}
...
@@ -261,7 +265,7 @@ export default class AppTreePicker extends Vue {
...
@@ -261,7 +265,7 @@ export default class AppTreePicker extends Vue {
*
*
* @param {*} newVal
* @param {*} newVal
* @param {*} oldVal
* @param {*} oldVal
* @memberof AppPicker
* @memberof App
Tree
Picker
*/
*/
@
Watch
(
'value'
)
@
Watch
(
'value'
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
...
@@ -277,7 +281,7 @@ export default class AppTreePicker extends Vue {
...
@@ -277,7 +281,7 @@ export default class AppTreePicker extends Vue {
if
(
this
.
formState
)
{
if
(
this
.
formState
)
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
Object
.
is
(
'load'
,
action
))
{
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
setViewParam
(
JSON
.
parse
(
this
.
data
)
);
this
.
setViewParam
();
}
}
});
});
}
}
...
@@ -286,7 +290,7 @@ export default class AppTreePicker extends Vue {
...
@@ -286,7 +290,7 @@ export default class AppTreePicker extends Vue {
/**
/**
* vue 生命周期
* vue 生命周期
*
*
* @memberof
SelectType
* @memberof
AppTreePicker
*/
*/
public
destroyed
()
{
public
destroyed
()
{
if
(
this
.
formStateEvent
)
{
if
(
this
.
formStateEvent
)
{
...
...
src/components/codelist/codelist.vue
浏览文件 @
fc11a999
...
@@ -79,12 +79,20 @@ export default class CodeList extends Vue {
...
@@ -79,12 +79,20 @@ export default class CodeList extends Vue {
@
Prop
()
public
data
?:
any
;
@
Prop
()
public
data
?:
any
;
/**
/**
*
传入额外
参数
*
局部上下文导航
参数
*
*
* @type {*}
* @type {any}
* @memberof CodeList
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof CodeList
* @memberof CodeList
*/
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
/**
* 视图上下文
* 视图上下文
...
@@ -270,12 +278,12 @@ export default class CodeList extends Vue {
...
@@ -270,12 +278,12 @@ export default class CodeList extends Vue {
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
// 附加参数处理
if
(
this
.
itemParam
&&
this
.
itemParam
.
context
)
{
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
}
if
(
this
.
itemParam
&&
this
.
itemParam
.
param
)
{
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
}
}
...
...
src/components/dropdown-list-mpicker/dropdown-list-mpicker.vue
浏览文件 @
fc11a999
...
@@ -85,12 +85,20 @@ export default class DropDownListMpicker extends Vue {
...
@@ -85,12 +85,20 @@ export default class DropDownListMpicker extends Vue {
@
Prop
()
public
placeholder
?:
string
;
@
Prop
()
public
placeholder
?:
string
;
/**
/**
*
传入额外
参数
*
局部上下文导航
参数
*
*
* @type {*}
* @type {any}
* @memberof DropDownListMpicker
*/
@
Prop
()
public
localContext
!
:
any
;
/**
* 局部导航参数
*
* @type {any}
* @memberof DropDownListMpicker
* @memberof DropDownListMpicker
*/
*/
@
Prop
()
public
itemParam
?:
any
;
@
Prop
()
public
localParam
!
:
any
;
/**
/**
* 视图上下文
* 视图上下文
...
@@ -157,12 +165,12 @@ export default class DropDownListMpicker extends Vue {
...
@@ -157,12 +165,12 @@ export default class DropDownListMpicker extends Vue {
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
param
=
this
.
viewparams
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
arg
.
context
=
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
))
:
{};
// 附加参数处理
// 附加参数处理
if
(
this
.
itemParam
.
context
)
{
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
)
{
let
_context
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
context
,
this
.
itemParam
.
c
ontext
);
let
_context
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
context
,
arg
.
param
,
this
.
localC
ontext
);
Object
.
assign
(
arg
.
context
,
_context
);
Object
.
assign
(
arg
.
context
,
_context
);
}
}
if
(
this
.
itemParam
.
param
)
{
if
(
this
.
localParam
&&
Object
.
keys
(
this
.
localParam
).
length
>
0
)
{
let
_param
=
this
.
$util
.
formatData
(
this
.
data
,
arg
.
param
,
this
.
itemParam
.
p
aram
);
let
_param
=
this
.
$util
.
computedNavData
(
this
.
data
,
arg
.
param
,
arg
.
param
,
this
.
localP
aram
);
Object
.
assign
(
arg
.
param
,
_param
);
Object
.
assign
(
arg
.
param
,
_param
);
}
}
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录