Index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  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 handleCopyStatistics = async () => {
  277. if (!statsText.value) {
  278. ElMessage.warning('暂无可复制内容')
  279. return
  280. }
  281. try {
  282. await navigator.clipboard.writeText(statsText.value)
  283. ElMessage.success('复制成功')
  284. } catch (error) {
  285. ElMessage.error('复制失败,请手动复制')
  286. }
  287. }
  288. // 页面宽度
  289. const pageStyle = computed(() => {
  290. // if(appStore.newScene){
  291. if (sm.value) {
  292. return { padding: '15px 10px' }
  293. } else if (md.value) {
  294. return { padding: '15px 20px' }
  295. } else if (lg.value) {
  296. return { padding: '15px 50px' }
  297. } else if (xl.value) {
  298. return { padding: '15px 80px' }
  299. } else if (xxl.value) {
  300. return { padding: '15px 120px' }
  301. } else if (xxxl.value) {
  302. return { padding: '15px 150px' }
  303. }
  304. // }
  305. })
  306. // 获取统计数
  307. let totalSate = reactive<WorkplaceTotal>({
  308. project: 0,
  309. access: 0,
  310. todo: 0
  311. })
  312. const getCount = async () => {
  313. const data = {
  314. project: 40,
  315. access: 2340,
  316. todo: 10
  317. }
  318. totalSate = Object.assign(totalSate, data)
  319. }
  320. // 获取项目数
  321. let projects = reactive<Project[]>([])
  322. const getProject = async () => {
  323. const data = [
  324. {
  325. name: 'ruoyi-vue-pro',
  326. icon: 'akar-icons:github-fill',
  327. message: 'https://github.com/YunaiV/ruoyi-vue-pro',
  328. personal: 'Spring Boot 单体架构',
  329. time: new Date()
  330. },
  331. {
  332. name: 'yudao-ui-admin-vue3',
  333. icon: 'logos:vue',
  334. message: 'https://github.com/yudaocode/yudao-ui-admin-vue3',
  335. personal: 'Vue3 + element-plus',
  336. time: new Date()
  337. },
  338. {
  339. name: 'yudao-ui-admin-vben',
  340. icon: 'logos:vue',
  341. message: 'https://github.com/yudaocode/yudao-ui-admin-vben',
  342. personal: 'Vue3 + vben(antd)',
  343. time: new Date()
  344. },
  345. {
  346. name: 'yudao-cloud',
  347. icon: 'akar-icons:github',
  348. message: 'https://github.com/YunaiV/yudao-cloud',
  349. personal: 'Spring Cloud 微服务架构',
  350. time: new Date()
  351. },
  352. {
  353. name: 'yudao-ui-mall-uniapp',
  354. icon: 'logos:vue',
  355. message: 'https://github.com/yudaocode/yudao-ui-admin-uniapp',
  356. personal: 'Vue3 + uniapp',
  357. time: new Date()
  358. },
  359. {
  360. name: 'yudao-ui-admin-vue2',
  361. icon: 'logos:vue',
  362. message: 'https://github.com/yudaocode/yudao-ui-admin-vue2',
  363. personal: 'Vue2 + element-ui',
  364. time: new Date()
  365. }
  366. ]
  367. projects = Object.assign(projects, data)
  368. }
  369. // 获取通知公告
  370. let notice = reactive<Notice[]>([])
  371. const getNotice = async () => {
  372. const data = [
  373. {
  374. title: '系统支持 JDK 8/17/21,Vue 2/3',
  375. type: '通知',
  376. keys: ['通知', '8', '17', '21', '2', '3'],
  377. date: new Date()
  378. },
  379. {
  380. title: '后端提供 Spring Boot 2.7/3.2 + Cloud 双架构',
  381. type: '公告',
  382. keys: ['公告', 'Boot', 'Cloud'],
  383. date: new Date()
  384. },
  385. {
  386. title: '全部开源,个人与企业可 100% 直接使用,无需授权',
  387. type: '通知',
  388. keys: ['通知', '无需授权'],
  389. date: new Date()
  390. },
  391. {
  392. title: '国内使用最广泛的快速开发平台,超 300+ 人贡献',
  393. type: '公告',
  394. keys: ['公告', '最广泛'],
  395. date: new Date()
  396. }
  397. ]
  398. notice = Object.assign(notice, data)
  399. }
  400. // 获取快捷入口
  401. let shortcut = reactive<Shortcut[]>([])
  402. const getShortcut = async () => {
  403. const data = [
  404. {
  405. name: 'Github',
  406. icon: 'akar-icons:github-fill',
  407. url: 'github.io'
  408. },
  409. {
  410. name: 'Vue',
  411. icon: 'logos:vue',
  412. url: 'vuejs.org'
  413. },
  414. {
  415. name: 'Vite',
  416. icon: 'vscode-icons:file-type-vite',
  417. url: 'https://vitejs.dev/'
  418. },
  419. {
  420. name: 'Angular',
  421. icon: 'logos:angular-icon',
  422. url: 'github.io'
  423. },
  424. {
  425. name: 'React',
  426. icon: 'logos:react',
  427. url: 'github.io'
  428. },
  429. {
  430. name: 'Webpack',
  431. icon: 'logos:webpack',
  432. url: 'github.io'
  433. }
  434. ]
  435. shortcut = Object.assign(shortcut, data)
  436. }
  437. // 用户来源
  438. const getUserAccessSource = async () => {
  439. const data = [
  440. { value: 335, name: 'analysis.directAccess' },
  441. { value: 310, name: 'analysis.mailMarketing' },
  442. { value: 234, name: 'analysis.allianceAdvertising' },
  443. { value: 135, name: 'analysis.videoAdvertising' },
  444. { value: 1548, name: 'analysis.searchEngines' }
  445. ]
  446. set(
  447. pieOptionsData,
  448. 'legend.data',
  449. data.map((v) => t(v.name))
  450. )
  451. pieOptionsData!.series![0].data = data.map((v) => {
  452. return {
  453. name: t(v.name),
  454. value: v.value
  455. }
  456. })
  457. }
  458. const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption
  459. // 周活跃量
  460. const getWeeklyUserActivity = async () => {
  461. const data = [
  462. { value: 13253, name: 'analysis.monday' },
  463. { value: 34235, name: 'analysis.tuesday' },
  464. { value: 26321, name: 'analysis.wednesday' },
  465. { value: 12340, name: 'analysis.thursday' },
  466. { value: 24643, name: 'analysis.friday' },
  467. { value: 1322, name: 'analysis.saturday' },
  468. { value: 1324, name: 'analysis.sunday' }
  469. ]
  470. set(
  471. barOptionsData,
  472. 'xAxis.data',
  473. data.map((v) => t(v.name))
  474. )
  475. set(barOptionsData, 'series', [
  476. {
  477. name: t('analysis.activeQuantity'),
  478. data: data.map((v) => v.value),
  479. type: 'bar'
  480. }
  481. ])
  482. }
  483. const handleAll = () => {
  484. push({
  485. name: 'BpmProcessList',
  486. query: {
  487. activeName: '1'
  488. }
  489. })
  490. }
  491. const handleAllNew = () => {
  492. messageVisible.value = true
  493. }
  494. const handleGoTo = (item) => {
  495. router.push(item.gotoUrl)
  496. }
  497. const currentItem = ref({})
  498. const handleOpen = (row) => {
  499. processId.value = row.processInstanceId
  500. currentItem.value = row
  501. settingVisible.value = true
  502. }
  503. // 获取待审批列表
  504. const params = reactive({
  505. pageNo: 1,
  506. pageSize: 10,
  507. businessType: 1,
  508. queryType: 1
  509. })
  510. const todoTotal = ref(0)
  511. const todoList = ref([])
  512. const todoLoading = ref(false)
  513. const todoDisabled = computed(() => todoLoading.value || todoNoMore.value)
  514. const getTodoList = async () => {
  515. try {
  516. todoLoading.value = true
  517. const data = await ProcessInstanceApi.getMyPage(params)
  518. todoList.value = todoList.value.concat(data.list)
  519. } finally {
  520. todoLoading.value = false
  521. }
  522. }
  523. const todoNoMore = computed(() => todoList.value.length == todoTotal.value)
  524. const loadToDoList = () => {
  525. if(params.pageNo * params.pageSize < todoTotal.value){
  526. params.pageNo += 1
  527. getTodoList()
  528. }
  529. }
  530. // 获取待办列表
  531. const myParams = reactive({
  532. pageNo: 1,
  533. pageSize: 10,
  534. businessType: 0,
  535. queryType: 5
  536. })
  537. const myTotal = ref(0)
  538. const myList = ref([])
  539. const myLoading = ref(false)
  540. const myDisabled = computed(() => myLoading.value || myNoMore.value)
  541. const getMyList = async () => {
  542. // loading.value = true
  543. try {
  544. const data = await ProcessInstanceApi.getMyPage(myParams)
  545. myList.value = myList.value.concat(data.list)
  546. myTotal.value = data.total
  547. } finally {
  548. // loading.value = false
  549. }
  550. }
  551. const myNoMore = computed(() => myList.value.length == myTotal.value)
  552. const loadMyList = () => {
  553. myParams.pageNo += 1
  554. getMyList()
  555. }
  556. // 我的常用
  557. const commonList = ref([])
  558. const handleTo = (item) => {
  559. router.push({ name: item.name })
  560. }
  561. const handleGetIcon = (val) => {
  562. commonList.value = val
  563. }
  564. const commonRef = ref()
  565. const handleAddIcon = async () => {
  566. nextTick(() => {
  567. commonRef.value.init(commonList.value)
  568. })
  569. }
  570. // 获取未读数量
  571. const getTodoCount = async () => {
  572. const res = await ProcessInstanceApi.getBpmListCount({queryType: 0})
  573. todoTotal.value = res.todoCount
  574. }
  575. onMounted(() => {
  576. getTodoList()
  577. getMyList()
  578. getTodoCount()
  579. commonList.value = JSON.parse(localStorage.getItem('common-icon')) || []
  580. })
  581. </script>
  582. <style lang="scss" scoped>
  583. .new-scene {
  584. padding: 15px 240px;
  585. }
  586. .home {
  587. .use {
  588. padding: 13px 17px;
  589. background: linear-gradient(181deg, #dde7ff 0%, #f1f5ff 100%);
  590. border-radius: 12px;
  591. border: 1px solid;
  592. border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) 1 1;
  593. box-sizing: border-box;
  594. .title {
  595. font-weight: 600;
  596. font-size: 16px;
  597. color: #000000;
  598. }
  599. .statistics-panel {
  600. margin-top: 15px;
  601. padding: 16px;
  602. background: #fff;
  603. border-radius: 8px;
  604. .stat-row {
  605. display: flex;
  606. align-items: center;
  607. padding: 12px 0;
  608. border-bottom: 1px solid #e8e8e8;
  609. &:last-child {
  610. border-bottom: none;
  611. }
  612. .stat-label {
  613. display: flex;
  614. align-items: center;
  615. justify-content: center;
  616. width: 100px;
  617. height: 36px;
  618. border-radius: 4px;
  619. color: #fff;
  620. font-size: 14px;
  621. font-weight: 500;
  622. flex-shrink: 0;
  623. &.blue {
  624. background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
  625. }
  626. &.green {
  627. background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
  628. }
  629. .stat-icon {
  630. margin-right: 6px;
  631. font-size: 16px;
  632. }
  633. }
  634. .stat-items {
  635. display: flex;
  636. flex: 1;
  637. justify-content: space-around;
  638. padding-left: 20px;
  639. .stat-item {
  640. display: flex;
  641. align-items: center;
  642. font-size: 14px;
  643. .stat-name {
  644. color: #666;
  645. }
  646. .stat-value {
  647. color: #1890ff;
  648. font-size: 18px;
  649. font-weight: 600;
  650. margin: 0 4px;
  651. }
  652. .stat-unit {
  653. color: #999;
  654. }
  655. }
  656. }
  657. }
  658. }
  659. .icon-wrap {
  660. display: grid;
  661. grid-template-columns: repeat(11, 1fr);
  662. gap: 20;
  663. margin-top: 15px;
  664. padding: 16px;
  665. box-sizing: border-box;
  666. .icon-item {
  667. min-width: 100px;
  668. text-align: center;
  669. cursor: pointer;
  670. .icon {
  671. width: 56px;
  672. height: 56px;
  673. border-radius: 16px;
  674. margin-bottom: 4px;
  675. }
  676. .text {
  677. margin-top: 12px;
  678. font-weight: 400;
  679. font-size: 16px;
  680. color: #2a2f42;
  681. }
  682. }
  683. }
  684. }
  685. .flow {
  686. .box {
  687. box-sizing: border-box;
  688. padding: 20px;
  689. border: 2px solid #fff;
  690. border-radius: 10px;
  691. background-color: #f2f6fc;
  692. .header {
  693. display: flex;
  694. justify-content: space-between;
  695. align-items: center;
  696. font-size: 16px;
  697. .title {
  698. font-size: 18px;
  699. font-weight: bolder;
  700. .num {
  701. color: var(--el-color-danger);
  702. }
  703. }
  704. .all {
  705. display: flex;
  706. background-color: #f2f6fc;
  707. align-items: center;
  708. cursor: pointer;
  709. }
  710. }
  711. .content {
  712. margin-top: 15px;
  713. .infinite-list {
  714. padding: 0;
  715. margin: 0;
  716. list-style: none;
  717. height: 380px;
  718. overflow: hidden;
  719. overflow-y: auto;
  720. }
  721. .item {
  722. display: flex;
  723. justify-content: space-between;
  724. align-items: center;
  725. padding: 20px;
  726. margin-bottom: 10px;
  727. background-color: #fff;
  728. border-radius: 10px;
  729. cursor: pointer;
  730. .left {
  731. display: flex;
  732. flex-direction: column;
  733. overflow: hidden; /* 隐藏溢出内容 */
  734. .title {
  735. font-size: 16px;
  736. font-weight: bold;
  737. margin-bottom: 10px;
  738. overflow: hidden;
  739. text-overflow: ellipsis; /* 当文本溢出时显示省略号 */
  740. white-space: nowrap; /* 禁止文本换行 */
  741. }
  742. .desc {
  743. font-size: 14px;
  744. }
  745. .time {
  746. font-size: 16px;
  747. margin-top: 10px;
  748. color: #666;
  749. }
  750. }
  751. .right {
  752. cursor: pointer;
  753. }
  754. }
  755. }
  756. }
  757. .grey {
  758. font-size: 12px;
  759. margin-top: 10px;
  760. color: #999999;
  761. text-align: center;
  762. }
  763. }
  764. ::-webkit-scrollbar {
  765. width: 3px; //滚动条宽度
  766. }
  767. ::-webkit-scrollbar-thumb {
  768. //上层
  769. border-radius: 10px; //滚动条圆弧半径
  770. //-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); //滚动条阴影
  771. background: var(--el-border-color-dark); //背景颜色
  772. }
  773. ::-webkit-scrollbar-track {
  774. //底层
  775. //-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  776. border-radius: 0;
  777. background: #f7f8fa;
  778. }
  779. }
  780. </style>
  781. <style lang="scss">
  782. .home {
  783. .use {
  784. .el-scrollbar {
  785. .is-vertical {
  786. display: none !important;
  787. }
  788. }
  789. }
  790. }
  791. </style>