Prechádzať zdrojové kódy

截止时间接口调用

duy 7 mesiacov pred
rodič
commit
1714d0a7e6

+ 8 - 1
src/api/modules/datav/projectdata.js

@@ -25,5 +25,12 @@ export default {
             params: form,
         }, false)
     },
-
+    //数据看板-截止时间
+    async dateEndDate(form) {
+        return HcApi({
+            url: '/api/blade-attach/project/data-end-date',
+            method: 'get',
+            params: form,
+        }, false)
+    },
 }

+ 13 - 1
src/views/home/datav.vue

@@ -23,7 +23,7 @@
                         <HcDatavSelect v-if="pageType === '1'" v-model="searchForm.projectType" :datas="typeArr" placeholder="项目类型" @change="searchChange" />
                         <HcDatavSelect v-else v-model="searchForm.quarter" :datas="quarterArr" placeholder="选择季度" />
                     </div>
-                    <div class="date flex-1">截止时间:2024年04月08日</div>
+                    <div class="date flex-1">截止时间: {{ endDate }}</div>
                 </div>
             </div>
             <div class="hc-datav-total relative p-[14px]">
@@ -341,6 +341,7 @@ onMounted(() => {
         newMonthArr.push({ id: i + 1, name: `${i + 1}月` })
     }
     monthArr.value = newMonthArr
+    getEndDate()
     getProType()
     getProStation()
     searchChange()
@@ -383,6 +384,17 @@ const getProStation = async () => {
     })
 
 }
+//获取截止时间
+const endDate = ref('2024年04月08日')
+const getEndDate = async ()=>{
+    const { error, code, data } = await projectApi.dateEndDate()
+    //处理数据
+    if (!error && code === 200) {
+        endDate.value = data
+    } else {
+        endDate.value = ''
+    }
+}
 //项目
 //搜索条
 //页面类型改变