index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. <template>
  2. <view class="content">
  3. <u-cell-group class="toptemplate">
  4. <view style="height: 20px;"></view>
  5. <u-cell title="电商园四期—B座" :border="false">
  6. <u-icon slot="icon" size="40" color="#fff" name="map"></u-icon>
  7. <u-icon slot="right-icon" size="40" color="#fff" name="account" @click="toUser()"></u-icon>
  8. </u-cell>
  9. </u-cell-group>
  10. <view class="Homepage_suspension"
  11. v-if="$has('app:InspectionRecord')||$has('app:OnlineReport')||$has('app:WithholdingRecord')">
  12. <view class="Suspension">
  13. <view class="online" @click="Onlinewarranty" v-if="$has('app:OnlineReport')">
  14. <view>
  15. <u--image mode="widthFix" :src="srcxianshang1" width="80rpx" height="80rpx"></u--image>
  16. </view>
  17. <view style="font-size: 28rpx;color: #697081;">线上报修</view>
  18. </view>
  19. <view class="online" @click="Inspectionrecord" v-if="$has('app:InspectionRecord')">
  20. <view>
  21. <u--image mode="widthFix" :src="srcxianshang2" width="80rpx" height="80rpx"></u--image>
  22. </view>
  23. <view style="font-size: 28rpx;color: #697081;">巡检记录</view>
  24. </view>
  25. <view class="online" @click="Withholdingrecord" v-if="$has('app:WithholdingRecord')">
  26. <view>
  27. <u--image mode="widthFix" :src="srcxianshang3" width="80rpx" height="80rpx"></u--image>
  28. </view>
  29. <view style="font-size: 28rpx;color: #697081;">扣缴记录</view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="pending" v-if="$has('app:RealtimeInspection')">
  34. <view class="pending_middle">
  35. <view class="all">
  36. <view class="work">
  37. <span>实时巡检</span>
  38. <text class="bootomBg"></text>
  39. </view>
  40. <view class="processing" v-if="$has('app:ImmediateInspection')">
  41. <view class="immediately" @click="Immediateinspection">
  42. <span style="font-size: 25rpx; color: #5c8fff; ">立即巡检</span>
  43. <u-icon name="arrow-right" color="#5c8fff" size="16rpx"></u-icon>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="wait">
  48. <view>
  49. <view style="font-size: 24rpx;color: #697081;">今日待巡检</view>
  50. <view style="text-align: center;font-size: 32rpx;color: #0C1935;padding-top: 15rpx;">
  51. {{inspectionInfoList.todayTotalNum}}
  52. </view>
  53. </view>
  54. <view>
  55. <view style="font-size: 24rpx;color: #697081;">今日已巡检</view>
  56. <view style="text-align: center;font-size: 32rpx;color: #0C1935;padding-top: 15rpx;">
  57. {{inspectionInfoList.todayNum}}
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="pending" v-if="$has('app:Tobeassigned')||$has('app:Toberepaired')||$has('app:hasrepaired')">
  64. <view class="pending_middle">
  65. <view class="all">
  66. <view class="work">
  67. <span>工单待办</span>
  68. <text class="bootomBg"></text>
  69. </view>
  70. <view class="processing" v-if="$has('app:WorkorderTobeDone')">
  71. <view class="immediately" @click="Workordertodone">
  72. <span style="font-size: 25rpx; color: #5c8fff; ">立即处理</span>
  73. <u-icon name="arrow-right" color="#5c8fff" size="16rpx"></u-icon>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="wait">
  78. <view v-if="$has('app:Tobeassigned')">
  79. <view style="font-size: 24rpx;color: #697081;">待指派</view>
  80. <view style="text-align: center;font-size: 32rpx;color: #0C1935;padding-top: 15rpx;">
  81. {{workList[1]}}
  82. </view>
  83. </view>
  84. <view v-if="$has('app:Toberepaired')">
  85. <view style="font-size: 24rpx;color: #697081;">待维修</view>
  86. <view style="text-align: center;font-size: 32rpx;color: #0C1935;padding-top: 15rpx;">
  87. {{workList[2]}}
  88. </view>
  89. </view>
  90. <view v-if="$has('app:hasrepaired')">
  91. <view style="font-size: 24rpx;color: #697081;">已维修</view>
  92. <view style="text-align: center;font-size: 32rpx;color: #0C1935;padding-top: 15rpx;">
  93. {{workList[3]}}
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="equipment" v-if="$has('app:EquipmentException')">
  100. <view class="pending_middle">
  101. <view class="all">
  102. <view class="work">
  103. <span>设备异常</span>
  104. <text class="bootomBg"></text>
  105. </view>
  106. <view class="processing" v-if="$has('app:LookatImmediately')">
  107. <view class="immediately" @click="EquipmentException">
  108. <span style="font-size: 25rpx; color: #5c8fff; ">立即查看</span>
  109. <u-icon name="arrow-right" color="#5c8fff" size="16rpx"></u-icon>
  110. </view>
  111. </view>
  112. </view>
  113. <view class="wait">
  114. <view>
  115. <view style="font-size: 24rpx;color: #697081;">异常总数</view>
  116. <view style="text-align: center;font-size: 32rpx;color: #FA5555;padding-top: 15rpx;">
  117. {{abnormalNum}}
  118. </view>
  119. </view>
  120. <view>
  121. <view style="font-size: 24rpx;color: #697081;">空调异常</view>
  122. <view style="text-align: center;font-size: 32rpx;color: #FA5555;padding-top: 15rpx;">
  123. {{deviceArr.AirConditioner}}
  124. </view>
  125. </view>
  126. <view>
  127. <view style="font-size: 24rpx;color: #697081;">水表异常</view>
  128. <view style="text-align: center;font-size: 32rpx;color: #FA5555;padding-top: 15rpx;">
  129. {{deviceArr.WaterMeter}}
  130. </view>
  131. </view>
  132. <view>
  133. <view style="font-size: 24rpx;color: #697081;">电表异常</view>
  134. <view style="text-align: center;font-size: 32rpx;color: #FA5555;padding-top: 15rpx;">
  135. {{deviceArr.Relay}}
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. <!-- 管理员界面 -->
  142. <view class="arrears" v-if="$has('app:ArrearstobeCollected')">
  143. <view class="pending_middle">
  144. <view class="all">
  145. <view class="work">
  146. <span>欠费待收</span>
  147. <text class="bootomBg"></text>
  148. </view>
  149. <view class="processing" v-if="$has('app:ImmediateCollection')">
  150. <view class="immediately" @click="Immediatecollection">
  151. <span style="font-size: 25rpx; color: #5c8fff; ">立即催收</span>
  152. <u-icon name="arrow-right" color="#5c8fff" size="16rpx"></u-icon>
  153. </view>
  154. </view>
  155. </view>
  156. <view class="tableBox">
  157. <u-row class="table">
  158. <u-col span="4">
  159. <text>欠费类型</text>
  160. </u-col>
  161. <u-col span="4">
  162. <text>欠费租户数</text>
  163. </u-col>
  164. <u-col span="4">
  165. <text>累计欠费(元)</text>
  166. </u-col>
  167. </u-row>
  168. <u-row v-for="item in tableList" :key="item.name" class="table t1">
  169. <u-col span="4">
  170. <text>{{item.name}}</text>
  171. </u-col>
  172. <u-col span="4">
  173. <text>{{item.tenant}}</text>
  174. </u-col>
  175. <u-col span="4">
  176. <text>{{item.tenant}}</text>
  177. </u-col>
  178. </u-row>
  179. </view>
  180. <!-- <t-table style="background-color: #fff;margin-top: 10rpx;">
  181. <t-tr>
  182. <t-th>欠费类型</t-th>
  183. <t-th></t-th>
  184. <t-th>累计欠费(元)</t-th>
  185. </t-tr>
  186. <t-tr v-for="item in tableList" :key="item.name">
  187. <t-td>{{ item.name }}</t-td>
  188. <t-td>{{ item.tenant }}</t-td>
  189. <t-td>{{ item.arrears }}</t-td>
  190. </t-tr>
  191. </t-table> -->
  192. </view>
  193. </view>
  194. <!-- 租户界面 -->
  195. <view class="arrears1" v-if="$has('app:BillPending')">
  196. <view class="pending_middle">
  197. <view class="all">
  198. <view class="work">
  199. <span>账单待缴</span>
  200. <text class="bootomBg"></text>
  201. </view>
  202. <view class="processing" v-if="$has('app:ImmediatePayment')">
  203. <view class="immediately" @click="BillPending">
  204. <span style="font-size: 25rpx; color: #5c8fff; ">立即缴费</span>
  205. <u-icon name="arrow-right" color="#5c8fff" size="16rpx"></u-icon>
  206. </view>
  207. </view>
  208. </view>
  209. <view class="tableBox">
  210. <u-row class="table">
  211. <u-col span="4">
  212. <text>欠费类型</text>
  213. </u-col>
  214. <u-col span="4">
  215. <text>本期待缴金额(元)</text>
  216. </u-col>
  217. <u-col span="4">
  218. <text>累计待缴金额(元)</text>
  219. </u-col>
  220. </u-row>
  221. <u-row v-for="item in tableList" :key="item.name" class="table t1">
  222. <u-col span="4">
  223. <text>{{item.name}}</text>
  224. </u-col>
  225. <u-col span="4">
  226. <text>{{item.currentAmount}}</text>
  227. </u-col>
  228. <u-col span="4">
  229. <text>{{item.cumulativeAmount}}</text>
  230. </u-col>
  231. </u-row>
  232. </view>
  233. </view>
  234. </view>
  235. <u-tabbar class="tabberall" :value="value1" :fixed="true" :placeholder="true" @change="name => value1 = name"
  236. :safeAreaInsetBottom="true">
  237. <u-tabbar-item text="首页" @click="click1">
  238. <image class="u-page__item__slot-icon" slot="active-icon" :src="tabimg1"></image>
  239. <image class="u-page__item__slot-icon" slot="inactive-icon" :src="tabimg2"></image>
  240. </u-tabbar-item>
  241. <u-tabbar-item v-if="$has('app:worktable')" text="工作台" @click="click2">
  242. <image class="u-page__item__slot-icon" slot="active-icon" :src="tabimg3"></image>
  243. <image class="u-page__item__slot-icon" slot="inactive-icon" :src="tabimg4"></image>
  244. </u-tabbar-item>
  245. <u-tabbar-item text="我的" @click="click3">
  246. <image class="u-page__item__slot-icon" slot="active-icon" :src="tabimg5"></image>
  247. <image class="u-page__item__slot-icon" slot="inactive-icon" :src="tabimg6"></image>
  248. </u-tabbar-item>
  249. </u-tabbar>
  250. <!-- 水印 -->
  251. <!-- <canvas v-if="showCanvas" class="watermarkCans" canvas-id="watermarkCanvas"></canvas> -->
  252. </view>
  253. </template>
  254. <script>
  255. import watermark from '@/js_sdk/ly-watermark/commons/watermark.js'
  256. export default {
  257. // mixins: [watermark], // 水印
  258. components: {
  259. },
  260. data() {
  261. return {
  262. abnormalNum: 0,
  263. canvasText: '',
  264. value1: 0,
  265. tabimg1: require('@/static/tab/h2.png'),
  266. tabimg2: require('@/static/tab/h1.png'),
  267. tabimg3: require('@/static/tab/w2.png'),
  268. tabimg4: require('@/static/tab/w1.png'),
  269. tabimg5: require('@/static/tab/y2.png'),
  270. tabimg6: require('@/static/tab/y1.png'),
  271. srcxianshang1: require('@/static/index/repair-online.svg'),
  272. srcxianshang2: require('@/static/index/check-review.svg'),
  273. srcxianshang3: require('@/static/index/reduce-record.svg'),
  274. tableList: [],
  275. tabbardata: 0,
  276. workList: {}, //工单代办
  277. deviceArr: {}, //设备异常数据
  278. getuserInfo: {},
  279. inspectionInfoList: {},
  280. }
  281. },
  282. onLoad() {
  283. this.getalldata();
  284. this.getuserInfo = uni.getStorageSync('getuserInfo');
  285. this.canvasText = this.getuserInfo.realName;
  286. },
  287. mounted() {
  288. },
  289. onPullDownRefresh() {
  290. this.getalldata();
  291. },
  292. methods: {
  293. click1() {
  294. uni.navigateTo({
  295. url: '/pages/index/index'
  296. })
  297. },
  298. click2() {
  299. uni.navigateTo({
  300. url: '/pages/Workorder/Workorder'
  301. })
  302. },
  303. click3() {
  304. uni.navigateTo({
  305. url: '/pages/my/my'
  306. })
  307. },
  308. toUser(){
  309. uni.navigateTo({
  310. url:'/pages/my/Personalinformation/Personalinformation'
  311. })
  312. },
  313. getalldata() {
  314. this.$api.get('/home/homedata', {})
  315. .then(res => {
  316. uni.stopPullDownRefresh() //刷新数据之后停止刷新效果
  317. this.workList = res.data.data.workOrder;
  318. this.abnormalNum = res.data.data.equip.abnormalNum;
  319. this.deviceArr = res.data.data.equip.maps;
  320. this.inspectionInfoList = res.data.data.inspectionInfo;
  321. this.tableList = res.data.data.billPaymentList.map(item => {
  322. let json = {};
  323. if (item.payType == 'Water') {
  324. item.payType = '水费'
  325. } else if (item.payType == 'Elec') {
  326. item.payType = '电费'
  327. } else if (item.payType == 'PropertyFee') {
  328. item.payType = '物业费'
  329. }
  330. json.name = item.payType;
  331. json.tenant = item.arrearageNum;
  332. json.arrears = item.arrearageAmount;
  333. json.currentAmount = item.currentAmount;
  334. json.cumulativeAmount = item.cumulativeAmount;
  335. return json
  336. })
  337. })
  338. },
  339. BillPending() {
  340. uni.navigateTo({
  341. url: '/pages/index/BillPending/BillPending?info=' + encodeURIComponent(JSON.stringify(this
  342. .getuserInfo))
  343. });
  344. },
  345. Immediatecollection() {
  346. uni.navigateTo({
  347. url: '/pages/index/Immediatecollection/Immediatecollection'
  348. })
  349. },
  350. Workordertodone() {
  351. uni.navigateTo({
  352. url: '/pages/index/Workordertodone/Workordertodone'
  353. })
  354. },
  355. EquipmentException() {
  356. uni.navigateTo({
  357. url: '/pages/index/EquipmentException/EquipmentException'
  358. })
  359. },
  360. Onlinewarranty() {
  361. uni.navigateTo({
  362. url: '/pages/index/Onlinewarranty/Onlinewarranty'
  363. })
  364. },
  365. Immediateinspection() {
  366. uni.navigateTo({
  367. url: '/pages/index/Immediateinspection/Immediateinspection'
  368. })
  369. },
  370. Inspectionrecord() {
  371. uni.navigateTo({
  372. url: '/pages/index/Inspectionrecord/Inspectionrecord'
  373. })
  374. },
  375. Withholdingrecord() {
  376. uni.navigateTo({
  377. url: '/pages/index/Withholdingrecord/Withholdingrecord'
  378. })
  379. },
  380. }
  381. }
  382. </script>
  383. <style lang="scss">
  384. .toptemplate {
  385. height: 280rpx;
  386. border-radius: 0 0 32rpx 32rpx;
  387. }
  388. * {
  389. margin: 0;
  390. padding: 0;
  391. list-style: none;
  392. text-decoration: none;
  393. }
  394. .watermarkCans {
  395. width: 250rpx;
  396. height: 250rpx;
  397. position: absolute;
  398. z-index: -1;
  399. }
  400. .u-page__item__slot-icon {
  401. width: 40rpx;
  402. height: 40rpx;
  403. }
  404. .work {
  405. position: relative;
  406. margin-bottom: 20rpx;
  407. span {
  408. font-size: 28rpx;
  409. position: relative;
  410. z-index: 2;
  411. }
  412. .bootomBg {
  413. display: inline-block;
  414. background: linear-gradient(to right, #FFD263, #ffffff);
  415. height: 8px;
  416. width: 56px;
  417. position: absolute;
  418. left: 0;
  419. bottom: -4px;
  420. border-radius: 5px;
  421. z-index: 0;
  422. }
  423. }
  424. .online {
  425. display: flex;
  426. flex-direction: column;
  427. justify-content: center;
  428. align-items: center;
  429. }
  430. .Homepage_header {
  431. width: 750rpx;
  432. height: 200rpx;
  433. background-color: #5c8fff;
  434. border-radius: 0px 0px 16px 16px;
  435. position: fixed;
  436. top: 0px;
  437. }
  438. .kongbai {
  439. height: 100rpx;
  440. width: 750rpx;
  441. }
  442. .Homepage_suspension {
  443. width: 690rpx;
  444. height: 200rpx;
  445. margin: -120rpx auto 28rpx;
  446. background-color: #fff;
  447. display: flex;
  448. align-items: center;
  449. justify-content: space-between;
  450. border-radius: 10rpx;
  451. }
  452. .Suspension {
  453. width: 690rpx;
  454. // height: 200rpx;
  455. display: flex;
  456. align-items: center;
  457. justify-content: space-around;
  458. }
  459. .pending {
  460. width: 750rpx;
  461. // background-color: #ccc;
  462. display: flex;
  463. align-items: center;
  464. justify-content: center;
  465. position: relative;
  466. margin-bottom: 28rpx;
  467. }
  468. .pending_middle {
  469. width: 690rpx;
  470. // height: 100px;
  471. // background-color: #fff;
  472. }
  473. .all {
  474. width: 100%;
  475. display: flex;
  476. align-items: center;
  477. justify-content: space-between;
  478. }
  479. .wait {
  480. width: 690rpx;
  481. display: flex;
  482. align-items: center;
  483. background-color: #fff;
  484. justify-content: space-around;
  485. text-align: center;
  486. height: 150rpx;
  487. border-radius: 10rpx;
  488. }
  489. .immediately {
  490. display: flex;
  491. // padding-top: 2rpx;
  492. }
  493. .equipment {
  494. width: 750rpx;
  495. display: flex;
  496. align-items: center;
  497. justify-content: center;
  498. position: relative;
  499. margin-bottom: 28rpx;
  500. }
  501. .arrears {
  502. // width: 750rpx;
  503. // height: 350rpx;
  504. display: flex;
  505. flex: 1;
  506. align-items: center;
  507. justify-content: center;
  508. position: relative;
  509. margin-bottom: 28rpx;
  510. }
  511. .arrears1 {
  512. // width: 750rpx;
  513. // height: 350rpx;
  514. display: flex;
  515. flex: 1;
  516. align-items: center;
  517. justify-content: center;
  518. position: relative;
  519. margin-bottom: 28rpx;
  520. }
  521. .type {
  522. display: flex;
  523. align-items: center;
  524. justify-content: space-around;
  525. text-align: center;
  526. flex: 1;
  527. margin-top: 10rpx;
  528. font-size: 30rpx;
  529. }
  530. tr {
  531. background-color: #fff;
  532. }
  533. .tabberall {
  534. position: relative;
  535. z-index: 3;
  536. }
  537. .tableBox{
  538. // padding:0 32rpx 20rpx 32rpx;
  539. background-color: #fff;
  540. border-radius: 8rpx;
  541. .table{
  542. height: 80rpx;
  543. &.t1{
  544. border-top:1px solid #eee;
  545. height:90rpx
  546. }
  547. *{text-align: center;}
  548. }
  549. }
  550. </style>