@@ -16,71 +16,86 @@
< text > { { item . detailTitle } } < / text >
< / view >
<!-- < view class = "filter-content-detail show_min_height" > -- >
< scroll-view scroll -y = " true " >
< view class = "" >
< span class = "zdyTitle" v-if = "( productCodeLable? index==3 : false ) " > 渠道 < / span >
< view class = "filter-content-detail show_min_height" >
< text v-if = "( productCodeLable? index==3 : false ) " v-for="( detailItem,idx) in selectDetailLists" :key="idx" class='filter-content-detail-item-default' :style="{'background-color':detailItem.isSelected?themeColor:'#FFFFFF','color':detailItem.isSelected?'#FFFFFF':'#666666'}"
@tap ="itemTaps(idx,selectDetailLists,item.isMutiple,'channelCode',detailItem)" >
{{ detailI tem.title }}
< / text >
< / view >
< span class = "zdyTitle" v-if = "( productCodeLable? index==3 : false ) " > 品牌 < / span >
< view class = "filter-content-detail show_min_height" >
< text v-if = "( productCodeLable? index!==2 : true ) " v-for="( detailItem,idx) in selectDetailList" :key="idx" class='filter-content-detail-item-default' :style="{'background-color':detailItem.isSelected?themeColor:'#FFFFFF','color':detailItem.isSelected?'#FFFFFF':'#666666'}"
@tap ="itemTap(idx,selectDetailList,item.isMutiple,item.key,detailItem,index)" >
{{ detailItem.title }}
< / text >
< / view >
< view style = "margin-bottom: 10rpx;" v-for = "(p,pIndex) in productCodeLable" v-if="(productCodeLable? index==2:false) " >
< view class = "newselsetitle" > { { p } } < / view >
< view class = "newselse" >
< text : style = "{background:seleIdex == zIndex +'/'+ p + '/' + index?'#FF6700':'',color:seleIdex == zIndex +'/'+ p + '/' + index?'#FFFFFF':'',border:seleIdex == zIndex +'/'+ p + '/' + index?'0px':''}" @click ="pseleFn(zIndex,p,index)" v-for = "(z,zIndex) in productCodeList[p]" class="newselseitem" > { { z } } < / text >
< / view >
< scroll-view scroll -y = " true " >
< view class = "" >
< span class = "zdyTitle" v-if = "( productCodeLable? index==3 : false ) " > 渠道 < / span >
< view class = "filter-content-detail show_min_height" >
< text v-if = "( productCodeLable? index==3 : false ) "
v-for = "( detailItem,idx) in selectDetailLists" :key="idx"
class = 'filter-content- detail-i tem-default'
:style = "{'background-color':detailItem.isSelected?themeColor:'#FFFFFF','color':detailItem.isSelected?'#FFFFFF':'#666666'}"
@tap ="itemTaps(idx,selectDetailLists,item.isMutiple,'channelCode',detailItem)" >
{{ detailItem.title }}
< / text >
< / view >
< span class = "zdyTitle" v-if = "( productCodeLable? index==3 : false ) " > 品牌 < / span >
< view class = "filter-content-detail show_min_height" >
< text v-if = "( productCodeLable? index!==2 : true ) "
v-for = "( detailItem,idx) in selectDetailList" :key="idx"
class = 'filter-content-detail-item-default'
:style = "{'background-color':detailItem.isSelected?themeColor:'#FFFFFF','color':detailItem.isSelected?'#FFFFFF':'#666666'}"
@tap ="itemTap(idx,selectDetailList,item.isMutiple,item.key,detailItem,index)" >
{{ detailItem.title }}
< / text >
< / view >
< view style = "margin-bottom: 10rpx;" v-for = "(p,pIndex) in productCodeLable"
v-if = "(productCodeLable? index==2:false) " >
< view class = "newselsetitle" > { { p } } < / view >
< view class = "newselse" >
< text
: style = "{background:seleIdex == zIndex +'/'+ p + '/' + index?'#FF6700':'',color:seleIdex == zIndex +'/'+ p + '/' + index?'#FFFFFF':'',border:seleIdex == zIndex +'/'+ p + '/' + index?'0px':''}"
@click ="pseleFn(zIndex,p,index)" v-for = "(z,zIndex) in productCodeList[p]"
class = "newselseitem" > { { z } } < / text >
< / view >
< / view >
< / scroll- view>
< / view >
< / scroll-view >
< / view >
< view class = "filter-content-detail" v-show = "pickerShow" >
< ! - - 省市区选择 - - >
< view class = "region-box" v-if = "( productCodeLable? index==1 : true ) " >
< picker -view :value = "region" @change ="bindChange" >
< picker -view -column >
< view class = "center" v-for = "(item, index) in areaCodeList" :key="index" >
< ! - - v-show不可去除 去掉会显示undefined 原因未知 - - >
< view v-show = "false" > {{ JSON.stringify ( item.areaName ) }} < / view >
{{ item.areaName }}
< / view >
< / picker -view -column >
< picker-view-column v-if = "areaCodeList[areaIndex[0]]" >
< view class = "center" v-for = "(item, index) in areaCodeList[areaIndex[0]].childList"
:key = "index" >
< view v-show = "false" > {{ JSON.stringify ( item.areaName ) }} < / view >
{{ item.areaName }}
< / view >
< / picker -view -column >
< picker-view-column v-if = "areaCodeList[areaIndex[0]]" >
< view class = "center"
v-for = "(item, index) in areaCodeList[areaIndex[0]].childList[areaIndex[1]].childList"
:key = "index" >
< view v-show = "false" > {{ JSON.stringify ( item.areaName ) }} < / view >
{{ item.areaName }}
< / view >
< / picker -view -column >
< / picker-view >
< / view >
< view class = "filter-content-detail" v-show = "pickerShow" >
< ! - - 省市区选择 - - >
< view class = "region-box" v-if = "( productCodeLable? index==1 : true ) " >
< picker -view :value = "region" @change ="bindChange " >
< picker -view -column >
< view class = "center" v-for = "(item, index) in areaCodeList" :key="index" >
< ! - - v-show不可去除 去掉会显示undefined 原因未知 - - >
< view v-show = "false" > {{ JSON.stringify ( item.areaName ) }} < / view >
{{ item.areaName }}
< / view >
< / picker -view -column >
< picker-view-column v-if = "areaCodeList[areaIndex[0]]" >
< view class = "center" v-for = "(item, index) in areaCodeList[areaIndex[0]].childList" :key="index" >
< view v-show = "false" > {{ JSON.stringify ( item.areaName ) }} < / view >
{{ item.areaName }}
< / view >
< / picker -view -column >
< picker-view-column v-if = "areaCodeList[areaIndex[0]]" >
< view class = "center"
v-for = "(item, index) in areaCodeList[areaIndex[0]].childList[areaIndex[1]].childList" :key="index" >
< view v-show = "false" > {{ JSON.stringify ( item.areaName ) }} < / view >
{{ item.areaName }}
< / view >
< / picker -view -column >
< / picker-view >
< / view >
< / view >
< view class = "filter-content-footer" >
< view class = "filter-content-footer-item" style = "color: #777777; background-color: #FFFFFF;"
@tap ="resetClick(selectDetailList,item.key,selectDetailLists,'channelCode',index) ">
< text > 重置 < / text >
< / view >
< view class = "filter-content-footer">
< view class = "filter-content-footer-item" style = "color: #777777; background-color: #FFFFFF;" @tap ="resetClick(selectDetailList,item.key,selectDetailLists,'channelCode',index)" >
< text > 重置 < / text >
< / view >
< view class = "filter-content-footer-item" : style = "{'color': '#FFFFFF', 'background-color': themeColor}" @tap ="sureClick(selectDetailList,item.key,index)" >
< text > 确定 < / text >
< / view >
< view class = "filter-content-footer-item "
: style = "{' color' : '#FFFFFF', ' background-color' : themeColor}"
@tap ="sureClick(selectDetailList,item.key,index)" >
< text > 确定 < / text >
< / view >
< / view >
< / view >
< / view >
< / view >
< / view >
< / template >
@@ -88,7 +103,7 @@
export default {
data ( ) {
return {
productCodeLable : null ,
productCodeLable : null ,
selectArr : [ ] ,
result : { } ,
menuIndex : 0 ,
@@ -98,17 +113,17 @@
selectedKey : '' ,
cacheSelectedObj : { } ,
defaultSelectedTitleObj : { } ,
seleIdex : null ,
areaCodeList : [ ] ,
areaIndex : [ 0 , 0 , 0 ] ,
provinceCode : '' ,
cityCode : '' ,
areaCode : '' ,
region : [ ] ,
paixu : 1 ,
oilCode : '0#' ,
showHide : true ,
pickerShow : false ,
seleIdex : null ,
areaCodeList : [ ] ,
areaIndex : [ 0 , 0 , 0 ] ,
provinceCode : '' ,
cityCode : '' ,
areaCode : '' ,
region : [ ] ,
paixu : 1 ,
oilCode : '0#' ,
showHide : true ,
pickerShow : false ,
} ;
} ,
props : {
@@ -141,15 +156,15 @@
default : false
}
} ,
watch : {
productCodeList : function ( n , o ) {
console. log ( '%c 打印的新的列表格式箭头↓zxxxx', 'color:red;font-size:32px')
watch : {
productCodeList : function ( n , o ) {
// console.log( '%c 打印的新的列表格式箭头↓zxxxx', 'color:red;font-size:32px')
this . setingFn ( )
console. log ( this . productCodeList, this . menuList, '9999999999999')
// console.log(this. productCodeList,this. menuList, '9999999999999')
} ,
selectDetailList : function ( n , o ) {
console. log ( '%c 元数组切换↓1', 'font-size:50px;color:blue')
console. log ( this . menuIndex)
selectDetailList : function ( n , o ) {
// console.log( '%c 元数组切换↓1', 'font-size:50px;color:blue')
// console.log(this. menuIndex)
}
} ,
@@ -158,11 +173,32 @@
* @property {Object} productCodeList: 传入的新列表格式
* @property {Array} productCodeLable: 传入的新列表格式的列表标题
* @property {Function} setingFn: 调用微信接口获取code 通过code调用服务端接口换取请求头数据
*/
// console.log(this.menuList,'打印列表列表')
*/
// console.log(this.menuList,'打印列表列表')
this . setingFn ( )
this . areaCodeList = uni . getStorageSync ( 'areaCodeList' )
this . areaCodeList . unshift ( { areaName : '全部' , childList : [ { areaName : '' , childList : [ { areaName : '' } ] } ] } )
this . areaCodeList = uni . getStorageSync ( 'areaCodeList' ) || [ ]
this . areaCodeList . unshift ( {
areaName : '全部' ,
childList : [ {
areaName : '' ,
childList : [ {
areaName : ''
} ]
} ]
} )
if ( this . areaCodeList . length === 1 ) {
let instance = setInterval ( ( ) => {
// console.log('执行一次')
if ( this . areaCodeList1 . length ) {
clearInterval ( instance )
this . areaCodeList = [ ... this . areaCodeList , ... this . areaCodeList1 ]
}
} , 2000 )
}
// setTimeout(() => {
// },3000)
// setTimeout(()=>{
// if(this.areaCodeList1.length<1){
// this.areaCodeList = uni.getStorageSync('areaCodeList')
@@ -199,17 +235,17 @@
} ,
methods : {
//选择值改变事件 省市区级联选择
bindChange ( e , ccc ) {
bindChange ( e , ccc ) {
// 用于对比滑动的是哪一列数据
const val = e . detail . value
this . areaIndex = val
this . region = val
console . log ( this . areaIndex , val , '省市区下标' )
if ( this . areaIndex [ 0 ] !== val [ 0 ] ) {
console . log ( this . areaIndex , val , '省市区下标' )
if ( this . areaIndex [ 0 ] !== val [ 0 ] ) {
// 如果滑动的是第一列数据, 让二三列恢复到0
this . areaIndex = [ val [ 0 ] , 0 , 0 ]
// console.log(this.areaCodeList[val[0]].childList[0].areaName,'打印是否[全部]')
} else if ( this . areaIndex [ 1 ] !== val [ 1 ] ) {
} else if ( this . areaIndex [ 1 ] !== val [ 1 ] ) {
this . areaIndex [ 1 ] = val [ 1 ]
// 滑动的是第二列数据
this . areaIndex = [ val [ 0 ] , val [ 1 ] , 0 ]
@@ -217,41 +253,46 @@
} else {
this . areaIndex = e . detail . value ;
}
if ( ! ccc ) {
if ( ! ccc ) {
// 数组push‘ 全部’
if ( val [ 0 ] != 0 ) {
if ( this . areaCodeList [ val [ 0 ] ] . childList [ 0 ] . areaName != '全部' ) {
this . areaCodeList [ val [ 0 ] ] . childList . unshift ( { areaName : '全部' } )
if ( val [ 0 ] != 0 ) {
if ( this . areaCodeList [ val [ 0 ] ] . childList [ 0 ] . areaName != '全部' ) {
this . areaCodeList [ val [ 0 ] ] . childList . unshift ( {
areaName : '全部'
} )
}
if ( this . areaIndex [ 1 ] != 0 ) {
if ( this . areaCodeList [ val [ 0 ] ] . childList [ val [ 1 ] ] . childList [ 0 ] . areaName != '全部' ) {
this . areaCodeList [ val [ 0 ] ] . childList [ val [ 1 ] ] . childList . unshift ( { areaName : '全部' } )
if ( this . areaIndex [ 1 ] != 0 ) {
if ( this . areaCodeList [ val [ 0 ] ] . childList [ val [ 1 ] ] . childList [ 0 ] . areaName != '全部' ) {
this . areaCodeList [ val [ 0 ] ] . childList [ val [ 1 ] ] . childList . unshift ( {
areaName : '全部'
} )
}
}
this . provinceCode = this . areaCodeList [ this . areaIndex [ 0 ] ] . id
this . cityCode = this . areaCodeList [ this . areaIndex [ 0 ] ] . childList [ this . areaIndex [ 1 ] ] . id
this . areaCode = this . areaCodeList [ this . areaIndex [ 0 ] ] . childList [ this . areaIndex [ 1 ] ] . childList [ this . areaIndex [ 2 ] ] . id
} else {
this . provinceCode = this . cityCode = this . areaCode = ''
this . areaIn dex = [ 0 , 0 , 0 ]
this . areaCode = this . areaCodeList [ this . areaIndex [ 0 ] ] . childList [ this . areaIndex [ 1 ] ] . childList [ this
. areaIndex [ 2 ] ] . id
} else {
this . provinceCo de = this . cityCode = this . areaCode = ''
this . areaIndex = [ 0 , 0 , 0 ]
}
}
this . $emit ( 'changeArea' , e )
this . $emit ( 'changeArea' , e )
} ,
pseleFn ( e , w , j ) {
if ( arguments . length < 3 ){
this. seleIdex = ' # ' + ' / ' + ' 柴油 ' + ' / ' + this. menuIndex
} else{
this. seleIdex = e + ' / ' + w + ' / ' + j
pseleFn ( e , w , j ) {
if ( arguments . length < 3 ) {
this. seleIdex = '# ' + '/' + '柴油 ' + '/ ' + this. menuIndex
} else {
this. seleIdex = e + '/' + w + '/ ' + j
}
// this.oilCode = this.seleIdex
// console.log(e,w,j,'aaaaaaaaaaaaaaaaa')
} ,
setingFn ( ){
if ( this. productCodeList ){
setingFn ( ) {
if ( this. productCodeList ) {
this . productCodeLable = Object . keys ( this . productCodeList )
}
// console.log(this.productCodeLable,'ddddddddddddddddddd')
@@ -260,7 +301,8 @@
let obj = { }
for ( let i = 0 ; i < this . menuList . length ; 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 ) {
obj [ item . key ] = [ ] ;
@@ -303,7 +345,7 @@
resetAllSelect ( callback ) {
let titles = [ ] ;
for ( let i = 0 ; i < this . menuList . length ; i ++ ) {
this . resetSelected ( this . menuList [ i ] . detailList , this . menuList [ i ] . key ) ;
this . resetSelected ( this . menuList [ i ] . detailList , this . menuList [ i ] . key ) ;
titles [ this . menuList [ i ] . key ] = this . menuList [ i ] . title ;
}
// console.log(titles,'*************************')
@@ -324,16 +366,20 @@
if ( Array . isArray ( this . menuList [ i ] . defaultSelectedIndex ) ) { // 把所有默认的为false的点为true
for ( let j = 0 ; j < this . menuList [ i ] . defaultSelectedIndex . length ; j ++ ) {
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 )
this . itemTaps ( this . menuList [ i ] . defaultSelectedIndex [ j ] , this . selectDetailList , this
. menuList [ i ] . isMutiple , this
. menuList [ i ] . key )
this . itemTaps ( this . menuList [ i ] . defaultSelectedIndex [ j ] , this . selectDetailList , this . menuList [ i ] . isMutiple , this
. menuList [ i ] . key )
}
}
} else {
this . itemTap ( this . menuList [ i ] . defaultSelectedIndex , this . selectDetailList , this . menuList [ i ] . isMutiple , this . menuList [
i ] . key )
this . itemTaps ( 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 )
this . itemTaps ( this . menuList [ i ] . defaultSelectedIndex , this . selectDetailList , this . menuList [ i ]
. isMutiple , this . menuList [
i ] . key )
}
@@ -342,10 +388,12 @@
// 把所有不是默认的为true的点为false
for ( let j = 0 ; j < unDefaultSelectedIndexArr . length ; j ++ ) {
if ( this . selectDetailList [ unDefaultSelectedIndexArr [ j ] ] . isSelected == true ) {
this . itemTap ( unDefaultSelectedIndexArr [ j ] , this . selectDetailList , this . menuList [ i ] . isMutiple , this
. menuList [ i ] . key )
this . itemTaps ( unDefaultSelectedIndexArr [ j ] , this . selectDetailList , this . menuList [ i ] . isMutiple , this
. menuList [ i ] . key )
this . itemTap ( unDefaultSelectedIndexArr [ j ] , this . selectDetailList , this . menuList [ i ]
. isMutiple , this
. menuList [ i ] . key )
this . itemTaps ( unDefaultSelectedIndexArr [ j ] , this . selectDetailList , this . menuList [ i ]
. isMutiple , this
. menuList [ i ] . key )
}
}
}
@@ -449,7 +497,7 @@
}
} ,
//图标点击方法
itemTap ( index , list , isMutiple , key , detailItem , indexs ) {
itemTap ( index , list , isMutiple , key , detailItem , indexs ) {
//是否多选
if ( isMutiple == true ) {
list [ index ] . isSelected = ! list [ index ] . isSelected ;
@@ -511,11 +559,11 @@
}
}
}
if ( indexs == 1 ) {
if ( detailItem . value == 10 ) {
if ( indexs == 1 ) {
if ( detailItem . value == 10 ) {
this . detailItems = ''
this . pickerShow = true
} else {
} else {
this . detailItems = detailItem . value
this . provinceCode = ''
this . cityCode = ''
@@ -523,16 +571,16 @@
this . pickerShow = false
this . region = [ ]
}
} else {
} else {
this . pickerShow = false
}
if ( indexs == 2 ) {
if ( indexs == 2 ) {
this . oilCode = detailItem . value
}
if ( indexs == 0 ) {
this . paixu = detailItem . value == 'juli' ? 1 : 2
if ( indexs == 0 ) {
this . paixu = detailItem . value == 'juli' ? 1 : 2
}
console . log ( index , list , isMutiple , key , detailItem , indexs , '打印打印打印' )
console . log ( index , list , isMutiple , key , detailItem , indexs , '打印打印打印' )
// this.detailItems = detailItem.value*1000
}
// #ifdef H5
@@ -540,7 +588,7 @@
// #endif
} ,
//图标点击方法
itemTaps ( index , list , isMutiple , key , detailItem , indexs ) {
itemTaps ( index , list , isMutiple , key , detailItem , indexs ) {
//是否多选
if ( isMutiple == true ) {
list [ index ] . isSelected = ! list [ index ] . isSelected ;
@@ -602,13 +650,13 @@
}
}
}
console . log ( index , list , isMutiple , key , detailItem , '打印打印打印' )
console . log ( index , list , isMutiple , key , detailItem , '打印打印打印' )
}
// #ifdef H5
this . $forceUpdate ( ) ;
// #endif
} ,
resetSelected ( list , key , lists , keys ) {
resetSelected ( list , key , lists , keys ) {
// console.log('%c 重置方法第二步resetSelected函数参数↓','color:green;font-size:30px')
if ( typeof this . result [ key ] == 'object' ) {
this . result [ key ] = [ ] ;
@@ -625,7 +673,7 @@
list [ i ] . isSelected = false ;
}
}
if ( key == 'siteBrand' ) {
if ( key == 'siteBrand' ) {
if ( typeof this . result [ keys ] == 'object' ) {
this . result [ keys ] = [ ] ;
this . selectedTitleObj [ keys ] = lists [ 0 ] . title ;
@@ -672,33 +720,33 @@
this . $emit ( "confirm" , obj ) ;
} ,
//点击 确定方法
sureClick ( selectDetailList , item , index ) {
console . log ( index , this . oilCode , this . paixu , '5555555555555' )
if ( index == 2 && ! this . oilCode ) {
sureClick ( selectDetailList , item , index ) {
console . log ( index , this . oilCode , this . paixu , '5555555555555' )
if ( index == 2 && ! this . oilCode ) {
this . menuList [ 0 ] . detailList [ 0 ] . isSelected = true
this . menuList [ 0 ] . detailList [ 1 ] . isSelected = false
this . paixu = 1
this . selectedTitleObj [ 'sort' ] = '距离优先'
}
if ( index == 0 && ! this . oilCode && this . paixu == 2 ) {
if ( index == 0 && ! this . oilCode && this . paixu == 2 ) {
uni . showToast ( {
title : '请先选择油品再价格排序' ,
icon : 'none'
} )
this . itemTap ( 0 , selectDetailList , false , item , selectDetailList [ 1 ] , index )
this . itemTap ( 0 , selectDetailList , false , item , selectDetailList [ 1 ] , index )
this . paixu = 1
return
}
if ( this . areaIndex [ 0 ] == 0 ) {
if ( this . areaIndex [ 0 ] == 0 ) {
this . provinceCode = ''
this . cityCode = ''
this . areaCode = ''
}
if ( this . areaIndex [ 1 ] == 0 ) {
if ( this . areaIndex [ 1 ] == 0 ) {
this . cityCode = ''
this . areaCode = ''
}
if ( this . areaIndex [ 2 ] == 0 ) {
if ( this . areaIndex [ 2 ] == 0 ) {
this . areaCode = ''
}
let obj = {
@@ -709,43 +757,46 @@
obj . result . provinceCode = this . provinceCode
obj . result . cityCode = this . cityCode
obj . result . areaCode = this . areaCode
obj . result . distance = this . provinceCode ? '' : this . cityCode ? '' : this . areaCode ? '' : this . detailItems
obj . result . sort = this . paixu == 1 ? 'juli' : 'price'
obj . result . distance = this . provinceCode ? '' : this . cityCode ? '' : this . areaCode ? '' : this . detailItems
obj . result . sort = this . paixu == 1 ? 'juli' : 'price'
// obj.result.distance = this.detailItems
console . log ( obj , this . oilCode , 'look me!' )
console . log ( obj , this . oilCode , 'look me!' )
// console.log(this.seleIdex.split('/'),this.productCodeList[this.seleIdex.split('/')[1]][this.seleIdex.split('/')[0]],this.seleIdex.split('/')[2],'dddddddddddddddddd')
if ( this . seleIdex !== null && this . seleIdex . split ( '/' ) [ 2 ] == 2 ) {
if ( this . seleIdex !== null && this . seleIdex . split ( '/' ) [ 2 ] == 2 ) {
obj . result . oilProductCode = this . productCodeList [ this . seleIdex . split ( '/' ) [ 1 ] ] [ this . seleIdex . split ( '/' ) [ 0 ] ] ? this . productCodeList [ this . seleIdex . split ( '/' ) [ 1 ] ] [ this . seleIdex . split ( '/' ) [ 0 ] ] : ''
obj . title s. oilP roductCode = obj . result . oilProductCode ? obj . result . oilProductCode : '全部 '
obj . result . oilProductCode = this . productCodeList [ this . seleIdex . split ( '/' ) [ 1 ] ] [ this . seleIdex . split ( '/' ) [
0 ] ] ? thi s . p roductCodeList [ this . seleIdex . split ( '/' ) [ 1 ] ] [ this . seleIdex . split ( '/' ) [ 0 ] ] : ''
obj . titles . oilProductCode = obj . result . oilProductCode ? obj . result . oilProductCode : '全部'
this . oilCode = obj . result . oilProductCode
console . log ( obj , 'look me!2' )
console . log ( obj , 'look me!2' )
this . $emit ( "confirm" , obj ) ;
return
}
this . $emit ( "confirm" , obj ) ;
} ,
resetClick ( list , key , lists , keys , index ) {
console . log ( '%c 重置方法第一步resetClick函数参数↓' , 'color:red;font-size:30px' )
resetClick ( list , key , lists , keys , index ) {
console . log ( '%c 重置方法第一步resetClick函数参数↓' , 'color:red;font-size:30px' )
console . log ( list , key )
if ( this . seleIdex !== null && this . seleIdex . split ( '/' ) [ 2 ] == 2 ) {
console . log ( this . seleIdex . split ( '/' ) , this . productCodeList [ this . seleIdex . split ( '/' ) [ 1 ] ] [ this . seleIdex . split ( '/' ) [ 0 ] ] )
if ( this . seleIdex !== null && this . seleIdex . split ( '/' ) [ 2 ] == 2 ) {
console . log ( this . seleIdex . split ( '/' ) , this . productCodeList [ this . seleIdex . split ( '/' ) [ 1 ] ] [ this . seleIdex
. split ( '/' ) [ 0 ]
] )
this . pseleFn ( )
// console.log(obj,'look me!2')
// this.$emit("confirm", obj);
}
if ( key == 'channelCode' ) {
if ( key == 'channelCode' ) {
this . provinceCode = ''
this . cityCode = ''
this . areaCode = ''
}
this . resetSelected ( list , key , lists , keys )
if ( index == 2 ) {
this . resetSelected ( list , key , lists , keys )
if ( index == 2 ) {
this . oilCode = ''
this . paixu = 1
console . log ( this . oilCode , index , '9999999999999999' )
console . log ( this . oilCode , index , '9999999999999999' )
}
if ( index == 1 ) {
if ( index == 1 ) {
this . provinceCode = ''
this . cityCode = ''
this . areaCode = ''
@@ -753,14 +804,14 @@
this . region = [ ]
this . pickerShow = false
let aaa = {
detail : {
value : [ 0 , 0 ]
detail : {
value : [ 0 , 0 ]
}
}
let ccc = 1
this . bindChange ( aaa , ccc )
this . bindChange ( aaa , ccc )
}
if ( index == 0 ) {
if ( index == 0 ) {
this . paixu = 1
}
}
@@ -769,26 +820,29 @@
< / script >
< style >
. show _min _height {
max - height : 40 vh ;
/* overflow-y: scroll; */
display : flex ;
justify - content : flex - start ;
align - items : center ;
flex - direction : row ;
flex - wrap : wrap ;
. show _min _height {
max - height : 40 vh ;
/* overflow-y: scroll; */
display : flex ;
justify - content : flex - start ;
align - items : center ;
flex - direction : row ;
flex - wrap : wrap ;
}
. newselsetitle {
. newselsetitle {
font - weight : 600 ;
margin - bottom : 15 rpx ;
}
. newselse {
. newselse {
width : 100 % ;
display : flex ;
gap : 15 rpx ;
gap : 15 rpx ;
flex - wrap : wrap ;
}
. newselseitem {
. newselseitem {
padding : 5 rpx 10 rpx ;
/* background-color: #000000; */
display : flex ;
@@ -797,6 +851,7 @@
border : 1 rpx solid # bbbbbb ;
min - width : 90 rpx ;
}
. filter - content {
background - color : # F6F7F8 ;
}
@@ -884,49 +939,50 @@
}
< / style >
< style lang = "scss" scoped >
. region - box {
background - color : # FFFFFF ;
. center {
display : flex ;
justify - content : center ;
align - items : center ;
}
. btn - Block {
width : 100 % ;
. region - box {
background - color : # FFFFFF ;
padding : 25 upx ;
height : 230 upx ;
. btn - left {
width : 250 up x;
height : 80 upx ;
border - radius : 10 upx ;
color : # 289 CFD ;
background - color : rgba ( 153 , 153 , 153 , 0.2 ) ;
margin - right : 30 upx ;
. center {
display : fle x;
justify - content : center ;
align - items : center ;
}
. btn - right {
width : 250 upx ;
height : 80 upx ;
border - radius : 10 upx ;
color : # FFFFFF ;
background - color : # 289 CFD ;
. btn - Block {
width : 100 % ;
background - color : # FFFFFF ;
padding : 25 upx ;
height : 230 upx ;
. btn - left {
width : 250 upx ;
height : 80 upx ;
border - radius : 10 upx ;
color : # 289 CFD ;
background - color : rgba ( 153 , 153 , 153 , 0.2 ) ;
margin - right : 30 upx ;
}
. btn - right {
width : 250 upx ;
height : 80 upx ;
border - radius : 10 upx ;
color : # FFFFFF ;
background - color : # 289 CFD ;
}
}
. picker - view {
background - color : # FFFEFD ;
}
picker - view {
width : 100 % ;
height : 600 upx ;
}
}
. picker - view {
background - color : # FFFEFD ;
}
picker - view {
width : 100 % ;
height : 600 upx ;
}
}
. zdyTitle {
. zdyTitle {
font - weight : 600 ;
margin : 10 px 10 px 0 ;
display : block ;