|
@@ -1198,34 +1198,38 @@ const copyNodeElTreeClick = ({ data, node }) => {
|
|
|
// //只能往上一级点击,不能跨层级点击
|
|
|
// //已上报的工序节点不能点击选择
|
|
|
// //如果选择的是父级节点,那不能复制到子级节点
|
|
|
- if (data['colorStatus'] === 2 || data['colorStatus'] == 1 || data['colorStatus'] === null || data['colorStatus'] === -1) {//已上报的工序不能点击
|
|
|
- if (data['id'] !== formCopyNodeModel.value.id) {//不能复制到本身节点下
|
|
|
- //只能往上一级点击,不能跨层级点击
|
|
|
- //如果选择的是父级节点,那不能复制到子级节点
|
|
|
- if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] == 6)) {
|
|
|
- setCopyNodeTable(data, title)
|
|
|
- }
|
|
|
- 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)
|
|
|
- }
|
|
|
+ const { hasChildren } = data
|
|
|
+ if (hasChildren === 0) {
|
|
|
+ if (data['colorStatus'] === 2 || data['colorStatus'] == 1 || data['colorStatus'] === null || data['colorStatus'] === -1) {//已上报的工序不能点击
|
|
|
+ if (data['id'] !== formCopyNodeModel.value.id) {//不能复制到本身节点下
|
|
|
+ //只能往上一级点击,不能跨层级点击
|
|
|
+ //如果选择的是父级节点,那不能复制到子级节点
|
|
|
+ if (type === 6 && (data['type'] === 4 || data['type'] === 5 || data['type'] == 6)) {
|
|
|
+ setCopyNodeTable(data, title)
|
|
|
+ }
|
|
|
+ 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)
|
|
|
+ }
|
|
|
|
|
|
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning('该节点已存在上报数据,不允许复制')
|
|
|
}
|
|
|
- } else {
|
|
|
- window?.$message?.warning('该节点已存在上报数据,不允许复制')
|
|
|
}
|
|
|
+
|
|
|
|
|
|
|
|
|
} else if (TabKey === '3') {
|