|
@@ -2,7 +2,7 @@
|
|
|
<div class="hello">
|
|
|
<div class="top">
|
|
|
<div class="vinBtn">VIN</div>
|
|
|
- <input type="text" placeholder="请输入17位车架号查询" class="vinsearch">
|
|
|
+ <input type="text" v-model="vin" placeholder="请输入17位车架号查询" class="vinsearch" @keyup.enter="keyup">
|
|
|
<div class="barndBox">
|
|
|
当前品牌:
|
|
|
<div class="barnd">
|
|
@@ -14,8 +14,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="toConfigure">
|
|
|
- 车辆配置:<span class="span1">BYD6490STHEV(尊荣型)</span> > 车型: <span class="span1">东风本田2016思域 </span> 总组:<span class="span1">车身及车身附件</span>
|
|
|
- <span>>子组:<span class="span1">电磁阀1.5L</span></span>
|
|
|
+ 车辆配置:<span class="span1">{{carConfigName}}</span> > 车型: <span class="span1">{{brand_name}}</span>
|
|
|
+ 总组:<span class="span1">{{zzName}}</span>
|
|
|
+ <span>>子组:<span class="span1">--</span></span>
|
|
|
</div>
|
|
|
<div class="main">
|
|
|
<!-- 总组-->
|
|
@@ -24,7 +25,8 @@
|
|
|
<div class="sx"></div>
|
|
|
<div class="leftTitle">总组</div>
|
|
|
</div>
|
|
|
- <div class="mainLeftLine" v-for="(item,index) in 5">{{index}}发动机</div>
|
|
|
+ <div class="mainLeftLine" :class="{mainLeftLineActive:zzIndex==index}"
|
|
|
+ v-for="(item,index) in zlist" @click="zzClick(index,item)">{{item.caption}}</div>
|
|
|
</div>
|
|
|
<!-- 车辆配置-->
|
|
|
<div class="mainLeft" v-if="carConfig">
|
|
@@ -32,8 +34,8 @@
|
|
|
<div class="sx"></div>
|
|
|
<div class="leftTitle">选择车辆配置</div>
|
|
|
</div>
|
|
|
- <div class="mainLeftLine" v-for="(item,index) in 5" @click="carConfigClick(index)"
|
|
|
- :class="{mainLeftLineActive:carConfigIndex==index}">左舵,天窗,皮革座椅</div>
|
|
|
+ <div class="mainLeftLine" v-for="(item,index) in restrains" @click="carConfigClick(index,item)"
|
|
|
+ :class="{mainLeftLineActive:carConfigIndex==index}">{{item.combine_cp}}</div>
|
|
|
</div>
|
|
|
<div class="mainRight1" v-if="groupShow">
|
|
|
<div class="mainRightTop">
|
|
@@ -45,14 +47,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="mainRightCont">
|
|
|
- <div class="mainRightLine" v-for="(item,index) in 8">
|
|
|
+ <div class="mainRightLine" v-for="(item,index) in childrenList" @click="childrenClick(item)">
|
|
|
<div class="mainRightLineImgBox">
|
|
|
- <img class="mainRightLineImg" src="http://img2.nanxinwang.com/ds/resources/app/byd/v1/873fed186c14da3d7ea2a3fb97f5af05.png?x-oss-process=style/constrain_550_adp_jpg" alt="">
|
|
|
+ <img class="mainRightLineImg" :src="item.image_url.replace(/90/g, '320')" alt="">
|
|
|
</div>
|
|
|
<div class="mainRightLineMsBox">
|
|
|
- <div class="mainRightLineName">节气门1.5L</div>
|
|
|
- <div class="mainRightLineZm">组名:EA-90B-12QW2A</div>
|
|
|
- <div class="mainRightLineRemarks">备注:这是备注这是备注这是备注这是备注</div>
|
|
|
+ <div class="mainRightLineName">{{item.caption}}</div>
|
|
|
+ <div class="mainRightLineZm">组名:{{item.group_no}}</div>
|
|
|
+ <div class="mainRightLineRemarks">备注:{{item.remark}}</div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
@@ -64,44 +66,45 @@
|
|
|
|
|
|
<!-- 子组件详情-->
|
|
|
<div class="childrenMain" v-if="childrenShow">
|
|
|
- <div class="childrenMainLeft">
|
|
|
- <img class="childrenImg" src="http://img2.nanxinwang.com/ds/resources/app/byd/v1/873fed186c14da3d7ea2a3fb97f5af05.png?x-oss-process=style/constrain_550_adp_jpg" alt="">
|
|
|
+ <div class="childrenMainLeft" ref="childrenMainLeft">
|
|
|
+ <img class="childrenImg" :src="image_info.pic_url" alt="">
|
|
|
</div>
|
|
|
<div class="childrenMainRight">
|
|
|
<el-table
|
|
|
class="el-table"
|
|
|
- :data="tableData"
|
|
|
+ :data="rows"
|
|
|
+ :max-height="childrenHeight"
|
|
|
stripe border
|
|
|
style="width: 100%">
|
|
|
<el-table-column
|
|
|
- prop="a1"
|
|
|
+ prop="refernum"
|
|
|
label="位置"
|
|
|
width="50"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="a2"
|
|
|
+ prop="extened[0]"
|
|
|
label="零件号"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="a3"
|
|
|
+ prop="description"
|
|
|
label="名称">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="a4"
|
|
|
+ prop="remark"
|
|
|
label="备注">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="a5"
|
|
|
+ prop="qty"
|
|
|
label="用量">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="a6"
|
|
|
+ prop="partnum[0]"
|
|
|
label="型号">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="a7"
|
|
|
+ prop="price"
|
|
|
label="4S价">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -113,6 +116,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { fetchPost, fetchGet, fetchPut, fetchDelete, baseURL } from '@/utils/request'
|
|
|
export default {
|
|
|
name: 'HelloWorld',
|
|
|
data () {
|
|
@@ -120,34 +124,173 @@ export default {
|
|
|
groupShow:false, //总组的显示
|
|
|
carConfig:false, //车辆配置的显示
|
|
|
carConfigIndex:-1,
|
|
|
- childrenShow:true,
|
|
|
- tableData:[
|
|
|
- {
|
|
|
- a1:1,
|
|
|
- a2:'16400-59B-003',
|
|
|
- a3:'节气门总成',
|
|
|
- a4:'这是备注这是备注这是备注这是备...',
|
|
|
- a5:'005',
|
|
|
- a6:'GL345-876',
|
|
|
- a7:'¥2698.00'
|
|
|
- },
|
|
|
- {
|
|
|
- a1:2,
|
|
|
- a2:'16400-59B-003',
|
|
|
- a3:'节气门总成',
|
|
|
- a4:'备注',
|
|
|
- a5:'005',
|
|
|
- a6:'GL345-876',
|
|
|
- a7:'¥2698.00'
|
|
|
- }
|
|
|
- ]
|
|
|
+ childrenShow:false,
|
|
|
+ children:'',
|
|
|
+ vin:'LVHFC1663G6003140',
|
|
|
+ restrains:'',
|
|
|
+ brand_name:'',
|
|
|
+ access_time:'',
|
|
|
+ param:'',
|
|
|
+ token:'',
|
|
|
+ carConfigName:'',
|
|
|
+ zlist:'',
|
|
|
+ zzIndex:0,
|
|
|
+ zzName:'',
|
|
|
+ childrenList:'',
|
|
|
+ image_info:'',
|
|
|
+ rows:'',
|
|
|
+ zzTime:'',
|
|
|
+ childrenHeight:'',
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
- carConfigClick(index){
|
|
|
- this.carConfigIndex=index
|
|
|
+ carConfigClick(index,item){
|
|
|
+ this.carConfigIndex=index;
|
|
|
+ this.param=item.param;
|
|
|
+ this.token=item.token;
|
|
|
+ this.carConfigName=item.combine_cp;
|
|
|
+ this.getcarVinGroupPc()
|
|
|
+ },
|
|
|
+ keyup(){
|
|
|
+ // console.log(this.vin);LVHFC1663G6003140
|
|
|
+ fetchGet('/advancedEpc/getVinGroupPc', {
|
|
|
+ vin:this.vin
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res.data.number);
|
|
|
+ if(res.data.number==200||res.data.number==5212){
|
|
|
+ this.brand_name=res.data.result.brand_name;
|
|
|
+ this.access_time=res.data.result.access_time;
|
|
|
+ if(res.data.result.restrains.length>0){
|
|
|
+ this.restrains=res.data.result.restrains;
|
|
|
+ this.groupShow=false;
|
|
|
+ this.carConfig=true;
|
|
|
+ this.childrenShow=false;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: res.data.message,
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ //console.log(res)
|
|
|
+ //if(res.data.number)
|
|
|
+ }).catch(err => {
|
|
|
+ console.log('????111')
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getcarVinGroupPc(){
|
|
|
+ fetchGet('/advancedEpc/getVinGroupPc', {
|
|
|
+ vin:this.vin,
|
|
|
+ access_time:this.access_time,
|
|
|
+ param:this.param,
|
|
|
+ token:this.token
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res.data.number);
|
|
|
+ if(res.data.number==200||res.data.number==5212){
|
|
|
+ this.brand_name=res.data.result.brand_name;
|
|
|
+ this.access_time=res.data.result.access_time;
|
|
|
+ this.zzTime=res.data.result.access_time;
|
|
|
+ if(res.data.result.restrains.length>0){
|
|
|
+ this.restrains=res.data.result.restrains;
|
|
|
+ this.groupShow=false;
|
|
|
+ this.carConfig=true;
|
|
|
+ this.childrenShow=false;
|
|
|
+ }else{
|
|
|
+ this.zlist=res.data.result.list;
|
|
|
+ this.groupShow=true;
|
|
|
+ this.carConfig=false;
|
|
|
+ this.zzName=this.zlist[0].caption;
|
|
|
+ this.param=this.zlist[0].param;
|
|
|
+ this.token=this.zlist[0].token;
|
|
|
+ this.getSubgroupPc()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: res.data.message,
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(err => {
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ zzClick(index,item){
|
|
|
+ this.zzIndex=index;
|
|
|
+ this.param=item.param;
|
|
|
+ this.token=item.token;
|
|
|
+ this.zzName=item.caption;
|
|
|
+ this.getSubgroupPc()
|
|
|
+ },
|
|
|
+ getSubgroupPc(){
|
|
|
+ fetchGet('/advancedEpc/getSubgroupPc', {
|
|
|
+ vin:this.vin,
|
|
|
+ access_time:this.zzTime,
|
|
|
+ param:this.param,
|
|
|
+ token:this.token
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res.data.number);
|
|
|
+ if(res.data.number==200||res.data.number==5212){
|
|
|
+ this.childrenList=res.data.result.list;
|
|
|
+ this.access_time=res.data.result.access_time;
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: res.data.message,
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ childrenClick(item){
|
|
|
+ this.param=item.param;
|
|
|
+ this.token=item.token;
|
|
|
+ this.getPartsPc();
|
|
|
+ this.groupShow=false;
|
|
|
+ this.carConfig=false;
|
|
|
+ this.childrenShow=true;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.childrenHeight = this.$refs.childrenMainLeft.offsetHeight // 高度
|
|
|
+
|
|
|
+ // console.log(this.childrenHeight)
|
|
|
+ }, 500)
|
|
|
+
|
|
|
+ },
|
|
|
+ getPartsPc(){
|
|
|
+ fetchGet('/advancedEpc/getPartsPc', {
|
|
|
+ vin:this.vin,
|
|
|
+ access_time:this.access_time,
|
|
|
+ param:this.param,
|
|
|
+ token:this.token
|
|
|
+ }).then(res => {
|
|
|
+
|
|
|
+ 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[0];
|
|
|
+
|
|
|
+ this.rows=res.data.result.list.rows
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: res.data.message,
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
}
|
|
|
- }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -324,7 +467,7 @@ color: #333333;padding-left: 10px;padding-right: 20px;
|
|
|
border-radius: 4px;
|
|
|
border: 1px solid #EEEEEE;
|
|
|
margin: 1vw;
|
|
|
-
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
.mainRightLineImgBox {
|
|
|
/*图片容器宽高各220px,容器水平居中,图片水平垂直居中*/
|
|
@@ -335,11 +478,12 @@ color: #333333;padding-left: 10px;padding-right: 20px;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
border-bottom: 1px solid #EEEEEE;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
.mainRightLineImg {
|
|
|
/*图片宽高各200px*/
|
|
|
width: 100%;
|
|
|
- height: 180px;
|
|
|
+
|
|
|
}
|
|
|
.mainRightCont{
|
|
|
display: flex;
|
|
@@ -389,6 +533,7 @@ color: #333333;padding-left: 10px;padding-right: 20px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
.childrenMainRight{
|
|
|
height: calc(100vh - 200px );
|