|
|
@ -5,8 +5,10 @@ |
|
|
|
<view class="filter-content" v-for="(item, index) in menuList" :key="index" v-if="menuIndex == index"> |
|
|
|
<view class="filter-content" v-for="(item, index) in menuList" :key="index" v-if="menuIndex == index"> |
|
|
|
<view v-if="item.isSort"> |
|
|
|
<view v-if="item.isSort"> |
|
|
|
<view class="filter-content-list"> |
|
|
|
<view class="filter-content-list"> |
|
|
|
<view v-for="(detailItem,idx) in selectDetailList" :key="idx" :class="detailItem.isSelected?'filter-content-list-item-active':'filter-content-list-item-default'" |
|
|
|
<view v-for="(detailItem,idx) in selectDetailList" :key="idx" |
|
|
|
:style="{'color': detailItem.isSelected?themeColor:'#666666'}" @tap="sortTap(idx,selectDetailList,item.key)"> |
|
|
|
:class="detailItem.isSelected?'filter-content-list-item-active':'filter-content-list-item-default'" |
|
|
|
|
|
|
|
:style="{'color': detailItem.isSelected?themeColor:'#666666'}" |
|
|
|
|
|
|
|
@tap="sortTap(idx,selectDetailList,item.key)"> |
|
|
|
<text>{{detailItem.title}}</text> |
|
|
|
<text>{{detailItem.title}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -16,16 +18,20 @@ |
|
|
|
<text>{{item.detailTitle}}</text> |
|
|
|
<text>{{item.detailTitle}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="filter-content-detail"> |
|
|
|
<view class="filter-content-detail"> |
|
|
|
<text v-for="(detailItem,idx) in selectDetailList" :key="idx" class='filter-content-detail-item-default' :style="{'background-color':detailItem.isSelected?themeColor:'#f6f6f6','color':detailItem.isSelected?'#FFFFFF':'#999999'}" |
|
|
|
<text v-for="(detailItem,idx) in selectDetailList" :key="idx" |
|
|
|
|
|
|
|
class='filter-content-detail-item-default' |
|
|
|
|
|
|
|
:style="{'background-color':detailItem.isSelected?themeColor:'#f6f6f6','color':detailItem.isSelected?'#FFFFFF':'#999999'}" |
|
|
|
@tap="itemTap(idx,selectDetailList,item.isMutiple,item.key)"> |
|
|
|
@tap="itemTap(idx,selectDetailList,item.isMutiple,item.key)"> |
|
|
|
{{detailItem.title}} |
|
|
|
{{detailItem.title}} |
|
|
|
</text> |
|
|
|
</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="filter-content-footer"> |
|
|
|
<view class="filter-content-footer"> |
|
|
|
<view class="filter-content-footer-item" style="color: #777777; background-color: #FFFFFF;" @tap="resetClick(selectDetailList,item.key)"> |
|
|
|
<view class="filter-content-footer-item" style="color: #777777; background-color: #FFFFFF;" |
|
|
|
|
|
|
|
@tap="resetClick(selectDetailList,item.key)"> |
|
|
|
<text>重置</text> |
|
|
|
<text>重置</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="filter-content-footer-item" :style="{'color': '#FFFFFF', 'background-color': themeColor}" @tap="sureClick"> |
|
|
|
<view class="filter-content-footer-item" |
|
|
|
|
|
|
|
:style="{'color': '#FFFFFF', 'background-color': themeColor}" @tap="sureClick"> |
|
|
|
<text>确定</text> |
|
|
|
<text>确定</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -95,7 +101,8 @@ |
|
|
|
let obj = {} |
|
|
|
let obj = {} |
|
|
|
for (let i = 0; i < this.menuList.length; i++) { |
|
|
|
for (let i = 0; i < this.menuList.length; i++) { |
|
|
|
let item = this.menuList[i]; |
|
|
|
let item = this.menuList[i]; |
|
|
|
if (!this.independence && item.defaultSelectedIndex != null && item.defaultSelectedIndex.toString().length > 0) { // 处理并列菜单默认值 |
|
|
|
if (!this.independence && item.defaultSelectedIndex != null && item.defaultSelectedIndex.toString() |
|
|
|
|
|
|
|
.length > 0) { // 处理并列菜单默认值 |
|
|
|
|
|
|
|
|
|
|
|
if (item.isMutiple) { |
|
|
|
if (item.isMutiple) { |
|
|
|
obj[item.key] = []; |
|
|
|
obj[item.key] = []; |
|
|
@ -150,12 +157,14 @@ |
|
|
|
if (Array.isArray(this.menuList[i].defaultSelectedIndex)) { // 把所有默认的为false的点为true |
|
|
|
if (Array.isArray(this.menuList[i].defaultSelectedIndex)) { // 把所有默认的为false的点为true |
|
|
|
for (let j = 0; j < this.menuList[i].defaultSelectedIndex.length; j++) { |
|
|
|
for (let j = 0; j < this.menuList[i].defaultSelectedIndex.length; j++) { |
|
|
|
if (this.selectDetailList[this.menuList[i].defaultSelectedIndex[j]].isSelected == false) { |
|
|
|
if (this.selectDetailList[this.menuList[i].defaultSelectedIndex[j]].isSelected == false) { |
|
|
|
this.itemTap(this.menuList[i].defaultSelectedIndex[j], this.selectDetailList, this.menuList[i].isMutiple, this |
|
|
|
this.itemTap(this.menuList[i].defaultSelectedIndex[j], this.selectDetailList, this |
|
|
|
|
|
|
|
.menuList[i].isMutiple, this |
|
|
|
.menuList[i].key) |
|
|
|
.menuList[i].key) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.itemTap(this.menuList[i].defaultSelectedIndex, this.selectDetailList, this.menuList[i].isMutiple, this.menuList[ |
|
|
|
this.itemTap(this.menuList[i].defaultSelectedIndex, this.selectDetailList, this.menuList[i] |
|
|
|
|
|
|
|
.isMutiple, this.menuList[ |
|
|
|
i].key) |
|
|
|
i].key) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -164,7 +173,8 @@ |
|
|
|
// 把所有不是默认的为true的点为false |
|
|
|
// 把所有不是默认的为true的点为false |
|
|
|
for (let j = 0; j < unDefaultSelectedIndexArr.length; j++) { |
|
|
|
for (let j = 0; j < unDefaultSelectedIndexArr.length; j++) { |
|
|
|
if (this.selectDetailList[unDefaultSelectedIndexArr[j]].isSelected == true) { |
|
|
|
if (this.selectDetailList[unDefaultSelectedIndexArr[j]].isSelected == true) { |
|
|
|
this.itemTap(unDefaultSelectedIndexArr[j], this.selectDetailList, this.menuList[i].isMutiple, this |
|
|
|
this.itemTap(unDefaultSelectedIndexArr[j], this.selectDetailList, this.menuList[i] |
|
|
|
|
|
|
|
.isMutiple, this |
|
|
|
.menuList[i].key) |
|
|
|
.menuList[i].key) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -405,10 +415,12 @@ |
|
|
|
.filter-content-detail-item-active { |
|
|
|
.filter-content-detail-item-active { |
|
|
|
background-color: #D1372C; |
|
|
|
background-color: #D1372C; |
|
|
|
color: #FFFFFF; |
|
|
|
color: #FFFFFF; |
|
|
|
padding: 5px 15px; |
|
|
|
padding: 5px 0px; |
|
|
|
border-radius: 20px; |
|
|
|
border-radius: 5px; |
|
|
|
margin-right: 8px; |
|
|
|
width: 21%; |
|
|
|
margin-top: 10px; |
|
|
|
margin-left: 4%; |
|
|
|
|
|
|
|
text-align: center; |
|
|
|
|
|
|
|
margin-top: 15px; |
|
|
|
display: inline-block; |
|
|
|
display: inline-block; |
|
|
|
font-size: 13px; |
|
|
|
font-size: 13px; |
|
|
|
} |
|
|
|
} |
|
|
@ -416,10 +428,12 @@ |
|
|
|
.filter-content-detail-item-default { |
|
|
|
.filter-content-detail-item-default { |
|
|
|
background-color: #FFFFFF; |
|
|
|
background-color: #FFFFFF; |
|
|
|
color: #666666; |
|
|
|
color: #666666; |
|
|
|
padding: 5px 15px; |
|
|
|
padding: 5px 0px; |
|
|
|
border-radius: 5px; |
|
|
|
border-radius: 5px; |
|
|
|
margin-right: 8px; |
|
|
|
width: 21%; |
|
|
|
margin-top: 10px; |
|
|
|
margin-left: 4%; |
|
|
|
|
|
|
|
text-align: center; |
|
|
|
|
|
|
|
margin-top: 15px; |
|
|
|
display: inline-block; |
|
|
|
display: inline-block; |
|
|
|
font-size: 13px; |
|
|
|
font-size: 13px; |
|
|
|
} |
|
|
|
} |
|
|
|