duy il y a 2 ans
Parent
commit
b06957748c
1 fichiers modifiés avec 13 ajouts et 13 suppressions
  1. 13 13
      src/views/data-fill/query.vue

+ 13 - 13
src/views/data-fill/query.vue

@@ -332,7 +332,9 @@ const searchForm = ref({
 
 
 //结构类型tab数据和相关处理
-const contractTypeTabKey = ref(2)
+// const contractTypeTabKey = ref('1')
+ const { contractType } = contractInfo.value;
+const contractTypeTabKey = ref(contractType===2?'2':'1')
 const contractTypeTab = ref([
     {key:'1',  name: '施工数据'},
     {key:'2', name: '监理数据'}
@@ -343,19 +345,17 @@ const contractTypeTabChange = (item) => {
 }
 
 //获取合同段类型
-const getContractTypeKey = () => {
-    const { contractType } = contractInfo.value;
-    if (contractType === 2 || contractType === 3) {
-        return contractTypeTabKey.value
-      
-        // return contractTypeTabKey.value ?? '1'
+// const getContractTypeKey = () => {
+//     const { contractType } = contractInfo.value;
+//     if (contractType === 2 || contractType === 3) {
+//         return contractTypeTabKey.value ?? '1'
 
-    } else {
+//     } else {
          
-        return null
+//         return null
        
-    }
-}
+//     }
+// }
 
 
 //日期时间被选择
@@ -404,12 +404,12 @@ const getTableData = async () => {
         tableListRef.value?.clearSelection()
         tableCheckedKeys.value = []
         tableLoading.value = true
-        const classifyType = getContractTypeKey();
+        // const classifyType = getContractTypeKey();
         const { error, code, data } = await queryApi.getPageData({
             projectId: projectId.value,
             contractId: contractId.value,
             ...searchForm.value,
-            classifyType: classifyType
+            classifyType:  contractTypeTabKey.value
         })
         //处理数据
         tableLoading.value = false