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

societyList.vue 20 KiB

2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  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>社会化服务组织</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="服务组织">
  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:'agriculturalTrusteeshipSocietyProjectList',query:{id:item.id,entityName:item.entityName}})">
  39. <div class="tt_box">
  40. <p class="content_tt">{{item.entityName}}</p>
  41. <div class="tab_box">
  42. <div class="tab_left">
  43. <p>产品 <span>{{item.supplyDemands.length}}</span></p>
  44. <p>订单 <span>{{item.orderNum}}</span></p>
  45. </div>
  46. <div class="tab_right">
  47. <p>{{item.industryClassificationType}}</p>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="content_con">
  52. <div class="content_con_left">
  53. <p>{{item.supplyDemands.length}}个产品</p>
  54. <p>{{item.principalName}}</p>
  55. <p>{{item.tal}}</p>
  56. </div>
  57. <div class="content_con_right">
  58. <img :src="itemChild" v-for="(itemChild,indexChild) in item.masterMap2" v-if="indexChild < 2" :key="indexChild" style="width: 22vw;height: 22vw;">
  59. <img v-if="!item.masterMap2 || item.masterMap2.length < 2" src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 22vw;height: 22vw;">
  60. <img v-if="!item.masterMap2 || item.masterMap2.length < 1" src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 22vw;height: 22vw;">
  61. <img src="../../../../static/images/agriculturalTrusteeship/insurance/insurance_go.png">
  62. </div>
  63. </div>
  64. </div>
  65. </van-list>
  66. </van-tab>
  67. <van-tab title="服务项目">
  68. <div class="search">
  69. <img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_01.png" />
  70. <input type="text" v-model="searchInput" placeholder="输入需求进行搜索" />
  71. <img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_02.png" @click="goSearch"/>
  72. </div>
  73. <div class="main_content">
  74. <div class="main_content_left">
  75. <van-sidebar v-model="activeKey" @change="onChangeIn">
  76. <van-sidebar-item title="全套服务" />
  77. <van-sidebar-item v-for="(item,index) in productList" :key="index" :title="item.dictName" />
  78. </van-sidebar>
  79. </div>
  80. <div class="main_content_right">
  81. <div class="main_content_right_header">
  82. <p class="main_content_right_header_tit">{{main_content_right_header_tit}}</p>
  83. <van-tabs v-model="activePs" animated @change="orderByChange">
  84. <van-tab title="评分排序"></van-tab>
  85. <van-tab title="销量排序"></van-tab>
  86. </van-tabs>
  87. </div>
  88. <div class="main_content_right_nav" v-if="activeKey!=0">
  89. <p v-for="(item,index) in productListChildren" :key="index">{{item.dictName}}</p>
  90. </div>
  91. <van-list
  92. v-model="loading"
  93. :finished="finished"
  94. finished-text="没有更多了"
  95. @load="getList"
  96. >
  97. <!-- @load="onLoad" agriculturalTrusteeshipSocializationProjectDetail-->
  98. <div class="main_content_right_list" v-for="(item,index) in supplyDemandListYes" :key="index" @click="$router.push({name:'agriculturalTrusteeshipSocietyProjectDetail',query:{id:item.id}})">
  99. <img v-if="item.supplyMasterMap" :src="item.supplyMasterMap" style="width: 25vw;height: 25vw;">
  100. <img v-else src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 25vw;height: 25vw;">
  101. <div class="main_content_right_list_content">
  102. <p class="tt">{{item.supplyDemandName}}</p>
  103. <div class="tab">
  104. <p>¥<span>{{item.unitPrice}}</span>.00/{{item.unit}}</p>
  105. <p><span>销 {{item.orderNum}}</span><span>分 {{item.orderScore}}</span></p>
  106. </div>
  107. <p class="name">{{item.entityName}}</p>
  108. </div>
  109. </div>
  110. </van-list>
  111. </div>
  112. </div>
  113. </van-tab>
  114. </van-tabs>
  115. </div>
  116. <!-- 内容结束 -->
  117. </div>
  118. </template>
  119. <script>
  120. import Cookies from "js-cookie";
  121. import {supplyDemandList, detailList, productTypes, treeselect} from "@/api/agriculturalTrusteeship";
  122. export default {
  123. name: "agriculturalTrusteeshipInsuranceList",
  124. data() {
  125. return {
  126. activeKey: 0,
  127. active: 0,
  128. activePs: 0,
  129. loading: false,
  130. finished: false,
  131. loading1: false,
  132. finished1: false,
  133. productList:[],
  134. supplyDemandListYes:[],
  135. supplyDemandList:[],
  136. serviceList:[],
  137. productListYes:[],
  138. financialTypeOptions:[],
  139. productListChildren:[],
  140. main_content_right_header_tit:'全套服务',
  141. query:{
  142. entityId:'',
  143. serviceDeptId:'187',
  144. entityName:'',
  145. productType:''
  146. },
  147. query2:{
  148. supplyDemandName:'',
  149. serviceDeptId:'187',
  150. orderByColumn:'order_score'
  151. },
  152. searchServiceInput:'',
  153. searchInput:'',
  154. deptOptions:[],
  155. deptName:'张村',
  156. showDeptId:false,
  157. villageValue : '',
  158. hcAreaInfoFieldName: {
  159. text: "label",
  160. value: "value",
  161. children: "children",
  162. },
  163. };
  164. },
  165. created() {
  166. this.getDicts("Industrial_classification_type").then(response => {
  167. this.financialTypeOptions = response.data;
  168. });
  169. let query = {
  170. parentId : 0
  171. }
  172. productTypes(query).then(response => {
  173. this.productList = response.data;
  174. });
  175. treeselect().then(res=>{
  176. if (res.code == 200) {
  177. this.deptOptions = res.data;
  178. }
  179. })
  180. },
  181. methods: {
  182. getServiceList(){
  183. detailList(this.query).then(response => {
  184. response.rows.map(res=>{
  185. res.industryClassificationType = this.selectDictLabel(this.financialTypeOptions, res.industryClassificationType);
  186. if (res.masterMap){
  187. let supplyMasterMap = res.masterMap.split( "," )
  188. res.masterMap2 = []
  189. supplyMasterMap.map(rr=>{
  190. res.masterMap2.push('/api'+rr)
  191. })
  192. }
  193. this.serviceList.push(res);
  194. })
  195. console.log(this.serviceList)
  196. if(this.serviceList.length >= response.total){
  197. this.finished1 = true;
  198. return;
  199. }else{
  200. this.loading1 = false;
  201. this.query.pageNum += 1 ;
  202. }
  203. });
  204. },
  205. getList(){
  206. supplyDemandList(this.query2).then(response => {
  207. response.rows.map(res=>{
  208. if(res.publishStatus == 3){
  209. if (res.supplyMasterMap){
  210. let supplyMasterMap = res.supplyMasterMap.split( "," )
  211. res.supplyMasterMap = '/api'+supplyMasterMap[0]
  212. }
  213. this.supplyDemandListYes.push(res);
  214. }
  215. this.supplyDemandList.push(res);
  216. })
  217. if(this.supplyDemandList.length >= response.total){
  218. this.finished = true;
  219. return;
  220. }else{
  221. this.loading = false;
  222. this.query.pageNum += 1 ;
  223. }
  224. });
  225. },
  226. onChangeIn(val){
  227. this.supplyDemandListYes = [];
  228. if (val == 0){
  229. this.main_content_right_header_tit = '全套服务';
  230. this.query.productType = '';
  231. this.getList();
  232. return;
  233. }
  234. this.query.productType = this.productList[val-1].id;
  235. let parentId = this.productList[val-1].id;
  236. this.main_content_right_header_tit = this.productList[val-1].dictName
  237. let query1 = {
  238. parentId : parentId
  239. }
  240. productTypes(query1).then(response => {
  241. this.productListChildren = response.data;
  242. this.getList();
  243. });
  244. },
  245. goSearchService(){
  246. this.serviceList = [];
  247. this.query.entityName = this.searchServiceInput;
  248. this.getServiceList();
  249. },
  250. goSearch(){
  251. this.supplyDemandListYes = [];
  252. this.query2.supplyDemandName = this.searchInput;
  253. this.getList();
  254. },
  255. orderByChange(){
  256. if (this.activePs == 0){
  257. this.query2.orderByColumn = 'order_score'
  258. }
  259. if (this.activePs == 1){
  260. this.query2.orderByColumn = 'order_num'
  261. }
  262. this.supplyDemandListYes = [];
  263. this.getList();
  264. },
  265. //选择案件属地
  266. onConfirmDept({ selectedOptions }){
  267. this.query.serviceDeptId = selectedOptions[selectedOptions.length-1].value;
  268. this.query2.serviceDeptId = selectedOptions[selectedOptions.length-1].value;
  269. this.deptName = selectedOptions[selectedOptions.length-1].label;
  270. this.showDeptId = false
  271. this.supplyDemandListYes = [];
  272. this.serviceList = [];
  273. this.getServiceList();
  274. this.getList();
  275. },
  276. },
  277. }
  278. </script>
  279. <style scoped lang="scss">
  280. .home_wrapper{
  281. height: 100vh;
  282. background: #ffffff;
  283. }
  284. /*头部*/
  285. .header{
  286. display: flex;
  287. align-items: center;
  288. justify-content: space-between;
  289. background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
  290. padding: 2vh 4% 2vh;
  291. .header_left{
  292. display: flex;
  293. align-items: center;
  294. p{
  295. font-size: .4rem;
  296. color: #ffffff;
  297. line-height: 1;
  298. margin-left: 10PX;
  299. }
  300. }
  301. .header_right{
  302. font-size: .35rem;
  303. background: #ffffff url("../../../../static/images/agriculturalTrusteeship/address.png") no-repeat 10PX center;
  304. padding: 2PX 15PX 2PX 25PX;
  305. border-radius: 50PX;
  306. }
  307. }
  308. /* 内容 */
  309. .main{
  310. background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
  311. /deep/ .van-tabs__nav{
  312. border-top-left-radius: 25PX;
  313. border-top-right-radius: 25PX;
  314. overflow: hidden;
  315. }
  316. /deep/ .van-tabs__line{
  317. background: #334281;
  318. }
  319. /deep/ .van-tab--active{
  320. color: #334281;
  321. }
  322. /deep/ .van-tabs__content{
  323. background: #ffffff;
  324. padding-top: 2vh;
  325. }
  326. .search{
  327. display: flex;
  328. justify-content: space-between;
  329. align-items: center;
  330. width: 92%;
  331. margin: 0PX auto;
  332. border: 1px solid #6E93F3;
  333. padding: 1PX 1PX 1PX 12PX ;
  334. border-radius: 50PX;
  335. input{
  336. flex: 1;
  337. background: transparent;
  338. margin-left: 10PX;
  339. }
  340. }
  341. .content{
  342. width: 92%;
  343. margin: 0 auto;
  344. box-shadow: 0px 0px 10PX rgba(0,0,0,0.1);
  345. border-radius: 10PX;
  346. margin-top: 2vh;
  347. padding: 1.5vh 4%;
  348. .content_tt{
  349. font-size: .35rem;
  350. margin-bottom: 1vh;
  351. }
  352. .tt_box{
  353. border-bottom: 1PX solid #D1D8EB;
  354. padding-bottom: 1.5vh;
  355. .tab_box{
  356. display: flex;
  357. justify-content: space-between;
  358. align-items: center;
  359. .tab_left{
  360. display: flex;
  361. p{
  362. &:nth-child(1){
  363. border-right: 1px solid;
  364. padding-right: 8PX;
  365. margin-right: 8PX;
  366. }
  367. span{
  368. color: #2B7EEC;
  369. }
  370. line-height: 1;
  371. }
  372. }
  373. .tab_right{
  374. display: flex;
  375. p{
  376. background: #F3F6FE;
  377. padding: 5PX 10PX;
  378. color: #497CE8;
  379. line-height: 1;
  380. border-radius: 5PX;
  381. margin-left: 10PX;
  382. }
  383. }
  384. }
  385. }
  386. .content_con{
  387. display: flex;
  388. justify-content: space-between;
  389. margin-top: 1.5vh;
  390. .content_con_left{
  391. display: flex;
  392. flex-direction:column;
  393. justify-content: space-between;
  394. p{
  395. font-size: .35rem;
  396. padding-left: 18PX;
  397. &:nth-child(1){
  398. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_project.png") no-repeat left center;
  399. }
  400. &:nth-child(2){
  401. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_name.png") no-repeat left center;
  402. }
  403. &:nth-child(3){
  404. background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_iphone.png") no-repeat left center;
  405. }
  406. }
  407. }
  408. .content_con_right{
  409. display: flex;
  410. justify-content: end;
  411. align-items: center;
  412. img{
  413. border-radius: 10PX;
  414. width: 40%;
  415. margin-left: 5%;
  416. box-shadow: 0px 5PX 10PX rgba(0,0,0,0.2);
  417. &:last-child{
  418. width: auto;
  419. box-shadow: none;
  420. }
  421. }
  422. }
  423. }
  424. }
  425. .main_content{
  426. display: flex;
  427. width: 96%;
  428. margin-top: 2vh;
  429. height: 79.7vh;
  430. overflow: hidden;
  431. .van-sidebar-item{
  432. text-align: center;
  433. }
  434. /deep/ .van-sidebar-item--select::before{
  435. display: none;
  436. }
  437. .main_content_left{
  438. border-top-right-radius: 15PX;
  439. height: 100%;
  440. overflow-y: scroll;
  441. }
  442. .main_content_right{
  443. flex: 1;
  444. padding-left: 4%;
  445. height: 100%;
  446. overflow-y: scroll;
  447. .main_content_right_header{
  448. display: flex;
  449. justify-content: space-between;
  450. align-items: center;
  451. /deep/ .van-tabs--line .van-tabs__wrap{
  452. border-radius: 100rem;
  453. height: 25PX;
  454. }
  455. /deep/ .van-tab{
  456. z-index: 1;
  457. color: #8F8F8F;
  458. padding: 5PX 10PX;
  459. }
  460. /deep/ .van-tab--active{
  461. color: #334281;
  462. }
  463. /deep/ .van-tabs__nav{
  464. background: #ECECEC;
  465. border-radius: 100rem;
  466. }
  467. /deep/ .van-tabs__nav--line{
  468. padding: 0;
  469. }
  470. /deep/ .van-tabs__line{
  471. background: #D6D9E6;
  472. border-radius: 100rem;
  473. z-index: 0;
  474. width: 50%;
  475. height: 100%;
  476. bottom: 0;
  477. }
  478. /deep/ .van-tabs__content{
  479. padding: 0;
  480. }
  481. .main_content_right_header_tit{
  482. font-size: .4rem;
  483. color: #1A1D4A;
  484. }
  485. }
  486. .main_content_right_nav{
  487. display: flex;
  488. justify-content: space-between;
  489. margin-top: 2vh;
  490. p{
  491. padding: 5PX 10PX;
  492. background: #F5F5F5;
  493. color: #8F8F8F;
  494. border-radius: 4PX;
  495. }
  496. }
  497. .main_content_right_list{
  498. display: flex;
  499. margin-top: 2vh;
  500. width: 100%;
  501. img{
  502. border-radius: 15PX;
  503. margin-right: 4%;
  504. width: auto;
  505. }
  506. .main_content_right_list_content{
  507. display: flex;
  508. flex-direction:column;
  509. justify-content: space-between;
  510. flex: 1;
  511. .tt{
  512. color: #333333;
  513. font-size: .35rem;
  514. }
  515. .tab{
  516. display: flex;
  517. justify-content: space-between;
  518. p{
  519. &:nth-child(1){
  520. flex: 1;
  521. color: #FF5E00;
  522. span{
  523. font-size: .4rem;
  524. }
  525. }
  526. &:nth-child(2){
  527. flex: 1;
  528. span{
  529. width: 50%;
  530. display: inline-block;
  531. text-align: center;
  532. padding: 2PX 2PX;
  533. &:nth-child(1){
  534. color: #497CE8;
  535. background: #E2E9FD;
  536. border-top-left-radius: 10PX;
  537. }
  538. &:nth-child(2){
  539. color: #ffffff;
  540. background-image: linear-gradient(to right , #5D87FA , #5FD5F5);
  541. border-bottom-right-radius: 10PX;
  542. }
  543. }
  544. }
  545. }
  546. }
  547. .name{
  548. color: #8F8F8F;
  549. background: url("../../../../static/images/agriculturalTrusteeship/index/name_icon.png") no-repeat left center;
  550. padding-left: 14PX;
  551. }
  552. }
  553. }
  554. }
  555. }
  556. .main_content_right_list{
  557. display: flex;
  558. margin: 0 auto;
  559. margin-top: 2vh;
  560. width: 92%;
  561. img{
  562. border-radius: 15PX;
  563. margin-right: 4%;
  564. width: 20%;
  565. }
  566. .main_content_right_list_content{
  567. display: flex;
  568. flex-direction:column;
  569. justify-content: space-between;
  570. .tt{
  571. color: #333333;
  572. font-size: .35rem;
  573. }
  574. .tab{
  575. display: flex;
  576. justify-content: space-between;
  577. p{
  578. &:nth-child(1){
  579. flex: 1;
  580. color: #FF5E00;
  581. span{
  582. font-size: .4rem;
  583. }
  584. }
  585. &:nth-child(2){
  586. flex: 1;
  587. span{
  588. width: 50%;
  589. display: inline-block;
  590. text-align: center;
  591. padding: 2PX 2PX;
  592. &:nth-child(1){
  593. color: #497CE8;
  594. background: #E2E9FD;
  595. border-top-left-radius: 10PX;
  596. }
  597. &:nth-child(2){
  598. color: #ffffff;
  599. background-image: linear-gradient(to right , #5D87FA , #5FD5F5);
  600. border-bottom-right-radius: 10PX;
  601. }
  602. }
  603. }
  604. }
  605. }
  606. .name{
  607. color: #8F8F8F;
  608. background: url("../../../../static/images/agriculturalTrusteeship/index/name_icon.png") no-repeat left center;
  609. padding-left: 18PX;
  610. }
  611. }
  612. }
  613. }
  614. </style>