浏览代码

增加资源库筛选

chenlei 1 月之前
父节点
当前提交
483f0bd898

+ 7 - 0
src/api/modules/businessCustom.js

@@ -178,4 +178,11 @@ export const businessCustomInterence = {
      addChartPermission:(params)=>{
         return post('/eta_business/add_chart_permission',params)
     },
+    /**
+     * 获取社区资源库分类权限
+     * @returns 
+     */
+    chartClassifyRealTree:(params)=>{
+        return get('/chart/classify/real_tree',params)
+    },
 }

+ 34 - 3
src/views/business_manage/businessList.vue

@@ -80,6 +80,17 @@
               :value="item.val"
             />
           </t-select>
+          <t-cascader
+            v-model="classify"
+            :options="classifyList"
+            :keys="classifyProps"
+            multiple
+            filterable
+            clearable
+            :minCollapsedNum="1"
+            placeholder="请选择资源库权限"
+            @change="changeSelectOptions('classify')"
+          />
         </div>
         <t-table
           :columns="tableColOpts"
@@ -120,7 +131,7 @@
                   <t-dropdown-item @click="itemClickHandle('setAuth', row)">权限设置</t-dropdown-item>
                   <t-dropdown-item @click="itemClickHandle('modifySale', row)">修改销售</t-dropdown-item>
                   <t-dropdown-item @click="itemClickHandle('permission', row)">
-                    社区权限设置
+                    资源库权限设置
                   </t-dropdown-item>
                 </t-dropdown-menu>
               </t-dropdown>
@@ -162,9 +173,9 @@
             @close="showModifySaller = false"
           />
       </t-dialog>
-      <!-- 社区权限设置 -->
+      <!-- 资源库权限设置 -->
       <t-dialog
-        header="社区权限设置"
+        header="资源库权限设置"
         width="772px"
         :visible.sync="showSetPermission"
         @close="showSetPermission = false"
@@ -200,6 +211,8 @@
   const trade = ref('');
   const tradeArr = ref([]);
   const sales = ref([]);
+  const classify = ref([]);
+  const classifyList = ref([]);
   const salesArr = ref([]);
   const valueLocation = ref([]);
   const nation = ref('');
@@ -217,6 +230,13 @@
     label: 'AdminName',
     value: 'AdminId',
   });
+  const classifyProps = reactive({
+    expandTrigger: 'hover',
+    children: 'Children',
+    emitPath: false,
+    label: 'ChartClassifyName',
+    value: 'ChartClassifyId',
+  });
   const signStatus = ref('');
   const signStatusOpts = ref([
     { label: '首次签约', val: 1 },
@@ -295,6 +315,13 @@
     page.value = 1
     fetchBusinessList()
   };
+
+  // 获取精选资源库权限分类列表
+  const getChartClassifyRealTree = async () => {
+    const res = await businessCustomInterence.chartClassifyRealTree()
+    if (res.Ret !== 200) return;
+    classifyList.value = res.Data?.AllNodes
+  };
   
   const fetchBusinessList = async () => {
     isTableLoading.value = true;
@@ -306,6 +333,7 @@
         // ... 其他参数
         Province: provinceValue.value,
         City: cityValue.value,
+        ChartClassifyIds: classify.value.join(','),
         IndustryId: Number(trade.value),
         Nation: nation.value,
         PageSize: pageSize.value,
@@ -429,6 +457,8 @@
         AdminName: item.AdminName || item.GroupName,
         AdminId: item.AdminId || item.GroupId,
       }));
+      console.log('salesArr', salesArr.value);
+      
     } catch (error) {
       console.error('获取销售数据失败:', error);
     }
@@ -450,6 +480,7 @@
     await getIndustry();
     await getSale();
     fetchBusinessList();
+    getChartClassifyRealTree()
   });
   </script>
   

+ 1 - 1
src/views/business_manage/components/Steps.vue

@@ -39,7 +39,7 @@
             text: '签约信息'
           },
           {
-            text: '社区权限'
+            text: '资源库权限'
           }
         ];
       }