snapshotList.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  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/basicsModules/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/apiDemo/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.dataList=[];
  100. this.getList()
  101. },
  102. methods: {
  103. //顶部tab点击
  104. tabClickTow(index) {
  105. this.dataList=[];
  106. this.curTabTow = index;
  107. this.getData.pageNum=1;
  108. this.getData.rectifyStatus=index;
  109. this.getList()
  110. },
  111. //滚动事件
  112. scrollGet(){
  113. let self=this;
  114. if(self.total/self.getData.pageSize<=self.getData.pageNum){
  115. console.log('没有更多数据!')
  116. }else{
  117. setTimeout(function(){
  118. self.getData.pageNum += 1;
  119. self.getList();
  120. },1000)
  121. }
  122. },
  123. handleClick(item,doType){
  124. let self=this;
  125. if( doType=='subBtn'){//
  126. }else if(doType=='detail'){//详情
  127. uni.navigateTo({
  128. url: '/pages_safetyExamine/snapshotManage/snapshotDetail?id='+item.id+'&rectifyStatus='+this.getData.rectifyStatus+'&pageType='+this.pageType
  129. })
  130. }
  131. },
  132. async getList(){
  133. let _this = this;
  134. if(this.pageType==1){//随手拍管理
  135. const {data} = await checkClapList(this.getData);
  136. if(data.code==200){
  137. this.total=data.data.total;
  138. this.dataList=[...this.dataList,...data.data.records]
  139. }
  140. }else if(this.pageType==2){//随手拍记录
  141. const {data} = await checkClapMylist(this.getData);
  142. if(data.code==200){
  143. this.total=data.data.total;
  144. this.dataList=[...this.dataList,...data.data.records]
  145. }
  146. }
  147. },
  148. }
  149. }
  150. </script>
  151. <style lang="stylus" scoped>
  152. .examine{
  153. height:100%;
  154. display flex;
  155. // padding: 0 30rpx;
  156. // box-sizing: border-box;
  157. padding-bottom: 20rpx;
  158. box-sizing: border-box;
  159. .blue_color{
  160. color: #0183FA;
  161. border: 1rpx solid #0183FA;
  162. }
  163. .red_color{
  164. color: #FF4545;
  165. border: 1rpx solid #FF4545;
  166. }
  167. .green_color{
  168. color: #1FA50D;
  169. border: 1rpx solid #1FA50D;
  170. }
  171. .orange_color{
  172. color: #FA8E1B;
  173. border: 1rpx solid #FA8E1B;
  174. }
  175. .gray_color{
  176. color: #A2A2A2;
  177. border: 1rpx solid #A2A2A2;
  178. }
  179. .null-img{
  180. display block
  181. width:276rpx;
  182. height:321rpx;
  183. margin:100rpx 0 0 274rpx;
  184. }
  185. .info-max-box{
  186. flex: 1;
  187. overflow: scroll;
  188. padding: 120rpx 0rpx 0;
  189. box-sizing: border-box;
  190. }
  191. /* 切换按钮 */
  192. .header{
  193. width:100%;
  194. position: fixed;
  195. top: 0rpx;
  196. z-index: 100;
  197. .tabTitle_tow{
  198. width:100%;
  199. height: 100rpx;
  200. background: #fff;
  201. display flex;
  202. justify-content: flex-start;
  203. align-items: center;
  204. border-bottom: 1rpx solid #E0E0E0;
  205. .tabTitle_tow_li{
  206. flex:1;
  207. position: relative;
  208. text-align center;
  209. .tabTitle_tow_text{
  210. display: inline-block;
  211. font-size: 30rpx;
  212. font-family: PingFang SC;
  213. font-weight: 500;
  214. color: #333333;
  215. line-height: 46rpx;
  216. position: relative;
  217. &.on{
  218. color:#0183FA;
  219. }
  220. }
  221. .tabTitle_tow_across{
  222. width: 50rpx;
  223. height: 4rpx;
  224. background: #0183FA;
  225. border-radius: 2rpx;
  226. margin-left: 38%;
  227. display none;
  228. &.on{
  229. display block;
  230. }
  231. }
  232. }
  233. }
  234. }
  235. .list_three{
  236. padding: 0 30rpx;
  237. box-sizing: border-box;
  238. .list_three_li{
  239. position: relative;
  240. width: 690rpx;
  241. height: 336rpx;
  242. background: #fff;
  243. border-radius: 10rpx;
  244. overflow: hidden;
  245. margin-bottom: 20rpx;
  246. .list_three_li_t{
  247. width: 100%;
  248. position: absolute;
  249. left: 0;
  250. top: 0;
  251. .list_three_li_t_l{
  252. position: absolute;
  253. left: -15rpx;
  254. top: 76rpx;
  255. display: inline-block;
  256. width: 30rpx;
  257. height: 30rpx;
  258. background: #F5F5F5;
  259. border-radius: 15rpx;
  260. }
  261. .list_three_li_t_c{
  262. width: 630rpx;
  263. height: 110rpx;
  264. position: absolute;
  265. left: 30rpx;
  266. top: 0;
  267. font-size: 30rpx;
  268. font-family: PingFang SC-Medium, PingFang SC;
  269. font-weight: 400;
  270. color: #333333;
  271. line-height: 110rpx;
  272. border-bottom: 1rpx dashed #D8D8D8;
  273. overflow: hidden;
  274. text-overflow:ellipsis;
  275. white-space: nowrap;
  276. padding-right: 60rpx;
  277. box-sizing: border-box;
  278. }
  279. .list_three_li_t_r{
  280. position: absolute;
  281. right:-15rpx;
  282. top: 76rpx;
  283. width: 30rpx;
  284. height: 30rpx;
  285. background:#F5F5F5;
  286. border-radius: 15rpx;
  287. }
  288. }
  289. .list_three_li_m{
  290. position: absolute;
  291. top: 110rpx;
  292. left: 0;
  293. width: 690rpx;
  294. height: 158rpx;
  295. padding-left: 30rpx;
  296. box-sizing: border-box;
  297. .list_three_li_m_t{
  298. font-size: 28rpx;
  299. font-family: PingFang SC-Medium, PingFang SC;
  300. font-weight: 400;
  301. color: #666666;
  302. line-height: 40rpx;
  303. margin-top:22rpx;
  304. white-space: nowrap;
  305. overflow: hidden;
  306. text-overflow: ellipsis;
  307. }
  308. .list_three_li_m_b{
  309. margin-top:26rpx;
  310. >text:nth-of-type(1){
  311. font-size: 26rpx;
  312. font-family: PingFang SC-Medium, PingFang SC;
  313. font-weight: 400;
  314. line-height: 40rpx;
  315. border-radius: 6rpx;
  316. padding: 0 20rpx;
  317. box-sizing: border-box;
  318. margin-right: 14rpx;
  319. }
  320. >text:nth-of-type(2){
  321. display: inline-block;
  322. width: 380rpx;
  323. font-size: 26rpx;
  324. font-family: PingFang SC-Medium, PingFang SC;
  325. font-weight: 400;
  326. color: #333333;
  327. line-height: 26rpx;
  328. overflow: hidden;
  329. text-overflow:ellipsis;
  330. white-space: nowrap;
  331. }
  332. }
  333. }
  334. .list_three_li_b{
  335. height: 76rpx;
  336. width: 100%;
  337. position: absolute;
  338. top: 258rpx;
  339. left: 0;
  340. padding:0 30rpx;
  341. box-sizing: border-box;
  342. display: flex;
  343. justify-content: space-between;
  344. align-items: center;
  345. .list_three_li_b_l{
  346. display: flex;
  347. justify-content: space-between;
  348. align-items: center;
  349. >img{
  350. width: 28rpx;
  351. height: 30rpx;
  352. margin-right: 14rpx;
  353. }
  354. >text{
  355. font-size: 28rpx;
  356. font-family: PingFang SC-Medium, PingFang SC;
  357. font-weight: 400;
  358. color: #666666;
  359. line-height: 76rpx;
  360. }
  361. }
  362. .list_three_li_b_r{
  363. font-size: 24rpx;
  364. font-family: PingFang SC-Medium, PingFang SC;
  365. font-weight: 400;
  366. color: #999999;
  367. line-height: 76rpx;
  368. }
  369. }
  370. }
  371. }
  372. }
  373. </style>