|
|
|
|
@ -7,72 +7,42 @@ |
|
|
|
|
</u-icon> |
|
|
|
|
</view> |
|
|
|
|
</u-navbar> |
|
|
|
|
<!-- 通知公告 --> |
|
|
|
|
<view class="notice_box" v-if="noticeList.length > 0"> |
|
|
|
|
<u-notice-bar mode="horizontal" type="primary" :list="noticeList" :more-icon="true" @getMore="getNotice()" |
|
|
|
|
:is-circular="false"></u-notice-bar> |
|
|
|
|
</view> |
|
|
|
|
<view class=""> |
|
|
|
|
<view class="banner-swiper" v-if="swiperList.length > 0"> |
|
|
|
|
<view class="logo-txt">科研医疗建筑运维平台</view> |
|
|
|
|
<image :src="swiperList[0]" style="padding-right:12rpx;height:444rpx;width:100%"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="menu_box"> |
|
|
|
|
<view class="menu_title">工作台</view> |
|
|
|
|
<view class="menu_list clearfix" v-if="dataTypes==1"> |
|
|
|
|
<view class="item_box" @click="goPage('/pages/inspection/plan')"> |
|
|
|
|
<view class="item_img"> |
|
|
|
|
<image src="@/static/images/home/left.svg" mode="aspectFit" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="item_txt">巡检计划</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="item_box" @click="goPage('/pages/submission/records?name=报送记录')"> |
|
|
|
|
<view class="item_img"> |
|
|
|
|
<image src="@/static/images/home/left.svg" mode="aspectFit" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="item_txt">报送记录</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="menu_list clearfix" v-else-if="dataTypes==4"> |
|
|
|
|
<view class="item_box" @click="goPage('/pages/submission/records?name=维修任务')"> |
|
|
|
|
<view class="item_img"> |
|
|
|
|
<image src="@/static/images/home/left.svg" mode="aspectFit" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="item_txt">维修任务</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="item_box" @click="goPage('/pages/inspection/quest')"> |
|
|
|
|
<view class="item_img"> |
|
|
|
|
<image src="@/static/images/home/left.svg" mode="aspectFit" /> |
|
|
|
|
<view class="work-title">工作台</view> |
|
|
|
|
<view class="workbench"> |
|
|
|
|
<view v-for="(item, index) in workList" :key="index" class="workbench-slider"> |
|
|
|
|
<view class="workbench-item" @click="goPage(item.pagePath)"> |
|
|
|
|
<view class="workbench-item-icon"> |
|
|
|
|
<image :src="item.img" mode="aspectFit" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="item_txt">巡检任务</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="menu_list clearfix" v-else> |
|
|
|
|
<view class="item_box" @click="goPage('/pages/submission/records?name=接单记录')"> |
|
|
|
|
<view class="item_img"> |
|
|
|
|
<image src="@/static/images/home/left.svg" mode="aspectFit" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="item_txt">接单记录</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="item_box" @click="goPage('/pages/inspection/quest')"> |
|
|
|
|
<view class="item_img"> |
|
|
|
|
<image src="@/static/images/home/left.svg" mode="aspectFit" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="item_txt">巡检任务</view> |
|
|
|
|
<u-badge class="badge" type="error" :count="item.num" :offset="[0, 0]"></u-badge> |
|
|
|
|
</view> |
|
|
|
|
<view class="workbench-name">{{ item.name }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="work-title">设备统计</view> |
|
|
|
|
<eachartsPie :echartData="pieInfo"></eachartsPie> |
|
|
|
|
|
|
|
|
|
<view class="work-title">检修单状态</view> |
|
|
|
|
<eachartsNightpie :echartData="pieInfo"></eachartsNightpie> |
|
|
|
|
|
|
|
|
|
<view> |
|
|
|
|
<swiperSlider></swiperSlider> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="work-title">设备报警</view> --> |
|
|
|
|
<view> |
|
|
|
|
<alarm></alarm> |
|
|
|
|
</view> |
|
|
|
|
<view class="work-title">维修统计</view> |
|
|
|
|
<view class="statistics"> |
|
|
|
|
<eacharts :type="'maintenanceStatistics'"></eacharts> |
|
|
|
|
<!-- <eacharts :type="'maintenanceStatisticsPie'"></eacharts> --> |
|
|
|
|
<eacharts></eacharts> |
|
|
|
|
</view> |
|
|
|
|
<view class="work-title">故障现象分类</view> |
|
|
|
|
<view class="statistics"> |
|
|
|
|
<eachartsPie :echartData="pieInfo.fault"></eachartsPie> |
|
|
|
|
</view> |
|
|
|
|
<view class="work-title">设备分类</view> |
|
|
|
|
<view class="statistics"> |
|
|
|
|
<eachartsNightpie :echartData="pieInfo.device"></eachartsNightpie> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<betone-tabbar ref="tabbarRef" /> |
|
|
|
|
@ -93,35 +63,27 @@ export default { |
|
|
|
|
eachartsPie, |
|
|
|
|
eachartsNightpie |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
|
|
|
|
|
dataTypes() { |
|
|
|
|
return this.$store.state.dataType |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
swiperList: [], |
|
|
|
|
workList: [], |
|
|
|
|
pieInfo: [],//饼图数据 |
|
|
|
|
noticeList: [ |
|
|
|
|
|
|
|
|
|
],//通知列表 |
|
|
|
|
pieInfo: {},//饼图数据 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
|
this.pieStat() |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
// this.pieStat() |
|
|
|
|
this.$refs.tabbarRef.getPermission(); |
|
|
|
|
this.getNoticeList() |
|
|
|
|
|
|
|
|
|
// this.BetLoading.show(); |
|
|
|
|
// setTimeout(() => { |
|
|
|
|
// this.BetLoading.hide(); |
|
|
|
|
// }, 1000); |
|
|
|
|
}); |
|
|
|
|
//工作台 |
|
|
|
|
|
|
|
|
|
this.pieStat() |
|
|
|
|
this.getUserInfo() |
|
|
|
|
this.getoverview() |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 工作台 列表 overview |
|
|
|
|
@ -169,9 +131,14 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
goPage(item) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: item, |
|
|
|
|
}); |
|
|
|
|
if (item == '') { |
|
|
|
|
uni.showToast({ title: "功能正在完善中,敬请期待!", icon: "none" }); |
|
|
|
|
} else { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: item, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
scanCode() { |
|
|
|
|
uni.scanCode({ |
|
|
|
|
@ -185,28 +152,11 @@ export default { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 饼图数据 |
|
|
|
|
pieStat() { |
|
|
|
|
// 饼图数据 |
|
|
|
|
pieStat() { |
|
|
|
|
this.$u.api.pieStat().then(res => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
this.pieInfo = res.data.fault |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 通知公告 |
|
|
|
|
getNotice() { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/notice/announcement', |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getNoticeList() { |
|
|
|
|
this.$u.api.getNoticeList().then(res => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
let data = res.data.records |
|
|
|
|
data.forEach(item => { |
|
|
|
|
this.noticeList.push(item.title) |
|
|
|
|
}) |
|
|
|
|
this.pieInfo = res.data |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
@ -218,10 +168,11 @@ export default { |
|
|
|
|
width: 100%; |
|
|
|
|
// min-height: 100%; |
|
|
|
|
padding: 0; |
|
|
|
|
background: rgba(239, 239, 239, 1); |
|
|
|
|
padding-top: var(--status-bar-height); |
|
|
|
|
|
|
|
|
|
.banner-swiper { |
|
|
|
|
margin-bottom: 32rpx; |
|
|
|
|
margin-bottom: 64rpx; |
|
|
|
|
position: relative; |
|
|
|
|
|
|
|
|
|
.logo-txt { |
|
|
|
|
@ -246,7 +197,6 @@ export default { |
|
|
|
|
color: rgba(16, 16, 16, 1); |
|
|
|
|
font-size: 32rpx; |
|
|
|
|
padding: 0 0 32rpx 36rpx; |
|
|
|
|
margin-top: 32rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.workbench { |
|
|
|
|
@ -297,99 +247,5 @@ export default { |
|
|
|
|
.statistics_pie { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.menu_box { |
|
|
|
|
background: #fff; |
|
|
|
|
position: relative; |
|
|
|
|
margin: 0 32rpx; |
|
|
|
|
border-radius: 20rpx; |
|
|
|
|
|
|
|
|
|
&::after { |
|
|
|
|
content: ''; |
|
|
|
|
position: absolute; |
|
|
|
|
height: 4rpx; |
|
|
|
|
width: 100%; |
|
|
|
|
background: #38D79F; |
|
|
|
|
position: absolute; |
|
|
|
|
top: 0; |
|
|
|
|
left: 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.menu_title { |
|
|
|
|
height: 100rpx; |
|
|
|
|
font-weight: 500; |
|
|
|
|
font-size: 32rpx; |
|
|
|
|
color: #333333; |
|
|
|
|
line-height: 100rpx; |
|
|
|
|
text-align: left; |
|
|
|
|
font-style: normal; |
|
|
|
|
margin: 0 32rpx; |
|
|
|
|
position: relative; |
|
|
|
|
|
|
|
|
|
&::after { |
|
|
|
|
content: ''; |
|
|
|
|
position: absolute; |
|
|
|
|
bottom: 0; |
|
|
|
|
left: 0; |
|
|
|
|
height: 2rpx; |
|
|
|
|
background: #f5f5f5; |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.menu_list { |
|
|
|
|
padding-bottom: 32rpx; |
|
|
|
|
margin-left: 32rpx; |
|
|
|
|
margin-right: 32rpx; |
|
|
|
|
margin-top: 24rpx; |
|
|
|
|
|
|
|
|
|
.item_box { |
|
|
|
|
width: 50%; |
|
|
|
|
float: left; |
|
|
|
|
|
|
|
|
|
&:nth-child(1) { |
|
|
|
|
position: relative; |
|
|
|
|
|
|
|
|
|
&::after { |
|
|
|
|
content: ''; |
|
|
|
|
position: absolute; |
|
|
|
|
width: 4rpx; |
|
|
|
|
height: 100%; |
|
|
|
|
background: #f5f5f5; |
|
|
|
|
right: 20rpx; |
|
|
|
|
top: 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.item_img { |
|
|
|
|
width: 64rpx; |
|
|
|
|
height: 64rpx; |
|
|
|
|
float: left; |
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.item_txt { |
|
|
|
|
font-weight: 400; |
|
|
|
|
font-size: 32rpx; |
|
|
|
|
color: #333333; |
|
|
|
|
line-height: 64rpx; |
|
|
|
|
text-align: left; |
|
|
|
|
font-style: normal; |
|
|
|
|
padding-left: 20rpx; |
|
|
|
|
float: left; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.notice_box { |
|
|
|
|
width: 100%; |
|
|
|
|
background: #fff; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |