Index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842
  1. <template>
  2. <div class="home" :style="pageStyle">
  3. <div class="use">
  4. <el-segmented v-model="valueTop" :options="optionsTop" size="large" />
  5. <el-scrollbar v-if="valueTop=='我的常用'">
  6. <div class="icon-wrap">
  7. <div class="icon-item" @click="handleGridDataStatistics" v-hasPermi="['home:gridDataStatistics']">
  8. <Icon :icon="'ep:copy-document'" :size="56" />
  9. <div class="text">院区数据统计</div>
  10. </div>
  11. <div class="icon-item" v-for="(c, index) in commonList" :key="index" @click="handleTo(c)">
  12. <img
  13. v-if="c.meta.iconImg"
  14. :src="c.meta.iconImg"
  15. class="icon"
  16. :style="{ background: c.meta.backgroundColor }"
  17. />
  18. <Icon :icon="c.meta.icon" :size="56" v-else-if="c.meta.icon" />
  19. <div class="text">{{ c.meta.title }}</div>
  20. </div>
  21. <div class="icon-item" @click="handleAddIcon">
  22. <img
  23. src="https://kyj-bucket.oss-cn-hangzhou.aliyuncs.com/6794863b96977762288be1534f037af7c4d159711456f1fef3c984a74feb9fa4.png"
  24. class="icon"
  25. style="background: #8f80ff"
  26. />
  27. <div class="text">添加</div>
  28. </div>
  29. </div>
  30. </el-scrollbar>
  31. <div v-if="valueTop=='院内统计'" class="statistics-panel">
  32. <!-- 院内动态 -->
  33. <div class="stat-row">
  34. <div class="stat-label blue">
  35. <Icon icon="ep:house" class="stat-icon" />
  36. <span>院内动态</span>
  37. </div>
  38. <div class="stat-items">
  39. <div class="stat-item">
  40. <span class="stat-name">总床位数:</span>
  41. <span class="stat-value">400</span>
  42. <span class="stat-unit">张</span>
  43. </div>
  44. <div class="stat-item">
  45. <span class="stat-name">在院人数:</span>
  46. <span class="stat-value">352</span>
  47. <span class="stat-unit">位</span>
  48. </div>
  49. <div class="stat-item">
  50. <span class="stat-name">新收人数:</span>
  51. <span class="stat-value">0</span>
  52. <span class="stat-unit">位</span>
  53. </div>
  54. <div class="stat-item">
  55. <span class="stat-name">请假人数:</span>
  56. <span class="stat-value">9</span>
  57. <span class="stat-unit">位</span>
  58. </div>
  59. <div class="stat-item">
  60. <span class="stat-name">当天请假人数:</span>
  61. <span class="stat-value">0</span>
  62. <span class="stat-unit">位</span>
  63. </div>
  64. <div class="stat-item">
  65. <span class="stat-name">退院人数:</span>
  66. <span class="stat-value">0</span>
  67. <span class="stat-unit">位</span>
  68. </div>
  69. </div>
  70. </div>
  71. <!-- 护理情况 -->
  72. <div class="stat-row">
  73. <div class="stat-label green">
  74. <Icon icon="ep:first-aid-kit" class="stat-icon" />
  75. <span>护理情况</span>
  76. </div>
  77. <div class="stat-items">
  78. <div class="stat-item">
  79. <span class="stat-name">一级:</span>
  80. <span class="stat-value">264</span>
  81. <span class="stat-unit">位</span>
  82. </div>
  83. <div class="stat-item">
  84. <span class="stat-name">二级:</span>
  85. <span class="stat-value">17</span>
  86. <span class="stat-unit">位</span>
  87. </div>
  88. <div class="stat-item">
  89. <span class="stat-name">三级:</span>
  90. <span class="stat-value">22</span>
  91. <span class="stat-unit">位</span>
  92. </div>
  93. <div class="stat-item">
  94. <span class="stat-name">一级(专陪):</span>
  95. <span class="stat-value">38</span>
  96. <span class="stat-unit">位</span>
  97. </div>
  98. <div class="stat-item">
  99. <span class="stat-name">二级(专陪):</span>
  100. <span class="stat-value">1</span>
  101. <span class="stat-unit">位</span>
  102. </div>
  103. <div class="stat-item">
  104. <span class="stat-name">无费用:</span>
  105. <span class="stat-value">10</span>
  106. <span class="stat-unit">位</span>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <el-row class="mt-8px flow" :gutter="8" justify="space-between">
  113. <el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24" class="mb-8px">
  114. <el-skeleton :loading="loading" animated>
  115. <div class="box">
  116. <div class="header">
  117. <div class="title"
  118. >待审批事项 <span class="num">{{ }}</span></div>
  119. <div class="all" @click="handleAll">全部<Icon icon="ep:arrow-right" /></div>
  120. </div>
  121. <div class="content">
  122. <ul
  123. v-infinite-scroll="loadToDoList"
  124. class="infinite-list"
  125. :infinite-scroll-disabled="todoDisabled"
  126. >
  127. <li v-for="(item, i) in todoList" :key="i" class="item" @click="handleOpen(item)">
  128. <div class="left">
  129. <span class="title">{{ item.templateContent }}</span>
  130. <span class="desc">{{ item.userBpmContent }}</span>
  131. <span class="time">{{
  132. formatTime(item.createTime, 'yyyy-MM-dd HH:mm:ss')
  133. }}</span>
  134. </div>
  135. <div class="right"><Icon icon="ep:arrow-right" /></div>
  136. </li>
  137. <p v-if="todoLoading" class="grey">加载中...</p>
  138. <p v-if="todoNoMore" class="grey">没有更多数据...</p>
  139. </ul>
  140. </div>
  141. </div>
  142. </el-skeleton>
  143. </el-col>
  144. <el-col :xl="12" :lg="12" :md="24" :sm="24" :xs="24" class="mb-8px">
  145. <el-skeleton :loading="loading" animated :throttle="{ leading: 500, trailing: 500, initVal: true }">
  146. <div class="box">
  147. <div class="header">
  148. <div class="title"
  149. >待办事项 <span class="num">{{ }}</span></div
  150. >
  151. <div class="all" @click="handleAllNew">全部<Icon icon="ep:arrow-right" /></div>
  152. </div>
  153. <div class="content">
  154. <ul
  155. v-infinite-scroll="loadMyList"
  156. class="infinite-list"
  157. :infinite-scroll-disabled="myDisabled"
  158. >
  159. <li v-for="(item, i) in myList" :key="i" class="item" @click="handleGoTo(item)">
  160. <div class="left">
  161. <span class="title">{{ item.templateContent }}</span>
  162. <span class="desc">{{ item.userBpmContent }}</span>
  163. <span class="time">{{
  164. formatTime(item.createTime, 'yyyy-MM-dd HH:mm:ss')
  165. }}</span>
  166. </div>
  167. <div class="right" @click="handleOpen(item)"><Icon icon="ep:arrow-right" /></div>
  168. </li>
  169. <p v-if="myLoading" class="grey">加载中...</p>
  170. <p v-if="myNoMore" class="grey">没有更多数据...</p>
  171. </ul>
  172. </div>
  173. </div>
  174. </el-skeleton>
  175. </el-col>
  176. </el-row>
  177. <MyCommon ref="commonRef" @success="handleGetIcon" />
  178. <el-drawer
  179. class="process-drawer"
  180. title="审批"
  181. v-model="settingVisible"
  182. size="60%">
  183. <ProcessDetail :id="processId" isHome :taskName="currentItem.templateContent" />
  184. </el-drawer>
  185. <MessageDrawer v-model="messageVisible"/>
  186. <el-dialog
  187. v-model="statsDialogVisible"
  188. title="院区运营数据统计"
  189. width="520px"
  190. destroy-on-close
  191. >
  192. <div v-loading="statsLoading" style="min-height: 220px; line-height: 2; white-space: pre-line">
  193. {{ statsText }}
  194. </div>
  195. <template #footer>
  196. <el-button @click="handleCopyStatistics">复制</el-button>
  197. <el-button type="primary" @click="statsDialogVisible = false">关闭</el-button>
  198. </template>
  199. </el-dialog>
  200. </div>
  201. </template>
  202. <script lang="ts" setup>
  203. import { set } from 'lodash-es'
  204. import { EChartsOption } from 'echarts'
  205. import { formatTime } from '@/utils'
  206. import { useUserStore } from '@/store/modules/user'
  207. import { useWatermark } from '@/hooks/web/useWatermark'
  208. import type { WorkplaceTotal, Project, Notice, Shortcut } from './types'
  209. import { pieOptions, barOptions } from './echarts-data'
  210. import * as ProcessInstanceApi from '@/api/bpm/processInstance'
  211. import { useAppStore } from '@/store/modules/app'
  212. import { breakpointsTailwind, useBreakpoints } from '@vueuse/core'
  213. import { getBpmListCount } from '@/api/bpm/processInstance'
  214. import * as ElderlyInfoApi from '@/api/elderly/elder/elderly-Info'
  215. import { ElMessage } from 'element-plus'
  216. import MessageDrawer from './components/message-drawer.vue'
  217. import ProcessDetail from '@/views/bpm/task/process-list/detail.vue'
  218. import MyCommon from './MyCommon.vue'
  219. defineOptions({ name: 'Home' })
  220. const { push } = useRouter()
  221. const { t } = useI18n()
  222. const userStore = useUserStore()
  223. const optionsTop = ['我的常用',
  224. //'院内统计'
  225. ]
  226. const valueTop = ref('我的常用')
  227. const { setWatermark } = useWatermark()
  228. const loading = ref(false)
  229. const processId = ref('')
  230. const settingVisible = ref(false)
  231. const avatar = userStore.getUser.avatar
  232. const username = userStore.getUser.nickname
  233. const pieOptionsData = reactive<EChartsOption>(pieOptions) as EChartsOption
  234. const appStore = useAppStore()
  235. const breakpoints = useBreakpoints(breakpointsTailwind)
  236. const sm = breakpoints.smaller('sm')
  237. const md = breakpoints.between('sm', 'md')
  238. const lg = breakpoints.between('md', 'lg')
  239. const xl = breakpoints.between('lg', 'xl')
  240. const xxl = breakpoints.between('xl', '2xl')
  241. const xxxl = breakpoints['2xl']
  242. const messageVisible = ref(false)
  243. const statsDialogVisible = ref(false)
  244. const statsLoading = ref(false)
  245. const statsText = ref('')
  246. const router = useRouter()
  247. const buildStatsText = (data: Record<string, any>) => {
  248. const lines = [
  249. `1、院名:${data?.institutionName ?? '-'}`,
  250. `2、本周期初数:${data?.periodBeginCount ?? 0}`,
  251. `3、本周入住数:${data?.weeklyCheckInCount ?? 0}`,
  252. `4、本周退住数:${data?.weeklyCheckOutCount ?? 0}`,
  253. `5、本月入住数:${data?.monthlyCheckInCount ?? 0}`,
  254. `6、本月退住数:${data?.monthlyCheckOutCount ?? 0}`,
  255. `7、本周期末数:${data?.periodEndCount ?? 0}`,
  256. `8、本周净增长长者数:${data?.weeklyNetGrowthCount ?? 0}`,
  257. `9、本月净增长长者数合计:${data?.monthlyNetGrowthCount ?? 0}`,
  258. `10、本周期末院内空余床位数:${data?.periodEndEmptyBedCount ?? 0}`
  259. ]
  260. return lines.join('\n')
  261. }
  262. const handleGridDataStatistics = async () => {
  263. statsDialogVisible.value = true
  264. statsLoading.value = true
  265. try {
  266. const res = await ElderlyInfoApi.getWeeklyOperationSummary()
  267. const data = res?.data ?? res
  268. statsText.value = buildStatsText(data || {})
  269. } catch (error) {
  270. statsText.value = ''
  271. ElMessage.error('获取运营数据失败')
  272. } finally {
  273. statsLoading.value = false
  274. }
  275. }
  276. const fallbackCopyText = (text: string) => {
  277. const textarea = document.createElement('textarea')
  278. textarea.value = text
  279. textarea.setAttribute('readonly', 'readonly')
  280. textarea.style.position = 'fixed'
  281. textarea.style.left = '-9999px'
  282. textarea.style.top = '0'
  283. document.body.appendChild(textarea)
  284. textarea.select()
  285. const ok = document.execCommand('copy')
  286. document.body.removeChild(textarea)
  287. return ok
  288. }
  289. const handleCopyStatistics = async () => {
  290. if (!statsText.value) {
  291. ElMessage.warning('暂无可复制内容')
  292. return
  293. }
  294. try {
  295. if (window.isSecureContext && navigator.clipboard?.writeText) {
  296. await navigator.clipboard.writeText(statsText.value)
  297. } else {
  298. const copied = fallbackCopyText(statsText.value)
  299. if (!copied) {
  300. throw new Error('fallback copy failed')
  301. }
  302. }
  303. ElMessage.success('复制成功')
  304. } catch (error) {
  305. ElMessage.error('复制失败,请手动复制')
  306. }
  307. }
  308. // 页面宽度
  309. const pageStyle = computed(() => {
  310. // if(appStore.newScene){
  311. if (sm.value) {
  312. return { padding: '15px 10px' }
  313. } else if (md.value) {
  314. return { padding: '15px 20px' }
  315. } else if (lg.value) {
  316. return { padding: '15px 50px' }
  317. } else if (xl.value) {
  318. return { padding: '15px 80px' }
  319. } else if (xxl.value) {
  320. return { padding: '15px 120px' }
  321. } else if (xxxl.value) {
  322. return { padding: '15px 150px' }
  323. }
  324. // }
  325. })
  326. // 获取统计数
  327. let totalSate = reactive<WorkplaceTotal>({
  328. project: 0,
  329. access: 0,
  330. todo: 0
  331. })
  332. const getCount = async () => {
  333. const data = {
  334. project: 40,
  335. access: 2340,
  336. todo: 10
  337. }
  338. totalSate = Object.assign(totalSate, data)
  339. }
  340. // 获取项目数
  341. let projects = reactive<Project[]>([])
  342. const getProject = async () => {
  343. const data = [
  344. {
  345. name: 'ruoyi-vue-pro',
  346. icon: 'akar-icons:github-fill',
  347. message: 'https://github.com/YunaiV/ruoyi-vue-pro',
  348. personal: 'Spring Boot 单体架构',
  349. time: new Date()
  350. },
  351. {
  352. name: 'yudao-ui-admin-vue3',
  353. icon: 'logos:vue',
  354. message: 'https://github.com/yudaocode/yudao-ui-admin-vue3',
  355. personal: 'Vue3 + element-plus',
  356. time: new Date()
  357. },
  358. {
  359. name: 'yudao-ui-admin-vben',
  360. icon: 'logos:vue',
  361. message: 'https://github.com/yudaocode/yudao-ui-admin-vben',
  362. personal: 'Vue3 + vben(antd)',
  363. time: new Date()
  364. },
  365. {
  366. name: 'yudao-cloud',
  367. icon: 'akar-icons:github',
  368. message: 'https://github.com/YunaiV/yudao-cloud',
  369. personal: 'Spring Cloud 微服务架构',
  370. time: new Date()
  371. },
  372. {
  373. name: 'yudao-ui-mall-uniapp',
  374. icon: 'logos:vue',
  375. message: 'https://github.com/yudaocode/yudao-ui-admin-uniapp',
  376. personal: 'Vue3 + uniapp',
  377. time: new Date()
  378. },
  379. {
  380. name: 'yudao-ui-admin-vue2',
  381. icon: 'logos:vue',
  382. message: 'https://github.com/yudaocode/yudao-ui-admin-vue2',
  383. personal: 'Vue2 + element-ui',
  384. time: new Date()
  385. }
  386. ]
  387. projects = Object.assign(projects, data)
  388. }
  389. // 获取通知公告
  390. let notice = reactive<Notice[]>([])
  391. const getNotice = async () => {
  392. const data = [
  393. {
  394. title: '系统支持 JDK 8/17/21,Vue 2/3',
  395. type: '通知',
  396. keys: ['通知', '8', '17', '21', '2', '3'],
  397. date: new Date()
  398. },
  399. {
  400. title: '后端提供 Spring Boot 2.7/3.2 + Cloud 双架构',
  401. type: '公告',
  402. keys: ['公告', 'Boot', 'Cloud'],
  403. date: new Date()
  404. },
  405. {
  406. title: '全部开源,个人与企业可 100% 直接使用,无需授权',
  407. type: '通知',
  408. keys: ['通知', '无需授权'],
  409. date: new Date()
  410. },
  411. {
  412. title: '国内使用最广泛的快速开发平台,超 300+ 人贡献',
  413. type: '公告',
  414. keys: ['公告', '最广泛'],
  415. date: new Date()
  416. }
  417. ]
  418. notice = Object.assign(notice, data)
  419. }
  420. // 获取快捷入口
  421. let shortcut = reactive<Shortcut[]>([])
  422. const getShortcut = async () => {
  423. const data = [
  424. {
  425. name: 'Github',
  426. icon: 'akar-icons:github-fill',
  427. url: 'github.io'
  428. },
  429. {
  430. name: 'Vue',
  431. icon: 'logos:vue',
  432. url: 'vuejs.org'
  433. },
  434. {
  435. name: 'Vite',
  436. icon: 'vscode-icons:file-type-vite',
  437. url: 'https://vitejs.dev/'
  438. },
  439. {
  440. name: 'Angular',
  441. icon: 'logos:angular-icon',
  442. url: 'github.io'
  443. },
  444. {
  445. name: 'React',
  446. icon: 'logos:react',
  447. url: 'github.io'
  448. },
  449. {
  450. name: 'Webpack',
  451. icon: 'logos:webpack',
  452. url: 'github.io'
  453. }
  454. ]
  455. shortcut = Object.assign(shortcut, data)
  456. }
  457. // 用户来源
  458. const getUserAccessSource = async () => {
  459. const data = [
  460. { value: 335, name: 'analysis.directAccess' },
  461. { value: 310, name: 'analysis.mailMarketing' },
  462. { value: 234, name: 'analysis.allianceAdvertising' },
  463. { value: 135, name: 'analysis.videoAdvertising' },
  464. { value: 1548, name: 'analysis.searchEngines' }
  465. ]
  466. set(
  467. pieOptionsData,
  468. 'legend.data',
  469. data.map((v) => t(v.name))
  470. )
  471. pieOptionsData!.series![0].data = data.map((v) => {
  472. return {
  473. name: t(v.name),
  474. value: v.value
  475. }
  476. })
  477. }
  478. const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption
  479. // 周活跃量
  480. const getWeeklyUserActivity = async () => {
  481. const data = [
  482. { value: 13253, name: 'analysis.monday' },
  483. { value: 34235, name: 'analysis.tuesday' },
  484. { value: 26321, name: 'analysis.wednesday' },
  485. { value: 12340, name: 'analysis.thursday' },
  486. { value: 24643, name: 'analysis.friday' },
  487. { value: 1322, name: 'analysis.saturday' },
  488. { value: 1324, name: 'analysis.sunday' }
  489. ]
  490. set(
  491. barOptionsData,
  492. 'xAxis.data',
  493. data.map((v) => t(v.name))
  494. )
  495. set(barOptionsData, 'series', [
  496. {
  497. name: t('analysis.activeQuantity'),
  498. data: data.map((v) => v.value),
  499. type: 'bar'
  500. }
  501. ])
  502. }
  503. const handleAll = () => {
  504. push({
  505. name: 'BpmProcessList',
  506. query: {
  507. activeName: '1'
  508. }
  509. })
  510. }
  511. const handleAllNew = () => {
  512. messageVisible.value = true
  513. }
  514. const handleGoTo = (item) => {
  515. router.push(item.gotoUrl)
  516. }
  517. const currentItem = ref({})
  518. const handleOpen = (row) => {
  519. processId.value = row.processInstanceId
  520. currentItem.value = row
  521. settingVisible.value = true
  522. }
  523. // 获取待审批列表
  524. const params = reactive({
  525. pageNo: 1,
  526. pageSize: 10,
  527. businessType: 1,
  528. queryType: 1
  529. })
  530. const todoTotal = ref(0)
  531. const todoList = ref([])
  532. const todoLoading = ref(false)
  533. const todoDisabled = computed(() => todoLoading.value || todoNoMore.value)
  534. const getTodoList = async () => {
  535. try {
  536. todoLoading.value = true
  537. const data = await ProcessInstanceApi.getMyPage(params)
  538. todoList.value = todoList.value.concat(data.list)
  539. } finally {
  540. todoLoading.value = false
  541. }
  542. }
  543. const todoNoMore = computed(() => todoList.value.length == todoTotal.value)
  544. const loadToDoList = () => {
  545. if(params.pageNo * params.pageSize < todoTotal.value){
  546. params.pageNo += 1
  547. getTodoList()
  548. }
  549. }
  550. // 获取待办列表
  551. const myParams = reactive({
  552. pageNo: 1,
  553. pageSize: 10,
  554. businessType: 0,
  555. queryType: 5
  556. })
  557. const myTotal = ref(0)
  558. const myList = ref([])
  559. const myLoading = ref(false)
  560. const myDisabled = computed(() => myLoading.value || myNoMore.value)
  561. const getMyList = async () => {
  562. // loading.value = true
  563. try {
  564. const data = await ProcessInstanceApi.getMyPage(myParams)
  565. myList.value = myList.value.concat(data.list)
  566. myTotal.value = data.total
  567. } finally {
  568. // loading.value = false
  569. }
  570. }
  571. const myNoMore = computed(() => myList.value.length == myTotal.value)
  572. const loadMyList = () => {
  573. myParams.pageNo += 1
  574. getMyList()
  575. }
  576. // 我的常用
  577. const commonList = ref([])
  578. const handleTo = (item) => {
  579. router.push({ name: item.name })
  580. }
  581. const handleGetIcon = (val) => {
  582. commonList.value = val
  583. }
  584. const commonRef = ref()
  585. const handleAddIcon = async () => {
  586. nextTick(() => {
  587. commonRef.value.init(commonList.value)
  588. })
  589. }
  590. // 获取未读数量
  591. const getTodoCount = async () => {
  592. const res = await ProcessInstanceApi.getBpmListCount({queryType: 0})
  593. todoTotal.value = res.todoCount
  594. }
  595. onMounted(() => {
  596. getTodoList()
  597. getMyList()
  598. getTodoCount()
  599. commonList.value = JSON.parse(localStorage.getItem('common-icon')) || []
  600. })
  601. </script>
  602. <style lang="scss" scoped>
  603. .new-scene {
  604. padding: 15px 240px;
  605. }
  606. .home {
  607. .use {
  608. padding: 13px 17px;
  609. background: linear-gradient(181deg, #dde7ff 0%, #f1f5ff 100%);
  610. border-radius: 12px;
  611. border: 1px solid;
  612. border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) 1 1;
  613. box-sizing: border-box;
  614. .title {
  615. font-weight: 600;
  616. font-size: 16px;
  617. color: #000000;
  618. }
  619. .statistics-panel {
  620. margin-top: 15px;
  621. padding: 16px;
  622. background: #fff;
  623. border-radius: 8px;
  624. .stat-row {
  625. display: flex;
  626. align-items: center;
  627. padding: 12px 0;
  628. border-bottom: 1px solid #e8e8e8;
  629. &:last-child {
  630. border-bottom: none;
  631. }
  632. .stat-label {
  633. display: flex;
  634. align-items: center;
  635. justify-content: center;
  636. width: 100px;
  637. height: 36px;
  638. border-radius: 4px;
  639. color: #fff;
  640. font-size: 14px;
  641. font-weight: 500;
  642. flex-shrink: 0;
  643. &.blue {
  644. background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
  645. }
  646. &.green {
  647. background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
  648. }
  649. .stat-icon {
  650. margin-right: 6px;
  651. font-size: 16px;
  652. }
  653. }
  654. .stat-items {
  655. display: flex;
  656. flex: 1;
  657. justify-content: space-around;
  658. padding-left: 20px;
  659. .stat-item {
  660. display: flex;
  661. align-items: center;
  662. font-size: 14px;
  663. .stat-name {
  664. color: #666;
  665. }
  666. .stat-value {
  667. color: #1890ff;
  668. font-size: 18px;
  669. font-weight: 600;
  670. margin: 0 4px;
  671. }
  672. .stat-unit {
  673. color: #999;
  674. }
  675. }
  676. }
  677. }
  678. }
  679. .icon-wrap {
  680. display: grid;
  681. grid-template-columns: repeat(11, 1fr);
  682. gap: 20;
  683. margin-top: 15px;
  684. padding: 16px;
  685. box-sizing: border-box;
  686. .icon-item {
  687. min-width: 100px;
  688. text-align: center;
  689. cursor: pointer;
  690. .icon {
  691. width: 56px;
  692. height: 56px;
  693. border-radius: 16px;
  694. margin-bottom: 4px;
  695. }
  696. .text {
  697. margin-top: 12px;
  698. font-weight: 400;
  699. font-size: 16px;
  700. color: #2a2f42;
  701. }
  702. }
  703. }
  704. }
  705. .flow {
  706. .box {
  707. box-sizing: border-box;
  708. padding: 20px;
  709. border: 2px solid #fff;
  710. border-radius: 10px;
  711. background-color: #f2f6fc;
  712. .header {
  713. display: flex;
  714. justify-content: space-between;
  715. align-items: center;
  716. font-size: 16px;
  717. .title {
  718. font-size: 18px;
  719. font-weight: bolder;
  720. .num {
  721. color: var(--el-color-danger);
  722. }
  723. }
  724. .all {
  725. display: flex;
  726. background-color: #f2f6fc;
  727. align-items: center;
  728. cursor: pointer;
  729. }
  730. }
  731. .content {
  732. margin-top: 15px;
  733. .infinite-list {
  734. padding: 0;
  735. margin: 0;
  736. list-style: none;
  737. height: 380px;
  738. overflow: hidden;
  739. overflow-y: auto;
  740. }
  741. .item {
  742. display: flex;
  743. justify-content: space-between;
  744. align-items: center;
  745. padding: 20px;
  746. margin-bottom: 10px;
  747. background-color: #fff;
  748. border-radius: 10px;
  749. cursor: pointer;
  750. .left {
  751. display: flex;
  752. flex-direction: column;
  753. overflow: hidden; /* 隐藏溢出内容 */
  754. .title {
  755. font-size: 16px;
  756. font-weight: bold;
  757. margin-bottom: 10px;
  758. overflow: hidden;
  759. text-overflow: ellipsis; /* 当文本溢出时显示省略号 */
  760. white-space: nowrap; /* 禁止文本换行 */
  761. }
  762. .desc {
  763. font-size: 14px;
  764. }
  765. .time {
  766. font-size: 16px;
  767. margin-top: 10px;
  768. color: #666;
  769. }
  770. }
  771. .right {
  772. cursor: pointer;
  773. }
  774. }
  775. }
  776. }
  777. .grey {
  778. font-size: 12px;
  779. margin-top: 10px;
  780. color: #999999;
  781. text-align: center;
  782. }
  783. }
  784. ::-webkit-scrollbar {
  785. width: 3px; //滚动条宽度
  786. }
  787. ::-webkit-scrollbar-thumb {
  788. //上层
  789. border-radius: 10px; //滚动条圆弧半径
  790. //-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); //滚动条阴影
  791. background: var(--el-border-color-dark); //背景颜色
  792. }
  793. ::-webkit-scrollbar-track {
  794. //底层
  795. //-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  796. border-radius: 0;
  797. background: #f7f8fa;
  798. }
  799. }
  800. </style>
  801. <style lang="scss">
  802. .home {
  803. .use {
  804. .el-scrollbar {
  805. .is-vertical {
  806. display: none !important;
  807. }
  808. }
  809. }
  810. }
  811. </style>