WarningPileList.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view>
  3. <image src="https://cczdsz.cn/app/images//background-from.png" mode="" class="background"></image>
  4. <view>
  5. <view class="sousuo">
  6. <u-search placeholder="请输入阀井名称" @click="showName=true" v-model="userName" :show-action="false"@search="getProjectList()" ></u-search>
  7. <!-- <u-select v-model="showName" :list="workList" label-name="name" value-name="id" @confirm="worker()" @cancel="cancelWorker()"></u-select>
  8. <u-search placeholder="请输入巡检柱名称" v-model="name" :show-action="false" :action-style="{'font-size':'40rpx'}"
  9. @search="getProjectList()"></u-search> -->
  10. <u-search placeholder="请输入阀井位置" @click="showName=true" v-model="userId" :show-action="false" @search="getProjectList()"></u-search>
  11. </view>
  12. <view v-for="(item,index) in list" :key="index">
  13. <view class="project-content houseList" @click="gotoindex(item)">
  14. <view class="font-forty-eight houseList_in">
  15. <span>{{item.valveWellName}}<span style="font-size: 20rpx;">({{item.position}})</span></span>
  16. <u-icon name="arrow-right"></u-icon>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import service from '@/api/index.js'
  26. export default {
  27. data() {
  28. return {
  29. params: {
  30. year: true,
  31. month: true,
  32. day: true,
  33. hour: true,
  34. minute: false,
  35. second: false
  36. },
  37. showName:false,
  38. showTime: false,
  39. list: [],
  40. workList: [],
  41. value: '',
  42. nameValue: '',
  43. name:'',
  44. userName:'',
  45. civilPower: '',
  46. form:{},
  47. userId:''
  48. }
  49. },
  50. onLoad() {
  51. this.getProjectList();
  52. this.getUserName();
  53. //this.getWorker();
  54. uni.setNavigationBarColor({
  55. frontColor: '#ffffff',
  56. backgroundColor: '#2d95f4',
  57. })
  58. },
  59. methods: {
  60. getWorker()
  61. {
  62. service.getWorker({type:'1',name:''}).then(res => {
  63. this.workList=res
  64. })
  65. },
  66. worker(e)
  67. {
  68. this.userName=e[0].label
  69. this.userId=e[0].value
  70. this.getProjectList()
  71. },
  72. cancelWorker()
  73. {
  74. this.userName=''
  75. this.userId=''
  76. },
  77. time(e)
  78. {
  79. this.form.time=e
  80. },
  81. gotoindex(item) {
  82. console.log(item)
  83. uni.navigateTo({
  84. url:`/pages/noLogin/valveWellInspection/valveWellInspection?valveWellName=${item.valveWellName}&position=${item.position}&id=${item.id}&managementOfficeId=${item.id}&type=2`
  85. })
  86. },
  87. topage(url) {
  88. uni.navigateTo({
  89. url
  90. })
  91. },
  92. getProjectList() {
  93. this.list=[]
  94. service.getvalveWellPositionlist({valveWellName:this.userName,position:this.userId}).then(res => {
  95. console.log('getwarningPileList', res)
  96. if (res.length == 0) {
  97. this.$UTILS.showPrompt('暂无项目!')
  98. }
  99. this.list = res;
  100. })
  101. },
  102. getUserName() {
  103. service.getUserName().then(res => {
  104. this.civilPower = res.civilPower;
  105. })
  106. },
  107. },
  108. }
  109. </script>
  110. <style lang="scss" scoped>
  111. .background {
  112. z-index: -1;
  113. position: fixed;
  114. width: 100%;
  115. height: 100%;
  116. background-size: 100% 100%;
  117. }
  118. .project {
  119. border-radius: 72rpx;
  120. padding: 25rpx 0;
  121. text-align: center;
  122. margin: 170rpx 55rpx 0;
  123. }
  124. .project-content {
  125. width: 90%;
  126. margin: 40rpx auto;
  127. padding: 30rpx 20rpx;
  128. border-radius: 20rpx;
  129. background: #edf5ff;
  130. box-shadow: 0rpx 6rpx 8rpx #d3e6ff;
  131. }
  132. .houseList_in{
  133. display: flex;
  134. justify-content:space-between;
  135. align-items:center;
  136. color: #cbcbcb;
  137. font-size: 38rpx;
  138. }
  139. .houseList_in span{
  140. font-size: 36rpx;
  141. color: #333;
  142. }
  143. .sousuo{
  144. display: flex;
  145. justify-content:space-between;
  146. align-items:center;
  147. }
  148. .position {
  149. position: absolute;
  150. bottom: 100rpx;
  151. right: 50rpx;
  152. .arrow {
  153. width: 152rpx;
  154. height: 152rpx;
  155. border-radius: 50%;
  156. padding: 25rpx;
  157. margin-left: 20rpx;
  158. }
  159. }
  160. </style>