Przeglądaj źródła

feat: 个人分析报告,信息类型筛选数据处理、tab隐藏超前项目处理

zhangsiya 1 rok temu
rodzic
commit
e58acf319f

+ 3 - 4
apps/bigmember_pc/src/components/filter-items/CommonCheckboxSelector.vue

@@ -1,4 +1,3 @@
-import { onMounted, reactive } from 'vue';
 <template>
   <div class="common-checkbox-selector">
     <el-checkbox-group
@@ -73,7 +72,7 @@ function onIssueStateChange(value) {
         value = ['全部']
       }
     }
-  } 
+  }
   list.value = value
   if (value.length === 1 && value[0] === '全部') {
     emit('input', [])
@@ -101,13 +100,13 @@ function onIssueStateChange(value) {
         }
       }
     }
-    
+
     &.is-active {
       .el-checkbox-button__inner {
         border-color: #2abed1;
       }
     }
-    
+
   }
   .j-checkbox-button:first-child,
   .j-checkbox-button:last-child {

+ 7 - 0
apps/bigmember_pc/src/components/selector/InfoTypeSelector.vue

@@ -19,6 +19,7 @@
       :beforeChange="beforeChange"
       :oneLevelSelected="oneLevelSelected"
       :showDataType="showDataType"
+      :options="options"
       @onChange="onChange"
     />
   </selector-card>
@@ -62,6 +63,12 @@ export default {
     showDataType: {
       type: String,
       default: 'all'
+    },
+    options: {
+      type: Array,
+      default() {
+        return []
+      }
     }
   },
   model: {

+ 15 - 3
apps/bigmember_pc/src/components/selector/InfoTypeSelectorContent.vue

@@ -161,6 +161,12 @@ export default {
       type: String,
       default: 'all'
     },
+    options: {
+      type: Array,
+      default() {
+        return []
+      }
+    }
   },
   data() {
     return {
@@ -208,7 +214,12 @@ export default {
   methods: {
     // 整理数据列表
     initInfoTypeFn(filter = []) {
-      const dataList = this.dataMap[this.showDataType]
+      let dataList = []
+      if(this.options && this.options.length > 0) {
+        dataList = this.options
+      } else {
+        dataList = this.dataMap[this.showDataType]
+      }
       let listBackUp = JSON.parse(JSON.stringify(dataList))
       if (Array.isArray(filter) && filter.length !== 0) {
         listBackUp = JSON.parse(JSON.stringify(filter))
@@ -340,8 +351,9 @@ export default {
             iitem.selected = false
           })
         })
-
-        this.infoTypeList[0].selected = true
+        if( this.infoTypeList[0].name === '全部') {
+          this.infoTypeList[0].selected = true
+        }
       } else {
         this.setInfoTypeState()
 

+ 55 - 0
apps/bigmember_pc/src/views/search/bidding/constant/search-filters.js

@@ -58,6 +58,57 @@ const moreFiltersNeedVipKeyList = [
   'agency',
 ]
 
+const BIInfoTypeOptions = [
+  {
+    name: '招标结果',
+    value: '招标结果',
+    level: 1,
+    children: [
+      {
+        name: '中标',
+        value: '中标',
+        level: 2
+      },
+      {
+        name: '成交',
+        value: '成交',
+        level: 2
+      },
+      {
+        name: '废标',
+        value: '废标',
+        level: 2
+      },
+      {
+        name: '流标',
+        value: '流标',
+        level: 2
+      }
+    ]
+  },
+  {
+    name: '招标信用信息',
+    value: '招标信用信息',
+    level: 1,
+    children: [
+      {
+        name: '合同',
+        value: '合同',
+        level: 2
+      },
+      {
+        name: '验收',
+        value: '验收',
+        level: 2
+      },
+      {
+        name: '违规',
+        value: '违规',
+        level: 2
+      }
+    ]
+  }
+]
 
 function createSearchBidBaseSchema(conf = {}) {
   const isLogin = conf.isLogin || false
@@ -65,6 +116,9 @@ function createSearchBidBaseSchema(conf = {}) {
   const oldUser = conf.oldUser || false
   const showVip = conf.showVip || false
   const infoType = conf.infoType
+  const inInjectBI = conf.inInjectBI || false
+  console.log(888888)
+  console.log(inInjectBI)
 
   // 发布时间
   const publishTimeExpandFree = {
@@ -165,6 +219,7 @@ function createSearchBidBaseSchema(conf = {}) {
       expand: {
         component: InfoTypeSelector,
         props: {
+          options: inInjectBI ? BIInfoTypeOptions : [],
           showLabel: false,
           selectorType: 'line',
           showDataType: infoType,

+ 6 - 5
apps/bigmember_pc/src/views/search/bidding/model/base.js

@@ -71,8 +71,8 @@ export default function () {
 
   // 是否在工作台内
   // 本地调试,可改为工作台内isInApp = ref(true),  isInWeb = ref(false) 提交记得改回!
-  const isInApp = ref(true) ||  ref(InContainer.inApp)
-  const isInWeb = ref(false) || ref(InContainer.inWeb)
+  const isInApp = ref(InContainer.inApp)
+  const isInWeb = ref(InContainer.inWeb)
 
   // 是否是渠道商
   const cooperateCode = ref(false)
@@ -183,7 +183,7 @@ export default function () {
   /**
    * 页面tab切换Model
    */
-  const SearchTabsModel = useSearchTabsModel({ showTabs2: !isInApp.value })
+  const SearchTabsModel = useSearchTabsModel({ showTabs2: !isInApp.value, inInjectBI })
   const { activeTab, doChangeTab } = SearchTabsModel
   // tab切换处理
   function onChangeTab (item) {
@@ -234,7 +234,8 @@ export default function () {
         oldUser: isOld.value && isInApp.value,
         showVip: isLogin.value && isInApp.value,
         infoType: infoTypeDataType.value,
-        isBidField: isBidField
+        isBidField: isBidField,
+        inInjectBI: inInjectBI
       }
     })
 
@@ -323,7 +324,7 @@ export default function () {
       limitActions.value['employ-bid'] = true
     }
     // 展示分发
-    if((isEntAdmin.value || isDepartmentAdmin.value) && !isInBI.value) {
+    if((isEntAdmin.value || isDepartmentAdmin.value) && !inBIPropertyIframe && !inResourceBIIframe) {
       limitActions.value['distribute-bid'] = true
     }
     return headerActions.value

+ 6 - 1
apps/bigmember_pc/src/views/search/bidding/model/modules/data-add-actions.js

@@ -27,7 +27,12 @@ export function dataAddActionsModel () {
       infoIds = [item.id]
     }
     if(ids) {
-      infoIds = difference(ids, hadAddList )
+      if (ids.length > 0) {
+        infoIds = difference(ids, hadAddList )
+      } else {
+        return showToast('尚未选择数据,请选择')
+      }
+
     }
     if(!infoIds.length) {
       return showToast('所选数据均已添加过,请重新选择')

+ 14 - 2
apps/bigmember_pc/src/views/search/bidding/model/modules/tabs.js

@@ -1,7 +1,7 @@
 import { computed, ref } from 'vue'
 
 export function useSearchTabsModel(conf) {
-  const { showTabs2 } = conf
+  const { showTabs2, inInjectBI } = conf
   const defaultTab = showTabs2 ? 1 : 0
   const activeTab = ref(defaultTab)
   const Tabs = [
@@ -51,7 +51,19 @@ export function useSearchTabsModel(conf) {
       link: '/swordfish/page_web_pc/search/construction'
     },
   ]
-  const resTab = showTabs2 ? Tabs2 : Tabs
+  let resTab = []
+  if(showTabs2){
+    resTab = Tabs2
+  } else {
+    // 个人分析报告不展示超前项目
+    if(inInjectBI){
+      resTab = Tabs.filter(item => {
+        return item.label !== '超前项目'
+      })
+    } else {
+      resTab = Tabs
+    }
+  }
   const searchTabs = computed(() => {
     return resTab.map((v) => {
       v.active = activeTab.value === v.key