浏览代码

bug修改

twt 2 年之前
父节点
当前提交
7098f822cf
共有 2 个文件被更改,包括 68 次插入28 次删除
  1. 16 9
      src/page/carCk.vue
  2. 52 19
      src/page/index.vue

+ 16 - 9
src/page/carCk.vue

@@ -80,7 +80,7 @@
               v-for="(item,index2) in i.list" @click="morez(item,index,i.time)" v-html="item.caption">{{item.caption}}</div>
            </div>
          </div>
-         <div class="mainRight2" v-if="restrainShow3">
+         <div class="mainRight2 ms3" v-if="restrainShow3">
            <div class="mainRightTop">
              <div class="sx2"></div>
              <div class="mainRightTopTitle">子组</div>
@@ -96,7 +96,7 @@
                  <img src="../assets/noImg.png" alt="" v-else class="mainRightLineNOImg">
                </div>
                <div class="mainRightLineMsBox">
-                 <div class="mainRightLineName" >{{item.caption | re}}</div>
+                 <div class="mainRightLineName" :title='item.caption | re'>{{item.caption | re}}</div>
                  <div class="mainRightLineZm">组号:{{item.group_no}}</div>
                  <div class="mainRightLineRemarks">备注:{{item.remark | re}}</div>
                </div>
@@ -105,7 +105,7 @@
 
          </div>
 
-         <div class="mainRight4" v-if="restrainShow4">
+         <div class="mainRight4 ms4" v-if="restrainShow4">
            <div class="mainRightTop">
              <div class="sx2"></div>
              <div class="mainRightTopTitle">子组</div>
@@ -117,7 +117,7 @@
                  <img src="../assets/noImg.png" alt="" v-else class="mainRightLineNOImg">
                </div>
                <div class="mainRightLineMsBox">
-                 <div class="mainRightLineName" >{{item.caption | re}}</div>
+                 <div class="mainRightLineName" :title='item.caption | re'>{{item.caption | re}}</div>
                  <div class="mainRightLineZm">组号:{{item.group_no}}</div>
                  <div class="mainRightLineRemarks">备注:{{item.remark | re}}</div>
                </div>
