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

388 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. this.query2.financialType = this.$route.query.type;
  116. if (this.$route.query.type == 3){this.tt = '农担'}
  117. if (this.$route.query.type == 2){this.tt = '保险'}
  118. if (this.$route.query.type == 1){this.tt = '贷款'}
  119. },
  120. methods: {
  121. getServiceList(){
  122. serviceList(this.query).then(response => {
  123. response.rows.map(res=>{
  124. // res.industryClassificationType = this.selectDictLabel(this.financialTypeOptions, res.industryClassificationType);
  125. if (res.mainImg){
  126. let supplyMasterMap = res.mainImg.split( "," )
  127. res.mainImg2 = []
  128. supplyMasterMap.map(rr=>{
  129. res.mainImg2.push('/api'+rr)
  130. })
  131. }
  132. this.serviceList.push(res);
  133. })
  134. if(this.serviceList.length >= response.total){
  135. this.finished1 = true;
  136. return;
  137. }else{
  138. this.loading1 = false;
  139. this.query.pageNum += 1 ;
  140. }
  141. });
  142. },
  143. getList(){
  144. productList(this.query2).then(response => {
  145. response.rows.map(res=>{
  146. if(res.sysYesNo == 'Y'){
  147. if (res.mainImg){
  148. let supplyMasterMap = res.mainImg.split( "," )
  149. res.mainImg = '/api'+supplyMasterMap[0]
  150. }
  151. this.productListYes.push(res);
  152. }
  153. if(res.sysYesNo == 'N'){
  154. this.productListNo.push(res);
  155. }
  156. this.productList.push(res);
  157. })
  158. if(this.productList.length >= response.total){
  159. this.finished = true;
  160. return;
  161. }else{
  162. this.loading = false;
  163. this.query.pageNum += 1 ;
  164. }
  165. });
  166. },
  167. onChangeIn(val){
  168. this.supplyDemandListYes = [];
  169. if (val == 0){
  170. this.main_content_right_header_tit = '全套服务';
  171. this.query.productType = '';
  172. this.getList();
  173. return;
  174. }
  175. this.query.productType = this.productList[val-1].id;
  176. let parentId = this.productList[val-1].id;
  177. this.main_content_right_header_tit = this.productList[val-1].dictName
  178. let query1 = {
  179. parentId : parentId
  180. }
  181. productTypes(query1).then(response => {
  182. this.productListChildren = response.data;
  183. this.getList();
  184. });
  185. },
  186. goSearchService(){
  187. this.serviceList = [];
  188. this.query.entityName = this.searchServiceInput;
  189. this.getServiceList();
  190. },
  191. goSearch(){
  192. this.productListYes = [];
  193. this.query2.productName = this.searchInput;
  194. this.getList();
  195. },
  196. orderByChange(){
  197. if (this.activePs == 0){
  198. this.query2.orderByColumn = 'order_score'
  199. }
  200. if (this.activePs == 1){
  201. this.query2.orderByColumn = 'order_num'
  202. }
  203. this.supplyDemandListYes = [];
  204. this.getList();
  205. }
  206. },
  207. }
  208. </script>
  209. <style scoped lang="scss">
  210. .home_wrapper{
  211. height: 100vh;
  212. background: #ffffff;
  213. }
  214. /*头部*/
  215. .header{
  216. display: flex;
  217. align-items: center;
  218. justify-content: space-between;
  219. background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
  220. padding: 2vh 4% 2vh;
  221. .header_left{
  222. display: flex;
  223. align-items: center;
  224. p{
  225. font-size: .4rem;
  226. color: #ffffff;
  227. line-height: 1;
  228. margin-left: 10PX;
  229. }
  230. }
  231. .header_right{
  232. font-size: .35rem;
  233. background: #ffffff url("../../../../static/images/agriculturalTrusteeship/address.png") no-repeat 10PX center;
  234. padding: 2PX 15PX 2PX 25PX;
  235. border-radius: 50PX;
  236. }
  237. }
  238. /* 内容 */
  239. .main{
  240. background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
  241. /deep/ .van-tabs__nav{
  242. border-top-left-radius: 25PX;
  243. border-top-right-radius: 25PX;
  244. overflow: hidden;
  245. }
  246. /deep/ .van-tabs__line{
  247. background: #334281!important;
  248. }
  249. /deep/ .van-tab--active{
  250. color: #334281;
  251. }
  252. /deep/ .van-tabs__content{
  253. background: #ffffff;
  254. padding-top: 2vh;
  255. }
  256. .search{
  257. display: flex;
  258. justify-content: space-between;
  259. align-items: center;
  260. width: 92%;
  261. margin: 0PX auto;
  262. border: 1px solid #6E93F3;
  263. padding: 1PX 1PX 1PX 12PX ;
  264. border-radius: 50PX;
  265. input{
  266. flex: 1;
  267. background: transparent;
  268. margin-left: 10PX;
  269. }
  270. }
  271. .content{
  272. width: 92%;
  273. margin: 0 auto;
  274. box-shadow: 0px 0px 10PX rgba(0,0,0,0.1);
  275. border-radius: 10PX;
  276. margin-top: 2vh;
  277. padding: 1.5vh 4%;
  278. .content_tt{
  279. font-size: .35rem;
  280. }
  281. .content_con{
  282. display: flex;
  283. justify-content: space-between;
  284. margin-top: 1.5vh;
  285. .content_con_left{
  286. display: flex;
  287. flex-direction:column;
  288. justify-content: space-between;
  289. p{
  290. font-size: .35rem;
  291. padding-left: 18PX;
  292. &:nth-child(1){
  293. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_project.png") no-repeat left center;
  294. }
  295. &:nth-child(2){
  296. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_name.png") no-repeat left center;
  297. }
  298. &:nth-child(3){
  299. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_iphone.png") no-repeat left center;
  300. }
  301. }
  302. }
  303. .content_con_right{
  304. display: flex;
  305. justify-content: end;
  306. align-items: center;
  307. img{
  308. border-radius: 10PX;
  309. width: 40%;
  310. margin-left: 5%;
  311. box-shadow: 0px 5PX 10PX rgba(0,0,0,0.2);
  312. &:last-child{
  313. width: auto;
  314. box-shadow: none;
  315. }
  316. }
  317. }
  318. }
  319. }
  320. .main_content_right_list{
  321. display: flex;
  322. margin: 0 auto;
  323. margin-top: 2vh;
  324. width: 92%;
  325. img{
  326. border-radius: 15PX;
  327. margin-right: 4%;
  328. width: 20%;
  329. }
  330. .main_content_right_list_content{
  331. display: flex;
  332. flex-direction:column;
  333. justify-content: space-between;
  334. .tt{
  335. color: #333333;
  336. font-size: .35rem;
  337. }
  338. .tab{
  339. display: flex;
  340. justify-content: space-between;
  341. p{
  342. &:nth-child(1){
  343. flex: 1;
  344. color: #FF5E00;
  345. span{
  346. font-size: .4rem;
  347. }
  348. }
  349. &:nth-child(2){
  350. flex: 1;
  351. span{
  352. width: 50%;
  353. display: inline-block;
  354. text-align: center;
  355. padding: 2PX 2PX;
  356. &:nth-child(1){
  357. color: #497CE8;
  358. background: #E2E9FD;
  359. border-top-left-radius: 10PX;
  360. }
  361. &:nth-child(2){
  362. color: #ffffff;
  363. background-image: linear-gradient(to right , #5D87FA , #5FD5F5);
  364. border-bottom-right-radius: 10PX;
  365. }
  366. }
  367. }
  368. }
  369. }
  370. .name{
  371. color: #8F8F8F;
  372. background: url("../../../../static/images/agriculturalTrusteeship/index/name_icon.png") no-repeat left center;
  373. padding-left: 18PX;
  374. }
  375. }
  376. }
  377. }
  378. </style>