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

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