移动端
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

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