Browse Source

对接东吴掌财app

chenlei 5 months ago
parent
commit
65a573ee4a

+ 3 - 3
src/router/modules/report.js

@@ -20,7 +20,7 @@ export default[
     component:()=>import('@/views/report/PushList.vue'),
     name:'ReportList',
     meta:{
-      title:'推送报告列表'
+      title:'研报精选 '
     },
   },
   {
@@ -28,7 +28,7 @@ export default[
     component:()=>import('@/views/report/Search.vue'),
     name:'ReportSearch',
     meta:{
-      title:'推送报告搜索'
+      title:'搜索'
     },
   },
   {
@@ -36,7 +36,7 @@ export default[
     component:()=>import('@/views/report/PushDetail.vue'),
     name:'PushDetail',
     meta:{
-      title:'推送报告详情'
+      title:'研报详情'
     },
   }
 ]

+ 1 - 0
src/views/report/PushDetail.vue

@@ -31,6 +31,7 @@ async function getReportInfo() {
   })
   if (res.Ret === 200) {
     reportInfo.value = res.Data.Report
+    reportInfo.value.Content =reportInfo.value.Content.split('<p data-f-id="pbf" style="text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;">Powered by <a href="https://www.froala.com/wysiwyg-editor?pb=1" title="Froala Editor">Froala Editor</a></p>')[0]
     // reportStatus.value = res.Data.Status
     reportCollected.value = res.Data.IsCollect || false
     isBind.value=res.Data.IsSignIn

+ 20 - 2
src/views/report/PushList.vue

@@ -18,6 +18,7 @@
   let pdfPermissionId = ref(0)
   let pid = ref(0)
   const tabs = ref(null)
+  const activeTypeTabs = ref(null)
   let defaultValue = ref(0)
   let secondary = ref(false) // 是否选择过品种
   let secondaryList = ref([]) // 选择中品种后的三级品种列表
@@ -66,7 +67,7 @@
     if (res.Ret === 200) {
       const arr = res.Data.List || []
       list.value = [...list.value, ...arr]
-      console.log(list.value);
+      // console.log(list.value);
       finished.value = res.Data.Paging.IsEnd
     } else {
       finished.value = true
@@ -103,6 +104,9 @@
     filterState.ClassifyId = 0
     filterState.ChartPermissionId = e === 0 ? pid.value : e,
     secondary.value = true
+    nextTick(()=>{
+      // activeTypeTabs.value.setTrack()//设置滑块位置
+    })
     getReportPermissionOpts()
   }
   // 第二层选中
@@ -127,6 +131,9 @@
     handleRefreshList()
   }
 
