Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
4fc1f538
提交
4fc1f538
编写于
4年前
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ShineKOT 发布系统代码 [后台服务,演示应用]
上级
0c0358d2
变更
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
23 行增加
和
104 行删除
+23
-104
usr-dataview-base.vue
...b/src/widgets/ibizbook/usr-dataview/usr-dataview-base.vue
+23
-104
未找到文件。
app_Web/src/widgets/ibizbook/usr-dataview/usr-dataview-base.vue
浏览文件 @
4fc1f538
...
...
@@ -33,13 +33,7 @@
</row>
</div>
<row
class=
"data-view-container"
v-if=
"items.length > 0"
:gutter=
"20"
type=
"flex"
justify=
"start"
style=
"margin:0px;"
>
<el-collapse>
<el-collapse-item
v-for=
"(group,index) in groupData"
:key=
"index"
>
<template
slot=
"title"
>
<div
style=
"margin: 0 0 0 12px;"
><b>
{{
group
.
group
}}
</b></div>
</
template
>
<div
v-if=
"group.children.length > 0"
>
<a
v-for=
"(item,i) in group.children"
:key=
"i"
:href=
"item.starturl"
>
<a
v-for=
"(item,index) in items"
:key=
"index"
:href =
"item.starturl"
>
<i-col
style=
"min-height: 170px;margin-bottom: 10px;"
>
<el-card
shadow=
"always"
:class=
"[ item.isselected === true ? 'isselected' : false, 'single-card-data' ]"
@
click
.
native=
"handleClick(item)"
@
dblclick
.
native=
"handleDblClick(item)"
>
<div
class=
"data-view-item"
>
...
...
@@ -62,12 +56,6 @@
</el-card>
</i-col>
</a>
</div>
<div
v-else
style=
"text-align: center;"
>
{{ $t('entities.ibizbook.usr_dataview.nodata') }}
</div>
</el-collapse-item>
</el-collapse>
</row>
<div
v-else
class=
"app-data-empty"
>
{{ $t('entities.ibizbook.usr_dataview.nodata') }}
...
...
@@ -519,75 +507,8 @@ export default class UsrBase extends Vue implements ControlInterface {
*/
public
thisRef
:
any
=
this
;
/**
* 分组属性
*
* @type {string}
* @memberof UsrBase
*/
public
groupField
:
string
=
"type"
;
/**
* 分组数据
*
* @type {Array<any>}
* @memberof UsrBase
*/
public
groupData
:
Array
<
any
>
=
[];
/**
* 分组模式
*
* @type {string}
* @memberof UsrBase
*/
public
groupMode
:
string
=
"AUTO"
;
/**
* 分组方法
*
* @memberof UsrBase
*/
public
group
(){
let
_this
:
any
=
this
;
if
(
_this
.
drawGroup
&&
_this
.
drawGroup
instanceof
Function
&&
Object
.
is
(
_this
.
groupMode
,
"AUTO"
)){
_this
.
drawGroup
();
}
else
if
(
_this
.
drawCodelistGroup
&&
_this
.
drawCodelistGroup
instanceof
Function
&&
Object
.
is
(
_this
.
groupMode
,
"CODELIST"
)){
_this
.
drawCodelistGroup
();
}
}
/**
* 绘制分组列表
*
* @memberof UsrBase
*/
public
drawGroup
(){
let
data
:
Array
<
any
>
=
[...
this
.
items
];
let
groups
:
Array
<
any
>
=
[];
data
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
hasOwnProperty
(
this
.
groupField
)){
groups
.
push
(
item
[
this
.
groupField
]);
}
});
groups
=
[...
new
Set
(
groups
)];
let
groupTree
:
Array
<
any
>
=
[];
groups
.
forEach
((
group
:
any
,
i
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
data
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
Object
.
is
(
group
,
item
[
this
.
groupField
])){
children
.
push
(
item
);
}
});
const
tree
:
any
=
{
group
:
group
,
children
:
children
}
groupTree
.
push
(
tree
);
});
this
.
groupData
=
[...
groupTree
];
}
/**
* 是否单选
*
...
...
@@ -949,7 +870,6 @@ export default class UsrBase extends Vue implements ControlInterface {
this
.
handleClick
(
this
.
items
[
0
]);
}
}
this
.
group
();
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
...
...
@@ -1026,7 +946,6 @@ export default class UsrBase extends Vue implements ControlInterface {
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
this
.
items
.
splice
(
index
,
1
);
this
.
group
();
return
true
;
}
});
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录