Browse Source

Merge branch 'main' into feature/v1.0.91

yuelujie 6 tháng trước cách đây
mục cha
commit
db634050b2

+ 7 - 1
apps/bigmember_pc/src/views/analysisReport/MarketAnalysis.vue

@@ -353,6 +353,10 @@ export default {
         } else {
           this.generateConfirm(data)
         }
+      } else {
+        if (msg) {
+          this.$toast(msg || '操作失败!')
+        }
       }
     },
     showAnalysisResult(id) {
@@ -377,6 +381,8 @@ export default {
             }
           })
         })
+      } else if (resData.status === -1) {
+        this.$toast(resData.msg || '报告生成失败!')
       }
     },
     // 跳转到推送设置页
@@ -594,7 +600,7 @@ export default {
       }
     }
   }
-  .analyse-filter-time .s-header{
+  .analyse-filter-time .s-header {
     margin-top: 2px;
   }
 }

+ 55 - 41
apps/bigmember_pc/src/views/analysisReport/MarketAnalysisResult.vue

@@ -13,19 +13,19 @@
               @command="dropDownClick"
               placement="bottom"
               :class="{
-              highlight: value.dropDownShow
-            }"
+                highlight: value.dropDownShow
+              }"
               v-for="(value, key) in dimensionsTitle"
               :key="key"
               size="small"
             >
-            <span class="el-dropdown-link" @click="dropDownClick(value)">
-              <span class="dropdown-text">{{ value.name }}</span>
-              <i
-                class="el-icon-caret-bottom"
-                :class="{ highlight: value.dropDownShow }"
-              ></i>
-            </span>
+              <span class="el-dropdown-link" @click="dropDownClick(value)">
+                <span class="dropdown-text">{{ value.name }}</span>
+                <i
+                  class="el-icon-caret-bottom"
+                  :class="{ highlight: value.dropDownShow }"
+                ></i>
+              </span>
               <el-dropdown-menu
                 slot="dropdown"
                 :append-to-body="false"
@@ -43,7 +43,12 @@
             </el-dropdown>
           </div>
         </div>
-        <el-button class="download-report-btn" type="primary" @click="downloadReport">下载报告</el-button>
+        <el-button
+          class="download-report-btn"
+          type="primary"
+          @click="downloadReport"
+          >下载报告</el-button
+        >
       </div>
       <div class="analysis-limit-time analysis-wrap">
         <div class="analysis-label">数据统计范围:</div>
@@ -192,7 +197,7 @@
                   "
                   v-loading="!sections.loaded.top3"
                 >
-                <!-- 原项目数量TOP3地区的重点中标单位--改为全部地区-->
+                  <!-- 原项目数量TOP3地区的重点中标单位--改为全部地区-->
                   <p class="ar-table-title">各地区重点中标单位-项目数量</p>
                   <Top3Table
                     v-if="sections.areaScatter.projectCount"
@@ -264,14 +269,11 @@
                   class="ar-table"
                   v-if="
                     !sections.loaded.top3 ||
-                    (sections.userScatter.projectCount &&
-                      sections.loaded.top3)
+                    (sections.userScatter.projectCount && sections.loaded.top3)
                   "
                   v-loading="!sections.loaded.top3"
                 >
-                  <p class="ar-table-title">
-                    各客户类型重点中标单位-项目数量
-                  </p>
+                  <p class="ar-table-title">各客户类型重点中标单位-项目数量</p>
                   <Top3Table
                     v-if="sections.userScatter.projectCount"
                     :tableData="sections.userScatter.projectCount"
@@ -285,14 +287,11 @@
                   class="ar-table"
                   v-if="
                     !sections.loaded.top3 ||
-                    (sections.userScatter.projectAmount &&
-                      sections.loaded.top3)
+                    (sections.userScatter.projectAmount && sections.loaded.top3)
                   "
                   v-loading="!sections.loaded.top3"
                 >
-                  <p class="ar-table-title">
-                    各客户类型重点中标单位-项目金额
-                  </p>
+                  <p class="ar-table-title">各客户类型重点中标单位-项目金额</p>
                   <Top3Table
                     v-if="sections.userScatter.projectAmount"
                     :tableData="sections.userScatter.projectAmount"
@@ -486,7 +485,10 @@
                 </div>
               </div>
               <div class="top3-table-list pd-lr20">
