|
|
|
@ -84,6 +84,12 @@ |
|
|
|
<el-input v-model="pageData.resourceID" style="width: 120px;" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item class="customer-item" > |
|
|
|
<span slot="label" style="" @click="getBaseList(1044)"><a herf="#">所属部门:</a></span> |
|
|
|
<el-input v-model="pageData.deptID" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
@ -128,7 +134,8 @@ export default { |
|
|
|
active: 'Y', |
|
|
|
addFlag: 'Y', |
|
|
|
checkFlag: 'Y', |
|
|
|
updateBy:'' |
|
|
|
updateBy:'', |
|
|
|
deptID: '' |
|
|
|
}, |
|
|
|
readOnlyFlag: false, |
|
|
|
dataListLoading: false, |
|
|
|
@ -155,38 +162,47 @@ export default { |
|
|
|
|
|
|
|
/*保存标签自定义的信息*/ |
|
|
|
saveEamObject(){ |
|
|
|
console.log(this.pageData) |
|
|
|
//判断标签内容是否为空 |
|
|
|
let objectID = this.pageData.objectID.trim(); |
|
|
|
let locationID = this.pageData.locationID.trim(); |
|
|
|
let familyID = this.pageData.familyID.trim(); |
|
|
|
let groupID = this.pageData.groupID.trim(); |
|
|
|
let supplierID = this.pageData.supplierID.trim(); |
|
|
|
let manufacturerID = this.pageData.manufacturerID.trim(); |
|
|
|
if(objectID == null || objectID === ''){ |
|
|
|
// let objectID = this.pageData.objectID.trim(); |
|
|
|
// let locationID = this.pageData.locationID.trim(); |
|
|
|
// let familyID = this.pageData.familyID.trim(); |
|
|
|
// let groupID = this.pageData.groupID.trim(); |
|
|
|
// let supplierID = this.pageData.supplierID.trim(); |
|
|
|
// let manufacturerID = this.pageData.manufacturerID.trim(); |
|
|
|
// let resourceID = this.pageData.resourceID.trim(); |
|
|
|
// let deptID = this.pageData.deptID.trim(); |
|
|
|
if(this.pageData.objectID == null || this.pageData.objectID === ''){ |
|
|
|
this.$message.success("设备编码不能为空!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(locationID == null || locationID === ''){ |
|
|
|
if(this.pageData.locationID == null || this.pageData.locationID === ''){ |
|
|
|
this.$message.success("区域不能为空!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(groupID == null || groupID === ''){ |
|
|
|
if(this.pageData.groupID == null || this.pageData.groupID === ''){ |
|
|
|
this.$message.success("分组不能为空!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(familyID == null || familyID === ''){ |
|
|
|
if(this.pageData.familyID == null || this.pageData.familyID === ''){ |
|
|
|
this.$message.success("分类不能为空!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(supplierID == null || supplierID === ''){ |
|
|
|
if(this.pageData.supplierID == null || this.pageData.supplierID === ''){ |
|
|
|
this.$message.success("供应商不能为空!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(manufacturerID == null || manufacturerID === ''){ |
|
|
|
if(this.pageData.manufacturerID == null || this.pageData.manufacturerID === ''){ |
|
|
|
this.$message.success("制造商不能为空!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.pageData.resourceID == null || this.pageData.resourceID === ''){ |
|
|
|
this.$message.success("机台不能为空!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.pageData.deptID == null || this.pageData.deptID === ''){ |
|
|
|
this.$message.success("所属部门不能为空!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//判断是否是新增标签自定义 |
|
|
|
if(this.pageData.addFlag === 'Y'){ |
|
|
|
this.insertEamObjectData(); |
|
|
|
@ -247,6 +263,9 @@ export default { |
|
|
|
}else if (this.tagNo === 203) { |
|
|
|
//设置参数 |
|
|
|
this.pageData.resourceID = val.Resource_id; |
|
|
|
}else if (this.tagNo === 1044) { |
|
|
|
//设置参数 |
|
|
|
this.pageData.deptID = val.Dept_id; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -267,6 +286,8 @@ export default { |
|
|
|
strVal = this.pageData.manufacturerID; |
|
|
|
}else if (val === 203) { |
|
|
|
strVal = this.pageData.resourceID; |
|
|
|
}else if (val === 1044) { |
|
|
|
strVal = this.pageData.deptID; |
|
|
|
} |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
}) |
|
|
|
|