移动端
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

284 líneas
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.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="goSubmit">立即查询</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:'lawEnforcementVeterinaryDetail', 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. <p>{{format(item.firstApprovalDate,'yyyy-MM-dd')}}</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 { listGmp } 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. },
  76. methods: {
  77. getList(){
  78. var _this = this;
  79. listGmp(_this.queryParams).then(response => {
  80. response.rows.map(res=>{
  81. this.list.push(res);
  82. })
  83. console.log(this.list.length)
  84. if(this.list.length >= response.total){
  85. this.finished = true;
  86. return;
  87. }else{
  88. this.loading = false;
  89. this.queryParams.pageNum += 1 ;
  90. }
  91. });
  92. },
  93. goSubmit(){
  94. this.list = [];
  95. this.getList();
  96. }
  97. },
  98. }
  99. </script>
  100. <style scoped lang="scss">
  101. .jg{
  102. height: 180PX;
  103. }
  104. .app-container {
  105. }
  106. .main{
  107. position: absolute;
  108. width: 100%;
  109. top: 88PX;
  110. }
  111. /deep/ .van-cell{
  112. padding-bottom: 0;
  113. padding-top: 0;
  114. margin-bottom: 10PX;
  115. &:last-child{
  116. margin-bottom: 0;
  117. }
  118. }
  119. .header_main{
  120. /*height: 116px;*/
  121. background: url('../../../../static/images/lawEnforcement/new/header_bg.png') no-repeat;
  122. background-size: 100% 100%;
  123. /*position: fixed;*/
  124. top: 0;
  125. left: 0;
  126. width: 100%;
  127. font-size: 36px;
  128. line-height: 116px;
  129. text-align: center;
  130. color: #fff;
  131. z-index: 999;
  132. .return_btn{
  133. width: 24px;
  134. height: 43.2px;
  135. background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  136. background-size: 20px 36px;
  137. position: absolute;
  138. left: 38px;
  139. top: 36px;
  140. }
  141. .add_btn{
  142. width: 56.4px;
  143. height: 40.8px;
  144. background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  145. background-size: 47px 34px;
  146. position: absolute;
  147. right: 38px;
  148. top: 36px;
  149. }
  150. }
  151. .main_title{
  152. font-size: 0.4rem;
  153. color: #1D6FE9;
  154. margin: 0.2rem 6%;
  155. margin-top: 0;
  156. position: relative;
  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. width: 70%;
  192. margin: 25PX auto;
  193. background-image: linear-gradient(to right, #2E79E9 , #77A6EF);
  194. text-align: center;
  195. color: #ffffff;
  196. height: 70px;
  197. line-height: 70px;
  198. border-radius: 8PX;
  199. }
  200. .addFamily{
  201. position: absolute;
  202. top: -2px;
  203. right: 0;
  204. border-radius: 50%;
  205. }
  206. /deep/.van-cell__title{
  207. .tt{
  208. display: flex;
  209. justify-content: space-between;
  210. span:first-child{
  211. background: url('../../../../static/images/lawEnforcement/icon/pesticides_icon_04.png') no-repeat left center;
  212. padding-left: 30PX;
  213. }
  214. span:last-child{
  215. color: #1D6FE9;
  216. }
  217. }
  218. .first{
  219. display: flex;
  220. justify-content: space-between;
  221. align-items: center;
  222. margin-top: 5PX;
  223. span{
  224. color: #1D6FE9;
  225. font-size: 0.35rem;
  226. &:first-child{
  227. background: rgba(29,111,233,0.2);
  228. padding: 3PX 5PX;
  229. line-height: 1;
  230. border-radius: 3PX;
  231. }
  232. &:last-child{
  233. color: #666666;
  234. }
  235. }
  236. }
  237. .dress{
  238. font-size: .35rem;
  239. color: #1CB8B1;
  240. margin-top: 5PX;
  241. }
  242. span{
  243. font-family: Arial;
  244. font-size: 0.4rem;
  245. font-weight: normal;
  246. display: -webkit-box;
  247. -webkit-box-orient: vertical;
  248. -webkit-line-clamp: 1;
  249. word-break: break-all;
  250. overflow: hidden;
  251. }
  252. }
  253. .list_box{
  254. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  255. width: 94%;
  256. margin: 0 auto 10PX;
  257. padding: 12PX 0;
  258. background: #ffffff;
  259. border-radius: 8PX;
  260. }
  261. .label {
  262. display: flex;
  263. justify-content: space-between;
  264. p{
  265. display: inline-block;
  266. font-size: 0.35rem;
  267. }
  268. }
  269. .scroll_box{
  270. height: calc(100vh - 100px - 200PX - 100PX);
  271. overflow: hidden;
  272. overflow-y: scroll;
  273. }
  274. </style>