snapshotList.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. <!-- 随手拍-列表 -->
  2. <template>
  3. <view class="examine">
  4. <view class="header">
  5. <view class="tabTitle_tow">
  6. <view class="tabTitle_tow_li" @tap="tabClickTow(index)" :key="index" v-for="(item,index) in tabTextTow">
  7. <view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item}}</view>
  8. <view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
  9. </view>
  10. </view>
  11. </view>
  12. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  13. <view class="list_three">
  14. <view class="list_three_li" v-for="(item,index) in dataList" :key="index" @click="handleClick(item,'detail')">
  15. <view class="list_three_li_t">
  16. <view class="list_three_li_t_l"></view>
  17. <view class="list_three_li_t_c">{{item.subName}}</view>
  18. <view class="list_three_li_t_r"></view>
  19. </view>
  20. <view class="list_three_li_m">
  21. <view class="list_three_li_m_t">{{item.hazardDescribe}}</view>
  22. <view class="list_three_li_m_b">
  23. <text class="blue_color" v-if="item.rectifyStatus==0">待整改</text>
  24. <text class="green_color" v-if="item.rectifyStatus==1">已整改</text>
  25. <text class="orange_color" v-if="item.rectifyStatus==2">暂无法整改</text>
  26. <text>{{item.deptName}}</text>
  27. </view>
  28. </view>
  29. <view class="list_three_li_b">
  30. <view class="list_three_li_b_l">
  31. <img src="@/pages_safetyExamine/images/icon_ssp_ry.png"/>
  32. <text>上报人:{{item.createName}}</text>
  33. </view>
  34. <view class="list_three_li_b_r">{{item.timeFlag}}</view>
  35. </view>
  36. </view>
  37. </view>
  38. <img class="null-img" v-if="!dataList[0]" src="@/images/null-data-1.png">
  39. </scroll-view>
  40. </view>
  41. </template>
  42. <script>
  43. import { config } from '@/api/request/config.js'
  44. import {checkClapList,checkClapMylist} from '@/api/index.js'
  45. export default {
  46. name: "rectifyList",
  47. components: {
  48. },
  49. data() {
  50. return {
  51. pageType:0,
  52. //列表请求参数
  53. getData:{
  54. pageNum:1,
  55. pageSize:20,
  56. rectifyStatus:0,
  57. },
  58. tabTextTow:['待整改','已整改','暂无法整改'],
  59. curTabTow:0,
  60. form:{
  61. name:'',
  62. type:'校院巡查',
  63. startTime:'',
  64. endTime:'',
  65. inspectScope:[],
  66. tiemQuickList:[],
  67. scopeIndex:'',
  68. seleteListLab:[],
  69. patrolIndex:'',
  70. seleteListMember:[],
  71. },
  72. collegeList:[{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},],
  73. collegeIndex :0,
  74. collegeArray:['选择学院','学院名称1','学院名称2','学院名称3',],
  75. dataList:[],
  76. }
  77. },
  78. onLoad(option) {
  79. if(option.form){
  80. this.form=JSON.parse(decodeURIComponent(option.form));
  81. console.log(this.form)
  82. }
  83. if(option.pageType){
  84. this.pageType=option.pageType
  85. if(option.pageType==1){
  86. uni.setNavigationBarTitle({
  87. title:'随手拍管理'
  88. })
  89. }else if(option.pageType==2){
  90. uni.setNavigationBarTitle({
  91. title:'随手拍上报记录'
  92. })
  93. }
  94. }
  95. },
  96. onShow() {
  97. },
  98. mounted(){
  99. this.getList()
  100. },
  101. methods: {
  102. //顶部tab点击
  103. tabClickTow(index) {
  104. this.dataList=[];
  105. this.curTabTow = index;
  106. this.getData.pageNum=1;
  107. this.getData.rectifyStatus=index;
  108. this.getList()
  109. },
  110. //滚动事件
  111. scrollGet(){
  112. let self=this;
  113. if(self.total/self.getData.pageSize<=self.getData.pageNum){
  114. console.log('没有更多数据!')
  115. }else{
  116. setTimeout(function(){
  117. self.getData.pageNum += 1;
  118. self.getList();
  119. },1000)
  120. }
  121. },
  122. handleClick(item,doType){
  123. let self=this;
  124. if( doType=='subBtn'){//
  125. }else if(doType=='detail'){//详情
  126. uni.redirectTo({
  127. url: '/pages_safetyExamine/snapshotManage/snapshotDetail?id='+item.id+'&rectifyStatus='+this.getData.rectifyStatus+'&pageType='+this.pageType
  128. })
  129. }
  130. },
  131. async getList(){
  132. let _this = this;
  133. if(this.pageType==1){//随手拍管理
  134. const {data} = await checkClapList(this.getData);
  135. if(data.code==200){
  136. this.total=data.data.total;
  137. this.dataList=[...this.dataList,...data.data.records]
  138. }
  139. }else if(this.pageType==2){//随手拍记录
  140. const {data} = await checkClapMylist(this.getData);
  141. if(data.code==200){
  142. this.total=data.data.total;
  143. this.dataList=[...this.dataList,...data.data.records]
  144. }
  145. }
  146. },
  147. }
  148. }
  149. </script>
  150. <style lang="stylus" scoped>
  151. .examine{
  152. height:100%;
  153. display flex;
  154. // padding: 0 30rpx;
  155. // box-sizing: border-box;
  156. padding-bottom: 20rpx;
  157. box-sizing: border-box;
  158. .blue_color{
  159. color: #0183FA;
  160. border: 1rpx solid #0183FA;
  161. }
  162. .red_color{
  163. color: #FF4545;
  164. border: 1rpx solid #FF4545;
  165. }
  166. .green_color{
  167. color: #1FA50D;
  168. border: 1rpx solid #1FA50D;
  169. }
  170. .orange_color{
  171. color: #FA8E1B;
  172. border: 1rpx solid #FA8E1B;
  173. }
  174. .gray_color{
  175. color: #A2A2A2;
  176. border: 1rpx solid #A2A2A2;
  177. }
  178. .null-img{
  179. display block
  180. width:276rpx;
  181. height:321rpx;
  182. margin:100rpx 0 0 274rpx;
  183. }
  184. .info-max-box{
  185. flex: 1;
  186. overflow: scroll;
  187. padding: 120rpx 0rpx 0;
  188. box-sizing: border-box;
  189. }
  190. /* 切换按钮 */
  191. .header{
  192. width:100%;
  193. position: fixed;
  194. top: 0rpx;
  195. z-index: 100;
  196. .tabTitle_tow{
  197. width:100%;
  198. height: 100rpx;
  199. background: #fff;
  200. display flex;
  201. justify-content: flex-start;
  202. align-items: center;
  203. border-bottom: 1rpx solid #E0E0E0;
  204. .tabTitle_tow_li{
  205. flex:1;
  206. position: relative;
  207. text-align center;
  208. .tabTitle_tow_text{
  209. display: inline-block;
  210. font-size: 30rpx;
  211. font-family: PingFang SC;
  212. font-weight: 500;
  213. color: #333333;
  214. line-height: 46rpx;
  215. position: relative;
  216. &.on{
  217. color:#0183FA;
  218. }
  219. }
  220. .tabTitle_tow_across{
  221. width: 50rpx;
  222. height: 4rpx;
  223. background: #0183FA;
  224. border-radius: 2rpx;
  225. margin-left: 38%;
  226. display none;
  227. &.on{
  228. display block;
  229. }
  230. }
  231. }
  232. }
  233. }
  234. .list_three{
  235. padding: 0 30rpx;
  236. box-sizing: border-box;
  237. .list_three_li{
  238. position: relative;
  239. width: 690rpx;
  240. height: 336rpx;
  241. background: #fff;
  242. border-radius: 10rpx;
  243. overflow: hidden;
  244. margin-bottom: 20rpx;
  245. .list_three_li_t{
  246. width: 100%;
  247. position: absolute;
  248. left: 0;
  249. top: 0;
  250. .list_three_li_t_l{
  251. position: absolute;
  252. left: -15rpx;
  253. top: 76rpx;
  254. display: inline-block;
  255. width: 30rpx;
  256. height: 30rpx;
  257. background: #F5F5F5;
  258. border-radius: 15rpx;
  259. }
  260. .list_three_li_t_c{
  261. width: 630rpx;
  262. height: 110rpx;
  263. position: absolute;
  264. left: 30rpx;
  265. top: 0;
  266. font-size: 30rpx;
  267. font-family: PingFang SC-Medium, PingFang SC;
  268. font-weight: 400;
  269. color: #333333;
  270. line-height: 110rpx;
  271. border-bottom: 1rpx dashed #D8D8D8;
  272. overflow: hidden;
  273. text-overflow:ellipsis;
  274. white-space: nowrap;
  275. padding-right: 60rpx;
  276. box-sizing: border-box;
  277. }
  278. .list_three_li_t_r{
  279. position: absolute;
  280. right:-15rpx;
  281. top: 76rpx;
  282. width: 30rpx;
  283. height: 30rpx;
  284. background:#F5F5F5;
  285. border-radius: 15rpx;
  286. }
  287. }
  288. .list_three_li_m{
  289. position: absolute;
  290. top: 110rpx;
  291. left: 0;
  292. width: 690rpx;
  293. height: 158rpx;
  294. padding-left: 30rpx;
  295. box-sizing: border-box;
  296. .list_three_li_m_t{
  297. font-size: 28rpx;
  298. font-family: PingFang SC-Medium, PingFang SC;
  299. font-weight: 400;
  300. color: #666666;
  301. line-height: 40rpx;
  302. margin-top:22rpx;
  303. white-space: nowrap;
  304. overflow: hidden;
  305. text-overflow: ellipsis;
  306. }
  307. .list_three_li_m_b{
  308. margin-top:26rpx;
  309. >text:nth-of-type(1){
  310. font-size: 26rpx;
  311. font-family: PingFang SC-Medium, PingFang SC;
  312. font-weight: 400;
  313. line-height: 40rpx;
  314. border-radius: 6rpx;
  315. padding: 0 20rpx;
  316. box-sizing: border-box;
  317. margin-right: 14rpx;
  318. }
  319. >text:nth-of-type(2){
  320. display: inline-block;
  321. width: 380rpx;
  322. font-size: 26rpx;
  323. font-family: PingFang SC-Medium, PingFang SC;
  324. font-weight: 400;
  325. color: #333333;
  326. line-height: 26rpx;
  327. overflow: hidden;
  328. text-overflow:ellipsis;
  329. white-space: nowrap;
  330. }
  331. }
  332. }
  333. .list_three_li_b{
  334. height: 76rpx;
  335. width: 100%;
  336. position: absolute;
  337. top: 258rpx;
  338. left: 0;
  339. padding:0 30rpx;
  340. box-sizing: border-box;
  341. display: flex;
  342. justify-content: space-between;
  343. align-items: center;
  344. .list_three_li_b_l{
  345. display: flex;
  346. justify-content: space-between;
  347. align-items: center;
  348. >img{
  349. width: 28rpx;
  350. height: 30rpx;
  351. margin-right: 14rpx;
  352. }
  353. >text{
  354. font-size: 28rpx;
  355. font-family: PingFang SC-Medium, PingFang SC;
  356. font-weight: 400;
  357. color: #666666;
  358. line-height: 76rpx;
  359. }
  360. }
  361. .list_three_li_b_r{
  362. font-size: 24rpx;
  363. font-family: PingFang SC-Medium, PingFang SC;
  364. font-weight: 400;
  365. color: #999999;
  366. line-height: 76rpx;
  367. }
  368. }
  369. }
  370. }
  371. }
  372. </style>