diff --git a/src/views/technology/process/content.vue b/src/views/technology/process/content.vue index 3ec3735a..8d77f609 100644 --- a/src/views/technology/process/content.vue +++ b/src/views/technology/process/content.vue @@ -207,7 +207,7 @@ export default { console.log("device是空,if获取的device",this.form.device); this.form.device = obj; }else{ - if(obj != undefined && obj != null){ + if(obj != undefined && obj != null && obj != "" ){ const a = obj.split(','); const len = obj.split(',').length; console.log('切割的数组',obj.split(',')); diff --git a/src/views/technology/process/index.vue b/src/views/technology/process/index.vue index 2ed07235..d3373601 100644 --- a/src/views/technology/process/index.vue +++ b/src/views/technology/process/index.vue @@ -831,13 +831,13 @@ export default { }, //新增 设备选择弹出框 onItemSelectedEquipment(obj) { - if (this.form.equipment == null) { + if (this.form.equipment == null || this.form.equipment == "") { console.log("equipment是空,if获取的obj", obj); console.log("device是空,if获取的equipment", this.form.equipment); this.form.equipment = obj; this.selectMaterielListtag = obj.split(","); } else { - if (obj != undefined && obj != null) { + if (obj != undefined && obj != null && obj != "") { const a = obj.split(","); const len = obj.split(",").length; console.log("切割的数组", obj.split(",")); diff --git a/src/views/technology/recipe/content.vue b/src/views/technology/recipe/content.vue index 36f274c9..04362862 100644 --- a/src/views/technology/recipe/content.vue +++ b/src/views/technology/recipe/content.vue @@ -318,7 +318,7 @@ export default { console.log("device是空,if获取的device",this.form.device); this.form.device = obj; }else{ - if(obj != undefined && obj != null){ + if(obj != undefined && obj != null && obj != ""){ const a = obj.split(','); console.log('切割的数组',obj.split(',')); a.forEach(item => { @@ -347,7 +347,7 @@ export default { console.log("material是空,if获取的material",this.form.material); this.form.material = obj; }else{ - if(obj != undefined && obj != null){ + if(obj != undefined && obj != null && obj !=""){ const a = obj.split(','); const len = obj.split(',').length; console.log('切割的数组',obj.split(','));