NEZ-2336 fix:Rcord rules复制规则保存时提示name格式错误

This commit is contained in:
zhangyu
2022-10-31 17:49:48 +08:00
parent a90a94e095
commit 6deaa0b961
4 changed files with 21 additions and 7 deletions

View File

@@ -232,8 +232,9 @@ export default {
}
})
},
copy (u) {
this.object = { ...u, name: u.name + '-copy', id: '' }
copy (u, copyParams) {
const copyName = this.$loadsh.get(copyParams, 'copyName', '-copy')
this.object = { ...u, name: u.name + copyName, id: '' }
if (this.object.name.length > 64) {
const length = this.object.name.length - 64
this.object.name = u.name.substring(0, u.name.length - length) + '-copy'