From 5b1500969cdf102a6db9e3f56faec5aa67f68496 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 12 五月 2026 04:32:03 +0800
Subject: [PATCH] fix: 设备移除工序必选
---
src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue | 36 ++++++++++++++++++++++++++++++------
1 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue b/src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue
index 520ffdf..c735cf6 100644
--- a/src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue
+++ b/src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue
@@ -9,6 +9,8 @@
placeholder="璇烽�夋嫨瀹㈡埛"
clearable
filterable
+ popper-class="customer-select-dropdown"
+ :teleported="false"
@change="handleFilterChange"
>
<el-option
@@ -44,6 +46,15 @@
import DateTypeSwitch from '../DateTypeSwitch.vue'
import { customerRevenueAnalysis } from '@/api/viewIndex.js'
import { listCustomer } from '@/api/basicData/customerFile.js'
+
+/** 瀹㈡埛钀ユ敹鍒嗘瀽涓嬫媺榛樿閫変腑璇ュ鎴凤紙涓嶅瓨鍦ㄥ垯閫�鍥炲垪琛ㄧ涓�椤癸級 */
+const DEFAULT_REVENUE_CUSTOMER_NAME = '閼工闂ㄧ獥'
+
+const pickDefaultCustomerValue = (options) => {
+ if (!options?.length) return null
+ const matched = options.find((o) => o.label === DEFAULT_REVENUE_CUSTOMER_NAME)
+ return matched ? matched.value : options[0].value
+}
const dateType = ref(1) // 1=鍛� 2=鏈� 3=瀛e害
const customerValue = ref(null)
@@ -106,7 +117,7 @@
formatter: function (params) {
let result = params[0].axisValueLabel + '<br/>'
params.forEach((item) => {
- result += `<div style="color: #B8C8E0">${item.marker} ${item.seriesName}: ${item.value}</div>`
+ result += `<div>${item.marker} ${item.seriesName}: ${item.value}</div>`
})
return result
},
@@ -131,8 +142,7 @@
// 鑾峰彇瀹㈡埛钀ユ敹鍒嗘瀽鏁版嵁
const getCustomerRevenueAnalysis = () => {
if (customerOptions.value.length > 0 && !customerValue.value) {
- // 榛樿閫変腑绗竴涓鎴�
- customerValue.value = customerOptions.value[0].value
+ customerValue.value = pickDefaultCustomerValue(customerOptions.value)
}
if (!customerValue.value) return
@@ -161,7 +171,7 @@
const fetchCustomerOptions = async () => {
try {
- const params = { pageNum: 1, pageSize: 200 }
+ const params = { current: -1, size: -1 }
const res = await listCustomer(params)
const records = res?.records || res?.data?.records || res?.rows || []
customerOptions.value = records.map((r) => ({
@@ -169,9 +179,9 @@
value: r.id ?? r.customerId ?? r.customerCode ?? r.customerName,
}))
- // 鑾峰彇鍒伴�夐」鍚庯紝濡傛灉杩樻病閫変腑锛岄粯璁ら�変腑绗竴涓�
+ // 鑾峰彇鍒伴�夐」鍚庯紝濡傛灉杩樻病閫変腑锛岄粯璁ゃ�岄懌楣ら棬绐椼�嶏紙鏃犲垯绗竴椤癸級
if (customerOptions.value.length > 0 && !customerValue.value) {
- customerValue.value = customerOptions.value[0].value
+ customerValue.value = pickDefaultCustomerValue(customerOptions.value)
getCustomerRevenueAnalysis()
}
} catch (e) {
@@ -242,3 +252,17 @@
height: 478px;
}
</style>
+
+<style>
+/* 鍏ㄥ睆妯″紡涓嬩笅鎷夋灞傜骇淇 */
+.customer-select-dropdown {
+ z-index: 10001 !important;
+}
+
+/* 纭繚鍦ㄥ叏灞忓鍣ㄥ唴鐨勪笅鎷夋涔熻兘姝e父鏄剧ず */
+.scale-container:fullscreen .customer-select-dropdown,
+.scale-container:-webkit-full-screen .customer-select-dropdown,
+.scale-container:-ms-fullscreen .customer-select-dropdown {
+ z-index: 10001 !important;
+}
+</style>
--
Gitblit v1.9.3