index.vue 12 KB

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