Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
7a414eca
提交
7a414eca
编写于
10月 31, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tony001 发布系统代码 [后台服务,演示应用]
上级
750f2cae
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
6 行增加
和
327 行删除
+6
-327
ibizsample0003-mpickup-view-base.vue
...ple0003-mpickup-view/ibizsample0003-mpickup-view-base.vue
+1
-54
ibizsample0003-smpickup-view2-base.vue
...003-smpickup-view2/ibizsample0003-smpickup-view2-base.vue
+2
-194
ibizsample0003-spickup-view2-base.vue
...e0003-spickup-view2/ibizsample0003-spickup-view2-base.vue
+3
-79
未找到文件。
app_Web/src/pages/sample/ibizsample0003-mpickup-view/ibizsample0003-mpickup-view-base.vue
浏览文件 @
7a414eca
...
...
@@ -7,60 +7,7 @@
<div
class=
"content-container pickup-view"
>
<div
class=
'view-body-messages'
>
</div>
<div
class=
"translate-contant"
>
<div
class=
"center"
:style=
"
{width : !isShowButton ? '100%' : ''}">
<view
_pickupviewpanel
:viewState=
"viewState"
:viewparams=
"JSON.parse(JSON.stringify(viewparams))"
:context=
"JSON.parse(JSON.stringify(context))"
:isSingleSelect=
"isSingleSelect"
:selectedData=
"selectedData"
:isShowButton=
"isShowButton"
name=
"pickupviewpanel"
ref=
'pickupviewpanel'
@
selectionchange=
"pickupviewpanel_selectionchange($event)"
@
activated=
"pickupviewpanel_activated($event)"
@
load=
"pickupviewpanel_load($event)"
@
closeview=
"closeView($event)"
>
</view
_pickupviewpanel
>
</div>
<div
v-if=
"isShowButton"
class=
"translate-buttons"
>
<div
class=
"buttons"
>
<i-button
type=
"primary"
:title=
"this.containerModel.view_rightbtn.text"
:disabled=
"this.containerModel.view_rightbtn.disabled"
@
click=
"onCLickRight"
>
<i
class=
"el-icon-arrow-right"
></i>
</i-button>
<i-button
type=
"primary"
:title=
"this.containerModel.view_leftbtn.text"
:disabled=
"this.containerModel.view_leftbtn.disabled"
@
click=
"onCLickLeft"
>
<i
class=
"el-icon-arrow-left"
></i>
</i-button>
<i-button
type=
"primary"
:title=
"this.containerModel.view_allrightbtn.text"
@
click=
"onCLickAllRight"
>
<i
class=
"el-icon-d-arrow-right"
></i>
</i-button>
<i-button
type=
"primary"
:title=
"this.containerModel.view_allleftbtn.text"
@
click=
"onCLickAllLeft"
>
<i
class=
"el-icon-d-arrow-left"
></i>
</i-button>
</div>
</div>
<div
v-if=
"isShowButton"
class=
"right"
>
<div
class=
"mpicker-select"
>
<div
v-for=
"(item, index) in viewSelections"
:key=
"index"
:class=
"item._select ? 'select' : ''"
@
click=
"selectionsClick(item)"
@
dblclick=
"selectionsDBLClick(item)"
>
<span>
{{
item
.
srfmajortext
}}
</span>
</div>
</div>
</div>
</div>
<card
v-if=
"isShowButton"
:dis-hover=
"true"
:bordered=
"false"
class=
"footer"
>
<row
:style=
"
{ textAlign: 'right' }">
<i-button
type=
"primary"
:disabled=
"this.viewSelections.length > 0 ? false : true"
@
click=
"onClickOk"
>
{{
this
.
containerModel
.
view_okbtn
.
text
}}
</i-button>
<i-button
@
click=
"onClickCancel"
>
{{
this
.
containerModel
.
view_cancelbtn
.
text
}}
</i-button>
</row>
</card>
</div>
<div
class=
'view-bottom-messages'
>
</div>
...
...
app_Web/src/pages/sample/ibizsample0003-smpickup-view2/ibizsample0003-smpickup-view2-base.vue
浏览文件 @
7a414eca
...
...
@@ -65,7 +65,6 @@
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Inject
}
from
'vue-property-decorator'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
...
...
@@ -200,11 +199,7 @@ export default class IBIZSample0003SMPickupView2Base extends Vue {
if
(
typeof
this
.
viewparams
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
if
(
this
.
viewparams
.
selectedData
){
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewparams
.
selectedData
);
this
.
viewSelections
=
this
.
viewparams
.
selectedData
;
}
}
}
...
...
@@ -273,7 +268,6 @@ export default class IBIZSample0003SMPickupView2Base extends Vue {
/**
* 引擎初始化
*
...
...
@@ -572,11 +566,7 @@ export default class IBIZSample0003SMPickupView2Base extends Vue {
if
(
_this
.
loadModel
&&
_this
.
loadModel
instanceof
Function
)
{
_this
.
loadModel
();
}
if
(
this
.
viewparams
.
selectedData
){
this
.
engine
.
onCtrlEvent
(
'pickupviewpanel'
,
'selectionchange'
,
this
.
viewparams
.
selectedData
);
this
.
onCLickRight
();
}
}
...
...
@@ -641,188 +631,6 @@ export default class IBIZSample0003SMPickupView2Base extends Vue {
this
.
portletStateEvent
.
unsubscribe
();
}
}
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof IBIZSample0003SMPickupView2Base
*/
@
Prop
({
default
:
true
})
public
isShowButton
!
:
boolean
;
/**
* 选中数据的字符串
*
* @type {string}
* @memberof IBIZSample0003SMPickupView2Base
*/
public
selectedData
:
string
=
""
;
/**
* 是否初始化已选中项
*
* @type {any[]}
* @memberof IBIZSample0003SMPickupView2Base
*/
public
isInitSelected
:
boolean
=
false
;
/**
* 视图选中数据
*
* @type {any[]}
* @memberof IBIZSample0003SMPickupView2Base
*/
public
viewSelections
:
any
[]
=
[];
/**
* 是否单选
*
* @type {boolean}
* @memberof IBIZSample0003SMPickupView2Base
*/
public
isSingleSelect
:
boolean
=
false
;
/**
* 选中数据单击
*
* @param {*} item
* @memberof IBIZSample0003SMPickupView2Base
*/
public
selectionsClick
(
item
:
any
):
void
{
item
.
_select
=
!
item
.
_select
;
const
removeSelect
:
boolean
=
this
.
viewSelections
.
some
((
selection
:
any
)
=>
selection
.
_select
);
this
.
containerModel
.
view_leftbtn
.
disabled
=
!
removeSelect
;
}
/**
* 选中树双击
*
* @param {*} item
* @memberof IBIZSample0003SMPickupView2Base
*/
public
selectionsDBLClick
(
item
:
any
):
void
{
const
index
:
number
=
this
.
viewSelections
.
findIndex
((
selection
:
any
)
=>
Object
.
is
(
selection
.
srfkey
,
item
.
srfkey
));
if
(
index
!==
-
1
)
{
this
.
viewSelections
.
splice
(
index
,
1
);
}
const
removeSelect
:
boolean
=
this
.
viewSelections
.
some
((
selection
:
any
)
=>
selection
.
_select
);
this
.
containerModel
.
view_leftbtn
.
disabled
=
!
removeSelect
;
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 删除右侧全部选中数据
*
* @memberof IBIZSample0003SMPickupView2Base
*/
public
onCLickLeft
():
void
{
const
_selectiions
=
[...
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewSelections
))];
_selectiions
.
forEach
((
item
:
any
)
=>
{
if
(
!
item
.
_select
)
{
return
;
}
const
index
=
this
.
viewSelections
.
findIndex
((
selection
:
any
)
=>
Object
.
is
(
item
.
srfkey
,
selection
.
srfkey
));
if
(
index
!==
-
1
)
{
this
.
viewSelections
.
splice
(
index
,
1
);
}
});
const
removeSelect
:
boolean
=
this
.
viewSelections
.
some
((
selection
:
any
)
=>
selection
.
_select
);
this
.
containerModel
.
view_leftbtn
.
disabled
=
!
removeSelect
;
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 添加左侧选中数据
*
* @memberof IBIZSample0003SMPickupView2Base
*/
public
onCLickRight
():
void
{
Object
.
values
(
this
.
containerModel
).
forEach
((
model
:
any
)
=>
{
if
(
!
Object
.
is
(
model
.
type
,
'PICKUPVIEWPANEL'
))
{
return
;
}
let
newSelections
:
any
[]
=
[];
model
.
selections
.
forEach
((
item
:
any
)
=>
{
const
index
:
number
=
this
.
viewSelections
.
findIndex
((
selection
:
any
)
=>
Object
.
is
(
item
.
srfkey
,
selection
.
srfkey
));
if
(
index
===
-
1
)
{
let
_item
:
any
=
{
...
JSON
.
parse
(
JSON
.
stringify
(
item
))
};
Object
.
assign
(
_item
,
{
_select
:
false
})
newSelections
.
push
(
_item
);
}
else
{
newSelections
.
push
(
this
.
viewSelections
[
index
]);
}
});
this
.
viewSelections
=
this
.
removeDuplicates
([...
newSelections
,...
this
.
viewSelections
]);
});
}
/**
* 去重
*
* @memberof IBIZSample0003SMPickupView2Base
*/
public
removeDuplicates
(
data
:
any
):
Array
<
any
>
{
const
uniqueSet
=
new
Set
(
data
);
return
[...
uniqueSet
];
}
/**
* 选中数据全部删除
*
* @memberof IBIZSample0003SMPickupView2Base
*/
public
onCLickAllLeft
():
void
{
this
.
viewSelections
=
[];
this
.
containerModel
.
view_leftbtn
.
disabled
=
true
;
this
.
engine
.
onCtrlEvent
(
'pickupviewpanel'
,
'selectionchange'
,
[]);
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 添加左侧面板所有数据到右侧
*
* @memberof IBIZSample0003SMPickupView2Base
*/
public
onCLickAllRight
():
void
{
Object
.
values
(
this
.
containerModel
).
forEach
((
model
:
any
)
=>
{
if
(
!
Object
.
is
(
model
.
type
,
'PICKUPVIEWPANEL'
))
{
return
;
}
if
(
model
.
datas
.
length
>
0
){
model
.
datas
.
forEach
((
data
:
any
,
index
:
any
)
=>
{
Object
.
assign
(
data
,{
srfmajortext
:
data
[
'ibizsample0003name'
]});
})
}
model
.
datas
.
forEach
((
item
:
any
)
=>
{
const
index
:
number
=
this
.
viewSelections
.
findIndex
((
selection
:
any
)
=>
Object
.
is
(
item
.
srfkey
,
selection
.
srfkey
));
if
(
index
===
-
1
)
{
let
_item
:
any
=
{
...
JSON
.
parse
(
JSON
.
stringify
(
item
))
};
Object
.
assign
(
_item
,
{
_select
:
false
})
this
.
viewSelections
.
push
(
_item
);
}
});
});
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 确定
*
* @memberof IBIZSample0003SMPickupView2Base
*/
public
onClickOk
():
void
{
this
.
$emit
(
'viewdataschange'
,
this
.
viewSelections
);
this
.
$emit
(
'close'
,
null
);
}
/**
* 取消
*
* @memberof IBIZSample0003SMPickupView2Base
*/
public
onClickCancel
():
void
{
this
.
$emit
(
'viewdataschange'
,
null
);
this
.
$emit
(
'close'
,
null
);
}
}
</
script
>
...
...
app_Web/src/pages/sample/ibizsample0003-spickup-view2/ibizsample0003-spickup-view2-base.vue
浏览文件 @
7a414eca
...
...
@@ -7,24 +7,7 @@
<div
class=
"content-container pickup-view"
>
<div
class=
'view-body-messages'
>
</div>
<view
_pickupviewpanel
:viewState=
"viewState"
:viewparams=
"JSON.parse(JSON.stringify(viewparams))"
:context=
"JSON.parse(JSON.stringify(context))"
:isSingleSelect=
"isSingleSelect"
:selectedData=
"selectedData"
:isShowButton=
"isShowButton"
name=
"pickupviewpanel"
ref=
'pickupviewpanel'
@
closeview=
"closeView($event)"
>
</view
_pickupviewpanel
>
<card
v-if=
"isShowButton"
:dis-hover=
"true"
:bordered=
"false"
class=
"footer"
>
<row
:style=
"
{ textAlign: 'right' }">
<i-button
type=
"primary"
:disabled=
"this.viewSelections.length > 0 ? false : true"
@
click=
"onClickOk"
>
{{
this
.
containerModel
.
view_okbtn
.
text
}}
</i-button>
<i-button
@
click=
"onClickCancel"
>
{{
this
.
containerModel
.
view_cancelbtn
.
text
}}
</i-button>
</row>
</card>
</div>
<div
class=
'view-bottom-messages'
>
</div>
...
...
@@ -32,7 +15,6 @@
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Inject
}
from
'vue-property-decorator'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
...
...
@@ -167,10 +149,7 @@ export default class IBIZSample0003SPickupView2Base extends Vue {
if
(
typeof
this
.
viewparams
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
if
(
this
.
viewparams
.
selectedData
){
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewparams
.
selectedData
);
}
}
}
...
...
@@ -239,7 +218,6 @@ export default class IBIZSample0003SPickupView2Base extends Vue {
/**
* 引擎初始化
*
...
...
@@ -538,10 +516,7 @@ export default class IBIZSample0003SPickupView2Base extends Vue {
if
(
_this
.
loadModel
&&
_this
.
loadModel
instanceof
Function
)
{
_this
.
loadModel
();
}
if
(
this
.
viewparams
.
selectedData
){
this
.
engine
.
onCtrlEvent
(
'pickupviewpanel'
,
'selectionchange'
,
this
.
viewparams
.
selectedData
);
}
}
...
...
@@ -606,57 +581,6 @@ export default class IBIZSample0003SPickupView2Base extends Vue {
this
.
portletStateEvent
.
unsubscribe
();
}
}
/**
* 选中数据的字符串
*
* @type {string}
* @memberof IBIZSample0003SPickupView2Base
*/
public
selectedData
:
string
=
""
;
/**
* 视图选中数据
*
* @type {any[]}
* @memberof IBIZSample0003SPickupView2Base
*/
public
viewSelections
:
any
[]
=
[];
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof IBIZSample0003SPickupView2Base
*/
@
Prop
({
default
:
true
})
public
isShowButton
!
:
boolean
;
/**
* 是否单选
*
* @type {boolean}
* @memberof IBIZSample0003SPickupView2Base
*/
public
isSingleSelect
:
boolean
=
true
;
/**
* 确定
*
* @memberof IBIZSample0003SPickupView2Base
*/
public
onClickOk
():
void
{
this
.
$emit
(
'viewdataschange'
,
this
.
viewSelections
);
this
.
$emit
(
'close'
,
null
);
}
/**
* 取消
*
* @memberof IBIZSample0003SPickupView2Base
*/
public
onClickCancel
():
void
{
this
.
$emit
(
'viewdataschange'
,
null
);
this
.
$emit
(
'close'
,
null
);
}
}
</
script
>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录