daYiReservation.vue 14 KB

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