|
|
@ -485,13 +485,13 @@ |
|
|
</div> |
|
|
</div> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -8px;"> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -8px;"> |
|
|
<el-form-item label="设备编码"> |
|
|
<el-form-item label="设备编码"> |
|
|
<el-input v-model="spareCopyModalData.objectID" style="width: 120px"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="spareCopyModalData.objectID" clearable style="width: 120px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="设备名称"> |
|
|
<el-form-item label="设备名称"> |
|
|
<el-input v-model="spareCopyModalData.objectDesc" style="width: 120px"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="spareCopyModalData.objectDesc" clearable style="width: 120px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="设备分类编码"> |
|
|
<el-form-item label="设备分类编码"> |
|
|
<el-input v-model="spareCopyModalData.familyID" style="width: 120px"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="spareCopyModalData.familyID" clearable style="width: 120px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label=" "> |
|
|
<el-form-item label=" "> |
|
|
<el-button @click="getObjectCopyList()">查询</el-button> |
|
|
<el-button @click="getObjectCopyList()">查询</el-button> |
|
|
@ -539,7 +539,7 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<el-footer style="height:40px;margin-top: 60px;text-align:center"> |
|
|
<el-footer style="height:40px;margin-top: 60px;text-align:center"> |
|
|
<el-button type="primary" @click="saveCopyData()">保存</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="saveCopyData">保存</el-button> |
|
|
<el-button type="primary" @click="spareCopyModalFlag = false">关闭</el-button> |
|
|
<el-button type="primary" @click="spareCopyModalFlag = false">关闭</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
@ -3825,21 +3825,10 @@ |
|
|
this.objectCopySelectionList = val |
|
|
this.objectCopySelectionList = val |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getObjectCopyList () { |
|
|
|
|
|
getObjectList(this.spareCopyModalData).then(({data}) => { |
|
|
|
|
|
this.objectCopyList = data.rows |
|
|
|
|
|
for (let i = 0; i < this.objectCopyList.length; i++) { |
|
|
|
|
|
//删除本设备 只能选其他的设备 |
|
|
|
|
|
if(this.objectCopyList[i].objectID == this.spareCopyModalData.oldObjectID){ |
|
|
|
|
|
this.objectCopyList.splice(i,1) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 复制备件 |
|
|
copyObject (type) { |
|
|
copyObject (type) { |
|
|
this.spareCopyModalData = { |
|
|
this.spareCopyModalData = { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
bu: this.currentRow.site + '_' + this.currentRow.buNo, |
|
|
objectID: '', |
|
|
objectID: '', |
|
|
objectDesc: '', |
|
|
objectDesc: '', |
|
|
familyID: '', |
|
|
familyID: '', |
|
|
@ -3855,12 +3844,24 @@ |
|
|
this.spareCopyModalFlag = true |
|
|
this.spareCopyModalFlag = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 查询可用设备列表 |
|
|
|
|
|
getObjectCopyList () { |
|
|
|
|
|
getObjectList(this.spareCopyModalData).then(({data}) => { |
|
|
|
|
|
this.objectCopyList = data.rows |
|
|
|
|
|
for (let i = 0; i < this.objectCopyList.length; i++) { |
|
|
|
|
|
// 删除本设备 只能选其他的设备 |
|
|
|
|
|
if (this.objectCopyList[i].objectID === this.spareCopyModalData.oldObjectID) { |
|
|
|
|
|
this.objectCopyList.splice(i,1) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 复制 |
|
|
saveCopyData () { |
|
|
saveCopyData () { |
|
|
if (this.objectCopySelectionList.length === 0) { |
|
|
if (this.objectCopySelectionList.length === 0) { |
|
|
this.$alert('请勾选设备!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false |
|
|
|
|
|
|
|
|
this.$message.warning('请勾选设备!') |
|
|
|
|
|
return |
|
|
} |
|
|
} |
|
|
this.$confirm(`复制会删除所选设备以前的数据,是否继续?`, '提示', { |
|
|
this.$confirm(`复制会删除所选设备以前的数据,是否继续?`, '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
@ -3879,7 +3880,7 @@ |
|
|
} |
|
|
} |
|
|
copyObjectSparesData(inList).then(({data}) => { |
|
|
copyObjectSparesData(inList).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.spareCopyModalFlag = false; |
|
|
|
|
|
|
|
|
this.spareCopyModalFlag = false |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: '操作成功', |
|
|
message: '操作成功', |
|
|
type: 'success', |
|
|
type: 'success', |
|
|
|