industryAnalysis.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. <template>
  2. <div class="industry-analysis-container">
  3. <!-- 主体内容区域 - 双栏对比布局 -->
  4. <div class="comparison-container">
  5. <!-- 左侧面板 -->
  6. <div class="comparison-panel left-panel">
  7. <!-- 左侧搜索区域 -->
  8. <div class="search-section">
  9. <el-form :inline="true" :model="leftSearchForm" class="search-form">
  10. <el-form-item label="项目名称:">
  11. <el-select
  12. v-model="leftSearchForm.projectName"
  13. placeholder="请选择"
  14. style="width: 200px"
  15. >
  16. <el-option label="请选择" value=""></el-option>
  17. <!-- 这里可以根据实际数据动态加载选项 -->
  18. </el-select>
  19. </el-form-item>
  20. <el-form-item label="监审对象:">
  21. <el-select
  22. v-model="leftSearchForm.auditObject"
  23. placeholder="请选择"
  24. style="width: 200px"
  25. >
  26. <el-option label="请选择" value=""></el-option>
  27. <!-- 这里可以根据实际数据动态加载选项 -->
  28. </el-select>
  29. </el-form-item>
  30. <el-form-item label="计划年度:">
  31. <el-date-picker
  32. v-model="leftSearchForm.startYear"
  33. type="year"
  34. placeholder="开始年份"
  35. format="yyyy年"
  36. value-format="yyyy"
  37. style="width: 120px; margin-right: 10px"
  38. ></el-date-picker>
  39. <span style="margin: 0 5px">~</span>
  40. <el-date-picker
  41. v-model="leftSearchForm.endYear"
  42. type="year"
  43. placeholder="结束年份"
  44. format="yyyy年"
  45. value-format="yyyy"
  46. style="width: 120px"
  47. ></el-date-picker>
  48. </el-form-item>
  49. <el-form-item>
  50. <el-button
  51. icon="el-icon-search"
  52. type="primary"
  53. @click="handleLeftQuery"
  54. >
  55. 查询
  56. </el-button>
  57. <el-button
  58. icon="el-icon-refresh"
  59. style="margin-left: 10px"
  60. @click="handleLeftReset"
  61. >
  62. 重置
  63. </el-button>
  64. </el-form-item>
  65. </el-form>
  66. </div>
  67. <!-- 左侧数据项选择和图表 -->
  68. <div class="panel-content">
  69. <!-- 左侧数据项选择 -->
  70. <div class="data-selector">
  71. <div class="panel-title">请选择数据项后查看分析:</div>
  72. <el-tree
  73. ref="leftDataTree"
  74. :data="dataItems"
  75. show-checkbox
  76. node-key="id"
  77. :props="treeProps"
  78. :default-checked-keys="['1-6']"
  79. :default-expanded-keys="['1', '2']"
  80. @check="handleLeftDataItemCheck"
  81. ></el-tree>
  82. </div>
  83. <!-- 左侧图表展示 -->
  84. <div class="chart-section">
  85. <!-- 指标趋势分析 -->
  86. <div class="chart-container">
  87. <h3 class="chart-title">指标趋势分析</h3>
  88. <div id="leftTrendChart" class="chart"></div>
  89. </div>
  90. <!-- 指标占比分析 -->
  91. <div class="chart-container">
  92. <h3 class="chart-title">指标占比分析</h3>
  93. <div id="leftProportionChart" class="chart"></div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <!-- VS对比图标 -->
  99. <div class="vs-container">
  100. <div class="vs-icon">VS</div>
  101. </div>
  102. <!-- 右侧面板 -->
  103. <div class="comparison-panel right-panel">
  104. <!-- 右侧搜索区域 -->
  105. <div class="search-section">
  106. <el-form :inline="true" :model="rightSearchForm" class="search-form">
  107. <el-form-item label="项目名称:">
  108. <el-select
  109. v-model="rightSearchForm.projectName"
  110. placeholder="请选择"
  111. style="width: 200px"
  112. >
  113. <el-option label="请选择" value=""></el-option>
  114. <!-- 这里可以根据实际数据动态加载选项 -->
  115. </el-select>
  116. </el-form-item>
  117. <el-form-item label="监审对象:">
  118. <el-select
  119. v-model="rightSearchForm.auditObject"
  120. placeholder="请选择"
  121. style="width: 200px"
  122. >
  123. <el-option label="请选择" value=""></el-option>
  124. <!-- 这里可以根据实际数据动态加载选项 -->
  125. </el-select>
  126. </el-form-item>
  127. <el-form-item label="计划年度:">
  128. <el-date-picker
  129. v-model="rightSearchForm.startYear"
  130. type="year"
  131. placeholder="开始年份"
  132. format="yyyy年"
  133. value-format="yyyy"
  134. style="width: 120px; margin-right: 10px"
  135. ></el-date-picker>
  136. <span style="margin: 0 5px">~</span>
  137. <el-date-picker
  138. v-model="rightSearchForm.endYear"
  139. type="year"
  140. placeholder="结束年份"
  141. format="yyyy年"
  142. value-format="yyyy"
  143. style="width: 120px"
  144. ></el-date-picker>
  145. </el-form-item>
  146. <el-form-item>
  147. <el-button type="primary" @click="handleRightQuery">
  148. 查询
  149. </el-button>
  150. <el-button style="margin-left: 10px" @click="handleRightReset">
  151. 重置
  152. </el-button>
  153. </el-form-item>
  154. </el-form>
  155. </div>
  156. <!-- 右侧数据项选择和图表 -->
  157. <div class="panel-content">
  158. <!-- 右侧数据项选择 -->
  159. <div class="data-selector">
  160. <div class="panel-title">请选择数据项后查看分析:</div>
  161. <el-tree
  162. ref="rightDataTree"
  163. :data="dataItems"
  164. show-checkbox
  165. node-key="id"
  166. :props="treeProps"
  167. :default-checked-keys="['1-6']"
  168. :default-expanded-keys="['1', '2']"
  169. @check="handleRightDataItemCheck"
  170. ></el-tree>
  171. </div>
  172. <!-- 右侧图表展示 -->
  173. <div class="chart-section">
  174. <!-- 指标趋势分析 -->
  175. <div class="chart-container">
  176. <h3 class="chart-title">指标趋势分析</h3>
  177. <div id="rightTrendChart" class="chart"></div>
  178. </div>
  179. <!-- 指标占比分析 -->
  180. <div class="chart-container">
  181. <h3 class="chart-title">指标占比分析</h3>
  182. <div id="rightProportionChart" class="chart"></div>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. </template>
  190. <script>
  191. import * as echarts from 'echarts'
  192. export default {
  193. name: 'IndustryAnalysis',
  194. data() {
  195. return {
  196. // 左侧搜索表单数据
  197. leftSearchForm: {
  198. projectName: '',
  199. auditObject: '',
  200. startYear: '2024',
  201. endYear: '2025',
  202. },
  203. // 右侧搜索表单数据
  204. rightSearchForm: {
  205. projectName: '',
  206. auditObject: '',
  207. startYear: '2024',
  208. endYear: '2025',
  209. },
  210. // 数据项树形结构
  211. dataItems: [
  212. {
  213. id: '1',
  214. label: '人员费用支出小计',
  215. children: [
  216. { id: '1-1', label: '基本工资' },
  217. { id: '1-2', label: '津贴' },
  218. { id: '1-3', label: '奖金' },
  219. { id: '1-4', label: '福利费' },
  220. { id: '1-5', label: '社会保障费' },
  221. { id: '1-6', label: '其他人员支出' },
  222. ],
  223. },
  224. {
  225. id: '2',
  226. label: '商品和服务支出小计',
  227. children: [
  228. { id: '2-1', label: '办公费' },
  229. { id: '2-2', label: '水电费' },
  230. { id: '2-3', label: '会议及培训费' },
  231. { id: '2-4', label: '交通和差旅费' },
  232. { id: '2-5', label: '招待费' },
  233. { id: '2-6', label: '印刷费' },
  234. { id: '2-7', label: '维修费' },
  235. { id: '2-8', label: '物业管理费' },
  236. { id: '2-9', label: '专用材料费' },
  237. { id: '2-10', label: '财务费' },
  238. { id: '2-11', label: '劳务费' },
  239. { id: '2-12', label: '租赁费' },
  240. { id: '2-13', label: '工会经费' },
  241. { id: '2-14', label: '其他支出' },
  242. ],
  243. },
  244. ],
  245. // 树形结构配置
  246. treeProps: {
  247. children: 'children',
  248. label: 'label',
  249. },
  250. // 左侧选中的数据项
  251. leftSelectedItems: [{ id: '1-6', label: '其他人员支出' }],
  252. // 右侧选中的数据项
  253. rightSelectedItems: [{ id: '1-6', label: '其他人员支出' }],
  254. // 左侧图表实例
  255. leftTrendChart: null,
  256. leftProportionChart: null,
  257. // 右侧图表实例
  258. rightTrendChart: null,
  259. rightProportionChart: null,
  260. // 左侧图表数据
  261. leftTrendData: {
  262. '1-6': [7, 7, 9.5], // 其他人员支出 2022-2024年数据
  263. },
  264. leftProportionData: {
  265. '1-1': 12.43, // 基本工资占比
  266. '1-2': 12.26, // 津贴占比
  267. '1-3': 16.87, // 奖金占比
  268. '1-4': 25.75, // 福利费占比
  269. '1-6': 32.68, // 其他人员支出占比
  270. },
  271. // 右侧图表数据
  272. rightTrendData: {
  273. '1-6': [7, 7, 9.5], // 其他人员支出 2022-2024年数据
  274. },
  275. rightProportionData: {
  276. '1-1': 12.43, // 基本工资占比
  277. '1-2': 12.26, // 津贴占比
  278. '1-3': 16.87, // 奖金占比
  279. '1-4': 25.75, // 福利费占比
  280. '1-6': 32.68, // 其他人员支出占比
  281. },
  282. }
  283. },
  284. mounted() {
  285. // 初始化图表
  286. this.initCharts()
  287. // 设置默认选中状态
  288. setTimeout(() => {
  289. if (this.$refs.leftDataTree) {
  290. this.$refs.leftDataTree.setCheckedKeys(['1-6'])
  291. }
  292. if (this.$refs.rightDataTree) {
  293. this.$refs.rightDataTree.setCheckedKeys(['1-6'])
  294. }
  295. }, 100)
  296. // 监听窗口大小变化,调整图表大小
  297. window.addEventListener('resize', this.handleResize)
  298. },
  299. beforeDestroy() {
  300. // 清理图表实例
  301. if (this.leftTrendChart) {
  302. this.leftTrendChart.dispose()
  303. }
  304. if (this.leftProportionChart) {
  305. this.leftProportionChart.dispose()
  306. }
  307. if (this.rightTrendChart) {
  308. this.rightTrendChart.dispose()
  309. }
  310. if (this.rightProportionChart) {
  311. this.rightProportionChart.dispose()
  312. }
  313. // 移除事件监听
  314. window.removeEventListener('resize', this.handleResize)
  315. },
  316. methods: {
  317. // 初始化图表
  318. initCharts() {
  319. // 初始化左侧图表
  320. this.leftTrendChart = echarts.init(
  321. document.getElementById('leftTrendChart')
  322. )
  323. this.leftProportionChart = echarts.init(
  324. document.getElementById('leftProportionChart')
  325. )
  326. // 初始化右侧图表
  327. this.rightTrendChart = echarts.init(
  328. document.getElementById('rightTrendChart')
  329. )
  330. this.rightProportionChart = echarts.init(
  331. document.getElementById('rightProportionChart')
  332. )
  333. // 设置默认图表数据
  334. this.updateLeftTrendChart()
  335. this.updateLeftProportionChart()
  336. this.updateRightTrendChart()
  337. this.updateRightProportionChart()
  338. },
  339. // 更新左侧趋势图
  340. updateLeftTrendChart() {
  341. const option = {
  342. tooltip: {
  343. trigger: 'axis',
  344. formatter: '{b}<br/>{a}: {c}',
  345. },
  346. grid: {
  347. left: '3%',
  348. right: '4%',
  349. bottom: '3%',
  350. containLabel: true,
  351. },
  352. xAxis: {
  353. type: 'category',
  354. boundaryGap: false,
  355. data: ['2022年', '2023年', '2024年'],
  356. axisLine: {
  357. lineStyle: {
  358. color: '#333',
  359. },
  360. },
  361. },
  362. yAxis: {
  363. type: 'value',
  364. min: 6.5,
  365. max: 10,
  366. interval: 0.5,
  367. axisLine: {
  368. lineStyle: {
  369. color: '#333',
  370. },
  371. },
  372. axisTick: {
  373. show: false,
  374. },
  375. },
  376. series: [
  377. {
  378. name: '其他人员支出',
  379. type: 'line',
  380. data: [7, 7, 9.5],
  381. lineStyle: {
  382. width: 2,
  383. color: '#37A2DA',
  384. },
  385. symbol: 'circle',
  386. symbolSize: 8,
  387. itemStyle: {
  388. color: '#37A2DA',
  389. },
  390. emphasis: {
  391. focus: 'series',
  392. },
  393. },
  394. ],
  395. }
  396. this.leftTrendChart.setOption(option)
  397. },
  398. // 更新右侧趋势图
  399. updateRightTrendChart() {
  400. const option = {
  401. tooltip: {
  402. trigger: 'axis',
  403. formatter: '{b}<br/>{a}: {c}',
  404. },
  405. grid: {
  406. left: '3%',
  407. right: '4%',
  408. bottom: '3%',
  409. containLabel: true,
  410. },
  411. xAxis: {
  412. type: 'category',
  413. boundaryGap: false,
  414. data: ['2022年', '2023年', '2024年'],
  415. axisLine: {
  416. lineStyle: {
  417. color: '#333',
  418. },
  419. },
  420. },
  421. yAxis: {
  422. type: 'value',
  423. min: 6.5,
  424. max: 10,
  425. interval: 0.5,
  426. axisLine: {
  427. lineStyle: {
  428. color: '#333',
  429. },
  430. },
  431. axisTick: {
  432. show: false,
  433. },
  434. },
  435. series: [
  436. {
  437. name: '其他人员支出',
  438. type: 'line',
  439. data: [7, 7, 9.5],
  440. lineStyle: {
  441. width: 2,
  442. color: '#37A2DA',
  443. },
  444. symbol: 'circle',
  445. symbolSize: 8,
  446. itemStyle: {
  447. color: '#37A2DA',
  448. },
  449. emphasis: {
  450. focus: 'series',
  451. },
  452. },
  453. ],
  454. }
  455. this.rightTrendChart.setOption(option)
  456. },
  457. // 更新左侧占比图
  458. updateLeftProportionChart() {
  459. const option = {
  460. tooltip: {
  461. trigger: 'item',
  462. formatter: '{a} <br/>{b}: {c}%',
  463. },
  464. legend: {
  465. orient: 'horizontal',
  466. bottom: 10,
  467. left: 'center',
  468. data: ['基本工资', '津贴', '奖金', '福利费', '其他人员支出'],
  469. formatter: function (name) {
  470. const percentMap = {
  471. 基本工资: '12.43%',
  472. 津贴: '12.26%',
  473. 奖金: '16.87%',
  474. 福利费: '25.75%',
  475. 其他人员支出: '32.68%',
  476. }
  477. return `${name}: ${percentMap[name] || ''}`
  478. },
  479. },
  480. series: [
  481. {
  482. name: '指标占比',
  483. type: 'pie',
  484. radius: ['40%', '70%'],
  485. avoidLabelOverlap: false,
  486. itemStyle: {
  487. borderRadius: 10,
  488. borderColor: '#fff',
  489. borderWidth: 2,
  490. },
  491. label: {
  492. show: false,
  493. position: 'center',
  494. },
  495. emphasis: {
  496. label: {
  497. show: true,
  498. fontSize: 20,
  499. fontWeight: 'bold',
  500. },
  501. },
  502. labelLine: {
  503. show: false,
  504. },
  505. data: [
  506. {
  507. value: 12.43,
  508. name: '基本工资',
  509. itemStyle: { color: '#37A2DA' },
  510. },
  511. { value: 12.26, name: '津贴', itemStyle: { color: '#5470C6' } },
  512. { value: 16.87, name: '奖金', itemStyle: { color: '#91CC75' } },
  513. {
  514. value: 25.75,
  515. name: '福利费',
  516. itemStyle: { color: '#FAC858' },
  517. },
  518. {
  519. value: 32.68,
  520. name: '其他人员支出',
  521. itemStyle: { color: '#EE6666' },
  522. },
  523. ],
  524. },
  525. ],
  526. }
  527. this.leftProportionChart.setOption(option)
  528. },
  529. // 更新右侧占比图
  530. updateRightProportionChart() {
  531. const option = {
  532. tooltip: {
  533. trigger: 'item',
  534. formatter: '{a} <br/>{b}: {c}%',
  535. },
  536. legend: {
  537. orient: 'horizontal',
  538. bottom: 10,
  539. left: 'center',
  540. data: ['基本工资', '津贴', '奖金', '福利费', '其他人员支出'],
  541. formatter: function (name) {
  542. const percentMap = {
  543. 基本工资: '12.43%',
  544. 津贴: '12.26%',
  545. 奖金: '16.87%',
  546. 福利费: '25.75%',
  547. 其他人员支出: '32.68%',
  548. }
  549. return `${name}: ${percentMap[name] || ''}`
  550. },
  551. },
  552. series: [
  553. {
  554. name: '指标占比',
  555. type: 'pie',
  556. radius: ['40%', '70%'],
  557. avoidLabelOverlap: false,
  558. itemStyle: {
  559. borderRadius: 10,
  560. borderColor: '#fff',
  561. borderWidth: 2,
  562. },
  563. label: {
  564. show: false,
  565. position: 'center',
  566. },
  567. emphasis: {
  568. label: {
  569. show: true,
  570. fontSize: 20,
  571. fontWeight: 'bold',
  572. },
  573. },
  574. labelLine: {
  575. show: false,
  576. },
  577. data: [
  578. {
  579. value: 12.43,
  580. name: '基本工资',
  581. itemStyle: { color: '#37A2DA' },
  582. },
  583. { value: 12.26, name: '津贴', itemStyle: { color: '#5470C6' } },
  584. { value: 16.87, name: '奖金', itemStyle: { color: '#91CC75' } },
  585. {
  586. value: 25.75,
  587. name: '福利费',
  588. itemStyle: { color: '#FAC858' },
  589. },
  590. {
  591. value: 32.68,
  592. name: '其他人员支出',
  593. itemStyle: { color: '#EE6666' },
  594. },
  595. ],
  596. },
  597. ],
  598. }
  599. this.rightProportionChart.setOption(option)
  600. },
  601. // 处理左侧数据项选择
  602. handleLeftDataItemCheck() {
  603. // 获取选中的节点
  604. this.leftSelectedItems = this.$refs.leftDataTree.getCheckedNodes()
  605. // 更新左侧图表
  606. this.updateLeftChartsBySelection()
  607. },
  608. // 处理右侧数据项选择
  609. handleRightDataItemCheck() {
  610. // 获取选中的节点
  611. this.rightSelectedItems = this.$refs.rightDataTree.getCheckedNodes()
  612. // 更新右侧图表
  613. this.updateRightChartsBySelection()
  614. },
  615. // 根据选中的数据项更新左侧图表
  616. updateLeftChartsBySelection() {
  617. // 这里可以根据选中的数据项动态更新图表数据
  618. // 示例中使用了固定数据,实际应用中可以根据选中的项目从后端获取数据
  619. this.updateLeftTrendChart()
  620. this.updateLeftProportionChart()
  621. },
  622. // 根据选中的数据项更新右侧图表
  623. updateRightChartsBySelection() {
  624. // 这里可以根据选中的数据项动态更新图表数据
  625. // 示例中使用了固定数据,实际应用中可以根据选中的项目从后端获取数据
  626. this.updateRightTrendChart()
  627. this.updateRightProportionChart()
  628. },
  629. // 处理窗口大小变化
  630. handleResize() {
  631. // 调整左侧图表大小
  632. if (this.leftTrendChart) {
  633. this.leftTrendChart.resize()
  634. }
  635. if (this.leftProportionChart) {
  636. this.leftProportionChart.resize()
  637. }
  638. // 调整右侧图表大小
  639. if (this.rightTrendChart) {
  640. this.rightTrendChart.resize()
  641. }
  642. if (this.rightProportionChart) {
  643. this.rightProportionChart.resize()
  644. }
  645. },
  646. // 左侧查询按钮点击事件
  647. handleLeftQuery() {
  648. // 这里可以根据搜索条件从后端获取数据
  649. // 示例中使用了固定数据
  650. this.updateLeftChartsBySelection()
  651. },
  652. // 右侧查询按钮点击事件
  653. handleRightQuery() {
  654. // 这里可以根据搜索条件从后端获取数据
  655. // 示例中使用了固定数据
  656. this.updateRightChartsBySelection()
  657. },
  658. // 左侧重置按钮点击事件
  659. handleLeftReset() {
  660. // 重置左侧搜索表单
  661. this.leftSearchForm = {
  662. projectName: '',
  663. auditObject: '',
  664. startYear: '2024',
  665. endYear: '2025',
  666. }
  667. // 重置左侧树形选择
  668. if (this.$refs.leftDataTree) {
  669. this.$refs.leftDataTree.clearChecked()
  670. }
  671. // 重置左侧选中项
  672. this.leftSelectedItems = []
  673. // 重置左侧图表
  674. this.updateLeftTrendChart()
  675. this.updateLeftProportionChart()
  676. },
  677. // 右侧重置按钮点击事件
  678. handleRightReset() {
  679. // 重置右侧搜索表单
  680. this.rightSearchForm = {
  681. projectName: '',
  682. auditObject: '',
  683. startYear: '2024',
  684. endYear: '2025',
  685. }
  686. // 重置右侧树形选择
  687. if (this.$refs.rightDataTree) {
  688. this.$refs.rightDataTree.clearChecked()
  689. }
  690. // 重置右侧选中项
  691. this.rightSelectedItems = []
  692. // 重置右侧图表
  693. this.updateRightTrendChart()
  694. this.updateRightProportionChart()
  695. },
  696. },
  697. }
  698. </script>
  699. <style scoped lang="scss">
  700. .industry-analysis-container {
  701. padding: 20px;
  702. }
  703. .search-form {
  704. display: flex;
  705. align-items: center;
  706. flex-wrap: wrap;
  707. }
  708. .comparison-container {
  709. display: flex;
  710. gap: 0;
  711. position: relative;
  712. }
  713. .comparison-panel {
  714. flex: 1;
  715. display: flex;
  716. flex-direction: column;
  717. }
  718. .left-panel {
  719. border-right: 1px solid #e0e0e0;
  720. }
  721. .right-panel {
  722. border-left: none;
  723. }
  724. .panel-content {
  725. display: flex;
  726. gap: 20px;
  727. flex: 1;
  728. padding: 20px 0;
  729. }
  730. .data-selector {
  731. width: 250px;
  732. padding: 20px;
  733. }
  734. .chart-section {
  735. flex: 1;
  736. display: flex;
  737. flex-direction: column;
  738. gap: 20px;
  739. }
  740. .panel-title {
  741. font-size: 14px;
  742. font-weight: bold;
  743. margin-bottom: 15px;
  744. color: #333;
  745. }
  746. .chart-container {
  747. padding: 20px;
  748. }
  749. .chart-title {
  750. font-size: 16px;
  751. font-weight: bold;
  752. margin-bottom: 20px;
  753. color: #333;
  754. text-align: center;
  755. }
  756. .chart {
  757. width: 100%;
  758. height: 400px;
  759. }
  760. .search-section {
  761. padding: 20px;
  762. }
  763. .vs-container {
  764. position: absolute;
  765. top: 50%;
  766. left: 50%;
  767. transform: translate(-50%, -50%);
  768. z-index: 10;
  769. }
  770. .vs-icon {
  771. background-color: #ffa940;
  772. border: none;
  773. border-radius: 50%;
  774. width: 50px;
  775. height: 50px;
  776. display: flex;
  777. align-items: center;
  778. justify-content: center;
  779. font-size: 18px;
  780. font-weight: bold;
  781. color: #ffffff;
  782. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  783. }
  784. @media (max-width: 1400px) {
  785. .panel-content {
  786. flex-direction: column;
  787. }
  788. .data-selector {
  789. width: 100%;
  790. }
  791. .chart {
  792. height: 350px;
  793. }
  794. }
  795. @media (max-width: 1024px) {
  796. .comparison-container {
  797. flex-direction: column;
  798. }
  799. .left-panel {
  800. border-right: none;
  801. border-bottom: 1px solid #e0e0e0;
  802. margin-bottom: 20px;
  803. }
  804. .right-panel {
  805. border-left: none;
  806. }
  807. .vs-container {
  808. display: none;
  809. }
  810. .chart {
  811. height: 300px;
  812. }
  813. }
  814. </style>