snapshotList.vue 9.5 KB

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