移动端
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

index.vue 8.6 KiB

3 anni fa
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template>
  2. <div>
  3. <van-nav-bar
  4. title="竞价大厅"
  5. left-arrow
  6. fixed
  7. placeholder
  8. @click-left="onClickLeft"
  9. />
  10. <van-search
  11. v-model="value"
  12. shape="round"
  13. background="#fff"
  14. placeholder="请输入搜索关键词"
  15. @search="onSearch"
  16. />
  17. <van-row>
  18. <van-dropdown-menu>
  19. <van-dropdown-item v-model="value1" :options="projectTypeOption" @change="getList"/>
  20. <van-dropdown-item :value="value2" :title="value2">
  21. <van-tree-select
  22. :active-id.sync="activeId"
  23. :items="deptListOption"
  24. :main-active-index.sync="activeIndex"
  25. :max="1"
  26. @click-item="clickItem"
  27. @click-nav="clickNav"
  28. />
  29. </van-dropdown-item>
  30. <van-dropdown-item v-model="value3" :options="option3" @change="getList"/>
  31. </van-dropdown-menu>
  32. </van-row>
  33. <van-row type="flex" justify="center" class="biddingProcessTitle">
  34. <van-col span="24">竞价流程</van-col>
  35. </van-row>
  36. <van-row type="flex" justify="space-around" class="biddingProcessContent">
  37. <van-col span="1">
  38. </van-col>
  39. <van-col span="3">
  40. <div class="biddingProcess">
  41. <van-image
  42. class="biddingProcess_img"
  43. :src="iconList.bjd"
  44. />
  45. </div>
  46. <p class="biddingProcess_text">第一步</p>
  47. <p class="biddingProcess_text">查看项目</p>
  48. </van-col>
  49. <van-col span="3">
  50. <div class="biddingProcess">
  51. <van-image
  52. class="biddingProcess_img"
  53. :src="iconList.bzj"
  54. />
  55. </div>
  56. <p class="biddingProcess_text">第二步</p>
  57. <p class="biddingProcess_text">注册报名</p>
  58. </van-col>
  59. <van-col span="3">
  60. <div class="biddingProcess">
  61. <van-image
  62. class="biddingProcess_img"
  63. :src="iconList.cj"
  64. />
  65. </div>
  66. <p class="biddingProcess_text">第三步</p>
  67. <p class="biddingProcess_text">交保证金</p>
  68. </van-col>
  69. <van-col span="3">
  70. <div class="biddingProcess">
  71. <van-image
  72. class="biddingProcess_img"
  73. :src="iconList.jcxx"
  74. />
  75. </div>
  76. <p class="biddingProcess_text">第四步</p>
  77. <p class="biddingProcess_text">资质审核</p>
  78. </van-col>
  79. <van-col span="3">
  80. <div class="biddingProcess">
  81. <van-image
  82. class="biddingProcess_img"
  83. :src="iconList.k"
  84. />
  85. </div>
  86. <p class="biddingProcess_text">第五步</p>
  87. <p class="biddingProcess_text">参与竞价</p>
  88. </van-col>
  89. <van-col span="3">
  90. <div class="biddingProcess">
  91. <van-image
  92. class="biddingProcess_img"
  93. :src="iconList.xmjflc"
  94. />
  95. </div>
  96. <p class="biddingProcess_text">第六步</p>
  97. <p class="biddingProcess_text">成家确认</p>
  98. </van-col>
  99. <van-col span="3">
  100. <div class="biddingProcess">
  101. <van-image
  102. class="biddingProcess_img"
  103. :src="iconList.zj"
  104. />
  105. </div>
  106. <p class="biddingProcess_text">第七步</p>
  107. <p class="biddingProcess_text">结算交割</p>
  108. </van-col>
  109. <van-col span="1"></van-col>
  110. </van-row>
  111. <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
  112. <van-list
  113. v-model="loading"
  114. :finished="finished"
  115. finished-text="没有更多了"
  116. @load="onL"
  117. >
  118. <van-row v-for="(item,index) in infoList" :key="index" :title="item">
  119. <van-col span="13" class="biddingProcessListLeftCol">
  120. <span >{{item.content}}</span>
  121. </van-col>
  122. <van-col span="11" class="biddingProcessListRightCol">
  123. <van-count-down :time="item.deadline">
  124. <template #default="timeData">
  125. <span style="color: #666666">距竞价结束</span><span>{{timeData.days}}天{{timeData.hours}}时{{timeData.minutes}}分{{timeData.seconds}}秒</span>
  126. </template>
  127. </van-count-down>
  128. <van-row> <span style="color: #666666">当前价 </span><span style="font-size: 14px">{{item.currentPrice}}</span> <span>{{item.priceUnit}}</span></van-row>
  129. </van-col>
  130. </van-row>
  131. </van-list>
  132. </van-pull-refresh>
  133. </div>
  134. </template>
  135. <script>
  136. import {getBiddingList, getDeptList} from "../../api/biddingHall";
  137. export default {
  138. name: "biddingHallApply",
  139. data() {
  140. return {
  141. //标的物类型
  142. projectTypeOption:[{text:'标的物类型',value:''}],
  143. input: '',
  144. iconList: {
  145. bjd: "../../static/images/11.png",
  146. bzj:"../../static/images/22.png",
  147. cj:"../../static/images/33.png",
  148. jcxx:"../../static/images/44.png",
  149. k:"../../static/images/55.png",
  150. xmjflc:"../../static/images/66.png",
  151. zj:"../../static/images/77.png",
  152. },
  153. iconWidthHeight:"0.4rem",
  154. infoList:[],
  155. value1: '',
  156. value2: '标的物位置',
  157. activeId: 1,
  158. activeIndex: 0,
  159. value3: '',
  160. value:"",
  161. info:[],
  162. //标的物所在地
  163. deptListOption: [
  164. ],
  165. option3: [
  166. { text: '竞价状态', value: '' },
  167. { text: '全部', value: '全部' },
  168. { text: '竞价中', value: '竞价中' },
  169. { text: '竞价结束', value: '竞价结束' },
  170. ],
  171. loading: false,
  172. finished: false,
  173. refreshing: false,
  174. }
  175. },
  176. created(){
  177. this.getDicts("project_type").then(response => {
  178. response.data.map(item => {
  179. this.projectTypeOption.push({ value:item.dictCode, text: item.dictLabel});
  180. });
  181. });
  182. getDeptList().then(response => {
  183. response.data.map(item => {
  184. getDeptList(item.deptId).then(res => {
  185. let list = []
  186. res.data.map(i =>{
  187. list.push({text:i.deptName,children:[],id:i.deptId})
  188. })
  189. if(list.length==0){
  190. list.push({text:item.deptName,id:item.deptId})
  191. }else{
  192. this.deptListOption.push({ text: item.deptName,children: list});
  193. }
  194. });
  195. });
  196. });
  197. },
  198. methods:{
  199. getList(){
  200. let queryDatas = {
  201. deptId: this.value1,
  202. projectNumber:this.activeId,
  203. projectShowStatus:this.value3
  204. }
  205. getBiddingList(queryDatas).then(response =>{
  206. this.infoList = response.rows.map(item => {
  207. if (item.biddingStopTime!=""){
  208. let time = 0
  209. let endDate = Date.parse(item.biddingStopTime);
  210. let nowDate = Date.parse(new Date());
  211. if(endDate>nowDate){
  212. time = endDate-nowDate>0?endDate-nowDate:0
  213. }
  214. return{content:item.projectName,deadline:time,currentPrice:item.price,priceUnit:item.unit}
  215. }else {
  216. return{content:item.projectName,deadline:0,currentPrice:item.price,priceUnit:item.unit}
  217. }
  218. })
  219. });
  220. },
  221. clickNav(index){
  222. },
  223. clickItem(data){
  224. if(data.text==this.value2){
  225. this.activeId=1
  226. this.value2='标的物位置'
  227. }else{
  228. this.value2=data.text
  229. }
  230. this.getList()
  231. },
  232. onSearch(val) {
  233. this.loading = true;
  234. if(this.infoList.length>0){
  235. let newList = []
  236. for(let j = 0 ;j<this.infoList.length;j++){
  237. if(this.infoList[j].content.indexOf(val)>-1){
  238. newList.push(this.infoList[j]);
  239. }
  240. }
  241. this.infoList = newList
  242. }
  243. if(val==""){
  244. this.getList()
  245. }
  246. this.loading = false;
  247. },
  248. onL() {
  249. this.refreshing = true;
  250. this.loading = false;
  251. this.getList()
  252. this.refreshing = false;
  253. },
  254. onRefresh() {
  255. // 清空列表数据
  256. this.finished = false;
  257. // 重新加载数据
  258. // 将 loading 设置为 true,表示处于加载状态
  259. this.loading = true;
  260. this.onL();
  261. },
  262. },
  263. }
  264. </script>
  265. <style scoped>
  266. .van-search__content{
  267. border:1px solid #007E72;
  268. }
  269. >>> .van-dropdown-menu__title{
  270. font-size: 0.2rem;
  271. }
  272. .biddingProcess {
  273. width:0.55rem;
  274. height:0.55rem;
  275. margin: 0 auto;
  276. }
  277. .biddingProcess_img{
  278. width:100%;
  279. height:100%;
  280. }
  281. .biddingProcessTitle{
  282. background-color:#007E72;
  283. color:#fff;
  284. text-align: center;
  285. line-height: 0.8rem;
  286. font-size: 14px;
  287. }
  288. .biddingProcess_text{
  289. font-size: 0.2rem;
  290. }
  291. .biddingProcessContent{
  292. padding:0.4rem 0;
  293. background-color: #efefef;
  294. text-align: center;
  295. }
  296. .biddingProcessListLeftCol{
  297. padding:10px 0.25rem 10px 0.3rem;
  298. }
  299. .biddingProcessListLeftCol span{
  300. font-size: 0.38rem;
  301. }
  302. .biddingProcessListRightCol
  303. {
  304. padding:10px 0.3rem 10px 0.25rem;
  305. }
  306. .biddingProcessListRightCol span{
  307. color: #c21F3a;
  308. font-size: 10px;
  309. }
  310. </style>