| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051 |
- <!--
- * @Title:
- * @Description: 首页
- * @Author: swp
- * @Date: 2022-08-24 10:49:21
- * @LastEditors:
- * @LastEditTime: 2022-08-24 10:49:21
- -->
- <template>
- <view class="container">
- <!-- 导航栏 #3F9EFF-->
- <uni-nav-bar :fixed="true" backgroundColor="#3F9EFF" statusBar="false" height="75px">
- <block slot="left">
- <view style="display: flex;flex-direction: column;justify-content: center;">
- <image src="/static/images/logo_start.png" class="logo" mode="widthFix"></image>
- </view>
- </block>
- <view style="display: flex;flex:1,justify-content: center;align-items: center;">
- <text style="color: #ffffff; font-size: 1rem;font-family: Microsoft YaHei;">{{title}}</text>
- </view>
- <block slot="right">
- <view style="margin-right:20rpx" @click="onNoticeMoreClick">
- <uni-badge class="uni-badge-left-margin" absolute="rightTop" :is-dot="noticeDot" :text="noticeValue"
- size="small">
- <uni-icons class="input-uni-icon" type="notification" size="24" color="#FFFFFF" />
- </uni-badge>
- </view>
- </block>
- </uni-nav-bar>
- <!-- 头部按钮 -->
- <view class="nav">
- <u-grid :col="4" :border="false">
- <u-grid-item v-if="navButtonIndex[index]" bg-color="transparent" v-for="(item, index) in navButton"
- :key="index">
- <navigator v-if="item.badge" :url="item.url" hover-class="none" class="nav-item"
- open-type="navigate">
- <uni-badge class="uni-badge-left-margin" absolute="rightTop" :text="item.value" size="small">
- <image :src="item.img" mode="widthFix" class="nav-item-img"></image>
- </uni-badge>
- <view style="font-size: 0.7rem;font-weight: bold;">{{ item.name }}</view>
- </navigator>
- <navigator v-else :url="item.url" hover-class="none" class="nav-item" open-type="navigate">
- <image :src="item.img" mode="widthFix" class="nav-item-img"></image>
- <view style="font-size: 0.7rem;font-weight: bold;">{{ item.name }}</view>
- </navigator>
- </u-grid-item>
- </u-grid>
- </view>
- <!-- 新任务 -->
- <uni-section v-if="permission.companyServciePerson" title="新任务" titleColor="#5470c6" titleFontSize="0.7rem"
- :subTitle="realData.newCheckOrderCount">
- <template v-slot:right>
- <view v-if="loadMoreStatus === 'more'" class="line">
- <view class="block">
- <uni-icons class="input-uni-icon" type="more-filled" size="18" color="skyblue" />
- </view>
- <view class="block">
- <text style="margin-left: 2px;font-size:0.7rem;color:grey;"
- @click="onMoreUncomfireCheckOrderClick()">查看更多</text>
- </view>
- </view>
- <view v-else-if="loadMoreStatus === 'noMore'" class="line">
- <view class="block">
- <text style="font-size:0.7rem;color:gray;">暂无数据</text>
- </view>
- </view>
- <view v-else class="line">
- <view class="block">
- <text style="font-size:0.7rem;color:gray;">已全部加载</text>
- </view>
- </view>
- </template>
- <template v-slot:decoration>
- <view class="decoration"></view>
- </template>
- <uni-list style="min-height: 40px;">
- <uni-list-item v-for="item in unconfirmOrderList" :key="item.id">
- <template v-slot:body>
- <view class="item-block">
- <uni-row>
- <uni-col :span="18">
- <view class="line">
- <view class="block">
- <uni-icons class="input-uni-icon" type="home" size="18" color="grey" />
- </view>
- <view class="block rtu-name">
- {{item.rtuName}}
- </view>
- <view class="block rtu-code">
- [{{item.rtuCode}}]
- </view>
- </view>
- </uni-col>
- <uni-col :span="6">
- <view class="line-end">
- <view class="block"
- style="width: 140px;height:28px;border-radius:7px;background-color:lightblue"
- @click="onOrderItemClick(item.id)">
- <view class="line-center">
- <view class="block">
- <uni-icons class="input-uni-icon" type="auth" size="16"
- color="coral" />
- </view>
- <view class="block">
- <text
- style="padding-left:2px;color:black;font-size:0.7rem">查看任务</text>
- </view>
- </view>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <view class="item-text-line">
- <uni-icons class="input-uni-icon" type="location" size="18" color="lightblue" />
- <text class="item-text">{{item.areaName}}</text>
- </view>
- <view class="item-text-line">
- <uni-icons class="input-uni-icon" type="compose" size="18" color="lightblue" />
- <text class="item-text" style="width: 60px;">备注:</text>
- <text class="item-text-ell">{{item.orderDesc}}</text>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </uni-section>
- <!-- 测站统计信息 -->
- <uni-section style="margin-bottom: 0px;" title="测站统计信息" titleColor="#5470c6" titleFontSize="0.7rem">
- <template v-slot:decoration>
- <view class="decoration"></view>
- </template>
- <view class="count-info-block">
- <uni-row>
- <uni-col :span="24">
- <view class="rtuCount">
- <view>
- <text class="name">测站数量:</text>
- </view>
- <view style="margin-left:10px;text-decoration-line: underline;"
- @click="onRtuManageViewClick">
- <text class="count">{{realData.rtus}}</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <uni-row style="margin-top: 4px;">
- <uni-col :span="24">
- <view class="warnRtuCount">
- <view>
- <text class="name">异常测站数量 :</text>
- </view>
- <view style="margin-left:10px;text-decoration-line: underline;"
- @click="onWarningRtuViewClick">
- <text class="count">{{realData.warningRtus}}</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- </view>
- </uni-section>
- <uni-section style="margin-bottom: 0px;" title="维修任务统计信息" titleColor="#5470c6" titleFontSize="0.7rem">
- <template v-slot:decoration>
- <view class="decoration"></view>
- </template>
- <view class="count-info-block">
- <uni-row>
- <uni-col :span="24">
- <view class="orderCount">
- <view>
- <text class="name">维修任务总数量:</text>
- </view>
- <view v-if="permission.companyServciePerson">
- <view v-if="realData.orderCount" style="margin-left:10px;">
- <text class="count">{{realData.orderCount}}</text>
- </view>
- </view>
- <view v-else>
- <view style="margin-left:10px;text-decoration-line: underline;"
- @click="onAllCheckOrderClick">
- <text class="count">{{realData.orderCount}}</text>
- </view>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <uni-row style="margin-top: 4px;">
- <uni-col :span="24">
- <view class="unconfirmOrderCount">
- <view>
- <text class="name">未确认维修任务数量:</text>
- </view>
- <view v-if="realData.unconfirmOrderCount"
- style="margin-left:10px;text-decoration-line: underline;"
- @click="onUncomfirecheckorderViewClick">
- <text class="count">{{realData.unconfirmOrderCount}}</text>
- </view>
- <view v-else style="margin-left:10px;text-decoration-line: underline;"
- @click="onUncomfirecheckorderViewClick">
- <text class="count">0</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <uni-row style="margin-top: 4px;">
- <uni-col :span="24">
- <view class="delayComfireOrders">
- <view>
- <text class="name">超时未确认维修任务数量:</text>
- </view>
- <view v-if="realData.delayComfireOrders"
- style="margin-left:10px;text-decoration-line: underline;"
- @click="onComfiredelaycheckorderClick">
- <text class="count">{{realData.delayComfireOrders}}</text>
- </view>
- <view v-else style="margin-left:10px;text-decoration-line: underline;"
- @click="onComfiredelaycheckorderClick">
- <text class="count">0</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <uni-row style="margin-top: 4px;">
- <uni-col :span="24">
- <view class="processOrderCount">
- <view>
- <text class="name">维修处理中任务数量:</text>
- </view>
- <view v-if="realData.processOrderCount"
- style="margin-left:10px;text-decoration-line: underline;"
- @click="onProcessCheckorderViewClick">
- <text class="count">{{realData.processOrderCount}}</text>
- </view>
- <view v-else style="margin-left:10px;text-decoration-line: underline;"
- @click="onProcessCheckorderViewClick">
- <text class="count">0</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <uni-row style="margin-top: 4px;">
- <uni-col :span="24">
- <view class="processOrderCount">
- <view>
- <text class="name">已处理任务数量:</text>
- </view>
- <view v-if="realData.reportOrder" style="margin-left:10px;text-decoration-line: underline;"
- @click="onReportCheckorderViewClick">
- <text class="count">{{realData.reportOrder}}</text>
- </view>
- <view v-else style="margin-left:10px;text-decoration-line: underline;"
- @click="onReportCheckorderViewClick">
- <text class="count">0</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- </view>
- </uni-section>
- <uni-section title="本年度设备巡检统计信息" titleColor="#5470c6" titleFontSize="0.7rem">
- <template v-slot:decoration>
- <view class="decoration"></view>
- </template>
- <view class="count-info-block">
- <uni-row>
- <uni-col :span="24">
- <view class="equipmentInspectionCount">
- <view>
- <text class="name">需巡检站点数量:</text>
- </view>
- <view style="margin-left: 10px;text-decoration-line: underline;"
- @click="onInspectionManageClick">
- <text class="count">{{realData.equipmentInspectionCount}}</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <uni-row style="margin-top: 4px;">
- <uni-col :span="24">
- <view class="equipmentInspectionBeforeRainCount">
- <view>
- <text class="name">汛前已巡检设备数量:</text>
- </view>
- <view style="margin-left: 10px;text-decoration-line: underline;"
- @click="onFinishedBeforeRainInspectionClick">
- <text class="count">{{realData.equipmentInspectionBeforeRainReports}}</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <uni-row style="margin-top: 4px;">
- <uni-col :span="24">
- <view class="equipmentInspectionRainFirstCount">
- <view>
- <text class="name">汛中(一)已巡检设备数量:</text>
- </view>
- <view style="margin-left: 10px;text-decoration-line: underline;"
- @click="onFinishedRainFirstInspectionClick">
- <text class="count">{{realData.equipmentInspectionRainFirstReports}}</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <uni-row style="margin-top: 4px;">
- <uni-col :span="24">
- <view class="equipmentInspectionRainSecondCount">
- <view>
- <text class="name">汛中(二)已巡检设备数量:</text>
- </view>
- <view style="margin-left: 10px;text-decoration-line: underline;"
- @click="onFinishedRainSecondInspectionClick">
- <text class="count">{{realData.equipmentInspectionRainSecondReports}}</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- </view>
- </uni-section>
- <!-- 任务动态 -->
- <uni-section v-if="permission.admin || permission.orgAdmin || permission.companyAdmin"
- style="margin-bottom: 0px;" title="今日维修任务信息" titleColor="#5470c6" titleFontSize="0.7rem"
- :subTitle="realData.todayOrderProcessCount">
- <template v-slot:right>
- <view class="line-end">
- <uni-icons class="input-uni-icon" type="more-filled" size="18" color="skyblue" />
- <text style="margin-left: 4px;;font-size:0.7rem;color:grey;"
- @click="onMoreTodayCheckOrderReportClick()">查看更多</text>
- </view>
- </template>
- <template v-slot:decoration>
- <view class="decoration"></view>
- </template>
- <uni-list style="min-height: 40px;">
- <uni-list-item v-for="item in todayOrderProcessList" :key="item.id" showArrow clickable
- @click="onOrderReportItemClick(item.orderId)">
- <template v-slot:body>
- <view class="item-block">
- <view class="item-text-line">
- <view class="block">
- <image class="item-title-image" style="box-shadow:0 0 2px 2px lightblue"
- src="/static/images/list/order_item.png" mode="widthFix">
- </image>
- </view>
- <view class="block">
- <text class="rtu-name">{{item.rtuName}}</text>
- </view>
- <view class="block">
- <text class="rtu-code">[{{item.rtuCode}}]</text>
- </view>
- </view>
- <view class="item-text-line" style="margin-top: 2px;">
- <view class="block">
- <uni-icons class="input-uni-icon" type="loop" size="18" color="lightblue" />
- </view>
- <view class="block">
- <text class="item-text">状态:</text>
- </view>
- <view class="block">
- <text class="item-text">
- {{item.orderStatusName}}
- </text>
- </view>
- </view>
- <view class="item-text-line" style="margin-top: 2px;">
- <view class="block">
- <uni-icons class="input-uni-icon" type="person" size="18" color="lightblue" />
- </view>
- <view class="block">
- <text class="item-title">填报人:</text>
- </view>
- <view class="block">
- <text class="item-text">
- {{item.orderProcessUserName}}
- </text>
- </view>
- </view>
- <view class="item-text-line" style="margin-top: 2px;">
- <view class="block">
- <uni-icons class="input-uni-icon" type="calendar" size="18" color="lightblue" />
- </view>
- <view class="block">
- <text class="item-title">填报时间:</text>
- </view>
- <view class="block">
- <text class="item-text">
- {{item.updateTime}}
- </text>
- </view>
- </view>
- <view class="item-text-line" style="margin-top: 2px;">
- <view class="block">
- <uni-icons class="input-uni-icon" type="compose" size="18" color="lightblue" />
- </view>
- <view class="block">
- <text class="item-title" style="width: 50px;">说明:</text>
- </view>
- <text v-if="item.processDesc" class="item-text-ell">
- {{item.processDesc}}
- </text>
- </view>
- <!-- <view class="item-text-line" style="margin-top: 2px;">
- <text v-if="item.processDesc" class="item-text-ell">
- {{item.processDesc}}
- </text>
- </view> -->
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </uni-section>
- <!-- 巡检动态 -->
- <uni-section v-if="permission.admin || permission.orgAdmin || permission.companyAdmin" title="今日设备巡检信息"
- titleColor="#5470c6" titleFontSize="0.7rem" :subTitle="realData.todayIinspectionReportCount">
- <template v-slot:right>
- <view class="line-end">
- <uni-icons class="input-uni-icon" type="more-filled" size="18" color="skyblue" />
- <text style="font-size:0.7rem;color:grey;" @click="onMoreTodayInspectionReportInfoClick">查看更多</text>
- </view>
- </template>
- <template v-slot:decoration>
- <view class="decoration"></view>
- </template>
- <uni-list style="min-height: 40px;">
- <uni-list-item v-for="item in todayEquipmentInspectionList" :key="item.id" showArrow clickable
- @click="onInspectionItemClick(item.id,item.rainSeasonKind)">
- <template v-slot:body>
- <view class="item-block">
- <view class="item-text-line" style="margin-top: 2px;">
- <view class="block">
- <image class="item-title-image" style="box-shadow:0 0 2px 2px lightblue"
- src="/static/images/list/inspection_item.png" mode="widthFix">
- </image>
- </view>
- <view class="block">
- <text class="rtu-name">{{item.rtuName}}</text>
- </view>
- <view class="block">
- <text class="rtu-code">[{{item.rtuCode}}]</text>
- </view>
- </view>
- <view class="item-text-line" style="margin-top: 2px;">
- <view class="block">
- <uni-icons class="input-uni-icon" type="person" size="18" color="lightblue" />
- </view>
- <view class="block">
- <text class="item-title">填报人:</text>
- </view>
- <view class="block">
- <text class="item-text">
- {{item.servicePersonName}}
- </text>
- </view>
- </view>
- <view class="item-text-line" style="margin-top: 2px;">
- <view class="block">
- <uni-icons class="input-uni-icon" type="calendar" size="18" color="lightblue" />
- </view>
- <view class="block">
- <text class="item-title">填报时间:</text>
- </view>
- <view class="block">
- <text class="item-text">
- {{item.createTime}}
- </text>
- </view>
- </view>
- <view class="item-text-line" style="margin-top: 2px;">
- <view class="block">
- <uni-icons class="input-uni-icon" type="compose" size="18" color="lightblue" />
- </view>
- <view class="block">
- <text class="item-title" style="width: 50px;">说明:</text>
- </view>
- <text v-if="item.reportDesc" class="item-text-ell">
- {{item.reportDesc}}
- </text>
- </view>
- <!-- <view class="item-text-line" style="margin-top: 2px;">
- <text v-if="item.reportDesc" class="item-text-ell">
- {{item.reportDesc}}
- </text>
- </view> -->
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </uni-section>
- </view>
- </template>
- <script>
- import
- navBtns
- from "@/api/home.js";
- import {
- role
- } from "@/api/role.js";
- import http from '@/http/api.js';
- export default {
- components: {
- },
- data() {
- return {
- title: '山洪灾害监测预警平台运维系统',
- permission: {
- 'admin': false,
- 'orgAdmin': false,
- 'companyAdmin': false,
- 'companyServciePerson': false,
- },
- ywxtSubSystem: 0,
- yjxtSubSystem: 0,
- currentRole: '',
- current: 0,
- navButton: [],
- navButtonIndex: [],
- //more/loading/noMore
- loadMoreStatus: "noMore",
- timer: false,
- noticeDot: false,
- noticeValue: 0,
- unconfirmOrderList: [],
- todayEquipmentInspectionList: [],
- todayOrderProcessList: [],
- realData: {
- todayOrderProcessCount: '维修任务数量:0',
- todayIinspectionReportCount: '设备巡检数量:0',
- newCheckOrderCount: '新任务数量:0'
- },
- };
- },
- computed: {
- getProcessOrder() {
- if (this.realData.rtuCount && this.realData.unconfirmOrderCount) {
- return this.realData.rtuCount - this.realData.unconfirmOrderCount;
- }
- return 0;
- }
- },
- onLoad() {
- console.log("onLoad++++++++++++++ ")
- let subSystemSelectInfo = uni.getStorageSync("SubSystemSelectInfo");
- console.log("home " + JSON.stringify(subSystemSelectInfo))
- this.ywxtSubSystem = subSystemSelectInfo.ywxt;
- this.yjxtSubSystem = subSystemSelectInfo.yjxt;
- if (this.ywxtSubSystem == 1) {
- this.title = '山洪灾害监测预警平台运维系统';
- uni.setTabBarItem({
- "index": 1,
- "iconPath": "static/images/tabbar/workbench.png",
- "selectedIconPath": "static/images/tabbar/workbench_selected.png",
- "text": "管理工作台",
- })
- } else if (this.yjxtSubSystem == 1) {
- this.title = '山洪灾害监测预警平台应急系统';
- uni.setTabBarItem({
- "index": 1,
- "iconPath": "static/images/tabbar/warn.png",
- "selectedIconPath": "static/images/tabbar/warn_selected.png",
- "text": "监测预警",
- })
- }
- this.permission.admin = false;
- this.permission.orgAdmin = false;
- this.permission.companyAdmin = false;
- this.permission.companyServciePerson = false;
- this.navButton = navBtns.navButtons;
- if (this.userInfo.role_name === role.admin) {
- this.permission.admin = true;
- this.navButtonIndex = navBtns.sysAdminNavButton;
- this.currentRole = role.admin;
- } else if (this.userInfo.role_name === role.orgAdmin) {
- this.permission.orgAdmin = true;
- this.currentRole = role.orgAdmin;
- this.navButtonIndex = navBtns.orgAdminNavButton;
- } else if (this.userInfo.role_name === role.companyAdmin) {
- this.permission.companyAdmin = true;
- this.currentRole = role.companyAdmin;
- this.navButtonIndex = navBtns.companyAdminNavButton;
- } else if (this.userInfo.role_name === role.companyServciePerson) {
- this.permission.companyServciePerson = true;
- this.currentRole = role.companyServciePerson;
- this.navButtonIndex = navBtns.companyServicePersonNavButton;
- }
- if (this.$u.func.checkLogin()) {
- console.log("timer start +++++++ ")
- this.timer = true;
- setTimeout(this.timeCall, 10);
- }
- },
- onUnload() {
- console.log("onUnload++++++++++++++ ")
- this.timer = false;
- },
- onReady() {
- console.log("onReady++++++++++++++ ")
- if (this.$u.func.checkLogin()) {
- } else {
- this.$u.func.logout();
- }
- },
- onShow() {
- console.log("onShow++++++++++++++ " + this.currentRole)
- if (this.$u.func.checkLogin()) {
- let subSystemSelectInfo = uni.getStorageSync("SubSystemSelectInfo");
- console.log("home " + JSON.stringify(subSystemSelectInfo))
- this.ywxtSubSystem = subSystemSelectInfo.ywxt;
- this.yjxtSubSystem = subSystemSelectInfo.yjxt;
- if (this.ywxtSubSystem == 1) {
- this.title = '山洪灾害监测预警平台运维系统';
- uni.setTabBarItem({
- "index": 1,
- "iconPath": "static/images/tabbar/workbench.png",
- "selectedIconPath": "static/images/tabbar/workbench_selected.png",
- "text": "管理工作台",
- })
- } else if (this.yjxtSubSystem == 1) {
- this.title = '山洪灾害监测预警平台应急系统';
- uni.setTabBarItem({
- "index": 1,
- "iconPath": "static/images/tabbar/warn.png",
- "selectedIconPath": "static/images/tabbar/warn_selected.png",
- "text": "监测预警",
- })
- }
- if (this.userInfo.role_name !== this.currentRole) {
- this.permission.admin = false;
- this.permission.orgAdmin = false;
- this.permission.companyAdmin = false;
- this.permission.companyServciePerson = false;
- if (this.userInfo.role_name === role.admin) {
- this.permission.admin = true;
- this.navButtonIndex = navBtns.sysAdminNavButton;
- this.currentRole = role.admin;
- } else if (this.userInfo.role_name === role.orgAdmin) {
- this.permission.orgAdmin = true;
- this.currentRole = role.orgAdmin;
- this.navButtonIndex = navBtns.orgAdminNavButton;
- } else if (this.userInfo.role_name === role.companyAdmin) {
- this.permission.companyAdmin = true;
- this.currentRole = role.companyAdmin;
- this.navButtonIndex = navBtns.companyAdminNavButton;
- } else if (this.userInfo.role_name === role.companyServciePerson) {
- this.permission.companyServciePerson = true;
- this.navButtonIndex = navBtns.companyServicePersonNavButton;
- this.currentRole = role.companyServciePerson;
- }
- }
- if (this.timer == false) {
- console.log("timer start +++++++ ")
- this.timer = true;
- setTimeout(this.timeCall, 10);
- }
- } else {
- this.$u.func.logout();
- }
- },
- onHide() {
- console.log("onHide++++++++++++++ ")
- this.timer = false;
- },
- methods: {
- timeCall() {
- if (this.timer == true) {
- //console.log("time work ");
- this.getHomeInfo();
- setTimeout(this.timeCall, 10000);
- }
- },
- //跳转到工作台
- onRtuManageViewClick() {
- var url = '/pages/rtu-manage/rtumanage';
- uni.switchTab({
- url: url
- })
- },
- //查看设备异常信息
- onWarningRtuViewClick() {
- var url = '/pages/warning/warninglist';
- uni.navigateTo({
- url: url
- })
- },
- //跳转到维修任务
- onAllCheckOrderClick() {
- var url = '/pages/check-order/checkorderlist';
- uni.navigateTo({
- url: url
- })
- },
- //查看未确认维修任务
- onUncomfirecheckorderViewClick() {
- var url = '/pages/check-order/uncomfirecheckorderlistview';
- uni.navigateTo({
- url: url
- })
- },
- onProcessCheckorderViewClick() {
- var url = '/pages/check-order/processcheckorderlistview';
- uni.navigateTo({
- url: url
- })
- },
- onReportCheckorderViewClick() {
- if (this.permission.admin || this.permission.orgAdmin) {
- let url = '/pages/check-order/companycheckorderlist?type=4';
- uni.navigateTo({
- url: url
- })
- } else {
- let url = '/pages/check-order/servicepersoncheckorderlist?type=3';
- uni.navigateTo({
- url: url
- })
- }
- },
- //查看超时未确认维修任务
- onComfiredelaycheckorderClick() {
- var url = '/pages/check-order/comfiredelaycheckorderlist';
- uni.navigateTo({
- url: url
- })
- },
- onOrderReportItemClick(id) {
- console.log("opne record ", id)
- var url = '/pages/check-order/orderprocessreportdetail?orderId=' + id;
- uni.navigateTo({
- url: url
- })
- },
- onNoticeMoreClick() {
- uni.navigateTo({
- url: '/pages/news/noticelist'
- })
- },
- onMoreTodayCheckOrderReportClick() {
- uni.navigateTo({
- url: '/pages/check-order/todaycheckorderrprocesseportlist'
- })
- },
- onOrderItemClick(id) {
- let url =
- '/pages/check-order/orderconfirm?id=' + id;
- uni.navigateTo({
- url: url
- })
- },
- //跳转到待巡检页面
- onInspectionManageClick() {
- var url = '/pages/equipment-inspection/inspectionlist';
- uni.navigateTo({
- url: url
- })
- },
- onFinishedBeforeRainInspectionClick() {
- var url = '/pages/equipment-inspection/finishedinspectionreportlist?rainSeasonKind=1';
- uni.navigateTo({
- url: url
- })
- },
- onFinishedRainFirstInspectionClick() {
- var url = '/pages/equipment-inspection/finishedinspectionreportlist?rainSeasonKind=2';
- uni.navigateTo({
- url: url
- })
- },
- onFinishedRainSecondInspectionClick() {
- var url = '/pages/equipment-inspection/finishedinspectionreportlist?rainSeasonKind=3';
- uni.navigateTo({
- url: url
- })
- },
- onMoreTodayInspectionReportInfoClick() {
- uni.navigateTo({
- url: '/pages/equipment-inspection/todayinspectionreportlist'
- })
- },
- onInspectionItemClick(id, rainSeasonKind) {
- console.log("onInspectionItemClick " + id)
- var url = '/pages/equipment-inspection/inspectionreportview?id=' + id + "&type=" + rainSeasonKind;
- uni.navigateTo({
- url: url
- })
- },
- onMoreUncomfireCheckOrderClick() {
- uni.navigateTo({
- url: '/pages/check-order/uncomfirecheckorderlist'
- })
- },
- getHomeInfo() {
- //console.log("getHomeInfo ")
- let that = this;
- http.request({
- url: '/galaxy-business/home/real/info',
- method: 'GET'
- }).then(res => {
- // console.log("getHomeInfo "+JSON.stringify(res))
- if (res && res.success) {
- that.realData = res.data;
- that.realData['processOrderCount'] = that.realData.processCheckOrderCount;
- that.realData['todayOrderProcessCount'] = '今日已处理任务数量:' + that.realData
- .todayOrderProcessCount;
- that.realData['todayIinspectionReportCount'] = '今日已巡检数量:' + that.realData
- .todayIinspectionReportCount;
- that.realData['newCheckOrderCount'] = '新任务数量:' + that.realData
- .unconfirmOrderCount;
- if (that.realData.hasNewNotice) {
- that.noticeDot = true;
- that.noticeValue = that.realData.newNoticeCount;
- } else {
- that.noticeDot = false;
- that.noticeValue = 0;
- }
- that.getTodayOrderProcessList();
- that.getTodayInspectionReport();
- if (that.permission.companyServciePerson) {
- console.log("companyServciePerson")
- that.getUnconfirmOrderList();
- }
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- getUnconfirmOrderList() {
- let that = this;
- let postData = {};
- http.request({
- url: '/galaxy-business/rtu/check/order/unconfirm/last/list',
- method: 'GET',
- data: postData,
- }).then(res => {
- if (res.data != null) {
- that.unconfirmOrderList = res.data;
- if (that.realData.unconfirmOrderCount > 0) {
- if (that.realData.unconfirmOrderCount > that.unconfirmOrderList.length) {
- that.loadMoreStatus = "more";
- } else {
- that.loadMoreStatus = "load";
- }
- } else {
- that.loadMoreStatus = "noMore";
- }
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- getTodayOrderProcessList() {
- const that = this;
- http.request({
- url: '/galaxy-business/rtu/check/order/process/today/list',
- method: 'GET'
- }).then(res => {
- that.todayOrderProcessList = [];
- if (res.data != null && res.data.length > 0) {
- that.todayOrderProcessList.push(res.data[0]);
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- getTodayInspectionReport() {
- const that = this;
- http.request({
- url: '/galaxy-business/equipment/inspection/report/today/list',
- method: 'GET'
- }).then(res => {
- that.todayEquipmentInspectionList = [];
- if (res.data != null && res.data.length > 0) {
- that.todayEquipmentInspectionList.push(res.data[0]);
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- $nav-height: 75px;
- .decoration {
- width: 6px;
- height: 6px;
- margin-right: 4px;
- border-radius: 50%;
- background-color: cadetblue;
- }
- .item-block {
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- width: 100%;
- }
- .line {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- width: 100%;
- }
- .line .block {
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .line-end {
- display: flex;
- flex-direction: row;
- justify-content: flex-end;
- width: 100%;
- }
- .line-end .block {
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .line-center {
- display: flex;
- flex-direction: row;
- justify-content: center;
- width: 100%;
- height: 100%;
- }
- .line-center .block {
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .rtu-name {
- margin-left: 5rpx;
- font-size: 0.7rem;
- font-weight: bold;
- }
- .rtu-code {
- margin-left: 5rpx;
- font-size: 0.6rem;
- color: gray;
- }
- .item-text-line {
- width: 100%;
- display: flex;
- flex-direction: row;
- align-items: flex-start;
- padding-left: 0px;
- padding-right: 0px;
- .block {
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- .item-title {
- font-size: 0.7rem;
- }
- .item-text {
- padding-left: 2px;
- padding-right: 5px;
- font-size: 0.7rem;
- }
- .item-text-ell {
- width: 100%;
- overflow: hidden;
- font-size: 0.7rem;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .item-number {
- font-size: 0.7rem;
- margin-left: 2px;
- margin-right: 5px;
- }
- }
- .item-title-image {
- /* #ifndef APP-NVUE */
- display: block;
- /* #endif */
- margin-right: 5px;
- width: 20px;
- height: 20px;
- border-radius: 50%;
- }
- .uni-badge-left-margin {
- margin-left: 0px;
- }
- .logo {
- flex-shrink: 0;
- width: 100rpx;
- height: auto;
- }
- .container {
- background-color: #f7f7f7;
- min-height: 100vh;
- overflow: hidden;
- }
- .nav {
- margin: 0rpx 0;
- box-sizing: border-box;
- padding: 0 10rpx;
- background-color: white;
- &-item {
- width: 100%;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- height: 130rpx;
- &-img {
- width: 80rpx;
- height: 80rpx;
- }
- &-name {
- font-size: 0.7rem;
- font-family: PingFang SC;
- font-weight: 500;
- color: #585b61;
- }
- }
- }
- </style>
|