|
@@ -12,7 +12,12 @@
|
|
|
<el-breadcrumb-item>{{this.$route.query.system}}</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>{{this.$route.query.class}}</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
- <span v-for="(item,index) in allSelect" v-if="item.check" class="select">{{item.BrandCname}}
|
|
|
+ <span
|
|
|
+ v-for="(item,index) in allSelect"
|
|
|
+ :key="index"
|
|
|
+ v-if="item.check && item.name != '全部'"
|
|
|
+ class="select"
|
|
|
+ >{{item.BrandCname}}
|
|
|
<i class="el-icon-close" @click="deleteCurrent(item,index)"></i></span>
|
|
|
</div>
|
|
|
|
|
@@ -28,10 +33,11 @@
|
|
|
v-for="(item,index) in allDate"
|
|
|
:key="index"
|
|
|
v-if="index < 9"
|
|
|
- @click="handleCurrentBrand(item,index)"
|
|
|
v-show="item.name != '全部'"
|
|
|
:class="item.check ?'light':''">
|
|
|
- {{item.BrandCname}}
|
|
|
+ <span @click="handleCurrentBrand(item,index)" style="cursor: pointer">
|
|
|
+ {{item.BrandCname}}
|
|
|
+ </span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<template v-else>
|
|
@@ -39,6 +45,7 @@
|
|
|
<span
|
|
|
class="saga-product-letter"
|
|
|
v-for="(list, letter,index) in brandList"
|
|
|
+ :key="index"
|
|
|
@click="handleLetter(index,list,letter)"
|
|
|
:class="idx=== index?'litter-light':''"
|
|
|
> {{letter}}</span>
|
|
@@ -47,9 +54,11 @@
|
|
|
<li
|
|
|
v-for="(item,index) in allDate"
|
|
|
:key="index"
|
|
|
- @click="handleCurrentBrand(item,index)"
|
|
|
v-show="item.name != '全部'"
|
|
|
- :class="item.check ?'light':''">{{item.BrandCname}}
|
|
|
+ :class="item.check ?'light':''">
|
|
|
+ <span @click="handleCurrentBrand(item,index)" style="cursor: pointer">
|
|
|
+ {{item.BrandCname}}
|
|
|
+ </span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</template>
|
|
@@ -79,8 +88,8 @@
|
|
|
|
|
|
<script>
|
|
|
import detailTable from "../../public/detailTable";
|
|
|
- import { prodTypeQuery } from "@/api/product"
|
|
|
- import { brandQueryByClass } from "@/api/brand"
|
|
|
+ import {prodTypeQuery} from "@/api/product"
|
|
|
+ import {brandQueryByClass} from "@/api/brand"
|
|
|
import {mapGetters} from "vuex"
|
|
|
|
|
|
|
|
@@ -155,12 +164,13 @@
|
|
|
}
|
|
|
prodTypeQuery(params, res => {
|
|
|
this.total = res.Total
|
|
|
- this.table = res.Content.map(i => ({...i, brandName: this.$route.query.BrandCname}))
|
|
|
+ this.table = res.Content.map(i => ({...i, brandName: i.Brand.BrandCname}))
|
|
|
})
|
|
|
},
|
|
|
handleCommand(command) {// 切换排序方式
|
|
|
this.sortName = this.sortMap[command]
|
|
|
this.sort = command
|
|
|
+ this.idx = 0
|
|
|
this.getDate()
|
|
|
this.getProductList()
|
|
|
},
|
|
@@ -210,7 +220,7 @@
|
|
|
}
|
|
|
prodTypeQuery(params, res => {
|
|
|
this.total = res.Total
|
|
|
- this.table = res.Content.map(i => ({...i, brandName: this.$route.query.BrandCname}))
|
|
|
+ this.table = res.Content.map(i => ({...i, brandName: i.Brand.BrandCname}))
|
|
|
})
|
|
|
} else {
|
|
|
this.getProductList()
|