|  | @@ -4,13 +4,13 @@
 | 
	
		
			
				|  |  |  			<view class="topCont">
 | 
	
		
			
				|  |  |  				<view class="carBox">
 | 
	
		
			
				|  |  |  					<image src="../../static/img/nocar.png" mode="" class="carLogo"></image>
 | 
	
		
			
				|  |  | -					<view class="carTxt">华晨宝马iX3 G08 电动 HA001N0电动领先型 ( 改款 )(2021-2021)过长换行</view>
 | 
	
		
			
				|  |  | +					<view class="carTxt">{{brand_name}}</view>
 | 
	
		
			
				|  |  |  					<!-- <image src="../../static/img/jt.png" mode="" class="carJt"></image> -->
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view class="vinBox">
 | 
	
		
			
				|  |  |  					<view class="vinBox2">
 | 
	
		
			
				|  |  |  						<view class="vinB">VIN</view>
 | 
	
		
			
				|  |  | -						<view class="vinNum">HNUJN8888999H9098</view>
 | 
	
		
			
				|  |  | +						<view class="vinNum">{{vin}}</view>
 | 
	
		
			
				|  |  |  					</view>
 | 
	
		
			
				|  |  |  					<view class="vinBox2">
 | 
	
		
			
				|  |  |  						<view class="detail" @click="goCarDetail()">车辆详情</view>
 | 
	
	
		
			
				|  | @@ -20,31 +20,44 @@
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  |  		</view>
 | 
	
		
			
				|  |  |  		<view class="mainBox">
 | 
	
		
			
				|  |  | -			<view class="maintitle">总组
 | 
	
		
			
				|  |  | +			<view class="maintitle">{{caption}}
 | 
	
		
			
				|  |  |  			   <view class="backBox">
 | 
	
		
			
				|  |  |  			   	  <image src="../../static/img/icon_arrow_blue_l@2x.png" mode="" class="backImg"></image>
 | 
	
		
			
				|  |  |  				  <view class="backTxt">返回总组</view>
 | 
	
		
			
				|  |  |  			   </view>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  | -			<view class="searchBox">
 | 
	
		
			
				|  |  | +			<view class="searchBox" v-if="lastShow">
 | 
	
		
			
				|  |  |  				<view class="inputBox">
 | 
	
		
			
				|  |  |  					<img src="../../static/img/icon_search.png" alt="" class="searchImg">
 | 
	
		
			
				|  |  | -					<input type="text" placeholder="快速查找子组" class="topInput">
 | 
	
		
			
				|  |  | +					<input type="text" placeholder="快速查找子组" class="topInput" v-model="childrenss" @confirm="childrenkeyup">
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  |  			
 | 
	
		
			
				|  |  | -			<view class="mainLine" v-for="(item,index) in 5" @click="goThree">
 | 
	
		
			
				|  |  | +			<view class="mainLine" v-for="(item,index) in childrenList" @click="goThree(item)" v-if="lastShow">
 | 
	
		
			
				|  |  |  				<view class="lineLeft">
 | 
	
		
			
				|  |  | -					<image class="lineIMg" src="http://dmsimg.66km.com/thFiles/7C057545-E11E-40F5-AD3C-637EF653B417.jpg" mode="aspectFit"></image>
 | 
	
		
			
				|  |  | +					<image class="lineIMg" :src="item.image_url" v-if="item.image_url" mode="aspectFit"></image>
 | 
	
		
			
				|  |  | +					<image  class="lineIMg" src="../../static/img/noimg.png" v-else mode="aspectFit"></image>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view class="lineRIght">
 | 
	
		
			
				|  |  | -					<view class="lineName">电气设备,排气和加热</view>
 | 
	
		
			
				|  |  | -					<view class="lineBm">UH908980</view>
 | 
	
		
			
				|  |  | -					<view class="linejs">这是备注,没有就不显示该行,长了有就不显示该有就不显示该长了有就不显示该</view>
 | 
	
		
			
				|  |  | +					<view class="lineName">{{item.caption}}</view>
 | 
	
		
			
				|  |  | +					<view class="lineBm">{{item.code}}</view>
 | 
	
		
			
				|  |  | +					<view class="linejs">{{item.remark}}</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				
 | 
	
		
			
				|  |  |  			
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  | +			<view class="mainBox" v-if="restrainShow1">
 | 
	
		
			
				|  |  | +				<view class="mainLine2" v-for="(item,index) in restrainList1" @click="restrainClickOne(item)">
 | 
	
		
			
				|  |  | +					<view class="lineName2">{{item.caption}}</view>
 | 
	
		
			
				|  |  | +					<image src="../../static/img/jt.png" mode="" class="mainLineJt"></image>
 | 
	
		
			
				|  |  | +				</view>
 | 
	
		
			
				|  |  | +			</view>
 | 
	
		
			
				|  |  | +			<view class="mainBox" v-if="restrainShow2">
 | 
	
		
			
				|  |  | +				<view class="mainLine2" v-for="(item,index) in restrainList2" @click="restrainClickTwo(item)">
 | 
	
		
			
				|  |  | +					<view class="lineName2">{{item.caption}}</view>
 | 
	
		
			
				|  |  | +					<image src="../../static/img/jt.png" mode="" class="mainLineJt"></image>
 | 
	
		
			
				|  |  | +				</view>
 | 
	
		
			
				|  |  | +			</view>
 | 
	
		
			
				|  |  |  		</view>
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  	</view>
 | 
	
	
		
			
				|  | @@ -54,23 +67,192 @@
 | 
	
		
			
				|  |  |  	export default {
 | 
	
		
			
				|  |  |  		data() {
 | 
	
		
			
				|  |  |  			return {
 | 
	
		
			
				|  |  | -				title: 'Hello'
 | 
	
		
			
				|  |  | +				vin: '',
 | 
	
		
			
				|  |  | +				brand_name:'',
 | 
	
		
			
				|  |  | +				access_time:'',
 | 
	
		
			
				|  |  | +				zzTime:'',
 | 
	
		
			
				|  |  | +				caption:'',
 | 
	
		
			
				|  |  | +				param:'',
 | 
	
		
			
				|  |  | +				token:'',
 | 
	
		
			
				|  |  | +				list:'',
 | 
	
		
			
				|  |  | +				restrainShow1:false,
 | 
	
		
			
				|  |  | +				restrainList1:'',
 | 
	
		
			
				|  |  | +				restrainShow1:false,
 | 
	
		
			
				|  |  | +				restrainList1:'',
 | 
	
		
			
				|  |  | +				lastShow:false,
 | 
	
		
			
				|  |  | +				childrenList:'',
 | 
	
		
			
				|  |  | +				oldList:'',
 | 
	
		
			
				|  |  | +				childrenss:'',
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  | -		onLoad() {
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | +		onLoad(opt) {
 | 
	
		
			
				|  |  | +           this.vin=opt.vin;
 | 
	
		
			
				|  |  | +		   this.zzTime=opt.zzTime;
 | 
	
		
			
				|  |  | +		   this.param=opt.param;
 | 
	
		
			
				|  |  | +		   this.token=opt.token;
 | 
	
		
			
				|  |  | +		   this.getData()
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		methods: {
 | 
	
		
			
				|  |  | +			restrainClickOne(item){
 | 
	
		
			
				|  |  | +				this.param=item.param;
 | 
	
		
			
				|  |  | +				this.token=item.token;
 | 
	
		
			
				|  |  | +				if(item.next_restrain==1){
 | 
	
		
			
				|  |  | +				  this.getYsone()
 | 
	
		
			
				|  |  | +				}else{
 | 
	
		
			
				|  |  | +				 this.getYsDlist()
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			},
 | 
	
		
			
				|  |  | +			
 | 
	
		
			
				|  |  | +			restrainClickTwo(item){
 | 
	
		
			
				|  |  | +				this.param=item.param;
 | 
	
		
			
				|  |  | +				this.token=item.token;
 | 
	
		
			
				|  |  | +				if(item.next_restrain==1){
 | 
	
		
			
				|  |  | +				  this.getYsDlist()
 | 
	
		
			
				|  |  | +				}else{
 | 
	
		
			
				|  |  | +				  this.getYsDlist()
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			},
 | 
	
		
			
				|  |  | +			getYsDlist(){
 | 
	
		
			
				|  |  | +				uni.showLoading({
 | 
	
		
			
				|  |  | +					title: '加载中'
 | 
	
		
			
				|  |  | +				});
 | 
	
		
			
				|  |  | +				this.$http('advancedEpc/getSubgroupPc', {
 | 
	
		
			
				|  |  | +					vin:this.vin,
 | 
	
		
			
				|  |  | +					access_time:this.access_time,
 | 
	
		
			
				|  |  | +					param:this.param,
 | 
	
		
			
				|  |  | +					token:this.token
 | 
	
		
			
				|  |  | +					
 | 
	
		
			
				|  |  | +				}, 'GET').then(res => {
 | 
	
		
			
				|  |  | +					uni.hideLoading();
 | 
	
		
			
				|  |  | +					//console.log(res.data.number);
 | 
	
		
			
				|  |  | +					if(res.data.number==200||res.data.number==5212){
 | 
	
		
			
				|  |  | +					     this.caption=res.data.result.caption;
 | 
	
		
			
				|  |  | +						 this.brand_name=res.data.result.brand_name;
 | 
	
		
			
				|  |  | +						 this.access_time=res.data.result.access_time;
 | 
	
		
			
				|  |  | +						 this.restrainShow2=false;
 | 
	
		
			
				|  |  | +						 this.restrainShow1=false;
 | 
	
		
			
				|  |  | +						 this.lastShow=true;
 | 
	
		
			
				|  |  | +						 this.childrenList=res.data.result.list;
 | 
	
		
			
				|  |  | +						 this.oldList= this.childrenList
 | 
	
		
			
				|  |  | +						
 | 
	
		
			
				|  |  | +					}else{
 | 
	
		
			
				|  |  | +					   uni.showToast({
 | 
	
		
			
				|  |  | +					   	title: res.data.message,
 | 
	
		
			
				|  |  | +					   	icon: 'none',
 | 
	
		
			
				|  |  | +					   	duration: 3000
 | 
	
		
			
				|  |  | +					   });
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +							
 | 
	
		
			
				|  |  | +				});
 | 
	
		
			
				|  |  | +			},
 | 
	
		
			
				|  |  | +			getYsone(){
 | 
	
		
			
				|  |  | +				uni.showLoading({
 | 
	
		
			
				|  |  | +					title: '加载中'
 | 
	
		
			
				|  |  | +				});
 | 
	
		
			
				|  |  | +				this.$http('advancedEpc/getSubgroupPc', {
 | 
	
		
			
				|  |  | +					vin:this.vin,
 | 
	
		
			
				|  |  | +					access_time:this.access_time,
 | 
	
		
			
				|  |  | +					param:this.param,
 | 
	
		
			
				|  |  | +					token:this.token
 | 
	
		
			
				|  |  | +					
 | 
	
		
			
				|  |  | +				}, 'GET').then(res => {
 | 
	
		
			
				|  |  | +					uni.hideLoading();
 | 
	
		
			
				|  |  | +					//console.log(res.data.number);
 | 
	
		
			
				|  |  | +					if(res.data.number==200||res.data.number==5212){
 | 
	
		
			
				|  |  | +					     this.caption=res.data.result.caption;
 | 
	
		
			
				|  |  | +						 this.brand_name=res.data.result.brand_name;
 | 
	
		
			
				|  |  | +						 this.access_time=res.data.result.access_time;
 | 
	
		
			
				|  |  | +						if(res.data.result.level_identify=='group_restrain'||res.data.result.level_identify=='subgroup'){  //约束
 | 
	
		
			
				|  |  | +						  console.log("约束2")
 | 
	
		
			
				|  |  | +						  this.restrainShow2=true;
 | 
	
		
			
				|  |  | +						  this.restrainShow1=false;
 | 
	
		
			
				|  |  | +						  this.restrainList2=res.data.result.list;
 | 
	
		
			
				|  |  | +						 
 | 
	
		
			
				|  |  | +						}else{
 | 
	
		
			
				|  |  | +						   this.lastShow=true;
 | 
	
		
			
				|  |  | +						   this.childrenList=res.data.result.list;
 | 
	
		
			
				|  |  | +						   this.oldList= this.childrenList
 | 
	
		
			
				|  |  | +						}
 | 
	
		
			
				|  |  | +					}else{
 | 
	
		
			
				|  |  | +					   uni.showToast({
 | 
	
		
			
				|  |  | +					   	title: res.data.message,
 | 
	
		
			
				|  |  | +					   	icon: 'none',
 | 
	
		
			
				|  |  | +					   	duration: 3000
 | 
	
		
			
				|  |  | +					   });
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +							
 | 
	
		
			
				|  |  | +				});
 | 
	
		
			
				|  |  | +			},
 | 
	
		
			
				|  |  | +			getData(){
 | 
	
		
			
				|  |  | +				uni.showLoading({
 | 
	
		
			
				|  |  | +					title: '加载中'
 | 
	
		
			
				|  |  | +				});
 | 
	
		
			
				|  |  | +				this.$http('advancedEpc/getSubgroupPc', {
 | 
	
		
			
				|  |  | +					vin:this.vin,
 | 
	
		
			
				|  |  | +					access_time:this.zzTime,
 | 
	
		
			
				|  |  | +					param:this.param,
 | 
	
		
			
				|  |  | +					token:this.token
 | 
	
		
			
				|  |  | +					
 | 
	
		
			
				|  |  | +				}, 'GET').then(res => {
 | 
	
		
			
				|  |  | +					uni.hideLoading();
 | 
	
		
			
				|  |  | +					//console.log(res.data.number);
 | 
	
		
			
				|  |  | +					if(res.data.number==200||res.data.number==5212){
 | 
	
		
			
				|  |  | +					     this.caption=res.data.result.caption;
 | 
	
		
			
				|  |  | +						 this.brand_name=res.data.result.brand_name;
 | 
	
		
			
				|  |  | +						 this.access_time=res.data.result.access_time;
 | 
	
		
			
				|  |  | +						if(res.data.result.level_identify=='group_restrain'||res.data.result.level_identify=='subgroup'){  //约束
 | 
	
		
			
				|  |  | +						  console.log("约束1")
 | 
	
		
			
				|  |  | +						  this.restrainShow1=true;
 | 
	
		
			
				|  |  | +						  this.restrainList1=res.data.result.list;
 | 
	
		
			
				|  |  | +						 
 | 
	
		
			
				|  |  | +						}else{
 | 
	
		
			
				|  |  | +						   this.lastShow=true;
 | 
	
		
			
				|  |  | +						  
 | 
	
		
			
				|  |  | +						   this.childrenList=res.data.result.list;
 | 
	
		
			
				|  |  | +						   this.oldList= this.childrenList
 | 
	
		
			
				|  |  | +						}
 | 
	
		
			
				|  |  | +					}else{
 | 
	
		
			
				|  |  | +					   uni.showToast({
 | 
	
		
			
				|  |  | +					   	title: res.data.message,
 | 
	
		
			
				|  |  | +					   	icon: 'none',
 | 
	
		
			
				|  |  | +					   	duration: 3000
 | 
	
		
			
				|  |  | +					   });
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +							
 | 
	
		
			
				|  |  | +				});
 | 
	
		
			
				|  |  | +			},
 | 
	
		
			
				|  |  |  			goCarDetail(){
 | 
	
		
			
				|  |  |  				uni.navigateTo({
 | 
	
		
			
				|  |  |  					url:'CarDetail'
 | 
	
		
			
				|  |  |  				})
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  | -             goThree(){
 | 
	
		
			
				|  |  | +             goThree(item){
 | 
	
		
			
				|  |  |  				 uni.navigateTo({
 | 
	
		
			
				|  |  | -				 	url:'modelThree'
 | 
	
		
			
				|  |  | +				 	url:'modelThree?vin='+this.vin+'&token='+item.token+'¶m='+item.param+'&access_time='+this.access_time
 | 
	
		
			
				|  |  |  				 })
 | 
	
		
			
				|  |  | -			 }
 | 
	
		
			
				|  |  | +			 },
 | 
	
		
			
				|  |  | +			 childrenkeyup(){
 | 
	
		
			
				|  |  | +				 this.childrenList=this.oldList;
 | 
	
		
			
				|  |  | +				 if(this.childrenss==''){
 | 
	
		
			
				|  |  | +				 
 | 
	
		
			
				|  |  | +				  this.childrenList=this.oldList;
 | 
	
		
			
				|  |  | +				 }else{
 | 
	
		
			
				|  |  | +				 
 | 
	
		
			
				|  |  | +				     this.childrenList=this.query(this.childrenList,this.childrenss,'caption')
 | 
	
		
			
				|  |  | +				 
 | 
	
		
			
				|  |  | +				 }
 | 
	
		
			
				|  |  | +			 },
 | 
	
		
			
				|  |  | +			 query(list, keyWord, attribute = 'caption') {
 | 
	
		
			
				|  |  | +			   const reg = new RegExp(keyWord) // 创建正则表达式
 | 
	
		
			
				|  |  | +			   const arr = []
 | 
	
		
			
				|  |  | +			   for (let i = 0; i < list.length; i++) {
 | 
	
		
			
				|  |  | +			     if (reg.test(list[i][attribute])) {
 | 
	
		
			
				|  |  | +			       arr.push(list[i])
 | 
	
		
			
				|  |  | +			     }
 | 
	
		
			
				|  |  | +			   }
 | 
	
		
			
				|  |  | +			   return arr
 | 
	
		
			
				|  |  | +			 
 | 
	
		
			
				|  |  | +			 },
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  </script>
 | 
	
	
		
			
				|  | @@ -208,6 +390,19 @@
 | 
	
		
			
				|  |  |  		  text-overflow: ellipsis;/*隐藏后添加省略号*/
 | 
	
		
			
				|  |  |  		  white-space: nowrap;/*强制不换行*/
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  | +	.mainLine2{
 | 
	
		
			
				|  |  | +		display: flex;
 | 
	
		
			
				|  |  | +		justify-content: space-between;
 | 
	
		
			
				|  |  | +		border-bottom: 1px solid #EEEEEE;
 | 
	
		
			
				|  |  | +		padding:24rpx;
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +	.lineName2{
 | 
	
		
			
				|  |  | +		font-size: 28rpx;
 | 
	
		
			
				|  |  | +		font-family: PingFangSC-Regular, PingFang SC;
 | 
	
		
			
				|  |  | +		font-weight: 400;
 | 
	
		
			
				|  |  | +		color: #333333;
 | 
	
		
			
				|  |  | +		line-height: 40rpx;
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  |  	.lineIMg{
 | 
	
		
			
				|  |  |  		width: 110rpx;height: 110rpx;
 | 
	
		
			
				|  |  |  	}
 |