|
@@ -746,29 +746,41 @@ const formCopyNodeModel = ref({})
|
|
const copyNodeTable = ref([])
|
|
const copyNodeTable = ref([])
|
|
|
|
|
|
//复制树被点击
|
|
//复制树被点击
|
|
-const copyNodeElTreeClick = ({node,data}) => {
|
|
|
|
- //console.log(formCopyNodeModel.value)
|
|
|
|
- //console.log(node)
|
|
|
|
|
|
+const copyNodeElTreeClick = ({data}) => {
|
|
const TabKey = copyNodeTabKey.value;
|
|
const TabKey = copyNodeTabKey.value;
|
|
- const {title} = formCopyNodeModel.value;
|
|
|
|
|
|
+ const {title, type} = formCopyNodeModel.value;
|
|
if (TabKey === '2') {
|
|
if (TabKey === '2') {
|
|
- if (!data['notExsitChild']) {
|
|
|
|
- copyNodeTable.value.push({
|
|
|
|
- title: data?.title || '',
|
|
|
|
- nodeName: title || '',
|
|
|
|
- primaryKeyId: data?.primaryKeyId || ''
|
|
|
|
- })
|
|
|
|
|
|
+ //1 单位工程,2 分部工程,3 子分部工程,4 分项工程, 5 子分项工程,6 工序
|
|
|
|
+ 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)
|
|
}
|
|
}
|
|
} else if (TabKey === '3') {
|
|
} else if (TabKey === '3') {
|
|
if (data['notExsitChild']) {
|
|
if (data['notExsitChild']) {
|
|
- copyNodeTable.value.push({
|
|
|
|
- title: data?.title || '',
|
|
|
|
- nodeName: data?.title || '',
|
|
|
|
- primaryKeyId: data?.primaryKeyId || ''
|
|
|
|
- })
|
|
|
|
|
|
+ setCopyNodeTable(data, data?.title)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+const setCopyNodeTable = (data, title) => {
|
|
|
|
+ copyNodeTable.value.push({
|
|
|
|
+ title: data?.title || '',
|
|
|
|
+ nodeName: title || '',
|
|
|
|
+ primaryKeyId: data?.primaryKeyId || ''
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
//节点表单
|
|
//节点表单
|
|
const formCopyNodeModelRef = ref(null)
|
|
const formCopyNodeModelRef = ref(null)
|
|
const formCopyNodeModelRules = {
|
|
const formCopyNodeModelRules = {
|