Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
8a977105
提交
8a977105
编写于
9月 09, 2020
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
列表和数据视图分组
上级
bb2a2af6
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
40 行增加
和
23 行删除
+40
-23
CONTROL-BASE.vue.ftl
@CONTROL/列表/CONTROL-BASE.vue.ftl
+20
-11
CONTROL-BASE.vue.ftl
@CONTROL/数据视图/CONTROL-BASE.vue.ftl
+20
-12
未找到文件。
@CONTROL/列表/CONTROL-BASE.vue.ftl
浏览文件 @
8a977105
...
...
@@ -18,7 +18,10 @@
</div>
<#elseif ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
<el-collapse>
<el-collapse-item v-for="(group,index) in items" :key="index" :title="group.group" >
<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">
<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)">
<#if ctrl.getItemPSLayoutPanel()??>
...
...
@@ -50,11 +53,9 @@
<el-backtop target=".content-container .app-list"></el-backtop>
</div>
</template>
<#if ctrl.getGroupMode?? && ctrl.getGroupMode() == 'CODELIST'>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
</#assign>
</#if>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
...
...
@@ -165,7 +166,15 @@ import CodeListService from "@service/app/codelist-service";
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupProperty: string = "<#if ctrl.getGroupPSDEField?? && ctrl.getGroupPSDEField()??>${ctrl.getGroupPSDEField().getCodeName()?lower_case}</#if>";
public groupField: string = "<#if ctrl.getGroupPSDEField?? && ctrl.getGroupPSDEField()??>${ctrl.getGroupPSDEField().getCodeName()?lower_case}</#if>";
/**
* 分组数据
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupData: Array<any> = [];
</#if>
<#if ctrl.getGroupMode?? && ctrl.getGroupMode() == 'CODELIST'>
...
...
@@ -212,7 +221,7 @@ import CodeListService from "@service/app/codelist-service";
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(Object.is(group.label,item[this.group
Property
])){
if(Object.is(group.label,item[this.group
Field
])){
children.push(item);
}
});
...
...
@@ -224,7 +233,7 @@ import CodeListService from "@service/app/codelist-service";
});
let child:Array<any> = [];
data.forEach((item: any)=>{
let i = groups.findIndex((group: any)=>Object.is(group,item[this.group
Property
]));
let i = groups.findIndex((group: any)=>Object.is(group,item[this.group
Field
]));
if(i < 0){
child.push(item);
}
...
...
@@ -234,7 +243,7 @@ import CodeListService from "@service/app/codelist-service";
children: child
}
groupTree.push(Tree);
this.
items
= [...groupTree];
this.
groupData
= [...groupTree];
}
</#if>
...
...
@@ -248,8 +257,8 @@ import CodeListService from "@service/app/codelist-service";
let data:Array<any> = [...this.items];
let groups:Array<any> = [];
data.forEach((item: any)=>{
if(item.hasOwnProperty(this.group
Property
)){
groups.push(item[this.group
Property
]);
if(item.hasOwnProperty(this.group
Field
)){
groups.push(item[this.group
Field
]);
}
});
groups = [...new Set(groups)];
...
...
@@ -258,7 +267,7 @@ import CodeListService from "@service/app/codelist-service";
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(Object.is(group,item[this.group
Property
])){
if(Object.is(group,item[this.group
Field
])){
children.push(item);
}
});
...
...
@@ -268,7 +277,7 @@ import CodeListService from "@service/app/codelist-service";
}
groupTree.push(tree);
});
this.
items
= [...groupTree];
this.
groupData
= [...groupTree];
}
</#if>
...
...
@CONTROL/数据视图/CONTROL-BASE.vue.ftl
浏览文件 @
8a977105
...
...
@@ -56,7 +56,10 @@
</a>
<#elseif ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
<el-collapse>
<el-collapse-item v-for="(group,index) in items" :key="index" :title="group.group">
<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">
<i-col style="min-height: 170px;margin-bottom: 10px;max-width: 194px;">
...
...
@@ -93,11 +96,9 @@
</div>
</#if>
</template>
<#if ctrl.getGroupMode?? && ctrl.getGroupMode() == 'CODELIST'>
<#assign import_block>
import CodeListService from "@service/app/codelist-service";
</#assign>
</#if>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
...
...
@@ -207,7 +208,15 @@ import CodeListService from "@service/app/codelist-service";
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupProperty: string = "<#if ctrl.getGroupPSDEField?? && ctrl.getGroupPSDEField()??>${ctrl.getGroupPSDEField().getCodeName()?lower_case}</#if>";
public groupField: string = "<#if ctrl.getGroupPSDEField?? && ctrl.getGroupPSDEField()??>${ctrl.getGroupPSDEField().getCodeName()?lower_case}</#if>";
/**
* 分组数据
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupData: Array<any> = [];
</#if>
<#if ctrl.getGroupMode?? && ctrl.getGroupMode() == 'CODELIST'>
...
...
@@ -254,7 +263,7 @@ import CodeListService from "@service/app/codelist-service";
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(Object.is(group.label,item[this.group
Property
])){
if(Object.is(group.label,item[this.group
Field
])){
children.push(item);
}
});
...
...
@@ -266,7 +275,7 @@ import CodeListService from "@service/app/codelist-service";
});
let child:Array<any> = [];
data.forEach((item: any)=>{
let i = groups.findIndex((group: any)=>Object.is(group,item[this.group
Property
]));
let i = groups.findIndex((group: any)=>Object.is(group,item[this.group
Field
]));
if(i < 0){
child.push(item);
}
...
...
@@ -276,7 +285,7 @@ import CodeListService from "@service/app/codelist-service";
children: child
}
groupTree.push(Tree);
this.
items
= [...groupTree];
this.
groupData
= [...groupTree];
}
</#if>
...
...
@@ -290,8 +299,8 @@ import CodeListService from "@service/app/codelist-service";
let data:Array<any> = [...this.items];
let groups:Array<any> = [];
data.forEach((item: any)=>{
if(item.hasOwnProperty(this.group
Property
)){
groups.push(item[this.group
Property
]);
if(item.hasOwnProperty(this.group
Field
)){
groups.push(item[this.group
Field
]);
}
});
groups = [...new Set(groups)];
...
...
@@ -300,7 +309,7 @@ import CodeListService from "@service/app/codelist-service";
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(Object.is(group,item[this.group
Property
])){
if(Object.is(group,item[this.group
Field
])){
children.push(item);
}
});
...
...
@@ -310,10 +319,9 @@ import CodeListService from "@service/app/codelist-service";
}
groupTree.push(tree);
});
this.
items
= [...groupTree];
this.
groupData
= [...groupTree];
}
</#if>
/**
* 是否单选
*
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录