浏览代码

Merge branch 'xinyan' into test

xinyan 9 月之前
父节点
当前提交
af98fa0f8a
共有 4 个文件被更改,包括 32 次插入18 次删除
  1. 2 2
      .env.development
  2. 7 7
      package-lock.json
  3. 1 1
      package.json
  4. 22 8
      src/views/reportManage/dataCenter/normalDisplay/components/Selector/index.vue

+ 2 - 2
.env.development

@@ -4,8 +4,8 @@ ENV = 'development'
 
 # 本地环境接口地址
 # VITE_API_URL = 'http://127.0.0.1:8000'
-# VITE_API_URL = 'http://192.168.1.225/'
- VITE_API_URL = 'http://192.168.1.23:8080/'
+ VITE_API_URL = 'http://192.168.1.225/'
+# VITE_API_URL = 'http://192.168.1.23:8080/'
 # VITE_API_URL = 'http://amzads.zositechc.cn'
 
 # 是否启用按钮权限

+ 7 - 7
package-lock.json

@@ -27,7 +27,7 @@
 				"echarts": "^5.5.1",
 				"echarts-gl": "^2.0.9",
 				"echarts-wordcloud": "^2.1.0",
-				"element-plus": "^2.7.6",
+				"element-plus": "^2.8.0",
 				"element-tree-line": "^0.2.1",
 				"font-awesome": "^4.7.0",
 				"js-cookie": "^3.0.1",
