snapshotList.vue 9.5 KB

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