securityHidden.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. <!-- 数据看板-安全隐患 -->
  2. <template>
  3. <view class="hazardSources">
  4. <view class="small-title">
  5. <view class="small-title-l">安全检查校级巡查计划标题标题标题标题标题</view>
  6. <img class="small-title-r" src="@/pages/images/dataBoard/icon_06.png">
  7. </view>
  8. <view class="chart">
  9. <view class="chart-t">
  10. <view class="chart-t-li" :class="chartIndex==index?'color-A':'color-B'" @click="chartClick(index)"
  11. v-for="(item,index) in chartTitle">{{item}}</view>
  12. </view>
  13. <view class="chart-b"></view>
  14. </view>
  15. <scroll-view scroll-x @scrolltolower="scrollGet">
  16. <view class="tabTitle_tow">
  17. <view class="tabTitle_tow_li" @tap="tabClickTow(item,index)" :key="index"
  18. v-for="(item,index) in tabTextTow">
  19. <view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item}}</view>
  20. <view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
  21. </view>
  22. </view>
  23. </scroll-view>
  24. <!--安全隐患排行 -->
  25. <view class="table" v-if="chartType==1">
  26. <view class="table-border">
  27. <view class="table-th">
  28. <view class="table-th-li">
  29. <view>排行</view>
  30. <view>学院单位</view>
  31. <view>总隐患</view>
  32. <view>已整改</view>
  33. <view>未整改</view>
  34. <view>暂无法整改</view>
  35. </view>
  36. </view>
  37. <view class="table-tb">
  38. <view class="table-tb-li" v-for="(item,index) in dataList" :key="index">
  39. <view>{{index}}</view>
  40. <view>{{item.data1}}</view>
  41. <view>{{item.data2}}</view>
  42. <view>{{item.data2}}</view>
  43. <view>{{item.data2}}</view>
  44. <view>{{item.data2}}</view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. <!-- 一级指标排行 -->
  50. <view class="table-tow" v-if="chartType==2">
  51. <view class="table-border">
  52. <view class="table-th">
  53. <view class="table-th-li">
  54. <view>序号</view>
  55. <view>一级指标</view>
  56. <view>隐患数</view>
  57. <view>占比</view>
  58. </view>
  59. </view>
  60. <view class="table-tb">
  61. <view class="table-tb-li" v-for="(item,index) in dataList" :key="index">
  62. <view>{{index}}</view>
  63. <view>{{item.data1}}</view>
  64. <view>{{item.data2}}</view>
  65. <view>{{item.data2}}</view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. <!--学院单位 -->
  71. <view class="table-three" v-if="chartType==3">
  72. <view class="table-border">
  73. <view class="table-th">
  74. <view class="table-th-li">
  75. <view>排行</view>
  76. <view>学院单位</view>
  77. <view>总隐患</view>
  78. <view>实验场所</view>
  79. <view>安全设施</view>
  80. <view>化学安全</view>
  81. <view>基础安全</view>
  82. <view>生物安全</view>
  83. <view>特种与冷热设备</view>
  84. </view>
  85. </view>
  86. <view class="table-tb">
  87. <view class="table-tb-li" v-for="(item,index) in dataList" :key="index">
  88. <view>{{index}}</view>
  89. <view>{{item.data1}}</view>
  90. <view>{{item.data2}}</view>
  91. <view>{{item.data2}}</view>
  92. <view>{{item.data2}}</view>
  93. <view>{{item.data2}}</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>
  102. </template>
  103. <script>
  104. import {
  105. config
  106. } from '@/api/request/config.js'
  107. import {
  108. } from '@/pages_basics/api/index.js'
  109. export default {
  110. name: "hazardSources",
  111. components: {
  112. },
  113. data() {
  114. return {
  115. chartType:3,
  116. chartTitle: ['安全隐患排行', '一级指标排行', '暂无法整改'],
  117. chartIndex: 0,
  118. // 查询参数
  119. queryParams: {
  120. page: 1,
  121. pageSize: 10,
  122. },
  123. dataList: [{
  124. data1: '学院学院简称',
  125. data2: '666',
  126. },
  127. {
  128. data1: '学院学院简称',
  129. data2: '666',
  130. },
  131. {
  132. data1: '学院学院简称',
  133. data2: '666',
  134. },
  135. {
  136. data1: '学院学院简称',
  137. data2: '666',
  138. },
  139. ],
  140. total: 0,
  141. tabTextTow: ['一级指标', '学院单位'],
  142. curTabTow: 0,
  143. }
  144. },
  145. created() {
  146. },
  147. beforeMount() {
  148. },
  149. mounted() {},
  150. methods: {
  151. scrollGet(){
  152. },
  153. chartClick(index) {
  154. this.chartIndex = index;
  155. },
  156. //顶部tab点击
  157. tabClickTow(item, index) {
  158. this.curTabTow = index;
  159. },
  160. },
  161. }
  162. </script>
  163. <style lang="stylus" scoped>
  164. .hazardSources {
  165. height: 100%;
  166. width: 100%;
  167. background: #363744;
  168. .small-title {
  169. width: 750rpx;
  170. height: 80rpx;
  171. background: #3E414F;
  172. display: flex;
  173. justify-content: space-between;
  174. align-items: center;
  175. padding: 0 20rpx 0 30rpx;
  176. box-sizing: border-box;
  177. margin-top: 2rpx;
  178. .small-title-l {
  179. flex: 1;
  180. font-weight: 400;
  181. font-size: 30rpx;
  182. color: #FFFFFF;
  183. line-height: 42rpx;
  184. overflow: hidden;
  185. text-overflow: ellipsis;
  186. white-space: nowrap;
  187. }
  188. .small-title-r {
  189. width: 14rpx;
  190. height: 8rpx;
  191. }
  192. }
  193. .chart {
  194. width: 690rpx;
  195. height: 520rpx;
  196. background: #3E414F;
  197. border-radius: 20rpx 20rpx 20rpx 20rpx;
  198. margin: 20rpx 30rpx 0;
  199. overflow: hidden;
  200. .chart-t {
  201. width: 570rpx;
  202. height: 50rpx;
  203. display: flex;
  204. justify-content: flex-start;
  205. border: 1rpx solid #52545F;
  206. border-radius: 10rpx;
  207. margin: 30rpx 0 0 72rpx;
  208. .chart-t-li {
  209. width: 190rpx;
  210. font-weight: 400;
  211. font-size: 28rpx;
  212. line-height: 50rpx;
  213. text-align: center;
  214. background: none;
  215. }
  216. .chart-t-li:nth-of-type(1) {
  217. border-right: 1rpx solid #52545F;
  218. }
  219. .chart-t-li:nth-of-type(2) {
  220. border-right: 1rpx solid #52545F;
  221. }
  222. .color-A {
  223. color: #FFFFFF;
  224. background: #52545F;
  225. }
  226. .color-B {
  227. color: #999999;
  228. background: none;
  229. }
  230. }
  231. .chart-b {
  232. width: 630rpx;
  233. height: 440rpx;
  234. margin-left: 30rpx;
  235. }
  236. }
  237. .tabTitle_tow {
  238. width: 750rpx;
  239. height: 80rpx;
  240. white-space: nowrap;
  241. display: inline-flex;
  242. background: #3E414F;
  243. margin-top: 20rpx;
  244. padding-left: 35rpx;
  245. .tabTitle_tow_li {
  246. position: relative;
  247. width: 152rpx;
  248. height: 80rpx;
  249. text-align center;
  250. padding-top: 18rpx;
  251. box-sizing: border-box;
  252. .tabTitle_tow_text {
  253. display: inline-block;
  254. font-size: 32rpx;
  255. font-family: PingFang SC;
  256. font-weight: 500;
  257. color: #FFFFFF;
  258. line-height: 46rpx;
  259. position: relative;
  260. &.on {
  261. color: #0183FA;
  262. }
  263. }
  264. .tabTitle_tow_across {
  265. width: 50rpx;
  266. height: 4rpx;
  267. background: #0183FA;
  268. border-radius: 2rpx;
  269. margin-left: 33%;
  270. margin-top: 16rpx;
  271. display none;
  272. &.on {
  273. display block;
  274. }
  275. }
  276. }
  277. }
  278. .table {
  279. width: 720rpx;
  280. margin: 20rpx 0 0 30rpx;
  281. .table-border {
  282. width: auto;
  283. overflow: auto;
  284. .table-th {
  285. width: 860rpx;
  286. padding: 0 30rpx;
  287. box-sizing: border-box;
  288. background: rgba(162, 162, 162, 0.2);
  289. border-radius: 20rpx 20rpx 0rpx 0rpx;
  290. .table-th-li {
  291. height: 80rpx;
  292. display: flex;
  293. justify-content: flex-start;
  294. >view {
  295. font-weight: 400;
  296. font-size: 30rpx;
  297. color: #FFFFFF;
  298. line-height: 80rpx;
  299. text-align: center;
  300. margin-right: 38rpx;
  301. width: 120rpx;
  302. overflow: hidden;
  303. text-overflow: ellipsis;
  304. white-space: nowrap;
  305. }
  306. >view:nth-of-type(1) {
  307. width: 116rpx;
  308. text-align: left;
  309. margin-right: 0;
  310. }
  311. >view:nth-of-type(2) {
  312. width: 168rpx;
  313. }
  314. >view:last-child {
  315. margin-right: 0;
  316. width: 228rpx;
  317. }
  318. }
  319. }
  320. .table-tb {
  321. width: 860rpx;
  322. background: #3E414F;
  323. padding: 0 30rpx;
  324. box-sizing: border-box;
  325. .table-tb-li {
  326. height: 80rpx;
  327. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  328. display: flex;
  329. justify-content: flex-start;
  330. >view {
  331. font-weight: 400;
  332. font-size: 28rpx;
  333. color: #FFFFFF;
  334. line-height: 80rpx;
  335. text-align: center;
  336. margin-right: 38rpx;
  337. width: 120rpx;
  338. overflow: hidden;
  339. text-overflow: ellipsis;
  340. white-space: nowrap;
  341. }
  342. >view:nth-of-type(1) {
  343. width: 116rpx;
  344. text-align: left;
  345. margin-right: 0;
  346. }
  347. >view:nth-of-type(2) {
  348. width: 168rpx;
  349. }
  350. >view:last-child {
  351. margin-right: 0;
  352. width: 228rpx;
  353. }
  354. }
  355. }
  356. }
  357. }
  358. .table-tow {
  359. width: 690rpx;
  360. margin: 20rpx 0 0 30rpx;
  361. .table-border {
  362. width: auto;
  363. overflow: auto;
  364. .table-th {
  365. width: 690rpx;
  366. padding: 0 30rpx;
  367. box-sizing: border-box;
  368. background: rgba(162, 162, 162, 0.2);
  369. border-radius: 20rpx 20rpx 0rpx 0rpx;
  370. .table-th-li {
  371. height: 80rpx;
  372. display: flex;
  373. justify-content: flex-start;
  374. >view {
  375. font-weight: 400;
  376. font-size: 30rpx;
  377. color: #FFFFFF;
  378. line-height: 80rpx;
  379. text-align: center;
  380. margin-right: 38rpx;
  381. width: 120rpx;
  382. overflow: hidden;
  383. text-overflow: ellipsis;
  384. white-space: nowrap;
  385. }
  386. >view:nth-of-type(1) {
  387. width: 64rpx;
  388. text-align: left;
  389. margin-right: 0;
  390. }
  391. >view:nth-of-type(2) {
  392. width: 270rpx;
  393. }
  394. >view:last-child {
  395. margin-right: 0;
  396. }
  397. }
  398. }
  399. .table-tb {
  400. width: 690rpx;
  401. background: #3E414F;
  402. padding: 0 30rpx;
  403. box-sizing: border-box;
  404. .table-tb-li {
  405. height: 80rpx;
  406. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  407. display: flex;
  408. justify-content: flex-start;
  409. >view {
  410. font-weight: 400;
  411. font-size: 28rpx;
  412. color: #FFFFFF;
  413. line-height: 80rpx;
  414. text-align: center;
  415. margin-right: 38rpx;
  416. width: 120rpx;
  417. overflow: hidden;
  418. text-overflow: ellipsis;
  419. white-space: nowrap;
  420. }
  421. >view:nth-of-type(1) {
  422. width: 64rpx;
  423. text-align: left;
  424. margin-right: 0;
  425. }
  426. >view:nth-of-type(2) {
  427. width: 270rpx;
  428. }
  429. >view:last-child {
  430. margin-right: 0;
  431. }
  432. }
  433. }
  434. }
  435. }
  436. .table-three {
  437. width: 720rpx;
  438. margin: 20rpx 0 0 30rpx;
  439. .table-border {
  440. width: auto;
  441. overflow: auto;
  442. .table-th {
  443. width: 1510rpx;
  444. padding: 0 30rpx;
  445. box-sizing: border-box;
  446. background: rgba(162, 162, 162, 0.2);
  447. border-radius: 20rpx 20rpx 0rpx 0rpx;
  448. .table-th-li {
  449. height: 80rpx;
  450. display: flex;
  451. justify-content: flex-start;
  452. >view {
  453. font-weight: 400;
  454. font-size: 30rpx;
  455. color: #FFFFFF;
  456. line-height: 80rpx;
  457. text-align: center;
  458. margin-right: 38rpx;
  459. width: 120rpx;
  460. overflow: hidden;
  461. text-overflow: ellipsis;
  462. white-space: nowrap;
  463. }
  464. >view:nth-of-type(1) {
  465. width: 116rpx;
  466. text-align: left;
  467. margin-right: 0;
  468. }
  469. >view:nth-of-type(2) {
  470. width: 168rpx;
  471. }
  472. >view:last-child {
  473. margin-right: 0;
  474. width: 228rpx;
  475. }
  476. }
  477. }
  478. .table-tb {
  479. width: 1510rpx;
  480. background: #3E414F;
  481. padding: 0 30rpx;
  482. box-sizing: border-box;
  483. .table-tb-li {
  484. height: 80rpx;
  485. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  486. display: flex;
  487. justify-content: flex-start;
  488. >view {
  489. font-weight: 400;
  490. font-size: 28rpx;
  491. color: #FFFFFF;
  492. line-height: 80rpx;
  493. text-align: center;
  494. margin-right: 38rpx;
  495. width: 120rpx;
  496. overflow: hidden;
  497. text-overflow: ellipsis;
  498. white-space: nowrap;
  499. }
  500. >view:nth-of-type(1) {
  501. width: 116rpx;
  502. text-align: left;
  503. margin-right: 0;
  504. }
  505. >view:nth-of-type(2) {
  506. width: 168rpx;
  507. }
  508. >view:last-child {
  509. margin-right: 0;
  510. width: 228rpx;
  511. }
  512. }
  513. }
  514. }
  515. }
  516. }
  517. </style>