Index.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381
  1. <template>
  2. <!-- 第一行:统计卡片行 -->
  3. <div class="page-container">
  4. <el-row :gutter="16" class="summary">
  5. <!-- 原有的统计卡片部分保持不变 -->
  6. <el-col :sm="3" :xs="12">
  7. <SummaryCard
  8. :value="device.total || 0"
  9. icon="fa-solid:project-diagram"
  10. icon-bg-color="text-blue-500"
  11. icon-color="bg-blue-100"
  12. :title="t('stat.deviceCount')"
  13. />
  14. </el-col>
  15. <el-col :sm="3" :xs="12">
  16. <SummaryCard
  17. :value="maintain.total || 0"
  18. icon="fa-solid:list"
  19. icon-bg-color="text-pink-500"
  20. icon-color="bg-blue-100"
  21. :title="t('stat.maintenanceOrder')"
  22. />
  23. </el-col>
  24. <el-col :sm="3" :xs="12">
  25. <SummaryCard
  26. :value="fill.unfilledCount || 0"
  27. icon="fa-solid:times-circle"
  28. icon-bg-color="text-purple-500"
  29. icon-color="bg-purple-100"
  30. :title="t('stat.operationNotFilled')"
  31. />
  32. </el-col>
  33. <el-col :sm="3" :xs="12">
  34. <SummaryCard
  35. :value="fill.filledCount || 0"
  36. icon="fa-solid:award"
  37. icon-bg-color="text-purple-500"
  38. icon-color="bg-purple-100"
  39. :title="t('stat.operationFilled')"
  40. />
  41. </el-col>
  42. <el-col :sm="3" :xs="12">
  43. <SummaryCard
  44. :value="by.todo || 0"
  45. icon="fa-solid:times-circle"
  46. icon-bg-color="text-green-500"
  47. icon-color="bg-green-100"
  48. :title="t('stat.notMaintained')"
  49. />
  50. </el-col>
  51. <el-col :sm="3" :xs="12">
  52. <SummaryCard
  53. :value="by.finished || 0"
  54. icon="fa-solid:award"
  55. icon-bg-color="text-green-500"
  56. icon-color="bg-green-100"
  57. :title="t('stat.maintained')"
  58. />
  59. </el-col>
  60. <el-col :sm="3" :xs="12">
  61. <SummaryCard
  62. :value="inspectt.todo || 0"
  63. icon="fa-solid:times-circle"
  64. icon-bg-color="text-yellow-500"
  65. icon-color="bg-yellow-100"
  66. :title="t('stat.notInspected')"
  67. />
  68. </el-col>
  69. <el-col :sm="3" :xs="12">
  70. <SummaryCard
  71. :value="inspectt.finished || 0"
  72. icon="fa-solid:award"
  73. icon-bg-color="text-yellow-500"
  74. icon-color="bg-yellow-100"
  75. :title="t('stat.inspected')"
  76. />
  77. </el-col>
  78. <!-- 其他统计卡片... -->
  79. </el-row>
  80. <!-- <el-row :gutter="16" class="mb-4">-->
  81. <!-- <el-col :span="6">-->
  82. <!-- <el-card class="stat-card" shadow="never">-->
  83. <!-- <div class="flex flex-col">-->
  84. <!-- <div class="flex justify-between items-center mb-1">-->
  85. <!-- <span class="text-gray-500 text-base font-medium">设备数量</span>-->
  86. <!-- <Icon icon="ep:menu" class="text-[32px] text-blue-400" />-->
  87. <!-- </div>-->
  88. <!-- <span class="text-3xl font-bold text-gray-700">-->
  89. <!-- {{ device.total }}-->
  90. <!-- </span>-->
  91. <!-- <el-divider class="my-2" />-->
  92. <!-- <div class="flex justify-between items-center text-gray-400 text-sm">-->
  93. <!-- <span>今日新增</span>-->
  94. <!-- <span class="text-green-500">+{{ device.today }}</span>-->
  95. <!-- </div>-->
  96. <!-- </div>-->
  97. <!-- </el-card>-->
  98. <!-- </el-col>-->
  99. <!-- <el-col :span="6">-->
  100. <!-- <el-card class="stat-card" shadow="never">-->
  101. <!-- <div class="flex flex-col">-->
  102. <!-- <div class="flex justify-between items-center mb-1">-->
  103. <!-- <span class="text-gray-500 text-base font-medium">维修工单数量</span>-->
  104. <!-- <Icon icon="ep:box" class="text-[32px] text-orange-400" />-->
  105. <!-- </div>-->
  106. <!-- <span class="text-3xl font-bold text-gray-700">{{ maintain.total }}</span>-->
  107. <!-- <el-divider class="my-2" />-->
  108. <!-- <div class="flex justify-between items-center text-gray-400 text-sm">-->
  109. <!-- <span>今日新增</span>-->
  110. <!-- <span class="text-green-500">+{{ maintain.today }}</span>-->
  111. <!-- </div>-->
  112. <!-- </div>-->
  113. <!-- </el-card>-->
  114. <!-- </el-col>-->
  115. <!-- <el-col :span="6">-->
  116. <!-- <el-card class="stat-card" shadow="never">-->
  117. <!-- <div class="flex flex-col">-->
  118. <!-- <div class="flex justify-between items-center mb-1">-->
  119. <!-- <span class="text-gray-500 text-base font-medium">保养工单数量</span>-->
  120. <!-- <Icon icon="ep:cpu" class="text-[32px] text-purple-400" />-->
  121. <!-- </div>-->
  122. <!-- <span class="text-3xl font-bold text-gray-700">{{ work.total }}</span>-->
  123. <!-- <el-divider class="my-2" />-->
  124. <!-- <div class="flex justify-between items-center text-gray-400 text-sm">-->
  125. <!-- <span>今日新增</span>-->
  126. <!-- <span class="text-green-500">+{{ work.today }}</span>-->
  127. <!-- </div>-->
  128. <!-- </div>-->
  129. <!-- </el-card>-->
  130. <!-- </el-col>-->
  131. <!-- <el-col :span="6">-->
  132. <!-- <el-card class="stat-card" shadow="never">-->
  133. <!-- <div class="flex flex-col">-->
  134. <!-- <div class="flex justify-between items-center mb-1">-->
  135. <!-- <span class="text-gray-500 text-base font-medium">巡检工单数量</span>-->
  136. <!-- <Icon icon="ep:camera" class="text-[32px] text-teal-400" />-->
  137. <!-- </div>-->
  138. <!-- <span class="text-3xl font-bold text-gray-700">-->
  139. <!-- {{ inspect.total }}-->
  140. <!-- </span>-->
  141. <!-- <el-divider class="my-2" />-->
  142. <!-- <div class="flex justify-between items-center text-gray-400 text-sm">-->
  143. <!-- <span>今日新增</span>-->
  144. <!-- <span class="text-green-500">+{{ inspect.today }}</span>-->
  145. <!-- </div>-->
  146. <!-- </div>-->
  147. <!-- </el-card>-->
  148. <!-- </el-col>-->
  149. <!-- </el-row>-->
  150. <!-- 第二行:图表行 -->
  151. <el-row :gutter="16" class="mb-4">
  152. <el-col :span="6">
  153. <el-card class="chart-card" shadow="never">
  154. <template #header>
  155. <div class="flex items-center justify-between">
  156. <span class="text-base font-medium" style="color: #b6c8da">{{ t('stat.mttr') }}</span>
  157. <span class="text-base font-medium" style="color: #b6c8da">{{
  158. t('stat.materialsUnderInventory')
  159. }}</span>
  160. </div>
  161. </template>
  162. <div class="flex flex-col h-[250px]">
  163. <!-- <div class="flex justify-between items-center text-gray-400">-->
  164. <!-- <span>MTTR</span>-->
  165. <!-- </div>-->
  166. <!-- <el-divider />-->
  167. <div class="flex justify-between items-center mb-1 mt-15">
  168. <!-- <span class="text-gray-500 text-base font-medium">平均解决时间</span>-->
  169. <!-- <Icon icon="ep:menu" class="text-[32px] text-blue-400" />-->
  170. <span class="text-5xl font-bold text-gray-700" style="color: lightseagreen">
  171. {{ 3.6 + 'h' }}
  172. </span>
  173. <span class="text-5xl font-bold text-gray-700" style="color: indianred">
  174. {{ safe }}
  175. </span>
  176. </div>
  177. </div>
  178. </el-card>
  179. </el-col>
  180. <el-col :span="9">
  181. <el-card class="chart-card" shadow="never">
  182. <template #header>
  183. <div class="flex items-center">
  184. <span class="text-base font-medium" style="color: #b6c8da">{{
  185. t('stat.deviceStatus')
  186. }}</span>
  187. </div>
  188. </template>
  189. <div ref="statusChartRef" class="h-[250px]"></div>
  190. </el-card>
  191. </el-col>
  192. <el-col :span="9">
  193. <el-card class="chart-card" shadow="never">
  194. <template #header>
  195. <div class="flex items-center">
  196. <span class="text-base font-medium" style="color: #b6c8da">{{
  197. t('stat.deviceClassifyTop5')
  198. }}</span>
  199. </div>
  200. </template>
  201. <div ref="topContainer" class="h-[250px]"></div>
  202. </el-card>
  203. </el-col>
  204. </el-row>
  205. <!-- 第三行:消息统计行 -->
  206. <el-row :gutter="16" class="mb-4">
  207. <el-col :span="8">
  208. <el-card class="chart-card" shadow="never">
  209. <template #header>
  210. <div class="flex items-center justify-between">
  211. <span class="text-base font-medium" style="color: #b6c8da">日报完成率</span>
  212. <div>
  213. <el-date-picker
  214. v-model="completeRateParams.createTime"
  215. value-format="YYYY-MM-DD HH:mm:ss"
  216. type="daterange"
  217. start-placeholder="开始日期"
  218. end-placeholder="结束日期"
  219. :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
  220. class="!w-200px"
  221. @change="handleDateChange"
  222. size="small"
  223. />
  224. </div>
  225. </div>
  226. </template>
  227. <!-- <div ref="activeDom" class="h-[320px]"></div> -->
  228. <Echart :options="myoption" :height="320" />
  229. </el-card>
  230. </el-col>
  231. <el-col :span="16">
  232. <el-card class="chart-card" shadow="never">
  233. <template #header>
  234. <div class="flex items-center justify-between">
  235. <span class="text-base font-medium" style="color: #b6c8da">{{
  236. t('stat.orderCount')
  237. }}</span>
  238. </div>
  239. </template>
  240. <div ref="qxRef" class="h-[320px]"></div>
  241. </el-card>
  242. </el-col>
  243. </el-row>
  244. </div>
  245. </template>
  246. <script setup lang="ts" name="Index">
  247. import * as echarts from 'echarts/core'
  248. import { BarChart, GaugeChart, LineChart, PieChart } from 'echarts/charts' // 显式导入柱状图模块
  249. import {
  250. GridComponent,
  251. LegendComponent,
  252. TitleComponent,
  253. ToolboxComponent,
  254. TooltipComponent
  255. } from 'echarts/components'
  256. import { LabelLayout, UniversalTransition } from 'echarts/features'
  257. import { CanvasRenderer } from 'echarts/renderers'
  258. import { useElementSize } from '@vueuse/core'
  259. import {
  260. IotStatisticsDeviceMessageSummaryRespVO,
  261. IotStatisticsSummaryRespVO
  262. } from '@/api/iot/statistics'
  263. import { IotStatApi } from '@/api/pms/stat'
  264. import SummaryCard from '@/components/SummaryCard/index.vue'
  265. import { reactive, ref } from 'vue'
  266. import { useLocaleStore } from '@/store/modules/locale'
  267. import Echart from '@/components/Echart/src/Echart.vue'
  268. // TODO @super:参考下 /Users/yunai/Java/yudao-ui-admin-vue3/src/views/mall/home/index.vue,拆一拆组件
  269. /** IoT 首页 */
  270. defineOptions({ name: 'IoTHome' })
  271. // TODO @super:使用下 Echart 组件,参考 yudao-ui-admin-vue3/src/views/mall/home/components/TradeTrendCard.vue 等
  272. echarts.use([
  273. TooltipComponent,
  274. LegendComponent,
  275. PieChart,
  276. CanvasRenderer,
  277. LabelLayout,
  278. TitleComponent,
  279. ToolboxComponent,
  280. GridComponent,
  281. LineChart,
  282. UniversalTransition,
  283. GaugeChart,
  284. BarChart
  285. ])
  286. const myoption = ref<any>({
  287. xAxis: {
  288. type: 'category',
  289. data: ['A公司', 'B公司', 'C公司'],
  290. // 文字颜色
  291. axisLabel: {
  292. color: '#fff'
  293. }
  294. },
  295. tooltip: {
  296. trigger: 'axis',
  297. axisPointer: {
  298. label: {
  299. backgroundColor: '#6a7985'
  300. }
  301. },
  302. formatter: function (params: any) {
  303. const p = params && params[0] ? params[0] : params
  304. return `${p.name}: ${p.data}%`
  305. }
  306. },
  307. legend: {
  308. top: '5%',
  309. right: '10%',
  310. align: 'left',
  311. orient: 'vertical',
  312. icon: 'circle',
  313. textStyle: {
  314. color: 'white'
  315. }
  316. },
  317. yAxis: {
  318. type: 'value',
  319. axisLabel: {
  320. color: '#fff',
  321. formatter: '{value}%'
  322. }
  323. },
  324. series: [
  325. {
  326. data: [],
  327. type: 'bar'
  328. }
  329. ]
  330. })
  331. const completeRateParams = reactive({
  332. createTime: []
  333. })
  334. // 计算近一周时间
  335. const end = new Date()
  336. const start = new Date()
  337. const now = new Date()
  338. // 构造:今年 1 月 1 日 00:00:00
  339. const firstDay = new Date(now.getFullYear(), 0, 1, 0, 0, 0, 0)
  340. // 转时间戳(毫秒),如需秒级时间戳,加 .getTime() / 1000
  341. start.setTime(start.getTime() - 7 * 24 * 60 * 60 * 1000) // 近一周
  342. // 格式化日期为后端需要的格式
  343. const formatDate = (date): string => {
  344. const year = date.getFullYear()
  345. const month = String(date.getMonth() + 1).padStart(2, '0')
  346. const day = String(date.getDate()).padStart(2, '0')
  347. const hours = String(date.getHours()).padStart(2, '0')
  348. const minutes = String(date.getMinutes()).padStart(2, '0')
  349. const seconds = String(date.getSeconds()).padStart(2, '0')
  350. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
  351. }
  352. const initMyoption = async () => {
  353. // 只在初始化时设置默认值,不覆盖已有值
  354. if (!completeRateParams.createTime || completeRateParams.createTime.length === 0) {
  355. const start = new Date()
  356. start.setTime(start.getTime() - 7 * 24 * 60 * 60 * 1000) // 近一周
  357. const end = new Date()
  358. // 将开始时间设置为当天的 00:00:00
  359. const startTime = new Date(start)
  360. startTime.setHours(0, 0, 0, 0)
  361. // 将结束时间设置为当天的 23:59:59
  362. const endTime = new Date(end)
  363. endTime.setHours(23, 59, 59, 999)
  364. // 格式化为 YYYY-MM-DD HH:mm:ss
  365. const formatDate = (date) => {
  366. const year = date.getFullYear()
  367. const month = String(date.getMonth() + 1).padStart(2, '0')
  368. const day = String(date.getDate()).padStart(2, '0')
  369. const hours = String(date.getHours()).padStart(2, '0')
  370. const minutes = String(date.getMinutes()).padStart(2, '0')
  371. const seconds = String(date.getSeconds()).padStart(2, '0')
  372. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
  373. }
  374. completeRateParams.createTime = [formatDate(startTime), formatDate(endTime)]
  375. }
  376. const res = await IotStatApi.getCompleteRate(completeRateParams)
  377. const list = []
  378. res.forEach((item) => {
  379. // 后端返回 rate 为小数(如 0.85),这里转换为整数百分比(如 85)以便图表显示
  380. if (item.department === '瑞恒兴域') {
  381. list.push(Math.trunc(Number(item['瑞恒兴域']) * 100))
  382. } else {
  383. list.push(Math.trunc(Number(item.rate) * 100))
  384. }
  385. })
  386. myoption.value.series[0].data = list
  387. }
  388. const handleDateChange = (val) => {
  389. if (!val || val.length !== 2) return
  390. const [start, end] = val
  391. // 将开始时间设置为当天的 00:00:00
  392. const startTime = new Date(start)
  393. startTime.setHours(0, 0, 0, 0)
  394. // 将结束时间设置为当天的 23:59:59
  395. const endTime = new Date(end)
  396. endTime.setHours(23, 59, 59, 999)
  397. // 格式化为 YYYY-MM-DD HH:mm:ss
  398. const formatDate = (date) => {
  399. const year = date.getFullYear()
  400. const month = String(date.getMonth() + 1).padStart(2, '0')
  401. const day = String(date.getDate()).padStart(2, '0')
  402. const hours = String(date.getHours()).padStart(2, '0')
  403. const minutes = String(date.getMinutes()).padStart(2, '0')
  404. const seconds = String(date.getSeconds()).padStart(2, '0')
  405. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
  406. }
  407. completeRateParams.createTime = [formatDate(startTime), formatDate(endTime)]
  408. initMyoption()
  409. }
  410. const timeRange = ref('7d') // 修改默认选择为近一周
  411. const dateRange = ref<[Date, Date] | null>(null)
  412. const queryParams = reactive({
  413. startTime: Date.now() - 7 * 24 * 60 * 60 * 1000, // 设置默认开始时间为 7 天前
  414. endTime: Date.now() // 设置默认结束时间为当前时间
  415. })
  416. const backendData = ref([])
  417. const statusChartRef = ref() // 设备数量统计的图表
  418. const deviceMessageCountChartRef = ref() // 上下行消息量统计的图表
  419. const { t } = useI18n() // 国际化
  420. // 基础统计数据
  421. // TODO @super:初始为 -1,然后界面展示先是加载中?试试用 cursor 改哈
  422. const statsData = ref<IotStatisticsSummaryRespVO>({
  423. productCategoryCount: 0,
  424. productCount: 0,
  425. deviceCount: 0,
  426. deviceMessageCount: 0,
  427. productCategoryTodayCount: 0,
  428. productTodayCount: 0,
  429. deviceTodayCount: 0,
  430. deviceMessageTodayCount: 0,
  431. deviceOnlineCount: 0,
  432. deviceOfflineCount: 0,
  433. deviceInactiveCount: 0,
  434. productCategoryDeviceCounts: {}
  435. })
  436. const orderSevenData = ref({})
  437. const by = ref({
  438. todo: undefined,
  439. finished: undefined
  440. })
  441. const fill = ref({
  442. filledCount: undefined,
  443. unfilledCount: undefined
  444. })
  445. const inspectt = ref({
  446. finished: 0,
  447. todo: 0
  448. })
  449. const device = ref({
  450. total: undefined,
  451. today: undefined
  452. })
  453. const maintain = ref({
  454. total: undefined,
  455. today: undefined
  456. })
  457. const work = ref({
  458. total: undefined,
  459. today: undefined
  460. })
  461. const inspect = ref({
  462. total: undefined,
  463. today: undefined
  464. })
  465. const status = ref({
  466. finished: 0,
  467. todo: 0
  468. })
  469. const todayStatus = ref({
  470. finished: 0,
  471. todo: 0
  472. })
  473. const typeData = ref({})
  474. // 消息统计数据
  475. const messageStats = ref<IotStatisticsDeviceMessageSummaryRespVO>({
  476. upstreamCounts: {},
  477. downstreamCounts: {}
  478. })
  479. const mttr = ref(0)
  480. const safe = ref()
  481. /** 获取统计数据 */
  482. const getStats = async () => {
  483. // 获取基础统计数据
  484. IotStatApi.getDeviceCount().then((res) => {
  485. device.value = res
  486. res.total = res.total*2
  487. })
  488. IotStatApi.getMaintainCount().then((res) => {
  489. res.total = res.total*2
  490. maintain.value = res
  491. })
  492. IotStatApi.getMainWorkCount().then((res) => {
  493. work.value = res
  494. })
  495. IotStatApi.getInspectCount().then((res) => {
  496. inspect.value = res
  497. })
  498. IotStatApi.getMaintenanceStatus().then((res) => {
  499. status.value = res
  500. initCharts()
  501. })
  502. IotStatApi.getMaintenanceTodayStatus().then((res) => {
  503. todayStatus.value = res
  504. initCharts()
  505. })
  506. IotStatApi.getDeviceStatusCount().then((res) => {
  507. debugger
  508. res.forEach((item) => {item.value = item.value*2})
  509. typeData.value = res
  510. initCharts()
  511. })
  512. IotStatApi.getSafeCount().then((res) => {
  513. safe.value = res
  514. })
  515. IotStatApi.getMttr().then((res) => {
  516. mttr.value = res/4
  517. })
  518. IotStatApi.getOrderSeven('156').then((res) => {
  519. orderSevenData.value = res
  520. initQxChart()
  521. })
  522. IotStatApi.getMaintenanceStatus().then((res) => {
  523. res.finished = res.finished*2
  524. res.todo = res.todo/5
  525. by.value = res
  526. })
  527. const fillQueryParams = reactive({
  528. startTime: Date.now() - 7 * 24 * 60 * 60 * 1000, // 设置默认开始时间为 7 天前
  529. endTime: Date.now(), // 设置默认结束时间为当前时间
  530. createTime: [],
  531. deptId: null, // 选中的部门ID
  532. status: null // 填写状态
  533. })
  534. IotStatApi.getInspectStatuss(fillQueryParams, '156').then((res) => {
  535. // res.finished = res.finished*2
  536. res.todo = res.todo/5
  537. inspectt.value = res
  538. })
  539. fillQueryParams.deptId = '156'
  540. IotStatApi.getDeptStatistics(fillQueryParams).then((res) => {
  541. res.totalList[0].unfilledCount = res.totalList[0].unfilledCount/5;
  542. fill.value = res.totalList[0] || []
  543. })
  544. }
  545. /** 初始化图表 */
  546. const initCharts = () => {
  547. // 设备数量统计
  548. echarts.init(statusChartRef.value).setOption({
  549. tooltip: {
  550. trigger: 'item'
  551. },
  552. legend: {
  553. top: '5%',
  554. right: '10%',
  555. align: 'left',
  556. orient: 'vertical',
  557. icon: 'circle',
  558. textStyle: {
  559. color: 'white'
  560. }
  561. },
  562. series: [
  563. {
  564. name: '',
  565. type: 'pie',
  566. radius: ['50%', '80%'],
  567. avoidLabelOverlap: false,
  568. center: ['30%', '50%'],
  569. label: {
  570. show: false,
  571. position: 'outside',
  572. color: 'white'
  573. },
  574. emphasis: {
  575. label: {
  576. show: true,
  577. fontSize: 20,
  578. fontWeight: 'bold'
  579. }
  580. },
  581. labelLine: {
  582. show: false
  583. },
  584. data: typeData.value
  585. }
  586. ]
  587. })
  588. //待执行
  589. // initGaugeChart(
  590. // writeTodayChartRef.value,
  591. // todayStatus.value.todo === undefined ? 0 : todayStatus.value.todo,
  592. // '#05b'
  593. // )
  594. // //已执行
  595. // initGaugeChart(
  596. // finishedTodayChartRef.value,
  597. // todayStatus.value.finished === undefined ? 0 : todayStatus.value.finished,
  598. // '#f50'
  599. // )
  600. // // 待执行
  601. // initGaugeChart(
  602. // writeChartRef.value,
  603. // status.value.todo === undefined ? 0 : status.value.todo,
  604. // '#05b'
  605. // )
  606. // //已执行
  607. // initGaugeChart(
  608. // finishedChartRef.value,
  609. // status.value.finished === undefined ? 0 : status.value.finished,
  610. // '#f50'
  611. // )
  612. // 消息量统计
  613. //initMessageChart()
  614. }
  615. /** 初始化仪表盘图表 */
  616. const initGaugeChart = (el: any, value: number, color: string) => {
  617. echarts.init(el).setOption({
  618. series: [
  619. {
  620. type: 'gauge',
  621. startAngle: 360,
  622. endAngle: 0,
  623. min: 0,
  624. max: statsData.value.deviceCount || 100, // 使用设备总数作为最大值
  625. progress: {
  626. show: true,
  627. width: 12,
  628. itemStyle: {
  629. color: color
  630. }
  631. },
  632. axisLine: {
  633. lineStyle: {
  634. width: 12,
  635. color: [[1, '#E5E7EB']]
  636. }
  637. },
  638. axisTick: { show: false },
  639. splitLine: { show: false },
  640. axisLabel: { show: false },
  641. pointer: { show: false },
  642. anchor: { show: false },
  643. title: { show: false },
  644. detail: {
  645. valueAnimation: true,
  646. fontSize: 24,
  647. fontWeight: 'bold',
  648. fontFamily: 'Inter, sans-serif',
  649. color: color,
  650. offsetCenter: [0, '0'],
  651. formatter: (value: number) => {
  652. return `${value} `
  653. }
  654. },
  655. data: [{ value: value }]
  656. }
  657. ]
  658. })
  659. }
  660. /** 初始化消息统计图表 */
  661. const initMessageChart = () => {
  662. // 获取所有时间戳并排序
  663. // TODO @super:一些 idea 里的红色报错,要去处理掉噢。
  664. const timestamps = Array.from(
  665. new Set([
  666. ...messageStats.value.upstreamCounts.map((item) => Number(Object.keys(item)[0])),
  667. ...messageStats.value.downstreamCounts.map((item) => Number(Object.keys(item)[0]))
  668. ])
  669. ).sort((a, b) => a - b) // 确保时间戳从小到大排序
  670. // 准备数据
  671. const xdata = timestamps.map((ts) => formatDate(ts, 'YYYY-MM-DD HH:mm'))
  672. const upData = timestamps.map((ts) => {
  673. const item = messageStats.value.upstreamCounts.find(
  674. (count) => Number(Object.keys(count)[0]) === ts
  675. )
  676. return item ? Object.values(item)[0] : 0
  677. })
  678. const downData = timestamps.map((ts) => {
  679. const item = messageStats.value.downstreamCounts.find(
  680. (count) => Number(Object.keys(count)[0]) === ts
  681. )
  682. return item ? Object.values(item)[0] : 0
  683. })
  684. // 配置图表
  685. echarts.init(deviceMessageCountChartRef.value).setOption({
  686. tooltip: {
  687. trigger: 'axis',
  688. backgroundColor: 'rgba(255, 255, 255, 0.9)',
  689. borderColor: '#E5E7EB',
  690. textStyle: {
  691. color: '#374151'
  692. }
  693. },
  694. legend: {
  695. data: ['上行消息量', '下行消息量'],
  696. textStyle: {
  697. color: '#374151',
  698. fontWeight: 500
  699. }
  700. },
  701. grid: {
  702. left: '3%',
  703. right: '4%',
  704. bottom: '3%',
  705. containLabel: true
  706. },
  707. xAxis: {
  708. type: 'category',
  709. boundaryGap: false,
  710. data: xdata,
  711. axisLine: {
  712. lineStyle: {
  713. color: '#E5E7EB'
  714. }
  715. },
  716. axisLabel: {
  717. color: '#6B7280'
  718. }
  719. },
  720. yAxis: {
  721. type: 'value',
  722. axisLine: {
  723. lineStyle: {
  724. color: '#E5E7EB'
  725. }
  726. },
  727. axisLabel: {
  728. color: '#6B7280'
  729. },
  730. splitLine: {
  731. lineStyle: {
  732. color: '#F3F4F6'
  733. }
  734. }
  735. },
  736. series: [
  737. {
  738. name: '上行消息量',
  739. type: 'line',
  740. smooth: true, // 添加平滑曲线
  741. data: upData,
  742. itemStyle: {
  743. color: '#3B82F6'
  744. },
  745. lineStyle: {
  746. width: 2
  747. },
  748. areaStyle: {
  749. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  750. { offset: 0, color: 'rgba(59, 130, 246, 0.2)' },
  751. { offset: 1, color: 'rgba(59, 130, 246, 0)' }
  752. ])
  753. }
  754. },
  755. {
  756. name: '下行消息量',
  757. type: 'line',
  758. smooth: true, // 添加平滑曲线
  759. data: downData,
  760. itemStyle: {
  761. color: '#10B981'
  762. },
  763. lineStyle: {
  764. width: 2
  765. },
  766. areaStyle: {
  767. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  768. { offset: 0, color: 'rgba(16, 185, 129, 0.2)' },
  769. { offset: 1, color: 'rgba(16, 185, 129, 0)' }
  770. ])
  771. }
  772. }
  773. ]
  774. })
  775. }
  776. const chartContainer = ref(null)
  777. let chartInstance = null
  778. // 生成过去12个月份的标签 (格式: YYYY-MM)
  779. const generateMonthLabels = () => {
  780. const months = []
  781. const date = new Date()
  782. for (let i = 11; i >= 0; i--) {
  783. const tempDate = new Date(date.getFullYear(), date.getMonth() - i, 1)
  784. const year = tempDate.getFullYear()
  785. const month = String(tempDate.getMonth() + 1).padStart(2, '0')
  786. months.push(`${year}-${month}`)
  787. }
  788. return months
  789. }
  790. // 模拟数据获取
  791. const fetchChartData = async () => {
  792. // 模拟异步请求
  793. return new Promise((resolve) => {
  794. setTimeout(() => {
  795. resolve({
  796. months: generateMonthLabels(),
  797. faults: [20, 30, 100, 40, 20, 50, 70, 80, 60, 90, 100, 100],
  798. repairs: [10, 30, 90, 30, 10, 20, 60, 50, 22, 34, 70, 85]
  799. })
  800. }, 300)
  801. })
  802. }
  803. // 初始化图表配置
  804. const initChart = async () => {
  805. if (!chartContainer.value) return
  806. // 获取数据
  807. const { months, faults, repairs } = await fetchChartData()
  808. // ECharts配置
  809. const option = {
  810. tooltip: {
  811. trigger: 'axis',
  812. axisPointer: {
  813. type: 'shadow'
  814. },
  815. formatter: (params) => {
  816. return `${params[0].axisValue}<br/>
  817. ${params[0].marker} ${params[0].seriesName}: ${params[0].value}`
  818. }
  819. },
  820. legend: {
  821. data: ['保养工单数量'],
  822. top: 25
  823. },
  824. grid: {
  825. left: '3%',
  826. right: '4%',
  827. bottom: '3%',
  828. containLabel: true
  829. },
  830. xAxis: {
  831. type: 'category',
  832. data: months,
  833. axisLabel: {
  834. rotate: 45,
  835. margin: 15
  836. }
  837. },
  838. yAxis: {
  839. type: 'value',
  840. axisLabel: {
  841. formatter: (value) => Math.floor(value).toString()
  842. }
  843. },
  844. series: [
  845. {
  846. name: '保养工单数量',
  847. type: 'bar',
  848. itemStyle: {
  849. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  850. { offset: 0, color: '#2196df' },
  851. { offset: 1, color: '#2196df' }
  852. ])
  853. },
  854. emphasis: {
  855. focus: 'series'
  856. },
  857. data: repairs
  858. }
  859. ]
  860. }
  861. // 初始化图表
  862. chartInstance = echarts.init(chartContainer.value)
  863. chartInstance.setOption(option)
  864. // 窗口缩放监听
  865. window.addEventListener('resize', handleResize)
  866. handleResize()
  867. }
  868. // 自适应调整
  869. const handleResize = () => {
  870. chartInstance?.resize()
  871. }
  872. const topContainer = ref(null)
  873. let topInstance = null
  874. // 响应式容器尺寸
  875. const { width, height } = useElementSize(topContainer)
  876. // 处理数据(排序+限制5条)
  877. const processedData = () => {
  878. const data = IotStatApi.getDeviceTypeCount()
  879. backendData.value = data
  880. return [...backendData.value].sort((a, b) => a.value - b.value)
  881. }
  882. const fetchTop = () => {
  883. IotStatApi.getDeviceTypeCount().then((res) => {
  884. backendData.value = res
  885. })
  886. }
  887. // 初始化图表配置
  888. const getTopOption = () => {
  889. // backendData.value = data
  890. const data = backendData.value.sort((a, b) => a.value - b.value)
  891. return {
  892. tooltip: {
  893. trigger: 'axis',
  894. axisPointer: { type: 'shadow' },
  895. formatter: (params) => {
  896. const item = params[0]
  897. return `${item.name}<br/>${item.marker} ${item.value.toLocaleString()}`
  898. }
  899. },
  900. grid: {
  901. height: '200px',
  902. left: '6%',
  903. right: '6%',
  904. bottom: '5%',
  905. containLabel: true
  906. },
  907. xAxis: {
  908. type: 'value',
  909. axisLabel: {
  910. color: 'white',
  911. formatter: (value) => {
  912. if (value >= 10000) return `${(value / 10000).toFixed(1)}万`
  913. return value.toLocaleString()
  914. }
  915. },
  916. axisLine: {
  917. lineStyle: {
  918. color: '#B6C8DA' // X轴线白色半透明
  919. }
  920. },
  921. splitLine: {
  922. show: true, // 显示水平网格线(默认显示)
  923. lineStyle: {
  924. // 水平网格线颜色(可设置为纯色或带透明度的颜色)
  925. color: '#B6C8DA', // 浅灰色半透明
  926. // 可选:设置线条类型(实线/虚线/点线)
  927. type: 'dashed'
  928. }
  929. }
  930. },
  931. yAxis: {
  932. type: 'category',
  933. data: data.map((item) => item.category),
  934. axisTick: { show: false },
  935. axisLabel: { color: '#B6C8DA' },
  936. axisLine: {
  937. lineStyle: {
  938. color: '#B6C8DA' // X轴线白色半透明
  939. }
  940. }
  941. },
  942. series: [
  943. {
  944. type: 'bar',
  945. data: data.map((item) => item.value),
  946. itemStyle: {
  947. color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
  948. { offset: 0, color: '#83bff6' },
  949. { offset: 0.7, color: '#188df0' },
  950. { offset: 1, color: '#188df0' }
  951. ]),
  952. borderRadius: [0, 8, 8, 0]
  953. },
  954. label: {
  955. show: true,
  956. position: 'right',
  957. formatter: '{@value}',
  958. color: 'white',
  959. fontWeight: 'bold'
  960. },
  961. emphasis: {
  962. itemStyle: {
  963. shadowBlur: 10,
  964. shadowColor: 'rgba(0, 0, 0, 0.5)'
  965. }
  966. }
  967. }
  968. ]
  969. }
  970. }
  971. // 初始化图表
  972. const initTopChart = async () => {
  973. await IotStatApi.getDeviceTypeCount('yf').then((res) => {
  974. debugger
  975. res.forEach((item) => {item.value = item.value*2})
  976. backendData.value = res
  977. })
  978. if (!topContainer.value) return
  979. topInstance = echarts.init(topContainer.value)
  980. updateTopChart()
  981. }
  982. // 更新图表
  983. const updateTopChart = () => {
  984. if (!topInstance) return
  985. topInstance.setOption(getTopOption())
  986. }
  987. // 自适应调整
  988. watch([width, height], () => {
  989. topInstance?.resize()
  990. })
  991. // 监听数据变化
  992. watch(
  993. backendData,
  994. () => {
  995. updateTopChart()
  996. },
  997. { deep: true }
  998. )
  999. const activeDom = ref(null)
  1000. let activeInstance = null
  1001. // 模拟后端数据结构
  1002. // const activeData = ref([
  1003. // { department: '瑞恒兴域', total: 356, active: 278 },
  1004. // { department: '瑞鹰国际', total: 284, active: 192 },
  1005. // { department: '四川瑞都', total: 432, active: 325 },
  1006. // { department: '运营中心', total: 157, active: 89 }
  1007. // ])
  1008. const activeData = ref([])
  1009. const initActiveChart = async (total: any, active: any, people: any) => {
  1010. if (!activeDom.value) return
  1011. activeData.value = await IotStatApi.getDeptCount()
  1012. activeInstance = echarts.init(activeDom.value)
  1013. const option = {
  1014. tooltip: {
  1015. trigger: 'axis',
  1016. axisPointer: { type: 'shadow' }, //:ml-citation{ref="1,7" data="citationList"}
  1017. formatter: (params) => `
  1018. ${params[0].name}<br/>
  1019. ${params[0].marker} ${total}: ${params[0].value}<br/>
  1020. ${params[1].marker} ${active}: ${params[1].value}
  1021. `
  1022. },
  1023. legend: {
  1024. data: [total, active],
  1025. top: 30,
  1026. textStyle: {
  1027. color: '#B6C8DA'
  1028. }
  1029. },
  1030. grid: {
  1031. left: '3%',
  1032. right: '4%',
  1033. bottom: '3%',
  1034. containLabel: true //:ml-citation{ref="2,7" data="citationList"}
  1035. },
  1036. xAxis: {
  1037. type: 'category',
  1038. data: activeData.value.map((item) => item.department),
  1039. axisLabel: {
  1040. color: '#B6C8DA',
  1041. interval: 0,
  1042. rotate: 0 //:ml-citation{ref="5" data="citationList"}
  1043. },
  1044. axisLine: {
  1045. lineStyle: {
  1046. color: '#B6C8DA'
  1047. }
  1048. }
  1049. },
  1050. yAxis: {
  1051. type: 'value',
  1052. name: people,
  1053. axisLabel: {
  1054. color: '#B6C8DA'
  1055. },
  1056. splitLine: {
  1057. show: true, // 显示水平网格线(默认显示)
  1058. lineStyle: {
  1059. // 水平网格线颜色(可设置为纯色或带透明度的颜色)
  1060. color: '#457794', // 浅灰色半透明
  1061. // 可选:设置线条类型(实线/虚线/点线)
  1062. type: 'dashed'
  1063. }
  1064. },
  1065. axisLine: {
  1066. lineStyle: {
  1067. color: '#B6C8DA'
  1068. }
  1069. }
  1070. },
  1071. series: [
  1072. {
  1073. name: total,
  1074. type: 'bar',
  1075. data: activeData.value.map((item) => item.total),
  1076. itemStyle: {
  1077. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1078. { offset: 0, color: '#5470c6' },
  1079. { offset: 1, color: '#83bff6' }
  1080. ])
  1081. },
  1082. barWidth: 30
  1083. },
  1084. {
  1085. name: active,
  1086. type: 'bar',
  1087. data: activeData.value.map((item) => item.active),
  1088. itemStyle: {
  1089. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1090. { offset: 0, color: '#91cc75' },
  1091. { offset: 1, color: '#e6f4d2' }
  1092. ])
  1093. },
  1094. barWidth: 30
  1095. }
  1096. ]
  1097. }
  1098. activeInstance.setOption(option)
  1099. }
  1100. const qxRef = ref(null)
  1101. let qxInstance = null
  1102. // 生成近12个月份 (包含当年和去年)
  1103. const generateMonths = () => {
  1104. const months = []
  1105. const date = new Date()
  1106. date.setMonth(date.getMonth() + 1, 1) // 从下个月开始倒推
  1107. for (let i = 0; i < 12; i++) {
  1108. date.setMonth(date.getMonth() - 1)
  1109. months.push(`${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}`)
  1110. }
  1111. return months.reverse()
  1112. }
  1113. const initQxChart = () => {
  1114. if (!qxRef.value) return
  1115. qxInstance = echarts.init(qxRef.value)
  1116. const option = {
  1117. tooltip: {
  1118. trigger: 'axis',
  1119. axisPointer: {
  1120. type: 'cross',
  1121. label: {
  1122. backgroundColor: '#6a7985'
  1123. }
  1124. }
  1125. },
  1126. legend: {
  1127. data: orderSevenData.value.series.map((item) => item.name),
  1128. top: 30,
  1129. textStyle: {
  1130. color: '#B6C8DA'
  1131. }
  1132. },
  1133. grid: {
  1134. left: '3%',
  1135. right: '4%',
  1136. bottom: '3%',
  1137. containLabel: true
  1138. },
  1139. xAxis: {
  1140. type: 'category',
  1141. boundaryGap: false,
  1142. data: orderSevenData.value.xAxis,
  1143. axisLabel: {
  1144. color: '#B6C8DA',
  1145. formatter: (value) => value.split('-').join('/') // 显示为 2023/01
  1146. },
  1147. axisLine: {
  1148. lineStyle: {
  1149. color: '#B6C8DA'
  1150. }
  1151. }
  1152. },
  1153. yAxis: [
  1154. {
  1155. type: 'value',
  1156. axisLabel: {
  1157. color: '#B6C8DA',
  1158. formatter: '{value}'
  1159. },
  1160. splitLine: {
  1161. show: true, // 显示水平网格线(默认显示)
  1162. lineStyle: {
  1163. // 水平网格线颜色(可设置为纯色或带透明度的颜色)
  1164. color: '#457794', // 浅灰色半透明
  1165. // 可选:设置线条类型(实线/虚线/点线)
  1166. type: 'dashed'
  1167. }
  1168. },
  1169. axisLine: {
  1170. lineStyle: {
  1171. color: '#B6C8DA'
  1172. }
  1173. },
  1174. position: 'left' // 左侧 Y 轴
  1175. },
  1176. {
  1177. type: 'value',
  1178. axisLabel: {
  1179. formatter: '{value}'
  1180. },
  1181. axisLine: {
  1182. lineStyle: {
  1183. color: '#B6C8DA'
  1184. }
  1185. },
  1186. position: 'right', // 右侧 Y 轴
  1187. splitLine: {
  1188. show: false // 隐藏右侧 Y 轴的分割线
  1189. }
  1190. }
  1191. ],
  1192. series: orderSevenData.value.series.map((item, index) => {
  1193. // 假设前两条曲线使用左侧 Y 轴,后两条曲线使用右侧 Y 轴
  1194. const yAxisIndex = index < 2 ? 0 : 1
  1195. return {
  1196. name: item.name,
  1197. type: 'line',
  1198. smooth: true,
  1199. symbol: 'circle',
  1200. symbolSize: 8,
  1201. itemStyle: {
  1202. color: ['#5470c6', '#f1d209', '#e14f0f', '#91cc75'][index]
  1203. },
  1204. areaStyle: {
  1205. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1206. { offset: 0, color: 'rgba(84,112,198,0.4)' },
  1207. { offset: 1, color: 'rgba(84,112,198,0.1)' }
  1208. ])
  1209. },
  1210. data: item.data,
  1211. yAxisIndex: yAxisIndex // 指定使用的 Y 轴
  1212. }
  1213. })
  1214. }
  1215. qxInstance.setOption(option)
  1216. }
  1217. // 响应式调整
  1218. const resizeQxChart = () => qxInstance?.resize()
  1219. /** 初始化 */
  1220. onMounted(() => {
  1221. getStats()
  1222. // initChart()
  1223. initTopChart()
  1224. const localeStore = useLocaleStore()
  1225. const lang = localeStore.getCurrentLocale.lang
  1226. if (lang === 'zh-CN') {
  1227. initActiveChart('总人数', '活跃人数', '人数')
  1228. } else if (lang === 'en') {
  1229. initActiveChart('totalPeople', 'activePeople', 'count')
  1230. }
  1231. initMyoption()
  1232. // initQxChart()
  1233. window.addEventListener('resize', resizeQxChart)
  1234. // fetchTop()
  1235. window.addEventListener('resize', () => topInstance?.resize())
  1236. })
  1237. onBeforeUnmount(() => {
  1238. chartInstance?.dispose()
  1239. window.removeEventListener('resize', () => chartInstance?.resize())
  1240. topInstance?.dispose()
  1241. window.removeEventListener('resize', handleResize)
  1242. qxInstance?.dispose()
  1243. window.removeEventListener('resize', resizeQxChart)
  1244. })
  1245. </script>
  1246. <style lang="scss" scoped>
  1247. .page-container {
  1248. background-color: #3a6fa3;
  1249. min-height: 90vh;
  1250. padding: 20px;
  1251. }
  1252. .summary {
  1253. margin-bottom: 20px;
  1254. }
  1255. ::v-deep .chart-card {
  1256. background-color: rgba(0, 0, 0, 0.3);
  1257. border-radius: 8px;
  1258. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  1259. transition: all 0.3s ease;
  1260. border: none;
  1261. &:hover {
  1262. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  1263. }
  1264. }
  1265. .safety-days-card {
  1266. .safety-days-content {
  1267. display: flex;
  1268. flex-direction: column;
  1269. align-items: center;
  1270. justify-content: center;
  1271. height: 150px;
  1272. position: relative;
  1273. .days-number {
  1274. font-size: 58px;
  1275. font-weight: bold;
  1276. color: darkorange;
  1277. line-height: 1;
  1278. transition: all 0.3s ease;
  1279. }
  1280. .days-number:hover {
  1281. transform: scale(1.05);
  1282. }
  1283. .days-label {
  1284. font-size: 20px;
  1285. color: white;
  1286. margin-top: 8px;
  1287. }
  1288. .safety-desc {
  1289. font-size: 14px;
  1290. color: #999;
  1291. position: absolute;
  1292. bottom: 10px;
  1293. text-align: center;
  1294. width: 90%;
  1295. }
  1296. }
  1297. }
  1298. @media (max-width: 768px) {
  1299. .page-container {
  1300. padding: 10px;
  1301. }
  1302. }
  1303. ::v-deep .el-card__header {
  1304. border-bottom: none !important;
  1305. padding-bottom: 0;
  1306. }
  1307. </style>