cityProject.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <view>
  3. <image src="/static/icon/background.png" mode="" class="background"></image>
  4. <view class="" style="padding-top: 90rpx;">
  5. <back></back>
  6. </view>
  7. <view style="padding-top: 60rpx;">
  8. <view style="margin: 20rpx;">
  9. <u-search placeholder="请输入搜索内容" v-model="nameValue" :action-style="{'font-size':'40rpx'}" @custom="getProjectList()"></u-search>
  10. </view>
  11. <view class="project-content" v-for="(item,index) in list" :key="index" >
  12. <view v-if="item.name == '灶管阀改造'" @click="gotoindex()">
  13. <view >
  14. <view class="font-forty-eight blue">
  15. 项目名称:{{item.name}}
  16. </view>
  17. <view class="font-forty-eight blue">
  18. 项目地址:{{item.address}}
  19. </view>
  20. </view>
  21. </view>
  22. <view v-else-if="item.name == '安检' || item.name == '维修' || item.name == '开栓'" @click="topage(`/pages/noLogin/data?id=${item.id}&name=${item.name}&address=${item.address}`)">
  23. <view >
  24. <view class="font-forty-eight blue">
  25. 项目名称:{{item.name}}
  26. </view>
  27. <view class="font-forty-eight blue">
  28. 项目地址:{{item.address}}
  29. </view>
  30. </view>
  31. </view>
  32. <view v-else @click="topage(`/pages/noLogin/uploadProject?id=${item.id}&name=${item.name}&address=${item.address}`)">
  33. <view >
  34. <view class="font-forty-eight blue">
  35. 项目名称:{{item.name}}
  36. </view>
  37. <view class="font-forty-eight blue">
  38. 项目地址:{{item.address}}
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import service from '@/api/index.js'
  48. export default {
  49. data() {
  50. return {
  51. list:[],
  52. value:'',
  53. nameValue:''
  54. }
  55. },
  56. onLoad(e) {
  57. console.log(e)
  58. this.value = e.value
  59. this.getProjectList();
  60. },
  61. methods: {
  62. gotoindex(){
  63. uni.switchTab({
  64. url:'/pages/index/index'
  65. })
  66. },
  67. topage(url){
  68. uni.navigateTo({
  69. url
  70. })
  71. },
  72. getProjectList() {
  73. service.getProjectList({engineType:this.value,name:this.nameValue}).then(res=>{
  74. console.log('getProjectType', res)
  75. if(res.length == 0){
  76. this.$UTILS.showPrompt('暂无项目!')
  77. }
  78. this.list = res;
  79. })
  80. }
  81. },
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .background {
  86. z-index: -1;
  87. position: fixed;
  88. width: 100%;
  89. height: 100%;
  90. background-size: 100% 100%;
  91. }
  92. .project {
  93. border-radius: 72rpx;
  94. padding: 25rpx 0;
  95. text-align: center;
  96. margin: 170rpx 55rpx 0;
  97. }
  98. .project-content {
  99. border: 4rpx solid #3857F3;
  100. margin: 40rpx 55rpx 0;
  101. padding: 30rpx 20rpx;
  102. border-radius: 48rpx;
  103. }
  104. .position{
  105. position: absolute;
  106. bottom: 100rpx;
  107. right: 50rpx;
  108. .arrow{
  109. width: 152rpx;
  110. height: 152rpx;
  111. border-radius: 50%;
  112. padding: 25rpx;
  113. margin-left: 20rpx;
  114. }
  115. }
  116. </style>