home.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1. <template>
  2. <view class="ss">
  3. <!-- 头 -->
  4. <uni-nav-bar fixed="true" statusBar="true" right-icon="scan" title="首页"
  5. @clickRight="HandlScanCode">
  6. <template v-slot:left>
  7. <uni-badge size="small" :text="messageCount" absolute="righttop" type="error">
  8. <uni-icons type="notification" size="24" @click="handleMessage"></uni-icons>
  9. </uni-badge>
  10. </template>
  11. </uni-nav-bar>
  12. <!-- <uni-nav-bar fixed="true" statusBar="true" title="工作台"></uni-nav-bar> -->
  13. <view class="container">
  14. <navigation :workOrder="workOrder" ref="navigationRef"></navigation>
  15. <!-- 设备主管 -->
  16. <view v-if="$isAuthorities('pda:home:equipmentSupervisor')">
  17. <equipment ref="equipmentRef"></equipment>
  18. </view>
  19. <!-- 运维 -->
  20. <view v-else-if="$isAuthorities('pda:home:operation')">
  21. <Mocha ref="mochaRef"></Mocha>
  22. </view>
  23. <!-- 生产管理 -->
  24. <view v-else-if="$isAuthorities('pda:home:production')">
  25. <production ref="productionRef"></production>
  26. </view>
  27. <!-- 模具舟皿 -->
  28. <view v-else-if="$isAuthorities('pda:home:moldBoat')">
  29. <mould ref="mouldRef"></mould>
  30. </view>
  31. <!-- 备品备件 -->
  32. <view v-else-if="$isAuthorities('pda:home:spareParts')">
  33. <sparePart ref="sparePartRef"></sparePart>
  34. </view>
  35. <!-- 管理 -->
  36. <view v-else-if="$isAuthorities('pda:home:manage')">
  37. <homeNew ref="homeNewRef"></homeNew>
  38. </view>
  39. <view v-else>
  40. <view class="data-middle">
  41. <view class="cell">
  42. <view class="num">
  43. {{homeData.totalFinishedProducts}}
  44. </view>
  45. <view class="label">
  46. 成品库存总量
  47. </view>
  48. </view>
  49. <view class="cell">
  50. <view class="num">
  51. {{homeData.totalRawMaterials}}
  52. </view>
  53. <view class="label">
  54. 物料库存总量
  55. </view>
  56. </view>
  57. <view class="cell">
  58. <view class="num">
  59. {{homeData.goodsCount}}
  60. </view>
  61. <view class="label">
  62. 商品列表
  63. </view>
  64. </view>
  65. <view class="cell">
  66. <view class="num">
  67. {{homeData.yearAmount}}
  68. </view>
  69. <view class="label">
  70. 年度合同金额(万元)
  71. </view>
  72. </view>
  73. <view class="cell">
  74. <view class="num">
  75. {{homeData.receivableAmount}}
  76. </view>
  77. <view class="label">
  78. 应收金额(万元)
  79. </view>
  80. </view>
  81. <view class="cell">
  82. <view class="num">
  83. {{homeData.payableAmount}}
  84. </view>
  85. <view class="label">
  86. 应付金额(万元)
  87. </view>
  88. </view>
  89. </view>
  90. <view class="data-rank">
  91. <view class="tab-top">
  92. <view class="tab-item" v-for="(item,index) in tabList" :key="index">
  93. <view :class="{active: activeIndex == item.index}" @click="handleTabChange(item)">
  94. {{item.name}}
  95. </view>
  96. </view>
  97. </view>
  98. <!-- <uni-table class="table" ref="table" emptyText="暂无更多数据">
  99. <uni-tr class="table-title">
  100. <uni-th align="center" width="100">产品编码</uni-th>
  101. <uni-th align="center">名称</uni-th>
  102. <uni-th align="center" width="100">销量</uni-th>
  103. </uni-tr>
  104. <uni-tr v-for="(item, index) in tableData" :key="index">
  105. <uni-td>{{index+1}}.{{item.productCode}}</uni-td>
  106. <uni-td>{{item.productName}}</uni-td>
  107. <uni-td align="center">{{item.totalSaleCount}}</uni-td>
  108. </uni-tr>
  109. </uni-table> -->
  110. <view class="table-title" style="text-align: center;">
  111. <view class="code">产品编码</view>
  112. <view class="name">名称</view>
  113. <view class="total">销量</view>
  114. </view>
  115. <view class="table-content" v-for="(item,index) in tableData">
  116. <view class="code">
  117. <view class="index">{{index+1}}.</view>
  118. <view class="value">{{item.productCode}}</view>
  119. </view>
  120. <view class="name">{{item.productName}}</view>
  121. <view class="total">{{item.totalSaleCount}}</view>
  122. </view>
  123. </view>
  124. <view class="data-bottom">
  125. <view class="cell">
  126. <view class="num">
  127. {{this.homeData.yearProduceAmount}}
  128. </view>
  129. <view class="label">
  130. 年度生产总量
  131. </view>
  132. </view>
  133. <view class="cell">
  134. <view class="num">
  135. {{this.homeData.monthProduceAmount}}
  136. </view>
  137. <view class="label">
  138. 月生产总量
  139. </view>
  140. </view>
  141. <view class="cell">
  142. <view class="num">
  143. {{homeData.pendingAmount}}
  144. </view>
  145. <view class="label">
  146. 待生产总量
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. </view>
  152. </view>
  153. </template>
  154. <script>
  155. import navigation from './components/navigation.vue'
  156. import equipment from './pages/equipment/equipment.vue'
  157. import Mocha from './pages/Mocha/Mocha.vue'
  158. import mould from './pages/mould/mould.vue'
  159. import production from './pages/production/production.vue'
  160. import sparePart from './pages/sparePart/sparePart.vue'
  161. import ScanCode from '@/components/ScanCode.vue'
  162. import homeNew from './homeNew.vue'
  163. import {
  164. getUnreadNotifyMessageCountAPI
  165. } from '@/api/wt/index.js'
  166. import {
  167. getDateNew,
  168. yuanToWan
  169. } from '@/utils/utils.js'
  170. import {
  171. postJ,
  172. post,
  173. get
  174. } from '@/utils/api'
  175. import {
  176. statistics
  177. } from '@/api/myTicket'
  178. import {
  179. getCount,
  180. getYearAmount,
  181. getPayableAmount,
  182. getReceivableAmount,
  183. getGoodsPage,
  184. getProduceAmount,
  185. // getPendingAmount,
  186. getHotProduct
  187. }
  188. from '@/api/home'
  189. export default {
  190. components: {
  191. navigation,
  192. equipment,
  193. Mocha,
  194. mould,
  195. sparePart,
  196. ScanCode,
  197. production,
  198. homeNew
  199. },
  200. onShow() {
  201. this.init()
  202. // tab 切换回来时刷新 manage 图表数据
  203. this.$refs.homeNewRef?.refreshManage()
  204. let _this = this
  205. uni.$off('scancodedate') // 每次进来先 移除全局自定义事件监听器
  206. uni.$on('scancodedate', function(data) {
  207. console.log(data, '-----scancodedate')
  208. _this.cbScancodedate(data)
  209. })
  210. // this.getStatistics()
  211. // this.Scancodedate()
  212. },
  213. onLoad() {
  214. this.getHomeData()
  215. // this.initPush()
  216. // this.getStatistics()
  217. },
  218. onUnload() {
  219. uni.$off('scancodedate')
  220. clearTimeout(this.timer);
  221. },
  222. onHide() {
  223. uni.$off('scancodedate')
  224. clearTimeout(this.timer);
  225. },
  226. data() {
  227. return {
  228. roleId: null,
  229. timer: null,
  230. qrContent: null,
  231. barType: null,
  232. cid:'',
  233. // 扫码后的设备信息
  234. equipmentInfo: '',
  235. qrContent: '',
  236. barType: '',
  237. messageCount: 0,
  238. workOrder: {
  239. maintenanceNum: 0,
  240. patrolInspection: 0,
  241. quantityNum: 0,
  242. repairsNum: 0,
  243. total: 0
  244. }, // 工单统计数据
  245. activeIndex: 0,
  246. tabList: [{
  247. name: '热销品排行榜',
  248. index: 0,
  249. }, {
  250. name: '滞销品排行榜',
  251. index: 1,
  252. }],
  253. tableData: [],
  254. homeData: {
  255. totalFinishedProducts: '',
  256. totalRawMaterials: '',
  257. goodsCount: '',
  258. yearAmount: '',
  259. receivableAmount: '',
  260. payableAmount: '',
  261. yearProduceAmount: '',
  262. monthProduceAmount: '',
  263. pendingAmount: ''
  264. },
  265. hotProductList: [],
  266. }
  267. },
  268. created() {
  269. this.getCount()
  270. uni.getStorage({
  271. key: 'userInfo',
  272. success: res => {
  273. // console.log(res);
  274. this.roleId = res.data.roleId[0]
  275. }
  276. })
  277. },
  278. methods: {
  279. handleMessage() {
  280. uni.navigateTo({
  281. url: '/pages/home/wt/message/message'
  282. })
  283. },
  284. async getCount() {
  285. // const res = await getTodoList({}, false)
  286. // this.workList[0].badge = res.count
  287. const messageCount = await getUnreadNotifyMessageCountAPI()
  288. this.messageCount = Number(messageCount)
  289. },
  290. init() {
  291. this.getStatistics()
  292. // this.$refs.navigationRef && this.$refs.navigationRef.getCount()
  293. // this.$refs.equipmentRef && this.$refs.equipmentRef.getData()
  294. // this.$refs.mochaRef && this.$refs.mochaRef.getData()
  295. // this.$refs.mouldRef &&
  296. // (this.$refs.mouldRef.getBoatInventoryCountList(),
  297. // this.$refs.mouldRef.getModeInventoryCountList())
  298. // this.$refs.sparePartRef && this.$refs.sparePartRef.getData()
  299. this.timer = setTimeout(() => {
  300. console.log('timer~~~home')
  301. this.init()
  302. }, 12000)
  303. },
  304. // 获取工单统计数
  305. getStatistics() {
  306. statistics().then(res => {
  307. this.workOrder = res
  308. })
  309. },
  310. // 相机扫码
  311. HandlScanCode() {
  312. uni.scanCode({
  313. success: (res) => {
  314. const scanResult = res.result;
  315. if(scanResult && scanResult.includes("/pages/warehouse/hwQrcode/index")) {
  316. uni.navigateTo({
  317. url: `${scanResult}`,
  318. });
  319. return
  320. }
  321. this.Scancodedate(res.result)
  322. }
  323. })
  324. //_this.Scancodedate('res')
  325. },
  326. // 根据条码请求设备数据
  327. getData() {
  328. let par = {
  329. barType: this.barType,
  330. qrContent: this.qrContent
  331. }
  332. this.equipmentInfo = {}
  333. return postJ(this.apiUrl + '/scan/getAssetInfo', par)
  334. .then(res => {
  335. console.log(res.data)
  336. this.equipmentInfo = res.data
  337. })
  338. .catch(err => {
  339. console.log(err, 'err-----------------')
  340. uni.showToast({
  341. title: '系统错误!',
  342. icon: 'none',
  343. duration: 2000
  344. })
  345. })
  346. },
  347. // 扫码枪扫码
  348. cbScancodedate(data) {
  349. this.Scancodedate(data.code)
  350. },
  351. async Scancodedate(code) {
  352. this.qrContent = code.trim()
  353. // this.qrContent = 'w01000002100001@_@0' //code.trim()
  354. //this.qrContent = '005/w01000001120041/锤锤专用02-不拆包-批量/规格01//成型/成型工序@_@0'
  355. this.barType = this.setBarType(this.qrContent)
  356. await this.getData()
  357. if (this.equipmentInfo.assetCode) {
  358. if (this.equipmentInfo.assetType != 1) {
  359. uni.showToast({
  360. title: '请扫描生产设备码!',
  361. icon: 'none',
  362. duration: 2000
  363. })
  364. return
  365. }
  366. let par = {
  367. info: encodeURIComponent(JSON.stringify(this.equipmentInfo)),
  368. qrContent: this.qrContent
  369. }
  370. par = this.URLSearchParams(par)
  371. console.log('qrwewett')
  372. uni.navigateTo({
  373. url: '/pages/equipment_ledger/index?' + par
  374. })
  375. }
  376. },
  377. // 设置barType
  378. setBarType(val) {
  379. let index = val.indexOf('@_@')
  380. let result = 0
  381. if (index !== -1) {
  382. let item = val.substr(index + 3, 1)
  383. if (item) {
  384. result = Number(item)
  385. }
  386. }
  387. return result
  388. },
  389. // 切换排行版tab
  390. handleTabChange(item) {
  391. this.activeIndex = item.index
  392. this.tableData
  393. // console.log(item);
  394. },
  395. async getHomeData() {
  396. uni.showLoading({
  397. title: '加载中'
  398. })
  399. const res1 = await getCount()
  400. const res2 = await getGoodsPage()
  401. const res3 = await getYearAmount()
  402. const res4 = await getReceivableAmount()
  403. const res5 = await getPayableAmount()
  404. // 年度
  405. const res6 = await getProduceAmount({
  406. createTimeStart: getDateNew('year') + '-01',
  407. createTimeEnd: getDateNew('year') + '-12',
  408. factoryId: null
  409. })
  410. // 本月
  411. const res7 = await getProduceAmount({
  412. createTimeStart: getDateNew('month'),
  413. createTimeEnd: getDateNew('month'),
  414. factoryId: null
  415. })
  416. const res9 = await getHotProduct()
  417. this.homeData.totalFinishedProducts = res1?.totalFinishedProducts ?? 0
  418. this.homeData.totalRawMaterials = res1?.totalRawMaterials ?? 0
  419. this.homeData.goodsCount = res2?.count ?? 0
  420. this.homeData.yearAmount = yuanToWan(res3 ?? 0)
  421. this.homeData.receivableAmount = yuanToWan(res4 ?? 0)
  422. this.homeData.payableAmount = yuanToWan(res5 ?? 0)
  423. this.homeData.yearProduceAmount = res6?.reduce((pre, cur) => {
  424. return pre + cur?.formedNum
  425. }, 0) ?? 0
  426. this.homeData.monthProduceAmount = res7?.reduce((pre, cur) => {
  427. return pre + cur?.formedNum
  428. }, 0) ?? 0
  429. this.homeData.pendingAmount = res6?.reduce((pre, cur) => {
  430. return pre + cur?.pendingProductionCount
  431. }, 0) ?? 0
  432. this.hotProductList = res9
  433. this.tableData = this.hotProductList.slice(0, 4)
  434. uni.hideLoading()
  435. },
  436. /**
  437. * 初始化推送功能(仅App端执行)
  438. */
  439. initPush() {
  440. // 1. 申请Android通知权限(Android 13+ 需要动态申请POST_NOTIFICATIONS)
  441. this.requestNotificationPermission()
  442. // 2. 获取设备推送标识(cid),用于服务端定向推送
  443. this.getPushClientId()
  444. // 3. 监听推送消息的到达和点击事件
  445. this.setupPushListeners()
  446. },
  447. /**
  448. * 申请Android通知权限
  449. * 参考文档:https://uniapp.dcloud.net.cn/tutorial/app-push-unipush.html
  450. */
  451. requestNotificationPermission() {
  452. // #ifdef APP-PLUS
  453. if (plus.os.name === 'Android') {
  454. // Android 13(API 33)及以上需要申请 POST_NOTIFICATIONS 权限
  455. plus.android.requestPermissions(
  456. ['android.permission.POST_NOTIFICATIONS'],
  457. function(e) {
  458. console.log('通知权限申请结果:', e)
  459. },
  460. function(e) {
  461. console.error('通知权限申请失败:', e)
  462. }
  463. )
  464. }
  465. // 检测当前通知授权状态,若被拒绝则引导用户去设置页面开启
  466. const notificationAuthorized = uni.getAppAuthorizeSetting().notificationAuthorized
  467. if (notificationAuthorized === 'denied') {
  468. uni.showModal({
  469. title: '提示',
  470. content: '请开启通知权限,以便接收重要消息提醒',
  471. success: (res) => {
  472. if (res.confirm) {
  473. // 跳转到应用设置页面
  474. uni.openAppAuthorizeSetting()
  475. }
  476. }
  477. })
  478. }
  479. // #endif
  480. },
  481. /**
  482. * 获取设备推送标识(cid/clientid)
  483. * 该标识用于服务端向指定设备推送消息,需要在服务端存储并与用户账号关联
  484. * 参考:https://uniapp.dcloud.net.cn/tutorial/app-push-unipush.html
  485. */
  486. getPushClientId() {
  487. uni.getPushClientId({
  488. success: (res) => {
  489. console.log('获取cid成功:', res.cid)
  490. // TODO: 将 cid 发送到你的后端服务器,与当前登录用户关联
  491. this.sendCidToServer(res.cid)
  492. },
  493. fail: (err) => {
  494. console.error('获取cid失败:', err)
  495. // 获取失败时,延迟重试
  496. setTimeout(() => {
  497. this.getPushClientId()
  498. }, 2000)
  499. }
  500. })
  501. },
  502. /**
  503. * 将设备cid发送到后端服务器
  504. * @param {string} cid 设备推送标识
  505. */
  506. sendCidToServer(cid) {
  507. // 示例:使用 uni.request 发送到你的后端接口
  508. // uni.request({
  509. // url: 'https://your-server.com/api/push/register',
  510. // method: 'POST',
  511. // data: { cid: cid },
  512. // success: (res) => {
  513. // console.log('cid上报成功')
  514. // }
  515. // })
  516. this.cid=cid
  517. console.log('TODO: 将cid发送到后端,cid:', cid)
  518. },
  519. /**
  520. * 监听推送消息(接收和点击事件)
  521. * 参考:https://uniapp.dcloud.net.cn/tutorial/app-push-unipush.html
  522. */
  523. setupPushListeners() {
  524. // 监听透传消息(应用在前台或后台接收,自定义处理)
  525. uni.onPushMessage((res) => {
  526. console.log('收到推送消息:', JSON.stringify(res))
  527. // 消息类型:click 表示用户点击通知栏消息,receive 表示收到消息(未点击)
  528. if (res.type === 'receive') {
  529. // 收到消息,根据业务需求处理
  530. this.handlePushReceive(res.data)
  531. } else if (res.type === 'click') {
  532. // 用户点击通知栏消息
  533. this.handlePushClick(res.data)
  534. }
  535. })
  536. },
  537. /**
  538. * 处理收到推送消息(未点击)
  539. * @param {object} payload 推送携带的自定义数据
  540. */
  541. handlePushReceive(payload) {
  542. console.log('收到推送数据:', payload)
  543. // 示例:根据业务类型处理
  544. // if (payload.type === 'chat') {
  545. // // 聊天消息:更新聊天记录
  546. // this.updateChatList(payload)
  547. // } else if (payload.type === 'order') {
  548. // // 订单消息:更新订单状态
  549. // this.refreshOrderStatus(payload)
  550. // }
  551. // 如果需要在应用内弹框提示,可自行实现
  552. uni.showToast({
  553. title: payload?.title || '收到新消息',
  554. icon: 'none',
  555. duration: 2000
  556. })
  557. },
  558. /**
  559. * 处理用户点击通知栏消息
  560. * @param {object} payload 推送携带的自定义数据
  561. */
  562. handlePushClick(payload) {
  563. console.log('点击推送消息:', payload)
  564. // 根据 payload 中的数据跳转到指定页面
  565. // 例如:payload = { page: '/pages/message/detail', id: '123' }
  566. if (payload?.page) {
  567. uni.navigateTo({
  568. url: payload.page + (payload.id ? '?id=' + payload.id : ''),
  569. fail: (err) => {
  570. console.error('跳转失败:', err)
  571. // 跳转失败则跳转到首页
  572. uni.switchTab({
  573. url: '/pages/index/index'
  574. })
  575. }
  576. })
  577. } else if (payload?.url) {
  578. // 支持外部链接跳转
  579. uni.navigateTo({
  580. url: '/pages/webview/index?url=' + encodeURIComponent(payload.url)
  581. })
  582. } else {
  583. // 默认跳转到消息中心页面
  584. uni.navigateTo({
  585. url: '/pages/message/index'
  586. })
  587. }
  588. }
  589. }
  590. }
  591. </script>
  592. <style>
  593. page {
  594. background-color: #f0f0f0;
  595. }
  596. </style>
  597. <style lang="scss" scoped>
  598. // /deep/.uni-page-wrapper{
  599. // background-color: pink;
  600. // }
  601. /deep/.uni-table {
  602. min-width: auto !important;
  603. border-radius: 0;
  604. }
  605. page {
  606. background-color: #f0f0f0;
  607. }
  608. .container {
  609. background-color: $page-bg;
  610. padding: 20rpx;
  611. .data-middle {
  612. display: flex;
  613. flex-wrap: wrap;
  614. justify-content: space-between;
  615. .cell {
  616. display: flex;
  617. width: 30%;
  618. padding: 20rpx 0;
  619. margin-bottom: 20rpx;
  620. flex-direction: column;
  621. background-color: rgb(22, 146, 50);
  622. justify-content: center;
  623. align-items: center;
  624. border-radius: 10rpx;
  625. color: #fff;
  626. .num {
  627. font-size: 28rpx;
  628. }
  629. .label {
  630. font-size: 20rpx;
  631. }
  632. }
  633. }
  634. .data-rank {
  635. width: 100%;
  636. padding: 10rpx 20rpx 0 20rpx;
  637. margin-bottom: 20rpx;
  638. background-color: #fff;
  639. border-radius: 20rpx 20rpx 0 0rpx;
  640. .tab-top {
  641. display: flex;
  642. margin-bottom: 20rpx;
  643. .tab-item {
  644. margin-right: 20rpx;
  645. .active {
  646. border-bottom: 2px solid rgb(22, 146, 50);
  647. }
  648. }
  649. }
  650. .table-title {
  651. width: 100%;
  652. display: flex;
  653. color: #333;
  654. flex-wrap: nowrap;
  655. justify-content: space-between;
  656. .code {
  657. width: 40%;
  658. word-break: normal
  659. }
  660. .name {
  661. width: 40%;
  662. word-break: normal
  663. }
  664. .total {
  665. width: 15%;
  666. word-break: normal
  667. }
  668. }
  669. .table-content {
  670. font-size: 28rpx;
  671. display: flex;
  672. padding: 10rpx 0;
  673. width: 100%;
  674. color: #333;
  675. flex-wrap: nowrap;
  676. justify-content: space-between;
  677. border-bottom: 1px solid #eee;
  678. .code {
  679. display: flex;
  680. width: 40%;
  681. .index {
  682. width: 20rpx;
  683. margin-right: 20rpx;
  684. }
  685. .value {
  686. word-break: break-all;
  687. flex: 1;
  688. }
  689. }
  690. .name {
  691. width: 40%;
  692. white-space: nowarp;
  693. over-flow: hidden;
  694. text-overflow: ellipsip;
  695. word-break: break-all;
  696. }
  697. .total {
  698. text-align: center;
  699. width: 15%;
  700. white-space: nowarp;
  701. over-flow: hidden;
  702. text-overflow: ellipsip;
  703. word-break: break-all;
  704. }
  705. }
  706. }
  707. .data-rank .table-content:last-child {
  708. border-bottom: none;
  709. }
  710. .data-bottom {
  711. display: flex;
  712. flex-wrap: wrap;
  713. justify-content: space-between;
  714. .cell {
  715. display: flex;
  716. width: 30%;
  717. padding: 20rpx 0;
  718. margin-bottom: 20rpx;
  719. flex-direction: column;
  720. background-color: #fff;
  721. justify-content: center;
  722. align-items: center;
  723. border-radius: 10rpx;
  724. color: #000;
  725. .num {
  726. font-size: 28rpx;
  727. }
  728. .label {
  729. font-size: 20rpx;
  730. }
  731. }
  732. }
  733. }
  734. </style>