daYiReservation.vue 16 KB

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