resourceReservation.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. <!-- 数据看板-资源预约 -->
  2. <template>
  3. <view class="resourceReservation">
  4. <view class="chart">
  5. <view class="chart-t">
  6. <viwe class="chart-t-l">
  7. <text>资源总数:</text>
  8. <text>965</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. <view class="chart-b-t">
  17. <view class="chart-b-t-li">
  18. <qiun-data-charts type="arcbar" :opts="opts" :chartData="chartData" />
  19. </view>
  20. <view class="chart-b-t-li">
  21. <qiun-data-charts type="arcbar" :opts="opts2" :chartData="chartData2" />
  22. </view>
  23. <view class="chart-b-t-li">
  24. <qiun-data-charts type="arcbar" :opts="opts3" :chartData="chartData3" />
  25. </view>
  26. <view class="chart-b-t-li">
  27. <qiun-data-charts type="arcbar" :opts="opts3" :chartData="chartData3" />
  28. </view>
  29. </view>
  30. <view class="chart-b-b">
  31. <view class="chart-b-li">
  32. <view>总数:200 </view>
  33. <view>预约数:50</view>
  34. </view>
  35. <view class="chart-b-li">
  36. <view>总数:100 </view>
  37. <view>预约数:60</view>
  38. </view>
  39. <view class="chart-b-li">
  40. <view>总数:230 </view>
  41. <view>预约数:60</view>
  42. </view>
  43. <view class="chart-b-li">
  44. <view>总数:230 </view>
  45. <view>预约数:60</view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="small-title">
  51. <view class="small-title-l">安全隐患统计</view>
  52. </view>
  53. <view class="small-title-tow">
  54. <view class="small-title-tow-l">安全检查校级巡查计划标题标题标题标题标题</view>
  55. <img class="small-title-tow-r" src="@/pages/images/dataBoard/icon_06.png">
  56. </view>
  57. <view class="chart-tow">
  58. <view class="chart-tow-b">
  59. <qiun-data-charts type="radar" :opts="optsTow" :echartsH5="true" :chartData="chartDataTow" />
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. import {
  66. config
  67. } from '@/api/request/config.js'
  68. import {
  69. reportAppletReportApiResourceRateResourceList,
  70. reportAppletReportBsEquipDangerList
  71. } from '@/pages/api/index.js'
  72. export default {
  73. name: "resourceReservation",
  74. components: {
  75. },
  76. data() {
  77. return {
  78. opts: {
  79. color: ["#fff", ],
  80. padding: undefined,
  81. title: {
  82. name: "温室",
  83. fontSize: 15,
  84. color: "#fff"
  85. },
  86. subtitle: {
  87. name: "89%",
  88. fontSize: 15,
  89. color: "#FF5201"
  90. },
  91. extra: {
  92. arcbar: {
  93. type: "default",
  94. width: 6,
  95. backgroundColor: "#E9E9E9",
  96. startAngle: 0,
  97. endAngle: 1.5,
  98. gap: 2,
  99. }
  100. }
  101. },
  102. chartData: {},
  103. opts2: {
  104. color: ["#fff", ],
  105. padding: undefined,
  106. title: {
  107. name: "温室",
  108. fontSize: 15,
  109. color: "#fff"
  110. },
  111. subtitle: {
  112. name: "89%",
  113. fontSize: 15,
  114. color: "#04A44C"
  115. },
  116. extra: {
  117. arcbar: {
  118. type: "default",
  119. width: 6,
  120. backgroundColor: "#E9E9E9",
  121. startAngle: 0,
  122. endAngle: 1.5,
  123. gap: 2,
  124. }
  125. }
  126. },
  127. chartData2: {},
  128. opts3: {
  129. color: ["#fff", ],
  130. padding: undefined,
  131. title: {
  132. name: "温室",
  133. fontSize: 15,
  134. color: "#fff"
  135. },
  136. subtitle: {
  137. name: "89%",
  138. fontSize: 15,
  139. color: "#0283FA"
  140. },
  141. extra: {
  142. arcbar: {
  143. type: "default",
  144. width: 6,
  145. backgroundColor: "#E9E9E9",
  146. startAngle: 0,
  147. endAngle: 1.5,
  148. gap: 2,
  149. }
  150. }
  151. },
  152. chartData3: {},
  153. optsTow: {
  154. color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
  155. "#ea7ccc"
  156. ],
  157. padding: [5, 5, 5, 5],
  158. dataLabel: false,
  159. enableScroll: false,
  160. legend: {
  161. show: false,
  162. position: "right",
  163. lineHeight: 25
  164. },
  165. extra: {
  166. radar: {
  167. gridType: "radar",
  168. gridColor: "#CCCCCC",
  169. gridCount: 3,
  170. opacity: 0.2,
  171. max: 200,
  172. labelShow: true,
  173. border: true,
  174. labelColor: '#fff',
  175. }
  176. }
  177. },
  178. chartDataTow: {},
  179. chartTabList: ['日', '月', '年'],
  180. chartTabIndex: 0,
  181. chartTabListTow: ['按资费', '按机时', '按样品'],
  182. chartTabIndexTow: 0,
  183. // 查询参数
  184. queryParams: {
  185. page: 1,
  186. pageSize: 10,
  187. },
  188. dataList: [{
  189. data1: '学院学院简称',
  190. data2: '666',
  191. },
  192. {
  193. data1: '学院学院简称',
  194. data2: '666',
  195. },
  196. {
  197. data1: '学院学院简称',
  198. data2: '666',
  199. },
  200. {
  201. data1: '学院学院简称',
  202. data2: '666',
  203. },
  204. ],
  205. total: 0,
  206. }
  207. },
  208. created() {
  209. },
  210. beforeMount() {
  211. },
  212. mounted() {
  213. this.reportAppletReportApiResourceRateResourceList();
  214. this.getServerData();
  215. this.getServerData2();
  216. this.getServerData3();
  217. this.getServerDataTow();
  218. },
  219. methods: {
  220. async reportAppletReportApiResourceRateResourceList() {
  221. let self = this;
  222. const {
  223. data
  224. } = await reportAppletReportApiResourceRateResourceList({
  225. type: this.type
  226. });
  227. if (data.code == 200) {
  228. }
  229. },
  230. getServerData() {
  231. //模拟从服务器获取数据时的延时
  232. setTimeout(() => {
  233. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  234. let res = {
  235. series: [{
  236. name: "温室",
  237. color: "#FF5201",
  238. data: 0.8
  239. }]
  240. };
  241. this.chartData = JSON.parse(JSON.stringify(res));
  242. }, 500);
  243. },
  244. getServerData2() {
  245. //模拟从服务器获取数据时的延时
  246. setTimeout(() => {
  247. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  248. let res = {
  249. series: [{
  250. name: "自然室",
  251. color: "#04A44C",
  252. data: 0.8
  253. }]
  254. };
  255. this.chartData2 = JSON.parse(JSON.stringify(res));
  256. }, 500);
  257. },
  258. getServerData3() {
  259. //模拟从服务器获取数据时的延时
  260. setTimeout(() => {
  261. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  262. let res = {
  263. series: [{
  264. name: "冷库",
  265. color: "#0283FA",
  266. data: 0.8
  267. }]
  268. };
  269. this.chartData3 = JSON.parse(JSON.stringify(res));
  270. }, 500);
  271. },
  272. getServerDataTow() {
  273. //模拟从服务器获取数据时的延时
  274. setTimeout(() => {
  275. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  276. let res = {
  277. categories: ["测定仪", "色谱仪", "分析仪", "光度计", "离子色谱仪"],
  278. series: [{
  279. name: "成交量1",
  280. data: [90, 110, 165, 195, 187]
  281. },
  282. {
  283. name: "成交量2",
  284. data: [190, 210, 105, 35, 27]
  285. }
  286. ]
  287. };
  288. this.chartDataTow = JSON.parse(JSON.stringify(res));
  289. }, 500);
  290. },
  291. chartTabClick(index) {
  292. this.chartTabIndex = index;
  293. },
  294. chartTabClickTow(index) {
  295. this.chartTabIndexTow = index;
  296. },
  297. },
  298. }
  299. </script>
  300. <style lang="stylus" scoped>
  301. .resourceReservation {
  302. height: 100%;
  303. width: 100%;
  304. background: #363744;
  305. padding: 20rpx 0rpx 0;
  306. box-sizing: border-box;
  307. .chart {
  308. width: 690rpx;
  309. height: 380rpx;
  310. background: #3E414F;
  311. border-radius: 20rpx 20rpx 20rpx 20rpx;
  312. overflow: hidden;
  313. margin: 0 30rpx;
  314. .chart-t {
  315. display: flex;
  316. justify-content: space-between;
  317. align-items: center;
  318. height: 50rpx;
  319. margin-top: 30rpx;
  320. padding: 0 24rpx 0 42rpx;
  321. box-sizing: border-box;
  322. .chart-t-l {
  323. >text {
  324. font-weight: 400;
  325. font-size: 30rpx;
  326. color: #FFFFFF;
  327. line-height: 42rpx;
  328. }
  329. >text:nth-of-type(1) {
  330. color: #FFFFFF;
  331. }
  332. >text:nth-of-type(2) {
  333. color: #0183FA;
  334. }
  335. }
  336. .chart-tab {
  337. width: 120rpx;
  338. height: 50rpx;
  339. border-radius: 10rpx;
  340. overflow: hidden;
  341. border: 1rpx solid #52545F;
  342. display: flex;
  343. justify-content: flex-start;
  344. .chart-tab-li {
  345. width: 60rpx;
  346. font-weight: 400;
  347. font-size: 28rpx;
  348. color: #999999;
  349. line-height: 50rpx;
  350. text-align: center;
  351. }
  352. .chart-tab-li:nth-of-type(1) {
  353. border-right: 1rpx solid #52545F;
  354. }
  355. .chart-tab-li:nth-of-type(2) {
  356. border-right: 1rpx solid #52545F;
  357. }
  358. .tab-A {
  359. color: #FFFFFF;
  360. background: #0183FA;
  361. }
  362. .tab-B {
  363. color: #999999;
  364. background: none;
  365. }
  366. }
  367. }
  368. .chart-b {
  369. width: 690rpx;
  370. height: 600rpx;
  371. padding: 0 30rpx;
  372. box-sizing: border-box;
  373. .chart-b-t {
  374. display: flex;
  375. justify-content: flex-start;
  376. flex-wrap: wrap;
  377. width: 690rpx;
  378. .chart-b-t-li {
  379. width: 310rpx;
  380. height: 310rpx;
  381. }
  382. }
  383. .chart-b-b {
  384. display: flex;
  385. justify-content: flex-start;
  386. .chart-b-li {
  387. flex: 1;
  388. >view {
  389. font-weight: 400;
  390. font-size: 28rpx;
  391. color: #FFFFFF;
  392. line-height: 39rpx;
  393. text-align: center;
  394. }
  395. }
  396. }
  397. }
  398. }
  399. .small-title {
  400. width: 690rpx;
  401. height: 50rpx;
  402. display: flex;
  403. justify-content: space-between;
  404. align-items: center;
  405. margin: 24rpx 30rpx;
  406. .small-title-l {
  407. font-weight: 400;
  408. font-size: 32rpx;
  409. color: #FFFFFF;
  410. line-height: 45rpx;
  411. }
  412. .chart-tab-tow {
  413. width: 300rpx;
  414. height: 50rpx;
  415. border-radius: 25rpx;
  416. overflow: hidden;
  417. border: 1rpx solid #52545F;
  418. display: flex;
  419. justify-content: flex-start;
  420. .chart-tab-li {
  421. width: 100rpx;
  422. font-weight: 400;
  423. font-size: 28rpx;
  424. color: #999999;
  425. line-height: 50rpx;
  426. text-align: center;
  427. }
  428. .chart-tab-li:nth-of-type(1) {
  429. border-right: 1rpx solid #52545F;
  430. }
  431. .chart-tab-li:nth-of-type(2) {
  432. border-right: 1rpx solid #52545F;
  433. }
  434. .tab-A {
  435. color: #FFFFFF;
  436. background: #0183FA;
  437. }
  438. .tab-B {
  439. color: #999999;
  440. background: none;
  441. }
  442. }
  443. }
  444. .small-title-tow {
  445. width: 750rpx;
  446. height: 80rpx;
  447. background: #3E414F;
  448. display: flex;
  449. justify-content: space-between;
  450. align-items: center;
  451. padding: 0 20rpx 0 30rpx;
  452. box-sizing: border-box;
  453. margin-top: 2rpx;
  454. .small-title-tow-l {
  455. flex: 1;
  456. font-weight: 400;
  457. font-size: 30rpx;
  458. color: #FFFFFF;
  459. line-height: 42rpx;
  460. overflow: hidden;
  461. text-overflow: ellipsis;
  462. white-space: nowrap;
  463. }
  464. .small-title-tow-r {
  465. width: 14rpx;
  466. height: 8rpx;
  467. }
  468. }
  469. .chart-tow {
  470. width: 690rpx;
  471. height: 480rpx;
  472. background: #3E414F;
  473. border-radius: 20rpx 20rpx 20rpx 30rpx;
  474. margin: 26rpx 30rpx 0;
  475. .chart-tow-b {
  476. width: 690rpx;
  477. height: 480rpx;
  478. }
  479. }
  480. }
  481. </style>