-                <div class="ar-table winner-count-top3" v-if="isConf26 && sections.winner.projectCountTop3">
+                <div
+                  class="ar-table winner-count-top3"
+                  v-if="isConf26 && sections.winner.projectCountTop3"
+                >
                   <p class="ar-table-title">
                     项目数量TOP30中标单位及其重点合作采购单位
                   </p>
@@ -507,7 +509,10 @@
                   k="项目数量TOP30中标单位及其重点合作采购单位"
                   :item="vipUpgradeMap[Object.keys(vipUpgradeMap)[6]]"
                 ></MaskCard>
-                <div class="ar-table winner-amount-top3" v-if="isConf26 && sections.winner.projectAmountTop3">
+                <div
+                  class="ar-table winner-amount-top3"
+                  v-if="isConf26 && sections.winner.projectAmountTop3"
+                >
                   <p class="ar-table-title">
                     中标金额TOP30中标单位及其重点合作采购单位
                   </p>
@@ -566,7 +571,14 @@
 </template>
 
 <script>
-import { Dropdown, DropdownMenu, DropdownItem, Icon, Tabs, TabPane } from 'element-ui'
+import {
+  Dropdown,
+  DropdownMenu,
+  DropdownItem,
+  Icon,
+  Tabs,
+  TabPane
+} from 'element-ui'
 import MarketOverview from '@/views/analysisReport/components/MarketOverview.vue'
 import ProjectScatter from '@/views/analysisReport/components/ProjectScatter.vue'
 import MarketTimeScatter from '@/views/analysisReport/components/MarketTimeScatter.vue'
