daYiReservation.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. <!-- 数据看板-大仪预约 -->
  2. <template>
  3. <view class="daYiReservation">
  4. <view class="chart">
  5. <view class="chart-t">
  6. <viwe class="chart-t-l">
  7. <text>设备总数:</text>
  8. <text>325</text>
  9. </viwe>
  10. <viwe class="chart-tab">
  11. <view class="chart-tab-li" :class="chartTabIndex==index?'tab-A':'tab-B'"
  12. v-for="(item,index) in chartTabList" :key="index" @click="chartTabClick(index)">{{item}}</view>
  13. </viwe>
  14. </view>
  15. <view class="chart-b">
  16. <qiun-data-charts type="ring" :opts="opts" :echartsH5="true" :chartData="chartData" />
  17. </view>
  18. </view>
  19. <view class="statistics">
  20. <view class="statistics-b">
  21. <view class="statistics-b-li">
  22. <view class="statistics-b-li-t">
  23. <text class="color-A">9999</text>
  24. <text class="color-A">小时</text>
  25. </view>
  26. <view class="statistics-b-li-b">使用机时</view>
  27. </view>
  28. <view class="line"></view>
  29. <view class="statistics-b-li">
  30. <view class="statistics-b-li-t">
  31. <text class="color-B">¥</text>
  32. <text class="color-B">56460.63</text>
  33. </view>
  34. <view class="statistics-b-li-b">预约费用</view>
  35. </view>
  36. <view class="line"></view>
  37. <view class="statistics-b-li">
  38. <view class="statistics-b-li-t">
  39. <text class="color-C">333</text>
  40. <text class="color-C">个</text>
  41. </view>
  42. <view class="statistics-b-li-b">预约费用</view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="small-title">
  47. <view class="small-title-l">预约使用排行TOP10</view>
  48. <viwe class="chart-tab-tow">
  49. <view class="chart-tab-li" :class="chartTabIndexTow==index?'tab-A':'tab-B'"
  50. v-for="(item,index) in chartTabListTow" :key="index" @click="chartTabClickTow(index)">{{item}}
  51. </view>
  52. </viwe>
  53. </view>
  54. <!-- -->
  55. <view class="table">
  56. <uni-card>
  57. <view style="height: 200px">
  58. <zb-table :columns="column" :stripe="false" :border="false" :data="dataList"></zb-table>
  59. </view>
  60. </uni-card>
  61. </view>
  62. <!-- -->
  63. <view class="small-title">
  64. <view class="small-title-l">一年内空闲率排行TOP10</view>
  65. </view>
  66. <view class="table-tow">
  67. <uni-card>
  68. <view style="height: 200px">
  69. <zb-table :columns="column2" :stripe="false" :border="false" :data="dataList"></zb-table>
  70. </view>
  71. </uni-card>
  72. </view>
  73. <view class="small-title">
  74. <view class="small-title-l">安全隐患统计</view>
  75. </view>
  76. <view class="small-title-tow">
  77. <view class="small-title-tow-l">安全检查校级巡查计划标题标题标题标题标题</view>
  78. <img class="small-title-tow-r" src="@/pages/images/dataBoard/icon_06.png">
  79. </view>
  80. <view class="chart-tow">
  81. <view class="chart-tow-b">
  82. <qiun-data-charts type="radar" :opts="optsTow" :echartsH5="true" :chartData="chartDataTow" />
  83. </view>
  84. </view>
  85. </view>
  86. </template>
  87. <script>
  88. import {
  89. config
  90. } from '@/api/request/config.js'
  91. import {
  92. } from '@/pages_basics/api/index.js'
  93. export default {
  94. name: "daYiReservation",
  95. components: {
  96. },
  97. data() {
  98. return {
  99. opts: {
  100. rotate: false,
  101. rotateLock: false,
  102. color: ["#10C139", "#FF8400", "#0183FA", "#EE6666", "#73C0DE", "#3CA272", ],
  103. padding: [5, 5, 5, 5],
  104. dataLabel: true,
  105. enableScroll: false,
  106. legend: {
  107. show: true,
  108. position: "right",
  109. fontColor: '#fff',
  110. },
  111. title: {
  112. name: "",
  113. },
  114. subtitle: {
  115. name: "",
  116. },
  117. extra: {
  118. ring: {
  119. ringWidth: 10,
  120. centerColor: '#3E414F',
  121. activeOpacity: 0.5,
  122. activeRadius: 20,
  123. offsetAngle: 0,
  124. labelWidth: 15,
  125. border: true,
  126. borderWidth: 3,
  127. borderColor: "#3E414F"
  128. }
  129. }
  130. },
  131. chartData: {},
  132. optsTow: {
  133. color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
  134. "#ea7ccc"
  135. ],
  136. padding: [5, 5, 5, 5],
  137. dataLabel: false,
  138. enableScroll: false,
  139. legend: {
  140. show: false,
  141. position: "right",
  142. lineHeight: 25
  143. },
  144. extra: {
  145. radar: {
  146. gridType: "radar",
  147. gridColor: "#CCCCCC",
  148. gridCount: 3,
  149. opacity: 0.2,
  150. max: 200,
  151. labelShow: true,
  152. border: true,
  153. labelColor: '#fff',
  154. }
  155. }
  156. },
  157. chartDataTow: {},
  158. chartTabList: ['日', '月', '年'],
  159. chartTabIndex: 0,
  160. chartTabListTow: ['按资费', '按机时', '按样品'],
  161. chartTabIndexTow: 0,
  162. // 查询参数
  163. queryParams: {
  164. page: 1,
  165. pageSize: 10,
  166. },
  167. column: [{
  168. type: 'index',
  169. label: '排行',
  170. fixed: true,
  171. width: 60,
  172. align: 'center',
  173. },
  174. {
  175. name: 'data1',
  176. label: '设备名称',
  177. fixed: true,
  178. width: 80,
  179. align: 'center',
  180. },
  181. {
  182. name: 'data2',
  183. label: '使用机时',
  184. align: 'center',
  185. },
  186. {
  187. name: 'data3',
  188. label: '预约费用',
  189. align: 'center',
  190. },
  191. {
  192. name: 'data4',
  193. label: '测试样品',
  194. align: 'center',
  195. },
  196. ],
  197. column2: [{
  198. type: 'index',
  199. label: '排行',
  200. fixed: true,
  201. width: 60,
  202. align: 'center',
  203. },
  204. {
  205. name: 'data1',
  206. label: '设备名称',
  207. fixed: true,
  208. width: 80,
  209. align: 'center',
  210. },
  211. {
  212. name: 'data2',
  213. label: '预约时长',
  214. align: 'center',
  215. },
  216. {
  217. name: 'data3',
  218. label: '空闲率',
  219. align: 'center',
  220. },
  221. ],
  222. dataList: [{
  223. data1: '压力容器',
  224. data2: '468',
  225. data3: '47',
  226. data4: '220',
  227. data5: '137',
  228. },
  229. {
  230. data1: '浓缩设备',
  231. data2: '367',
  232. data3: '7',
  233. data4: '120',
  234. data5: '37',
  235. },
  236. {
  237. data1: '高压灭菌锅',
  238. data2: '343',
  239. data3: '71',
  240. data4: '10',
  241. data5: '37',
  242. },
  243. {
  244. data1: '纯水设备',
  245. data2: '256',
  246. data3: '7',
  247. data4: '120',
  248. data5: '37',
  249. },
  250. {
  251. data1: '二氧化碳培养箱',
  252. data2: '232',
  253. data3: '71',
  254. data4: '10',
  255. data5: '37',
  256. },
  257. ],
  258. dataList: [{
  259. data1: '压力容器',
  260. data2: '468',
  261. data3: '88',
  262. data4: '220',
  263. data5: '137',
  264. },
  265. {
  266. data1: '浓缩设备',
  267. data2: '367',
  268. data3: '56',
  269. data4: '120',
  270. data5: '37',
  271. },
  272. {
  273. data1: '高压灭菌锅',
  274. data2: '343',
  275. data3: '42',
  276. data4: '10',
  277. data5: '37',
  278. },
  279. {
  280. data1: '纯水设备',
  281. data2: '256',
  282. data3: '34',
  283. data4: '120',
  284. data5: '37',
  285. },
  286. {
  287. data1: '二氧化碳培养箱',
  288. data2: '232',
  289. data3: '22',
  290. data4: '10',
  291. data5: '37',
  292. },
  293. ],
  294. total: 0,
  295. }
  296. },
  297. created() {
  298. },
  299. beforeMount() {
  300. },
  301. mounted() {
  302. this.getServerData()
  303. this.getServerDataTow()
  304. },
  305. methods: {
  306. getServerData() {
  307. //模拟从服务器获取数据时的延时
  308. setTimeout(() => {
  309. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  310. let res = {
  311. series: [{
  312. data: [{
  313. "name": "预约",
  314. "value": 50,
  315. "labelShow": false
  316. }, {
  317. "name": "空闲",
  318. "value": 30,
  319. "labelShow": false
  320. }, {
  321. "name": "锁定",
  322. "value": 20,
  323. "labelShow": false
  324. }, ]
  325. }]
  326. };
  327. this.chartData = JSON.parse(JSON.stringify(res));
  328. }, 500);
  329. },
  330. getServerDataTow() {
  331. //模拟从服务器获取数据时的延时
  332. setTimeout(() => {
  333. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  334. let res = {
  335. categories: ["测定仪", "色谱仪", "分析仪", "光度计", "离子色谱仪"],
  336. series: [{
  337. name: "",
  338. data: [90, 110, 165, 195, 187]
  339. },
  340. ]
  341. };
  342. this.chartDataTow = JSON.parse(JSON.stringify(res));
  343. }, 500);
  344. },
  345. chartTabClick(index) {
  346. this.chartTabIndex = index;
  347. },
  348. chartTabClickTow(index) {
  349. this.chartTabIndexTow = index;
  350. },
  351. },
  352. }
  353. </script>
  354. <style lang="stylus" scoped>
  355. .daYiReservation {
  356. height: 100%;
  357. width: 100%;
  358. background: #363744;
  359. padding: 20rpx 0rpx 0;
  360. box-sizing: border-box;
  361. .chart {
  362. width: 690rpx;
  363. height: 380rpx;
  364. background: #3E414F;
  365. border-radius: 20rpx 20rpx 20rpx 20rpx;
  366. overflow: hidden;
  367. margin: 0 30rpx;
  368. .chart-t {
  369. display: flex;
  370. justify-content: space-between;
  371. align-items: center;
  372. height: 50rpx;
  373. margin-top: 30rpx;
  374. padding: 0 24rpx 0 42rpx;
  375. box-sizing: border-box;
  376. .chart-t-l {
  377. >text {
  378. font-weight: 400;
  379. font-size: 30rpx;
  380. color: #FFFFFF;
  381. line-height: 42rpx;
  382. }
  383. >text:nth-of-type(1) {
  384. color: #FFFFFF;
  385. }
  386. >text:nth-of-type(2) {
  387. color: #0183FA;
  388. }
  389. }
  390. .chart-tab {
  391. width: 120rpx;
  392. height: 50rpx;
  393. border-radius: 10rpx;
  394. overflow: hidden;
  395. border: 1rpx solid #52545F;
  396. display: flex;
  397. justify-content: flex-start;
  398. .chart-tab-li {
  399. width: 60rpx;
  400. font-weight: 400;
  401. font-size: 28rpx;
  402. color: #999999;
  403. line-height: 50rpx;
  404. text-align: center;
  405. }
  406. .chart-tab-li:nth-of-type(1) {
  407. border-right: 1rpx solid #52545F;
  408. }
  409. .chart-tab-li:nth-of-type(2) {
  410. border-right: 1rpx solid #52545F;
  411. }
  412. .tab-A {
  413. color: #FFFFFF;
  414. background: #0183FA;
  415. }
  416. .tab-B {
  417. color: #999999;
  418. background: none;
  419. }
  420. }
  421. }
  422. .chart-b {
  423. width: 690rpx;
  424. height: 300rpx;
  425. }
  426. }
  427. .statistics {
  428. width: 750rpx;
  429. height: 120rpx;
  430. background: #3E414F;
  431. margin-top: 20rpx;
  432. .statistics-b {
  433. display: flex;
  434. justify-content: space-between;
  435. align-items: center;
  436. .statistics-b-li {
  437. flex: 1;
  438. text-align: center;
  439. .statistics-b-li-t {
  440. margin-top: 10rpx;
  441. >text {
  442. font-weight: 400;
  443. font-size: 36rpx;
  444. line-height: 50rpx;
  445. }
  446. >text:nth-of-type(1) {
  447. font-size: 36rpx;
  448. }
  449. >text:nth-of-type(2) {
  450. font-size: 24rpx;
  451. }
  452. }
  453. .statistics-b-li-b {
  454. font-weight: 400;
  455. font-size: 24rpx;
  456. color: #FFFFFF;
  457. line-height: 34rpx;
  458. margin-top: 9rpx;
  459. }
  460. }
  461. .line {
  462. width: 2rpx;
  463. height: 30rpx;
  464. background: #D8D8D8;
  465. }
  466. }
  467. .color-A {
  468. color: #0183FA;
  469. }
  470. .color-B {
  471. color: #05FFE6;
  472. }
  473. .color-C {
  474. color: #FFAA00;
  475. }
  476. }
  477. .small-title {
  478. width: 690rpx;
  479. height: 50rpx;
  480. display: flex;
  481. justify-content: space-between;
  482. align-items: center;
  483. margin: 24rpx 30rpx;
  484. .small-title-l {
  485. font-weight: 400;
  486. font-size: 32rpx;
  487. color: #FFFFFF;
  488. line-height: 45rpx;
  489. }
  490. .chart-tab-tow {
  491. width: 300rpx;
  492. height: 50rpx;
  493. border-radius: 25rpx;
  494. overflow: hidden;
  495. border: 1rpx solid #52545F;
  496. display: flex;
  497. justify-content: flex-start;
  498. .chart-tab-li {
  499. width: 100rpx;
  500. font-weight: 400;
  501. font-size: 28rpx;
  502. color: #999999;
  503. line-height: 50rpx;
  504. text-align: center;
  505. }
  506. .chart-tab-li:nth-of-type(1) {
  507. border-right: 1rpx solid #52545F;
  508. }
  509. .chart-tab-li:nth-of-type(2) {
  510. border-right: 1rpx solid #52545F;
  511. }
  512. .tab-A {
  513. color: #FFFFFF;
  514. background: #0183FA;
  515. }
  516. .tab-B {
  517. color: #999999;
  518. background: none;
  519. }
  520. }
  521. }
  522. .table {
  523. width: 690rpx;
  524. margin-top: 20rpx;
  525. border-radius: 20rpx 20rpx 0 0;
  526. overflow: hidden;
  527. margin-left: 30rpx;
  528. }
  529. .sortOne {
  530. display: inline-block;
  531. width: 40rpx;
  532. height: 40rpx;
  533. padding: 4rpx;
  534. box-sizing: border-box;
  535. background: rgba(255, 0, 0, 0.2);
  536. font-weight: 400;
  537. font-size: 28rpx;
  538. color: #FF0000;
  539. line-height: 40rpx;
  540. text-align: center;
  541. border-radius: 20rpx;
  542. }
  543. .sortTow {
  544. display: inline-block;
  545. width: 40rpx;
  546. height: 40rpx;
  547. padding: 4rpx;
  548. box-sizing: border-box;
  549. background: rgba(255, 153, 0, 0.2);
  550. font-weight: 400;
  551. font-size: 28rpx;
  552. color: #FF9900;
  553. line-height: 40rpx;
  554. text-align: center;
  555. border-radius: 20rpx;
  556. }
  557. .sortThree {
  558. display: inline-block;
  559. width: 40rpx;
  560. height: 40rpx;
  561. padding: 4rpx;
  562. box-sizing: border-box;
  563. background: rgba(255, 242, 0, 0.2);
  564. font-weight: 400;
  565. font-size: 28rpx;
  566. color: #FFF200;
  567. line-height: 40rpx;
  568. text-align: center;
  569. border-radius: 20rpx;
  570. }
  571. .sortFive {
  572. display: inline-block;
  573. width: 40rpx;
  574. height: 40rpx;
  575. padding: 4rpx;
  576. box-sizing: border-box;
  577. background: rgba(1, 131, 250, 0.2);
  578. font-weight: 400;
  579. font-size: 28rpx;
  580. color: #0183FA;
  581. line-height: 40rpx;
  582. text-align: center;
  583. border-radius: 20rpx;
  584. }
  585. .table-tow {
  586. width: 690rpx;
  587. margin-top: 20rpx;
  588. border-radius: 20rpx 20rpx 0 0;
  589. overflow: hidden;
  590. margin-left: 30rpx;
  591. }
  592. .small-title-tow {
  593. width: 750rpx;
  594. height: 80rpx;
  595. background: #3E414F;
  596. display: flex;
  597. justify-content: space-between;
  598. align-items: center;
  599. padding: 0 20rpx 0 30rpx;
  600. box-sizing: border-box;
  601. margin-top: 2rpx;
  602. .small-title-tow-l {
  603. flex: 1;
  604. font-weight: 400;
  605. font-size: 30rpx;
  606. color: #FFFFFF;
  607. line-height: 42rpx;
  608. overflow: hidden;
  609. text-overflow: ellipsis;
  610. white-space: nowrap;
  611. }
  612. .small-title-tow-r {
  613. width: 14rpx;
  614. height: 8rpx;
  615. }
  616. }
  617. .chart-tow {
  618. width: 690rpx;
  619. height: 480rpx;
  620. background: #3E414F;
  621. border-radius: 20rpx 20rpx 20rpx 30rpx;
  622. margin: 26rpx 30rpx 0;
  623. .chart-tow-b {
  624. width: 690rpx;
  625. height: 480rpx;
  626. }
  627. }
  628. }
  629. </style>