设备回显

master
A0010407 1 year ago
parent a2636786da
commit 33084428bc

@ -212,11 +212,14 @@ export default {
const len = obj.split(',').length;
console.log('切割的数组',obj.split(','));
a.forEach(item => {
const b = this.form.device.split(',');
const size = b.length;
console.log("size",size,b[size-1])
const item1 = item+',';
console.log("打印item1",item1);
this.checkDevice = this.form.device.search(item1) != -1;
console.log("check的值",this.checkDevice);
if(this.checkDevice == true){
if(this.checkDevice == true || b[size-1] == item){
console.log("重复添加",true);
Message.warning('您已经添加过该设备,请勿重复添加!!!');
}else if(this.checkDevice == false){

@ -836,10 +836,13 @@ export default {
const len = obj.split(",").length;
console.log("切割的数组", obj.split(","));
a.forEach((item) => {
const b = this.form.equipment.split(',');
const size = b.length;
console.log("size",size,b[size-1])
const item1 = item+',';
console.log("打印item1",item1);
this.checkEquipment = this.form.equipment.search(item1) != -1;
if (this.checkEquipment == true) {
if (this.checkEquipment == true ||b[size-1] == item) {
console.log("重复添加", true);
Message.warning("您已经添加过该设备,请勿重复添加!!!");
} else if (this.checkEquipment == false) {

@ -320,14 +320,16 @@ export default {
}else{
if(obj != undefined && obj != null){
const a = obj.split(',');
const len = obj.split(',').length;
console.log('切割的数组',obj.split(','));
a.forEach(item => {
const b = this.form.device.split(',');
const size = b.length;
console.log("size",size,b[size-1])
const item1 = item+',';
console.log("打印item1",item1);
this.checkDevice = this.form.device.search(item1) != -1;
console.log("check的值",this.checkDevice);
if(this.checkDevice == true){
if(this.checkDevice == true ||b[size-1] == item){
console.log("重复添加",true);
Message.warning('您已经添加过该设备,请勿重复添加!!!');
}else if(this.checkDevice == false){

Loading…
Cancel
Save