@@ -231,7 +231,7 @@ export default {
       this.carzm=zm
     },
     childrenClick(item,index){
-      
+
       var data={
         token:item.token,param:item.param,threeTime:this.access_time,
         group:this.indexcaption,childrengroup:item.caption,epc_id:this.epc_id
@@ -284,12 +284,14 @@ export default {
                 }else{
                   if(index ==0){
                     this.access_time=res.data.result.access_time;
+                    this.restrainShow3=false;
                     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.restrainShow4=false;
                     this.childrenList=res.data.result.list;
                      this.carpzList=this.carpzList.splice(0,index+1)
                   }
@@ -406,7 +408,7 @@ export default {
        this.combineCplist[index]=item.token;
        this.combineCplist=this.combineCplist.splice(0,index+1)
        console.log(this.carTname.join(','))
-       //console.log(item.model_name)
+      // console.log(this.brandName)
        var name=this.modelname+ this.carTname.join(',')
        var e={
          brandName:this.brandName,
@@ -473,6 +475,7 @@ export default {
       this.$emit('cxBackOne',true)
     },
     goNext(item) {  //点击车型
+      console.log(this.brandName)
     	this.token = item.token;
     	this.param = item.param;
       this.pzList=[]
@@ -678,7 +681,7 @@ export default {
         box-sizing: border-box;
   }
   .mainRight2 .mainRightLine2{
-   width: 200px;
+    width: 200px;
    border-radius: 4px;
    border: 1px solid #EEEEEE;
    margin: 1vw;
@@ -703,7 +706,8 @@ export default {
        flex-shrink: 0
   }
    .mainRight4 .mainRightLine2{
-   width: 200px;
+       min-width: 200px;
+       width: 30%;
    border-radius: 4px;
    border: 1px solid #EEEEEE;
    margin: 1vw;
@@ -730,7 +734,10 @@ export default {
   }
   .mainRightLineImg {
     /*图片宽高各200px*/
-   width: 100%;
+       max-width: 100%;
+       max-height: 100%;
+       display: block;
+       margin: auto;
 
   }
   .mainRightCont{

+ 52 - 19
src/page/index.vue

@@ -25,9 +25,9 @@
        <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>
-       <span class="goback" @click="gobackCxdxone" v-if="backCxdxShowone">返回</span>
+       <span class="goback goback1" @click="goback" v-if="!firstShow&&prevNextShow">返回</span>
+       <span class="goback goback2" @click="gobackCxdx" v-if="backCxdxShow">返回</span>
+       <span class="goback goback3" @click="gobackCxdxone" v-if="backCxdxShowone">返回</span>
      </div>
      <div class="main">
        <div class="firstBox" v-if="firstShow" ref="firstBox">
@@ -107,7 +107,9 @@
                  <img src="../assets/noImg.png" alt="" v-else class="mainRightLineNOImg">
                </div>
                <div class="mainRightLineMsBox">
-                 <div class="mainRightLineName">{{item.caption | re}}</div>
+                 <div class="mainRightLineName"
+                 :title='item.caption | re'
+                 >{{item.caption | re}}</div>
                  <div class="mainRightLineZm">组号:{{item.group_no}}</div>
                  <div class="mainRightLineRemarks">备注:{{item.remark | re}}</div>
                </div>
@@ -134,7 +136,7 @@
                  <img src="../assets/noImg.png" alt="" v-else class="mainRightLineNOImg">
                </div>
                <div class="mainRightLineMsBox">
-                 <div class="mainRightLineName" >{{item.caption | re}}</div>
+                 <div class="mainRightLineName" :title='item.caption | re'>{{item.caption | re}}</div>
                  <div class="mainRightLineZm">组号:{{item.group_no}}</div>
                  <div class="mainRightLineRemarks">备注:{{item.remark | re}}</div>
                </div>
@@ -158,7 +160,7 @@
                   <img src="../assets/noImg.png" alt="" v-else class="mainRightLineNOImg">
                </div>
                <div class="mainRightLineMsBox">
-                 <div class="mainRightLineName">{{item.caption | re}}</div>
+                 <div class="mainRightLineName" :title='item.caption | re'>{{item.caption | re}}</div>
                  <div class="mainRightLineZm">组号:{{item.group_no}}</div>
                  <div class="mainRightLineRemarks">备注:{{item.remark | re}}</div>
                </div>
@@ -189,10 +191,13 @@
          <div class="childrenMainLeft" ref="childrenMainLeft">
            <div class="prevBox" v-if="prevNextShow" :class="{prevBoxNo:childrenIndex==0}" @click="prev"><上一组</div>
            <div class="nextBox" v-if="prevNextShow" @click="next" :class="{prevBoxNo:childrenIndex==this.childrenList.length-1}" >下一组></div>
-           <div class="imgNumBox" v-if="image_info.length>1">
+           <div class="imgNumBox" v-if="image_info&&image_info.length>1">
              <div class="imgNumLine" :class="{prevBoxNo:imgIndex==index}" @click="imgCk(index)" v-for="(item,index) in image_info">{{index+1}}</div>
            </div>
-            <img class="childrenImg" @click="seeBigImg(image_info[imgIndex].pic_url)" :src="image_info[imgIndex].pic_url" alt="" v-if="image_info[imgIndex].pic_url">
+             <img class="childrenImg" @click="seeBigImg(image_info[imgIndex].pic_url)"
+             :src="image_info[imgIndex].pic_url" alt="" v-if="image_info.length>0&&image_info[imgIndex].pic_url">
+           
+
             <img src="../assets/noImg.png" alt="" v-else class="childrenImg">
          </div>
          <div class="childrenMainRight">
@@ -383,21 +388,26 @@ export default {
       this.backCxdxShowone=e;
     },
     ckzznameFn(e){
-      this.zzName=e
+      this.zzName=e;
+      this.lastName=''
     },
     brandCkFn(e){
       this.brand_name=e.brandName;
       this.epc_id=e.epc_id;
-      this.description=e.description
+      this.description=e.brandName + ' ' +e.description
       this.zzName=''
       this.lastName=''
       this.isCxdx=true;
+      this.backCxdxShow=false;
+      this.backCxdxShowone=false;
     },
     ckBrand(){
       this.carCkShow=true;
       this.firstShow=false;
       this.partFlag=false;
       this.childrenShow=false;
+      this.prevNextShow=false;
+
       this.$refs.childrencarCk.getBrands()
     },
     carckhl(data){
@@ -543,6 +553,7 @@ export default {
       this.carCkShow=true;
 
       this.childrenShow=false;
+      this.backCxdxShowone=true;
     },
     oemClick(){
       if(this.brand_name){
@@ -588,6 +599,8 @@ export default {
        this.epc_id=''
        this.isCxdx=false;
        this.backCxdxShow=false;
+       this.backCxdxShowone=false;
+       this.carCkShow=false;
        console.log(this.vin.length)
        if(this.vin==''||this.vin.length!=17){
          this.$message({
@@ -1021,7 +1034,7 @@ export default {
 
     },
     getPartsPc(){
-
+      this.imgIndex=0
       fetchGet('/advancedEpc/getPartsPc', {
         vin:this.vin,
         access_time:this.access_time,
@@ -1036,9 +1049,16 @@ export default {
              //this.childrenList=res.data.result.list;
              //this.access_time=res.data.result.access_time;
             //  console.log(res.data.result.list.image_info)
-             this.image_info=res.data.result.list.image_info;
-
-             this.rows=res.data.result.list.rows
+             if(res.data.result.list.image_info){
+               this.image_info=res.data.result.list.image_info;
+             }else{
+                this.image_info=[]
+             }
+             if(res.data.result.list.rows){
+                this.rows=res.data.result.list.rows;
+            }else{
+              this.rows=[]
+            }
          }else{
            this.$message({
                   message: res.data.message,
@@ -1051,6 +1071,7 @@ export default {
          })
     },
     getPartsPc2(){
+      this.imgIndex=0
       console.log("getPartsPc2")
       this.prevNextShow=false;
       // this.groupShow=false;
@@ -1064,7 +1085,7 @@ export default {
       // this.lastShow=false;
       // this.carConfig=false;
        this.firstShow=false;
-       this.childrenShow=true;
+
 
       fetchGet('/advancedEpc/getPartsPc', {
         vin:this.vin,
@@ -1073,14 +1094,23 @@ export default {
         token:this.oemData.token,
         epc_id: this.epc_id,
        }).then(res => {
-
+          this.childrenShow=true;
          if(res.data.number==200||res.data.number==5212){
              //this.childrenList=res.data.result.list;
              //this.access_time=res.data.result.access_time;
             //  console.log(res.data.result.list.image_info)
-             this.image_info=res.data.result.list.image_info;
+            if(res.data.result.list.image_info){
+              this.image_info=res.data.result.list.image_info;
+            }else{
+               this.image_info=[]
+            }
+            if(res.data.result.list.rows){
+                this.rows=res.data.result.list.rows;
+            }else{
+              this.rows=[]
+            }
+
 
-             this.rows=res.data.result.list.rows;
              setTimeout(() => {
               this.childrenHeight = this.$refs.childrenMainLeft.offsetHeight // 高
               console.log("childrenHeight==="+this.childrenHeight)
@@ -1384,7 +1414,10 @@ color: #333333;padding-left: 10px;padding-right: 20px;
  }
  .mainRightLineImg {
    /*图片宽高各200px*/
-  width: 100%;
+     max-width: 100%;
+     max-height: 100%;
+     display: block;
+     margin: auto;
 
  }
  .mainRightCont{