index.vue 8.9 KB

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