Browse Source

bug修改

twt 2 years ago
parent
commit
48e789fc4a
2 changed files with 107 additions and 22 deletions
  1. 87 18
      src/page/carCk.vue
  2. 20 4
      src/page/index.vue

+ 87 - 18
src/page/carCk.vue

@@ -104,6 +104,28 @@
            </div>
 
          </div>
+
+         <div class="mainRight4" v-if="restrainShow4">
+           <div class="mainRightTop">
+             <div class="sx2"></div>
+             <div class="mainRightTopTitle">子组</div>
+           </div>
+           <div class="mainRightCont">
+             <div class="mainRightLine2" v-for="(item,index) in childrenList" @click="childrenClick(item,index)">
+               <div class="mainRightLineImgBox">
+                 <img class="mainRightLineImg" v-if="item.image_url" :src="item.image_url.split('').reverse().join('').replace(/09/, '023').split('').reverse().join('')" alt="">
+                 <img src="../assets/noImg.png" alt="" v-else class="mainRightLineNOImg">
+               </div>
+               <div class="mainRightLineMsBox">
+                 <div class="mainRightLineName" >{{item.caption | re}}</div>
+                 <div class="mainRightLineZm">组号:{{item.group_no}}</div>
+                 <div class="mainRightLineRemarks">备注:{{item.remark | re}}</div>
+               </div>
+             </div>
+           </div>
+
+         </div>
+
      </div>
     </div>
 
