Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
e6a44e4c
提交
e6a44e4c
编写于
9月 24, 2020
作者:
llz
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev' into dev
上级
3e1a5719
d224ebec
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
60 行增加
和
12 行删除
+60
-12
app-picker.vue
src/components/app-picker/app-picker.vue
+47
-8
md-view-engine.ts
src/engine/view/md-view-engine.ts
+2
-2
getters.ts
src/store/getters.ts
+11
-2
未找到文件。
src/components/app-picker/app-picker.vue
浏览文件 @
e6a44e4c
...
@@ -65,7 +65,7 @@ export default class AppPicker extends Vue {
...
@@ -65,7 +65,7 @@ export default class AppPicker extends Vue {
* 视图上下文
* 视图上下文
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Picker
*/
*/
@
Prop
()
public
context
!
:
any
;
@
Prop
()
public
context
!
:
any
;
...
@@ -73,7 +73,7 @@ export default class AppPicker extends Vue {
...
@@ -73,7 +73,7 @@ export default class AppPicker extends Vue {
* 视图参数
* 视图参数
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Picker
*/
*/
@
Prop
()
public
viewparams
!
:
any
;
@
Prop
()
public
viewparams
!
:
any
;
...
@@ -81,15 +81,23 @@ export default class AppPicker extends Vue {
...
@@ -81,15 +81,23 @@ export default class AppPicker extends Vue {
* AC参数
* AC参数
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Picker
*/
*/
@
Prop
({
default
:
()
=>
{}})
public
acParams
?:
any
;
@
Prop
({
default
:
()
=>
{}})
public
acParams
?:
any
;
/**
* 外键值附加数据
*
* @type {*}
* @memberof AppPicker
*/
@
Prop
()
public
pickUpData
?:
string
;
/**
/**
* 表单服务
* 表单服务
*
*
* @type {*}
* @type {*}
* @memberof App
FormDRUIPart
* @memberof App
Picker
*/
*/
@
Prop
()
public
service
?:
any
;
@
Prop
()
public
service
?:
any
;
...
@@ -97,7 +105,7 @@ export default class AppPicker extends Vue {
...
@@ -97,7 +105,7 @@ export default class AppPicker extends Vue {
* 应用实体主信息属性名称
* 应用实体主信息属性名称
*
*
* @type {string}
* @type {string}
* @memberof App
Autocomplete
* @memberof App
Picker
*/
*/
@
Prop
({
default
:
'srfmajortext'
})
public
deMajorField
!
:
string
;
@
Prop
({
default
:
'srfmajortext'
})
public
deMajorField
!
:
string
;
...
@@ -105,7 +113,7 @@ export default class AppPicker extends Vue {
...
@@ -105,7 +113,7 @@ export default class AppPicker extends Vue {
* 应用实体主键属性名称
* 应用实体主键属性名称
*
*
* @type {string}
* @type {string}
* @memberof App
Autocomplete
* @memberof App
Picker
*/
*/
@
Prop
({
default
:
'srfkey'
})
public
deKeyField
!
:
string
;
@
Prop
({
default
:
'srfkey'
})
public
deKeyField
!
:
string
;
...
@@ -240,7 +248,7 @@ export default class AppPicker extends Vue {
...
@@ -240,7 +248,7 @@ export default class AppPicker extends Vue {
* 输入状态
* 输入状态
*
*
* @type {boolean}
* @type {boolean}
* @memberof App
Autocomplete
* @memberof App
Picker
*/
*/
public
inputState
:
boolean
=
false
;
public
inputState
:
boolean
=
false
;
...
@@ -397,6 +405,7 @@ export default class AppPicker extends Vue {
...
@@ -397,6 +405,7 @@ export default class AppPicker extends Vue {
if
(
this
.
name
)
{
if
(
this
.
name
)
{
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
item
[
this
.
deMajorField
]
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
item
[
this
.
deMajorField
]
});
}
}
this
.
fillPickUpData
(
item
);
}
}
/**
/**
...
@@ -430,6 +439,7 @@ export default class AppPicker extends Vue {
...
@@ -430,6 +439,7 @@ export default class AppPicker extends Vue {
if
(
this
.
name
)
{
if
(
this
.
name
)
{
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
''
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
''
});
}
}
this
.
fillPickUpData
();
this
.
$forceUpdate
();
this
.
$forceUpdate
();
}
}
...
@@ -672,6 +682,7 @@ export default class AppPicker extends Vue {
...
@@ -672,6 +682,7 @@ export default class AppPicker extends Vue {
if
(
this
.
name
)
{
if
(
this
.
name
)
{
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
item
[
this
.
deMajorField
]?
item
[
this
.
deMajorField
]:
item
[
"srfmajortext"
]
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
item
[
this
.
deMajorField
]?
item
[
this
.
deMajorField
]:
item
[
"srfmajortext"
]
});
}
}
this
.
fillPickUpData
(
item
);
}
}
}
}
...
@@ -752,7 +763,7 @@ export default class AppPicker extends Vue {
...
@@ -752,7 +763,7 @@ export default class AppPicker extends Vue {
/**
/**
* 输入过程中
* 输入过程中
*
*
* @memberof App
Autocomplete
* @memberof App
Picker
*/
*/
public
onInput
(
$event
:
any
)
{
public
onInput
(
$event
:
any
)
{
if
(
Object
.
is
(
$event
,
this
.
value
))
{
if
(
Object
.
is
(
$event
,
this
.
value
))
{
...
@@ -784,6 +795,34 @@ export default class AppPicker extends Vue {
...
@@ -784,6 +795,34 @@ export default class AppPicker extends Vue {
}
}
}
}
/**
* 填充外键值附加数据
*
* @param {item} 数据集
* @memberof AppPicker
*/
public
fillPickUpData
(
item
?:
any
){
if
(
this
.
pickUpData
){
let
pickUpDataArray
:
Array
<
any
>
=
this
.
pickUpData
.
split
(
";"
)
if
(
pickUpDataArray
&&
pickUpDataArray
.
length
>
0
){
for
(
let
i
=
0
;
i
<
pickUpDataArray
.
length
;
i
++
){
if
(
item
){
this
.
$emit
(
"formitemvaluechange"
,
{
name
:
pickUpDataArray
[
i
],
value
:
item
[
pickUpDataArray
[
i
]],
});
}
else
{
this
.
$emit
(
"formitemvaluechange"
,
{
name
:
pickUpDataArray
[
i
],
value
:
""
,
});
}
}
}
}
}
}
}
</
script
>
</
script
>
...
...
src/engine/view/md-view-engine.ts
浏览文件 @
e6a44e4c
...
@@ -401,10 +401,10 @@ export default class MDViewEngine extends ViewEngine {
...
@@ -401,10 +401,10 @@ export default class MDViewEngine extends ViewEngine {
if
(
this
.
view
.
viewparams
&&
Object
.
keys
(
this
.
view
.
viewparams
).
length
>
0
)
{
if
(
this
.
view
.
viewparams
&&
Object
.
keys
(
this
.
view
.
viewparams
).
length
>
0
)
{
Object
.
assign
(
arg
,
this
.
view
.
viewparams
);
Object
.
assign
(
arg
,
this
.
view
.
viewparams
);
}
}
if
(
this
.
getSearchForm
()
&&
this
.
view
.
isExpandSearchForm
)
{
if
(
this
.
getSearchForm
())
{
Object
.
assign
(
arg
,
this
.
getSearchForm
().
getData
());
Object
.
assign
(
arg
,
this
.
getSearchForm
().
getData
());
}
}
if
(
this
.
view
&&
this
.
view
.
$refs
.
searchbar
&&
this
.
view
.
isExpandSearchForm
)
{
if
(
this
.
view
&&
this
.
view
.
$refs
.
searchbar
)
{
Object
.
assign
(
arg
,
this
.
view
.
$refs
.
searchbar
.
getData
());
Object
.
assign
(
arg
,
this
.
view
.
$refs
.
searchbar
.
getData
());
}
}
if
(
this
.
view
&&
!
this
.
view
.
isExpandSearchForm
)
{
if
(
this
.
view
&&
!
this
.
view
.
isExpandSearchForm
)
{
...
...
src/store/getters.ts
浏览文件 @
e6a44e4c
...
@@ -47,12 +47,21 @@ export const getLocalData = (state: any) => () => {
...
@@ -47,12 +47,21 @@ export const getLocalData = (state: any) => () => {
* @param state
* @param state
*/
*/
export
const
getAppData
=
(
state
:
any
)
=>
()
=>
{
export
const
getAppData
=
(
state
:
any
)
=>
()
=>
{
if
(
!
state
.
appdata
){
state
.
appdata
=
{};
}
let
result
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
state
.
appdata
));
let
result
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
state
.
appdata
));
if
(
state
.
localdata
&&
Object
.
keys
(
state
.
localdata
).
length
>
0
){
let
copyContext
:
any
=
result
.
context
?
result
.
context
:{};
let
copyContext
:
any
=
result
.
context
?
result
.
context
:{};
if
(
state
.
localdata
&&
Object
.
keys
(
state
.
localdata
).
length
>
0
){
Object
.
assign
(
copyContext
,
state
.
localdata
);
Object
.
assign
(
copyContext
,
state
.
localdata
);
result
.
context
=
copyContext
;
}
else
if
(
localStorage
.
getItem
(
'localdata'
)){
try
{
Object
.
assign
(
copyContext
,
JSON
.
parse
(
localStorage
.
getItem
(
'localdata'
)
as
string
));
}
catch
(
error
){
console
.
warn
(
error
);
}
}
}
result
.
context
=
copyContext
;
return
result
;
return
result
;
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录