hazardousChemicals.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <!-- 数据看板-危化品 -->
  2. <template>
  3. <view class="hazardSources">
  4. <view class="statistics">
  5. <view class="statistics-t">
  6. <view class="statistics-t-l">危化品总数:</view>
  7. <view class="statistics-t-r">9999 </view>
  8. </view>
  9. <view class="statistics-b">
  10. <view class="statistics-b-li">
  11. <view class="statistics-b-li-t color-A">688.5 kg</view>
  12. <view class="statistics-b-li-b">总量</view>
  13. </view>
  14. <view class="line"></view>
  15. <view class="statistics-b-li">
  16. <view class="statistics-b-li-t color-B">3100 </view>
  17. <view class="statistics-b-li-b">今日新增数</view>
  18. </view>
  19. <view class="line"></view>
  20. <view class="statistics-b-li">
  21. <view class="statistics-b-li-t color-C">115.3 kg</view>
  22. <view class="statistics-b-li-b">今日新增量</view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="small-title">
  27. <view class="small-title-l">危化品存量排行TOP5</view>
  28. <img class="small-title-r" src="@/pages/images/icon_wdwg_gd.png">
  29. </view>
  30. <view class="chart">
  31. <view class="chart-t">
  32. <qiun-data-charts type="funnel" :opts="opts" :echartsH5="true" :chartData="chartData" />
  33. </view>
  34. <view class="chart-b">
  35. <view>1</view>
  36. <view>化学与药学院</view>
  37. <view>总数999</view>
  38. <view>|</view>
  39. <view>今日新增19</view>
  40. <img src="@/pages/images/dataBoard/dataBoard-icon2.png">
  41. </view>
  42. </view>
  43. <view class="table">
  44. <view class="table-border">
  45. <view class="table-th">
  46. <view class="table-th-li">
  47. <view>排行</view>
  48. <view>学院单位</view>
  49. <view>总数</view>
  50. <view>总量</view>
  51. <view>今日新增</view>
  52. </view>
  53. </view>
  54. <view class="table-tb">
  55. <view class="table-tb-li" v-for="(item,index) in dataList" :key="index">
  56. <view>{{item.data2}}</view>
  57. <view>{{item.data1}}</view>
  58. <view>{{item.data2}}</view>
  59. <view>{{item.data2}}</view>
  60. <view>{{item.data2}}</view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import {
  69. config
  70. } from '@/api/request/config.js'
  71. import {
  72. } from '@/pages_basics/api/index.js'
  73. export default {
  74. name: "hazardSources",
  75. components: {
  76. },
  77. data() {
  78. return {
  79. opts: {
  80. color: ['#FF0000','#D40000','#FF5900','#FF9900','#FF9900'],
  81. legend:{
  82. show:false,
  83. },
  84. padding: [15, 15, 6, 15],
  85. enableScroll: false,
  86. extra: {
  87. funnel: {
  88. activeOpacity: 0.3,
  89. activeWidth: 10,
  90. border: false,
  91. borderWidth: 2,
  92. borderColor: "#FFFFFF",
  93. fillOpacity: 1,
  94. labelAlign: "right",
  95. type: "pyramid",
  96. }
  97. }
  98. },
  99. chartData: {},
  100. // 查询参数
  101. queryParams: {
  102. page: 1,
  103. pageSize: 10,
  104. },
  105. dataList: [{
  106. data1: '学院学院简称',
  107. data2: '666',
  108. },
  109. {
  110. data1: '学院学院简称',
  111. data2: '666',
  112. },
  113. {
  114. data1: '学院学院简称',
  115. data2: '666',
  116. },
  117. {
  118. data1: '学院学院简称',
  119. data2: '666',
  120. },
  121. ],
  122. total: 0,
  123. }
  124. },
  125. created() {
  126. },
  127. beforeMount() {
  128. },
  129. mounted() {
  130. this.getServerData();
  131. },
  132. methods: {
  133. dateClick(index) {
  134. this.dateIndex = index;
  135. },
  136. getServerData() {
  137. //模拟从服务器获取数据时的延时
  138. setTimeout(() => {
  139. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  140. let res = {
  141. series: [{
  142. data: [{
  143. "name": "一班",
  144. "centerText": "50",
  145. "value": 50
  146. }, {
  147. "name": "二班",
  148. "centerText": "30",
  149. "value": 30
  150. }, {
  151. "name": "三班",
  152. "centerText": "20",
  153. "value": 20
  154. }, {
  155. "name": "四班",
  156. "centerText": "18",
  157. "value": 18
  158. }, {
  159. "name": "五班",
  160. "centerText": "8",
  161. "value": 8
  162. }]
  163. }]
  164. };
  165. this.chartData = JSON.parse(JSON.stringify(res));
  166. }, 500);
  167. },
  168. },
  169. }
  170. </script>
  171. <style lang="stylus" scoped>
  172. .hazardSources {
  173. height: 100%;
  174. width: 100%;
  175. background: #363744;
  176. padding: 20rpx 30rpx 0;
  177. box-sizing: border-box;
  178. .small-title {
  179. display: flex;
  180. justify-content: space-between;
  181. align-items: center;
  182. .small-title-l {
  183. font-weight: 400;
  184. font-size: 32rpx;
  185. color: #FFFFFF;
  186. line-height: 45rpx;
  187. text-align: left;
  188. margin: 28rpx 0;
  189. }
  190. .small-title-r {
  191. width: 15rpx;
  192. height: 18rpx;
  193. }
  194. }
  195. .chart {
  196. width: 690rpx;
  197. height: 850rpx;
  198. background: #3E414F;
  199. border-radius: 20rpx 20rpx 20rpx 20rpx;
  200. padding: 24rpx 20rpx 0;
  201. box-sizing: border-box;
  202. .chart-t {
  203. width: 650rpx;
  204. height: 380rpx;
  205. }
  206. .chart-b {
  207. padding: 0 30rpx;
  208. box-sizing: border-box;
  209. display: flex;
  210. justify-content: flex-start;
  211. align-items: center;
  212. height: 40rpx;
  213. margin-bottom: 36rpx;
  214. >view {
  215. overflow: hidden;
  216. text-overflow: ellipsis;
  217. white-space: nowrap;
  218. }
  219. >view:nth-of-type(1) {
  220. width: 32rpx;
  221. height: 32rpx;
  222. background: rgba(255, 0, 0, 0.2);
  223. font-weight: 400;
  224. font-size: 28rpx;
  225. color: #FF0000;
  226. line-height: 32rpx;
  227. text-align: center;
  228. margin-right: 18rpx;
  229. }
  230. >view:nth-of-type(2) {
  231. width: 246rpx;
  232. font-weight: 400;
  233. font-size: 28rpx;
  234. color: #FFFFFF;
  235. line-height: 39rpx;
  236. }
  237. >view:nth-of-type(3) {
  238. width: 132rpx;
  239. font-weight: 400;
  240. font-size: 28rpx;
  241. color: #FFFFFF;
  242. line-height: 39rpx;
  243. }
  244. >view:nth-of-type(4) {
  245. width: 2rpx;
  246. height: 20rpx;
  247. background: #D8D8D8;
  248. margin-right: 22rpx;
  249. }
  250. >view:nth-of-type(5) {
  251. width: 154rpx;
  252. font-weight: 400;
  253. font-size: 28rpx;
  254. color: #FFFFFF;
  255. line-height: 39rpx;
  256. }
  257. >img {
  258. width: 22rpx;
  259. height: 28rpx;
  260. }
  261. }
  262. }
  263. .statistics {
  264. width: 690rpx;
  265. height: 241rpx;
  266. background: #3E414F;
  267. border-radius: 20rpx 20rpx 20rpx 20rpx;
  268. margin-top: 20rpx;
  269. .statistics-t {
  270. height: 100rpx;
  271. display: flex;
  272. justify-content: space-between;
  273. align-items: center;
  274. border-bottom: 1rpx solid #52545F;
  275. padding: 0 42rpx 0 38rpx;
  276. box-sizing: border-box;
  277. .statistics-t-l {
  278. font-weight: 400;
  279. font-size: 32rpx;
  280. color: #FFFFFF;
  281. line-height: 45rpx;
  282. }
  283. .statistics-t-r {
  284. font-weight: 400;
  285. font-size: 36rpx;
  286. color: #FFFFFF;
  287. line-height: 50rpx;
  288. }
  289. }
  290. .statistics-b {
  291. display: flex;
  292. justify-content: space-between;
  293. align-items: center;
  294. .statistics-b-li {
  295. flex: 1;
  296. text-align: center;
  297. .statistics-b-li-t {
  298. font-weight: 400;
  299. font-size: 36rpx;
  300. line-height: 50rpx;
  301. margin-top: 28rpx;
  302. }
  303. .statistics-b-li-b {
  304. font-weight: 400;
  305. font-size: 28rpx;
  306. color: #FFFFFF;
  307. line-height: 39rpx;
  308. margin-top: 9rpx;
  309. }
  310. }
  311. .line {
  312. width: 2rpx;
  313. height: 30rpx;
  314. background: #D8D8D8;
  315. }
  316. .color-A {
  317. color: #FF8C00;
  318. }
  319. .color-B {
  320. color: #26C736;
  321. }
  322. .color-C {
  323. color: #FF0000;
  324. }
  325. }
  326. }
  327. .table {
  328. width: 720rpx;
  329. margin-top: 20rpx;
  330. .table-border {
  331. overflow: auto;
  332. }
  333. .table-th {
  334. width: 860rpx;
  335. height: 80rpx;
  336. background: rgba(162, 162, 162, 0.2);
  337. border-radius: 20rpx 20rpx 0rpx 0rpx;
  338. padding: 0 30rpx;
  339. box-sizing: border-box;
  340. .table-th-li {
  341. height: 80rpx;
  342. display: flex;
  343. justify-content: flex-start;
  344. >view {
  345. font-weight: 400;
  346. font-size: 30rpx;
  347. color: #FFFFFF;
  348. line-height: 80rpx;
  349. text-align: center;
  350. margin-right: 38rpx;
  351. width: 120rpx;
  352. overflow: hidden;
  353. text-overflow: ellipsis;
  354. white-space: nowrap;
  355. }
  356. >view:nth-of-type(1) {
  357. width: 64rpx;
  358. }
  359. >view:nth-of-type(2) {
  360. width: 168rpx;
  361. }
  362. >view:last-child {
  363. margin-right: 0;
  364. width: 168rpx;
  365. }
  366. }
  367. }
  368. .table-tb {
  369. width: 860rpx;
  370. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  371. background: #3E414F;
  372. padding: 0 30rpx;
  373. box-sizing: border-box;
  374. .table-tb-li {
  375. height: 80rpx;
  376. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  377. display: flex;
  378. justify-content: flex-start;
  379. >view {
  380. font-weight: 400;
  381. font-size: 28rpx;
  382. color: #FFFFFF;
  383. line-height: 80rpx;
  384. text-align: center;
  385. margin-right: 38rpx;
  386. width: 120rpx;
  387. overflow: hidden;
  388. text-overflow: ellipsis;
  389. white-space: nowrap;
  390. }
  391. >view:nth-of-type(1) {
  392. width: 64rpx;
  393. }
  394. >view:nth-of-type(2) {
  395. width: 168rpx;
  396. }
  397. >view:last-child {
  398. margin-right: 0;
  399. width: 168rpx;
  400. }
  401. }
  402. }
  403. }
  404. }
  405. </style>