index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  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. <!-- 管理员界面 -->
  93. <view class="arrears" v-if="$has('app:ArrearstobeCollected')">
  94. <view class="pending_middle">
  95. <view class="all" v-if="$has('app:ImmediateCollection')">
  96. <view class="work">
  97. <span style="font-size: 30rpx;font-weight: bold;">欠费待收</span>
  98. </view>
  99. <view class="processing">
  100. <view class="immediately" @click="Immediatecollection">
  101. <span style="font-size: 25rpx; color: #5c8fff; ">立即催收</span>
  102. <u-icon name="arrow-right" color="#5c8fff" size="16rpx"></u-icon>
  103. </view>
  104. </view>
  105. </view>
  106. <t-table style="background-color: #fff;margin-top: 10rpx;">
  107. <t-tr>
  108. <t-th>欠费类型</t-th>
  109. <t-th>欠费租户数</t-th>
  110. <t-th>累计欠费(元)</t-th>
  111. </t-tr>
  112. <t-tr v-for="item in tableList" :key="item.name">
  113. <t-td>{{ item.name }}</t-td>
  114. <t-td>{{ item.tenant }}</t-td>
  115. <t-td>{{ item.arrears }}</t-td>
  116. </t-tr>
  117. </t-table>
  118. </view>
  119. </view>
  120. <!-- 租户界面 -->
  121. <view class="arrears" v-if="$has('app:BillPending')">
  122. <view class="pending_middle">
  123. <view class="all" v-if="$has('app:ImmediatePayment')">
  124. <view class="work">
  125. <span style="font-size: 30rpx;font-weight: bold;">账单待缴</span>
  126. </view>
  127. <view class="processing">
  128. <view class="immediately" @click="Immediatecollection">
  129. <span style="font-size: 25rpx; color: #5c8fff; ">立即缴费</span>
  130. <u-icon name="arrow-right" color="#5c8fff" size="16rpx"></u-icon>
  131. </view>
  132. </view>
  133. </view>
  134. <t-table style="background-color: #fff;margin-top: 10rpx;">
  135. <t-tr>
  136. <t-th>欠费类型</t-th>
  137. <t-th>本期待缴金额(元)</t-th>
  138. <t-th>累计待缴金额(元)</t-th>
  139. </t-tr>
  140. <t-tr v-for="item in tableList" :key="item.name">
  141. <t-td>{{ item.name }}</t-td>
  142. <t-td>{{ item.currentAmount }}</t-td>
  143. <t-td>{{ item.cumulativeAmount }}</t-td>
  144. </t-tr>
  145. </t-table>
  146. </view>
  147. </view>
  148. </view>
  149. </template>
  150. <script>
  151. import tTable from '@/components/t-table/t-table.vue';
  152. import tTh from '@/components/t-table/t-th.vue';
  153. import tTr from '@/components/t-table/t-tr.vue';
  154. import tTd from '@/components/t-table/t-td.vue';
  155. export default {
  156. components: {
  157. tTable,
  158. tTh,
  159. tTr,
  160. tTd
  161. },
  162. data() {
  163. return {
  164. srcxianshang1: require('@/static/index/repair-online.svg'),
  165. srcxianshang2: require('@/static/index/check-review.svg'),
  166. srcxianshang3: require('@/static/index/reduce-record.svg'),
  167. tableList: [],
  168. tabbardata: 0,
  169. workList: {}, //工单代办
  170. deviceArr: {}, //设备异常数据
  171. getuserInfo:{},
  172. }
  173. },
  174. onLoad() {
  175. this.getalldata();
  176. this.getuserInfo = uni.getStorageSync('getuserInfo');
  177. console.log('111111111111111111',this.getuserInfo)
  178. },
  179. methods: {
  180. getalldata() {
  181. this.$api.get('/home/homedata', {})
  182. .then(res => {
  183. //console.log('111111111111111111', res.data.data)
  184. this.workList = res.data.data.workOrder;
  185. this.deviceArr = res.data.data.equip.maps;
  186. this.tableList = res.data.data.billPaymentList.map(item => {
  187. let json = {};
  188. if (item.payType == 'Water') {
  189. item.payType = '水费'
  190. } else if (item.payType == 'Elec') {
  191. item.payType = '电费'
  192. } else if (item.payType == 'PropertyFee') {
  193. item.payType = '物业费'
  194. }
  195. json.name = item.payType;
  196. json.tenant = item.arrearageNum;
  197. json.arrears = item.arrearageAmount;
  198. json.currentAmount = item.currentAmount;
  199. json.cumulativeAmount = item.cumulativeAmount;
  200. return json
  201. })
  202. })
  203. },
  204. Immediatecollection() {
  205. uni.navigateTo({
  206. url: '/pages/index/Immediatecollection/Immediatecollection'
  207. })
  208. },
  209. Workordertodone() {
  210. uni.navigateTo({
  211. url: '/pages/index/Workordertodone/Workordertodone'
  212. })
  213. },
  214. Onlinewarranty() {
  215. uni.navigateTo({
  216. url: '/pages/index/Onlinewarranty/Onlinewarranty'
  217. })
  218. },
  219. Inspectionrecord() {
  220. uni.navigateTo({
  221. url: '/pages/index/Inspectionrecord/Inspectionrecord'
  222. })
  223. },
  224. Withholdingrecord() {
  225. uni.navigateTo({
  226. url: '/pages/index/Withholdingrecord/Withholdingrecord'
  227. })
  228. },
  229. }
  230. }
  231. </script>
  232. <style lang="scss">
  233. * {
  234. margin: 0;
  235. padding: 0;
  236. list-style: none;
  237. text-decoration: none;
  238. }
  239. .online {
  240. display: flex;
  241. flex-direction: column;
  242. justify-content: center;
  243. align-items: center;
  244. }
  245. .Homepage_header {
  246. width: 750rpx;
  247. height: 200rpx;
  248. background-color: #5c8fff;
  249. border-radius: 0px 0px 16px 16px;
  250. position: relative;
  251. display: flex;
  252. align-items: center;
  253. justify-content: center;
  254. }
  255. .kongbai{
  256. height: 100rpx;
  257. width: 750rpx;
  258. }
  259. .Homepage_suspension {
  260. width: 690rpx;
  261. height: 200rpx;
  262. background-color: #fff;
  263. display: flex;
  264. align-items: center;
  265. justify-content: space-between;
  266. position: absolute;
  267. top: 100rpx;
  268. border-radius: 10rpx;
  269. }
  270. .Suspension {
  271. width: 690rpx;
  272. // height: 200rpx;
  273. display: flex;
  274. align-items: center;
  275. justify-content: space-around;
  276. }
  277. .pending {
  278. width: 750rpx;
  279. height: 350rpx;
  280. // background-color: #ccc;
  281. display: flex;
  282. align-items: center;
  283. justify-content: center;
  284. position: relative;
  285. top: 50rpx;
  286. }
  287. .pending_middle {
  288. width: 690rpx;
  289. // height: 100px;
  290. // background-color: #fff;
  291. }
  292. .all {
  293. width: 100%;
  294. display: flex;
  295. align-items: center;
  296. justify-content: space-between;
  297. }
  298. .work {
  299. // padding-left: 20rpx;
  300. // padding-top: 2rpx;
  301. }
  302. .wait {
  303. width: 690rpx;
  304. display: flex;
  305. align-items: center;
  306. background-color: #fff;
  307. justify-content: space-around;
  308. padding-top: 30rpx;
  309. text-align: center;
  310. height: 140rpx;
  311. margin-top: 10rpx;
  312. border-radius: 10rpx;
  313. }
  314. .immediately {
  315. display: flex;
  316. // padding-top: 2rpx;
  317. }
  318. .equipment {
  319. width: 750rpx;
  320. // height: 200rpx;
  321. display: flex;
  322. align-items: center;
  323. justify-content: center;
  324. position: relative;
  325. top: 20rpx;
  326. }
  327. .arrears {
  328. // width: 750rpx;
  329. // height: 350rpx;
  330. display: flex;
  331. flex: 1;
  332. align-items: center;
  333. justify-content: center;
  334. position: relative;
  335. top: 50rpx;
  336. }
  337. .type {
  338. display: flex;
  339. align-items: center;
  340. justify-content: space-around;
  341. text-align: center;
  342. flex: 1;
  343. margin-top: 10rpx;
  344. font-size: 30rpx;
  345. }
  346. tr {
  347. background-color: #fff;
  348. }
  349. </style>