index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730
  1. <template>
  2. <div class="app-container">
  3. <!-- 查询条件 -->
  4. <div class="filter-section">
  5. <el-card>
  6. <div class="filter-container">
  7. <el-form :model="queryParams" ref="queryFormRef" :inline="true" class="search-form">
  8. <el-form-item label="考核月份" prop="assessmentMonth">
  9. <el-date-picker v-model="queryParams.assessmentMonth" type="month" placeholder="请选择考核月份"
  10. value-format="YYYY-MM" style="width: 200px" />
  11. </el-form-item>
  12. <el-form-item>
  13. <el-button type="primary" icon="Search" @click="handleQuery">查询</el-button>
  14. <el-button icon="Refresh" @click="resetQuery">重置</el-button>
  15. </el-form-item>
  16. </el-form>
  17. <div class="export-button">
  18. <el-button type="warning" icon="Document" @click="handleExport">导出文档</el-button>
  19. </div>
  20. </div>
  21. </el-card>
  22. </div>
  23. <!-- 非干部月度考核分数汇总 -->
  24. <div class="main-section">
  25. <h2 class="section-title">非干部月度考核分数汇总</h2>
  26. <!-- 第一行:两个区块 -->
  27. <div class="chart-row">
  28. <!-- 整体分支分布柱状图 -->
  29. <el-card class="chart-card">
  30. <div class="chart-header">整体分支分布柱状图</div>
  31. <div ref="overallBarChart" class="chart-container"></div>
  32. </el-card>
  33. <!-- 参与人数占比饼图 -->
  34. <el-card class="chart-card">
  35. <div class="chart-header">参与人数占比饼图</div>
  36. <div ref="participantPieChart" class="chart-container"></div>
  37. </el-card>
  38. </div>
  39. <!-- 第二行:两个区块 -->
  40. <div class="chart-row">
  41. <!-- 各部门分支分布对比图 -->
  42. <el-card class="chart-card">
  43. <div class="chart-header">各部门分支分布对比图</div>
  44. <div ref="departmentComparisonChart" class="chart-container"></div>
  45. </el-card>
  46. <!-- 汇总表 -->
  47. <el-card class="chart-card">
  48. <div class="chart-header">汇总表</div>
  49. <el-table :data="summaryTableData" border style="width: 100%; margin-top: 10px;">
  50. <el-table-column prop="range" label="区间" align="center" min-width="100" />
  51. <el-table-column prop="simulationScore" label="2026年1月模拟分数汇总" align="center" min-width="150" />
  52. <el-table-column prop="team1" label="一队" align="center" min-width="100" />
  53. <el-table-column prop="team2" label="二队" align="center" min-width="100" />
  54. <el-table-column prop="team3" label="三队" align="center" min-width="100" />
  55. </el-table>
  56. </el-card>
  57. </div>
  58. </div>
  59. <!-- 非干部月度考核分类结果汇总 -->
  60. <div class="main-section">
  61. <h2 class="section-title">非干部月度考核分类结果汇总</h2>
  62. <!-- 汇总统计表格 -->
  63. <el-card class="summary-table-card">
  64. <div class="chart-header">汇总统计</div>
  65. <el-table :data="classificationTableData" border style="width: 100%; margin-top: 10px;">
  66. <el-table-column prop="assessmentGroup" label="考核组人数" align="center" min-width="120" />
  67. <el-table-column prop="calculatedImprovement" label="测算待改进人数" align="center" min-width="140" />
  68. <el-table-column prop="totalImprovement" label="待改进总人数" align="center" min-width="120" />
  69. <el-table-column prop="exemption1" label="豁免" align="center" min-width="80" />
  70. <el-table-column prop="actualImprovement" label="实际待改进总人数" align="center" min-width="140" />
  71. <el-table-column prop="totalUnqualified" label="不称职总人数" align="center" min-width="120" />
  72. <el-table-column prop="exemption2" label="豁免" align="center" min-width="80" />
  73. <el-table-column prop="actualUnqualified" label="实际不称职人数" align="center" min-width="140" />
  74. </el-table>
  75. </el-card>
  76. <!-- 第四行:两个区块 -->
  77. <div class="chart-row">
  78. <!-- 大队分布统计图 -->
  79. <el-card class="chart-card">
  80. <div class="chart-header">大队分布统计图</div>
  81. <div class="pie-charts-container">
  82. <div ref="brigadePieChart1" class="pie-chart"></div>
  83. <div ref="brigadePieChart2" class="pie-chart"></div>
  84. </div>
  85. </el-card>
  86. <!-- 岗位分布统计图 -->
  87. <el-card class="chart-card">
  88. <div class="chart-header">岗位分布统计图</div>
  89. <div class="pie-charts-container">
  90. <div ref="positionPieChart1" class="pie-chart"></div>
  91. <div ref="positionPieChart2" class="pie-chart"></div>
  92. </div>
  93. </el-card>
  94. </div>
  95. </div>
  96. <!-- 第一个遍历:表格和两个饼状图 -->
  97. <div class="traversal-section">
  98. <div v-for="(item, index) in traversalData1" :key="index" class="traversal-container">
  99. <div class="traversal-header">{{ item.title }}</div>
  100. <div class="traversal-content">
  101. <!-- 左边表格 -->
  102. <div class="table-section">
  103. <el-table :data="item.tableData" border style="width: 100%;">
  104. <el-table-column prop="brigade" label="大队" align="center" min-width="100" />
  105. <el-table-column prop="assessmentGroup" label="考核组" align="center" min-width="100" />
  106. <el-table-column prop="groupCount" label="考核组人数" align="center" min-width="120" />
  107. <el-table-column prop="calculatedImprovement" label="测算待改进人数" align="center" min-width="140" />
  108. <el-table-column prop="improvementCount" label="待改进人数" align="center" min-width="120" />
  109. <el-table-column prop="exemption1" label="豁免" align="center" min-width="80" />
  110. <el-table-column prop="actualImprovement" label="实际待改进人数" align="center" min-width="140" />
  111. <el-table-column prop="unqualifiedCount" label="不称职人数" align="center" min-width="120" />
  112. <el-table-column prop="exemption2" label="豁免" align="center" min-width="80" />
  113. <el-table-column prop="actualUnqualified" label="实际不称职人数" align="center" min-width="140" />
  114. </el-table>
  115. </div>
  116. <!-- 右边两个饼状图 -->
  117. <div class="chart-section">
  118. <div class="pie-chart-container">
  119. <div class="pie-chart-title">考核结果分布</div>
  120. <div :ref="el => setTraversalChartRef(el, `pieChart1_${index}`)" class="pie-chart"></div>
  121. </div>
  122. <div class="pie-chart-container">
  123. <div class="pie-chart-title">改进情况分布</div>
  124. <div :ref="el => setTraversalChartRef(el, `pieChart2_${index}`)" class="pie-chart"></div>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. <!-- 第二个遍历:表格、柱状图和饼状图 -->
  131. <div class="traversal-section">
  132. <div v-for="(item, index) in traversalData2" :key="index" class="traversal-container">
  133. <div class="traversal-header">{{ item.title }}</div>
  134. <div class="traversal-content">
  135. <!-- 左边表格 -->
  136. <div class="table-section">
  137. <el-table :data="item.tableData" border style="width: 100%;">
  138. <el-table-column prop="brigade" label="大队" align="center" min-width="100" />
  139. <el-table-column prop="assessmentGroup" label="考核组" align="center" min-width="100" />
  140. <el-table-column prop="groupCount" label="考核组人数" align="center" min-width="120" />
  141. <el-table-column prop="calculatedImprovement" label="测算待改进人数" align="center" min-width="140" />
  142. <el-table-column prop="improvementCount" label="待改进人数" align="center" min-width="120" />
  143. <el-table-column prop="exemption1" label="豁免" align="center" min-width="80" />
  144. <el-table-column prop="actualImprovement" label="实际待改进人数" align="center" min-width="140" />
  145. <el-table-column prop="unqualifiedCount" label="不称职人数" align="center" min-width="120" />
  146. <el-table-column prop="exemption2" label="豁免" align="center" min-width="80" />
  147. <el-table-column prop="actualUnqualified" label="实际不称职人数" align="center" min-width="140" />
  148. </el-table>
  149. </div>
  150. <!-- 右边柱状图和饼状图 -->
  151. <div class="chart-section">
  152. <div class="bar-chart-container">
  153. <div class="chart-title">考核分数分布</div>
  154. <div :ref="el => setTraversalChartRef(el, `barChart_${index}`)" class="bar-chart"></div>
  155. </div>
  156. <div class="pie-chart-container">
  157. <div class="pie-chart-title">岗位分布</div>
  158. <div :ref="el => setTraversalChartRef(el, `pieChart3_${index}`)" class="pie-chart"></div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. </template>
  166. <script setup>
  167. import { ref, reactive, onMounted, nextTick } from 'vue'
  168. import { ElMessage } from 'element-plus'
  169. import * as echarts from 'echarts'
  170. // API导入
  171. import { getNonCadreMonthlyScoreSum } from '@/api/performance/nonCadreMonthlyScoreSum.js'
  172. // 响应式数据
  173. const loading = ref(false)
  174. const queryFormRef = ref()
  175. // 查询参数
  176. const queryParams = reactive({
  177. assessmentMonth: ''
  178. })
  179. // 图表引用
  180. const overallBarChart = ref(null)
  181. const participantPieChart = ref(null)
  182. const departmentComparisonChart = ref(null)
  183. const brigadePieChart1 = ref(null)
  184. const brigadePieChart2 = ref(null)
  185. const positionPieChart1 = ref(null)
  186. const positionPieChart2 = ref(null)
  187. // 遍历图表引用
  188. const traversalChartsRefs = ref({})
  189. // 表格数据
  190. const summaryTableData = ref([
  191. { range: '90-100分', simulationScore: '85', team1: '15', team2: '20', team3: '25' },
  192. { range: '80-89分', simulationScore: '120', team1: '30', team2: '35', team3: '40' },
  193. { range: '70-79分', simulationScore: '95', team1: '25', team2: '30', team3: '35' },
  194. { range: '60-69分', simulationScore: '60', team1: '15', team2: '20', team3: '25' },
  195. { range: '60分以下', simulationScore: '20', team1: '5', team2: '8', team3: '7' }
  196. ])
  197. const classificationTableData = ref([
  198. {
  199. assessmentGroup: '100',
  200. calculatedImprovement: '15',
  201. totalImprovement: '12',
  202. exemption1: '2',
  203. actualImprovement: '10',
  204. totalUnqualified: '5',
  205. exemption2: '1',
  206. actualUnqualified: '4'
  207. }
  208. ])
  209. // 遍历数据
  210. const traversalData1 = ref([
  211. {
  212. title: '大队考核统计',
  213. tableData: [
  214. { brigade: '一大队', assessmentGroup: '一组', groupCount: 50, calculatedImprovement: 8, improvementCount: 6, exemption1: 1, actualImprovement: 5, unqualifiedCount: 2, exemption2: 0, actualUnqualified: 2 },
  215. { brigade: '一大队', assessmentGroup: '二组', groupCount: 45, calculatedImprovement: 7, improvementCount: 5, exemption1: 1, actualImprovement: 4, unqualifiedCount: 1, exemption2: 0, actualUnqualified: 1 },
  216. { brigade: '二大队', assessmentGroup: '一组', groupCount: 55, calculatedImprovement: 9, improvementCount: 7, exemption1: 1, actualImprovement: 6, unqualifiedCount: 3, exemption2: 1, actualUnqualified: 2 },
  217. { brigade: '二大队', assessmentGroup: '二组', groupCount: 48, calculatedImprovement: 6, improvementCount: 5, exemption1: 0, actualImprovement: 5, unqualifiedCount: 2, exemption2: 0, actualUnqualified: 2 }
  218. ]
  219. }
  220. ])
  221. const traversalData2 = ref([
  222. {
  223. title: '岗位考核统计',
  224. tableData: [
  225. { brigade: '安检员', assessmentGroup: '一组', groupCount: 60, calculatedImprovement: 10, improvementCount: 8, exemption1: 1, actualImprovement: 7, unqualifiedCount: 3, exemption2: 0, actualUnqualified: 3 },
  226. { brigade: '安检员', assessmentGroup: '二组', groupCount: 55, calculatedImprovement: 8, improvementCount: 6, exemption1: 1, actualImprovement: 5, unqualifiedCount: 2, exemption2: 0, actualUnqualified: 2 },
  227. { brigade: '设备操作员', assessmentGroup: '一组', groupCount: 40, calculatedImprovement: 5, improvementCount: 4, exemption1: 0, actualImprovement: 4, unqualifiedCount: 1, exemption2: 0, actualUnqualified: 1 }
  228. ]
  229. }
  230. ])
  231. // 图表实例
  232. let overallBarChartInstance = null
  233. let participantPieChartInstance = null
  234. let departmentComparisonChartInstance = null
  235. let brigadePieChart1Instance = null
  236. let brigadePieChart2Instance = null
  237. let positionPieChart1Instance = null
  238. let positionPieChart2Instance = null
  239. // 初始化图表
  240. const initCharts = () => {
  241. nextTick(() => {
  242. // 整体分支分布柱状图
  243. if (overallBarChart.value) {
  244. overallBarChartInstance = echarts.init(overallBarChart.value)
  245. overallBarChartInstance.setOption({
  246. tooltip: { trigger: 'axis' },
  247. xAxis: { type: 'category', data: ['90-100分', '80-89分', '70-79分', '60-69分', '60分以下'] },
  248. yAxis: { type: 'value' },
  249. series: [{ type: 'bar', data: [85, 120, 95, 60, 20], itemStyle: { color: '#3b82f6' } }]
  250. })
  251. }
  252. // 参与人数占比饼图
  253. if (participantPieChart.value) {
  254. participantPieChartInstance = echarts.init(participantPieChart.value)
  255. participantPieChartInstance.setOption({
  256. tooltip: { trigger: 'item' },
  257. series: [{
  258. type: 'pie',
  259. radius: '70%',
  260. data: [
  261. { value: 380, name: '参与考核' },
  262. { value: 20, name: '未参与考核' }
  263. ]
  264. }]
  265. })
  266. }
  267. // 各部门分支分布对比图
  268. if (departmentComparisonChart.value) {
  269. departmentComparisonChartInstance = echarts.init(departmentComparisonChart.value)
  270. departmentComparisonChartInstance.setOption({
  271. tooltip: { trigger: 'axis' },
  272. legend: { data: ['一队', '二队', '三队'] },
  273. xAxis: { type: 'category', data: ['90-100分', '80-89分', '70-79分', '60-69分', '60分以下'] },
  274. yAxis: { type: 'value' },
  275. series: [
  276. { name: '一队', type: 'bar', data: [15, 30, 25, 15, 5] },
  277. { name: '二队', type: 'bar', data: [20, 35, 30, 20, 8] },
  278. { name: '三队', type: 'bar', data: [25, 40, 35, 25, 7] }
  279. ]
  280. })
  281. }
  282. // 大队分布饼图1
  283. if (brigadePieChart1.value) {
  284. brigadePieChart1Instance = echarts.init(brigadePieChart1.value)
  285. brigadePieChart1Instance.setOption({
  286. tooltip: { trigger: 'item' },
  287. series: [{
  288. type: 'pie',
  289. radius: '70%',
  290. data: [
  291. { value: 120, name: '一队' },
  292. { value: 150, name: '二队' },
  293. { value: 130, name: '三队' }
  294. ]
  295. }]
  296. })
  297. }
  298. // 大队分布饼图2
  299. if (brigadePieChart2.value) {
  300. brigadePieChart2Instance = echarts.init(brigadePieChart2.value)
  301. brigadePieChart2Instance.setOption({
  302. tooltip: { trigger: 'item' },
  303. series: [{
  304. type: 'pie',
  305. radius: '70%',
  306. data: [
  307. { value: 45, name: '优秀' },
  308. { value: 280, name: '合格' },
  309. { value: 75, name: '待改进' }
  310. ]
  311. }]
  312. })
  313. }
  314. // 岗位分布饼图1
  315. if (positionPieChart1.value) {
  316. positionPieChart1Instance = echarts.init(positionPieChart1.value)
  317. positionPieChart1Instance.setOption({
  318. tooltip: { trigger: 'item' },
  319. series: [{
  320. type: 'pie',
  321. radius: '70%',
  322. data: [
  323. { value: 150, name: '安检员' },
  324. { value: 120, name: '设备操作员' },
  325. { value: 80, name: '管理人员' },
  326. { value: 50, name: '其他' }
  327. ]
  328. }]
  329. })
  330. }
  331. // 岗位分布饼图2
  332. if (positionPieChart2.value) {
  333. positionPieChart2Instance = echarts.init(positionPieChart2.value)
  334. positionPieChart2Instance.setOption({
  335. tooltip: { trigger: 'item' },
  336. series: [{
  337. type: 'pie',
  338. radius: '70%',
  339. data: [
  340. { value: 35, name: '优秀' },
  341. { value: 320, name: '合格' },
  342. { value: 45, name: '待改进' }
  343. ]
  344. }]
  345. })
  346. }
  347. })
  348. }
  349. // 设置遍历图表引用
  350. const setTraversalChartRef = (el, key) => {
  351. if (el) {
  352. traversalChartsRefs.value[key] = el
  353. }
  354. }
  355. // 初始化遍历图表
  356. const initTraversalCharts = () => {
  357. nextTick(() => {
  358. // 第一个遍历的饼状图
  359. traversalData1.value.forEach((item, index) => {
  360. // 饼状图1:考核结果分布
  361. const pieChart1Key = `pieChart1_${index}`
  362. if (traversalChartsRefs.value[pieChart1Key]) {
  363. const pieChart1 = echarts.init(traversalChartsRefs.value[pieChart1Key])
  364. pieChart1.setOption({
  365. tooltip: { trigger: 'item' },
  366. series: [{
  367. type: 'pie',
  368. radius: '70%',
  369. data: [
  370. { value: 120, name: '优秀' },
  371. { value: 280, name: '合格' },
  372. { value: 75, name: '待改进' }
  373. ]
  374. }]
  375. })
  376. }
  377. // 饼状图2:改进情况分布
  378. const pieChart2Key = `pieChart2_${index}`
  379. if (traversalChartsRefs.value[pieChart2Key]) {
  380. const pieChart2 = echarts.init(traversalChartsRefs.value[pieChart2Key])
  381. pieChart2.setOption({
  382. tooltip: { trigger: 'item' },
  383. series: [{
  384. type: 'pie',
  385. radius: '70%',
  386. data: [
  387. { value: 15, name: '已改进' },
  388. { value: 60, name: '待改进' },
  389. { value: 5, name: '未改进' }
  390. ]
  391. }]
  392. })
  393. }
  394. })
  395. // 第二个遍历的图表
  396. traversalData2.value.forEach((item, index) => {
  397. // 柱状图:考核分数分布
  398. const barChartKey = `barChart_${index}`
  399. if (traversalChartsRefs.value[barChartKey]) {
  400. const barChart = echarts.init(traversalChartsRefs.value[barChartKey])
  401. barChart.setOption({
  402. tooltip: { trigger: 'axis' },
  403. xAxis: { type: 'category', data: ['90-100分', '80-89分', '70-79分', '60-69分', '60分以下'] },
  404. yAxis: { type: 'value' },
  405. series: [{ type: 'bar', data: [85, 120, 95, 60, 20], itemStyle: { color: '#3b82f6' } }]
  406. })
  407. }
  408. // 饼状图:岗位分布
  409. const pieChart3Key = `pieChart3_${index}`
  410. if (traversalChartsRefs.value[pieChart3Key]) {
  411. const pieChart3 = echarts.init(traversalChartsRefs.value[pieChart3Key])
  412. pieChart3.setOption({
  413. tooltip: { trigger: 'item' },
  414. series: [{
  415. type: 'pie',
  416. radius: '70%',
  417. data: [
  418. { value: 150, name: '安检员' },
  419. { value: 120, name: '设备操作员' },
  420. { value: 80, name: '管理人员' },
  421. { value: 50, name: '其他' }
  422. ]
  423. }]
  424. })
  425. }
  426. })
  427. })
  428. }
  429. // 窗口大小变化时重绘图表
  430. const handleResize = () => {
  431. const charts = [
  432. overallBarChartInstance,
  433. participantPieChartInstance,
  434. departmentComparisonChartInstance,
  435. brigadePieChart1Instance,
  436. brigadePieChart2Instance,
  437. positionPieChart1Instance,
  438. positionPieChart2Instance
  439. ]
  440. charts.forEach(chart => {
  441. if (chart) chart.resize()
  442. })
  443. }
  444. // 获取数据
  445. const getList = async () => {
  446. loading.value = true
  447. try {
  448. const res = await getNonCadreMonthlyScoreSum(queryParams)
  449. // 这里可以根据实际API返回的数据更新图表和表格数据
  450. console.log('获取汇总数据:', res)
  451. } catch (error) {
  452. console.error('获取汇总数据失败:', error)
  453. ElMessage.error('获取汇总数据失败')
  454. } finally {
  455. loading.value = false
  456. }
  457. }
  458. // 查询
  459. const handleQuery = () => {
  460. getList()
  461. }
  462. // 重置查询
  463. const resetQuery = () => {
  464. queryFormRef.value?.resetFields()
  465. getList()
  466. }
  467. // 导出
  468. const handleExport = async () => {
  469. try {
  470. ElMessage.success('导出功能开发中')
  471. } catch (error) {
  472. ElMessage.error('导出失败')
  473. }
  474. }
  475. onMounted(() => {
  476. initCharts()
  477. initTraversalCharts()
  478. window.addEventListener('resize', handleResize)
  479. getList()
  480. })
  481. // 组件卸载时移除事件监听器
  482. onUnmounted(() => {
  483. window.removeEventListener('resize', handleResize)
  484. // 销毁图表实例
  485. const charts = [
  486. overallBarChartInstance,
  487. participantPieChartInstance,
  488. departmentComparisonChartInstance,
  489. brigadePieChart1Instance,
  490. brigadePieChart2Instance,
  491. positionPieChart1Instance,
  492. positionPieChart2Instance
  493. ]
  494. charts.forEach(chart => {
  495. if (chart) chart.dispose()
  496. })
  497. })
  498. </script>
  499. <style lang="less" scoped>
  500. .app-container {
  501. padding: 20px;
  502. }
  503. .filter-section {
  504. margin-bottom: 20px;
  505. }
  506. .filter-container {
  507. display: flex;
  508. justify-content: space-between;
  509. align-items: center;
  510. }
  511. .search-form {
  512. display: flex;
  513. align-items: center;
  514. gap: 10px;
  515. }
  516. .export-button {
  517. margin-left: auto;
  518. }
  519. .main-section {
  520. margin-bottom: 30px;
  521. }
  522. .section-title {
  523. font-size: 20px;
  524. font-weight: bold;
  525. color: #333;
  526. margin-bottom: 20px;
  527. text-align: center;
  528. }
  529. .chart-row {
  530. display: grid;
  531. grid-template-columns: 1fr 1fr;
  532. gap: 20px;
  533. margin-bottom: 20px;
  534. }
  535. .chart-card {
  536. height: 400px;
  537. }
  538. .summary-table-card {
  539. margin-bottom: 20px;
  540. }
  541. .chart-header {
  542. font-size: 16px;
  543. font-weight: 600;
  544. color: #333;
  545. margin-bottom: 10px;
  546. text-align: center;
  547. }
  548. .chart-container {
  549. width: 100%;
  550. height: 350px;
  551. }
  552. .pie-charts-container {
  553. display: grid;
  554. grid-template-columns: 1fr 1fr;
  555. gap: 10px;
  556. height: 350px;
  557. }
  558. .pie-chart {
  559. width: 100%;
  560. height: 100%;
  561. }
  562. :deep(.el-table) {
  563. .el-table__header th {
  564. background-color: #f5f7fa;
  565. font-weight: 600;
  566. }
  567. }
  568. /* 遍历样式 */
  569. .traversal-section {
  570. margin-bottom: 30px;
  571. }
  572. .traversal-container {
  573. border: 1px solid #dcdfe6;
  574. border-radius: 8px;
  575. overflow: hidden;
  576. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  577. margin-bottom: 20px;
  578. }
  579. .traversal-header {
  580. background-color: #f5f7fa;
  581. padding: 15px 20px;
  582. font-size: 18px;
  583. font-weight: 600;
  584. color: #303133;
  585. border-bottom: 1px solid #dcdfe6;
  586. text-align: left;
  587. }
  588. .traversal-content {
  589. display: grid;
  590. grid-template-columns: 1fr 1fr;
  591. gap: 20px;
  592. padding: 20px;
  593. }
  594. .table-section {
  595. min-height: 400px;
  596. }
  597. .chart-section {
  598. display: grid;
  599. grid-template-columns: 1fr 1fr;
  600. gap: 15px;
  601. height: 400px;
  602. }
  603. .pie-chart-container, .bar-chart-container {
  604. display: flex;
  605. flex-direction: column;
  606. border: 1px solid #e4e7ed;
  607. border-radius: 6px;
  608. padding: 10px;
  609. background-color: #fff;
  610. }
  611. .pie-chart-title, .chart-title {
  612. font-size: 14px;
  613. font-weight: 600;
  614. color: #606266;
  615. margin-bottom: 10px;
  616. text-align: center;
  617. }
  618. .pie-chart, .bar-chart {
  619. flex: 1;
  620. min-height: 300px;
  621. }
  622. /* 响应式布局 */
  623. @media (max-width: 1200px) {
  624. .chart-row {
  625. grid-template-columns: 1fr;
  626. }
  627. .pie-charts-container {
  628. grid-template-columns: 1fr;
  629. }
  630. .traversal-content {
  631. grid-template-columns: 1fr;
  632. gap: 15px;
  633. }
  634. .chart-section {
  635. grid-template-columns: 1fr;
  636. height: auto;
  637. }
  638. .pie-chart, .bar-chart {
  639. min-height: 250px;
  640. }
  641. }
  642. @media (max-width: 768px) {
  643. .traversal-content {
  644. padding: 15px;
  645. }
  646. .chart-section {
  647. gap: 10px;
  648. }
  649. .pie-chart-container, .bar-chart-container {
  650. padding: 8px;
  651. }
  652. }
  653. </style>