index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  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"></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. getalldata() {
  309. this.$api.get('/home/homedata', {})
  310. .then(res => {
  311. uni.stopPullDownRefresh() //刷新数据之后停止刷新效果
  312. this.workList = res.data.data.workOrder;
  313. this.abnormalNum = res.data.data.equip.abnormalNum;
  314. this.deviceArr = res.data.data.equip.maps;
  315. this.inspectionInfoList = res.data.data.inspectionInfo;
  316. this.tableList = res.data.data.billPaymentList.map(item => {
  317. let json = {};
  318. if (item.payType == 'Water') {
  319. item.payType = '水费'
  320. } else if (item.payType == 'Elec') {
  321. item.payType = '电费'
  322. } else if (item.payType == 'PropertyFee') {
  323. item.payType = '物业费'
  324. }
  325. json.name = item.payType;
  326. json.tenant = item.arrearageNum;
  327. json.arrears = item.arrearageAmount;
  328. json.currentAmount = item.currentAmount;
  329. json.cumulativeAmount = item.cumulativeAmount;
  330. return json
  331. })
  332. })
  333. },
  334. BillPending() {
  335. uni.navigateTo({
  336. url: '/pages/index/BillPending/BillPending?info=' + encodeURIComponent(JSON.stringify(this
  337. .getuserInfo))
  338. });
  339. },
  340. Immediatecollection() {
  341. uni.navigateTo({
  342. url: '/pages/index/Immediatecollection/Immediatecollection'
  343. })
  344. },
  345. Workordertodone() {
  346. uni.navigateTo({
  347. url: '/pages/index/Workordertodone/Workordertodone'
  348. })
  349. },
  350. EquipmentException() {
  351. uni.navigateTo({
  352. url: '/pages/index/EquipmentException/EquipmentException'
  353. })
  354. },
  355. Onlinewarranty() {
  356. uni.navigateTo({
  357. url: '/pages/index/Onlinewarranty/Onlinewarranty'
  358. })
  359. },
  360. Immediateinspection() {
  361. uni.navigateTo({
  362. url: '/pages/index/Immediateinspection/Immediateinspection'
  363. })
  364. },
  365. Inspectionrecord() {
  366. uni.navigateTo({
  367. url: '/pages/index/Inspectionrecord/Inspectionrecord'
  368. })
  369. },
  370. Withholdingrecord() {
  371. uni.navigateTo({
  372. url: '/pages/index/Withholdingrecord/Withholdingrecord'
  373. })
  374. },
  375. }
  376. }
  377. </script>
  378. <style lang="scss">
  379. .toptemplate {
  380. height: 280rpx;
  381. border-radius: 0 0 32rpx 32rpx;
  382. }
  383. * {
  384. margin: 0;
  385. padding: 0;
  386. list-style: none;
  387. text-decoration: none;
  388. }
  389. .watermarkCans {
  390. width: 250rpx;
  391. height: 250rpx;
  392. position: absolute;
  393. z-index: -1;
  394. }
  395. .u-page__item__slot-icon {
  396. width: 40rpx;
  397. height: 40rpx;
  398. }
  399. .work {
  400. position: relative;
  401. margin-bottom: 20rpx;
  402. span {
  403. font-size: 28rpx;
  404. position: relative;
  405. z-index: 2;
  406. }
  407. .bootomBg {
  408. display: inline-block;
  409. background: linear-gradient(to right, #FFD263, #ffffff);
  410. height: 8px;
  411. width: 56px;
  412. position: absolute;
  413. left: 0;
  414. bottom: -4px;
  415. border-radius: 5px;
  416. z-index: 0;
  417. }
  418. }
  419. .online {
  420. display: flex;
  421. flex-direction: column;
  422. justify-content: center;
  423. align-items: center;
  424. }
  425. .Homepage_header {
  426. width: 750rpx;
  427. height: 200rpx;
  428. background-color: #5c8fff;
  429. border-radius: 0px 0px 16px 16px;
  430. position: fixed;
  431. top: 0px;
  432. }
  433. .kongbai {
  434. height: 100rpx;
  435. width: 750rpx;
  436. }
  437. .Homepage_suspension {
  438. width: 690rpx;
  439. height: 200rpx;
  440. margin: -120rpx auto 28rpx;
  441. background-color: #fff;
  442. display: flex;
  443. align-items: center;
  444. justify-content: space-between;
  445. border-radius: 10rpx;
  446. }
  447. .Suspension {
  448. width: 690rpx;
  449. // height: 200rpx;
  450. display: flex;
  451. align-items: center;
  452. justify-content: space-around;
  453. }
  454. .pending {
  455. width: 750rpx;
  456. // background-color: #ccc;
  457. display: flex;
  458. align-items: center;
  459. justify-content: center;
  460. position: relative;
  461. margin-bottom: 28rpx;
  462. }
  463. .pending_middle {
  464. width: 690rpx;
  465. // height: 100px;
  466. // background-color: #fff;
  467. }
  468. .all {
  469. width: 100%;
  470. display: flex;
  471. align-items: center;
  472. justify-content: space-between;
  473. }
  474. .wait {
  475. width: 690rpx;
  476. display: flex;
  477. align-items: center;
  478. background-color: #fff;
  479. justify-content: space-around;
  480. text-align: center;
  481. height: 150rpx;
  482. border-radius: 10rpx;
  483. }
  484. .immediately {
  485. display: flex;
  486. // padding-top: 2rpx;
  487. }
  488. .equipment {
  489. width: 750rpx;
  490. display: flex;
  491. align-items: center;
  492. justify-content: center;
  493. position: relative;
  494. margin-bottom: 28rpx;
  495. }
  496. .arrears {
  497. // width: 750rpx;
  498. // height: 350rpx;
  499. display: flex;
  500. flex: 1;
  501. align-items: center;
  502. justify-content: center;
  503. position: relative;
  504. margin-bottom: 28rpx;
  505. }
  506. .arrears1 {
  507. // width: 750rpx;
  508. // height: 350rpx;
  509. display: flex;
  510. flex: 1;
  511. align-items: center;
  512. justify-content: center;
  513. position: relative;
  514. margin-bottom: 28rpx;
  515. }
  516. .type {
  517. display: flex;
  518. align-items: center;
  519. justify-content: space-around;
  520. text-align: center;
  521. flex: 1;
  522. margin-top: 10rpx;
  523. font-size: 30rpx;
  524. }
  525. tr {
  526. background-color: #fff;
  527. }
  528. .tabberall {
  529. position: relative;
  530. z-index: 3;
  531. }
  532. .tableBox{
  533. padding:0 32rpx 20rpx 32rpx;
  534. background-color: #fff;
  535. border-radius: 8rpx;
  536. .table{
  537. height: 80rpx;
  538. &.t1{
  539. border-top:1px solid #eee;
  540. height:90rpx
  541. }
  542. *{text-align: center;}
  543. }
  544. }
  545. </style>