resourceReservation.vue 10.0 KB

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