securityHidden.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  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" v-if="chartIndex==0">
  14. <qiun-data-charts type="column" :opts="opts" :echartsH5="true" :chartData="chartData" />
  15. </view>
  16. <view class="chart-b2" v-if="chartIndex==0">
  17. <view class="chart-b2-li">
  18. <view class="chart-b2-li-t">
  19. <text>1</text>
  20. <text>化学与药品学院</text>
  21. </view>
  22. <view class="chart-b2-li-b">132</view>
  23. </view>
  24. <view class="chart-b2-li">
  25. <view class="chart-b2-li-t">
  26. <text>1</text>
  27. <text>化学与药品学院</text>
  28. </view>
  29. <view class="chart-b2-li-b">132</view>
  30. </view>
  31. <view class="chart-b2-li">
  32. <view class="chart-b2-li-t">
  33. <text>1</text>
  34. <text>化学与药品学院</text>
  35. </view>
  36. <view class="chart-b2-li-b">132</view>
  37. </view>
  38. </view>
  39. <view class="chart-b-tow" v-if="chartIndex==1 || chartIndex==2">
  40. <qiun-data-charts type="radar" :opts="optsTow" :echartsH5="true" :chartData="chartDataTow" />
  41. </view>
  42. </view>
  43. <scroll-view scroll-x @scrolltolower="scrollGet">
  44. <view class="tabTitle_tow">
  45. <view class="tabTitle_tow_li" @tap="tabClickTow(item,index)" :key="index"
  46. v-for="(item,index) in tabTextTow">
  47. <view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item}}</view>
  48. <view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
  49. </view>
  50. </view>
  51. </scroll-view>
  52. <!--安全隐患排行 -->
  53. <view class="table" v-if="chartType==1">
  54. <view class="table-border">
  55. <view class="table-th">
  56. <view class="table-th-li">
  57. <view>排行</view>
  58. <view>学院单位</view>
  59. <view>总隐患</view>
  60. <view>已整改</view>
  61. <view>未整改</view>
  62. <view>暂无法整改</view>
  63. </view>
  64. </view>
  65. <view class="table-tb">
  66. <view class="table-tb-li" v-for="(item,index) in dataList" :key="index">
  67. <view>{{index}}</view>
  68. <view>{{item.data1}}</view>
  69. <view>{{item.data2}}</view>
  70. <view>{{item.data2}}</view>
  71. <view>{{item.data2}}</view>
  72. <view>{{item.data2}}</view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <!-- 一级指标排行 -->
  78. <view class="table-tow" v-if="chartType==2">
  79. <view class="table-border">
  80. <view class="table-th">
  81. <view class="table-th-li">
  82. <view>序号</view>
  83. <view>一级指标</view>
  84. <view>隐患数</view>
  85. <view>占比</view>
  86. </view>
  87. </view>
  88. <view class="table-tb">
  89. <view class="table-tb-li" v-for="(item,index) in dataList" :key="index">
  90. <view>{{index}}</view>
  91. <view>{{item.data1}}</view>
  92. <view>{{item.data2}}</view>
  93. <view>{{item.data2}}</view>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. <!--学院单位 -->
  99. <view class="table-three" v-if="chartType==3">
  100. <view class="table-border">
  101. <view class="table-th">
  102. <view class="table-th-li">
  103. <view>排行</view>
  104. <view>学院单位</view>
  105. <view>总隐患</view>
  106. <view>实验场所</view>
  107. <view>安全设施</view>
  108. <view>化学安全</view>
  109. <view>基础安全</view>
  110. <view>生物安全</view>
  111. <view>特种与冷热设备</view>
  112. </view>
  113. </view>
  114. <view class="table-tb">
  115. <view class="table-tb-li" v-for="(item,index) in dataList" :key="index">
  116. <view>{{index}}</view>
  117. <view>{{item.data1}}</view>
  118. <view>{{item.data2}}</view>
  119. <view>{{item.data2}}</view>
  120. <view>{{item.data2}}</view>
  121. <view>{{item.data2}}</view>
  122. <view>{{item.data2}}</view>
  123. <view>{{item.data2}}</view>
  124. <view>{{item.data2}}</view>
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. </template>
  131. <script>
  132. import {
  133. config
  134. } from '@/api/request/config.js'
  135. import {
  136. } from '@/pages_basics/api/index.js'
  137. export default {
  138. name: "hazardSources",
  139. components: {
  140. },
  141. data() {
  142. return {
  143. chartType: 3,
  144. chartTitle: ['安全隐患排行', '一级指标排行', '暂无法整改'],
  145. chartIndex: 0,
  146. opts: {
  147. color: ["#149F12", "#FF0000", "#FF9D25", ],
  148. padding: [15, 15, 4, 5],
  149. enableScroll: false,
  150. legend: {
  151. position: 'top',
  152. fontColor: '#fff',
  153. },
  154. xAxis: {
  155. disableGrid: true,
  156. disabled: true,
  157. axisLine: false,
  158. },
  159. yAxis: {
  160. disableGrid: true,
  161. data: [{
  162. disabled: true,
  163. }]
  164. },
  165. extra: {
  166. column: {
  167. type: "group",
  168. width: 14,
  169. linearType: "opacity",
  170. linearOpacity: 0.6,
  171. }
  172. }
  173. },
  174. optsTow: {
  175. color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
  176. "#ea7ccc"
  177. ],
  178. padding: [5, 5, 5, 5],
  179. dataLabel: false,
  180. enableScroll: false,
  181. legend: {
  182. show: false,
  183. },
  184. extra: {
  185. radar: {
  186. gridType: "radar",
  187. gridColor: "#CCCCCC",
  188. gridCount: 3,
  189. opacity: 0.2,
  190. max: 200,
  191. labelShow: true,
  192. border: true
  193. }
  194. }
  195. },
  196. chartData: {},
  197. chartDataTow: {},
  198. // 查询参数
  199. queryParams: {
  200. page: 1,
  201. pageSize: 10,
  202. },
  203. dataList: [{
  204. data1: '学院学院简称',
  205. data2: '666',
  206. },
  207. {
  208. data1: '学院学院简称',
  209. data2: '666',
  210. },
  211. {
  212. data1: '学院学院简称',
  213. data2: '666',
  214. },
  215. {
  216. data1: '学院学院简称',
  217. data2: '666',
  218. },
  219. ],
  220. total: 0,
  221. tabTextTow: ['一级指标', '学院单位'],
  222. curTabTow: 0,
  223. }
  224. },
  225. created() {
  226. },
  227. beforeMount() {
  228. },
  229. mounted() {
  230. this.getServerData();
  231. },
  232. methods: {
  233. scrollGet() {
  234. },
  235. chartClick(index) {
  236. this.chartIndex = index;
  237. this.getServerDataTow();
  238. },
  239. //顶部tab点击
  240. tabClickTow(item, index) {
  241. this.curTabTow = index;
  242. },
  243. getServerData() {
  244. //模拟从服务器获取数据时的延时
  245. setTimeout(() => {
  246. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  247. let res = {
  248. categories: ["化学与药品学院", "化学与药品学院", "化学与药品学院"],
  249. series: [{
  250. name: "已整改",
  251. textColor: '#fff',
  252. data: [35, 36, 31, ]
  253. },
  254. {
  255. name: "未整改",
  256. textColor: '#fff',
  257. data: [18, 27, 21, ]
  258. },
  259. {
  260. name: "暂无法整改",
  261. textColor: '#fff',
  262. data: [8, 7, 2, ]
  263. }
  264. ]
  265. };
  266. this.chartData = JSON.parse(JSON.stringify(res));
  267. }, 500);
  268. },
  269. getServerDataTow() {
  270. //模拟从服务器获取数据时的延时
  271. setTimeout(() => {
  272. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  273. let res = {
  274. categories: ["维度1", "维度2", "维度3", "维度4", "维度5"],
  275. series: [{
  276. name: "成交量1",
  277. data: [90, 110, 165, 195, 187]
  278. },
  279. {
  280. name: "成交量2",
  281. data: [190, 210, 105, 35, 27]
  282. }
  283. ]
  284. };
  285. this.chartDataTow = JSON.parse(JSON.stringify(res));
  286. }, 500);
  287. },
  288. },
  289. }
  290. </script>
  291. <style lang="stylus" scoped>
  292. .hazardSources {
  293. height: 100%;
  294. width: 100%;
  295. background: #363744;
  296. .small-title {
  297. width: 750rpx;
  298. height: 80rpx;
  299. background: #3E414F;
  300. display: flex;
  301. justify-content: space-between;
  302. align-items: center;
  303. padding: 0 20rpx 0 30rpx;
  304. box-sizing: border-box;
  305. margin-top: 2rpx;
  306. .small-title-l {
  307. flex: 1;
  308. font-weight: 400;
  309. font-size: 30rpx;
  310. color: #FFFFFF;
  311. line-height: 42rpx;
  312. overflow: hidden;
  313. text-overflow: ellipsis;
  314. white-space: nowrap;
  315. }
  316. .small-title-r {
  317. width: 14rpx;
  318. height: 8rpx;
  319. }
  320. }
  321. .chart {
  322. width: 690rpx;
  323. height: 520rpx;
  324. background: #3E414F;
  325. border-radius: 20rpx 20rpx 20rpx 20rpx;
  326. margin: 20rpx 30rpx 0;
  327. overflow: hidden;
  328. .chart-t {
  329. width: 570rpx;
  330. height: 50rpx;
  331. display: flex;
  332. justify-content: flex-start;
  333. border: 1rpx solid #52545F;
  334. border-radius: 10rpx;
  335. margin: 30rpx 0 0 72rpx;
  336. .chart-t-li {
  337. width: 190rpx;
  338. font-weight: 400;
  339. font-size: 28rpx;
  340. line-height: 50rpx;
  341. text-align: center;
  342. background: none;
  343. }
  344. .chart-t-li:nth-of-type(1) {
  345. border-right: 1rpx solid #52545F;
  346. }
  347. .chart-t-li:nth-of-type(2) {
  348. border-right: 1rpx solid #52545F;
  349. }
  350. .color-A {
  351. color: #FFFFFF;
  352. background: #52545F;
  353. }
  354. .color-B {
  355. color: #999999;
  356. background: none;
  357. }
  358. }
  359. .chart-b {
  360. width: 630rpx;
  361. height: 334rpx;
  362. margin-left: 30rpx;
  363. }
  364. .chart-b2 {
  365. width: 630rpx;
  366. margin: 0 30rpx;
  367. height: 106rx;
  368. display: flex;
  369. justify-content: flex-start;
  370. align-items: center;
  371. .chart-b2-li {
  372. flex: 1;
  373. .chart-b2-li-t {
  374. margin-top: 10rpx;
  375. >text:nth-of-type(1) {
  376. display: inline-block;
  377. width: 24rpx;
  378. height: 24rpx;
  379. background: #FF0000;
  380. border-radius: 6rpx 6rpx 6rpx 6rpx;
  381. margin-right: 10rpx;
  382. font-weight: 400;
  383. font-size: 22rpx;
  384. color: #FFFFFF;
  385. line-height: 24rpx;
  386. text-align: center;
  387. }
  388. >text:nth-of-type(2) {
  389. font-weight: 400;
  390. font-size: 24rpx;
  391. color: #FFFFFF;
  392. line-height: 34rpx;
  393. }
  394. }
  395. .chart-b2-li-b {
  396. margin-top: 10rpx;
  397. font-weight: 400;
  398. font-size: 24rpx;
  399. color: #FFFFFF;
  400. line-height: 34rpx;
  401. text-align: center;
  402. }
  403. }
  404. }
  405. .chart-b-tow {
  406. width: 630rpx;
  407. height: 440rpx;
  408. margin-left: 30rpx;
  409. }
  410. }
  411. .tabTitle_tow {
  412. width: 750rpx;
  413. height: 80rpx;
  414. white-space: nowrap;
  415. display: inline-flex;
  416. background: #3E414F;
  417. margin-top: 20rpx;
  418. padding-left: 35rpx;
  419. .tabTitle_tow_li {
  420. position: relative;
  421. width: 152rpx;
  422. height: 80rpx;
  423. text-align center;
  424. padding-top: 18rpx;
  425. box-sizing: border-box;
  426. .tabTitle_tow_text {
  427. display: inline-block;
  428. font-size: 32rpx;
  429. font-family: PingFang SC;
  430. font-weight: 500;
  431. color: #FFFFFF;
  432. line-height: 46rpx;
  433. position: relative;
  434. &.on {
  435. color: #0183FA;
  436. }
  437. }
  438. .tabTitle_tow_across {
  439. width: 50rpx;
  440. height: 4rpx;
  441. background: #0183FA;
  442. border-radius: 2rpx;
  443. margin-left: 33%;
  444. margin-top: 16rpx;
  445. display none;
  446. &.on {
  447. display block;
  448. }
  449. }
  450. }
  451. }
  452. .table {
  453. width: 720rpx;
  454. margin: 20rpx 0 0 30rpx;
  455. .table-border {
  456. width: auto;
  457. overflow: auto;
  458. .table-th {
  459. width: 860rpx;
  460. padding: 0 30rpx;
  461. box-sizing: border-box;
  462. background: rgba(162, 162, 162, 0.2);
  463. border-radius: 20rpx 20rpx 0rpx 0rpx;
  464. .table-th-li {
  465. height: 80rpx;
  466. display: flex;
  467. justify-content: flex-start;
  468. >view {
  469. font-weight: 400;
  470. font-size: 30rpx;
  471. color: #FFFFFF;
  472. line-height: 80rpx;
  473. text-align: center;
  474. margin-right: 38rpx;
  475. width: 120rpx;
  476. overflow: hidden;
  477. text-overflow: ellipsis;
  478. white-space: nowrap;
  479. }
  480. >view:nth-of-type(1) {
  481. width: 116rpx;
  482. text-align: left;
  483. margin-right: 0;
  484. }
  485. >view:nth-of-type(2) {
  486. width: 168rpx;
  487. }
  488. >view:last-child {
  489. margin-right: 0;
  490. width: 228rpx;
  491. }
  492. }
  493. }
  494. .table-tb {
  495. width: 860rpx;
  496. background: #3E414F;
  497. padding: 0 30rpx;
  498. box-sizing: border-box;
  499. .table-tb-li {
  500. height: 80rpx;
  501. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  502. display: flex;
  503. justify-content: flex-start;
  504. >view {
  505. font-weight: 400;
  506. font-size: 28rpx;
  507. color: #FFFFFF;
  508. line-height: 80rpx;
  509. text-align: center;
  510. margin-right: 38rpx;
  511. width: 120rpx;
  512. overflow: hidden;
  513. text-overflow: ellipsis;
  514. white-space: nowrap;
  515. }
  516. >view:nth-of-type(1) {
  517. width: 116rpx;
  518. text-align: left;
  519. margin-right: 0;
  520. }
  521. >view:nth-of-type(2) {
  522. width: 168rpx;
  523. }
  524. >view:last-child {
  525. margin-right: 0;
  526. width: 228rpx;
  527. }
  528. }
  529. }
  530. }
  531. }
  532. .table-tow {
  533. width: 690rpx;
  534. margin: 20rpx 0 0 30rpx;
  535. .table-border {
  536. width: auto;
  537. overflow: auto;
  538. .table-th {
  539. width: 690rpx;
  540. padding: 0 30rpx;
  541. box-sizing: border-box;
  542. background: rgba(162, 162, 162, 0.2);
  543. border-radius: 20rpx 20rpx 0rpx 0rpx;
  544. .table-th-li {
  545. height: 80rpx;
  546. display: flex;
  547. justify-content: flex-start;
  548. >view {
  549. font-weight: 400;
  550. font-size: 30rpx;
  551. color: #FFFFFF;
  552. line-height: 80rpx;
  553. text-align: center;
  554. margin-right: 38rpx;
  555. width: 120rpx;
  556. overflow: hidden;
  557. text-overflow: ellipsis;
  558. white-space: nowrap;
  559. }
  560. >view:nth-of-type(1) {
  561. width: 64rpx;
  562. text-align: left;
  563. margin-right: 0;
  564. }
  565. >view:nth-of-type(2) {
  566. width: 270rpx;
  567. }
  568. >view:last-child {
  569. margin-right: 0;
  570. }
  571. }
  572. }
  573. .table-tb {
  574. width: 690rpx;
  575. background: #3E414F;
  576. padding: 0 30rpx;
  577. box-sizing: border-box;
  578. .table-tb-li {
  579. height: 80rpx;
  580. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  581. display: flex;
  582. justify-content: flex-start;
  583. >view {
  584. font-weight: 400;
  585. font-size: 28rpx;
  586. color: #FFFFFF;
  587. line-height: 80rpx;
  588. text-align: center;
  589. margin-right: 38rpx;
  590. width: 120rpx;
  591. overflow: hidden;
  592. text-overflow: ellipsis;
  593. white-space: nowrap;
  594. }
  595. >view:nth-of-type(1) {
  596. width: 64rpx;
  597. text-align: left;
  598. margin-right: 0;
  599. }
  600. >view:nth-of-type(2) {
  601. width: 270rpx;
  602. }
  603. >view:last-child {
  604. margin-right: 0;
  605. }
  606. }
  607. }
  608. }
  609. }
  610. .table-three {
  611. width: 720rpx;
  612. margin: 20rpx 0 0 30rpx;
  613. .table-border {
  614. width: auto;
  615. overflow: auto;
  616. .table-th {
  617. width: 1510rpx;
  618. padding: 0 30rpx;
  619. box-sizing: border-box;
  620. background: rgba(162, 162, 162, 0.2);
  621. border-radius: 20rpx 20rpx 0rpx 0rpx;
  622. .table-th-li {
  623. height: 80rpx;
  624. display: flex;
  625. justify-content: flex-start;
  626. >view {
  627. font-weight: 400;
  628. font-size: 30rpx;
  629. color: #FFFFFF;
  630. line-height: 80rpx;
  631. text-align: center;
  632. margin-right: 38rpx;
  633. width: 120rpx;
  634. overflow: hidden;
  635. text-overflow: ellipsis;
  636. white-space: nowrap;
  637. }
  638. >view:nth-of-type(1) {
  639. width: 116rpx;
  640. text-align: left;
  641. margin-right: 0;
  642. }
  643. >view:nth-of-type(2) {
  644. width: 168rpx;
  645. }
  646. >view:last-child {
  647. margin-right: 0;
  648. width: 228rpx;
  649. }
  650. }
  651. }
  652. .table-tb {
  653. width: 1510rpx;
  654. background: #3E414F;
  655. padding: 0 30rpx;
  656. box-sizing: border-box;
  657. .table-tb-li {
  658. height: 80rpx;
  659. border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
  660. display: flex;
  661. justify-content: flex-start;
  662. >view {
  663. font-weight: 400;
  664. font-size: 28rpx;
  665. color: #FFFFFF;
  666. line-height: 80rpx;
  667. text-align: center;
  668. margin-right: 38rpx;
  669. width: 120rpx;
  670. overflow: hidden;
  671. text-overflow: ellipsis;
  672. white-space: nowrap;
  673. }
  674. >view:nth-of-type(1) {
  675. width: 116rpx;
  676. text-align: left;
  677. margin-right: 0;
  678. }
  679. >view:nth-of-type(2) {
  680. width: 168rpx;
  681. }
  682. >view:last-child {
  683. margin-right: 0;
  684. width: 228rpx;
  685. }
  686. }
  687. }
  688. }
  689. }
  690. }
  691. </style>