Index.vue 23 KB

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