NEZ-2335 fix: 修复 asset 复制时,原占用的 机柜位置可选的问题

This commit is contained in:
zhangyu
2022-10-31 14:06:42 +08:00
parent 3336f96703
commit a90a94e095
25 changed files with 44 additions and 46 deletions

View File

@@ -472,7 +472,7 @@ export default {
duplicate (row) {
this.$get(`${this.url}/${row.id}`).then(response => {
if (response.code === 200) {
this.object = { ...response.data, id: '', name: `${row.name}-copy`, brandAndModel: '' }
this.object = { ...response.data, id: '', name: `${row.name}-copy`, brandAndModel: '', cabinet: '', dc: '', u: [], cabinetId: '', dcId: '' }
if (this.object.name.length > 64) {
const length = this.object.name.length - 64
this.object.name = row.name.substring(0, row.name.length - length) + '-copy'