historyConstruction.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <view>
  3. <view class="title-text" style="margin-top: 80rpx;">
  4. 历史施工
  5. </view>
  6. <view :class="(kgName == '展开搜索') ? 'hei_vie2':'hei_vie'">
  7. <view class="justify-content select">
  8. <view class="thirsty gray border" v-for="item in type" :key="item.value"
  9. :class="{active: show === item.value}" @click="active(item),getListAll()">
  10. {{item.name}}
  11. </view>
  12. </view>
  13. <!-- <u-search placeholder="请输入搜索内容" v-model="nameValue" :action-style="{'font-size':'40rpx'}" @custom="getListAll()"></u-search> -->
  14. <view class="inp_vie">
  15. <input type="text" value="" placeholder="小区名称搜索" class="search-text" v-model="areaName"/>
  16. <input type="text" value="" placeholder="楼栋名称搜索" class="search-text" v-model="buildingName"/>
  17. <input type="text" value="" placeholder="单元名称搜索" class="search-text" v-model="unitName"/>
  18. <input type="text" value="" placeholder="房间名称搜索" class="search-text" v-model="houseName"/>
  19. <button @click="getListAll()" class="btn_vie">搜索</button>
  20. </view>
  21. </view>
  22. <view>
  23. <button class="p_zk" @click="p_zk()">{{kgName}}</button>
  24. </view>
  25. <view v-for="(item,index) in list" :key="index">
  26. <view @click="gotopage(`/pages/historyConstruction/historyDetail?id=${item.id}`)">
  27. <view class="type">
  28. <view class="justify-content">
  29. <view class="font-forty blue" v-if="item.serviceType != '004'">
  30. 类别:{{item.serviceType}}
  31. </view>
  32. <view class="font-forty blue" v-else>
  33. 类别:安检
  34. </view>
  35. <view class="font-twenty-eight gray">
  36. {{item.time}}
  37. </view>
  38. </view>
  39. <view class="font-thirty-six black" style="margin: 30rpx 0;" v-if="show === '002' || item.serviceType=='正常施工'">
  40. 状态:{{item.status}}
  41. </view>
  42. <view class="font-thirty-six black" style="margin: 30rpx 0;" v-if="show === '002' || item.serviceType=='正常施工'">
  43. 审核意见:
  44. <text class="" v-if="item.reason != null || item.reason != undefined">
  45. {{item.reason}}
  46. </text>
  47. <text class="" v-else>
  48. </text>
  49. </view>
  50. <view class="font-thirty-six black" style="margin: 30rpx 0;">
  51. {{item.house}}
  52. </view>
  53. <button v-if="show === '002' && item.status == '待审核'" style="background-color: #007AFF; color: #FFFFFF;" @click.stop="gotoUpdate(item)">修改</button>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="font-forty total">
  58. 合计: <text class="font-fifty-six SourceHanSansCN red">{{list.length}}</text>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import service from '@/api/index.js'
  64. export default {
  65. data() {
  66. return {
  67. show: '001',
  68. index: 0,
  69. list: [],
  70. type: [],
  71. areaName: '',
  72. buildingName: '',
  73. unitName: '',
  74. houseName: '',
  75. pop: false,
  76. kgName: '展开搜索',
  77. }
  78. },
  79. onShow() {
  80. // this.show = '001';
  81. this.getListAll();
  82. this.select();
  83. },
  84. methods: {
  85. getListAll() {
  86. service.getListAll({serviceType: this.show,
  87. areaName:this.areaName,
  88. buildingName:this.buildingName,
  89. unitName:this.unitName,
  90. houseName:this.houseName}).then(res => {
  91. this.list = res
  92. })
  93. },
  94. gotopage(url) {
  95. uni.navigateTo({
  96. url
  97. })
  98. },
  99. select() {
  100. service.getDic({dicType: 'service_type'}).then(res => {
  101. // console.log('service_type', res)
  102. const shenhe = {};
  103. shenhe.value='es002';
  104. shenhe.name='不合格';
  105. res.push(shenhe);
  106. this.type = res;
  107. })
  108. },
  109. active(item) {
  110. this.show = item.value;
  111. },
  112. gotoUpdate(item){
  113. uni.navigateTo({
  114. url:`/pages/historyConstruction/updateInfo?id=${item.id}&&house=${item.house}`,
  115. })
  116. },
  117. p_zk(){
  118. if(this.kgName == '收起搜索'){
  119. this.kgName = '展开搜索';
  120. }else{
  121. this.kgName = '收起搜索';
  122. }
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="scss" scoped>
  128. .select {
  129. margin: 50rpx 20rpx 0;
  130. height: 105px;
  131. display: block;
  132. .border {
  133. width: 48%;
  134. text-align: center;
  135. padding: 20rpx 10rpx;
  136. border-radius: 48rpx;
  137. display: block;
  138. float: left;
  139. border: 2rpx solid #9dc9ff;
  140. margin: 1%;
  141. background: #f5f7ff;
  142. }
  143. }
  144. .active {
  145. background: #3857F3!important;
  146. color: #FFFFFF;
  147. }
  148. .type {
  149. margin: 20rpx;
  150. padding: 20rpx;
  151. background: #FFFFFF;
  152. box-shadow: 0rpx 8rpx 17rpx 0rpx rgba(0, 0, 0, 0.04);
  153. border-radius: 10rpx;
  154. }
  155. .text {
  156. border-left: 15rpx solid #3857F3;
  157. padding-left: 20rpx;
  158. }
  159. .total {
  160. width: 100%;
  161. padding: 40rpx 30rpx;
  162. border: 1rpx solid #727272;
  163. background: #FFFFFF;
  164. }
  165. .active {
  166. background: #3857F3;
  167. color: #FFFFFF;
  168. }
  169. .choose {
  170. text-align: center;
  171. padding: 20rpx;
  172. margin: 30rpx;
  173. color: #FFFFFF;
  174. background: #43CEB1;
  175. border-radius: 64rpx;
  176. }
  177. .search-text{
  178. float: left;
  179. border-style:solid;
  180. border-width: 1rpx;
  181. height: 50rpx;
  182. width: 90%;
  183. border-radius: 24rpx;
  184. }
  185. .inp_vie{
  186. padding: 1% 3.5%;
  187. }
  188. .inp_vie input{
  189. float: none;
  190. width: 98%;
  191. padding-left: 1.5%;
  192. height: 40px;
  193. margin-bottom: 1.5%;
  194. /* border-bottom: 1px solid #ccc!important; */
  195. border: 1px solid #c7c7c7;
  196. border-radius: 5px;
  197. }
  198. .btn_vie{
  199. background: #3857F3;
  200. color: #fff;
  201. }
  202. .btn_vie:active{
  203. background: #0925b3;
  204. }
  205. .p_zk{
  206. height: 40px;
  207. line-height: 40px;
  208. text-align: center;
  209. // background: #eee;
  210. margin: 1% auto;
  211. width: 93%;
  212. font-size: 15px;
  213. }
  214. .hei_vie{
  215. height: 350px;
  216. }
  217. .hei_vie2{
  218. height: 130px!important;
  219. overflow: hidden;
  220. }
  221. </style>