|
@@ -689,16 +689,16 @@ const copyNodeElTreeClick = ({data}) => {
|
|
|
// }
|
|
|
|
|
|
if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] == 6)) {
|
|
|
- //限制复制数据不能复制到本身节点下
|
|
|
- if (data['id'] !== formCopyNodeModel.value.id) {
|
|
|
- if (data['notExsitChild']) {
|
|
|
- //限制一个节点不能点击多次
|
|
|
- let oldarr = copyNodeTable.value
|
|
|
- let result = oldarr.some(item => item.primaryKeyId === data['primaryKeyId']) //true
|
|
|
- if (!result) {
|
|
|
- setCopyNodeTable(data, data?.title)
|
|
|
- }
|
|
|
+ //限制复制数据不能复制到本身节点下
|
|
|
+ if (data['id'] !== formCopyNodeModel.value.id) {
|
|
|
+ if (data['notExsitChild']) {
|
|
|
+ //限制一个节点不能点击多次
|
|
|
+ let oldarr = copyNodeTable.value
|
|
|
+ let result = oldarr.some(item => item.primaryKeyId === data['primaryKeyId']) //true
|
|
|
+ if (!result) {
|
|
|
+ setCopyNodeTable(data, data?.title)
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] !== 6)) {
|
|
@@ -747,8 +747,8 @@ const setCopyNodeTable = (data, title) => {
|
|
|
title: data?.title || '',
|
|
|
nodeName: title || '',
|
|
|
primaryKeyId: data?.primaryKeyId || '',
|
|
|
- parentId:data?.parentId || '',
|
|
|
- id:data?.id || '',
|
|
|
+ parentId: data?.parentId || '',
|
|
|
+ id: data?.id || '',
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -775,7 +775,6 @@ const copyNodeTableDel = (index) => {
|
|
|
copyNodeTable.value.splice(index, 1)
|
|
|
}
|
|
|
//复制节点
|
|
|
-//复制节点
|
|
|
const copyNodeClick = async () => {
|
|
|
const type = copyNodeTabKey.value
|
|
|
const form = formCopyNodeModel.value
|
|
@@ -793,13 +792,12 @@ const copyNodeClick = async () => {
|
|
|
classify = arr.join(',')
|
|
|
}
|
|
|
//isSameNode 是否同节点 1=同节点,0=跨节点
|
|
|
- //isSameNode 是否同节点 1=同节点,0=跨节点
|
|
|
- if(table.length>0){
|
|
|
- table.forEach((ele)=>{
|
|
|
- if(ele.parentId===formCopyNodeModel.value.parentId||ele.id===formCopyNodeModel.value.parentId){
|
|
|
- ele.isSameNode =1
|
|
|
- }else{
|
|
|
- ele.isSameNode =0
|
|
|
+ /*if(table.length>0){
|
|
|
+ table.forEach((ele)=>{
|
|
|
+ if(ele.parentId===formCopyNodeModel.value.parentId||ele.id===formCopyNodeModel.value.parentId){
|
|
|
+ ele.isSameNode =1
|
|
|
+ }else{
|
|
|
+ ele.isSameNode =0*/
|
|
|
if (table.length > 0) {
|
|
|
table.forEach((ele) => {
|
|
|
if (ele.primaryKeyId === formCopyNodeModel.value.primaryKeyId) {
|