resourceReservation.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  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. }
  166. }
  167. },
  168. chartDataTow: {},
  169. chartTabList: ['日', '月', '年'],
  170. chartTabIndex: 0,
  171. chartTabListTow: ['按资费', '按机时', '按样品'],
  172. chartTabIndexTow: 0,
  173. // 查询参数
  174. queryParams: {
  175. page: 1,
  176. pageSize: 10,
  177. },
  178. dataList: [{
  179. data1: '学院学院简称',
  180. data2: '666',
  181. },
  182. {
  183. data1: '学院学院简称',
  184. data2: '666',
  185. },
  186. {
  187. data1: '学院学院简称',
  188. data2: '666',
  189. },
  190. {
  191. data1: '学院学院简称',
  192. data2: '666',
  193. },
  194. ],
  195. total: 0,
  196. }
  197. },
  198. created() {
  199. },
  200. beforeMount() {
  201. },
  202. mounted() {
  203. this.getServerData();
  204. this.getServerData2();
  205. this.getServerData3();
  206. this.getServerDataTow();
  207. },
  208. methods: {
  209. getServerData() {
  210. //模拟从服务器获取数据时的延时
  211. setTimeout(() => {
  212. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  213. let res = {
  214. series: [{
  215. name: "温室",
  216. color: "#FF5201",
  217. data: 0.8
  218. }]
  219. };
  220. this.chartData = JSON.parse(JSON.stringify(res));
  221. }, 500);
  222. },
  223. getServerData2() {
  224. //模拟从服务器获取数据时的延时
  225. setTimeout(() => {
  226. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  227. let res = {
  228. series: [{
  229. name: "自然室",
  230. color: "#04A44C",
  231. data: 0.8
  232. }]
  233. };
  234. this.chartData2 = JSON.parse(JSON.stringify(res));
  235. }, 500);
  236. },
  237. getServerData3() {
  238. //模拟从服务器获取数据时的延时
  239. setTimeout(() => {
  240. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  241. let res = {
  242. series: [{
  243. name: "冷库",
  244. color: "#0283FA",
  245. data: 0.8
  246. }]
  247. };
  248. this.chartData3 = JSON.parse(JSON.stringify(res));
  249. }, 500);
  250. },
  251. getServerDataTow() {
  252. //模拟从服务器获取数据时的延时
  253. setTimeout(() => {
  254. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  255. let res = {
  256. categories: ["测定仪", "色谱仪", "分析仪", "光度计", "离子色谱仪"],
  257. series: [{
  258. name: "成交量1",
  259. data: [90, 110, 165, 195, 187]
  260. },
  261. {
  262. name: "成交量2",
  263. data: [190, 210, 105, 35, 27]
  264. }
  265. ]
  266. };
  267. this.chartDataTow = JSON.parse(JSON.stringify(res));
  268. }, 500);
  269. },
  270. chartTabClick(index) {
  271. this.chartTabIndex = index;
  272. },
  273. chartTabClickTow(index) {
  274. this.chartTabIndexTow = index;
  275. },
  276. },
  277. }
  278. </script>
  279. <style lang="stylus" scoped>
  280. .resourceReservation {
  281. height: 100%;
  282. width: 100%;
  283. background: #363744;
  284. padding: 20rpx 0rpx 0;
  285. box-sizing: border-box;
  286. .chart {
  287. width: 690rpx;
  288. height: 380rpx;
  289. background: #3E414F;
  290. border-radius: 20rpx 20rpx 20rpx 20rpx;
  291. overflow: hidden;
  292. margin: 0 30rpx;
  293. .chart-t {
  294. display: flex;
  295. justify-content: space-between;
  296. align-items: center;
  297. height: 50rpx;
  298. margin-top: 30rpx;
  299. padding: 0 24rpx 0 42rpx;
  300. box-sizing: border-box;
  301. .chart-t-l {
  302. >text {
  303. font-weight: 400;
  304. font-size: 30rpx;
  305. color: #FFFFFF;
  306. line-height: 42rpx;
  307. }
  308. >text:nth-of-type(1) {
  309. color: #FFFFFF;
  310. }
  311. >text:nth-of-type(2) {
  312. color: #0183FA;
  313. }
  314. }
  315. .chart-tab {
  316. width: 120rpx;
  317. height: 50rpx;
  318. border-radius: 10rpx;
  319. overflow: hidden;
  320. border: 1rpx solid #52545F;
  321. display: flex;
  322. justify-content: flex-start;
  323. .chart-tab-li {
  324. width: 60rpx;
  325. font-weight: 400;
  326. font-size: 28rpx;
  327. color: #999999;
  328. line-height: 50rpx;
  329. text-align: center;
  330. }
  331. .chart-tab-li:nth-of-type(1) {
  332. border-right: 1rpx solid #52545F;
  333. }
  334. .chart-tab-li:nth-of-type(2) {
  335. border-right: 1rpx solid #52545F;
  336. }
  337. .tab-A {
  338. color: #FFFFFF;
  339. background: #0183FA;
  340. }
  341. .tab-B {
  342. color: #999999;
  343. background: none;
  344. }
  345. }
  346. }
  347. .chart-b {
  348. width: 690rpx;
  349. height: 300rpx;
  350. padding: 0 30rpx;
  351. box-sizing: border-box;
  352. .chart-b-t {
  353. display: flex;
  354. justify-content: flex-start;
  355. width: 690rpx;
  356. .chart-b-t-li {
  357. width: 210rpx;
  358. height: 210rpx;
  359. }
  360. }
  361. .chart-b-b {
  362. display: flex;
  363. justify-content: flex-start;
  364. .chart-b-li {
  365. flex: 1;
  366. >view {
  367. font-weight: 400;
  368. font-size: 28rpx;
  369. color: #FFFFFF;
  370. line-height: 39rpx;
  371. text-align: center;
  372. }
  373. }
  374. }
  375. }
  376. }
  377. .small-title {
  378. width: 690rpx;
  379. height: 50rpx;
  380. display: flex;
  381. justify-content: space-between;
  382. align-items: center;
  383. margin: 24rpx 30rpx;
  384. .small-title-l {
  385. font-weight: 400;
  386. font-size: 32rpx;
  387. color: #FFFFFF;
  388. line-height: 45rpx;
  389. }
  390. .chart-tab-tow {
  391. width: 300rpx;
  392. height: 50rpx;
  393. border-radius: 25rpx;
  394. overflow: hidden;
  395. border: 1rpx solid #52545F;
  396. display: flex;
  397. justify-content: flex-start;
  398. .chart-tab-li {
  399. width: 100rpx;
  400. font-weight: 400;
  401. font-size: 28rpx;
  402. color: #999999;
  403. line-height: 50rpx;
  404. text-align: center;
  405. }
  406. .chart-tab-li:nth-of-type(1) {
  407. border-right: 1rpx solid #52545F;
  408. }
  409. .chart-tab-li:nth-of-type(2) {
  410. border-right: 1rpx solid #52545F;
  411. }
  412. .tab-A {
  413. color: #FFFFFF;
  414. background: #0183FA;
  415. }
  416. .tab-B {
  417. color: #999999;
  418. background: none;
  419. }
  420. }
  421. }
  422. .small-title-tow {
  423. width: 750rpx;
  424. height: 80rpx;
  425. background: #3E414F;
  426. display: flex;
  427. justify-content: space-between;
  428. align-items: center;
  429. padding: 0 20rpx 0 30rpx;
  430. box-sizing: border-box;
  431. margin-top: 2rpx;
  432. .small-title-tow-l {
  433. flex: 1;
  434. font-weight: 400;
  435. font-size: 30rpx;
  436. color: #FFFFFF;
  437. line-height: 42rpx;
  438. overflow: hidden;
  439. text-overflow: ellipsis;
  440. white-space: nowrap;
  441. }
  442. .small-title-tow-r {
  443. width: 14rpx;
  444. height: 8rpx;
  445. }
  446. }
  447. .chart-tow {
  448. width: 690rpx;
  449. height: 480rpx;
  450. background: #3E414F;
  451. border-radius: 20rpx 20rpx 20rpx 30rpx;
  452. margin: 26rpx 30rpx 0;
  453. .chart-tow-b {
  454. width: 690rpx;
  455. height: 480rpx;
  456. }
  457. }
  458. }
  459. </style>