@@ -915,7 +927,7 @@ export default {
   },
   computed: {
     ...mapState({
-      info: (state) => state.user.info,
+      info: (state) => state.user.info
     }),
     ...mapGetters('user', ['bigmember', 'entniche']),
     reportSelectedKeywords() {
@@ -965,8 +977,11 @@ export default {
       return winnerState.dataAlready && winnerState.chartData
     },
     // 是否展示底部下载提示
-    bottomDownloadShow () {
-      return this.sections.market.overview.length > 0 && this.sections.market.overview[0]?.count
+    bottomDownloadShow() {
+      return (
+        this.sections.market.overview.length > 0 &&
+        this.sections.market.overview[0]?.count
+      )
     }
   },
   created() {
@@ -995,9 +1010,9 @@ export default {
   },
   methods: {
     // 处理底部下载提示框展示宽度
-    getBottomFixedWidth () {
+    getBottomFixedWidth() {
       const originWidth = this.calcOriginWidth()
-      if(this.$root.$el.querySelector('.download-bottom-tip')) {
+      if (this.$root.$el.querySelector('.download-bottom-tip')) {
         this.$root.$el.querySelector('.download-bottom-tip').style.width =
           originWidth + 'px'
       }
@@ -1025,7 +1040,8 @@ export default {
           originWidth + 'px'
         this.dimFixed = true
       } else {
-        this.$root.$el.querySelector('.analysis-dimensions').style.width = '100%'
+        this.$root.$el.querySelector('.analysis-dimensions').style.width =
+          '100%'
         this.dimFixed = false
       }
     },
@@ -1813,7 +1829,7 @@ export default {
             const row = {
               index: index + 1,
               name: item.name,
-              value: formatPrice(item.area_amount / 10000) + '万元',
+              value: formatPrice(item.buyclass_amount / 10000) + '万元',
               percent: item.buyclass_scale
                 ? `${formatPrice(item.buyclass_scale * 100)}%`
                 : '',
@@ -2446,17 +2462,16 @@ export default {
       this.$refs.collectRef.noCallApiFn(source)
     },
     // 下载报告
-    downloadReport () {
+    downloadReport() {
       this.downloadReportFun(this.reportDownloadDialog)
     },
     // 申请免费体验
-    goFreeExperience () {
+    goFreeExperience() {
       const _this = this
-      if(this.entniche || this.bigmember) {
+      if (this.entniche || this.bigmember) {
         const config = {
           title: '申请免费体验',
-          messageInfo:
-            '<p>您可联系客服,申请体验查看完整报告内容</p>',
+          messageInfo: '<p>您可联系客服,申请体验查看完整报告内容</p>',
           confirmButtonText: '我再想想',
           cancelButtonText: '联系客服',
           showCancelButton: true,
@@ -2734,7 +2749,7 @@ i.el-icon-caret-bottom {
 
 .analysis-dimensions {
   justify-content: space-between;
-  .left-con{
+  .left-con {
     display: flex;
     align-items: center;
   }
@@ -2765,10 +2780,10 @@ i.el-icon-caret-bottom {
       margin-left: -1px;
     }
   }
-  .download-report-btn{
-    height:36px;
+  .download-report-btn {
+    height: 36px;
     border-radius: 6px;
-    font-size:16px;
+    font-size: 16px;
     padding: 6px 34px;
   }
 }
@@ -2817,5 +2832,4 @@ i.el-icon-caret-bottom {
     }
   }
 }
-
 </style>

+ 10 - 3
apps/bigmember_pc/src/views/analysisReport/components/ProjectScatter.vue

@@ -38,9 +38,13 @@
           label="项目名称"
         >
           <template slot-scope="scope">
-            <div @click="toContentPage(scope.row)">
+            <el-link
+              @click="toContentPage(scope.row)"
+              :underline="false"
+              :disabled="!scope.row._id"
+            >
               {{ scope.row.projectname }}
-            </div>
+            </el-link>
           </template>
         </el-table-column>
         <el-table-column
@@ -157,7 +161,10 @@ export default {
   methods: {
     // 去三级页
     toContentPage(row) {
-      window.open(`/nologin/content/${row._id}.html`)
+      // window.open(`/nologin/content/${row._id}.html`)
+      window.open(
+        `/swordfish/page_big_pc/pro_follow_detail?sid=${row._id}&fid=`
+      )
     },
     // 去企业画像
     toEntProPage(id) {

+ 19 - 16
apps/bigmember_pc/src/views/search/layout/search-list.vue

@@ -74,14 +74,13 @@ function onCurrentChange($event) {
   // 点分页定位到第一条
   emit('current-change', $event)
 }
-
 </script>
 
 <template>
   <div class="search-list-container">
     <div
       class="search-header-container flex flex-(row items-center justify-between)"
-      :class="{'fixed': tableFixedTop}"
+      :class="{ fixed: tableFixedTop }"
     >
       <div class="flex flex-(row items-center)">
         <!--  全选按钮  -->
@@ -93,6 +92,7 @@ function onCurrentChange($event) {
         >
           全选
         </el-checkbox>
+        <slot name="header-after-prefix"></slot>
         <!--  额外信息  -->
         <div class="header-text--tip">
           <slot name="header-after" v-if="listState.finished">
@@ -108,10 +108,11 @@ function onCurrentChange($event) {
           </slot>
         </div>
       </div>
+      <slot name="header-after-suffix"></slot>
       <slot name="actions">
         <div
           class="search-header-actions-container flex flex-(row items-center justify-between)"
-          :class="{'table-fixed-top': tableFixedTop}"
+          :class="{ 'table-fixed-top': tableFixedTop }"
         >
           <div
             class="search-header-actions flex flex-(row items-center)"
@@ -134,7 +135,7 @@ function onCurrentChange($event) {
               <span v-if="action.label">{{ action.label }}</span>
             </div>
           </div>
-          <slot name='other-action-item'></slot>
+          <slot name="other-action-item"></slot>
         </div>
       </slot>
     </div>
@@ -173,7 +174,11 @@ function onCurrentChange($event) {
           </div>
         </div>
       </slot>
-      <slot name='table' :list='list' v-if="!listState.loading && isTable"></slot>
+      <slot
+        name="table"
+        :list="list"
+        v-if="!listState.loading && isTable"
+      ></slot>
       <slot name="empty" v-if="listState.finished && list.length === 0">
         <empty :mtb60="mtb60" tip="这里什么也没有" images="jy-back.png"></empty>
       </slot>
@@ -203,19 +208,17 @@ function onCurrentChange($event) {
 </template>
 
 <style lang="scss">
-
 .in-app {
-
-  .search-list-container{
+  .search-list-container {
     .search-header-container.fixed {
       position: fixed;
       top: 0;
       left: 0;
-      right:0;
+      right: 0;
       width: 100%;
       padding: 0 24px;
       z-index: 100;
-      background: #FFF;
+      background: #fff;
       .table-fixed-top {
         position: relative;
         width: auto;
@@ -234,7 +237,7 @@ function onCurrentChange($event) {
     padding: 0 24px;
     z-index: 100;
     width: 1200px;
-    background: #FFF;
+    background: #fff;
     .table-fixed-top {
       position: relative;
       width: auto;
@@ -243,7 +246,6 @@ function onCurrentChange($event) {
     }
   }
 
-
   .search-header-container {
     height: 48px;
   }
@@ -257,9 +259,9 @@ function onCurrentChange($event) {
     .article-item {
       border-bottom: none;
     }
-    &:hover{
-      background: #F6F6F6;
-      .a-i-left{
+    &:hover {
+      background: #f6f6f6;
+      .a-i-left {
         color: #2abed1;
       }
     }
@@ -300,7 +302,8 @@ function onCurrentChange($event) {
         height: 18px;
         top: 1px;
         right: -22px;
-        background: url('~@/assets/images/icon/v-vip-icon.png') no-repeat right center;
+        background: url('~@/assets/images/icon/v-vip-icon.png') no-repeat right
+          center;
         background-size: contain;
       }
     }

+ 34 - 14
apps/bigmember_pc/src/views/search/supply/index.vue

@@ -53,9 +53,14 @@ function goWorkSpaceCustom() {
     ...getFormatAPIParams()
   }
   // 保存数据,进入工作台
-  sessionStorage.setItem('supply-search-filter-storage', JSON.stringify(supplyData))
+  sessionStorage.setItem(
+    'supply-search-filter-storage',
+    JSON.stringify(supplyData)
+  )
   const goHref_ = location.origin + '/swordfish/page_big_pc/search/supply'
-  window.location.replace(`/page_workDesktop/work-bench/page?link=${encodeURIComponent(goHref_)}`)
+  window.location.replace(
+    `/page_workDesktop/work-bench/page?link=${encodeURIComponent(goHref_)}`
+  )
 }
 </script>
 
@@ -111,7 +116,7 @@ function goWorkSpaceCustom() {
       @size-change="doChangePageSize"
       class="search-supply-list-container b-rd-8px m-t-16px"
     >
-      <template slot="actions">
+      <template slot="header-after-prefix">
         <div class="mx-16px list-header-title is-active">最新供应信息</div>
       </template>
       <template v-slot:item="{ item, index }">
@@ -140,7 +145,7 @@ function goWorkSpaceCustom() {
 
 <style lang="scss" scoped>
 .in-app {
-  .search-supply-page{
+  .search-supply-page {
     width: 100%;
     padding: 24px;
   }
@@ -166,9 +171,9 @@ function goWorkSpaceCustom() {
     }
 
     ::v-deep {
-      .search-header{
+      .search-header {
         position: relative;
-        &::after{
+        &::after {
           position: absolute;
           content: '';
           left: 32px;
@@ -196,34 +201,49 @@ function goWorkSpaceCustom() {
       }
     }
   }
-  ::v-deep{
-    .search-header-container{
+  ::v-deep {
+    .search-header-container {
       border-bottom: 1px solid #ececec;
-      .list-header-title{
+      .list-header-title {
         display: inline-block;
         height: 100%;
         line-height: 48px;
         font-size: 16px;
-        &.is-active{
+        &.is-active {
           color: $color_main;
           border-bottom: 2px solid $color_main;
         }
       }
     }
-    .selector-card.s-line .j-button-item{
+    .selector-card.s-line .j-button-item {
       margin-top: 0;
     }
-    .empty-container{
+    .empty-container {
       padding: 100px 0;
-      .tip-text{
+      .tip-text {
         color: #686868;
         font-size: 16px;
         line-height: 24px;
       }
     }
-    .search-schema-filter-container.use-style-col .search-schema-filter-item + .search-schema-filter-item{
+    .search-schema-filter-container.use-style-col
+      .search-schema-filter-item
+      + .search-schema-filter-item {
       margin-top: 12px;
     }
   }
+
+  .search-supply-list-container {
+    ::v-deep {
+      .list-header-title {
+        margin-left: 32px;
+      }
+      .header-text--tip {
+        .m-l-16px {
+          margin-left: 0;
+        }
+      }
+    }
+  }
 }
 </style>

+ 40 - 28
apps/bigmember_pc/src/views/search/supply/model/base.js

@@ -1,21 +1,21 @@
 import { computed, reactive, ref } from 'vue'
 import useQuickSearchModel from '@jy/data-models/modules/quick-search/model'
+import { useRoute } from 'vue-router/composables'
 import { useSearchFilterModel } from './modules/filter'
-import { showFilter, loginFlag, goToPublish } from './modules/search-header'
+import { goToPublish, loginFlag, showFilter } from './modules/search-header'
 import {
-  replaceKeyword,
-  dateFromNow,
   InContainer,
+  dateFromNow,
+  replaceKeyword,
   scrollTargetView
 } from '@/utils'
 import { useSearchTabsModel } from '@/views/search/ent/model/modules/tabs'
 import { useStore } from '@/store'
-import { useRoute } from 'vue-router/composables'
 
 export default function () {
   // 本地调试,可改为工作台内isInApp = ref(true),  isInWeb = ref(false)
   const isInApp = ref(InContainer.inApp)
-  const isInWeb = ref(InContainer.inWeb)
+  // const isInWeb = ref(InContainer.inWeb)
   // 是否登录
   const isLogin = computed(() => {
     return useStore().getters['user/loginFlag']
@@ -26,8 +26,11 @@ export default function () {
   })
 
   // 页面tab切换Model
-  const { searchTabs, doChangeTab } = useSearchTabsModel({ defaultTab: 5, isInApp: isInApp.value })
-  const  { keywords } = useRoute().query
+  const { searchTabs, doChangeTab } = useSearchTabsModel({
+    defaultTab: 5,
+    isInApp: isInApp.value
+  })
+  const { keywords } = useRoute().query
 
   const inputKeywordsState = ref({
     input: keywords || ''
@@ -42,6 +45,18 @@ export default function () {
     searchResultCount
   } = APIModel
 
+  // 列表状态
+  const listState = reactive({
+    finished,
+    loading,
+    pageNum: 1,
+    pageSize: 50,
+    total
+  })
+
+  // 筛选项
+  const { filterState, getFormatAPIParams } = useSearchFilterModel()
+
   /**
    * 统一查询入口
    * - 拦截 doQuery 进行一些返回值处理
@@ -55,7 +70,14 @@ export default function () {
     const supplyData = sessionStorage.getItem('supply-search-filter-storage')
     if (supplyData) {
       const data = JSON.parse(supplyData)
-      const { searchType, status, province, city, time, filterState: filterMap } = data
+      const {
+        searchType,
+        status,
+        province,
+        city,
+        time,
+        filterState: filterMap
+      } = data
       const params = {
         searchType,
         status,
@@ -68,23 +90,15 @@ export default function () {
       filterState.value = filterMap
       sessionStorage.removeItem('supply-search-filter-storage')
       return doQuery(params)
-    } else {
+    }
+    else {
       return doQuery()
     }
   }
 
-  // 列表状态
-  const listState = reactive({
-    finished,
-    loading,
-    pageNum: 1,
-    pageSize: 50,
-    total
-  })
-
   const formatList = computed(() => {
     const { searchType } = filterState.value
-    const showDetail = searchType.indexOf('detail') !== -1
+    const showDetail = searchType.includes('detail')
 
     return list.value.map((item) => {
       const tags = []
@@ -106,13 +120,13 @@ export default function () {
         ]),
         detail: showDetail
           ? replaceKeyword(
-              item.detail.replace(/<[^>]*>/g, ''),
-              inputKeywordsState.value.input,
-              ['<span class="highlight-text-orange-bd">', '</span>']
-            )
+            item.detail.replace(/<[^>]*>/g, ''),
+            inputKeywordsState.value.input,
+            ['<span class="highlight-text-orange-bd">', '</span>']
+          )
           : '',
         time: dateFromNow(item.publish_time * 1000),
-        tags: tags
+        tags
       }
     })
   })
@@ -131,13 +145,11 @@ export default function () {
       showSelect: false,
       headerActions: [],
       list: formatList.value,
-      listState: listState
+      searchResultCount: searchResultCount.value,
+      listState
     }
   })
 
-  // 筛选项
-  const { filterState, getFormatAPIParams } = useSearchFilterModel()
-
   // 分页事件
   function doChangePageNum(page) {
     listState.pageNum = page