NEZ-2338 fix:asset 复制保存未校验location必填项
This commit is contained in:
@@ -871,7 +871,7 @@ export default {
|
||||
} else if (this.editAsset.cabinetStart && this.editAsset.cabinetEnd) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error(vm.$t('validate.required')))
|
||||
callback(new Error(this.$t('validate.required')))
|
||||
}
|
||||
}, 100)
|
||||
}
|
||||
|
||||
@@ -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: '', cabinet: '', dc: '', u: [], cabinetId: '', dcId: '' }
|
||||
this.object = { ...response.data, id: '', name: `${row.name}-copy`, brandAndModel: '', cabinet: undefined, dc: undefined, u: [], cabinetId: '', dcId: '', cabinetStart: '', cabinetEnd: '' }
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user