| | |
| | | method: 'get', |
| | | params |
| | | }); |
| | | } |
| | | |
| | | // 产åç©æTop10 |
| | | export function getProductionCostTopProducts(params) { |
| | | return request({ |
| | | url: '/cost/productionCost/top/product', |
| | | method: 'get', |
| | | params |
| | | }); |
| | | } |
| | |
| | | params: query, |
| | | }); |
| | | } |
| | | // è½èåè---ææ¥æå¹´æ±æ»ç»è®¡ |
| | | export function energyConsumptionDetailCollectEnergy(query) { |
| | | return request({ |
| | | url: "/energyConsumptionDetail/collectEnergy", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ°å¢å®¢æ·è¶å¿åæ |
| | | export function getCustomerTrends(params) { |
| | | return request({ |
| | | url: '/home/customerTrends?days=' + params.days, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | // ä¸å¿çæ¿ |
| | | export function getDashboardStatistics() { |
| | | return request({ |
| | | url: '/home/total', |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | </el-button> |
| | | <el-button class="lux-btn" |
| | | @click="handleReset">éç½®</el-button> |
| | | <el-button class="lux-btn" |
| | | <!-- <el-button class="lux-btn" |
| | | type="success" |
| | | plain |
| | | @click="handleExport"> |
| | | å¯¼åº |
| | | </el-button> |
| | | </el-button> --> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | |
| | | <span class="card-title">产åç©æTop10</span> |
| | | </div> |
| | | </template> |
| | | <div ref="topOrdersChartRef" |
| | | <div ref="topProductChartRef" |
| | | class="chart-container" |
| | | style="height: 300px;"></div> |
| | | </el-card> |
| | |
| | | <span class="card-title">ç产订åTop10</span> |
| | | </div> |
| | | </template> |
| | | <div ref="topOrdersChartRef" |
| | | class="chart-container" |
| | | style="height: 300px;"></div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | getProductionCostAggregateByProduct, |
| | | getProductionCostAggregateByOrder, |
| | | getProductionCostTopOrders, |
| | | getProductionCostTopProducts, |
| | | } from "@/api/costAccounting/productionCost.js"; |
| | | |
| | | const statisticsType = ref("day"); |
| | |
| | | // å¾è¡¨ç¸å
³ |
| | | const topOrdersChartRef = ref(null); |
| | | let topOrdersChartInstance = null; |
| | | const topProductChartRef = ref(null); |
| | | let topProductChartInstance = null; |
| | | const topProductData = ref([]); |
| | | |
| | | const detailVisible = ref(false); |
| | | const detailRow = ref(null); |
| | |
| | | if (topOrdersChartRef.value) { |
| | | topOrdersChartInstance = echarts.init(topOrdersChartRef.value); |
| | | updateTopOrdersChart(); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // åå§å产åç©æTop10å¾è¡¨ |
| | | const initTopProductChart = () => { |
| | | nextTick(() => { |
| | | if (topProductChartRef.value) { |
| | | topProductChartInstance = echarts.init(topProductChartRef.value); |
| | | updateTopProductChart(); |
| | | } |
| | | }); |
| | | }; |
| | |
| | | grid: { |
| | | left: "3%", |
| | | right: "4%", |
| | | bottom: "15%", |
| | | bottom: "5%", |
| | | top: "3%", |
| | | containLabel: true, |
| | | }, |
| | |
| | | topOrdersChartInstance.setOption(option); |
| | | }; |
| | | |
| | | // æ´æ°äº§åç©æTop10å¾è¡¨ |
| | | const updateTopProductChart = () => { |
| | | if (!topProductChartInstance) return; |
| | | |
| | | const data = topProductData.value; |
| | | const xAxisData = data.map(item => item.name); |
| | | const seriesData = data.map(item => item.totalCost); |
| | | |
| | | const option = { |
| | | tooltip: { |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: "shadow", |
| | | }, |
| | | backgroundColor: "rgba(255, 255, 255, 0.95)", |
| | | borderColor: "#409EFF", |
| | | borderWidth: 1, |
| | | textStyle: { color: "#303133" }, |
| | | }, |
| | | grid: { |
| | | left: "3%", |
| | | right: "4%", |
| | | bottom: "5%", |
| | | top: "3%", |
| | | containLabel: true, |
| | | }, |
| | | xAxis: { |
| | | type: "category", |
| | | data: xAxisData, |
| | | axisLabel: { |
| | | color: "#606266", |
| | | rotate: 45, |
| | | }, |
| | | axisLine: { lineStyle: { color: "#ebeef5" } }, |
| | | splitLine: { show: false }, |
| | | }, |
| | | yAxis: { |
| | | type: "value", |
| | | name: "ææ¬(å
)", |
| | | nameTextStyle: { color: "#606266" }, |
| | | axisLabel: { color: "#606266" }, |
| | | axisLine: { show: false }, |
| | | splitLine: { lineStyle: { color: "#f0f2f5" } }, |
| | | }, |
| | | series: [ |
| | | { |
| | | name: "ææ¬", |
| | | type: "bar", |
| | | data: seriesData, |
| | | itemStyle: { |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 0, color: "#16a34a" }, |
| | | { offset: 1, color: "#4ade80" }, |
| | | ]), |
| | | }, |
| | | barWidth: "60%", |
| | | }, |
| | | ], |
| | | }; |
| | | |
| | | topProductChartInstance.setOption(option); |
| | | }; |
| | | |
| | | // çªå£å¤§å°ååæ¶éæ°æ¸²æå¾è¡¨ |
| | | const handleResize = () => { |
| | | topOrdersChartInstance && topOrdersChartInstance.resize(); |
| | | topProductChartInstance && topProductChartInstance.resize(); |
| | | }; |
| | | |
| | | const handleTypeChange = () => { |
| | |
| | | console.error("è·åç产订åTop10æ°æ®å¤±è´¥ï¼", err); |
| | | ElMessage.error("ç³»ç»å¼å¸¸ï¼è·åç产订åTop10æ°æ®å¤±è´¥"); |
| | | }); |
| | | |
| | | // è°ç¨APIè·å产åç©æTop10æ°æ® |
| | | getProductionCostTopProducts(apiParams) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | topProductData.value = res.data || []; |
| | | updateTopProductChart(); |
| | | } else { |
| | | ElMessage.error(res.message || "è·å产åç©æTop10æ°æ®å¤±è´¥"); |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | console.error("è·å产åç©æTop10æ°æ®å¤±è´¥ï¼", err); |
| | | ElMessage.error("ç³»ç»å¼å¸¸ï¼è·å产åç©æTop10æ°æ®å¤±è´¥"); |
| | | }); |
| | | }; |
| | | |
| | | const handleReset = () => { |
| | |
| | | loadOrders(); |
| | | handleQuery(); |
| | | initTopOrdersChart(); |
| | | initTopProductChart(); |
| | | window.addEventListener("resize", handleResize); |
| | | }); |
| | | |
| | |
| | | title="æ°å¢å®¢æ·è¶å¿åæ" /> |
| | | <div class="panel-tabs"> |
| | | <span class="tab-item" |
| | | :class="{ active: customerTimeDimension === 'year' }" |
| | | @click="handleCustomerTimeDimensionChange('year')">å¹´</span> |
| | | :class="{ active: customerTimeDimension === 'å¹´' }" |
| | | @click="handleCustomerTimeDimensionChange('å¹´')">å¹´</span> |
| | | <span class="tab-item" |
| | | :class="{ active: customerTimeDimension === 'month' }" |
| | | @click="handleCustomerTimeDimensionChange('month')">æ</span> |
| | | :class="{ active: customerTimeDimension === 'æ' }" |
| | | @click="handleCustomerTimeDimensionChange('æ')">æ</span> |
| | | </div> |
| | | <div class="bi-panel-body"> |
| | | <div class="chart-unit-row chart-unit-single"> |
| | |
| | | import * as echarts from "echarts"; |
| | | import dayjs from "dayjs"; |
| | | import PanelHeader from "@/views/reportAnalysis/PSIDataAnalysis/components/PanelHeader.vue"; |
| | | import { findAllQualifiedStockOutRecordTypeOptions } from "../../../api/basicData/enum"; |
| | | import { |
| | | getDashboardStatistics, |
| | | getCustomerTrends, |
| | | } from "@/api/reportAnalysis/salesStatistics"; |
| | | |
| | | const router = useRouter(); |
| | | const screenRoot = ref(null); |
| | |
| | | const boardTimeDimension = ref("year"); |
| | | const boardSelectedArea = ref("å
¨é¨"); |
| | | const boardProductType = ref("æ¿æ"); |
| | | const customerTimeDimension = ref("year"); |
| | | const customerTimeDimension = ref("å¹´"); |
| | | |
| | | const salesAreas = [ |
| | | "å
¨é¨", |
| | |
| | | }); |
| | | |
| | | const totalSalesAmount = ref(1299); |
| | | const centerNewCustomerCount = ref(112); |
| | | const completedOrders = ref(1829); |
| | | const totalSalesAreaCount = ref(12); |
| | | |
| | | const newCustomerCount = computed(() => { |
| | | return filteredData.value.reduce((sum, item) => sum + item.newCustomers, 0); |
| | |
| | | return Object.values(customerMap).reduce((sum, count) => sum + count, 0); |
| | | }); |
| | | |
| | | // ä¸é´ä¸å¿ç¯ææ ï¼ç¨äºå¤§å±å±ç¤ºï¼ä½¿ç¨ç°æç»è®¡æ°æ®åæ å°ï¼ |
| | | const centerNewCustomerCount = computed(() => 112); |
| | | const completedOrders = computed(() => 1829); |
| | | const salesOrderCount = computed(() => 34); |
| | | const totalSalesAreaCount = computed(() => 12); |
| | | // 客æ·è¶å¿æ°æ® |
| | | const customerTrendsData = ref([]); |
| | | |
| | | // ååç计ç®ï¼æ¨¡æï¼ |
| | | const salesVolumeChange = ref("+5.2"); |
| | | const salesAmountChange = ref("+7.8"); |
| | | const customerCountChange = ref("+3.5"); |
| | | const totalCustomerChange = ref("+2.1"); |
| | | |
| | | // è·åä¸å¿çæ¿æ°æ® |
| | | const fetchDashboardData = async () => { |
| | | try { |
| | | const response = await getDashboardStatistics(); |
| | | if (response && response.data) { |
| | | totalSalesAmount.value = response.data.price || 0; |
| | | completedOrders.value = response.data.delivery || 0; |
| | | centerNewCustomerCount.value = response.data.customer || 0; |
| | | totalSalesAreaCount.value = response.data.volume || 0; |
| | | } |
| | | } catch (error) { |
| | | console.error("è·åä¸å¿çæ¿æ°æ®å¤±è´¥:", error); |
| | | } |
| | | }; |
| | | |
| | | // è·å客æ·è¶å¿æ°æ® |
| | | const fetchCustomerTrendsData = async () => { |
| | | try { |
| | | const response = await getCustomerTrends({ |
| | | days: customerTimeDimension.value, |
| | | }); |
| | | if (response && response.data) { |
| | | // APIè¿åçæ°æ®ç»æå¦ä¸ï¼ |
| | | // { |
| | | // "dates": ["2026-01-01", "2025-01-01", ...], |
| | | // "customerTrends": [{"ALLIN": 4, "é¶å·": 3, ...}, ...] |
| | | // } |
| | | customerTrendsData.value = response.data; |
| | | updateCharts(); |
| | | } |
| | | } catch (error) { |
| | | console.error("è·å客æ·è¶å¿æ°æ®å¤±è´¥:", error); |
| | | } |
| | | }; |
| | | |
| | | // è¡¨æ ¼æ°æ® |
| | | const tableData = computed(() => { |
| | |
| | | right: "1%", |
| | | textStyle: { |
| | | color: "#B8C8E0", |
| | | fontSize: getResponsiveValue(9), |
| | | fontSize: getResponsiveValue(10), |
| | | }, |
| | | itemWidth: getResponsiveValue(10), |
| | | itemHeight: getResponsiveValue(10), |
| | |
| | | right: "1%", |
| | | textStyle: { |
| | | color: "#B8C8E0", |
| | | fontSize: getResponsiveValue(9), |
| | | fontSize: getResponsiveValue(10), |
| | | }, |
| | | itemWidth: getResponsiveValue(10), |
| | | itemHeight: getResponsiveValue(10), |
| | |
| | | |
| | | // æ°å¢å®¢æ·è¶å¿å¾è¡¨é
ç½®ï¼æéå®åºåå¹´æç»´åº¦ï¼ |
| | | const productTypeTrendChartOption = computed(() => { |
| | | // 为æ¯ä¸ªéå®åºçææ°æ® |
| | | const salesAreas = [ |
| | | "å
¨é¨", |
| | | "Aéå®åº", |
| | | "Béå®åº", |
| | | "Céå®åº", |
| | | "Déå®åº", |
| | | "Eéå®åº", |
| | | ]; |
| | | const colors = [ |
| | | "#00A4ED", |
| | | "#34D8F7", |
| | |
| | | "#8A6BFF", |
| | | "#C8C447", |
| | | "#FF6B6B", |
| | | "#FF8B6B", |
| | | "#FFCB6B", |
| | | "#8BC34A", |
| | | "#4CAF50", |
| | | ]; |
| | | const year = 2024; |
| | | const periodType = customerTimeDimension.value; |
| | | |
| | | // çææ¶é´æ®µ |
| | | let periods = []; |
| | | if (periodType === "year") { |
| | | // å¹´åº¦æ°æ®ï¼12个æ |
| | | for (let month = 1; month <= 12; month++) { |
| | | periods.push(`${year}-${month.toString().padStart(2, "0")}`); |
| | | } |
| | | } else { |
| | | // æåº¦æ°æ®ï¼30天 |
| | | const month = 1; |
| | | for (let day = 1; day <= 30; day++) { |
| | | periods.push( |
| | | `${year}-${month.toString().padStart(2, "0")}-${day |
| | | .toString() |
| | | .padStart(2, "0")}` |
| | | ); |
| | | } |
| | | } |
| | | let salesAreas = []; |
| | | let series = []; |
| | | |
| | | // 为æ¯ä¸ªéå®åºçææ°æ® |
| | | const series = salesAreas.map((area, index) => { |
| | | const data = periods.map(() => { |
| | | return periodType === "year" |
| | | ? Math.floor(Math.random() * 10) + 2 |
| | | : Math.floor(Math.random() * 3) + 1; |
| | | if ( |
| | | customerTrendsData.value && |
| | | customerTrendsData.value.dates && |
| | | customerTrendsData.value.customerTrends |
| | | ) { |
| | | // 使ç¨APIè¿åçæ°æ® |
| | | periods = customerTrendsData.value.dates; |
| | | |
| | | // æåææéå®åºå |
| | | const areaSet = new Set(); |
| | | customerTrendsData.value.customerTrends.forEach(item => { |
| | | Object.keys(item).forEach(key => { |
| | | areaSet.add(key); |
| | | }); |
| | | }); |
| | | salesAreas = Array.from(areaSet); |
| | | |
| | | return { |
| | | name: area, |
| | | data: data, |
| | | type: "line", |
| | | smooth: false, |
| | | lineStyle: { width: getResponsiveValue(1), color: colors[index] }, |
| | | itemStyle: { color: colors[index] }, |
| | | }; |
| | | }); |
| | | // 为æ¯ä¸ªéå®åºåçææ°æ® |
| | | series = salesAreas.map((area, index) => { |
| | | const data = customerTrendsData.value.customerTrends.map((item, i) => { |
| | | return item[area] || 0; |
| | | }); |
| | | |
| | | return { |
| | | name: area, |
| | | data: data, |
| | | type: "line", |
| | | smooth: false, |
| | | lineStyle: { |
| | | width: getResponsiveValue(1), |
| | | color: colors[index % colors.length], |
| | | }, |
| | | itemStyle: { color: colors[index % colors.length] }, |
| | | }; |
| | | }); |
| | | } else { |
| | | // æ¨¡ææ°æ® |
| | | const year = 2024; |
| | | if (periodType === "year") { |
| | | // å¹´åº¦æ°æ®ï¼12个æ |
| | | for (let month = 1; month <= 12; month++) { |
| | | periods.push(`${year}-${month.toString().padStart(2, "0")}`); |
| | | } |
| | | } else { |
| | | // æåº¦æ°æ®ï¼30天 |
| | | const month = 1; |
| | | for (let day = 1; day <= 30; day++) { |
| | | periods.push( |
| | | `${year}-${month.toString().padStart(2, "0")}-${day |
| | | .toString() |
| | | .padStart(2, "0")}` |
| | | ); |
| | | } |
| | | } |
| | | |
| | | salesAreas = []; |
| | | series = salesAreas.map((area, index) => { |
| | | const data = periods.map(() => { |
| | | return periodType === "year" |
| | | ? Math.floor(Math.random() * 10) + 2 |
| | | : Math.floor(Math.random() * 3) + 1; |
| | | }); |
| | | |
| | | return { |
| | | name: area, |
| | | data: data, |
| | | type: "line", |
| | | smooth: false, |
| | | lineStyle: { width: getResponsiveValue(1), color: colors[index] }, |
| | | itemStyle: { color: colors[index] }, |
| | | }; |
| | | }); |
| | | } |
| | | |
| | | return { |
| | | backgroundColor: "transparent", |
| | |
| | | right: "1%", |
| | | textStyle: { |
| | | color: "#B8C8E0", |
| | | fontSize: getResponsiveValue(9), |
| | | fontSize: getResponsiveValue(10), |
| | | }, |
| | | itemWidth: getResponsiveValue(10), |
| | | itemHeight: getResponsiveValue(10), |
| | |
| | | // å¤çæ°å¢å®¢æ·è¶å¿æ¶é´ç»´åº¦åæ¢ |
| | | const handleCustomerTimeDimensionChange = dimension => { |
| | | customerTimeDimension.value = dimension; |
| | | updateCharts(); |
| | | fetchCustomerTrendsData(); |
| | | }; |
| | | |
| | | // çæç åé宿°æ® |
| | |
| | | }; |
| | | |
| | | // çå½å¨æ |
| | | onMounted(() => { |
| | | onMounted(async () => { |
| | | // å¯å¨é¡¶é¨æ æ¶é´å·æ° |
| | | if (!timeTicker) { |
| | | timeTicker = setInterval(() => { |
| | |
| | | // çæåå§æ°æ® |
| | | generateBlockSalesData(); |
| | | generateBoardSalesData(); |
| | | |
| | | // è·åæ°æ® |
| | | await fetchDashboardData(); |
| | | await fetchCustomerTrendsData(); |
| | | |
| | | // çå¾
DOMæ´æ°ååå§åå¾è¡¨ |
| | | nextTick(() => { |
| | |
| | | } |
| | | |
| | | /* .scroll-table tbody tr:nth-child(odd) { |
| | | background-color: rgba(64, 158, 255, 0.05); |
| | | } |
| | | background-color: rgba(64, 158, 255, 0.05); |
| | | } |
| | | |
| | | .scroll-table tbody tr:nth-child(even) { |
| | | background-color: rgba(64, 158, 255, 0.1); |
| | | } */ |
| | | .scroll-table tbody tr:nth-child(even) { |
| | | background-color: rgba(64, 158, 255, 0.1); |
| | | } */ |
| | | .oddTableTr { |
| | | background-color: rgba(64, 158, 255, 0.05); |
| | | } |
| | |
| | | <el-button @click="handleReset">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <!-- <div> |
| | | <el-button type="success" |
| | | @click="handleExport">å¯¼åºæ¥è¡¨</el-button> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <!-- å¾è¡¨åºå --> |
| | | <div class="chart-section"> |
| | |
| | | </el-icon> |
| | | è½èåèæ°æ® |
| | | </h2> |
| | | <el-table :data="tableValue" |
| | | <el-table :data="tableData2" |
| | | v-loading="tableLoading" |
| | | border> |
| | | <el-table-column prop="meterReadingDate" |
| | | <!-- <el-table-column prop="meterReadingDate" |
| | | label="æ¥æ" |
| | | align="center" /> |
| | | <!-- <el-table-column prop="type" |
| | | label="ç±»å" |
| | | align="center" |
| | | width="100"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.type === 'ç产' ? 'primary' : 'success'"> |
| | | {{ scope.row.type }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> --> |
| | | align="center" /> --> |
| | | <el-table-column prop="energyTyep" |
| | | label="è½èç±»å" |
| | | align="center"> |
| | | <template #default="scope"> |
| | | <el-tag :type="getEnergyTypeType(scope.row.type)"> |
| | | {{ scope.row.type }} |
| | | <el-tag :type="getEnergyTypeType(scope.row.energyTyep)"> |
| | | {{ scope.row.energyTyep }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="consumption" |
| | | <el-table-column prop="energyConsumption" |
| | | label="ç¨é" |
| | | align="right" /> |
| | | <el-table-column prop="cost" |
| | | <el-table-column prop="energyCost" |
| | | label="ææ¬" |
| | | align="right"> |
| | | <template #default="scope"> |
| | | <span class="data-value">Â¥{{ scope.row.cost }}</span> |
| | | <span class="data-value">Â¥{{ scope.row.energyCost }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unitConsumption" |
| | | <!-- <el-table-column prop="unitConsumption" |
| | | label="åè" |
| | | align="right"> |
| | | <template #default="scope"> |
| | | <span class="data-value">{{ scope.row.unitConsumption }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | |
| | | import { ElMessage } from "element-plus"; |
| | | import { TrendCharts, List } from "@element-plus/icons-vue"; |
| | | import * as echarts from "echarts"; |
| | | import { energyConsumptionDetailStatistics } from "@/api/energyManagement/energyType"; |
| | | import { energyConsumptionDetailCollectEnergy } from "@/api/energyManagement/energyType"; |
| | | |
| | | // ç»è®¡ç»´åº¦ |
| | | const statisticsType = ref("day"); |
| | |
| | | const typeMap = { |
| | | æ°´: "primary", |
| | | çµ: "warning", |
| | | è¸æ±½: "success", |
| | | æ°: "success", |
| | | }; |
| | | return typeMap[type] || "info"; |
| | | }; |
| | |
| | | ); |
| | | // 使ç¨å®é
çmeterReadingDateä½ä¸ºæ¨ªè½´æ°æ® |
| | | xAxisData = allDates; |
| | | |
| | | const energyTypesList = ["æ°´", "çµ", "æ°"]; |
| | | const seriesData = [ |
| | | { |
| | | name: "æ°´", |
| | | type: "line", |
| | | data: data.map(item => item.waterConsumption), |
| | | smooth: true, |
| | | symbol: "circle", |
| | | symbolSize: 8, |
| | | lineStyle: { |
| | | width: 3, |
| | | }, |
| | | itemStyle: { |
| | | color: "#409EFF", |
| | | }, |
| | | }, |
| | | { |
| | | name: "çµ", |
| | | type: "line", |
| | | data: data.map(item => item.electricityConsumption), |
| | | smooth: true, |
| | | symbol: "circle", |
| | | symbolSize: 8, |
| | | lineStyle: { |
| | | width: 3, |
| | | }, |
| | | itemStyle: { |
| | | color: "#FF4D4F", |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ°", |
| | | type: "line", |
| | | data: data.map(item => item.gasConsumption), |
| | | smooth: true, |
| | | symbol: "circle", |
| | | symbolSize: 8, |
| | | lineStyle: { |
| | | width: 3, |
| | | }, |
| | | itemStyle: { |
| | | color: "#FF9900", |
| | | }, |
| | | }, |
| | | ]; |
| | | const option = { |
| | | tooltip: { |
| | | trigger: "axis", |
| | |
| | | textStyle: { color: "#303133" }, |
| | | }, |
| | | legend: { |
| | | data: ["åè"], |
| | | data: energyTypesList, |
| | | top: 0, |
| | | right: 10, |
| | | textStyle: { color: "#606266" }, |
| | |
| | | axisLine: { show: false }, |
| | | splitLine: { lineStyle: { color: "#f0f2f5" } }, |
| | | }, |
| | | series: { |
| | | name: "åè", |
| | | type: "line", |
| | | data: data.map(item => item.totalCost), |
| | | smooth: true, |
| | | symbol: "circle", |
| | | symbolSize: 8, |
| | | lineStyle: { |
| | | width: 3, |
| | | }, |
| | | itemStyle: { |
| | | color: "#409EFF", |
| | | }, |
| | | }, |
| | | series: seriesData, |
| | | }; |
| | | |
| | | consumptionChartInstance.setOption(option); |
| | | }; |
| | | const tableValue = ref([]); |
| | | |
| | | const tableData2 = ref([]); |
| | | // æ¥è¯¢ |
| | | const handleQuery = () => { |
| | | tableLoading.value = true; |
| | |
| | | params.days = Math.ceil((end - start) / (1000 * 60 * 60 * 24)) + 1; |
| | | } |
| | | |
| | | energyConsumptionDetailStatistics(params) |
| | | energyConsumptionDetailCollectEnergy(params) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | const data = res.data; |
| | | tableData.value = data.energyCostDtos || []; |
| | | tableData2.value = data.energyConsumptionTypeProportion || []; |
| | | tableValue.value = []; |
| | | tableData.value.forEach(item => { |
| | | tableValue.value.push({ |