移动端
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

3 роки тому
3 роки тому
3 роки тому
2 роки тому
2 роки тому
2 роки тому
2 роки тому
2 роки тому
3 роки тому
2 роки тому
3 роки тому
3 роки тому
2 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
2 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
2 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
2 роки тому
3 роки тому
3 роки тому
3 роки тому
2 роки тому
3 роки тому
2 роки тому
3 роки тому
3 роки тому
3 роки тому
2 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
2 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <div class="app-container">
  3. <van-search v-model="value" placeholder="请输入搜索关键词" @search="onSearch"/>
  4. <van-tabs v-model="active" color="#007b76" title-active-color="#007b76" @change="tabChange">
  5. <van-tab title="供应项目">
  6. <van-dropdown-menu>
  7. <van-dropdown-item v-model="value1" :options="projectTypeOption" @change="getList"/>
  8. <van-dropdown-item :value="value2" :title="value2" ref="item">
  9. <van-tree-select
  10. :active-id.sync="activeId"
  11. :items="deptListOption"
  12. :main-active-index.sync="activeIndex"
  13. :max="1"
  14. @click-item="clickItem"
  15. @click-nav="clickNav"
  16. />
  17. </van-dropdown-item>
  18. <van-dropdown-item v-model="value3" :options="option3" @change="getList"/>
  19. </van-dropdown-menu>
  20. <van-list v-model="loading" :finished="finished" finished-text="没有更多了">
  21. <router-link :to="{path:'project/projectDetail',query:{id:item.id}}" v-for="(item,index) in infoList" :key="index">
  22. <van-card :thumb="item.fileUrl?'/api'+item.fileUrl:'../../static/images/zwtpxw.jpg'" >
  23. <template #tags>
  24. <p class="title">【{{item.rollout}}】{{item.projectName}}</p>
  25. <p class="type">{{ item.projectShowStatus }}</p>
  26. <p class="timeEnd">报名结束 {{ item.signupStopTime }}</p>
  27. <p class="timeEnd">竞价结束 {{ item.biddingStopTime }}</p>
  28. <van-row>
  29. <van-col span="12" class="money"><span>{{ item.price }}</span>{{ item.unit }}</van-col>
  30. <van-col span="8" offset="4" class="time">{{ item.projectReleaseTime }}</van-col>
  31. </van-row>
  32. </template>
  33. </van-card>
  34. </router-link>
  35. </van-list>
  36. </van-tab>
  37. <van-tab title="需求项目">
  38. <van-dropdown-menu>
  39. <van-dropdown-item v-model="value1" :options="projectTypeOption" @change="getNeedProjectList"/>
  40. <van-dropdown-item :value="value2" :title="value2" ref="item">
  41. <van-tree-select
  42. :active-id.sync="activeId"
  43. :items="deptListOption"
  44. :main-active-index.sync="activeIndex"
  45. :max="1"
  46. @click-item="clickItem"
  47. @click-nav="clickNav"
  48. />
  49. </van-dropdown-item>
  50. </van-dropdown-menu>
  51. <van-list v-model="loading1" :finished="finished1" @load="getNeedProjectList" finished-text="没有更多了">
  52. <router-link :to="{path:'project/projectNeedsDetail',query:{id:item.id}}" v-for="(item,index) in infoList1" :key="index">
  53. <van-card :thumb="item.fileUrl?'/api'+item.fileUrl:'../../static/images/zwtpxw.jpg'" >
  54. <template #tags>
  55. <p class="title">{{ item.projectName }}</p>
  56. <p class="type">{{ item.needname }}</p>
  57. <p class="timeEnd">需求开始时间 {{ item.needStartTime }}</p>
  58. <p class="timeEnd">需求结束时间 {{ item.needStopTime }}</p>
  59. <van-row>
  60. <van-col span="12" class="money"><span>{{ item.price }}</span></van-col>
  61. <van-col span="8" offset="4" class="time">{{ item.phone }}</van-col>
  62. </van-row>
  63. </template>
  64. </van-card>
  65. </router-link>
  66. </van-list>
  67. </van-tab>
  68. </van-tabs>
  69. </div>
  70. </template>
  71. <script>
  72. import { getOutProjectList , getDeptList , needProjectList } from "@/api/project/index" ;
  73. export default {
  74. name: "project",
  75. data() {
  76. return {
  77. active:0,
  78. value1: '',
  79. value2: '标的物位置',
  80. activeId: this.global.deptId,
  81. activeIndex: 0,
  82. value3: '',
  83. value:"",
  84. //是否显示加载
  85. loading: false,
  86. //是否滚动到底部
  87. finished: true,
  88. //是否显示加载
  89. loading1: false,
  90. //是否滚动到底部
  91. finished1: true,
  92. option1: [
  93. ],
  94. option2: [
  95. ],
  96. option3: [
  97. { text: '竞价状态', value: '' },
  98. { text: '正在报名', value: '正在报名' },
  99. { text: '等待竞价', value: '等待竞价' },
  100. { text: '正在竞价', value: '正在竞价' },
  101. { text: '等待成交', value: '等待成交' },
  102. { text: '已经成交', value: '已经成交' },
  103. ],
  104. //标的物类型
  105. projectTypeOption:[{text:'标的物类型',value:''}],
  106. //标的物所在地
  107. deptListOption: [
  108. ],
  109. input: '',
  110. infoList:[],
  111. infoList1:[],
  112. };
  113. },
  114. created() {
  115. this.getDicts("project_type").then(response => {
  116. console.log(response)
  117. response.data.map(item => {
  118. this.projectTypeOption.push({ value:item.dictValue, text: item.dictLabel});
  119. });
  120. });
  121. getDeptList().then(response => {
  122. response.data.map(item => {
  123. getDeptList(item.deptId).then(res => {
  124. let list = []
  125. res.data.map(i =>{
  126. list.push({text:i.deptName,children:[],id:i.deptId})
  127. })
  128. if(list.length==0){
  129. list.push({text:item.deptName,id:item.deptId})
  130. }else{
  131. this.deptListOption.push({ text: item.deptName,children: list});
  132. }
  133. });
  134. });
  135. });
  136. this.getList();
  137. },
  138. mounted(){},
  139. methods: {
  140. tabChange(e){
  141. console.log(e)
  142. if (e == 0){
  143. this.getList();
  144. }else{
  145. this.getNeedProjectList()
  146. }
  147. },
  148. onSearch(val) {
  149. this.loading = true;
  150. if(this.infoList.length>0){
  151. let newList = []
  152. for(let j = 0 ;j<this.infoList.length;j++){
  153. if(this.infoList[j].projectName.indexOf(val)>-1){
  154. newList.push(this.infoList[j]);
  155. }
  156. }
  157. this.infoList = newList
  158. }
  159. if(val==""){
  160. this.getList()
  161. }
  162. this.loading = false;
  163. },
  164. getList(){
  165. console.log(this.value1)
  166. let queryDatas = {
  167. deptId: this.activeId,
  168. projectNumber:this.value1,
  169. projectShowStatus:this.value3
  170. }
  171. console.log(queryDatas)
  172. getOutProjectList(queryDatas).then(response =>{
  173. console.log(response)
  174. this.infoList = response.rows
  175. if(this.infoList.length>0){
  176. let newList = []
  177. for(let j = 0 ;j<this.infoList.length;j++){
  178. if(this.infoList[j].projectName.indexOf(this.value)>-1){
  179. newList.push(this.infoList[j]);
  180. }
  181. }
  182. this.infoList = newList
  183. console.log(this.infoList)
  184. }
  185. });
  186. },
  187. getNeedProjectList(){
  188. let queryDatas = {
  189. deptId: this.activeId,
  190. projectNumber:this.value1,
  191. }
  192. console.log(queryDatas)
  193. needProjectList(queryDatas).then(response =>{
  194. console.log(response)
  195. this.infoList1 = response.rows
  196. });
  197. },
  198. clickNav(index){
  199. },
  200. clickItem(data){
  201. if(data.text==this.value2){
  202. this.activeId=1
  203. this.value2='标的物位置'
  204. }else{
  205. this.value2=data.text
  206. }
  207. this.getList()
  208. this.$refs.item.toggle();
  209. },
  210. },
  211. };
  212. </script>
  213. <style scoped lang="scss">
  214. .app-container {
  215. }
  216. .title{
  217. font-size: 0.4rem;
  218. }
  219. .type{
  220. font-size: 0.35rem;
  221. color: #E7851C;
  222. margin-top: 5px;
  223. }
  224. .timeEnd{
  225. color: #666666;
  226. margin-top: 5px;
  227. font-size: 0.1rem;
  228. }
  229. .money{
  230. color: #C21F3A;
  231. line-height: 0.5rem;
  232. margin-top: 5px;
  233. }
  234. .money span{
  235. font-size: 0.5rem;
  236. }
  237. .time{
  238. color: #666666;
  239. line-height: 0.6rem;
  240. margin-top: 5px;
  241. }
  242. </style>