ah_sz_gqj_app/pages/workbench/workbench.vue

290 lines
6.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view>
<view class="topTab">
<!-- <tabHeader title="工作台" isShowBack="false"></tabHeader> -->
</view>
<view class="page-content">
<view class="content-header">
<text style="margin-left: 40rpx;">{{formData.orgName}}</text></view>
<view class="center">
<view class="center-item" @click="goCollectSamples()" v-if="roleCode=='administrators'||roleCode=='integratedTeamLeader'||roleCode=='integratedTeamMember'">
<view class="title">收样管理</view>
<view class="tip">收样派件</view>
<view class="imgBox">
<image class="img1" src="@/static/images/more.png" alt="">
<image class="img2" src="@/static/images/workIcon1.png" alt="">
</view>
</view>
<view class="center-item" @click="goTest()" v-if="roleCode=='administrators'||roleCode=='experimentalTeamMember'">
<view class="title">试验管理</view>
<view class="tip">立即进入</view>
<view class="imgBox">
<image class="img1" src="../../static/images/more.png" alt="">
<image class="img2" src="../../static/images/workIcon2.png" alt="">
</view>
</view>
<view class="center-item" @click="goRecord()" v-if="roleCode=='administrators'">
<view class="title">原始记录管理</view>
<view class="tip">立即进入</view>
<view class="imgBox">
<image class="img1" src="../../static/images/more.png" alt="">
<image class="img2" src="../../static/images/workIcon3.png" alt="">
</view>
</view>
<view class="center-item" @click="goExamination()" v-if="roleCode=='administrators'||roleCode=='centerManager'||roleCode=='technicalDirector'||roleCode=='experimentalTeamLeader'">
<view class="title">审查管理</view>
<view class="tip">立即进入</view>
<view class="imgBox">
<image class="img1" src="../../static/images/more.png" alt="">
<image class="img2" src="../../static/images/workIcon4.png" alt="">
</view>
</view>
<view class="center-item" @click="goReport()" v-if="roleCode=='administrators'">
<view class="title">检测报告管理</view>
<view class="tip">立即进入</view>
<view class="imgBox">
<image class="img1" src="../../static/images/more.png" alt="">
<image class="img2" src="../../static/images/workIcon5.png" alt="">
</view>
</view>
<view class="center-item" @click="goCertificate()" v-if="roleCode=='administrators'">
<view class="title">合格证管理</view>
<view class="tip">立即进入</view>
<view class="imgBox">
<image class="img1" src="../../static/images/more.png" alt="">
<image class="img2" src="../../static/images/workIcon6.png" alt="">
</view>
</view>
<view class="center-item" @click="goSign()" v-if="roleCode=='administrators'||roleCode=='centerManager'||roleCode=='technicalDirector'||roleCode=='experimentalTeamLeader'">
<view class="title">电子签名管理</view>
<view class="tip">立即进入</view>
<view class="imgBox">
<image class="img1" src="../../static/images/more.png" alt="">
<image class="img3" src="../../static/images/workIcon8.png" alt="">
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { getUserData,getRoleAppAuth } from '@/service/url.js';
import tabHeader from '@/components/tab-Header.vue';
import AES from "@/utils/cryptoJs/aes.js";
export default {
components: {
tabHeader
},
data() {
return {
// authList:[],
formData:{},
roleCode:uni.getStorageSync('roleCode')
};
},
onShow() {
this.getUserData()
// this.getRoleAppAuth()
},
methods: {
getUserData(){
let obj = {}
let param = {
encryptedData: AES.encrypt(JSON.stringify(obj))
// encryptedData: JSON.stringify(obj)
}
this.$http.post(getUserData,param).then(res => {
if (res) {
if(res.code == '200'){
this.formData=res.data;
}else{
}
}
}).catch(error => {
console.log(error)
})
},
getRoleAppAuth(){
let obj = {}
let param = {
encryptedData: AES.encrypt(JSON.stringify(obj))
// encryptedData: JSON.stringify(obj)
}
this.$http.post(getRoleAppAuth,param).then(res => {
if (res) {
if(res.code == '200'){
this.authList=res.data;
console.log(this.authList)
}else{
}
}
}).catch(error => {
console.log(error)
})
},
//收样
goCollectSamples(){
uni.navigateTo({
url: `/pages/samples/sampleList`
})
},
//试验
goTest(){
uni.navigateTo({
url: '/pages/test/testList'
})
},
//审查
goExamination(){
uni.navigateTo({
url: `/pages/examination/examinationList`
})
},
//原始记录
goRecord(){
uni.navigateTo({
url: `/pages/record/recordList`
})
},
//检测报告
goReport(){
uni.navigateTo({
url: `/pages/report/reportList`
})
},
//合格证
goCertificate(){
uni.navigateTo({
url: `/pages/certificate/certificateList`
})
},
//签名管理
goSign(){
uni.navigateTo({
url: `/pages/sign/index`
})
},
},
}
</script>
<style lang="scss">
.page-content{
width: 100%;
height: 90vh;
position: absolute;
top:4vh;
padding: 00rpx 0;
background-color: #F3F3F3;
.content-header{
width: 100%;
height: 100rpx;
line-height: 100rpx;
// padding-left: 40rpx;
background-color: #FFF;
font-weight: bold;
}
}
.top-header{
width: 94%;
height: 340rpx;
margin: 40rpx auto;
background-image: url('@/static/img/banner.png');
background-repeat: no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
.header-title{
margin-left: 30rpx;
}
}
.header-box {
width: 100%;
height: 350rpx;
// color: #fff;
box-sizing: border-box;
padding: 20rpx;
margin-top: 20rpx;
border-radius: 20rpx;
uni-swiper{
height: 100%;
}
}
.center{
width: 94%;
height: 700rpx;
margin: 40rpx auto;
margin-top: 40rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.center-item{
width: 48%;
height: 240rpx;
border-radius: 16rpx;
background-color: #FFF;
margin-bottom: 20rpx;
box-shadow: 0rpx 4rpx 8rpx -2rpx rgba(0,0,0,0.12);
// background-repeat: no-repeat;
// background-size: 100% 100%;
.title{
margin-top: 40rpx;
margin-left: 40rpx;
font-size: 32rpx;
font-weight: 600;
}
.tip{
margin-top: 10rpx;
margin-left: 40rpx;
font-size: 24rpx;
color: #999;
}
.imgBox{
width: 100%;
height: 90rpx;
// background-color: #e0e0e0;
display: flex;
align-items: flex-end;
justify-content: space-between;
.img1{
width: 40rpx;
height: 40rpx;
margin-left: 40rpx;
}
.img2{
width: 90rpx;
height: 90rpx;
margin-right: 20rpx;
}
.img3{
width: 60rpx;
height: 60rpx;
margin-right: 26rpx;
}
}
}
}
</style>