123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374 |
- <template>
- <view>
- <u-navbar title="首页" v-show="false"></u-navbar>
-
- <!-- 头部 -->
- <view class="header">
- <view class="main">
- <view class="title">
- <view class="name" @click="changeShow()">
- <view class="text">
- 你好,{{userInfo.name}}!
- </view>
- <view class="icon">
- <u-icon name='arrow-down' color="#fff" size="28"></u-icon>
- </view>
- </view>
- <view class="options" v-if="this.show==true" >
- <view @click="changeShow()">切换身份</view>
- <view @click="logout()">退出账号</view>
- </view>
-
-
- <view class="qr-code">
- <img src="@/assets/img/riLine-qr-scan-line@1x.png" alt="">
- </view>
- </view>
-
- </view>
-
- </view>
- <!-- 宫格 -->
- <view class="gird" >
- <!-- 公告 -->
- <view class="notice" >
- <u-notice-bar mode="horizontal"
- bg-color="#6290f7" color="#fff"
- :list="['库存PDA设备将于2023年4月1日升级维护']"></u-notice-bar>
-
- <!-- <u-icon name="volume-up-fill" size="40" color="#fff"></u-icon>
- <text></text> -->
- </view>
- <template v-if="userInfo.type=='1'">
-
-
- <view class="item" @click="gotoUrl('pages/storeManagement/equipmentDelivery/equipmentDelivery')">
- <view class="title">
- 设备出库
- </view>
- <view class="hint">
- 申请物品登记核准出库
- </view>
- <view class="img">
- <img src="@/assets/img/girdH1.png" alt="">
- </view>
- </view>
- <view class="item" @click="gotoUrl('pages/storeManagement/equipmentEnter/equipmentEnter')">
- <view class="title">
- 设备入库
- </view>
- <view class="hint">
- 申购采购收货入库登记
- </view>
- <view class="img">
- <img src="@/assets/img/girdH2.png" alt="">
- </view>
- </view>
- <view class="item" @click="gotoUrl('pages/storeManagement/equipmentInspection/equipmentInspection')" >
- <view class="title">
- 设备巡检
- </view>
- <view class="hint">
- 当前物品计量库存盘点
- </view>
- <view class="img">
- <img src="@/assets/img/girdH3.png" alt="">
- </view>
- </view>
-
- </template>
-
- <template v-if="userInfo.type=='2'">
-
- <view class="item" @click="gotoUrl('pages/projectDepartment/branch/exportApplication/exportApplication')">
- <view class="title">
- 出库申请
- </view>
- <view class="hint">
- 提交出库申请单据
- </view>
- <view class="img">
- <img src="@/assets/img/projectGird1.png" alt="">
- </view>
- </view>
- <view class="item" @click="gotoUrl('pages/projectDepartment/branch/exportProcess/exportProcess')">
- <view class="title">
- 出库审核
- </view>
- <view class="hint">
- 审批出库申请单据
- </view>
- <view class="img">
- <img src="@/assets/img/projectGird2.png" alt="">
- </view>
- </view>
- <view class="item" @click="gotoUrl('pages/projectDepartment/branch/exportReturn/exportReturn')">
- <view class="title">
- 设备归还
- </view>
- <view class="hint">
- 提交设备归还单据
- </view>
- <view class="img">
- <img src="@/assets/img/projectGird3.png" alt="">
- </view>
- </view>
- </template>
- <view class="item" @click="gotoUrl('pages/index/equipmentRetrieval/equipmentRetrieval')">
- <view class="title">
- 设备检索
- </view>
- <view class="hint">
- 库存物品信息检索
- </view>
- <view class="img">
- <img src="@/assets/img/projectGird4.png" alt="">
- </view>
- </view>
-
- </view>
-
- <!-- 其他功能 -->
- <view class="other-functions" v-if="userInfo.type=='1'">
- <view class="title">
- 其他功能
- </view>
- <view class="function-gird">
- <view class="item">
- <img src="@/assets/img/riLine-file-add-line@1x.png" alt="">
- <text>新增巡检</text>
- </view>
- <view class="item">
- <img src="@/assets/img/riLine-printer-line@1x.png" alt="">
- <text>打印标签</text>
- </view>
- <view class="item">
- <img src="@/assets/img/riLine-spam-line@1x.png" alt="">
- <text>故障申报</text>
- </view>
- <view class="item">
- <img src="@/assets/img/riLine-arrow-left-right-line@1x.png" alt="">
- <text>设备移交</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import * as API from '@/apis/pagejs/index.js'
-
- export default {
- data() {
- return {
- show:false,
- userInfo:{}
- }
- },
- onLoad() {
- this.userInfo=this.carhelp.getPersonInfo()
- //this.getUserDepartmentList()
- },
- methods: {
- logout(){
- this.changeShow()
- uni.showModal({
- title: '提示',
- content: '确认是否退出?',
- success: res=> {
- if (res.confirm) {
- //付钱 改为组件
- this.logoutApi();
-
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- logoutApi(){
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- var data = {
-
- };
-
- API.logout(data).then((res) => {
- this.carhelp.logoff();
-
-
- uni.reLaunch({
- url:"/"
- })
-
- }).catch(error => {
- uni.showToast({
- title: error
- })
- })
- },
-
- changeShow(){
- this.show=!this.show
- }
- }
- }
- </script>
- <style lang="scss" scoped>
-
- .options{
- width: 260rpx;
-
- line-height: 60rpx;
- //text-align: center;
- padding:8rpx 0px 8rpx 16rpx;
- background-color: #fff;
- color: rgba(65, 80, 88, 1);
- font-family: Microsoft Yahei;
- position: absolute;
- top: 88rpx;
- border-radius: 1px;
- //right: 24rpx;
- box-shadow:5px 5px 10px gray;
- }
-
- page{
- background-color: rgba(1,122,255,1);
- padding-bottom: 100rpx;
- }
- // 头部
- .header{
- width: 100%;
- height: 289px;
- background:linear-gradient(180deg, rgba(0,45,194,1) 0%,rgba(0,59,254,1) 49%,rgba(1,122,255,1) 100%);
- padding: 0 40rpx;
- .main{
- width: 100%;
- height: 100%;
- background: url(@/assets/img/background.png) no-repeat;
- background-position: top -70rpx right -50rpx;
- position: relative;
- }
- .title{
- display: flex;
- justify-content: space-between;
- align-items: center;
- color: rgba(255, 255, 255, 1);
- line-height: 88rpx;
- .name{
- display: flex;
- font-size: 40rpx;
-
- }
- .qr-code{
- display: flex;
-
- }
- }
-
- }
-
- // 宫格
- .gird{
- // 公告
- .notice{
- overflow: hidden;
- width: 100%;
- display: flex;
- align-items: center;
- background-color: #6290f7;
- color: rgba(255, 255, 255, 1);
- font-weight: bold;
- border-radius: 8px;
- height: 80rpx;
- line-height: 80rpx;
- padding: 0 24rpx;
- // position: absolute;
- bottom: 260rpx;
- left: 0;
- right: 0;
- margin-bottom: 40rpx;
- text{
- font-size: 28rpx;
- width: 542px;
- margin-left: 16rpx;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- padding: 0 40rpx;
- display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
- margin-top: -216rpx;
- .item{
- width: 720rpx;
- height: 100px;
- background-color: rgba(255, 255, 255, 1);
- border-radius: 8px;
- padding: 32rpx 24rpx;
- position: relative;
- margin-bottom: 30rpx;
- .title{
- color: rgba(16, 16, 16, 1);
- font-size: 44rpx;
- margin-bottom: 8rpx;
- font-family: 'Alibaba-PuHuiTi-Regular';
- }
- .hint{
- color: rgba(106, 121, 142, 1);
- font-size: 32rpx;
- margin-bottom: 44rpx;
- }
- .img{
- width: 75px;
- height: 75px;
- position: absolute;
- right: 24rpx;
- bottom: 24rpx;
- img{
- width: 100%;
- height: 100%;
- }
- }
- }
- }
-
- // 其他功能
- .other-functions{
- padding: 0 40rpx;
- .title{
- color: rgba(255, 255, 255, 1);
- font-size: 36rpx;
- margin-bottom: 16rpx;
- }
- .function-gird{
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- .item{
- display: flex;
- align-items: center;
- justify-content: center;
- width: 320rpx;
- height: 80rpx;
- line-height: 80rpx;
- margin-bottom: 24rpx;
- color: rgba(255, 255, 255, 1);
- border-radius: 8px;
- background-color: rgba(255, 255, 255, 0.25);
- text-align: center;
- border: 1px solid rgba(255, 255, 255, 0.35);
- img{
- width: 32rpx;
- height: 32rpx;
- margin-right: 8rpx;
- }
- }
- }
- }
- </style>
|