daYiReservation.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654
  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>333</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: '499',
  225. data3: '47',
  226. data4: '220',
  227. data5: '137',
  228. },
  229. {
  230. data1: '浓缩设备',
  231. data2: '199',
  232. data3: '7',
  233. data4: '120',
  234. data5: '37',
  235. },
  236. {
  237. data1: '高压灭菌锅',
  238. data2: '299',
  239. data3: '71',
  240. data4: '10',
  241. data5: '37',
  242. },
  243. {
  244. data1: '纯水设备',
  245. data2: '199',
  246. data3: '7',
  247. data4: '120',
  248. data5: '37',
  249. },
  250. {
  251. data1: '二氧化碳培养箱',
  252. data2: '299',
  253. data3: '71',
  254. data4: '10',
  255. data5: '37',
  256. },
  257. ],
  258. total: 0,
  259. }
  260. },
  261. created() {
  262. },
  263. beforeMount() {
  264. },
  265. mounted() {
  266. this.getServerData()
  267. this.getServerDataTow()
  268. },
  269. methods: {
  270. getServerData() {
  271. //模拟从服务器获取数据时的延时
  272. setTimeout(() => {
  273. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  274. let res = {
  275. series: [{
  276. data: [{
  277. "name": "压力容器",
  278. "value": 50,
  279. "labelShow": false
  280. }, {
  281. "name": "浓缩设备",
  282. "value": 30,
  283. "labelShow": false
  284. }, {
  285. "name": "高压灭菌锅",
  286. "value": 20,
  287. "labelShow": false
  288. }, ]
  289. }]
  290. };
  291. this.chartData = JSON.parse(JSON.stringify(res));
  292. }, 500);
  293. },
  294. getServerDataTow() {
  295. //模拟从服务器获取数据时的延时
  296. setTimeout(() => {
  297. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  298. let res = {
  299. categories: ["测定仪", "色谱仪", "分析仪", "光度计", "离子色谱仪"],
  300. series: [{
  301. name: "成交量1",
  302. data: [90, 110, 165, 195, 187]
  303. },
  304. {
  305. name: "成交量2",
  306. data: [190, 210, 105, 35, 27]
  307. }
  308. ]
  309. };
  310. this.chartDataTow = JSON.parse(JSON.stringify(res));
  311. }, 500);
  312. },
  313. chartTabClick(index) {
  314. this.chartTabIndex = index;
  315. },
  316. chartTabClickTow(index) {
  317. this.chartTabIndexTow = index;
  318. },
  319. },
  320. }
  321. </script>
  322. <style lang="stylus" scoped>
  323. .daYiReservation {
  324. height: 100%;
  325. width: 100%;
  326. background: #363744;
  327. padding: 20rpx 0rpx 0;
  328. box-sizing: border-box;
  329. .chart {
  330. width: 690rpx;
  331. height: 380rpx;
  332. background: #3E414F;
  333. border-radius: 20rpx 20rpx 20rpx 20rpx;
  334. overflow: hidden;
  335. margin: 0 30rpx;
  336. .chart-t {
  337. display: flex;
  338. justify-content: space-between;
  339. align-items: center;
  340. height: 50rpx;
  341. margin-top: 30rpx;
  342. padding: 0 24rpx 0 42rpx;
  343. box-sizing: border-box;
  344. .chart-t-l {
  345. >text {
  346. font-weight: 400;
  347. font-size: 30rpx;
  348. color: #FFFFFF;
  349. line-height: 42rpx;
  350. }
  351. >text:nth-of-type(1) {
  352. color: #FFFFFF;
  353. }
  354. >text:nth-of-type(2) {
  355. color: #0183FA;
  356. }
  357. }
  358. .chart-tab {
  359. width: 120rpx;
  360. height: 50rpx;
  361. border-radius: 10rpx;
  362. overflow: hidden;
  363. border: 1rpx solid #52545F;
  364. display: flex;
  365. justify-content: flex-start;
  366. .chart-tab-li {
  367. width: 60rpx;
  368. font-weight: 400;
  369. font-size: 28rpx;
  370. color: #999999;
  371. line-height: 50rpx;
  372. text-align: center;
  373. }
  374. .chart-tab-li:nth-of-type(1) {
  375. border-right: 1rpx solid #52545F;
  376. }
  377. .chart-tab-li:nth-of-type(2) {
  378. border-right: 1rpx solid #52545F;
  379. }
  380. .tab-A {
  381. color: #FFFFFF;
  382. background: #0183FA;
  383. }
  384. .tab-B {
  385. color: #999999;
  386. background: none;
  387. }
  388. }
  389. }
  390. .chart-b {
  391. width: 690rpx;
  392. height: 300rpx;
  393. }
  394. }
  395. .statistics {
  396. width: 750rpx;
  397. height: 120rpx;
  398. background: #3E414F;
  399. margin-top: 20rpx;
  400. .statistics-b {
  401. display: flex;
  402. justify-content: space-between;
  403. align-items: center;
  404. .statistics-b-li {
  405. flex: 1;
  406. text-align: center;
  407. .statistics-b-li-t {
  408. margin-top: 10rpx;
  409. >text {
  410. font-weight: 400;
  411. font-size: 36rpx;
  412. line-height: 50rpx;
  413. }
  414. >text:nth-of-type(1) {
  415. font-size: 36rpx;
  416. }
  417. >text:nth-of-type(2) {
  418. font-size: 24rpx;
  419. }
  420. }
  421. .statistics-b-li-b {
  422. font-weight: 400;
  423. font-size: 24rpx;
  424. color: #FFFFFF;
  425. line-height: 34rpx;
  426. margin-top: 9rpx;
  427. }
  428. }
  429. .line {
  430. width: 2rpx;
  431. height: 30rpx;
  432. background: #D8D8D8;
  433. }
  434. }
  435. .color-A {
  436. color: #0183FA;
  437. }
  438. .color-B {
  439. color: #05FFE6;
  440. }
  441. .color-C {
  442. color: #FFAA00;
  443. }
  444. }
  445. .small-title {
  446. width: 690rpx;
  447. height: 50rpx;
  448. display: flex;
  449. justify-content: space-between;
  450. align-items: center;
  451. margin: 24rpx 30rpx;
  452. .small-title-l {
  453. font-weight: 400;
  454. font-size: 32rpx;
  455. color: #FFFFFF;
  456. line-height: 45rpx;
  457. }
  458. .chart-tab-tow {
  459. width: 300rpx;
  460. height: 50rpx;
  461. border-radius: 25rpx;
  462. overflow: hidden;
  463. border: 1rpx solid #52545F;
  464. display: flex;
  465. justify-content: flex-start;
  466. .chart-tab-li {
  467. width: 100rpx;
  468. font-weight: 400;
  469. font-size: 28rpx;
  470. color: #999999;
  471. line-height: 50rpx;
  472. text-align: center;
  473. }
  474. .chart-tab-li:nth-of-type(1) {
  475. border-right: 1rpx solid #52545F;
  476. }
  477. .chart-tab-li:nth-of-type(2) {
  478. border-right: 1rpx solid #52545F;
  479. }
  480. .tab-A {
  481. color: #FFFFFF;
  482. background: #0183FA;
  483. }
  484. .tab-B {
  485. color: #999999;
  486. background: none;
  487. }
  488. }
  489. }
  490. .table {
  491. width: 690rpx;
  492. margin-top: 20rpx;
  493. border-radius: 20rpx 20rpx 0 0;
  494. overflow: hidden;
  495. margin-left: 30rpx;
  496. }
  497. .sortOne {
  498. display: inline-block;
  499. width: 40rpx;
  500. height: 40rpx;
  501. padding: 4rpx;
  502. box-sizing: border-box;
  503. background: rgba(255, 0, 0, 0.2);
  504. font-weight: 400;
  505. font-size: 28rpx;
  506. color: #FF0000;
  507. line-height: 40rpx;
  508. text-align: center;
  509. border-radius: 20rpx;
  510. }
  511. .sortTow {
  512. display: inline-block;
  513. width: 40rpx;
  514. height: 40rpx;
  515. padding: 4rpx;
  516. box-sizing: border-box;
  517. background: rgba(255, 153, 0, 0.2);
  518. font-weight: 400;
  519. font-size: 28rpx;
  520. color: #FF9900;
  521. line-height: 40rpx;
  522. text-align: center;
  523. border-radius: 20rpx;
  524. }
  525. .sortThree {
  526. display: inline-block;
  527. width: 40rpx;
  528. height: 40rpx;
  529. padding: 4rpx;
  530. box-sizing: border-box;
  531. background: rgba(255, 242, 0, 0.2);
  532. font-weight: 400;
  533. font-size: 28rpx;
  534. color: #FFF200;
  535. line-height: 40rpx;
  536. text-align: center;
  537. border-radius: 20rpx;
  538. }
  539. .sortFive {
  540. display: inline-block;
  541. width: 40rpx;
  542. height: 40rpx;
  543. padding: 4rpx;
  544. box-sizing: border-box;
  545. background: rgba(1, 131, 250, 0.2);
  546. font-weight: 400;
  547. font-size: 28rpx;
  548. color: #0183FA;
  549. line-height: 40rpx;
  550. text-align: center;
  551. border-radius: 20rpx;
  552. }
  553. .table-tow {
  554. width: 690rpx;
  555. margin-top: 20rpx;
  556. border-radius: 20rpx 20rpx 0 0;
  557. overflow: hidden;
  558. margin-left: 30rpx;
  559. }
  560. .small-title-tow {
  561. width: 750rpx;
  562. height: 80rpx;
  563. background: #3E414F;
  564. display: flex;
  565. justify-content: space-between;
  566. align-items: center;
  567. padding: 0 20rpx 0 30rpx;
  568. box-sizing: border-box;
  569. margin-top: 2rpx;
  570. .small-title-tow-l {
  571. flex: 1;
  572. font-weight: 400;
  573. font-size: 30rpx;
  574. color: #FFFFFF;
  575. line-height: 42rpx;
  576. overflow: hidden;
  577. text-overflow: ellipsis;
  578. white-space: nowrap;
  579. }
  580. .small-title-tow-r {
  581. width: 14rpx;
  582. height: 8rpx;
  583. }
  584. }
  585. .chart-tow {
  586. width: 690rpx;
  587. height: 480rpx;
  588. background: #3E414F;
  589. border-radius: 20rpx 20rpx 20rpx 30rpx;
  590. margin: 26rpx 30rpx 0;
  591. .chart-tow-b {
  592. width: 690rpx;
  593. height: 480rpx;
  594. }
  595. }
  596. }
  597. </style>