移动端
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

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