移动端
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.
 
 

294 line
7.1 KiB

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