提交 e0d2d20c 编写于 作者: JunZai's avatar JunZai

update

上级 3babfa48
......@@ -4,11 +4,17 @@
${ctrl.render.code}
<#else>
<template v-for="(group, index) of groups">
<draggable :key="group + index" :list="getGroupItems(group)" class="dataview-group-content">
<draggable :key="group + index" :list="group.items" group="${ctrl.name}" class="dataview-group-content">
<div slot="header" class="dataview-group-header">
{{ getGroupText(group) }}
{{ getGroupText(group.name) }}
<Poptip trigger="hover" content="content">
<Icon type="md-more" />
<div slot="content" class="group-action">
</div>
</Poptip>
</div>
<div v-for="(item, i) in getGroupItems(group)" :key="i" class="dataview-group-item">
<div v-for="(item, i) in group.items" :key="i" class="dataview-group-item">
{{ item.srfmajortext }}
</div>
</draggable>
......@@ -529,8 +535,12 @@ draggable,
if(Object.is(this.groupMode, 'AUTO')) {
this.groups = [];
this.items.forEach(item => {
if(this.groups.indexOf(item[this.groupField]) < 0) {
this.groups.push(item[this.groupField]);
let group: any = this.groups.find((group: any) => Object.is(group.name, item[this.groupField]));
if(!group) {
this.groups.push({
name: item[this.groupField],
items: this.getGroupItems(item[this.groupField])
})
}
});
}
......@@ -539,7 +549,10 @@ draggable,
let codelist: any = this.$store.getters.getCodeList(this.groupCodelist);
if(codelist) {
codelist.items.forEach((item: any) => {
this.groups.push(item.value)
this.groups.push({
name: item.value,
items: this.getGroupItems(item.value)
})
})
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册