HazardPublicity.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <view class="container">
  3. <view class="headerBox">
  4. <view class="searchBox">
  5. <icon class="icon-small searchIcon" type="search" size="20"></icon>
  6. <input type="text" data-code="code" v-model="CodeTitle" class="fway-form-input searchInput" placeholder="请输入编号或者标题搜索" />
  7. <text class="searchBtn" @tap="onTapSearch">搜索</text>
  8. </view>
  9. </view>
  10. <view class="contentBox">
  11. <z-paging ref="paging" v-model="listData" @query="onGetOrderList" refresher-update-time-key="list" :auto="false">
  12. <view class="listInfoBox">
  13. <view class="listInfo" v-for="(item, index) in listData" :key="index" @tap="onOrderViewTo(item.id)">
  14. <view class='listCode'>
  15. <view class="codeTextBox">
  16. 编号:<text class="codeText">{{item.no}}</text>
  17. </view>
  18. </view>
  19. <rich-text :nodes="item.title" class="listTitle"></rich-text>
  20. <view class="listDetailBox">
  21. <text class="listArea">{{item.county}}</text>
  22. <text class="listDate">{{item.handleTime}}</text>
  23. </view>
  24. </view>
  25. </view>
  26. </z-paging>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. var that;
  32. export default {
  33. data() {
  34. return {
  35. CodeTitle: '',
  36. listData: [],
  37. isReLoad: false,
  38. industryID: '',
  39. industryName: '',
  40. industryData: []
  41. }
  42. },
  43. onLoad(options) {
  44. that = this;
  45. that.industryID = decodeURIComponent(options.industryID);
  46. that.industryName = decodeURIComponent(options.industryName);
  47. that.$nextTick(function() {
  48. uni.setNavigationBarTitle({
  49. title: that.industryName + '线索公示'
  50. })
  51. that.$refs.paging.reload()
  52. })
  53. },
  54. methods: {
  55. onGetOrderList(pageNo, pageSize) {
  56. that.$admin.reqDirect({
  57. method: 'GET',
  58. url: '/api/v1/Snapshot/order/published?Keyword=' + that.CodeTitle + '&IndustryId=' + that.industryID + '&QueryIndex=' + (pageNo - 1) + '&QueryCount=' + pageSize
  59. }).then(res => {
  60. if (res && res.length > 0) {
  61. res.forEach((item, index) => {
  62. item.handleTime = that.$util.formatTime(new Date(item.handleTime));
  63. })
  64. that.$refs.paging.complete(res);
  65. } else if (res && res.length == 0) {
  66. that.$refs.paging.complete([]);
  67. } else {
  68. that.$util.msg('网络出错!');
  69. that.$refs.paging.complete(false);
  70. }
  71. typeof fun === 'function' && fun();
  72. }, err => {
  73. if (!that.isReLoad) {
  74. that.isReLoad = true;
  75. that.onGetOrderList(pageNo, pageSize);
  76. } else {
  77. that.$util.msg(err);
  78. that.$refs.paging.complete(false);
  79. }
  80. })
  81. },
  82. // 点击查询按钮
  83. onTapSearch() {
  84. let that = this;
  85. that.$refs.paging.reload();
  86. },
  87. onOrderViewTo(id) {
  88. uni.navigateTo({
  89. url: '/pagesCare/Order/View?type=open&id=' + encodeURIComponent(id)
  90. })
  91. },
  92. }
  93. }
  94. </script>
  95. <style lang="less">
  96. .container {
  97. background-color: #f3f3f3;
  98. }
  99. .headerBox {
  100. line-height: 0;
  101. background-color: #fff;
  102. }
  103. .searchBox {
  104. padding: 20rpx;
  105. position: relative;
  106. }
  107. .searchIcon {
  108. position: absolute;
  109. top: 40rpx;
  110. left: 46rpx;
  111. }
  112. .searchInput {
  113. background-color: #F6F7F8;
  114. border-radius: 30rpx;
  115. padding: 10rpx 130rpx 10rpx 80rpx;
  116. width: calc(100% - 210rpx);
  117. height: 60rpx;
  118. line-height: 60rpx;
  119. font-size: 36rpx;
  120. }
  121. .searchBtn {
  122. position: absolute;
  123. line-height: 60rpx;
  124. top: 24rpx;
  125. right: 24rpx;
  126. background-color: #E5F7FF;
  127. color: #3e6ffd;
  128. font-size: 36rpx;
  129. padding: 6rpx 28rpx;
  130. border-radius: 30rpx;
  131. }
  132. .contentBox {
  133. position: relative;
  134. height: calc(100% - 120rpx);
  135. }
  136. .listInfo {
  137. margin: 20rpx;
  138. padding: 30rpx 20rpx;
  139. border-radius: 20rpx;
  140. background-color: #fff;
  141. }
  142. .listCode {
  143. padding-bottom: 30rpx;
  144. border-bottom: 2rpx #EEEEEE solid;
  145. }
  146. .codeTextBox {
  147. width: calc(100% - 120rpx);
  148. display: inline-block;
  149. font-size: 36rpx;
  150. color: #666666;
  151. vertical-align: middle;
  152. }
  153. .codeText {
  154. color: #000006;
  155. }
  156. .codeStatus {
  157. width: calc(120rpx);
  158. display: inline-block;
  159. color: #169BD5;
  160. font-size: 36rpx;
  161. text-align: right;
  162. vertical-align: middle;
  163. }
  164. .listTitle {
  165. color: #000405;
  166. font-size: 40rpx;
  167. line-height: 46rpx;
  168. white-space: pre-line;
  169. overflow: hidden;
  170. text-overflow: ellipsis;
  171. display: -webkit-box;
  172. -webkit-box-orient: vertical;
  173. /*行向垂直排列*/
  174. -webkit-line-clamp: 2;
  175. width: 100%;
  176. padding-top: 20rpx;
  177. }
  178. .listDetailBox {
  179. color: #666666;
  180. font-size: 32rpx;
  181. padding-top: 30rpx;
  182. display: block;
  183. }
  184. .listArea {
  185. font-size: 32rpx;
  186. margin-right: 20rpx;
  187. }
  188. .listDate {
  189. font-size: 32rpx;
  190. }
  191. </style>