index.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <template>
  2. <view class="content">
  3. <view class="Homepage_header">
  4. <view class="Homepage_suspension">
  5. <view class="Suspension">
  6. <view class="online" @click="Onlinewarranty">
  7. <view><img src="@/static/index/repair-online.svg" alt="" style="margin-left: 5rpx;"></view>
  8. <view style="font-size: 20rpx;">线上报修</view>
  9. </view>
  10. <view class="record" @click="Inspectionrecord">
  11. <view><img src="@/static/index/check-review.svg" alt="" style="margin-left: 5rpx;"></view>
  12. <view style="font-size: 20rpx;">巡检记录</view>
  13. </view>
  14. <view class="withholding" @click="Withholdingrecord">
  15. <view><img src="@/static/index/reduce-record.svg" alt="" style="margin-left: 5rpx;"></view>
  16. <view style="font-size: 20rpx;">扣缴记录</view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="pending">
  22. <view class="pending_middle">
  23. <view class="all">
  24. <view class="work">
  25. <span style="font-size: 30rpx;">工单待办</span>
  26. </view>
  27. <view class="processing">
  28. <view class="immediately" @click="Workordertodone">
  29. <span style="font-size: 25rpx; color: #5c8fff; ">立即处理</span>
  30. <u-icon name="arrow-right" color="#5c8fff" size="16rpx"></u-icon>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="wait">
  35. <view>
  36. <view style="font-size: 30rpx;">待指派</view>
  37. <view style="text-align: center;">{{workList[1]}}</view>
  38. </view>
  39. <view>
  40. <view style="font-size: 30rpx;">待维修</view>
  41. <view style="text-align: center;">{{workList[2]}}</view>
  42. </view>
  43. <view>
  44. <view style="font-size: 30rpx;">已维修</view>
  45. <view style="text-align: center;">{{workList[3]}}</view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="equipment">
  51. <view class="pending_middle">
  52. <view class="all">
  53. <view class="work">
  54. <span style="font-size: 30rpx;">设备异常</span>
  55. </view>
  56. <view class="processing">
  57. <view class="immediately">
  58. <span style="font-size: 25rpx; color: #5c8fff; ">立即查看</span>
  59. <u-icon name="arrow-right" color="#5c8fff" size="16rpx"></u-icon>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="wait">
  64. <view>
  65. <view style="font-size: 30rpx;">异常总数</view>
  66. <view style="text-align: center;">{{deviceArr.AirConditioner}}</view>
  67. </view>
  68. <view>
  69. <view style="font-size: 30rpx;">空调异常</view>
  70. <view style="text-align: center;">{{deviceArr.Ammeter}}</view>
  71. </view>
  72. <view>
  73. <view style="font-size: 30rpx;">水表异常</view>
  74. <view style="text-align: center;">{{deviceArr.WaterMeter}}</view>
  75. </view>
  76. <view>
  77. <view style="font-size: 30rpx;">电表异常</view>
  78. <view style="text-align: center;">{{deviceArr.Relay}}</view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <view class="arrears">
  84. <view class="pending_middle">
  85. <view class="all">
  86. <view class="work">
  87. <span style="font-size: 30rpx;">欠费待收</span>
  88. </view>
  89. <view class="processing">
  90. <view class="immediately" @click="Immediatecollection">
  91. <span style="font-size: 25rpx; color: #5c8fff; ">立即催收</span>
  92. <u-icon name="arrow-right" color="#5c8fff" size="16rpx"></u-icon>
  93. </view>
  94. </view>
  95. </view>
  96. <t-table style="background-color: #fff;margin-top: 10rpx;">
  97. <t-tr>
  98. <t-th>欠费类型</t-th>
  99. <t-th>欠费租户数</t-th>
  100. <t-th>累计欠费(元)</t-th>
  101. </t-tr>
  102. <t-tr v-for="item in tableList" :key="item.name">
  103. <t-td>{{ item.name }}</t-td>
  104. <t-td>{{ item.tenant }}</t-td>
  105. <t-td>{{ item.arrears }}</t-td>
  106. </t-tr>
  107. </t-table>
  108. </view>
  109. </view>
  110. </view>
  111. </template>
  112. <script>
  113. import tTable from '@/components/t-table/t-table.vue';
  114. import tTh from '@/components/t-table/t-th.vue';
  115. import tTr from '@/components/t-table/t-tr.vue';
  116. import tTd from '@/components/t-table/t-td.vue';
  117. export default {
  118. components: {
  119. tTable,
  120. tTh,
  121. tTr,
  122. tTd
  123. },
  124. data() {
  125. return {
  126. tableList: [
  127. ],
  128. tabbardata: 0,
  129. workList: {}, //工单代办
  130. deviceArr: {}, //设备异常数据
  131. }
  132. },
  133. onLoad() {
  134. this.getalldata();
  135. },
  136. methods: {
  137. getalldata() {
  138. this.$api.get('/home/homedata', {})
  139. .then(res => {
  140. //console.log('111111111111111111', res.data.data)
  141. this.workList = res.data.data.workOrder;
  142. this.deviceArr = res.data.data.equip.maps;
  143. this.tableList= res.data.data.billPaymentList.map(item => {
  144. let json = {};
  145. if(item.payType=='Water'){
  146. item.payType='水费'
  147. }else if(item.payType=='Elec'){
  148. item.payType='电费'
  149. }else if(item.payType=='PropertyFee'){
  150. item.payType='物业费'
  151. }
  152. json.name = item.payType;
  153. json.tenant = item.arrearageNum ;
  154. json.arrears = item.arrearageAmount ;
  155. return json
  156. })
  157. })
  158. },
  159. Immediatecollection() {
  160. uni.navigateTo({
  161. url: '/pages/index/Immediatecollection/Immediatecollection'
  162. })
  163. },
  164. Workordertodone() {
  165. uni.navigateTo({
  166. url: '/pages/index/Workordertodone/Workordertodone'
  167. })
  168. },
  169. Onlinewarranty() {
  170. uni.navigateTo({
  171. url: '/pages/index/Onlinewarranty/Onlinewarranty'
  172. })
  173. },
  174. Inspectionrecord() {
  175. uni.navigateTo({
  176. url: '/pages/index/Inspectionrecord/Inspectionrecord'
  177. })
  178. },
  179. Withholdingrecord() {
  180. uni.navigateTo({
  181. url: '/pages/index/Withholdingrecord/Withholdingrecord'
  182. })
  183. },
  184. }
  185. }
  186. </script>
  187. <style lang="scss">
  188. * {
  189. margin: 0;
  190. padding: 0;
  191. list-style: none;
  192. text-decoration: none;
  193. }
  194. .Homepage_header {
  195. width: 750rpx;
  196. height: 200rpx;
  197. background-color: #5c8fff;
  198. border-radius: 0px 0px 16px 16px;
  199. position: relative;
  200. display: flex;
  201. align-items: center;
  202. justify-content: center;
  203. }
  204. .Homepage_suspension {
  205. width: 650rpx;
  206. height: 200rpx;
  207. background-color: #fff;
  208. display: flex;
  209. align-items: center;
  210. justify-content: space-between;
  211. position: absolute;
  212. top: 100rpx;
  213. }
  214. .Suspension {
  215. width: 650rpx;
  216. // height: 200rpx;
  217. display: flex;
  218. align-items: center;
  219. justify-content: space-around;
  220. }
  221. .pending {
  222. width: 750rpx;
  223. height: 350rpx;
  224. // background-color: #ccc;
  225. display: flex;
  226. align-items: center;
  227. justify-content: center;
  228. position: relative;
  229. top: 50rpx;
  230. }
  231. .pending_middle {
  232. width: 650rpx;
  233. // height: 100px;
  234. // background-color: #fff;
  235. }
  236. .all {
  237. width: 100%;
  238. display: flex;
  239. align-items: center;
  240. justify-content: space-between;
  241. }
  242. .work {
  243. // padding-left: 20rpx;
  244. // padding-top: 2rpx;
  245. }
  246. .wait {
  247. width: 650rpx;
  248. display: flex;
  249. align-items: center;
  250. background-color: #fff;
  251. justify-content: space-around;
  252. padding-top: 30rpx;
  253. text-align: center;
  254. line-height: 60rpx;
  255. margin-top: 10rpx;
  256. }
  257. .immediately {
  258. display: flex;
  259. // padding-top: 2rpx;
  260. }
  261. .equipment {
  262. width: 750rpx;
  263. // height: 200rpx;
  264. display: flex;
  265. align-items: center;
  266. justify-content: center;
  267. position: relative;
  268. top: 20rpx;
  269. }
  270. .arrears {
  271. // width: 750rpx;
  272. // height: 350rpx;
  273. display: flex;
  274. flex: 1;
  275. align-items: center;
  276. justify-content: center;
  277. position: relative;
  278. top: 50rpx;
  279. }
  280. .type {
  281. display: flex;
  282. align-items: center;
  283. justify-content: space-around;
  284. text-align: center;
  285. flex: 1;
  286. margin-top: 10rpx;
  287. font-size: 30rpx;
  288. }
  289. tr {
  290. background-color: #fff;
  291. }
  292. </style>