todayequipmentinspectionreportlist.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view class="wrap">
  3. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  4. :title="title" @clickLeft="toBack">
  5. </uni-nav-bar>
  6. <!-- <u-gap height="75px"></u-gap> -->
  7. <view class="container">
  8. <uni-list>
  9. <uListItem ellipsis="1" v-for="item in lastEquipmentInspectionList" :key="item.id"
  10. :title="item.reportDesc" :note="item.createTime" clickable showArrow
  11. @click="onEquipmentInspectionItemClick(item.id)">
  12. <template v-slot:header>
  13. <view>
  14. <image class="slot-image" src="/static/images/user/c1.png" mode="widthFix"></image>
  15. </view>
  16. </template>
  17. </uListItem>
  18. </uni-list>
  19. <uGroup>
  20. <view class="uni-pagination-box">
  21. <uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total"
  22. @change="change" />
  23. </view>
  24. </uGroup>
  25. </view>
  26. <u-gap height="70"></u-gap>
  27. </view>
  28. </template>
  29. <script>
  30. import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
  31. import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
  32. import uGroup from '@/uni_modules/uni-group/uni-group.vue'
  33. import uSection from '@/uni_modules/uni-section/uni-section.vue'
  34. import uPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
  35. import uBreadcrumb from '@/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue'
  36. import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
  37. import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
  38. import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  39. import http from '@/http/api.js';
  40. export default {
  41. components: {
  42. uNavBar,
  43. uList,
  44. uListItem,
  45. uIcons,
  46. uGroup,
  47. },
  48. onLoad(option) {
  49. this.getLastEquipmentInspectionReport();
  50. },
  51. data() {
  52. return {
  53. list: [],
  54. title: '今日巡检填报信息',
  55. desc: '',
  56. pageSize: 10,
  57. // 当前页
  58. pageCurrent: 1,
  59. // 数据总量
  60. total: 0,
  61. }
  62. },
  63. computed: {
  64. getIcon() {
  65. return path => {
  66. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  67. }
  68. },
  69. },
  70. onShow() {
  71. },
  72. created() {
  73. },
  74. methods: {
  75. toBack() {
  76. uni.navigateBack({
  77. delta: 1
  78. })
  79. },
  80. // 分页触发
  81. change(e) {
  82. //this.$refs.table.clearSelection()
  83. this.selectedIndexs.length = 0
  84. this.pageCurrent=e.current;
  85. this.getOrderList()
  86. },
  87. getLastEquipmentInspectionReport() {
  88. const that = this;
  89. const current = this.pageCurrent;
  90. const size = this.pageSize;
  91. const isSubmit = '0';
  92. http.request({
  93. url: '/galaxy-test/equipment/inspection/report/page',
  94. method: 'GET',
  95. params: {
  96. current,
  97. size,
  98. isSubmit
  99. },
  100. }).then(res => {
  101. console.log(res.data)
  102. if (res.data != null) {
  103. if (res.data.records != null) {
  104. that.lastEquipmentInspectionList = res.data.records;
  105. }
  106. this.total=res.data.total;
  107. }
  108. }).catch(err => {
  109. console.log(err)
  110. })
  111. },
  112. onEquipmentInspectionItemClick(id) {
  113. console.log(id)
  114. var url = '/pages/equipment-inspection/equipmentinspectionreportdetail?id=' + id;
  115. uni.navigateTo({
  116. url: url
  117. })
  118. },
  119. }
  120. }
  121. </script>
  122. <style>
  123. /* page {
  124. background-color: rgb(240, 242, 244);
  125. } */
  126. </style>
  127. <style lang="scss" scoped>
  128. .container {
  129. padding: 0 0 150rpx;
  130. }
  131. .u-cell-icon {
  132. width: 36rpx;
  133. height: 36rpx;
  134. margin-right: 8rpx;
  135. }
  136. .slot-box {
  137. /* #ifndef APP-NVUE */
  138. display: flex;
  139. /* #endif */
  140. flex-direction: row;
  141. align-items: center;
  142. }
  143. .slot-image {
  144. /* #ifndef APP-NVUE */
  145. display: block;
  146. /* #endif */
  147. margin-right: 10px;
  148. width: 30px;
  149. height: 30px;
  150. }
  151. .slot-text {
  152. flex: 1;
  153. font-size: 14px;
  154. color: #4cd964;
  155. margin-right: 10px;
  156. }
  157. .content-box {
  158. flex: 1;
  159. /* #ifdef APP-NVUE */
  160. justify-content: center;
  161. /* #endif */
  162. height: 100%;
  163. line-height: 44px;
  164. padding: 0 15px;
  165. position: relative;
  166. background-color: #fff;
  167. border-bottom-color: #f5f5f5;
  168. border-bottom-width: 1px;
  169. border-bottom-style: solid;
  170. }
  171. .content-text {
  172. font-size: 15px;
  173. }
  174. .example-body {
  175. /* #ifndef APP-NVUE */
  176. display: flex;
  177. /* #endif */
  178. flex-direction: row;
  179. justify-content: center;
  180. padding: 10px 0;
  181. background-color: #fff;
  182. }
  183. .button {
  184. border-color: #e5e5e5;
  185. border-style: solid;
  186. border-width: 1px;
  187. padding: 4px 8px;
  188. border-radius: 4px;
  189. }
  190. .button-text {
  191. font-size: 15px;
  192. }
  193. .slot-button {
  194. /* #ifndef APP-NVUE */
  195. display: flex;
  196. height: 100%;
  197. /* #endif */
  198. flex: 1;
  199. flex-direction: row;
  200. justify-content: center;
  201. align-items: center;
  202. padding: 0 20px;
  203. background-color: #ff5a5f;
  204. }
  205. .slot-button-text {
  206. color: #ffffff;
  207. font-size: 14px;
  208. }
  209. </style>