From 940c99e2ab410e5a02adc83e2524de6d99f94c45 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 02:31:29 +0000 Subject: [PATCH] style: format code with Prettier and StandardJS This commit fixes the style issues introduced in fc08380 according to the output from Prettier and StandardJS. Details: None --- src/pages/bigScreen/chinaMap/index.jsx | 44 +++--- src/pages/bigScreen/index.jsx | 208 ++++++++++++------------- src/pages/echarts/index.jsx | 60 +++---- src/pages/layout/proSecNav/index.jsx | 26 ++-- src/routers/index.jsx | 74 ++++----- 5 files changed, 206 insertions(+), 206 deletions(-) diff --git a/src/pages/bigScreen/chinaMap/index.jsx b/src/pages/bigScreen/chinaMap/index.jsx index a6886f61..a19c5187 100644 --- a/src/pages/bigScreen/chinaMap/index.jsx +++ b/src/pages/bigScreen/chinaMap/index.jsx @@ -10,82 +10,82 @@ const ChinaMap = () => { toName: '珠海', coords: [ [126.661669, 45.742347], - [113.576726, 22.270715], - ], + [113.576726, 22.270715] + ] }, { fromName: '黑龙江', toName: '舒兰', coords: [ [126.661669, 45.742347], - [126.965607, 44.406106], - ], + [126.965607, 44.406106] + ] }, { fromName: '黑龙江', toName: '大连', coords: [ [126.661669, 45.742347], - [121.614682, 38.914003], - ], + [121.614682, 38.914003] + ] }, { fromName: '辽宁', toName: '集安', coords: [ [123.42944, 41.835441], - [126.194031, 41.125307], - ], + [126.194031, 41.125307] + ] }, { fromName: '吉林', toName: '抚顺', coords: [ [126.549572, 43.837883], - [123.957208, 41.880872], - ], + [123.957208, 41.880872] + ] }, { fromName: '山东', toName: '南京', coords: [ [117.020359, 36.66853], - [118.796877, 32.060255], - ], + [118.796877, 32.060255] + ] }, { fromName: '北京', toName: '沈阳', coords: [ [116.407526, 39.90403], - [123.431475, 41.805698], - ], + [123.431475, 41.805698] + ] }, { fromName: '黑龙江', toName: '环翠', coords: [ [126.661669, 45.742347], - [122.123444, 37.501991], - ], + [122.123444, 37.501991] + ] }, { fromName: '天津', toName: '大连', coords: [ [117.200983, 39.084158], - [121.614682, 38.914003], - ], + [121.614682, 38.914003] + ] }, { fromName: '吉林', toName: '兴和', coords: [ [126.549572, 43.837883], - [113.834173, 40.872301], - ], - }, - ], + [113.834173, 40.872301] + ] + } + ] }) return diff --git a/src/pages/bigScreen/index.jsx b/src/pages/bigScreen/index.jsx index f9bc0b58..39e96b4c 100644 --- a/src/pages/bigScreen/index.jsx +++ b/src/pages/bigScreen/index.jsx @@ -17,7 +17,7 @@ const BigScreen = () => { data3: [110, 132, 201, 154, 150, 80], data4: [90, 142, 161, 114, 190, 170], xData: ['9:00', '12:00', '15:00', '18:00', '21:00', '00:00'], - barData: [32.2, 60.0, 32.6, 36.4, 53.3, 35.0], + barData: [32.2, 60.0, 32.6, 36.4, 53.3, 35.0] }) useEffect(() => { const { calcRate, windowResize, unWindowResize } = previewFitScale(1200, 800, scaleDom.current) @@ -35,477 +35,477 @@ const BigScreen = () => { bidderName: '平山县万达公路工程有限公司', bizDate: '2019-01', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2019-03', bidCount: '2', - winRate: 50, + winRate: 50 }, { bidderCode: '91130104681399108D', bidderName: '河北君邦公路工程有限公司', bizDate: '2019-03', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130108673216180T', bidderName: '河北盛创公路工程有限公司', bizDate: '2019-04', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130104681399108D', bidderName: '河北君邦公路工程有限公司', bizDate: '2019-07', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2019-08', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2019-09', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2019-10', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2020-03', bidCount: '5', - winRate: 60, + winRate: 60 }, { bidderCode: '91130108673216180T', bidderName: '河北盛创公路工程有限公司', bizDate: '2020-03', bidCount: '7', - winRate: 28.57, + winRate: 28.57 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2020-04', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2020-05', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2020-08', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130104681399108D', bidderName: '河北君邦公路工程有限公司', bizDate: '2020-08', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2020-08', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130104681399108D', bidderName: '河北君邦公路工程有限公司', bizDate: '2020-12', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2021-03', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130104681399108D', bidderName: '河北君邦公路工程有限公司', bizDate: '2021-04', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2021-05', bidCount: '2', - winRate: 0, + winRate: 0 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2021-05', bidCount: '2', - winRate: 50, + winRate: 50 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2021-11', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2021-12', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2022-04', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2022-06', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2022-07', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2022-08', bidCount: '2', - winRate: 50, + winRate: 50 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2022-08', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130131694657380A', bidderName: '平山县万达公路工程有限公司', bizDate: '2022-08', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2022-10', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2022-11', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130121096822075A', bidderName: '井陉县兴通公路养护工程有限公司', bizDate: '2022-11', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130121096822075A', bidderName: '井陉县兴通公路养护工程有限公司', bizDate: '2023-02', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2023-02', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130131694657380A', bidderName: '平山县万达公路工程有限公司', bizDate: '2023-02', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130104681399108D', bidderName: '河北君邦公路工程有限公司', bizDate: '2023-04', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2023-05', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130121096822075A', bidderName: '井陉县兴通公路养护工程有限公司', bizDate: '2023-05', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2023-05', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '9113018579415799XW', bidderName: '河北昕辰路桥工程有限公司', bizDate: '2023-05', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130104681399108D', bidderName: '河北君邦公路工程有限公司', bizDate: '2023-05', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2023-06', bidCount: '3', - winRate: 66.67, + winRate: 66.67 }, { bidderCode: '91130104681399108D', bidderName: '河北君邦公路工程有限公司', bizDate: '2023-06', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91510129MA6CWGNC1F', bidderName: '四川联天望海建筑工程有限公司', bizDate: '2023-06', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2023-07', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130121096822075A', bidderName: '井陉县兴通公路养护工程有限公司', bizDate: '2023-08', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91510129MA6CWGNC1F', bidderName: '四川联天望海建筑工程有限公司', bizDate: '2023-08', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130131694657380A', bidderName: '平山县万达公路工程有限公司', bizDate: '2023-08', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2023-09', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2023-10', bidCount: '2', - winRate: 50, + winRate: 50 }, { bidderCode: '91130121096822075A', bidderName: '井陉县兴通公路养护工程有限公司', bizDate: '2023-10', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130104681399108D', bidderName: '河北君邦公路工程有限公司', bizDate: '2023-10', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91510129MA6CWGNC1F', bidderName: '四川联天望海建筑工程有限公司', bizDate: '2023-10', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2023-11', bidCount: '3', - winRate: 33.33, + winRate: 33.33 }, { bidderCode: '91130121096822075A', bidderName: '井陉县兴通公路养护工程有限公司', bizDate: '2023-11', bidCount: '4', - winRate: 100, + winRate: 100 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2023-11', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '9113018579415799XW', bidderName: '河北昕辰路桥工程有限公司', bizDate: '2023-11', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130104681399108D', bidderName: '河北君邦公路工程有限公司', bizDate: '2023-11', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91510129MA6CWGNC1F', bidderName: '四川联天望海建筑工程有限公司', bizDate: '2023-11', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130131694657380A', bidderName: '平山县万达公路工程有限公司', bizDate: '2023-11', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130108673216180T', bidderName: '河北盛创公路工程有限公司', bizDate: '2023-11', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91130927319947095N', bidderName: '河北广润建筑工程有限公司', bizDate: '2023-12', bidCount: '3', - winRate: 0, + winRate: 0 }, { bidderCode: '9113018579415799XW', bidderName: '河北昕辰路桥工程有限公司', bizDate: '2023-12', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91510129MA6CWGNC1F', bidderName: '四川联天望海建筑工程有限公司', bizDate: '2023-12', bidCount: '2', - winRate: 0, + winRate: 0 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2024-01', bidCount: '4', - winRate: 75, + winRate: 75 }, { bidderCode: '91130121096822075A', bidderName: '井陉县兴通公路养护工程有限公司', bizDate: '2024-01', bidCount: '2', - winRate: 50, + winRate: 50 }, { bidderCode: '9113018579415799XW', bidderName: '河北昕辰路桥工程有限公司', bizDate: '2024-01', bidCount: '1', - winRate: 100, + winRate: 100 }, { bidderCode: '91130183784094817J', bidderName: '石家庄通畅公路工程有限公司', bizDate: '2024-02', bidCount: '1', - winRate: 0, + winRate: 0 }, { bidderCode: '91510129MA6CWGNC1F', bidderName: '四川联天望海建筑工程有限公司', bizDate: '2024-02', bidCount: '1', - winRate: 100, - }, + winRate: 100 + } ], chartDate: [ '2019-01', @@ -542,7 +542,7 @@ const BigScreen = () => { '2023-11', '2023-12', '2024-01', - '2024-02', + '2024-02' ], chartLegend: [ '井陉县兴通公路养护工程有限公司', @@ -552,7 +552,7 @@ const BigScreen = () => { '河北广润建筑工程有限公司', '河北君邦公路工程有限公司', '河北昕辰路桥工程有限公司', - '四川联天望海建筑工程有限公司', + '四川联天望海建筑工程有限公司' ], seriesData: [ { @@ -594,8 +594,8 @@ const BigScreen = () => { '1', 0, 0, - 0, - ], + 0 + ] }, { name: '石家庄通畅公路工程有限公司', @@ -635,8 +635,8 @@ const BigScreen = () => { '3', 0, '4', - '1', - ], + '1' + ] }, { name: '河北君邦公路工程有限公司', @@ -677,8 +677,8 @@ const BigScreen = () => { '1', 0, 0, - 0, - ], + 0 + ] }, { name: '河北盛创公路工程有限公司', @@ -718,8 +718,8 @@ const BigScreen = () => { '1', 0, 0, - 0, - ], + 0 + ] }, { name: '河北广润建筑工程有限公司', @@ -760,8 +760,8 @@ const BigScreen = () => { '1', '3', 0, - 0, - ], + 0 + ] }, { name: '井陉县兴通公路养护工程有限公司', @@ -801,8 +801,8 @@ const BigScreen = () => { '4', 0, '2', - 0, - ], + 0 + ] }, { name: '河北昕辰路桥工程有限公司', @@ -843,8 +843,8 @@ const BigScreen = () => { '1', '1', '1', - 0, - ], + 0 + ] }, { name: '四川联天望海建筑工程有限公司', @@ -885,10 +885,10 @@ const BigScreen = () => { '1', '2', 0, - '1', - ], - }, - ], + '1' + ] + } + ] } const options = { enlarge: false, @@ -908,29 +908,29 @@ const BigScreen = () => { return index === 0 ? `${param.name}
${temp}` : temp }) return formatterText.join('') - }, + } }, options: { legend: { show: true, type: 'scroll', icon: 'circle', - data: chartData?.chartLegend ?? [], - }, + data: chartData?.chartLegend ?? [] + } }, grid: { top: 40, right: 30, bottom: 30, left: 40, - containLabel: true, + containLabel: true }, xAxis: { axisLabel: { rotate: 45, - margin: 20, + margin: 20 }, - data: chartData?.chartDate ?? [], + data: chartData?.chartDate ?? [] }, yAxis: [ { @@ -938,21 +938,21 @@ const BigScreen = () => { nameGap: 5, nameTextStyle: { padding: [0, 0, 10, 0], - verticalAlign: 'bottom', - }, - }, + verticalAlign: 'bottom' + } + } ], - series: chartData?.seriesData ?? [], + series: chartData?.seriesData ?? [] } return (
-
+
@@ -960,7 +960,7 @@ const BigScreen = () => {
@@ -968,7 +968,7 @@ const BigScreen = () => {
diff --git a/src/pages/echarts/index.jsx b/src/pages/echarts/index.jsx index 1bc1e763..23adf621 100644 --- a/src/pages/echarts/index.jsx +++ b/src/pages/echarts/index.jsx @@ -7,78 +7,78 @@ const Echarts = () => { tooltip: { trigger: 'axis', axisPointer: { - type: 'shadow', - }, + type: 'shadow' + } }, legend: { - data: ['Direct', 'Email', 'Union Ads', 'Video Ads', 'Search Engine', 'Baidu', 'Google', 'Bing', 'Others'], + data: ['Direct', 'Email', 'Union Ads', 'Video Ads', 'Search Engine', 'Baidu', 'Google', 'Bing', 'Others'] }, grid: { left: '3%', right: '4%', bottom: '3%', - containLabel: true, + containLabel: true }, xAxis: [ { type: 'category', - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], - }, + data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + } ], yAxis: [ { - type: 'value', - }, + type: 'value' + } ], series: [ { name: 'Direct', type: 'bar', emphasis: { - focus: 'series', + focus: 'series' }, - data: [320, 332, 301, 334, 390, 330, 320], + data: [320, 332, 301, 334, 390, 330, 320] }, { name: 'Email', type: 'bar', stack: 'Ad', emphasis: { - focus: 'series', + focus: 'series' }, - data: [120, 132, 101, 134, 90, 230, 210], + data: [120, 132, 101, 134, 90, 230, 210] }, { name: 'Union Ads', type: 'bar', stack: 'Ad', emphasis: { - focus: 'series', + focus: 'series' }, - data: [220, 182, 191, 234, 290, 330, 310], + data: [220, 182, 191, 234, 290, 330, 310] }, { name: 'Video Ads', type: 'bar', stack: 'Ad', emphasis: { - focus: 'series', + focus: 'series' }, - data: [150, 232, 201, 154, 190, 330, 410], + data: [150, 232, 201, 154, 190, 330, 410] }, { name: 'Search Engine', type: 'bar', data: [862, 1018, 964, 1026, 1679, 1600, 1570], emphasis: { - focus: 'series', + focus: 'series' }, markLine: { lineStyle: { - type: 'dashed', + type: 'dashed' }, - data: [[{ type: 'min' }, { type: 'max' }]], - }, + data: [[{ type: 'min' }, { type: 'max' }]] + } }, { name: 'Baidu', @@ -86,38 +86,38 @@ const Echarts = () => { barWidth: 5, stack: 'Search Engine', emphasis: { - focus: 'series', + focus: 'series' }, - data: [620, 732, 701, 734, 1090, 1130, 1120], + data: [620, 732, 701, 734, 1090, 1130, 1120] }, { name: 'Google', type: 'bar', stack: 'Search Engine', emphasis: { - focus: 'series', + focus: 'series' }, - data: [120, 132, 101, 134, 290, 230, 220], + data: [120, 132, 101, 134, 290, 230, 220] }, { name: 'Bing', type: 'bar', stack: 'Search Engine', emphasis: { - focus: 'series', + focus: 'series' }, - data: [60, 72, 71, 74, 190, 130, 110], + data: [60, 72, 71, 74, 190, 130, 110] }, { name: 'Others', type: 'bar', stack: 'Search Engine', emphasis: { - focus: 'series', + focus: 'series' }, - data: [62, 82, 91, 84, 109, 110, 120], - }, - ], + data: [62, 82, 91, 84, 109, 110, 120] + } + ] } return ( diff --git a/src/pages/layout/proSecNav/index.jsx b/src/pages/layout/proSecNav/index.jsx index 938163a9..eadb2206 100644 --- a/src/pages/layout/proSecNav/index.jsx +++ b/src/pages/layout/proSecNav/index.jsx @@ -10,7 +10,7 @@ import { QuestionCircleOutlined, FireOutlined, GlobalOutlined, - QrcodeOutlined, + QrcodeOutlined } from '@ant-design/icons' import styles from './index.module.less' @@ -19,7 +19,7 @@ const pathSubmenu = { '/home': ['home'], '/coupons/add': ['/sub-act', '/sub-coupons'], '/coupons/edit': ['/sub-act', '/sub-coupons'], - '/product': ['/sub-act', '/sub-coupons'], + '/product': ['/sub-act', '/sub-coupons'] } const ProSecNav = () => { @@ -45,7 +45,7 @@ const ProSecNav = () => { useEffect(() => { const selectedPathKey = pathname setSelectedKeys([selectedPathKey]) - setOpenKeys(isOpenChange ? openKeys : (pathSubmenu[pathname] ?? openKeys)) + setOpenKeys(isOpenChange ? openKeys : pathSubmenu[pathname] ?? openKeys) }, [pathname, openKeys, isOpenChange]) const onOpenChange = (keys) => { @@ -100,11 +100,11 @@ const ProSecNav = () => { icon: , children: [ { label: 'Vue', key: '/coupons/add' }, - { label: 'Angular', key: '/coupons/edit' }, - ], + { label: 'Angular', key: '/coupons/edit' } + ] }, - { label: '后端技术栈', key: '/product', icon: }, - ], + { label: '后端技术栈', key: '/product', icon: } + ] }, { label: '构建工具', @@ -112,25 +112,25 @@ const ProSecNav = () => { icon: , children: [ { label: 'Webpack', key: '/coupons/list' }, - { label: 'Vite', key: '/order/list' }, - ], + { label: 'Vite', key: '/order/list' } + ] }, { label: 'Error', key: '/sub-error', icon: , - children: [{ label: 'ErrorBoundary', key: '/error' }], - }, + children: [{ label: 'ErrorBoundary', key: '/error' }] + } ] return (