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

287 rivejä
7.0 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.category" :border="false" label="作物种类" placeholder="请输入作物种类" input-align="right" />
  11. <van-field v-model="queryParams.productName" :border="false" label="品种名称" placeholder="请输入品种名称" input-align="right" />
  12. <van-field v-model="queryParams.recordCode" :border="false" label="审定登记编号" placeholder="请输入审定登记编号" input-align="right" />
  13. <van-field v-model="queryParams.recordOrg" :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:'lawEnforcementSeedDetail', query: {content:item}}">
  28. <template #title>
  29. <div class="tt">
  30. <span>{{item.productName}}</span>
  31. <span>{{item.recordCode}}</span>
  32. </div>
  33. </template>
  34. <template #label>
  35. <div class="label">
  36. <p>{{item.recordOrg}}</p>
  37. <p>{{item.category}}</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 { listSeed } 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. showCategory:false,
  58. showAgent:false,
  59. queryParams: {
  60. // 分页
  61. pageNum: 1,
  62. pageSize: 10,
  63. // 查询排序
  64. orderByColumn: "id",
  65. isAsc: "desc",
  66. category: null,
  67. productName: null,
  68. recordCode: null,
  69. },
  70. list:[],
  71. categoryOptions:[],
  72. agentOptions:[],
  73. category: null, // 查询参数-农药种类
  74. agent: null, // 查询参数-剂型
  75. };
  76. },
  77. created() {
  78. // this.getDictionaries()
  79. },
  80. methods: {
  81. getList(type){
  82. var _this = this;
  83. if (type == 'search'){
  84. this.list = [];
  85. this.queryParams.pageNum = 1 ;
  86. }
  87. listSeed(_this.queryParams).then(response => {
  88. response.rows.map(res=>{
  89. this.list.push(res);
  90. })
  91. console.log(this.list.length)
  92. if(this.list.length >= response.total){
  93. this.finished = true;
  94. return;
  95. }else{
  96. this.loading = false;
  97. this.queryParams.pageNum += 1 ;
  98. }
  99. });
  100. },
  101. clearSearch(){
  102. location.reload()
  103. }
  104. },
  105. }
  106. </script>
  107. <style scoped lang="scss">
  108. .jg{
  109. height: 180PX;
  110. }
  111. .app-container {
  112. }
  113. .main{
  114. position: absolute;
  115. width: 100%;
  116. top: 88PX;
  117. }
  118. /deep/ .van-cell{
  119. padding-bottom: 0;
  120. padding-top: 0;
  121. margin-bottom: 10PX;
  122. &:last-child{
  123. margin-bottom: 0;
  124. }
  125. }
  126. .header_main{
  127. /*height: 116px;*/
  128. background: url('../../../../static/images/lawEnforcement/new/header_bg.png') no-repeat;
  129. background-size: 100% 100%;
  130. /*position: fixed;*/
  131. top: 0;
  132. left: 0;
  133. width: 100%;
  134. font-size: 36px;
  135. line-height: 116px;
  136. text-align: center;
  137. color: #fff;
  138. z-index: 999;
  139. .return_btn{
  140. width: 24px;
  141. height: 43.2px;
  142. background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  143. background-size: 20px 36px;
  144. position: absolute;
  145. left: 38px;
  146. top: 36px;
  147. }
  148. .add_btn{
  149. width: 56.4px;
  150. height: 40.8px;
  151. background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  152. background-size: 47px 34px;
  153. position: absolute;
  154. right: 38px;
  155. top: 36px;
  156. }
  157. }
  158. .main_box{
  159. width: 90%;
  160. margin: 0 auto;
  161. border-radius: 10PX;
  162. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  163. overflow: hidden;
  164. background-color: #FFF;
  165. padding: 20PX 5PX;
  166. .van-icon{
  167. vertical-align: middle;
  168. }
  169. .custom-title{
  170. font-size: 17PX;
  171. color: #333333;
  172. vertical-align: middle;
  173. line-height: 1;
  174. position: relative;
  175. }
  176. .tap{
  177. color: #1D6FE9;
  178. }
  179. .bgBlue{
  180. display: block;
  181. position: absolute;
  182. width: 17PX;
  183. height: 17PX;
  184. border-radius: 50%;
  185. background-color: rgba(29,111,233,0.26);
  186. top: -2PX;
  187. right: -8PX;
  188. }
  189. }
  190. .submitButton{
  191. margin: 50px auto;
  192. display: flex;
  193. justify-content: space-around;
  194. p{
  195. width: 40%;
  196. background-image: linear-gradient(to right, #2E79E9 , #77A6EF);
  197. text-align: center;
  198. color: #ffffff;
  199. height: 70px;
  200. line-height: 70px;
  201. border-radius: 8PX;
  202. }
  203. }
  204. /deep/.van-cell__title{
  205. .tt{
  206. display: flex;
  207. justify-content: space-between;
  208. align-items: center;
  209. span:first-child{
  210. background: url('../../../../static/images/lawEnforcement/icon/pesticides_icon_02.png') no-repeat left center;
  211. padding-left: 25PX;
  212. }
  213. span:last-child{
  214. color: #1D6FE9;
  215. font-size: 0.35rem;
  216. background: rgba(29,111,233,0.2);
  217. padding: 3PX 5PX;
  218. line-height: 1;
  219. border-radius: 3PX;
  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. }
  237. }
  238. .dress{
  239. font-size: .35rem;
  240. color: #1CB8B1;
  241. margin-top: 5PX;
  242. }
  243. span{
  244. font-family: Arial;
  245. font-size: 0.4rem;
  246. font-weight: normal;
  247. display: -webkit-box;
  248. -webkit-box-orient: vertical;
  249. -webkit-line-clamp: 1;
  250. word-break: break-all;
  251. overflow: hidden;
  252. }
  253. }
  254. .list_box{
  255. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  256. width: 94%;
  257. margin: 0 auto 10PX;
  258. padding: 12PX 0;
  259. background: #ffffff;
  260. border-radius: 8PX;
  261. }
  262. .label {
  263. display: flex;
  264. justify-content: space-between;
  265. p{
  266. display: inline-block;
  267. font-size: 0.35rem;
  268. &:last-child{
  269. color: #666666;
  270. }
  271. }
  272. }
  273. .scroll_box{
  274. height: calc(100vh - 100px - 200PX - 100PX);
  275. overflow: hidden;
  276. overflow-y: scroll;
  277. }
  278. </style>