snapshotList.vue 8.6 KB

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