daYiReservation.vue 16 KB

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