Răsfoiți Sursa

bug修改+订单消息

祁鹏飞 2 luni în urmă
părinte
comite
4820263da6
3 a modificat fișierele cu 49 adăugiri și 82 ștergeri
  1. 1 0
      src/api/modules/home.ts
  2. 47 81
      src/views/index.vue
  3. 1 1
      src/views/insurancePolicy/index.vue

+ 1 - 0
src/api/modules/home.ts

@@ -7,6 +7,7 @@ const homeApi = (axiosInstance: ApiInstance) => ({
     distribution: () => axiosInstance.get('/homepage/business-type/distribution'), // 业务类型分布
     businessDistribution: (data: string) => axiosInstance.get(`/homepage/business/distribution?province=${data}`), // 业务员分布
     commonFunctions: () => axiosInstance.get('/menu/common/functions'), // 首页常用功能
+    messageList: (data) => axiosInstance.post('/message/messageList',data), // 首页常用功能
 })
 
 export default homeApi

+ 47 - 81
src/views/index.vue

@@ -95,54 +95,6 @@ echarts.registerMap('浙江', zhejiang)
 
 let myRouter = useRouter()
 
-function open(url: string) {
-  window.open(url, '_blank')
-}
-
-// 常用功能
-let functionList = ref([
-  {
-    id: 1,
-    name: '车险出单',
-    icon: cxcd
-  },
-  {
-    id: 2,
-    name: '补录订单',
-    icon: bldd
-  },
-  {
-    id: 3,
-    name: '订单查询',
-    icon: ddcx
-  },
-  {
-    id: 4,
-    name: '协议管理',
-    icon: xygl
-  },
-  {
-    id: 5,
-    name: '费用管理',
-    icon: fygl
-  },
-  {
-    id: 6,
-    name: '保险公司',
-    icon: bxgs
-  },
-  {
-    id: 7,
-    name: '保险公司账号',
-    icon: bxgszh
-  },
-  {
-    id: 8,
-    name: '业务员管理',
-    icon: ywygl
-  },
-])
-
 // 地图
 let ChinaMap = ref()
 const initChinaMap = () => {
@@ -785,6 +737,19 @@ const initCommonFunctions = () => {
     }
   })
 }
+
+let newsList = ref([])
+const getNewList = () => {
+  api.homeApi.messageList({
+    type: "2",
+    pages: 1,
+    size: 25
+  }).then((res: any) => {
+    if (res.code == 200) {
+      newsList.value = res.data.records
+    }
+  })
+}
 const handleRouterChange = (item, index) => {
   myRouter.push({
     name: item.name,
@@ -818,6 +783,7 @@ onMounted(async () => {
     initCityMap(userInfo?.province);
   }
   initDailyData();
+  getNewList();
   initOrderTrend();
   initBusinessFunnel();
   initDistribution();
@@ -920,43 +886,43 @@ onMounted(async () => {
         </div>
         <div class="level">
           <div class="title">{{ provinceName || '市级' }}</div>
-            <div class="cityMap" ref="CityMap"></div>
-          </div>
-        </div>
-        <PageMain class="ecology">
-          <div class="title">出单趋势</div>
-          <div class="orderTrend" ref="TrendRef"></div>
-        </PageMain>
-        <div class="otherBox">
-          <div class="funnel">
-            <div class="title">业务漏斗</div>
-            <div class="chinaMap" ref="FunnelRef"></div>
-          </div>
-          <div class="pie">
-            <div class="title">业务类型分布</div>
-            <div class="cityMap" ref="PieRef"></div>
-          </div>
+          <div class="cityMap" ref="CityMap"></div>
         </div>
       </div>
-      <PageMain class="right-section ">
-        <div class="title">业务动态</div>
-        <!-- 订单 -->
-        <div class="quoteOrder mt-[24px]">
-          <div class="item flex f-c mb-[16px]" v-for="i in 10" :key="i">
-            <div class="flex a-c j-s mb-[8px]">
-              <span class="Order-title">报价订单</span>
-              <span class="Order-time">2025.06.13 12:00:17</span>
-            </div>
-            <span class="Order-premium">%保险公司名称名称%-%订单保费%</span>
-          </div>
+      <PageMain class="ecology">
+        <div class="title">出单趋势</div>
+        <div class="orderTrend" ref="TrendRef"></div>
+      </PageMain>
+      <div class="otherBox">
+        <div class="funnel">
+          <div class="title">业务漏斗</div>
+          <div class="chinaMap" ref="FunnelRef"></div>
         </div>
-        <!-- app二维码 -->
-        <div class="qrcode flex a-c f-c">
-          <img :src="downloadUrl" alt="">
-          <span>扫码下载App</span>
+        <div class="pie">
+          <div class="title">业务类型分布</div>
+          <div class="cityMap" ref="PieRef"></div>
         </div>
-      </PageMain>
+      </div>
     </div>
+    <PageMain class="right-section ">
+      <div class="title">业务动态</div>
+      <!-- 订单 -->
+      <div class="quoteOrder mt-[24px]">
+        <div class="item flex f-c mb-[16px]" v-for="item in newsList" :key="item.id">
+          <div class="flex a-c j-s mb-[8px]">
+            <span class="Order-title">报价订单</span>
+            <span class="Order-time">{{ item.createTime }}</span>
+          </div>
+          <span class="Order-premium">{{ item.title }}</span>
+        </div>
+      </div>
+      <!-- app二维码 -->
+      <div class="qrcode flex a-c f-c">
+        <img :src="downloadUrl" alt="">
+        <span>扫码下载App</span>
+      </div>
+    </PageMain>
+  </div>
 </template>
 
 <style lang="scss" scoped>
@@ -1172,4 +1138,4 @@ onMounted(async () => {
     margin-top: 24px;
   }
 }
-</style>
+</style>

+ 1 - 1
src/views/insurancePolicy/index.vue

@@ -3832,7 +3832,7 @@ const ruleFilterCompany = (item: any, obj: any) => {
               item.quoteResult = { ...a, ...obj };
               item.insurancePlanInfo = {}
               item.insurancePlanInfo.drivings = obj.accidentalDrivings;
-              item.insurancePlanInfo.kinds = obj.kindInfoVo;
+              item.insurancePlanInfo.kinds = obj.kindInfoVo.filter(v=>v.id);
               item.quoteCode = 200
               item.checked = true
               // 如果有错误信息,设置状态为失败 并记录错误信息