@@ -176,6 +198,7 @@ export default {
        configTime:'',
        carConfig:false,
        restrainShow3:false,
+       restrainShow4:false,
        childrenList:'',
        oldList:'',
        ltime:'',
@@ -224,25 +247,42 @@ export default {
          }).then(res => {
            console.log(res.data.number);
            if(res.data.number==200||res.data.number==5212){
-                if(index + 2 > this.carpzList.length){
-                  var obj={
-                    time:res.data.result.access_time,
-                    list:res.data.result.list,
-                    caption:res.data.result.caption
+                if(res.data.result.list[0].next_restrain==1){
+                  if(index + 2 > this.carpzList.length){
+                    var obj={
+                      time:res.data.result.access_time,
+                      list:res.data.result.list,
+                      caption:res.data.result.caption
+                    }
+                    this.carpzList.push(obj)
+                  }else{
+                    var obj={
+                      time:res.data.result.access_time,
+                      list:res.data.result.list,
+                      caption:res.data.result.caption
+                    }
+                    this.carpzList=this.carpzList.splice(0,index+1)
+                    this.$set(this.carpzList, index+1, obj)
+                  }
+                  if(index +1 != this.carpzList.length){
+                    this.restrainShow3=false;
+                    this.restrainShow4=false;
                   }
-                  this.carpzList.push(obj)
                 }else{
-                  var obj={
-                    time:res.data.result.access_time,
-                    list:res.data.result.list,
-                    caption:res.data.result.caption
+                  if(index ==0){
+                    this.access_time=res.data.result.access_time;
+                    this.restrainShow4=true;
+                    this.childrenList=res.data.result.list;
+                     this.carpzList=this.carpzList.splice(0,index+1)
+                  }else{
+                    this.access_time=res.data.result.access_time;
+                    this.restrainShow3=true;
+                    this.childrenList=res.data.result.list;
+                     this.carpzList=this.carpzList.splice(0,index+1)
                   }
-                  this.carpzList=this.carpzList.splice(0,index+1)
-                  this.$set(this.carpzList, index+1, obj)
-                }
-                if(index +1 != this.carpzList.length){
-                  this.restrainShow3=false;
+
                 }
+
                // setTimeout(() => {
                //   console.log(this.$refs.firstBox2.scrollWidth)
                //    this.$refs.firstBox2.scrollLeft = this.$refs.firstBox2.scrollWidth
@@ -267,8 +307,9 @@ export default {
          }).then(res => {
            console.log(res.data.number);
            if(res.data.number==200||res.data.number==5212){
-                 this.access_time=res.data.result.access_time;
+                   this.access_time=res.data.result.access_time;
                    this.restrainShow3=true;
+                   this.restrainShow4=false;
                    this.childrenList=res.data.result.list;
                   // this.zkName3=res.data.result.caption;
                    //console.log(this.zkName1)
@@ -315,7 +356,9 @@ export default {
       		   caption:res.data.result.caption
       		 }
       		 this.carpzList.push(obj);
-
+           this.captionlist[0]= res.data.result.list[0].token;
+           this.captionlist=this.captionlist.splice(0,1)
+           this.morez(res.data.result.list[0],0,res.data.result.access_time)
       		}
 
       	} else {
@@ -333,7 +376,8 @@ export default {
       this.epc_id=item.epc_id;
       var e={
         brandName:this.brandName,
-        epc_id:this.epc_id
+        epc_id:this.epc_id,
+        description:''
       }
       this.pzList=[];
       this.cxShow=true;
@@ -412,6 +456,12 @@ export default {
     	else{
     		this.gogroup(item);
     	}
+      var e={
+        brandName:this.brandName,
+        epc_id:this.epc_id,
+        description:item.model_name,
+      }
+       this.$emit('brandCk',e)
     },
     getYueSuData(){
        fetchGet('/advancedEpc/getRestrainPc', {
@@ -616,6 +666,22 @@ export default {
     overflow: auto;
        flex-shrink: 0
   }
+  .mainRight4{
+    height: calc(100vh - 150px );
+    width: calc(100% - 330px );
+    border-radius: 4px;
+    border: 1px solid #EEEEEE;
+    margin-left: 20px;
+    overflow: auto;
+       flex-shrink: 0
+  }
+   .mainRight4 .mainRightLine2{
+   width: 200px;
+   border-radius: 4px;
+   border: 1px solid #EEEEEE;
+   margin: 1vw;
+   cursor: pointer;
+  }
   .mainRightLineNOImg{
     width: 100%;
     height: 100%;
@@ -750,6 +816,9 @@ export default {
    cursor: pointer;
    padding:12px;
    border-bottom: 1px solid #EEEEEE;
+   line-height: 20px;
+       color: #333333;
+       font-size: 14px;
  }
  .fct_name{
    background: #F7F9F8;

+ 20 - 4
src/page/index.vue

@@ -17,13 +17,16 @@
      </div>
      <div class="toConfigure">
        <span v-if="carConfigName">  车辆配置:<span >{{carConfigName}}> </span></span><!-- class="span1" style="cursor: pointer;" @click="carConfigtck"s -->
-        车型: <span class="span1" v-if="!description">{{brand_name?brand_name:'--'}}</span>
-             <span class="span1" @click="carCK" v-if="description" style="cursor: pointer;">{{description}}</span>
+        车型: <span class="span1" v-if="!description&&!isCxdx">{{brand_name?brand_name:'--'}}</span>
+             <span class="span2" v-if="!description&&isCxdx">{{brand_name?brand_name:'--'}}</span>
+             <span class="span1" @click="carCK" v-if="description&&!isCxdx" style="cursor: pointer;">{{description}}</span>
+              <span class="span2" v-if="description&&isCxdx">{{description}}</span>
        <span class="s1"> {{navfName}}:<span class="">{{zzName}}></span></span>
        <span class="s2" v-if="navchildrenNameTitle">{{navchildrenNameTitle}}:<span class="">{{navchildrenName?navchildrenName:'--'}}</span></span>
        <span class="s3" v-if="restrainTitleTwo">{{restrainTitleTwo}}:<span class="">{{zkName2?zkName2:'--'}}></span></span>
        <span class="cs" v-if="lastName">子组:{{lastName | re}}</span>
        <span class="goback" @click="goback" v-if="!firstShow&&prevNextShow">返回</span>
+        <span class="goback" @click="gobackCxdx" v-if="backCxdxShow">返回</span>
      </div>
      <div class="main">
        <div class="firstBox" v-if="firstShow" ref="firstBox">
@@ -338,6 +341,8 @@ export default {
        prevNextShow:false,
        pzList:[],
        moreTime:'',
+       isCxdx:false,
+       backCxdxShow:false,
     }
   },
   computed:{
@@ -368,8 +373,10 @@ export default {
     brandCkFn(e){
       this.brand_name=e.brandName;
       this.epc_id=e.epc_id;
-      this.description=''
+      this.description=e.description
       this.zzName=''
+      this.lastName=''
+      this.isCxdx=true;
     },
     ckBrand(){
       this.carCkShow=true;
@@ -514,6 +521,13 @@ export default {
       this.zzName=e.group
       this.epc_id=e.epc_id
       this.getPartsPc2()
+      this.backCxdxShow=true;
+    },
+    gobackCxdx(){
+      this.backCxdxShow=false;
+      this.carCkShow=true;
+     
+      this.childrenShow=false;
     },
     oemClick(){
       if(this.brand_name){
@@ -556,7 +570,9 @@ export default {
        this.zzIndex=0;
        this.firstShow=true;
        this.description='';
-        this.epc_id=''
+       this.epc_id=''
+       this.isCxdx=false;
+       this.backCxdxShow=false;
        console.log(this.vin.length)
        if(this.vin==''||this.vin.length!=17){
          this.$message({