From 19e0970bb37c1cc65d8a623eb8ae3dd77feebb22 Mon Sep 17 00:00:00 2001 From: zhuzhuxia233 <1837289056@qq.com> Date: Thu, 13 Apr 2023 23:34:27 +0800 Subject: [PATCH] =?UTF-8?q?ipostatus=E5=BC=B9=E7=AA=972?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashBoard/index.vue | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/views/dashBoard/index.vue b/src/views/dashBoard/index.vue index fa63e95..58da8d7 100644 --- a/src/views/dashBoard/index.vue +++ b/src/views/dashBoard/index.vue @@ -227,21 +227,21 @@ const FinalAllocationPublic = ref('') const InitialAllocationInstitutional = ref('') const FinalAllocationInstitutional = ref('') const setBarRight = async () => { - const result = await getDataFromId('bar') - const ipoID = '00314'; - const index = result.findIndex((item: any) => item.ipoID == ipoID); - const graph = result[index].graph; - PublicOfferX.value = graph.map((item: any) => { - return moment(item.dateTime).format('MM-DD') - }) - PublicOfferY.value = graph.map((item: any) => { - return item.poApplicationQuantity; - }); - const amount = Number(initialpublic.value) + Number(initialinstituational.value); - InitialAllocationPublic.value = Math.round(Number(initialpublic.value) / amount * 10000) / 100 + "%"; + // const result = await getDataFromId('bar') + // const ipoID = '00314'; + // const index = result.findIndex((item: any) => item.ipoID == ipoID); + // const graph = result[index].graph; + // PublicOfferX.value = graph.map((item: any) => { + // return moment(item.dateTime).format('MM-DD') + // }) + // PublicOfferY.value = graph.map((item: any) => { + // return item.poApplicationQuantity; + // }); + // const amount = Number(initialpublic.value) + Number(initialinstituational.value); + // InitialAllocationPublic.value = Math.round(Number(initialpublic.value) / amount * 10000) / 100 + "%"; - InitialAllocationInstitutional.value = Math.round(Number(initialinstituational.value) / amount * 10000) / 100 + "%"; - init(); + // InitialAllocationInstitutional.value = Math.round(Number(initialinstituational.value) / amount * 10000) / 100 + "%"; + // init(); } const setBar = async () => { const ipoID = localStorage.getItem('ipoID') @@ -264,8 +264,8 @@ const setBar = async () => { init(); } onMounted(() => { - setBarRight();//假的bar接口 - // setBar()//真的接口 + // setBarRight();//假的bar接口 + setBar()//真的接口 }) const getdatatime = async () => { const res = await getHomeIpo(1) @@ -274,13 +274,13 @@ const getdatatime = async () => { } const getreferencedata = async () => { //---mock测试接口 - const result1 = await getDataFromId('bar'); - const res = result1[0]; + // const result1 = await getDataFromId('bar'); + // const res = result1[0]; //---mock测试接口结束 const ipoID = localStorage.getItem('ipoID') - // const result = await getIpo(ipoID as string) - // const res=(result as any).data[0]; + const result = await getIpo(ipoID as string) + const res = (result as any).data[0]; // console.log(res); const { bookOpenDate, bookCloseDate, allotmentDate, siInputDate, listingDate } = res;