NEZ-2106 fix:Asset复制后的数据不输入必填项model可保存成功,查看时会出现当前Type类型下没有的model

This commit is contained in:
zhangyu
2022-08-04 14:21:31 +08:00
parent fc29632879
commit 3511aa71ea

View File

@@ -450,7 +450,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` }
this.object = { ...response.data, id: '', name: `${row.name}-copy`, brandAndModel: '' }
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'