|
|
@ -54,19 +54,20 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tabs"> |
|
|
|
<div class="tab-btn" @click="groupIndex -= 1"> |
|
|
|
<div class="tab-btn" @click="subStartGroupIndex" v-if="groupList.length>9"> |
|
|
|
<img src="@/assets/img/shuju/people/arrow-double-left.png" /> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
v-show="index >= startGroupIndex && index < startGroupIndex+9" |
|
|
|
class="tab" |
|
|
|
:class="groupIndex % groupList.length == index ? 'z-on' : ''" |
|
|
|
:key="'tab' + index" |
|
|
|
@click="groupIndex = groupList.length * 100 + index" |
|
|
|
@click="groupIndex = index" |
|
|
|
v-for="(item, index) in groupList" |
|
|
|
> |
|
|
|
{{ item.label }} |
|
|
|
</div> |
|
|
|
<div class="tab-btn" @click="groupIndex += 1"> |
|
|
|
<div class="tab-btn" @click="addStartGroupIndex" v-if="groupList.length>9"> |
|
|
|
<img src="@/assets/img/shuju/people/arrow-double-right.png" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -124,6 +125,7 @@ export default { |
|
|
|
fieldList: [], |
|
|
|
groupList: [], |
|
|
|
groupIndex: 0, |
|
|
|
startGroupIndex: 0, |
|
|
|
info: {}, |
|
|
|
|
|
|
|
xiaoquList: [], |
|
|
@ -212,6 +214,22 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
addStartGroupIndex() { |
|
|
|
const { startGroupIndex, groupList } = this; |
|
|
|
if (startGroupIndex < groupList.length - 9) { |
|
|
|
this.startGroupIndex = startGroupIndex + 1; |
|
|
|
} else { |
|
|
|
this.startGroupIndex = groupList.length - 9; |
|
|
|
} |
|
|
|
}, |
|
|
|
subStartGroupIndex() { |
|
|
|
const { startGroupIndex, groupList } = this; |
|
|
|
if (startGroupIndex > 0) { |
|
|
|
this.startGroupIndex = startGroupIndex - 1; |
|
|
|
} else { |
|
|
|
this.startGroupIndex = 0; |
|
|
|
} |
|
|
|
}, |
|
|
|
handleClose() { |
|
|
|
this.$emit("close"); |
|
|
|
}, |
|
|
@ -280,8 +298,6 @@ export default { |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
this.groupIndex = this.groupList.length * 100; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|