|
|
|
@ -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){
|
|
|
|
|