earlyWarningList.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <!-- 安全检查-校院巡查管理 -->
  2. <template>
  3. <view class="earlyWarning">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <viw class="list" v-for="(item,index) in dataList" :key="index">
  6. <view class="list_t">{{item.date}}</view>
  7. <view class="list_li" v-for="(item2,index2) in item.list" :key="index2" @click="handleClick(item2,'detail')">
  8. <view class="list_li_t">
  9. <view class="list_li_t_l"></view>
  10. <view class="list_li_t_c orange_color" v-if="item2.warningType==1">算法识别</view>
  11. <view class="list_li_t_c yellow_color" v-if="item2.warningType==2">化学品</view>
  12. <view class="list_li_t_c yellow_color" v-if="item2.warningType==3">气瓶</view>
  13. <view class="list_li_t_c red_color" v-if="item2.warningType==4">预案</view>
  14. <view class="list_li_t_c2">{{item2.warningContent}}</view>
  15. <view class="list_li_t_r"></view>
  16. </view>
  17. <view class="list_li_b">
  18. <view class="list_li_b_t">
  19. <text>{{item2.subName}}</text>
  20. <text>{{item2.warningTime.split(' ')[1]}}</text>
  21. </view>
  22. <view class="list_li_b_b">
  23. <img src="@/images/Version2.2/icon_wtzg_xx.png"/>
  24. <text>{{item2.buildName}}-{{item2.floorName}}{{item2.roomNum}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. </viw>
  29. <img class="null-img" v-if="!dataList[0]" src="@/images/null-data-1.png">
  30. </scroll-view>
  31. </view>
  32. </template>
  33. <script>
  34. import { config } from '@/api/request/config.js'
  35. import {checkManageList,conditionCollegeInfo,warningNoticeLogList} from '@/api/index.js'
  36. export default {
  37. name: "rectifyList",
  38. components: {
  39. },
  40. data() {
  41. return {
  42. //列表请求参数
  43. getData:{
  44. pageNum:1,
  45. pageSize:20,
  46. },
  47. dataList:[],
  48. total:0,
  49. }
  50. },
  51. onLoad(option) {
  52. },
  53. onShow() {
  54. },
  55. mounted(){
  56. this.getList();
  57. },
  58. methods: {
  59. //滚动事件
  60. scrollGet(){
  61. let self=this;
  62. if(self.total/self.getData.pageSize<=self.getData.pageNum){
  63. console.log('没有更多数据!')
  64. }else{
  65. setTimeout(function(){
  66. self.getData.pageNum += 1;
  67. self.getList();
  68. },1000)
  69. }
  70. },
  71. handleClick(row,doType){
  72. let self=this;
  73. if( doType=='detail'){//详情
  74. uni.navigateTo({
  75. url: '/pages/earlyWarningManage/earlyWarningDetail?id='+row.id,//安全警报
  76. });
  77. }
  78. },
  79. async getList(){
  80. let self = this;
  81. const {data} = await warningNoticeLogList(this.getData);
  82. if(data.code==200){
  83. let list=[];
  84. for(let i in data.data.records[0]){
  85. list.push({'date':i,'list':data.data.records[0][i]})
  86. }
  87. this.dataList=[...this.dataList,...list]
  88. this.total=data.data.total;
  89. console.log(this.dataList)
  90. }
  91. },
  92. }
  93. }
  94. </script>
  95. <style lang="stylus" scoped>
  96. .earlyWarning{
  97. height:100%;
  98. display flex;
  99. padding: 0 30rpx;
  100. box-sizing: border-box;
  101. .red_color{
  102. color: #D40000;
  103. border: 1rpx solid #D40000;
  104. }
  105. .orange_color{
  106. color: #FF4800;
  107. border: 1rpx solid #FF4800;
  108. }
  109. .yellow_color{
  110. color: #FFA34E;
  111. border: 1rpx solid #FFA34E;
  112. }
  113. .null-img{
  114. display block
  115. width:276rpx;
  116. height:321rpx;
  117. margin:100rpx 0 0 274rpx;
  118. }
  119. .list{
  120. .list_t{
  121. height: 80rpx;
  122. font-size: 30rpx;
  123. font-family: PingFang SC-Medium, PingFang SC;
  124. font-weight: 400;
  125. color: #666666;
  126. line-height: 80rpx;
  127. }
  128. .list_li{
  129. width: 690rpx;
  130. height:auto;
  131. background: #FFFFFF;
  132. border-radius: 10rpx;
  133. padding-bottom: 52rpx;
  134. box-sizing: border-box;
  135. margin-bottom: 20rpx;
  136. .list_li_t{
  137. position: relative;
  138. height: 110rpx;
  139. display: flex;
  140. justify-content: flex-start;
  141. align-items: center;
  142. .list_li_t_l{
  143. position: absolute;
  144. left:-15rpx;
  145. top: 76rpx;
  146. width: 30rpx;
  147. height: 30rpx;
  148. background:#F5F5F5;
  149. border-radius: 15rpx;
  150. }
  151. .list_li_t_c{
  152. height: 40rpx;
  153. font-size: 30rpx;
  154. font-family: PingFang SC-Medium, PingFang SC;
  155. font-weight: 400;
  156. line-height: 36rpx;
  157. margin-left: 30rpx;
  158. margin-right: 20rpx;
  159. border-radius: 20rpx;
  160. padding: 0 20rpx;
  161. box-sizing: border-box;
  162. }
  163. .list_li_t_c2{
  164. font-size: 30rpx;
  165. font-family: PingFang SC-Medium, PingFang SC;
  166. font-weight: 400;
  167. color: #333333;
  168. line-height: 30rpx;
  169. white-space: nowrap;
  170. overflow: hidden;
  171. text-overflow: ellipsis;
  172. flex: 1;
  173. }
  174. .list_li_t_r{
  175. position: absolute;
  176. right:-15rpx;
  177. top: 76rpx;
  178. width: 30rpx;
  179. height: 30rpx;
  180. background:#F5F5F5;
  181. border-radius: 15rpx;
  182. }
  183. }
  184. .list_li_b{
  185. margin: 0 30rpx;
  186. border-top: 1rpx dotted #D8D8D8;
  187. .list_li_b_t{
  188. display: flex;
  189. justify-content: space-between;
  190. margin-top:28rpx;
  191. >text:nth-of-type(1){
  192. font-size: 30rpx;
  193. font-family: PingFang SC-Medium, PingFang SC;
  194. font-weight: 400;
  195. color: #333333;
  196. line-height: 30rpx;
  197. }
  198. >text:nth-of-type(2){
  199. font-size: 30rpx;
  200. font-family: PingFang SC-Medium, PingFang SC;
  201. font-weight: 400;
  202. color: #666666;
  203. line-height: 30rpx;
  204. }
  205. }
  206. .list_li_b_b{
  207. display: flex;
  208. justify-content: flex-start;
  209. margin-top:30rpx;
  210. >img{
  211. width: 30rpx;
  212. height: 30rpx;
  213. margin-right: 22rpx;
  214. }
  215. >text{
  216. font-size: 28rpx;
  217. font-family: PingFang SC-Medium, PingFang SC;
  218. font-weight: 400;
  219. color: #666666;
  220. line-height: 28rpx;
  221. white-space: nowrap;
  222. overflow: hidden;
  223. text-overflow: ellipsis;
  224. flex: 1;
  225. }
  226. }
  227. }
  228. }
  229. }
  230. .info-max-box{
  231. flex: 1;
  232. overflow: scroll;
  233. }
  234. }
  235. </style>