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

387 lines
12 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <!-- 头部开始 -->
  4. <div class="header">
  5. <div class="header_left" @click="onClickLeft">
  6. <img src="../../../../static/images/agriculturalTrusteeship/return.png">
  7. <p>{{tt}}服务</p>
  8. </div>
  9. <p class="header_right">河东河西村</p>
  10. </div>
  11. <!-- 头部结束 -->
  12. <!-- 内容开始 -->
  13. <div class="main">
  14. <van-tabs v-model="active" sticky animated>
  15. <van-tab :title="tt+'公司'">
  16. <div class="search">
  17. <img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_01.png" />
  18. <input type="text" v-model="searchServiceInput" placeholder="输入需求进行搜索" />
  19. <img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_02.png" @click="goSearchService" />
  20. </div>
  21. <van-list
  22. v-model="loading1"
  23. :finished="finished1"
  24. finished-text="没有更多了"
  25. @load="getServiceList"
  26. >
  27. <div class="content" v-for="(item,index) in serviceList" :key="index" @click="$router.push({name:'agriculturalTrusteeshipInsuranceProjectList',query:{id:item.id,financialName:item.financialName}})">
  28. <p class="content_tt">{{item.financialName}}</p>
  29. <div class="content_con">
  30. <div class="content_con_left">
  31. <p>{{item.products.length}}个产品</p>
  32. <p>{{item.linker}}</p>
  33. <p>{{item.phone}}</p>
  34. </div>
  35. <div class="content_con_right">
  36. <img :src="itemChild" v-for="(itemChild,indexChild) in item.mainImg2" v-if="indexChild < 2" :key="indexChild" style="width: 22vw;height: 22vw;">
  37. <img v-if="!item.mainImg2 || item.mainImg2.length < 2" src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 22vw;height: 22vw;">
  38. <img v-if="!item.mainImg2 || item.mainImg2.length < 1" src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 22vw;height: 22vw;">
  39. <img src="../../../../static/images/agriculturalTrusteeship/insurance/insurance_go.png">
  40. </div>
  41. </div>
  42. </div>
  43. </van-list>
  44. </van-tab>
  45. <van-tab :title="tt+'产品'">
  46. <div class="search">
  47. <img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_01.png" />
  48. <input type="text" v-model="searchInput" placeholder="输入需求进行搜索" />
  49. <img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_02.png" @click="goSearch" />
  50. </div>
  51. <van-list
  52. v-model="loading"
  53. :finished="finished"
  54. finished-text="没有更多了"
  55. @load="getList"
  56. >
  57. <!-- @load="onLoad"-->
  58. <div class="main_content_right_list" v-for="(item,index) in productListYes" :key="index" @click="$router.push({name:'agriculturalTrusteeshipSocietyProjectDetail',query:{id:item.id}})">
  59. <img v-if="item.mainImg" :src="item.mainImg" style="width: 18vw;height: 18vw;">
  60. <img v-else src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 18vw;height: 18vw;">
  61. <div class="main_content_right_list_content">
  62. <p class="tt">{{item.productName}}</p>
  63. <!-- <div class="tab">-->
  64. <!-- <p>¥<span>66</span>.00/亩</p>-->
  65. <!-- <p><span>销 600</span><span>分 4.7</span></p>-->
  66. <!-- </div>-->
  67. <p class="name">{{item.financialName}}</p>
  68. </div>
  69. </div>
  70. </van-list>
  71. </van-tab>
  72. </van-tabs>
  73. </div>
  74. <!-- 内容结束 -->
  75. </div>
  76. </template>
  77. <script>
  78. import Cookies from "js-cookie";
  79. import {productList, productTypes, serviceList} from "@/api/agriculturalTrusteeship";
  80. export default {
  81. name: "agriculturalTrusteeshipInsuranceList",
  82. data() {
  83. return {
  84. activeKey: 0,
  85. active: 0,
  86. loading: false,
  87. finished: false,
  88. loading1: false,
  89. finished1: false,
  90. productListNo:[],
  91. productList:[],
  92. supplyDemandListYes:[],
  93. supplyDemandList:[],
  94. serviceList:[],
  95. productListYes:[],
  96. financialTypeOptions:[],
  97. productListChildren:[],
  98. main_content_right_header_tit:'全套服务',
  99. query:{
  100. entityId:'',
  101. entityName:'',
  102. productType:''
  103. },
  104. query2:{
  105. productName :'',
  106. orderByColumn:'order_score'
  107. },
  108. searchServiceInput:'',
  109. searchInput:'',
  110. tt:''
  111. };
  112. },
  113. created() {
  114. this.query.financialType = this.$route.query.type;
  115. if (this.$route.query.type == 3){this.tt = '农担'}
  116. if (this.$route.query.type == 2){this.tt = '保险'}
  117. if (this.$route.query.type == 1){this.tt = '贷款'}
  118. },
  119. methods: {
  120. getServiceList(){
  121. serviceList(this.query).then(response => {
  122. response.rows.map(res=>{
  123. // res.industryClassificationType = this.selectDictLabel(this.financialTypeOptions, res.industryClassificationType);
  124. if (res.mainImg){
  125. let supplyMasterMap = res.mainImg.split( "," )
  126. res.mainImg2 = []
  127. supplyMasterMap.map(rr=>{
  128. res.mainImg2.push('/api'+rr)
  129. })
  130. }
  131. this.serviceList.push(res);
  132. })
  133. if(this.serviceList.length >= response.total){
  134. this.finished1 = true;
  135. return;
  136. }else{
  137. this.loading1 = false;
  138. this.query.pageNum += 1 ;
  139. }
  140. });
  141. },
  142. getList(){
  143. productList(this.query2).then(response => {
  144. response.rows.map(res=>{
  145. if(res.sysYesNo == 'Y'){
  146. if (res.mainImg){
  147. let supplyMasterMap = res.mainImg.split( "," )
  148. res.mainImg = '/api'+supplyMasterMap[0]
  149. }
  150. this.productListYes.push(res);
  151. }
  152. if(res.sysYesNo == 'N'){
  153. this.productListNo.push(res);
  154. }
  155. this.productList.push(res);
  156. })
  157. if(this.productList.length >= response.total){
  158. this.finished = true;
  159. return;
  160. }else{
  161. this.loading = false;
  162. this.query.pageNum += 1 ;
  163. }
  164. });
  165. },
  166. onChangeIn(val){
  167. this.supplyDemandListYes = [];
  168. if (val == 0){
  169. this.main_content_right_header_tit = '全套服务';
  170. this.query.productType = '';
  171. this.getList();
  172. return;
  173. }
  174. this.query.productType = this.productList[val-1].id;
  175. let parentId = this.productList[val-1].id;
  176. this.main_content_right_header_tit = this.productList[val-1].dictName
  177. let query1 = {
  178. parentId : parentId
  179. }
  180. productTypes(query1).then(response => {
  181. this.productListChildren = response.data;
  182. this.getList();
  183. });
  184. },
  185. goSearchService(){
  186. this.serviceList = [];
  187. this.query.entityName = this.searchServiceInput;
  188. this.getServiceList();
  189. },
  190. goSearch(){
  191. this.productListYes = [];
  192. this.query2.productName = this.searchInput;
  193. this.getList();
  194. },
  195. orderByChange(){
  196. if (this.activePs == 0){
  197. this.query2.orderByColumn = 'order_score'
  198. }
  199. if (this.activePs == 1){
  200. this.query2.orderByColumn = 'order_num'
  201. }
  202. this.supplyDemandListYes = [];
  203. this.getList();
  204. }
  205. },
  206. }
  207. </script>
  208. <style scoped lang="scss">
  209. .home_wrapper{
  210. height: 100vh;
  211. background: #ffffff;
  212. }
  213. /*头部*/
  214. .header{
  215. display: flex;
  216. align-items: center;
  217. justify-content: space-between;
  218. background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
  219. padding: 2vh 4% 2vh;
  220. .header_left{
  221. display: flex;
  222. align-items: center;
  223. p{
  224. font-size: .4rem;
  225. color: #ffffff;
  226. line-height: 1;
  227. margin-left: 10PX;
  228. }
  229. }
  230. .header_right{
  231. font-size: .35rem;
  232. background: #ffffff url("../../../../static/images/agriculturalTrusteeship/address.png") no-repeat 10PX center;
  233. padding: 2PX 15PX 2PX 25PX;
  234. border-radius: 50PX;
  235. }
  236. }
  237. /* 内容 */
  238. .main{
  239. background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
  240. /deep/ .van-tabs__nav{
  241. border-top-left-radius: 25PX;
  242. border-top-right-radius: 25PX;
  243. overflow: hidden;
  244. }
  245. /deep/ .van-tabs__line{
  246. background: #334281!important;
  247. }
  248. /deep/ .van-tab--active{
  249. color: #334281;
  250. }
  251. /deep/ .van-tabs__content{
  252. background: #ffffff;
  253. padding-top: 2vh;
  254. }
  255. .search{
  256. display: flex;
  257. justify-content: space-between;
  258. align-items: center;
  259. width: 92%;
  260. margin: 0PX auto;
  261. border: 1px solid #6E93F3;
  262. padding: 1PX 1PX 1PX 12PX ;
  263. border-radius: 50PX;
  264. input{
  265. flex: 1;
  266. background: transparent;
  267. margin-left: 10PX;
  268. }
  269. }
  270. .content{
  271. width: 92%;
  272. margin: 0 auto;
  273. box-shadow: 0px 0px 10PX rgba(0,0,0,0.1);
  274. border-radius: 10PX;
  275. margin-top: 2vh;
  276. padding: 1.5vh 4%;
  277. .content_tt{
  278. font-size: .35rem;
  279. }
  280. .content_con{
  281. display: flex;
  282. justify-content: space-between;
  283. margin-top: 1.5vh;
  284. .content_con_left{
  285. display: flex;
  286. flex-direction:column;
  287. justify-content: space-between;
  288. p{
  289. font-size: .35rem;
  290. padding-left: 18PX;
  291. &:nth-child(1){
  292. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_project.png") no-repeat left center;
  293. }
  294. &:nth-child(2){
  295. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_name.png") no-repeat left center;
  296. }
  297. &:nth-child(3){
  298. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_iphone.png") no-repeat left center;
  299. }
  300. }
  301. }
  302. .content_con_right{
  303. display: flex;
  304. justify-content: end;
  305. align-items: center;
  306. img{
  307. border-radius: 10PX;
  308. width: 40%;
  309. margin-left: 5%;
  310. box-shadow: 0px 5PX 10PX rgba(0,0,0,0.2);
  311. &:last-child{
  312. width: auto;
  313. box-shadow: none;
  314. }
  315. }
  316. }
  317. }
  318. }
  319. .main_content_right_list{
  320. display: flex;
  321. margin: 0 auto;
  322. margin-top: 2vh;
  323. width: 92%;
  324. img{
  325. border-radius: 15PX;
  326. margin-right: 4%;
  327. width: 20%;
  328. }
  329. .main_content_right_list_content{
  330. display: flex;
  331. flex-direction:column;
  332. justify-content: space-between;
  333. .tt{
  334. color: #333333;
  335. font-size: .35rem;
  336. }
  337. .tab{
  338. display: flex;
  339. justify-content: space-between;
  340. p{
  341. &:nth-child(1){
  342. flex: 1;
  343. color: #FF5E00;
  344. span{
  345. font-size: .4rem;
  346. }
  347. }
  348. &:nth-child(2){
  349. flex: 1;
  350. span{
  351. width: 50%;
  352. display: inline-block;
  353. text-align: center;
  354. padding: 2PX 2PX;
  355. &:nth-child(1){
  356. color: #497CE8;
  357. background: #E2E9FD;
  358. border-top-left-radius: 10PX;
  359. }
  360. &:nth-child(2){
  361. color: #ffffff;
  362. background-image: linear-gradient(to right , #5D87FA , #5FD5F5);
  363. border-bottom-right-radius: 10PX;
  364. }
  365. }
  366. }
  367. }
  368. }
  369. .name{
  370. color: #8F8F8F;
  371. background: url("../../../../static/images/agriculturalTrusteeship/index/name_icon.png") no-repeat left center;
  372. padding-left: 18PX;
  373. }
  374. }
  375. }
  376. }
  377. </style>