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

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