|
@@ -1497,6 +1497,7 @@
|
|
:user-info="userInfo"
|
|
:user-info="userInfo"
|
|
@close="handleModalClose"
|
|
@close="handleModalClose"
|
|
@link="handleLinkNodes"
|
|
@link="handleLinkNodes"
|
|
|
|
+ :linkLoading="linkLoading"
|
|
></tree-copy-modal>
|
|
></tree-copy-modal>
|
|
</basic-container>
|
|
</basic-container>
|
|
</template>
|
|
</template>
|
|
@@ -1542,6 +1543,7 @@ import {
|
|
updateBatchElements,
|
|
updateBatchElements,
|
|
getTemplate,
|
|
getTemplate,
|
|
importWbsElement,
|
|
importWbsElement,
|
|
|
|
+ copyNode
|
|
} from "@/api/manager/wbsformelement";
|
|
} from "@/api/manager/wbsformelement";
|
|
import { getDictionary, getChildList } from "@/api/system/dict";
|
|
import { getDictionary, getChildList } from "@/api/system/dict";
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
@@ -1720,6 +1722,8 @@ export default {
|
|
standardTypeOptions: [], //标准分类
|
|
standardTypeOptions: [], //标准分类
|
|
unitOptions: [], //单位名称
|
|
unitOptions: [], //单位名称
|
|
copyDialogVisible: false, //复制节点弹框
|
|
copyDialogVisible: false, //复制节点弹框
|
|
|
|
+ linkLoading: false, //复制节点加载
|
|
|
|
+
|
|
|
|
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -3401,24 +3405,33 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
// 处理节点关联
|
|
// 处理节点关联
|
|
- handleLinkNodes(linkData, successCallback) {
|
|
|
|
|
|
+ async handleLinkNodes(linkData) {
|
|
console.log('准备关联的节点数据:', linkData);
|
|
console.log('准备关联的节点数据:', linkData);
|
|
|
|
|
|
- // // 调用API进行节点关联
|
|
|
|
- // linkNodesApi(linkData)
|
|
|
|
- // .then(res => {
|
|
|
|
- // if (res.data.success) {
|
|
|
|
- // // 关联成功,调用回调函数
|
|
|
|
- // successCallback();
|
|
|
|
- // } else {
|
|
|
|
- // this.$message.error('关联失败: ' + (res.data.message || '未知错误'));
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
- // .catch(err => {
|
|
|
|
- // console.error('关联节点出错:', err);
|
|
|
|
- // this.$message.error('关联失败,请重试');
|
|
|
|
- // });
|
|
|
|
|
|
+ this.linkLoading = true;
|
|
|
|
+ const { data: res } = await copyNode({
|
|
|
|
+ leftIds: linkData.sourceNodes,
|
|
|
|
+ rightIds: linkData.targetNodes,
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.linkLoading = false;
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: res.msg
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: res.msg
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+ //表单排序
|
|
|
|
+
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
ManualSorting,
|
|
ManualSorting,
|