diff --git a/dist.zip b/dist.zip index 03f8c2f..2bee71a 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/src/page/index/components/BusinessCase/BusinessCase.vue b/src/page/index/components/BusinessCase/BusinessCase.vue index d39e297..c0695dd 100644 --- a/src/page/index/components/BusinessCase/BusinessCase.vue +++ b/src/page/index/components/BusinessCase/BusinessCase.vue @@ -43,7 +43,7 @@ const tabList: any = [ { label: "客单量", value: 2 }, { label: "客单均价", value: 3 }, ] -let selectTab = ref(1) +let selectTab = ref(3) @@ -236,10 +236,10 @@ const handleGetBottomData = async () => { // 切换显示的数据源 营收特征分析的 const handleShowData = async (value: number) => { + console.log('valuevaluevaluevaluevaluevalue', value); + let data = realData.value[value] - - const chartDom = document.getElementById('featureAnalysis'); if (!chartDom) return; @@ -273,7 +273,7 @@ const handleShowData = async (value: number) => { } }, yAxis: { - name: `${selectTab.value === 1 ? '营收金额(万元)' : selectTab.value === 2 ? '客单量(万笔)' : selectTab.value === 3 ? '客单均价(元)' : ''}`, + name: `${value === 1 ? '营收金额(万元)' : value === 2 ? '客单量(万笔)' : value === 3 ? '客单均价(元)' : ''}`, splitLine: { show: false }, // 隐藏网格线 axisLine: { show: true, // 显示Y轴线 diff --git a/src/page/index/components/BusinessStructure/BusinessStructure.vue b/src/page/index/components/BusinessStructure/BusinessStructure.vue index 2418786..e7b1910 100644 --- a/src/page/index/components/BusinessStructure/BusinessStructure.vue +++ b/src/page/index/components/BusinessStructure/BusinessStructure.vue @@ -228,12 +228,12 @@ const handleSetConfig = (res: any) => { color: '#fff', rich: { name: { - width: 90, // 固定名称宽度 + width: 50, // 固定名称宽度 align: 'left', padding: [0, 10, 0, 0] }, percent: { - width: 50, // 固定百分比宽度 + width: 30, // 固定百分比宽度 align: 'right', padding: [0, 10, 0, 0] } diff --git a/src/page/index/components/ConsumptionConversion/ConsumptionConversion.vue b/src/page/index/components/ConsumptionConversion/ConsumptionConversion.vue index 6132d50..0a0c0eb 100644 --- a/src/page/index/components/ConsumptionConversion/ConsumptionConversion.vue +++ b/src/page/index/components/ConsumptionConversion/ConsumptionConversion.vue @@ -243,7 +243,7 @@ const handleSetConfig = (res: any) => { let str: string = '' if (params && params.length > 0) { params.forEach((item: any) => { - str += item.seriesName + item.value + '%' + str += item.seriesName + item.value + '笔' }) } return ` diff --git a/src/page/index/components/CoreBusinessData/CoreBusinessData.vue b/src/page/index/components/CoreBusinessData/CoreBusinessData.vue index c72fd1c..5b209a6 100644 --- a/src/page/index/components/CoreBusinessData/CoreBusinessData.vue +++ b/src/page/index/components/CoreBusinessData/CoreBusinessData.vue @@ -117,7 +117,6 @@ const handleGetMapRealData = async () => { // value: item.totalAmount.toString().length > 8 ? Number((item.totalAmount / 10000).toFixed(2)).toLocaleString() : Number(item.totalAmount).toLocaleString(), // unit: item.totalAmount.toString().length > 8 ? '万元' : '元' // } - console.log('objobjobjobjobj', obj); aiObj["门店营收"] = `${item.totalAmount}${item.totalAmountUnit}` revenueAmonut.value = obj @@ -184,7 +183,6 @@ const handleGetMapRealData = async () => { // unit: item.totalTicket.toString().length > 8 ? '万单' : '单' // } aiObj["充电次数"] = `${item.totalTicket}${item.totalTicketUnit}` - console.log('objobjobjobj', obj); chargingCycles.value = obj // 启动滚动动画 @@ -307,7 +305,6 @@ const updateRevenue = () => { const unit = revenueAmonut.value.unit || '' const actualAmount = unit === '万元' ? randomAmount / 10000 : randomAmount revenueAmonut.value.value = (currentValue + actualAmount) - console.log('💰 门店营收金额增加:', actualAmount + unit, '当前总值:', revenueAmonut.value.value) } else { // 显示数量模式 - 更新数量字段(假设为订单数) const orders = Math.random() < 0.7 ? 1 : Math.floor(Math.random() * 4) // 主区间1笔 @@ -315,7 +312,6 @@ const updateRevenue = () => { const unit = revenueAmonut.value.totalCountUnit || '' const actualAmount = unit === '万笔' ? orders / 10000 : orders revenueAmonut.value.totalCount = (currentValue + actualAmount) - console.log('💰 门店营收数量增加:', actualAmount + unit, `(${orders}笔)`, '当前总值:', revenueAmonut.value.totalCount) } } @@ -331,14 +327,12 @@ const updateCharging = () => { const unit = chargingCycles.value.unit || '' const actualAmount = unit === '万元' ? randomAmount / 10000 : randomAmount chargingCycles.value.value = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 - console.log('⚡ 充电金额增加:', actualAmount + unit, '当前总值:', chargingCycles.value.value) } else { // 显示数量模式 - 更新数量字段 const currentValue = parseFloat(chargingCycles.value.totalCount) || 0 const unit = chargingCycles.value.totalCountUnit || '' const actualAmount = unit.includes('万笔') ? orders / 10000 : orders chargingCycles.value.totalCount = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 - console.log('⚡ 充电数量增加:', actualAmount + unit, `(${orders}笔)`, '当前总值:', chargingCycles.value.totalCount) } } @@ -354,14 +348,12 @@ const updateWater = () => { const unit = waterAddition.value.unit || '' const actualAmount = unit.includes('万元') ? revenueAmount / 10000 : revenueAmount waterAddition.value.value = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 - console.log('💧 加水金额增加:', actualAmount + unit, '当前总值:', waterAddition.value.value) } else { // 显示数量模式 - 更新数量字段 const currentValue = parseFloat(waterAddition.value.totalCount) || 0 const unit = waterAddition.value.totalCountUnit || '' const actualAmount = unit.includes('万吨') ? randomAmount / 10000 : randomAmount waterAddition.value.totalCount = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 - console.log('💧 加水数量增加:', actualAmount + unit, '(原始值:', randomAmount.toFixed(2) + '吨)', '当前总值:', waterAddition.value.totalCount) } } @@ -377,14 +369,12 @@ const updateUrea = () => { const unit = urea.value.unit || '' const actualAmount = unit.includes('万元') ? revenueAmount / 10000 : revenueAmount urea.value.value = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 - console.log('🧪 尿素金额增加:', actualAmount + unit, '当前总值:', urea.value.value) } else { // 显示数量模式 - 更新数量字段 const currentValue = parseFloat(urea.value.totalCount) || 0 const unit = urea.value.totalCountUnit || '' const actualAmount = unit.includes('万吨') ? randomAmount / 10000 : randomAmount urea.value.totalCount = Number((currentValue + actualAmount).toFixed(2)) // 留两位小数 - console.log('🧪 尿素数量增加:', actualAmount + unit, '(原始值:', randomAmount.toFixed(3) + '吨)', '当前总值:', urea.value.totalCount) } } @@ -400,20 +390,17 @@ const updateOil = () => { const unit = oilConsumption.value.unit || '' const actualAmount = unit.includes('万元') ? revenueAmount / 10000 : revenueAmount oilConsumption.value.value = (currentValue + actualAmount) // 油品金额不限制小数位数 - console.log('⛽ 油品金额增加:', actualAmount + unit, '当前总值:', oilConsumption.value.value) } else { // 显示数量模式 - 更新数量字段 const currentValue = parseFloat(oilConsumption.value.totalCount) || 0 const unit = oilConsumption.value.totalCountUnit || '' const actualAmount = unit.includes('万吨') ? randomAmount / 10000 : randomAmount oilConsumption.value.totalCount = Number((currentValue + actualAmount).toFixed(3)) // 留三位小数 - console.log('⛽ 油品数量增加:', actualAmount + unit, '(原始值:', randomAmount.toFixed(3) + '吨)', '当前总值:', oilConsumption.value.totalCount) } } // 统一更新所有业务数据的函数 const updateAllBusinessData = () => { - console.log('🔄 更新所有业务数据') // 随机决定哪些数据需要更新(模拟真实业务中不是所有数据都会同时变化) const updateProbability = 0.6 // 60%概率更新某个业务数据 @@ -440,8 +427,6 @@ const updateAllBusinessData = () => { const startDisplaySwitch = () => { displaySwitchTimer = setInterval(() => { isShowingAmount.value = !isShowingAmount.value - console.log(`🔄 切换显示模式: ${isShowingAmount.value ? '金额' : '数量'}`) - // 在切换显示模式时更新所有数据 updateAllBusinessData() }, 5000) // 每5秒切换一次 diff --git a/src/page/index/components/RegionalRevenue/RegionalRevenue.vue b/src/page/index/components/RegionalRevenue/RegionalRevenue.vue index 993f008..3bdc404 100644 --- a/src/page/index/components/RegionalRevenue/RegionalRevenue.vue +++ b/src/page/index/components/RegionalRevenue/RegionalRevenue.vue @@ -131,9 +131,9 @@ const handleGetData = async () => { }) } - category.push('美丽公路项目') - lengedData.push({ name: '美丽公路项目', value: 0 }) - pieData.push({ value: 0, name: '美丽公路项目' }) + category.push('美丽公路') + lengedData.push({ name: '美丽公路', value: 0 }) + pieData.push({ value: 0, name: '美丽公路' }) let res: any = { category: category,// x轴的内容 diff --git a/src/page/index/components/VehiclesEntering/VehiclesEntering.vue b/src/page/index/components/VehiclesEntering/VehiclesEntering.vue index a56b8aa..2523480 100644 --- a/src/page/index/components/VehiclesEntering/VehiclesEntering.vue +++ b/src/page/index/components/VehiclesEntering/VehiclesEntering.vue @@ -367,7 +367,7 @@ const handleGetSectionFlowCount = async () => { const req: any = { StartDate: moment().startOf('y').format('YYYY-MM-DD'), - EndDate: moment().subtract(1, 'd').format('YYYY-MM-DD'), + EndDate: moment().subtract(1, 'M').format('YYYY-MM-DD'), ProvinceCode: 530000 // Serverpart_ID: props.currentService?.SERVERPART_ID || "1143,1144,1186,1188,1189,1190,1191,1192,1193,979,999,1023,1029,1030,1031,1033,1037,1041,1078,1087,1095,1137,1141,1147,1157,1159,1164,1165,1170,1174,981,985,987,994,1007,1009,1010,1012,1016,971,996,1002,1017,1018,1022,1027,1032,1073,1076,1099,1118,1122,1140,1142,1150,1171,970,969,978,1001,1005,1015,1050,1051,1052,1053,1064,1066,1096,1097,1101,1103,1104,1105,1106,1109,1112,1114,1115,1116,1117,991,995,1039,1080,1094,1100,1107,1123,1127,1133,1154,1155,1161,1163,1179,1180,1019,1021,1048,1049,1056,1059,1062,1063,1069,1093,1067,1228,1008,1070,1072,1166,1113,1148,1153,986,1086,1075,1182,1068,1226,1218,1088,1090,1058,1044,1084,1077,1089,1081,1091,1083,1162,1036,1092,988,993,1111,1158,1194,1202,1230,1198,1207,1216,1221,1203,1206,1209,1215,1227,1201,1205,1208,1214,1217,1229,1212,1065,1085,1055,1071,982,1168,1185,1110,977,1169,973,974,1011,1151,1121,1046,1045,1172,1146,976,1187,1156,1181,1136,1138,1211,983,1195,1131,1176,1167,1223,997,1252,1225,1043,1129,992,1149,975,1382,989,1047,1197,1025,1199,1183,1222,1178,1003,1013,1224,1139,1125,1173,1135,1038,1177,1060,1175,1184,1035,1026,1028,1079,1119,1120,1489" } @@ -385,7 +385,8 @@ const handleGetSectionFlowCount = async () => { const yesReq: any = { StartDate: moment().subtract(1, 'y').startOf('y').format('YYYY-MM-DD'), - EndDate: moment().subtract(1, 'y').endOf('y').format('YYYY-MM-DD'), + // EndDate: moment().subtract(1, 'y').endOf('y').format('YYYY-MM-DD'), + EndDate: moment().subtract(1, 'M').subtract(1, 'y').format('YYYY-MM-DD'), // 找到当前月份对应的去年 ProvinceCode: 530000 // Serverpart_ID: props.currentService?.SERVERPART_ID || "1143,1144,1186,1188,1189,1190,1191,1192,1193,979,999,1023,1029,1030,1031,1033,1037,1041,1078,1087,1095,1137,1141,1147,1157,1159,1164,1165,1170,1174,981,985,987,994,1007,1009,1010,1012,1016,971,996,1002,1017,1018,1022,1027,1032,1073,1076,1099,1118,1122,1140,1142,1150,1171,970,969,978,1001,1005,1015,1050,1051,1052,1053,1064,1066,1096,1097,1101,1103,1104,1105,1106,1109,1112,1114,1115,1116,1117,991,995,1039,1080,1094,1100,1107,1123,1127,1133,1154,1155,1161,1163,1179,1180,1019,1021,1048,1049,1056,1059,1062,1063,1069,1093,1067,1228,1008,1070,1072,1166,1113,1148,1153,986,1086,1075,1182,1068,1226,1218,1088,1090,1058,1044,1084,1077,1089,1081,1091,1083,1162,1036,1092,988,993,1111,1158,1194,1202,1230,1198,1207,1216,1221,1203,1206,1209,1215,1227,1201,1205,1208,1214,1217,1229,1212,1065,1085,1055,1071,982,1168,1185,1110,977,1169,973,974,1011,1151,1121,1046,1045,1172,1146,976,1187,1156,1181,1136,1138,1211,983,1195,1131,1176,1167,1223,997,1252,1225,1043,1129,992,1149,975,1382,989,1047,1197,1025,1199,1183,1222,1178,1003,1013,1224,1139,1125,1173,1135,1038,1177,1060,1175,1184,1035,1026,1028,1079,1119,1120,1489" } diff --git a/src/page/index/components/noticeListBox/noticeListBox.less b/src/page/index/components/noticeListBox/noticeListBox.less index 1e25e3c..42cf67a 100644 --- a/src/page/index/components/noticeListBox/noticeListBox.less +++ b/src/page/index/components/noticeListBox/noticeListBox.less @@ -21,16 +21,18 @@ height: 20px; overflow: hidden; - .noticeList { + .noticeListContent { display: flex; white-space: nowrap; transition: none; position: relative; + will-change: transform; // 优化性能 .noticeItem { display: flex; align-items: center; margin-right: 15px; // 调整item之间的间距 + flex-shrink: 0; // 防止item被压缩 .icon { width: 3px; @@ -38,6 +40,7 @@ background: #1989FA; border-radius: 50%; margin-right: 5px; + flex-shrink: 0; } .contentMessage { @@ -48,27 +51,13 @@ color: #FFFFFF; text-align: left; font-style: normal; + white-space: nowrap; } } - - // 实现无缝滚动 - &.scrolling { - animation: scrollNotice var(--scroll-duration, 10s) linear infinite; - } } } } -// 关键帧动画 -@keyframes scrollNotice { - 0% { - transform: translateX(0); - } - - 100% { - transform: translateX(-VAR_PX); - } -} // 纵向滚动 diff --git a/src/page/index/components/noticeListBox/noticeListBox.vue b/src/page/index/components/noticeListBox/noticeListBox.vue index 970f47f..4b91607 100644 --- a/src/page/index/components/noticeListBox/noticeListBox.vue +++ b/src/page/index/components/noticeListBox/noticeListBox.vue @@ -1,22 +1,29 @@ @@ -304,8 +228,7 @@ onUnmounted(() => {
-
+
diff --git a/src/page/index/index.vue b/src/page/index/index.vue index 9583448..7418d9b 100644 --- a/src/page/index/index.vue +++ b/src/page/index/index.vue @@ -80,11 +80,11 @@ let FestivalOptions = [ ] const tabList: any = [ - { label: "营收金额", value: 1 }, - { label: "客单量", value: 2 }, - { label: "客单均价", value: 3 }, + // { label: "营收金额", value: 1 }, + // { label: "客单量", value: 2 }, + // { label: "客单均价", value: 3 }, ] -let selectTab = ref(1) +let selectTab = ref(3) const iframeLoaded = ref(false); // 选中的节日 @@ -770,10 +770,10 @@ const handleGetHighWayData = async () => { - - + + -
+
@@ -1048,7 +1048,7 @@ const handleGetHighWayData = async () => {
- +