@@ -5940,9 +5940,9 @@
 			"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
 		},
 		"node_modules/element-plus": {
-			"version": "2.7.6",
-			"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.7.6.tgz",
-			"integrity": "sha512-36sw1K23hYjgeooR10U6CiCaCp2wvOqwoFurADZVlekeQ9v5U1FhJCFGEXO6i/kZBBMwsE1c9fxjLs9LENw2Rg==",
+			"version": "2.8.0",
+			"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.8.0.tgz",
+			"integrity": "sha512-7ngapVlVlQAjocVqD4MUKvKXlBneT9DSDk2mmBOSLRFWNm/HLDT15ozmsvUBfy18sajnyUeSIHTtINE8gfrGMg==",
 			"dependencies": {
 				"@ctrl/tinycolor": "^3.4.1",
 				"@element-plus/icons-vue": "^2.3.1",
@@ -15080,9 +15080,9 @@
 			"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
 		},
 		"element-plus": {
-			"version": "2.7.6",
-			"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.7.6.tgz",
-			"integrity": "sha512-36sw1K23hYjgeooR10U6CiCaCp2wvOqwoFurADZVlekeQ9v5U1FhJCFGEXO6i/kZBBMwsE1c9fxjLs9LENw2Rg==",
+			"version": "2.8.0",
+			"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.8.0.tgz",
+			"integrity": "sha512-7ngapVlVlQAjocVqD4MUKvKXlBneT9DSDk2mmBOSLRFWNm/HLDT15ozmsvUBfy18sajnyUeSIHTtINE8gfrGMg==",
 			"requires": {
 				"@ctrl/tinycolor": "^3.4.1",
 				"@element-plus/icons-vue": "^2.3.1",

+ 1 - 1
package.json

@@ -27,7 +27,7 @@
 		"echarts": "^5.5.1",
 		"echarts-gl": "^2.0.9",
 		"echarts-wordcloud": "^2.1.0",
-		"element-plus": "^2.7.6",
+		"element-plus": "^2.8.0",
 		"element-tree-line": "^0.2.1",
 		"font-awesome": "^4.7.0",
 		"js-cookie": "^3.0.1",

+ 22 - 8
src/views/reportManage/dataCenter/normalDisplay/components/Selector/index.vue

@@ -1,4 +1,4 @@
-<script setup lang="ts">
+<script lang="ts" setup>
 import { onMounted, ref, watch } from 'vue';
 import { getOperationSelect, getTasks, getTasksId } from '/@/views/reportManage/TaskManage/api';
 
@@ -17,6 +17,7 @@ const operationList = ref(localStorage.getItem('operationList') || '');
 const usersList = ref(JSON.parse(localStorage.getItem('usersList') || '[]'));
 const countryList = ref(JSON.parse(localStorage.getItem('countryList') || '[]'));
 const brandNameList = ref(JSON.parse(localStorage.getItem('brandNameList') || '[]'));
+const platformList = ref(JSON.parse(localStorage.getItem('platformList') || '[]'));
 
 const platformNumberOptions = ref([]);
 const platformNameOptions = ref([]);
@@ -24,6 +25,7 @@ const usersOptions = ref([]);
 const operationOptions = ref([]);
 const countryOptions = ref([]);
 const brandNameOptions = ref([]);
+const platformOptions = ref([]);
 
 function sortCountriesByInitial(countries) {
   return countries.sort((a, b) => a.localeCompare(b));
@@ -53,6 +55,7 @@ async function fetchAllTasks() {
   operationOptions.value = [...new Set(allData.map(item => item.operater))];
   countryOptions.value = sortCountriesByInitial([...new Set(allData.map(item => item.country))]);
   brandNameOptions.value = [...new Set(allData.map(item => item.brandName))];
+  platformOptions.value = [...new Set(allData.map(item => item.platform).filter(platform => platform !== null && platform !== undefined && platform !== ''))];
 }
 
 async function fetchUsersSelect() {
@@ -90,6 +93,7 @@ async function fetchFilteredData() {
   processFilterSingle(operationList.value, 'operater');
   processFilterMultiple(countryList, 'country', 'countrys');
   processFilterMultiple(brandNameList, 'brandName', 'brandNames');
+  processFilterMultiple(platformList, 'platform', 'platforms');
   if (usersList.value.length > 0) {
     filters.users = usersList.value.join(',');
   }
@@ -115,9 +119,10 @@ async function emitChange() {
   //localStorage.setItem('usersList', JSON.stringify(usersList.value));
   localStorage.setItem('countryList', JSON.stringify(countryList.value));
   localStorage.setItem('brandNameList', JSON.stringify(brandNameList.value));
+  localStorage.setItem('platformList', JSON.stringify(platformList.value));
 }
 
-watch([countryList, brandNameList, usersList], () => {
+watch([countryList, brandNameList, usersList, platformList], () => {
   emitChange();
 });
 
@@ -132,18 +137,27 @@ defineExpose({ fetchFilteredData, filteredData, updateData });
 
 <template>
   <div class="flex-container">
-    <el-input v-model="platformNumberList" @change="emitChange" placeholder="平台编号" class="flex-item" clearable></el-input>
-    <el-input v-model="platformNameList" @change="emitChange" placeholder="平台名称" class="flex-item" clearable></el-input>
-    <el-input v-model="operationList" @change="emitChange" placeholder="运营" class="flex-item" clearable></el-input>
-    <el-select v-if="props.showOperationSearch" v-model="usersList" multiple collapse-tags collapse-tags-tooltip placeholder="填写人" class="flex-item">
+    <el-input v-model="platformNumberList" class="flex-item" clearable placeholder="平台编号"
+              @change="emitChange"></el-input>
+    <el-input v-model="platformNameList" class="flex-item" clearable placeholder="平台名称"
+              @change="emitChange"></el-input>
+    <el-input v-model="operationList" class="flex-item" clearable placeholder="运营" @change="emitChange"></el-input>
+    <el-select v-if="props.showOperationSearch" v-model="usersList" class="flex-item" collapse-tags
+               collapse-tags-tooltip
+               multiple placeholder="填写人">
       <el-option v-for="item in usersOptions" :key="item.value" :label="item.label" :value="item.value" />
     </el-select>
-    <el-select v-model="countryList" multiple collapse-tags collapse-tags-tooltip placeholder="国家" class="flex-item">
+    <el-select v-model="countryList" class="flex-item" collapse-tags collapse-tags-tooltip multiple placeholder="国家">
       <el-option v-for="item in countryOptions" :key="item" :label="item" :value="item" />
     </el-select>
-    <el-select v-model="brandNameList" multiple collapse-tags collapse-tags-tooltip placeholder="品牌" class="flex-item">
+    <el-select v-model="brandNameList" class="flex-item" collapse-tags collapse-tags-tooltip multiple
+               placeholder="品牌">
       <el-option v-for="item in brandNameOptions" :key="item" :label="item" :value="item" />
     </el-select>
+    <el-select v-model="platformList" class="flex-item" collapse-tags collapse-tags-tooltip multiple
+               placeholder="平台">
+      <el-option v-for="item in platformOptions" :key="item" :label="item" :value="item" />
+    </el-select>
   </div>
 </template>