index.vue 8.3 KB

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