index.vue 16 KB

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