Przeglądaj źródła

关联构建编码修改

duy 1 tydzień temu
rodzic
commit
18c61c35d7

+ 3 - 3
src/api/modules/data-fill/wbs.js

@@ -619,10 +619,10 @@ export default {
             params: form,
         })
     },
-    //绑定阶段
-     async batchBind(form) {
+     //绑定阶段
+     async batchBind(form, form2) {
         return HcApi({
-            url: '/api/blade-manager/wbsDivide/batchBind',
+            url: `/api/blade-manager/wbsDivide/batchBind?contractId=${form2.contractId}&pKeyId=${form2.pKeyId}&projectId=${form2.projectId}`,
             method: 'post',
             data: form,
         })

+ 16 - 2
src/views/data-fill/components/linkData.vue

@@ -65,7 +65,7 @@
 import { ref, watch } from 'vue'
 import wbsApi from '~api/data-fill/wbs'
 import { getArrValue, getObjValue } from 'js-fast-way'
-
+import { useAppStore } from '~src/store'
 // 接收父组件传入的属性
 const props = defineProps({
     pKeyId:{
@@ -73,7 +73,13 @@ const props = defineProps({
         default: '',
     },
 })
+
 const emit = defineEmits(['close', 'save'])
+
+const useAppState = useAppStore()
+
+//全局变量
+const projectId = ref(useAppState.projectId)
 const pKeyId = ref(props.pKeyId)
 watch(() => props.pKeyId, (val) => {
     pKeyId.value = val
@@ -86,6 +92,8 @@ const linkModal = defineModel('modelValue', {
 
 // 左侧单选框值
 const leftRadio = ref('')
+
+
 const sourceData = ref([
     { id: '54e8a314de8a493d9f08a9d3cf7c', name: '一工区' },
     { id: 'f4fb6834d501474194410c15e9f5', name: '二工区' },
@@ -261,7 +269,13 @@ const confirmLink = async () => {
      confirmLoad.value = true
     const { error, code, data, msg } = await wbsApi.batchBind([
         selectedNodeData.value,
-    ])
+    ], {
+            contractId: leftRadio.value || '',
+            pKeyId: pKeyId.value || '',
+            projectId: projectId.value || '',
+         
+          
+        })
     confirmLoad.value = false
     
     if (!error && code === 200) {