8
0
Pārlūkot izejas kodu

Merge branch 'main' of http://39.108.216.210:3000/web/admin into main

duy 9 mēneši atpakaļ
vecāks
revīzija
e2d596dd60
2 mainītis faili ar 59 papildinājumiem un 8 dzēšanām
  1. 50 6
      src/views/project/detail/detail.vue
  2. 9 2
      src/views/project/list.vue

+ 50 - 6
src/views/project/detail/detail.vue

@@ -45,19 +45,34 @@ const tabsKey = ref('1')
 const tabsData = ref([])
 const basicForm = ref({ pid: '' })
 const getDataApi = async () => {
-    const { pid, cid, type } = getObjValue(dataInfo.value)
+    const { pid, cid, type, tab } = getObjValue(dataInfo.value)
     if (isNullES(cid)) {
         tabsData.value = [{ key: '1', name: '合同段信息' }]
     } else {
         tabsData.value = [{ key: '1', name: '合同段信息' }, { key: '2', name: '分配WBS' }, { key: '3', name: '分配项目人员' }]
     }
     await getContractTypeList()
-    if (isNullES(cid)) {
-        basicForm.value.pid = pid
-    } else {
-        console.log(type)
+    basicForm.value = { pid: pid }
+    if (!isNullES(cid)) {
+        if ([1, 4, 8].includes(type)) {
+            await getContractInfo()
+        } else if ([2, 3].includes(type)) {
+            await getContractInfo2()
+            await getContractRelation()
+        }
+    }
+    await getProjectDeatil()
+    if (!isNullES(tab)) {
+        tabsKey.value = tab
     }
-    console.log(basicForm.value)
+    getStoragePeriodList()
+    getSecurityLevelList()
+    setHeaders()
+}
+
+//获取项目详情
+const getProjectDeatil = async () => {
+
 }
 
 //获取合同类型
@@ -66,6 +81,34 @@ const getContractTypeList = async () => {
     contractTypeList.value = await getDictionaryData('contract_type')
 }
 
+//获取合同段基本信息
+const getContractInfo = async () => {
+
+}
+
+//获取合同段基本信息
+const getContractInfo2 = async () => {
+
+}
+
+//监理、业主关联施工
+const getContractRelation = async () => {
+
+}
+
+//获取业务字典
+const getStoragePeriodList = async () => {
+
+}
+
+//获取安全等级
+const getSecurityLevelList = async () => {
+
+}
+
+const setHeaders = async () => {
+
+}
 
 //选项卡
 const tabsChange = ({ key }) => {
@@ -75,6 +118,7 @@ const tabsChange = ({ key }) => {
 //关闭抽屉
 const drawerClose = () => {
     isShow.value = false
+    tabsKey.value = '1'
     emit('close')
 }
 </script>

+ 9 - 2
src/views/project/list.vue

@@ -174,9 +174,16 @@ const projectInfoCheck = async ({ type, info, item }) => {
         await nextTick()
         isContractDrawer.value = true
     } else if (type === 'wbsContract') {
-        console.log('分配WBS')
+        const { id } = getObjValue(info)
+        contractItem.value = {
+            pid: id,
+            cid: item.id,
+            type: item.contractType,
+            tab: '2',
+        }
+        await nextTick()
+        isContractDrawer.value = true
     }
-    //console.log(type, info, item)
 }
 
 //创建项目或修改项目