|
|
@ -20,9 +20,31 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="tab-content"> |
|
|
|
<ul class="tab-nav"> |
|
|
|
<!-- <ul class="tab-nav"> |
|
|
|
<li v-for="(item,index) in tabListData" :key="index" :class="{ 'active-tab-nav': tabIndex == index }" @click="changeActiveTab(index)">{{ item.name }}<i /></li> |
|
|
|
</ul> |
|
|
|
</ul> --> |
|
|
|
<swiper |
|
|
|
ref="swiperTitle" |
|
|
|
class="swiper-title" |
|
|
|
:options="swiperOptionTitle" |
|
|
|
:auto-update="true" |
|
|
|
:auto-destroy="true" |
|
|
|
> |
|
|
|
<swiper-slide |
|
|
|
v-for="(item,index) in tabListData" |
|
|
|
:key="index" |
|
|
|
ref="swiperSlideItem" |
|
|
|
class="swiper-slide-title" |
|
|
|
> |
|
|
|
<div |
|
|
|
class="tab-name" |
|
|
|
:class="{ active: tabIndex == index }" |
|
|
|
@click="changeActiveTab(index)" |
|
|
|
> |
|
|
|
{{ item.name }} |
|
|
|
</div> |
|
|
|
</swiper-slide> |
|
|
|
</swiper> |
|
|
|
<div class="tag-info"> |
|
|
|
<!-- <p class="tag-sort">错序:<i class="iconfont icon-zhuangtai2" /></p> |
|
|
|
<p class="tag-place">错架:<i class="iconfont icon-zhuangtai2" /></p> --> |
|
|
@ -75,9 +97,31 @@ |
|
|
|
</el-popover> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
<ul class="change-layer"> |
|
|
|
<!-- <ul class="change-layer"> |
|
|
|
<li v-for="(item,index) in layerOptions" :key="index" :class="{ 'active': item.name === layerVal.name }" @click="changeShelfGetGrid(item)">{{ item.name }}</li> |
|
|
|
</ul> |
|
|
|
</ul> --> |
|
|
|
<swiper |
|
|
|
ref="swiperTitleLayer" |
|
|
|
class="swiper-title layerShelf-swiper" |
|
|
|
:options="swiperOptionTitlelayer" |
|
|
|
:auto-update="true" |
|
|
|
:auto-destroy="true" |
|
|
|
> |
|
|
|
<swiper-slide |
|
|
|
v-for="(item,index) in layerOptions" |
|
|
|
:key="index" |
|
|
|
ref="swiperSlideItem" |
|
|
|
class="swiper-slide-title" |
|
|
|
> |
|
|
|
<div |
|
|
|
class="tab-name" |
|
|
|
:class="{ active: item.name === layerVal.name }" |
|
|
|
@click="changeShelfGetGrid(item)" |
|
|
|
> |
|
|
|
{{ item.name }} |
|
|
|
</div> |
|
|
|
</swiper-slide> |
|
|
|
</swiper> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -87,11 +131,13 @@ |
|
|
|
import { FetchShelfListByRegionId, FetchShelfGridAllByShelfIdText, FetchBookShelfDetails, FetchInitStockInfo } from '@/api/inquiryMachine' |
|
|
|
import { positionCrud } from './mixins/index.js' |
|
|
|
import Search from './module/search' |
|
|
|
import { swiper, swiperSlide } from 'vue-awesome-swiper' |
|
|
|
import 'swiper/swiper-bundle.css' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'Index', |
|
|
|
components: { |
|
|
|
Search |
|
|
|
Search, swiper, swiperSlide |
|
|
|
}, |
|
|
|
mixins: [positionCrud], |
|
|
|
data() { |
|
|
@ -129,10 +175,24 @@ export default { |
|
|
|
itemStockData: {}, |
|
|
|
touchStartTime: null, |
|
|
|
touchStartPosition: null, |
|
|
|
doubleClickTimeout: null |
|
|
|
doubleClickTimeout: null, |
|
|
|
swiperOptionTitle: { |
|
|
|
slidesPerView: 'auto', |
|
|
|
freeMode: true |
|
|
|
}, |
|
|
|
swiperOptionTitlelayer: { |
|
|
|
slidesPerView: 'auto', |
|
|
|
freeMode: true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
swiperTitle() { |
|
|
|
return this.$refs.swiperTitle.$el.swiper |
|
|
|
}, |
|
|
|
swiperTitleLayer() { |
|
|
|
return this.$refs.swiperTitleLayer.$el.swiper |
|
|
|
}, |
|
|
|
cellStyle: function() { |
|
|
|
const h = '76px' |
|
|
|
const w = '118px' |
|
|
@ -201,7 +261,12 @@ export default { |
|
|
|
this.bookShelfDetails = res |
|
|
|
|
|
|
|
if (this.$route.query.tabIndex) { |
|
|
|
this.getInitShelfGridByShelfId(this.bookShelfDetails.id, this.$route.query.tabIndex + 1) |
|
|
|
if (this.bookShelfDetails.rowType === 1) { |
|
|
|
this.tabIndex = 0 |
|
|
|
this.getInitShelfGridByShelfId(this.bookShelfDetails.id, this.bookShelfDetails.toward) |
|
|
|
} else { |
|
|
|
this.getInitShelfGridByShelfId(this.bookShelfDetails.id, parseInt(this.$route.query.tabIndex) + 1) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.getInitShelfGridByShelfId(this.bookShelfDetails.id, this.bookShelfDetails.toward) |
|
|
|
} |
|
|
@ -350,7 +415,9 @@ export default { |
|
|
|
changeActiveTab(index) { |
|
|
|
this.tabIndex = index |
|
|
|
this.cellIndex = null |
|
|
|
console.log('index', index) |
|
|
|
this.getInitShelfGridByShelfId(this.layerVal.id, index + 1) |
|
|
|
this.swiperTitle.slideTo(index, 500, false) |
|
|
|
}, |
|
|
|
handleCellCurrent(item, index) { |
|
|
|
this.cellIndex = index |
|
|
@ -626,4 +693,25 @@ export default { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.layerShelf-swiper{ |
|
|
|
margin-top: 20px; |
|
|
|
::v-deep .swiper-wrapper{ |
|
|
|
font-size: 20px; |
|
|
|
border-bottom: none !important; |
|
|
|
.swiper-slide-title { |
|
|
|
width: auto !important; |
|
|
|
margin-right: 20px; |
|
|
|
cursor: pointer; |
|
|
|
.tab-name { |
|
|
|
padding: 5px 10px; |
|
|
|
&.active { |
|
|
|
background-color: #0348F3; |
|
|
|
color: #fff; |
|
|
|
border-radius: 6px; |
|
|
|
border: 2px solid #0348F3; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |