|
@@ -704,129 +704,53 @@ const classifyList = ref([])
|
|
const isCopyData=ref(0)
|
|
const isCopyData=ref(0)
|
|
|
|
|
|
//复制树被点击
|
|
//复制树被点击
|
|
-// const copyNodeElTreeClick = ({data}) => {
|
|
|
|
-// const TabKey = copyNodeTabKey.value;
|
|
|
|
-// const {title, type} = formCopyNodeModel.value;
|
|
|
|
-// if (TabKey === '2') {
|
|
|
|
-// //1 单位工程,2 分部工程,3 子分部工程,4 分项工程, 5 子分项工程,6 工序
|
|
|
|
-// //工序节点不能复制到工序节点下面
|
|
|
|
-// // if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] === 6)) {
|
|
|
|
-// // setCopyNodeTable(data, title)
|
|
|
|
-// // }
|
|
|
|
-
|
|
|
|
-// 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 (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] !== 6)) {
|
|
|
|
-// setCopyNodeTable(data, title)
|
|
|
|
-// }
|
|
|
|
-// if (type === 5 && data['type'] === 4) {
|
|
|
|
-// setCopyNodeTable(data, title)
|
|
|
|
-// }
|
|
|
|
-// if (type === 4 && (data['type'] === 2 || data['type'] === 3)) {
|
|
|
|
-// setCopyNodeTable(data, title)
|
|
|
|
-// }
|
|
|
|
-// if (type === 3 && data['type'] === 2) {
|
|
|
|
-// setCopyNodeTable(data, title)
|
|
|
|
-// }
|
|
|
|
-// if (type === 2 && data['type'] === 1) {
|
|
|
|
-// setCopyNodeTable(data, title)
|
|
|
|
-// }
|
|
|
|
-// if (type === 1 && data['type'] === 1) {
|
|
|
|
-// setCopyNodeTable(data, title)
|
|
|
|
-// }
|
|
|
|
-// } else if (TabKey === '3') {
|
|
|
|
-// //限制复制数据不能复制到本身节点下
|
|
|
|
-// if (data['id'] !== formCopyNodeModel.value.id) {
|
|
|
|
-// // console.log(formCopyNodeModel.value,'formCopyNodeModel.value');
|
|
|
|
-// // console.log(data,'data');
|
|
|
|
-// // if(data['colorStatus']===1||data['colorStatus']===2){
|
|
|
|
-// // // delModalClick()
|
|
|
|
-// // }else{
|
|
|
|
-// // window?.$message?.warning('该节点已存在上报数据,不允许复制')
|
|
|
|
-// // }
|
|
|
|
-// if (data['notExsitChild']) {
|
|
|
|
-// //限制一个节点不能点击多次
|
|
|
|
-// let oldarr = copyNodeTable.value
|
|
|
|
-// let result = oldarr.some(item => item.primaryKeyId === data['primaryKeyId']) //true
|
|
|
|
-// if (!result) {
|
|
|
|
-// setCopyNodeTable(data, data?.title)
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-const copyNodeElTreeClick = ({data}) => {
|
|
|
|
|
|
+//复制树被点击
|
|
|
|
+const copyNodeElTreeClick = ({data,node}) => {
|
|
const TabKey = copyNodeTabKey.value;
|
|
const TabKey = copyNodeTabKey.value;
|
|
const {title, type, partitionCode} = formCopyNodeModel.value;
|
|
const {title, type, partitionCode} = formCopyNodeModel.value;
|
|
if (TabKey === '2') {
|
|
if (TabKey === '2') {
|
|
- setCopyNodeTable(data, title, partitionCode)
|
|
|
|
|
|
+ // setCopyNodeTable(data, title, partitionCode)
|
|
//1 单位工程,2 分部工程,3 子分部工程,4 分项工程, 5 子分项工程,6 工序
|
|
//1 单位工程,2 分部工程,3 子分部工程,4 分项工程, 5 子分项工程,6 工序
|
|
- //工序节点不能复制到工序节点下面
|
|
|
|
- /*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['colorStatus']===2||data['colorStatus']==1){//已上报的工序不能点击
|
|
|
|
+ if (data['id'] !== formCopyNodeModel.value.id) {//不能复制到本身节点下
|
|
|
|
+ //只能往上一级点击,不能跨层级点击
|
|
|
|
+
|
|
|
|
+ //如果选择的是父级节点,那不能复制到子级节点
|
|
|
|
+ if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] == 6)) {
|
|
|
|
+ setCopyNodeTable(data, data?.title)
|
|
}
|
|
}
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] !== 6)) {
|
|
|
|
- setCopyNodeTable(data, title, partitionCode)
|
|
|
|
- }
|
|
|
|
- if (type === 5 && data['type'] === 4) {
|
|
|
|
- setCopyNodeTable(data, title, partitionCode)
|
|
|
|
- }
|
|
|
|
- if (type === 4 && (data['type'] === 2 || data['type'] === 3)) {
|
|
|
|
- setCopyNodeTable(data, title, partitionCode)
|
|
|
|
- }
|
|
|
|
- if (type === 3 && data['type'] === 2) {
|
|
|
|
- setCopyNodeTable(data, title, partitionCode)
|
|
|
|
- }
|
|
|
|
- if (type === 2 && data['type'] === 1) {
|
|
|
|
- setCopyNodeTable(data, title, partitionCode)
|
|
|
|
|
|
+ if (type === 5 && data['type'] === 4) {
|
|
|
|
+ setCopyNodeTable(data, title, partitionCode)
|
|
|
|
+ }
|
|
|
|
+ if (type === 4 && (data['type'] === 2 || data['type'] === 3)) {
|
|
|
|
+ setCopyNodeTable(data, title, partitionCode)
|
|
|
|
+ }
|
|
|
|
+ if (type === 3 && data['type'] === 2) {
|
|
|
|
+ setCopyNodeTable(data, title, partitionCode)
|
|
|
|
+ }
|
|
|
|
+ if (type === 2 && data['type'] === 1) {
|
|
|
|
+ setCopyNodeTable(data, title, partitionCode)
|
|
|
|
+ }
|
|
|
|
+ if (type === 1 && data['type'] === 1) {
|
|
|
|
+ setCopyNodeTable(data, title, partitionCode)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
- if (type === 1 && data['type'] === 1) {
|
|
|
|
- setCopyNodeTable(data, title, partitionCode)
|
|
|
|
- }*/
|
|
|
|
|
|
+ }else{
|
|
|
|
+ window?.$message?.warning('该节点已存在上报数据,不允许复制')
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
} else if (TabKey === '3') {
|
|
} else if (TabKey === '3') {
|
|
console.log(1111111);
|
|
console.log(1111111);
|
|
setCopyNodeTable(data, data?.title)
|
|
setCopyNodeTable(data, data?.title)
|
|
- //限制复制数据不能复制到本身节点下
|
|
|
|
- /*if (data['id'] !== formCopyNodeModel.value.id) {
|
|
|
|
- // console.log(formCopyNodeModel.value,'formCopyNodeModel.value');
|
|
|
|
- // console.log(data,'data');
|
|
|
|
- // if(data['colorStatus']===1||data['colorStatus']===2){
|
|
|
|
- // // delModalClick()
|
|
|
|
- // }else{
|
|
|
|
- // window?.$message?.warning('该节点已存在上报数据,不允许复制')
|
|
|
|
- // }
|
|
|
|
- if (data['notExsitChild']) {
|
|
|
|
- //限制一个节点不能点击多次
|
|
|
|
- let oldarr = copyNodeTable.value
|
|
|
|
- let result = oldarr.some(item => item.primaryKeyId === data['primaryKeyId']) //true
|
|
|
|
- if (!result) {
|
|
|
|
- setCopyNodeTable(data, data?.title)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }*/
|
|
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|