Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
2b480f62
提交
2b480f62
编写于
12月 07, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ShineKOT 发布系统代码 [后台服务,演示应用]
上级
544eae86
变更
6
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
87 行增加
和
402 行删除
+87
-402
ctrl-chart-chart-base.vue
...ts/ibizappctrl/ctrl-chart-chart/ctrl-chart-chart-base.vue
+1
-0
ctrl-list-list-base.vue
...idgets/ibizappctrl/ctrl-list-list/ctrl-list-list-base.vue
+28
-134
editor-chart-chart-base.vue
...zappeditor/editor-chart-chart/editor-chart-chart-base.vue
+1
-0
editor-list-list-base.vue
.../ibizappeditor/editor-list-list/editor-list-list-base.vue
+28
-134
view-chart-chart-base.vue
...ts/ibizappview/view-chart-chart/view-chart-chart-base.vue
+1
-0
view-list-list-base.vue
...idgets/ibizappview/view-list-list/view-list-list-base.vue
+28
-134
未找到文件。
app_Web/src/widgets/ibizappctrl/ctrl-chart-chart/ctrl-chart-chart-base.vue
浏览文件 @
2b480f62
...
@@ -326,6 +326,7 @@ export default class CtrlChartBase extends Vue implements ControlInterface {
...
@@ -326,6 +326,7 @@ export default class CtrlChartBase extends Vue implements ControlInterface {
* @memberof Db_sysportlet3_chartBase
* @memberof Db_sysportlet3_chartBase
*/
*/
public
chartUserParams
:
any
=
{
public
chartUserParams
:
any
=
{
color
:[
"#CAAC32"
,
"#0075A9"
,
"#22AC38"
,
"#2B4D6D"
,
'#FF9100'
,
'#FF3D00'
,
'#F57F17'
,
'#00E5FF'
,
'#00B0FF'
,
'#2979FF'
,
'#3D5AFE'
,
'#651FFF'
,
'#D500F9'
]
};
};
/**
/**
...
...
app_Web/src/widgets/ibizappctrl/ctrl-list-list/ctrl-list-list-base.vue
浏览文件 @
2b480f62
<
template
>
<
template
>
<div
:class=
"['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"
>
<div
:class=
"['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"
>
<div
v-if=
"items.length > 0"
>
<div
v-if=
"items.length > 0"
>
<el-collapse>
<div
v-for =
"item in items"
:key=
"item.srfkey"
:class=
"['app-list-item',
{'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<el-collapse-item
v-for=
"(group,index) in groupData"
:key=
"index"
>
<div
class=
"app-list-item-content"
>
<template
slot=
"title"
>
<div
class=
"item-icon"
>
<div
style=
"margin: 0 0 0 12px;"
><b>
{{
group
.
group
}}
</b></div>
<template
v-if=
"item.srficon"
>
<img
:src=
"item.srficon"
/>
</
template
>
</
template
>
<div
v-if=
"group.children.length > 0"
style=
"margin: 0 0 0 32px;"
>
<
template
v-else
>
<div
v-for=
"item in group.children"
:key=
"item.srfkey"
:class=
"['app-list-item', {'isSelect': item.isselected === true ? true : false}]"
@
click=
"handleClick(item)"
@
dblclick=
"handleDblClick(item)"
>
<img
src=
"/assets/img/noimage.png"
/>
<div
class=
"app-list-item-content"
>
{{item.srfmajortext}}
</div>
</
template
>
<div
calss=
"app-list-item-action"
>
</div>
<
template
>
<div
class=
"item-content-text"
>
<span
class=
"item-text"
>
{{
item
.
srfmajortext
}}
</span>
<span
v-if=
"item.srfdescription"
class=
"item-subtext"
>
{{
item
.
srfdescription
}}
</span>
</div>
</
template
>
</div>
<div
v-if=
"item.srfdate"
class=
"app-list-item-date"
>
<span
class=
"date"
>
{{ item.srfdate }}
</span>
</div>
<div
class=
"app-list-item-action"
>
<
template
v-for=
"(action,index) in Object.keys(actionModel)"
>
<
template
v-for=
"(action,index) in Object.keys(actionModel)"
>
<a
:key=
"index"
style=
"display: inline-block;margin: 0 12px;"
@
click=
"uiAction(item, action, $event)"
>
<a
:key=
"index"
style=
"display: inline-block;margin: 0 12px;"
@
click=
"uiAction(item, action, $event)"
>
<i
:class=
"actionModel[action].icon"
style=
"margin-right:2px;"
></i>
<i
:class=
"actionModel[action].icon"
style=
"margin-right:2px;"
></i>
...
@@ -18,12 +30,6 @@
...
@@ -18,12 +30,6 @@
</
template
>
</
template
>
</div>
</div>
</div>
</div>
</div>
<div
v-else
style=
"text-align: center;"
>
{{ $t('entities.ibizappctrl.ctrllist_list.nodata') }}
</div>
</el-collapse-item>
</el-collapse>
<
template
v-if=
"isScrollBar"
>
<
template
v-if=
"isScrollBar"
>
<div
v-if=
"totalRecord>items.length"
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.loadmore'
)
}}
</div>
<div
v-if=
"totalRecord>items.length"
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.loadmore'
)
}}
</div>
<div
v-else
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.nomore'
)
}}
</div>
<div
v-else
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.nomore'
)
}}
</div>
...
@@ -276,117 +282,7 @@ export default class CtrlListBase extends Vue implements ControlInterface {
...
@@ -276,117 +282,7 @@ export default class CtrlListBase extends Vue implements ControlInterface {
*/
*/
public
thisRef
:
any
=
this
;
public
thisRef
:
any
=
this
;
/**
* 分组属性
*
* @type {string}
* @memberof CtrlListBase
*/
public
groupField
:
string
=
"ibizappctrltype"
;
/**
* 分组属性是否配置代码表
*
* @type {string}
* @memberof CtrlListBase
*/
public
groupFieldCodelist
:
boolean
=
true
;
/**
* 分组数据
*
* @type {Array<any>}
* @memberof CtrlListBase
*/
public
groupData
:
Array
<
any
>
=
[];
/**
* 分组模式
*
* @type {string}
* @memberof CtrlListBase
*/
public
groupMode
:
string
=
"CODELIST"
;
/**
* 分组方法
*
* @memberof CtrlListBase
*/
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
();
}
}
/**
* 分组代码表
*
* @type {string}
* @memberof CtrlListBase
*/
public
groupCodelist
:
any
=
{
type
:
'STATIC'
,
tag
:
'AppCtrlType'
};
/**
* 根据分组代码表绘制分组列表
*
* @memberof CtrlListBase
*/
public
async
drawCodelistGroup
(){
let
groups
:
Array
<
any
>
=
[];
let
fields
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
let
data
:
Array
<
any
>
=
[...
this
.
items
];
if
(
Object
.
keys
(
this
.
groupCodelist
).
length
>
0
){
let
groupCodelist
:
any
=
await
this
.
codeListService
.
getDataItems
(
this
.
groupCodelist
);
groups
=
Util
.
deepCopy
(
groupCodelist
);
}
if
(
groups
.
length
==
0
){
console
.
warn
(
"分组数据无效"
);
}
groups
.
forEach
((
group
:
any
,
i
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
data
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
this
.
groupFieldCodelist
){
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupField
]))
{
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupField
])){
children
.
push
(
item
);
}
});
const
tree
:
any
=
{
group
:
group
.
label
,
children
:
children
}
groupTree
.
push
(
tree
);
});
let
child
:
Array
<
any
>
=
[];
data
.
forEach
((
item
:
any
)
=>
{
let
i
:
number
=
0
;
if
(
this
.
groupFieldCodelist
){
i
=
groups
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupField
]));
}
else
{
i
=
groups
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupField
]));
}
if
(
i
<
0
){
child
.
push
(
item
);
}
})
const
Tree
:
any
=
{
group
:
this
.
$t
(
'app.commonWords.other'
),
children
:
child
}
if
(
child
&&
child
.
length
>
0
){
groupTree
.
push
(
Tree
);
}
this
.
groupData
=
[...
groupTree
];
}
...
@@ -663,7 +559,6 @@ export default class CtrlListBase extends Vue implements ControlInterface {
...
@@ -663,7 +559,6 @@ export default class CtrlListBase extends Vue implements ControlInterface {
this
.
handleClick
(
this
.
items
[
0
]);
this
.
handleClick
(
this
.
items
[
0
]);
}
}
}
}
this
.
group
();
},
(
response
:
any
)
=>
{
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
...
@@ -765,7 +660,6 @@ export default class CtrlListBase extends Vue implements ControlInterface {
...
@@ -765,7 +660,6 @@ export default class CtrlListBase extends Vue implements ControlInterface {
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
this
.
items
.
splice
(
index
,
1
);
this
.
items
.
splice
(
index
,
1
);
this
.
group
();
return
true
;
return
true
;
}
}
});
});
...
...
app_Web/src/widgets/ibizappeditor/editor-chart-chart/editor-chart-chart-base.vue
浏览文件 @
2b480f62
...
@@ -323,6 +323,7 @@ export default class EditorChartBase extends Vue implements ControlInterface {
...
@@ -323,6 +323,7 @@ export default class EditorChartBase extends Vue implements ControlInterface {
* @memberof Db_sysportlet4_chartBase
* @memberof Db_sysportlet4_chartBase
*/
*/
public
chartUserParams
:
any
=
{
public
chartUserParams
:
any
=
{
color
:[
"#CAAC32"
,
"#0075A9"
,
"#22AC38"
,
"#2B4D6D"
,
'#FF9100'
,
'#FF3D00'
,
'#F57F17'
,
'#00E5FF'
,
'#00B0FF'
,
'#2979FF'
,
'#3D5AFE'
,
'#651FFF'
,
'#D500F9'
]
};
};
/**
/**
...
...
app_Web/src/widgets/ibizappeditor/editor-list-list/editor-list-list-base.vue
浏览文件 @
2b480f62
<
template
>
<
template
>
<div
:class=
"['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"
>
<div
:class=
"['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"
>
<div
v-if=
"items.length > 0"
>
<div
v-if=
"items.length > 0"
>
<el-collapse>
<div
v-for =
"item in items"
:key=
"item.srfkey"
:class=
"['app-list-item',
{'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<el-collapse-item
v-for=
"(group,index) in groupData"
:key=
"index"
>
<div
class=
"app-list-item-content"
>
<template
slot=
"title"
>
<div
class=
"item-icon"
>
<div
style=
"margin: 0 0 0 12px;"
><b>
{{
group
.
group
}}
</b></div>
<template
v-if=
"item.srficon"
>
<img
:src=
"item.srficon"
/>
</
template
>
</
template
>
<div
v-if=
"group.children.length > 0"
style=
"margin: 0 0 0 32px;"
>
<
template
v-else
>
<div
v-for=
"item in group.children"
:key=
"item.srfkey"
:class=
"['app-list-item', {'isSelect': item.isselected === true ? true : false}]"
@
click=
"handleClick(item)"
@
dblclick=
"handleDblClick(item)"
>
<img
src=
"/assets/img/noimage.png"
/>
<div
class=
"app-list-item-content"
>
{{item.srfmajortext}}
</div>
</
template
>
<div
calss=
"app-list-item-action"
>
</div>
<
template
>
<div
class=
"item-content-text"
>
<span
class=
"item-text"
>
{{
item
.
srfmajortext
}}
</span>
<span
v-if=
"item.srfdescription"
class=
"item-subtext"
>
{{
item
.
srfdescription
}}
</span>
</div>
</
template
>
</div>
<div
v-if=
"item.srfdate"
class=
"app-list-item-date"
>
<span
class=
"date"
>
{{ item.srfdate }}
</span>
</div>
<div
class=
"app-list-item-action"
>
<
template
v-for=
"(action,index) in Object.keys(actionModel)"
>
<
template
v-for=
"(action,index) in Object.keys(actionModel)"
>
<a
:key=
"index"
style=
"display: inline-block;margin: 0 12px;"
@
click=
"uiAction(item, action, $event)"
>
<a
:key=
"index"
style=
"display: inline-block;margin: 0 12px;"
@
click=
"uiAction(item, action, $event)"
>
<i
:class=
"actionModel[action].icon"
style=
"margin-right:2px;"
></i>
<i
:class=
"actionModel[action].icon"
style=
"margin-right:2px;"
></i>
...
@@ -18,12 +30,6 @@
...
@@ -18,12 +30,6 @@
</
template
>
</
template
>
</div>
</div>
</div>
</div>
</div>
<div
v-else
style=
"text-align: center;"
>
{{ $t('entities.ibizappeditor.editorlist_list.nodata') }}
</div>
</el-collapse-item>
</el-collapse>
<
template
v-if=
"isScrollBar"
>
<
template
v-if=
"isScrollBar"
>
<div
v-if=
"totalRecord>items.length"
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.loadmore'
)
}}
</div>
<div
v-if=
"totalRecord>items.length"
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.loadmore'
)
}}
</div>
<div
v-else
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.nomore'
)
}}
</div>
<div
v-else
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.nomore'
)
}}
</div>
...
@@ -276,117 +282,7 @@ export default class EditorListBase extends Vue implements ControlInterface {
...
@@ -276,117 +282,7 @@ export default class EditorListBase extends Vue implements ControlInterface {
*/
*/
public
thisRef
:
any
=
this
;
public
thisRef
:
any
=
this
;
/**
* 分组属性
*
* @type {string}
* @memberof EditorListBase
*/
public
groupField
:
string
=
"ibizappeditortype"
;
/**
* 分组属性是否配置代码表
*
* @type {string}
* @memberof EditorListBase
*/
public
groupFieldCodelist
:
boolean
=
true
;
/**
* 分组数据
*
* @type {Array<any>}
* @memberof EditorListBase
*/
public
groupData
:
Array
<
any
>
=
[];
/**
* 分组模式
*
* @type {string}
* @memberof EditorListBase
*/
public
groupMode
:
string
=
"CODELIST"
;
/**
* 分组方法
*
* @memberof EditorListBase
*/
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
();
}
}
/**
* 分组代码表
*
* @type {string}
* @memberof EditorListBase
*/
public
groupCodelist
:
any
=
{
type
:
'STATIC'
,
tag
:
'AppEditorType'
};
/**
* 根据分组代码表绘制分组列表
*
* @memberof EditorListBase
*/
public
async
drawCodelistGroup
(){
let
groups
:
Array
<
any
>
=
[];
let
fields
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
let
data
:
Array
<
any
>
=
[...
this
.
items
];
if
(
Object
.
keys
(
this
.
groupCodelist
).
length
>
0
){
let
groupCodelist
:
any
=
await
this
.
codeListService
.
getDataItems
(
this
.
groupCodelist
);
groups
=
Util
.
deepCopy
(
groupCodelist
);
}
if
(
groups
.
length
==
0
){
console
.
warn
(
"分组数据无效"
);
}
groups
.
forEach
((
group
:
any
,
i
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
data
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
this
.
groupFieldCodelist
){
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupField
]))
{
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupField
])){
children
.
push
(
item
);
}
});
const
tree
:
any
=
{
group
:
group
.
label
,
children
:
children
}
groupTree
.
push
(
tree
);
});
let
child
:
Array
<
any
>
=
[];
data
.
forEach
((
item
:
any
)
=>
{
let
i
:
number
=
0
;
if
(
this
.
groupFieldCodelist
){
i
=
groups
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupField
]));
}
else
{
i
=
groups
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupField
]));
}
if
(
i
<
0
){
child
.
push
(
item
);
}
})
const
Tree
:
any
=
{
group
:
this
.
$t
(
'app.commonWords.other'
),
children
:
child
}
if
(
child
&&
child
.
length
>
0
){
groupTree
.
push
(
Tree
);
}
this
.
groupData
=
[...
groupTree
];
}
...
@@ -663,7 +559,6 @@ export default class EditorListBase extends Vue implements ControlInterface {
...
@@ -663,7 +559,6 @@ export default class EditorListBase extends Vue implements ControlInterface {
this
.
handleClick
(
this
.
items
[
0
]);
this
.
handleClick
(
this
.
items
[
0
]);
}
}
}
}
this
.
group
();
},
(
response
:
any
)
=>
{
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
...
@@ -765,7 +660,6 @@ export default class EditorListBase extends Vue implements ControlInterface {
...
@@ -765,7 +660,6 @@ export default class EditorListBase extends Vue implements ControlInterface {
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
this
.
items
.
splice
(
index
,
1
);
this
.
items
.
splice
(
index
,
1
);
this
.
group
();
return
true
;
return
true
;
}
}
});
});
...
...
app_Web/src/widgets/ibizappview/view-chart-chart/view-chart-chart-base.vue
浏览文件 @
2b480f62
...
@@ -325,6 +325,7 @@ export default class ViewChartBase extends Vue implements ControlInterface {
...
@@ -325,6 +325,7 @@ export default class ViewChartBase extends Vue implements ControlInterface {
* @memberof Db_sysportlet2_chartBase
* @memberof Db_sysportlet2_chartBase
*/
*/
public
chartUserParams
:
any
=
{
public
chartUserParams
:
any
=
{
color
:[
"#CAAC32"
,
"#0075A9"
,
"#22AC38"
,
"#2B4D6D"
,
'#FF9100'
,
'#FF3D00'
,
'#F57F17'
,
'#00E5FF'
,
'#00B0FF'
,
'#2979FF'
,
'#3D5AFE'
,
'#651FFF'
,
'#D500F9'
]
};
};
/**
/**
...
...
app_Web/src/widgets/ibizappview/view-list-list/view-list-list-base.vue
浏览文件 @
2b480f62
<
template
>
<
template
>
<div
:class=
"['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"
>
<div
:class=
"['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"
>
<div
v-if=
"items.length > 0"
>
<div
v-if=
"items.length > 0"
>
<el-collapse>
<div
v-for =
"item in items"
:key=
"item.srfkey"
:class=
"['app-list-item',
{'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<el-collapse-item
v-for=
"(group,index) in groupData"
:key=
"index"
>
<div
class=
"app-list-item-content"
>
<template
slot=
"title"
>
<div
class=
"item-icon"
>
<div
style=
"margin: 0 0 0 12px;"
><b>
{{
group
.
group
}}
</b></div>
<template
v-if=
"item.srficon"
>
<img
:src=
"item.srficon"
/>
</
template
>
</
template
>
<div
v-if=
"group.children.length > 0"
style=
"margin: 0 0 0 32px;"
>
<
template
v-else
>
<div
v-for=
"item in group.children"
:key=
"item.srfkey"
:class=
"['app-list-item', {'isSelect': item.isselected === true ? true : false}]"
@
click=
"handleClick(item)"
@
dblclick=
"handleDblClick(item)"
>
<img
src=
"/assets/img/noimage.png"
/>
<div
class=
"app-list-item-content"
>
{{item.srfmajortext}}
</div>
</
template
>
<div
calss=
"app-list-item-action"
>
</div>
<
template
>
<div
class=
"item-content-text"
>
<span
class=
"item-text"
>
{{
item
.
srfmajortext
}}
</span>
<span
v-if=
"item.srfdescription"
class=
"item-subtext"
>
{{
item
.
srfdescription
}}
</span>
</div>
</
template
>
</div>
<div
v-if=
"item.srfdate"
class=
"app-list-item-date"
>
<span
class=
"date"
>
{{ item.srfdate }}
</span>
</div>
<div
class=
"app-list-item-action"
>
<
template
v-for=
"(action,index) in Object.keys(actionModel)"
>
<
template
v-for=
"(action,index) in Object.keys(actionModel)"
>
<a
:key=
"index"
style=
"display: inline-block;margin: 0 12px;"
@
click=
"uiAction(item, action, $event)"
>
<a
:key=
"index"
style=
"display: inline-block;margin: 0 12px;"
@
click=
"uiAction(item, action, $event)"
>
<i
:class=
"actionModel[action].icon"
style=
"margin-right:2px;"
></i>
<i
:class=
"actionModel[action].icon"
style=
"margin-right:2px;"
></i>
...
@@ -18,12 +30,6 @@
...
@@ -18,12 +30,6 @@
</
template
>
</
template
>
</div>
</div>
</div>
</div>
</div>
<div
v-else
style=
"text-align: center;"
>
{{ $t('entities.ibizappview.viewlist_list.nodata') }}
</div>
</el-collapse-item>
</el-collapse>
<
template
v-if=
"isScrollBar"
>
<
template
v-if=
"isScrollBar"
>
<div
v-if=
"totalRecord>items.length"
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.loadmore'
)
}}
</div>
<div
v-if=
"totalRecord>items.length"
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.loadmore'
)
}}
</div>
<div
v-else
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.nomore'
)
}}
</div>
<div
v-else
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.nomore'
)
}}
</div>
...
@@ -276,117 +282,7 @@ export default class ViewListBase extends Vue implements ControlInterface {
...
@@ -276,117 +282,7 @@ export default class ViewListBase extends Vue implements ControlInterface {
*/
*/
public
thisRef
:
any
=
this
;
public
thisRef
:
any
=
this
;
/**
* 分组属性
*
* @type {string}
* @memberof ViewListBase
*/
public
groupField
:
string
=
"ibizappviewtype"
;
/**
* 分组属性是否配置代码表
*
* @type {string}
* @memberof ViewListBase
*/
public
groupFieldCodelist
:
boolean
=
true
;
/**
* 分组数据
*
* @type {Array<any>}
* @memberof ViewListBase
*/
public
groupData
:
Array
<
any
>
=
[];
/**
* 分组模式
*
* @type {string}
* @memberof ViewListBase
*/
public
groupMode
:
string
=
"CODELIST"
;
/**
* 分组方法
*
* @memberof ViewListBase
*/
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
();
}
}
/**
* 分组代码表
*
* @type {string}
* @memberof ViewListBase
*/
public
groupCodelist
:
any
=
{
type
:
'STATIC'
,
tag
:
'AppViewType'
};
/**
* 根据分组代码表绘制分组列表
*
* @memberof ViewListBase
*/
public
async
drawCodelistGroup
(){
let
groups
:
Array
<
any
>
=
[];
let
fields
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
let
data
:
Array
<
any
>
=
[...
this
.
items
];
if
(
Object
.
keys
(
this
.
groupCodelist
).
length
>
0
){
let
groupCodelist
:
any
=
await
this
.
codeListService
.
getDataItems
(
this
.
groupCodelist
);
groups
=
Util
.
deepCopy
(
groupCodelist
);
}
if
(
groups
.
length
==
0
){
console
.
warn
(
"分组数据无效"
);
}
groups
.
forEach
((
group
:
any
,
i
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
data
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
this
.
groupFieldCodelist
){
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupField
]))
{
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupField
])){
children
.
push
(
item
);
}
});
const
tree
:
any
=
{
group
:
group
.
label
,
children
:
children
}
groupTree
.
push
(
tree
);
});
let
child
:
Array
<
any
>
=
[];
data
.
forEach
((
item
:
any
)
=>
{
let
i
:
number
=
0
;
if
(
this
.
groupFieldCodelist
){
i
=
groups
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupField
]));
}
else
{
i
=
groups
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupField
]));
}
if
(
i
<
0
){
child
.
push
(
item
);
}
})
const
Tree
:
any
=
{
group
:
this
.
$t
(
'app.commonWords.other'
),
children
:
child
}
if
(
child
&&
child
.
length
>
0
){
groupTree
.
push
(
Tree
);
}
this
.
groupData
=
[...
groupTree
];
}
...
@@ -663,7 +559,6 @@ export default class ViewListBase extends Vue implements ControlInterface {
...
@@ -663,7 +559,6 @@ export default class ViewListBase extends Vue implements ControlInterface {
this
.
handleClick
(
this
.
items
[
0
]);
this
.
handleClick
(
this
.
items
[
0
]);
}
}
}
}
this
.
group
();
},
(
response
:
any
)
=>
{
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
...
@@ -765,7 +660,6 @@ export default class ViewListBase extends Vue implements ControlInterface {
...
@@ -765,7 +660,6 @@ export default class ViewListBase extends Vue implements ControlInterface {
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
this
.
items
.
splice
(
index
,
1
);
this
.
items
.
splice
(
index
,
1
);
this
.
group
();
return
true
;
return
true
;
}
}
});
});
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录