myequipmentinspectionreportlist.vue 6.6 KB

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