移动端
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

insuranceList.vue 14 KiB

2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
2 년 전
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  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. @change="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:'agriculturalTrusteeshipInsuranceProjectDetail',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:'',
  113. entityName:'',
  114. productType:''
  115. },
  116. query2:{
  117. productName :'',
  118. serviceDeptId:'',
  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. this.query.serviceDeptId = res.data[0].value;
  145. this.query2.serviceDeptId = res.data[0].value;
  146. this.deptName = res.data[0].label;
  147. }
  148. })
  149. },
  150. beforeRouteEnter (to, from, next) {
  151. /*
  152. to:获取你要跳转的路由信息
  153. from: 获取你从哪个路由来的信息
  154. next: (放行函数)
  155. // 第一种写法
  156. next(); // 直接放行
  157. // 第二种
  158. next('/url') //放行到指定的路由
  159. */
  160. next(vm => {
  161. if (from.path === '/agriculturalTrusteeship/buyerIndex'){
  162. location.reload()
  163. }
  164. })
  165. },
  166. methods: {
  167. getServiceList(){
  168. serviceList(this.query).then(response => {
  169. response.rows.map(res=>{
  170. // res.industryClassificationType = this.selectDictLabel(this.financialTypeOptions, res.industryClassificationType);
  171. if (res.mainImg){
  172. let supplyMasterMap = res.mainImg.split( "," )
  173. res.mainImg2 = []
  174. supplyMasterMap.map(rr=>{
  175. res.mainImg2.push('/api'+rr)
  176. })
  177. }
  178. this.serviceList.push(res);
  179. })
  180. if(this.serviceList.length >= response.total){
  181. this.finished1 = true;
  182. return;
  183. }else{
  184. this.loading1 = false;
  185. this.query.pageNum += 1 ;
  186. }
  187. });
  188. },
  189. getList(){
  190. productList(this.query2).then(response => {
  191. response.rows.map(res=>{
  192. if(res.sysYesNo == 'Y'){
  193. if (res.mainImg){
  194. let supplyMasterMap = res.mainImg.split( "," )
  195. res.mainImg = '/api'+supplyMasterMap[0]
  196. }
  197. this.productListYes.push(res);
  198. }
  199. if(res.sysYesNo == 'N'){
  200. this.productListNo.push(res);
  201. }
  202. this.productList.push(res);
  203. })
  204. if(this.productList.length >= response.total){
  205. this.finished = true;
  206. return;
  207. }else{
  208. this.loading = false;
  209. this.query.pageNum += 1 ;
  210. }
  211. });
  212. },
  213. onChangeIn(val){
  214. this.supplyDemandListYes = [];
  215. if (val == 0){
  216. this.main_content_right_header_tit = '全套服务';
  217. this.query.productType = '';
  218. this.getList();
  219. return;
  220. }
  221. this.query.productType = this.productList[val-1].id;
  222. let parentId = this.productList[val-1].id;
  223. this.main_content_right_header_tit = this.productList[val-1].dictName
  224. let query1 = {
  225. parentId : parentId
  226. }
  227. productTypes(query1).then(response => {
  228. this.productListChildren = response.data;
  229. this.getList();
  230. });
  231. },
  232. goSearchService(){
  233. this.serviceList = [];
  234. this.query.entityName = this.searchServiceInput;
  235. this.getServiceList();
  236. },
  237. goSearch(){
  238. this.productListYes = [];
  239. this.query2.productName = this.searchInput;
  240. this.getList();
  241. },
  242. orderByChange(){
  243. if (this.activePs == 0){
  244. this.query2.orderByColumn = 'order_score'
  245. }
  246. if (this.activePs == 1){
  247. this.query2.orderByColumn = 'order_num'
  248. }
  249. this.supplyDemandListYes = [];
  250. this.getList();
  251. },
  252. //选择案件属地
  253. onConfirmDept({ selectedOptions }){
  254. this.query.serviceDeptId = selectedOptions[selectedOptions.length-1].value;
  255. this.query2.serviceDeptId = selectedOptions[selectedOptions.length-1].value;
  256. this.deptName = selectedOptions[selectedOptions.length-1].label;
  257. // this.showDeptId = false
  258. this.supplyDemandListYes = [];
  259. this.serviceList = [];
  260. this.getServiceList();
  261. this.getList();
  262. },
  263. },
  264. }
  265. </script>
  266. <style scoped lang="scss">
  267. .home_wrapper{
  268. height: 100vh;
  269. background: #ffffff;
  270. }
  271. /*头部*/
  272. .header{
  273. display: flex;
  274. align-items: center;
  275. justify-content: space-between;
  276. background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
  277. padding: 2vh 4% 2vh;
  278. .header_left{
  279. display: flex;
  280. align-items: center;
  281. p{
  282. font-size: .4rem;
  283. color: #ffffff;
  284. line-height: 1;
  285. margin-left: 10PX;
  286. }
  287. }
  288. .header_right{
  289. font-size: .35rem;
  290. background: #ffffff url("../../../../static/images/agriculturalTrusteeship/address.png") no-repeat 10PX center;
  291. padding: 2PX 15PX 2PX 25PX;
  292. border-radius: 50PX;
  293. }
  294. }
  295. /* 内容 */
  296. .main{
  297. background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
  298. /deep/ .van-tabs__nav{
  299. border-top-left-radius: 25PX;
  300. border-top-right-radius: 25PX;
  301. overflow: hidden;
  302. }
  303. /deep/ .van-tabs__line{
  304. background: #334281!important;
  305. }
  306. /deep/ .van-tab--active{
  307. color: #334281;
  308. }
  309. /deep/ .van-tabs__content{
  310. background: #ffffff;
  311. padding-top: 2vh;
  312. }
  313. .search{
  314. display: flex;
  315. justify-content: space-between;
  316. align-items: center;
  317. width: 92%;
  318. margin: 0PX auto;
  319. border: 1px solid #6E93F3;
  320. padding: 1PX 1PX 1PX 12PX ;
  321. border-radius: 50PX;
  322. input{
  323. flex: 1;
  324. background: transparent;
  325. margin-left: 10PX;
  326. }
  327. }
  328. .content{
  329. width: 92%;
  330. margin: 0 auto;
  331. box-shadow: 0px 0px 10PX rgba(0,0,0,0.1);
  332. border-radius: 10PX;
  333. margin-top: 2vh;
  334. padding: 1.5vh 4%;
  335. .content_tt{
  336. font-size: .35rem;
  337. }
  338. .content_con{
  339. display: flex;
  340. justify-content: space-between;
  341. margin-top: 1.5vh;
  342. .content_con_left{
  343. display: flex;
  344. flex-direction:column;
  345. justify-content: space-between;
  346. p{
  347. font-size: .35rem;
  348. padding-left: 18PX;
  349. &:nth-child(1){
  350. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_project.png") no-repeat left center;
  351. }
  352. &:nth-child(2){
  353. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_name.png") no-repeat left center;
  354. }
  355. &:nth-child(3){
  356. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_iphone.png") no-repeat left center;
  357. }
  358. }
  359. }
  360. .content_con_right{
  361. display: flex;
  362. justify-content: end;
  363. align-items: center;
  364. img{
  365. border-radius: 10PX;
  366. width: 40%;
  367. margin-left: 5%;
  368. box-shadow: 0px 5PX 10PX rgba(0,0,0,0.2);
  369. &:last-child{
  370. width: auto;
  371. box-shadow: none;
  372. }
  373. }
  374. }
  375. }
  376. }
  377. .main_content_right_list{
  378. display: flex;
  379. margin: 0 auto;
  380. margin-top: 2vh;
  381. width: 92%;
  382. img{
  383. border-radius: 15PX;
  384. margin-right: 4%;
  385. width: 20%;
  386. }
  387. .main_content_right_list_content{
  388. display: flex;
  389. flex-direction:column;
  390. justify-content: space-between;
  391. .tt{
  392. color: #333333;
  393. font-size: .35rem;
  394. }
  395. .tab{
  396. display: flex;
  397. justify-content: space-between;
  398. p{
  399. &:nth-child(1){
  400. flex: 1;
  401. color: #FF5E00;
  402. span{
  403. font-size: .4rem;
  404. }
  405. }
  406. &:nth-child(2){
  407. flex: 1;
  408. span{
  409. width: 50%;
  410. display: inline-block;
  411. text-align: center;
  412. padding: 2PX 2PX;
  413. &:nth-child(1){
  414. color: #497CE8;
  415. background: #E2E9FD;
  416. border-top-left-radius: 10PX;
  417. }
  418. &:nth-child(2){
  419. color: #ffffff;
  420. background-image: linear-gradient(to right , #5D87FA , #5FD5F5);
  421. border-bottom-right-radius: 10PX;
  422. }
  423. }
  424. }
  425. }
  426. }
  427. .name{
  428. color: #8F8F8F;
  429. background: url("../../../../static/images/agriculturalTrusteeship/index/name_icon.png") no-repeat left center;
  430. padding-left: 18PX;
  431. }
  432. }
  433. }
  434. }
  435. </style>