Browse Source

增加店铺注册筛选

liujintao 1 month ago
parent
commit
b1f660b52d

+ 1 - 1
src/views/reportManage/TaskManage/index.vue

@@ -830,7 +830,7 @@ onMounted(() => {
 <template>
   <div class="p-2.5">
     <el-card class="custom-card-style flex gap-1.5 justify-between" shadow="hover">
-      <Selector ref="selectorRef" @update:filteredData="filteredDataChange" />
+      <Selector ref="selectorRef" @update:filteredData="filteredDataChange" :show-company="true" />
     </el-card>
     <el-card class="my-3" shadow="hover">
       <vxe-grid ref="xGrid" :cell-style="cellStyle" :header-cell-style="headerCellStyle" stripe v-bind="gridOptions"

+ 9 - 8
src/views/reportManage/TaskManage/utils/columns.ts

@@ -3,6 +3,15 @@ import { ref } from 'vue';
 // 任务管理表格列
 export const taskColumns = ref([
   { type: 'checkbox', width: 50 ,fixed: 'left',align: 'center' },
+  {
+    field: 'company',
+    title: '注册公司',
+    fixed: 'left',
+    editRender: {},
+    slots: { edit: 'company_edit' },
+    align: 'center',
+    minWidth: 184
+  },
   {
     field: 'platformNumber',
     title: '平台编号',
@@ -96,14 +105,6 @@ export const taskColumns = ref([
   },
   { field: 'line', title: '线路', editRender: {}, slots: { edit: 'line_edit' }, align: 'center', minWidth: 72 },
   { field: 'ipaddress', title: 'IP地址', editRender: {}, slots: { edit: 'ipaddress_edit' }, minWidth: 135 },
-  {
-    field: 'company',
-    title: '注册公司',
-    editRender: {},
-    slots: { edit: 'company_edit' },
-    align: 'center',
-    minWidth: 184
-  },
   {
     field: 'companyEnglishName',
     title: '公司英文名称',

+ 25 - 2
src/views/reportManage/dataCenter/normalDisplay/components/Selector/index.vue

@@ -8,7 +8,11 @@ const props = defineProps({
     type: Boolean,
     default: false
   },
-  cacheForParent1: Boolean
+  cacheForParent1: Boolean,
+  showCompany: {
+    type: Boolean,
+    default: false
+  }
 });
 
 const emit = defineEmits();
@@ -21,9 +25,13 @@ const brandNameList = ref(JSON.parse(localStorage.getItem('brandNameList') || '[
 const platformList = ref(JSON.parse(localStorage.getItem('platformList') || '[]'));
 const departmentList = ref(JSON.parse(localStorage.getItem('departmentList') || '[]'));
 
+const companyList = ref([]);
+
 // const platformNumberOptions = ref([]);
 // const platformNameOptions = ref([]);
 const usersOptions = ref([]);
+const companyOptions = ref([]);
+
 // const operationOptions = ref([]);
 const countryOptions = ref([]);
 const departmentOptions = ref([]);
@@ -82,6 +90,7 @@ async function fetchSelectData() {
     departmentOptions.value = resp.data.department
     brandNameOptions.value = resp.data.brandName;
     platformOptions.value = resp.data.platform;
+    companyOptions.value = resp.data.company;
   } catch (e) {
     console.error('Failed to fetch select data:', e);
   }
@@ -113,6 +122,7 @@ async function fetchFilteredData() {
   processFilterMultiple(platformList, 'platform', 'platforms');
   processFilterMultiple(platformList, 'platform', 'platforms');
   processFilterMultiple(departmentList, 'department', 'department');
+  processFilterMultiple(companyList, 'company', 'company');
 
   if (usersList.value.length > 0) {
     filters.users = usersList.value.join(',');
@@ -155,7 +165,7 @@ const selectCommonGroup2 = () => {
   emitChange(); // 更新选择后的数据
 };
 
-watch([countryList, brandNameList, usersList, platformList, departmentList], () => {
+watch([companyList,countryList, brandNameList, usersList, platformList, departmentList], () => {
   emitChange();
 });
 
@@ -171,6 +181,19 @@ defineExpose({ fetchFilteredData, filteredData, updateData });
 
 <template>
   <div class="flex gap-2.5 flex-wrap">
+    <el-select
+      v-if="showCompany"
+      v-model="companyList"
+      class="flex-item"
+      clearable
+      collapse-tags
+      filterable
+      multiple
+      placeholder="注册公司"
+      style="width: 275px;"
+    >
+      <el-option v-for="item in companyOptions" :key="item" :label="item" :value="item" />
+    </el-select>
     <el-input v-model="platformNumberList" class="flex-item" clearable placeholder="平台编号" style="width: 100px"
               @change="emitChange"></el-input>
     <el-input v-model="platformNameList" class="flex-item" clearable placeholder="平台名称" style="width: 130px"