diff --git a/src/views/technology/process/index.vue b/src/views/technology/process/index.vue index 9a2d613..d16f94b 100644 --- a/src/views/technology/process/index.vue +++ b/src/views/technology/process/index.vue @@ -695,18 +695,25 @@ export default { onItemSelectedEquipment(obj){ if(obj != undefined && obj != null){ console.log('返回',obj); - if(this.form.equipment == null){ - //obj = obj.slice(1); - console.log("if获取的",obj); - console.log("if获取的equipment",this.form.equipment); - this.form.equipment = obj; - console.log("赋值以后的equipment",this.form.equipment); - }else{ - console.log("else获取的",obj); - console.log("else获取的equipment",this.form.equipment); - this.form.equipment = this.form.equipment +","+obj; + console.log(this.form.equipment); + if(this.form.equipment == null){ + console.log("else获取的",obj); + console.log("else获取的equipment",this.form.equipment); + this.form.equipment = obj; + console.log("赋值以后的equipment",this.form.equipment); + }else{ + if(this.form.equipment.length > 0){ + console.log("if获取的",obj); + console.log("if获取的equipment",this.form.equipment); + this.form.equipment = this.form.equipment +","+obj; + }else{ + console.log("else获取的",obj); + console.log("else获取的equipment",this.form.equipment); + this.form.equipment = obj; + console.log("赋值以后的equipment",this.form.equipment); + } + } } - } }, //新增 设备选择弹出框