You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
3.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="wrap">
<u-row gutter="16" justify="space-between">
<u-col span="12">
<view class="demo-layout bg-blue" style="text-align: left;padding-left: 20rpx;">当前登录人{{userInfo.name}}
</view>
</u-col>
</u-row>
<u-row gutter="16">
<u-col span="6">
<view class="demo-layout bg-purple-light" @click="toview(4)">
<text class="iconfont icon-guanxianxuncha"></text>
<text class="navtxt">我的巡查</text>
</view>
</u-col>
<u-col span="6">
<view class="demo-layout bg-purple" @click="toview(3)">
<text class="iconfont icon-guanxianyanghu"></text>
<text class="navtxt">我的养护</text>
</view>
</u-col>
</u-row>
<u-row gutter="16">
<u-col span="12">
<view class="demo-layout bg-purple-light" @click="toview(5)">
<text class="iconfont icon-gongnengxingquexianshuju"></text>
<text class="navtxt">我的工单</text>
</view>
</u-col>
</u-row>
<u-row gutter="16">
<u-col span="12">
<view class="demo-layout bg-purple-light" @click="toview(2)">
<text class="iconfont icon-zaixianjiance"></text>
<text class="navtxt">我的日常监督巡查</text>
</view>
</u-col>
</u-row>
<u-row gutter="16" justify="space-between">
<u-col span="8">
<view class="demo-layout bg-purple" @click="toview(1)">
<text class="iconfont icon-caidanguanli"></text>
<text class="navtxt">我的通用巡查</text>
</view>
</u-col>
</u-row>
</view>
</template>
<script>
export default {
data() {
return {
title: '',
userInfo: {}
}
},
onLoad() {
this.loadInfo();
},
methods: {
loadInfo() {
let that = this;
this.util.request({
api: '/api/mobile/auth/me',
method: 'POST',
utilSuccess: function(res) {
that.userInfo = res;
},
utilFail: function(res) {
that.util.alert(res);
}
});
},
toview(type) {
let url = "/packageA/pages/generalList/generalList";
if (type == 2) {
url = "/packageB/pages/dailyList/dailyList"
}
if (type == 3) {
url = "/rainmaintain/rainmaintainlist/rainmaintainList"
}
if (type == 4) {
url = "/raininspection/raininspectionlist/raininspectionList"
}
if (type == 5) {
url = "/order/order/orderList/orderList"
}
uni.navigateTo({
url: url
})
}
}
}
</script>
<style scoped lang="scss">
.wrap {
padding: 24rpx;
}
.u-row {
margin: 40rpx 0;
}
.demo-layout {
border-radius: 8rpx;
text-align: center;
display: flex;
flex-direction: column;
padding: 20rpx 0rpx;
}
.navtxt {
margin-top: 20rpx;
color: #000000;
}
.iconfont {
color: #338de3;
font-size: 64rpx;
}
.bg-purple {
background: #d3dce6;
}
.bg-blue {
background: #338de3;
color: #fff;
}
.bg-purple-light {
background: #e5e9f2;
}
.bg-purple-dark {
background: #99a9bf;
}
</style>