移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

feed.vue 6.9 KiB

2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <template>
  2. <div class="app-container">
  3. <div class="header_main">
  4. 查饲料
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. <div class="jg"></div>
  7. </div>
  8. <div class="main">
  9. <div class="main_box">
  10. <van-field v-model="queryParams.recordCode" :border="false" label="饲料许可证号" placeholder="请输入饲料许可证号" input-align="right" />
  11. <van-field v-model="queryParams.factory" :border="false" label="生产厂家" placeholder="请输入生产厂家" input-align="right" />
  12. <van-field v-model="queryParams.productGoodsName" :border="false" label="商品名称" placeholder="请输入商品名称" input-align="right" />
  13. <van-field v-model="queryParams.productName" :border="false" label="产品通用名称" placeholder="请输入产品通用名称" input-align="right" />
  14. </div>
  15. <p class="submitButton" @click="getList('search')">立即查询</p>
  16. <div class="scroll_box">
  17. <van-list
  18. v-model="loading"
  19. :finished="finished"
  20. finished-text="没有更多了"
  21. @load="getList"
  22. >
  23. <div class="list_box" v-for="(item,index) in list" :key="index">
  24. <van-cell center :to="{name:'lawEnforcementFeedDetail', query: {content:item}}">
  25. <template #title>
  26. <div class="tt">
  27. <span>{{item.productName}}</span>
  28. <span>{{item.effectivePeriod}}</span>
  29. </div>
  30. <div class="first">
  31. <span>{{item.recordCode}}</span>
  32. <span>{{item.productGoodsName}}</span>
  33. </div>
  34. </template>
  35. <template #label>
  36. <div class="label">
  37. <p>{{item.factory}}</p>
  38. </div>
  39. </template>
  40. </van-cell>
  41. </div>
  42. </van-list>
  43. </div>
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. import { listFeed } from "@/api/lawEnforcement/index";
  49. export default {
  50. name: "programmeDetail",
  51. data() {
  52. return {
  53. loading: false,
  54. finished: false,
  55. form:{},
  56. value:'',
  57. queryParams: {
  58. // 分页
  59. pageNum: 1,
  60. pageSize: 10,
  61. // 查询排序
  62. orderByColumn: "id",
  63. isAsc: "desc",
  64. recordCode: null, // 查询参数-饲料许可证号
  65. factory: null, // 生产厂家
  66. productGoodsName: null, // 商品名称
  67. productName: null, // 通用名称
  68. },
  69. list:[],
  70. };
  71. },
  72. created() {
  73. // this.getDictionaries()
  74. },
  75. methods: {
  76. getList(type){
  77. var _this = this;
  78. if (type == 'search'){
  79. this.list = [];
  80. this.queryParams.pageNum = 1 ;
  81. }
  82. listFeed(_this.queryParams).then(response => {
  83. response.rows.map(res=>{
  84. this.list.push(res);
  85. })
  86. console.log(this.list.length)
  87. if(this.list.length >= response.total){
  88. this.finished = true;
  89. return;
  90. }else{
  91. this.loading = false;
  92. this.queryParams.pageNum += 1 ;
  93. }
  94. });
  95. },
  96. },
  97. }
  98. </script>
  99. <style scoped lang="scss">
  100. .jg{
  101. height: 180PX;
  102. }
  103. .app-container {
  104. }
  105. .main{
  106. position: absolute;
  107. width: 100%;
  108. top: 88PX;
  109. }
  110. .scroll_box{
  111. height: calc(100vh - 100px - 200PX - 100PX);
  112. overflow: hidden;
  113. overflow-y: scroll;
  114. }
  115. /deep/ .van-cell{
  116. padding-bottom: 0;
  117. padding-top: 0;
  118. margin-bottom: 10PX;
  119. &:last-child{
  120. margin-bottom: 0;
  121. }
  122. }
  123. .header_main{
  124. /*height: 116px;*/
  125. background: url('../../../../static/images/lawEnforcement/new/header_bg.png') no-repeat;
  126. background-size: 100% 100%;
  127. /*position: fixed;*/
  128. top: 0;
  129. left: 0;
  130. width: 100%;
  131. font-size: 36px;
  132. line-height: 116px;
  133. text-align: center;
  134. color: #fff;
  135. z-index: 999;
  136. .return_btn{
  137. width: 24px;
  138. height: 43.2px;
  139. background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  140. background-size: 20px 36px;
  141. position: absolute;
  142. left: 38px;
  143. top: 36px;
  144. }
  145. .add_btn{
  146. width: 56.4px;
  147. height: 40.8px;
  148. background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  149. background-size: 47px 34px;
  150. position: absolute;
  151. right: 38px;
  152. top: 36px;
  153. }
  154. }
  155. .main_title{
  156. font-size: 0.4rem;
  157. color: #1D6FE9;
  158. margin: 0.2rem 6%;
  159. margin-top: 0;
  160. position: relative;
  161. }
  162. .main_box{
  163. width: 90%;
  164. margin: 0 auto;
  165. border-radius: 10PX;
  166. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  167. overflow: hidden;
  168. background-color: #FFF;
  169. padding: 20PX 5PX;
  170. .van-icon{
  171. vertical-align: middle;
  172. }
  173. .custom-title{
  174. font-size: 17PX;
  175. color: #333333;
  176. vertical-align: middle;
  177. line-height: 1;
  178. position: relative;
  179. }
  180. .tap{
  181. color: #1D6FE9;
  182. }
  183. .bgBlue{
  184. display: block;
  185. position: absolute;
  186. width: 17PX;
  187. height: 17PX;
  188. border-radius: 50%;
  189. background-color: rgba(29,111,233,0.26);
  190. top: -2PX;
  191. right: -8PX;
  192. }
  193. }
  194. .submitButton{
  195. width: 70%;
  196. margin: 25PX auto;
  197. background-image: linear-gradient(to right, #2E79E9 , #77A6EF);
  198. text-align: center;
  199. color: #ffffff;
  200. height: 70px;
  201. line-height: 70px;
  202. border-radius: 8PX;
  203. }
  204. .addFamily{
  205. position: absolute;
  206. top: -2px;
  207. right: 0;
  208. border-radius: 50%;
  209. }
  210. /deep/.van-cell__title{
  211. .tt{
  212. display: flex;
  213. justify-content: space-between;
  214. span:first-child{
  215. background: url('../../../../static/images/lawEnforcement/icon/pesticides_icon_05.png') no-repeat left center;
  216. padding-left: 20PX;
  217. }
  218. span:last-child{
  219. color: #1D6FE9;
  220. }
  221. }
  222. .first{
  223. display: flex;
  224. justify-content: space-between;
  225. align-items: center;
  226. margin-top: 5PX;
  227. span{
  228. color: #1D6FE9;
  229. font-size: 0.35rem;
  230. &:first-child{
  231. background: rgba(29,111,233,0.2);
  232. padding: 3PX 5PX;
  233. line-height: 1;
  234. border-radius: 3PX;
  235. }
  236. &:last-child{
  237. color: #666666;
  238. }
  239. }
  240. }
  241. .dress{
  242. font-size: .35rem;
  243. color: #1CB8B1;
  244. margin-top: 5PX;
  245. }
  246. span{
  247. font-family: Arial;
  248. font-size: 0.4rem;
  249. font-weight: normal;
  250. display: -webkit-box;
  251. -webkit-box-orient: vertical;
  252. -webkit-line-clamp: 1;
  253. word-break: break-all;
  254. overflow: hidden;
  255. }
  256. }
  257. .list_box{
  258. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  259. width: 94%;
  260. margin: 0 auto 10PX;
  261. padding: 12PX 0;
  262. background: #ffffff;
  263. border-radius: 8PX;
  264. }
  265. .label {
  266. display: flex;
  267. justify-content: space-between;
  268. p{
  269. display: inline-block;
  270. font-size: 0.35rem;
  271. }
  272. }
  273. </style>