mycheckorderlist.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. <template>
  2. <view class="wrap">
  3. <uNavBar dark :fixed="true" backgroundColor="#3F9EFF" status-bar 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. </uNavBar>
  9. <!-- <u-gap height="75px"></u-gap> -->
  10. <view class="container">
  11. <uni-list>
  12. <uni-list-item v-for="item in list" :key="item.id">
  13. <!-- 自定义 body -->
  14. <template v-slot:body>
  15. <view style="min-height: 110px;width: 100%;display: flex;flex-direction: column;">
  16. <view style="display: flex;flex-direction: row;align-items: center;">
  17. <image class="order-title-image" style="box-shadow:0 0 2px 2px lightblue"
  18. src="/static/images/logo_app.png" mode="widthFix">
  19. </image>
  20. <text style="margin-left: 5px;font-size: 1rem;font-weight: bold;">{{item.rtuName}}</text>
  21. <text style="margin-left: 5px;font-size: 0.9rem;">[{{item.rtuCode}}]</text>
  22. </view>
  23. <view style="display: flex;flex-direction: row;align-items: center; min-height: 30px;">
  24. <view style="width: 40%;display: flex;flex-direction: row;align-items: center;">
  25. <view style="font-size: 0.8rem;">状态:</view>
  26. <view style="margin-left: 5px;font-size: 0.8rem;color: gray;">
  27. {{item.orderStatusName}}</view>
  28. </view>
  29. <!-- <view style="margin-left:10px;width:100px;font-size: 0.7rem;color:gray;">
  30. {{item.processorName}}
  31. </view> -->
  32. <view style="font-size: 0.8rem;">更新时间:</view>
  33. <view style="margin-left:5px;font-size: 0.8rem;color:gray;">{{item.createTime}}</view>
  34. </view>
  35. <view style="display:flex;flex-direction:row;align-items: center;">
  36. <image class="slot-image" src="/static/images/icon_warning.png" mode="widthFix">
  37. </image>
  38. <text style="font-size:0.8rem;padding-left: 10rpx;">{{item.orderDesc}}</text>
  39. </view>
  40. <view style="margin-top:4px;display: flex;flex-direction: row;justify-content: flex-end;">
  41. <view
  42. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightblue"
  43. @click="toWarningPage(item.warnId)">
  44. <view style="display:flex;flex-direction: column;justify-content: center;">
  45. <uIcons class="input-uni-icon" type="info" size="18" color="coral" />
  46. </view>
  47. <view
  48. style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  49. <text style="color:black;font-size:0.7rem">预警信息</text>
  50. </view>
  51. </view>
  52. <view
  53. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightblue"
  54. @click="toOrderReport(item.id)">
  55. <view style="display:flex;flex-direction: column;justify-content: center;">
  56. <uIcons class="input-uni-icon" type="compose" size="18" color="coral" />
  57. </view>
  58. <view
  59. style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  60. <text style="color:black;font-size:0.7rem">工单填报</text>
  61. </view>
  62. </view>
  63. <view
  64. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightblue"
  65. @click="toLocation(item)">
  66. <view style="display:flex;flex-direction: column;justify-content: center;">
  67. <uIcons class="input-uni-icon" type="location" size="18" color="coral" />
  68. </view>
  69. <view
  70. style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  71. <text style="color:black;font-size:0.7rem">导航</text>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </template>
  77. </uni-list-item>
  78. </uni-list>
  79. <uGroup>
  80. <view class="uni-pagination-box">
  81. <uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total"
  82. @change="change" />
  83. </view>
  84. </uGroup>
  85. </view>
  86. <u-gap height="70"></u-gap>
  87. </view>
  88. </template>
  89. <script>
  90. import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
  91. import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
  92. import uGroup from '@/uni_modules/uni-group/uni-group.vue'
  93. import uSection from '@/uni_modules/uni-section/uni-section.vue'
  94. import uPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
  95. import uBreadcrumb from '@/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue'
  96. import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
  97. import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
  98. import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  99. import http from '@/http/api.js';
  100. export default {
  101. components: {
  102. uNavBar,
  103. uList,
  104. uListItem,
  105. uIcons,
  106. uGroup,
  107. },
  108. onLoad(option) {
  109. this.getOrderList();
  110. },
  111. data() {
  112. return {
  113. list: [],
  114. title: '我的工单',
  115. desc: '',
  116. pageSize: 10,
  117. // 当前页
  118. pageCurrent: 1,
  119. // 数据总量
  120. total: 0,
  121. }
  122. },
  123. computed: {
  124. getIcon() {
  125. return path => {
  126. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  127. }
  128. },
  129. },
  130. onShow() {
  131. },
  132. created() {
  133. },
  134. methods: {
  135. toBack() {
  136. uni.navigateBack({
  137. delta: 1
  138. })
  139. },
  140. // 分页触发
  141. change(e) {
  142. //this.$refs.table.clearSelection()
  143. this.selectedIndexs.length = 0
  144. this.pageCurrent = e.current;
  145. this.getOrderList()
  146. },
  147. getOrderList() {
  148. const current = this.pageCurrent;
  149. const size = this.pageSize;
  150. const isSubmit = '0';
  151. var that = this;
  152. http.request({
  153. url: '/galaxy-test/rtu/check/order/my/page',
  154. method: 'GET',
  155. params: {
  156. current,
  157. size,
  158. isSubmit
  159. },
  160. }).then(res => {
  161. if (res.data.records != null) {
  162. that.list = res.data.records;
  163. }
  164. this.total = res.data.total;
  165. }).catch(err => {
  166. console.log(err)
  167. })
  168. },
  169. toWarningPage(id) {
  170. var url = '/pages/warning/warninginfodetail?id=' + id;
  171. uni.navigateTo({
  172. url: url
  173. })
  174. },
  175. toOrderReport(id) {
  176. var url = '/pages/check-order/orderprocesslist?id=' + id;
  177. uni.navigateTo({
  178. url: url
  179. })
  180. },
  181. toLocation(item) {
  182. let lat = item.lat;
  183. let lng = item.lng;
  184. let name = item.rtuName;
  185. let add = item.locationDesc;
  186. uni.openLocation({
  187. latitude: Number(lat),
  188. longitude: Number(lng),
  189. name: name,
  190. address: add,
  191. success() {
  192. }
  193. })
  194. },
  195. getTitle(checkNo) {
  196. return "问题编号:" + checkNo;
  197. },
  198. swipeChange(e, index) {
  199. console.log('返回:', e);
  200. console.log('当前索引:', index);
  201. },
  202. swipeClick(e, index) {
  203. },
  204. locationToHandle(id) {
  205. const that = this;
  206. // uni.showModal({
  207. // content: '确定删除记录?',
  208. // showCancel: true,
  209. // success(res) {
  210. // if (res.confirm) {
  211. // var ids = id;
  212. // http.request({
  213. // url: '/blade-business/report/failure/remove',
  214. // method: 'POST',
  215. // params: {
  216. // ids
  217. // }
  218. // }).then(res => {
  219. // console.log(JSON.stringify(res.data))
  220. // if (res.success) {
  221. // uni.showModal({
  222. // content: '删除已成功',
  223. // showCancel: false,
  224. // success(res) {
  225. // if (res.confirm) {
  226. // that.loadList();
  227. // }
  228. // }
  229. // });
  230. // }
  231. // }).catch(err => {
  232. // console.log(err)
  233. // })
  234. // }
  235. // }
  236. // });
  237. }
  238. }
  239. }
  240. </script>
  241. <style>
  242. /* page {
  243. background-color: rgb(240, 242, 244);
  244. } */
  245. </style>
  246. <style lang="scss" scoped>
  247. .container {
  248. padding: 0 0 150rpx;
  249. }
  250. .u-cell-icon {
  251. width: 36rpx;
  252. height: 36rpx;
  253. margin-right: 8rpx;
  254. }
  255. .slot-box {
  256. /* #ifndef APP-NVUE */
  257. display: flex;
  258. /* #endif */
  259. flex-direction: row;
  260. align-items: center;
  261. }
  262. .slot-image {
  263. /* #ifndef APP-NVUE */
  264. display: block;
  265. /* #endif */
  266. //margin-right: 10px;
  267. width: 20px;
  268. height: 20px;
  269. }
  270. .order-title-image {
  271. /* #ifndef APP-NVUE */
  272. display: block;
  273. /* #endif */
  274. // margin-right: 10px;
  275. width: 20px;
  276. height: 20px;
  277. border-radius: 50%;
  278. }
  279. .slot-text {
  280. flex: 1;
  281. font-size: 14px;
  282. color: #4cd964;
  283. margin-right: 10px;
  284. }
  285. .content-box {
  286. flex: 1;
  287. /* #ifdef APP-NVUE */
  288. justify-content: center;
  289. /* #endif */
  290. height: 100%;
  291. line-height: 44px;
  292. padding: 0 15px;
  293. position: relative;
  294. background-color: #fff;
  295. border-bottom-color: #f5f5f5;
  296. border-bottom-width: 1px;
  297. border-bottom-style: solid;
  298. }
  299. .content-text {
  300. font-size: 15px;
  301. }
  302. .example-body {
  303. /* #ifndef APP-NVUE */
  304. display: flex;
  305. /* #endif */
  306. flex-direction: row;
  307. justify-content: center;
  308. padding: 10px 0;
  309. background-color: #fff;
  310. }
  311. .button {
  312. border-color: #e5e5e5;
  313. border-style: solid;
  314. border-width: 1px;
  315. padding: 4px 8px;
  316. border-radius: 4px;
  317. }
  318. .button-text {
  319. font-size: 15px;
  320. }
  321. .slot-button {
  322. /* #ifndef APP-NVUE */
  323. display: flex;
  324. height: 100%;
  325. /* #endif */
  326. flex: 1;
  327. flex-direction: row;
  328. justify-content: center;
  329. align-items: center;
  330. padding: 0 20px;
  331. background-color: #ff5a5f;
  332. }
  333. .slot-button-text {
  334. color: #ffffff;
  335. font-size: 14px;
  336. }
  337. </style>