+  nextTick(()=>{
+    // activeTypeTabs.value.setTrack()//设置滑块位置
+  })
   function handleRefreshList(){
     filterState.CurrentIndex = 1
     list.value=[]
@@ -143,6 +150,10 @@
   function toSearch(e) {
     router.push('/report/Search')
   }
+  // 关闭报告筛选
+  function updateShowFilter(val) {
+    showFilter.value = val
+  }
 
   const filterClassifyPermissionId = computed(() => {
     return activeType.value === 0 ? pid.value : defaultValue.value
@@ -157,7 +168,7 @@
           <div class="top">
             <t-input placeholder="请输入关键字" class="input" @click="toSearch">
               <template #prefixIcon>
-                <t-icon name="search" size="24px" color="RGBA(0, 79, 189, 1)"></t-icon>
+                <t-icon name="search" size="20px" color="RGBA(0, 79, 189, 1)"></t-icon>
               </template>
             </t-input>
             <t-button variant="text" size="large" class="btn" @click="handleFilter">
@@ -219,6 +230,7 @@
       :permissionOpts="typeOpts"
       :filterClassifyPermissionId="filterClassifyPermissionId"
       :firstPermissionId="pid"
+      @updateShowFilter="updateShowFilter"
       @change="handleFilterList" 
     />
   <!-- </default-page> -->
@@ -267,6 +279,8 @@
     align-items: center;
     padding: 0 28px;
     .input {
+      height: 80px;
+      padding: 0 30px;
       border: none;
       border-radius: 50px;
       background: rgba(248, 248, 250, 1);
@@ -278,6 +292,10 @@
   }
 }
 
+:deep(.t-input__icon--prefix){
+  justify-content: center;
+  align-items: center;
+}
 :deep(.t-tabs__item-inner--tag){
   background-color: #fff;
 }

+ 8 - 2
src/views/report/Search.vue

@@ -44,7 +44,7 @@
       const { scrollTop, scrollHeight, clientHeight } = document.documentElement; // 兼容大多数浏览器
       // 检查是否滚动到底部
       isScrolledToBottom.value = scrollTop + clientHeight >= scrollHeight;
-      if (isScrolledToBottom && !finished.value) {
+      if (isScrolledToBottom.value && !finished.value) {
         SearchState.CurrentIndex++ 
         getReportSearch()
       }
@@ -88,7 +88,7 @@
 
 <style lang="scss" scoped>
 .report-list-page {
-  background-color: #fff;
+  // background-color: #fff;
   min-height: 100vh;
 }
 .top-filter-wrap {
@@ -128,6 +128,8 @@
     align-items: center;
     padding: 0 28px;
     .input {
+      height: 80px;
+      padding: 0 30px;
       border-radius: 40px;
       background: rgba(248, 248, 250, 1);
     }
@@ -139,6 +141,10 @@
   }
 }
 
+:deep(.t-input__icon--prefix){
+  justify-content: center;
+  align-items: center;
+}
 :deep(.t-tabs__item-inner--tag){
   background-color: #fff;
 }

+ 5 - 3
src/views/report/components/CollapsibleList.vue

@@ -81,7 +81,7 @@ import { ref } from 'vue';
   }
 }
 .clicked {
-  color: rgba(0, 79, 189, 1);
+  color: rgba(0, 79, 189, 1) !important;
   background: rgba(245, 249, 255, 1);
 }
 .items {
@@ -108,7 +108,7 @@ li > div {
 
 .one-level-menu > li > div {
   font-size: 28px;
-  font-weight: 500;
+  font-weight: 400;
   line-height: 39.2px;
   text-align: left;
   padding: 28px 24px 28px 24px;
@@ -117,7 +117,9 @@ li > div {
   align-items: center; */
 }
 .two-level-menu > li > div{
-  font-size: 24px;
+  font-size: 28px;
+  font-weight: 400;
+  color: rgba(102, 102, 102, 1);
   line-height: 33.6px;
   text-align: left;
   padding: 12px 24px 12px 48px;

+ 8 - 13
src/views/report/components/Filter.vue

@@ -21,13 +21,10 @@ const props=defineProps({
     default:0,
   }
 })
-const emits = defineEmits(['update:show','change'])
+const emits = defineEmits(['update:show', 'updateShowFilter','change'])
 
 function onVisibleChange(e){
-  emits('update:show',e.detail.visible)
-}
-function handleClose(){
-  emits('update:show',false)
+  emits('updateShowFilter', e)
 }
 
 const typeActive=ref('报告分类')
@@ -89,14 +86,12 @@ watch(()=>props.show,()=>{
   }
 })
 function handleClassifyChange(e, level){
-  console.log(e, level);
   selectedClassifyId.value = e[level - 1]
 }
 
-
 function handleFilter(type){
   if(type==='reset'){
-    activeTime.value=''
+    activeTime.value = 3
     activePermission.value=0
     classifyId.value=[0]
     selectedClassifyId.value = 0
@@ -106,13 +101,13 @@ function handleFilter(type){
     permission:activePermission.value,
     classifyId:selectedClassifyId.value || 0
   })
-  handleClose()
+  onVisibleChange(false)
 }
 
 </script>
 
 <template>
-  <t-popup :visible="props.show" placement="top" @visiblechange="onVisibleChange">
+  <t-popup :visible="props.show" placement="top" @visible-change="onVisibleChange" :close-on-overlay-click="true">
     <div class="filter-wrap">
       <!-- <div class="header">
         <div class="title">全部筛选</div>
@@ -215,7 +210,7 @@ function handleFilter(type){
       // overflow-y: auto;
     }
     .type-item_height {
-      height: 288px;
+      height: 388px;
     }
     .time-wrap{
       padding: var(--page-padding);
@@ -229,7 +224,7 @@ function handleFilter(type){
         .opt {
           width: 100%;
           text-align: center;
-          padding: 10px 40px;
+          padding: 25px 40px;
           background-color: var(--bg-grey-color);
           border-radius: 40px;
         }
@@ -270,7 +265,7 @@ function handleFilter(type){
           margin-top: 10px;
           gap: 10px 20px;
           .opt{
-            padding: 5px 20px;
+            padding: 12px 20px;
             border-radius: 20px;
           }
         }