检测界面修改

This commit is contained in:
xiaofajia 2024-12-15 16:55:30 +08:00
parent 66064942ff
commit 4ebf74ce11
5 changed files with 973 additions and 870 deletions

View File

@ -1,8 +1,8 @@
// 应用全局配置
module.exports = {
// baseUrl: 'https://www.nuoyunr.com/admin-api',
// baseUrl: 'http://127.0.0.1:48080/admin-api',
baseUrl: 'http://zjcptv.natappfree.cc/admin-api',
baseUrl: 'http://127.0.0.1:48080/admin-api',
// baseUrl: 'http://zjcptv.natappfree.cc/admin-api',
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
baseImageUrl: 'https://www.nuoyunr.com/minio',
wsUrl: 'ws://127.0.0.1:48080',

View File

@ -6,32 +6,51 @@
<view style="width: 100%; height: 44px;"></view>
<view class="top-ail">
<!-- 新增 -->
<view style="text-align: left;margin: 0 32rpx;">
<text class="t-title">{{ user.partnerName }}</text>
</view>
<view class="top-two">
<view class="dix">
<view class="touxiang">
<image :src="baseImageUrl+user.partnerLogo" mode=""></image>
<view class="dix" style="margin: 0 32rpx;margin-top: 10rpx">
<image @click="showUserDetail" style="width: 104rpx;height: 104rpx;border-radius: 50%;"
v-if="userInfo && userInfo.avatar === null" :src="defaultAvatar" mode="scaleToFill" @error="avatarErr"></image>
<image @click="showUserDetail" style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-else
:src="userInfo.avatar" mode="scaleToFill" @error="avatarErr"></image>
<view class="userInfo" @click="showUserDetail">
<text class="userName">{{ userInfo.nickname }}</text>
<text class="userType" >{{ userInfo.roleNames }}</text>
<!-- <text class="userType" v-if="ifLeader">班组长</text>-->
</view>
<view class="t-title">{{user.partnerName}} 欢迎您</view>
<!-- <view class="touxiang">-->
<!-- <image :src="baseImageUrl+user.partnerLogo" mode=""></image>-->
<!-- </view>-->
<!-- <view class="t-title">{{user.partnerName}} 欢迎您</view>-->
</view>
<view class="dix">
<text class="baizi" v-if="user.isWorking == 1">营业中</text>
<text class="baizi" v-if="user.isWorking == 0">休息中</text>
<switch :checked="isWorking" @change="getying()" color="#3CBC6F" style="transform:scale(0.7)" />
<view class="msg-box" @click="gotoMsg">
<image mode="aspectFita" class="white-image" src="@/static/imgs/msg.png"
style="width: 48rpx;height: 48rpx;"></image>
<view class="msg-num" v-if="noReadNum>0">{{ noReadNum }}</view>
</view>
<image class="white-image" @click="showUserDetail" style="width: 48rpx;height: 48rpx"
src="/static/icons/more.png" mode="aspectFita"></image>
<!-- <text class="baizi" v-if="user.isWorking == 1">营业中</text>-->
<!-- <text class="baizi" v-if="user.isWorking == 0">休息中</text>-->
<!-- <switch :checked="isWorking" @change="getying()" color="#3CBC6F" style="transform:scale(0.7)" />-->
</view>
</view>
<view class="threebox">
<!-- @click="gostatistics()" -->
<view class="t-box" @click="ToToday">
<view class="xbai">当日订单</view>
<view class="dbai">{{threenum.todayOrderNum}}</view>
<view class="dbai">{{ threenum.todayOrderNum }}</view>
</view>
<view class="t-box">
<view class="xbai">合规合格</view>
<view class="dbai">{{threenum.hgNum}}</view>
<view class="dbai">{{ threenum.hgNum }}</view>
</view>
<view class="t-box">
<view class="xbai">双燃料合格</view>
<view class="dbai">{{threenum.srlNum}}</view>
<view class="dbai">{{ threenum.srlNum }}</view>
</view>
</view>
@ -39,7 +58,7 @@
<view class="gangbox">
<view class="ang-box1" @click="goindex()">
<view class="bs-di">
<text>信息管理</text>
<text>功能管理</text>
<uni-icons type="arrow-right" color="#6FA1CD" size="20"></uni-icons>
</view>
<view class="xzi">
@ -66,7 +85,7 @@
</view>
<view class="ang-box3" @click="goxiaoxi()">
<view class="bs-di">
<text>监管通知</text>
<text>通知提醒</text>
<uni-icons type="arrow-right" color="#775FAE" size="20"></uni-icons>
</view>
<view class="xzi">
@ -94,40 +113,40 @@
<text>公司简介</text>
</view> -->
</view>
<view class="gangbox">
<view class="san-box2" @click="gorwm()">
<view class="cnm-icon">
<image src="../../static/detection/dddhex.png" mode=""></image>
</view>
<text>订单核销</text>
</view>
<view class="san-box" @click="reservations()">
<view class="j-icon" v-if="appAndPick.appointNum != 0">
<text>{{appAndPick.appointNum }}</text>
</view>
<!-- <view >
<view class="jbBox">
<u-badge :type="type" max="99" :value="value"></u-badge>
</view>
</view> -->
<view class="cnm-icon">
<image src="../../static/detection/gsjj.png" mode=""></image>
</view>
<text>预约记录</text>
</view>
<!-- <view class="gangbox">-->
<!-- <view class="san-box2" @click="gorwm()">-->
<!-- <view class="cnm-icon">-->
<!-- <image src="../../static/detection/dddhex.png" mode=""></image>-->
<!-- </view>-->
<!-- <text>订单核销</text>-->
<!-- </view>-->
<!-- <view class="san-box" @click="reservations()">-->
<!-- <view class="j-icon" v-if="appAndPick.appointNum != 0">-->
<!-- <text>{{appAndPick.appointNum }}</text>-->
<!-- </view>-->
<!-- &lt;!&ndash; <view >-->
<!-- <view class="jbBox">-->
<!-- <u-badge :type="type" max="99" :value="value"></u-badge>-->
<!-- </view>-->
<!-- </view> &ndash;&gt;-->
<!-- <view class="cnm-icon">-->
<!-- <image src="../../static/detection/gsjj.png" mode=""></image>-->
<!-- </view>-->
<!-- <text>预约记录</text>-->
<!-- </view>-->
<view class="san-box3" @click="gohomecar()">
<view class="j-icon" v-if="appAndPick.pickNum != 0">
<text>{{appAndPick.pickNum }}</text>
</view>
<view class="cnm-icon">
<image src="../../static/detection/smqc.png" mode=""></image>
</view>
<text>上门取车</text>
</view>
</view>
<!-- <view class="san-box3" @click="gohomecar()">-->
<!-- <view class="j-icon" v-if="appAndPick.pickNum != 0">-->
<!-- <text>{{appAndPick.pickNum }}</text>-->
<!-- </view>-->
<!-- <view class="cnm-icon">-->
<!-- <image src="../../static/detection/smqc.png" mode=""></image>-->
<!-- </view>-->
<!-- <text>上门取车</text>-->
<!-- </view>-->
<!-- </view>-->
<view class="dqtime">
<text>今天是{{dateStr || ''}} {{week || ''}} {{time||''}}</text>
<text>今天是{{ dateStr || '' }} {{ week || '' }} {{ time || '' }}</text>
</view>
</view>
@ -136,8 +155,8 @@
<u-modal :show="show" :title="titlemodeal" confirmText="确定" @confirm="confirms">
<scroll-view scroll-y style="height: 400px;">
<view v-for="(item,index) in warnMsg " :key="index" style="margin-bottom: 10px;">
<view style="font-weight: bold;">{{item.title || '系统维护中'}}: </view>
<view style="font-size: 16px; color: #606266;">{{item.content || ''}}</view>
<view style="font-weight: bold;">{{ item.title || '系统维护中' }}:</view>
<view style="font-size: 16px; color: #606266;">{{ item.content || '' }}</view>
</view>
</scroll-view>
</u-modal>
@ -148,10 +167,12 @@
</template>
<script>
import request from '../../utils/request';
import tabBar from '../../components/tabBar/tabBar.vue'
import config from '@/config'
export default {
import request from '../../utils/request';
import tabBar from '../../components/tabBar/tabBar.vue'
import {getStorageWithExpiry, setStorageWithExpiry} from "../../utils/auth";
import config from '@/config'
export default {
data() {
return {
msg: '1',
@ -179,8 +200,10 @@
appointNum: 0,
pickNum: 0
},
baseImageUrl:this.$baseImageUrl
baseImageUrl: this.$baseImageUrl,
noReadNum: 1,
userInfo: {},
defaultAvatar: require('@/static/icons/avatar.png'),
}
},
onLoad() {
@ -193,13 +216,45 @@
this.getindex()
// this.getwarnMsglist()
this.getbottom()
this.getUserInfo()
},
components: {
tabBar,
},
methods: {
ToToday(){
avatarErr(err) {
console.log('err', err)
this.userInfo.avatar = this.defaultAvatar
},
getUserInfo() {
let roleNames = getStorageWithExpiry("roleNames")
if (!roleNames){
request({
url: '/inspection/util/getRoleName',
method: 'get'
}).then(res => {
roleNames = res.data
setStorageWithExpiry("roleNames", roleNames)
})
}
const data = getStorageWithExpiry("userInfo")
if (!data) {
request({
url: '/system/user/profile/get',
method: 'get'
}).then(res => {
this.userInfo = res.data
if (this.userInfo.avatar) {
this.userInfo.avatar = config.baseImageUrl + this.userInfo.avatar
}
this.userInfo.roleNames = roleNames
setStorageWithExpiry("userInfo", this.userInfo)
})
} else {
this.userInfo = data
}
},
ToToday() {
uni.navigateTo({
url: '/pages/index/TodayTable'
})
@ -400,18 +455,18 @@
this.items.push(this.items.shift());
}
}
}
}
</script>
<style scoped lang="scss">
.jbBox {
.jbBox {
width: 100px;
height: 100px;
background-color: #909193;
border-radius: 15px;
}
}
.content {
.content {
box-sizing: border-box;
width: 100%;
height: calc(100vh);
@ -421,15 +476,15 @@
background: url('../../static/detection/mybj.png') no-repeat;
background-size: 100% 100%;
position: relative;
}
}
.c-top {
.c-top {
width: 100%;
height: 283px;
}
}
.cnm-icon {
.cnm-icon {
width: 20px;
height: 20px;
margin-right: 5px;
@ -438,33 +493,33 @@
width: 100%;
height: 100%;
}
}
}
.top-ail {
.top-ail {
width: 100%;
box-sizing: border-box;
padding: 20px;
}
}
.dix {
.dix {
display: flex;
align-items: center;
}
}
.top-two {
.top-two {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
}
.xzi {
.xzi {
font-size: 12px;
// margin-top: 10px;
}
}
.icon-img {
.icon-img {
margin-top: 10px;
margin-left: 80px;
width: 50px;
@ -474,9 +529,9 @@
width: 100%;
height: 100%;
}
}
}
.touxiang {
.touxiang {
width: 30px;
height: 30px;
border-radius: 50%;
@ -487,25 +542,25 @@
width: 100%;
height: 100%;
}
}
}
.t-title {
.t-title {
font-size: 18px;
font-weight: bold;
color: #FFFFFF;
margin-left: 5px;
}
}
.gangbox {
.gangbox {
width: 100%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
margin-top: 10px;
}
}
.ang-box {
.ang-box {
width: 49%;
box-sizing: border-box;
padding: 15px;
@ -517,9 +572,9 @@
border-radius: 10px;
margin-top: 10px;
font-weight: bold;
}
}
.ang-box1 {
.ang-box1 {
width: 49%;
box-sizing: border-box;
padding: 15px;
@ -528,9 +583,9 @@
border-radius: 10px;
margin-top: 10px;
font-weight: bold;
}
}
.ang-box2 {
.ang-box2 {
width: 49%;
box-sizing: border-box;
padding: 15px;
@ -539,9 +594,9 @@
border-radius: 10px;
margin-top: 10px;
font-weight: bold;
}
}
.ang-box3 {
.ang-box3 {
width: 49%;
box-sizing: border-box;
padding: 15px;
@ -550,9 +605,9 @@
border-radius: 10px;
margin-top: 10px;
font-weight: bold;
}
}
.ang-box4 {
.ang-box4 {
width: 49%;
box-sizing: border-box;
padding: 15px;
@ -561,9 +616,9 @@
border-radius: 10px;
margin-top: 10px;
font-weight: bold;
}
}
.san-box {
.san-box {
width: 30%;
box-sizing: border-box;
padding: 5px 0px;
@ -575,12 +630,12 @@
border-radius: 10px;
margin-top: 10px;
font-weight: bold;
font-size: 12;
font-size: 12px;
position: relative;
}
}
.san-box3 {
.san-box3 {
width: 30%;
box-sizing: border-box;
padding: 5px 0px;
@ -593,9 +648,9 @@
margin-top: 10px;
font-weight: bold;
position: relative;
}
}
.j-icon {
.j-icon {
position: absolute;
width: 15px;
height: 15px;
@ -610,9 +665,9 @@
z-index: 999;
font-size: 12px;
}
}
.san-box2 {
.san-box2 {
width: 30%;
box-sizing: border-box;
padding: 5px 0px;
@ -624,11 +679,10 @@
border-radius: 10px;
margin-top: 10px;
font-weight: bold;
}
}
.dqtime {
.dqtime {
width: 100%;
display: flex;
align-items: center;
@ -638,50 +692,50 @@
position: fixed;
bottom: 55px;
right: 10px;
}
}
.baizi {
.baizi {
font-size: 14px;
font-weight: 400;
color: #FFFFFF;
}
}
.threebox {
.threebox {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30px;
}
}
.t-box {
.t-box {
width: 33%;
text-align: center;
}
}
.xbai {
.xbai {
font-size: 15px;
font-weight: 400;
color: #FFFFFF;
margin-bottom: 5px;
}
}
.xxbai {
.xxbai {
font-size: 13px;
font-weight: 400;
color: #FFFFFF;
margin-bottom: 15px;
}
}
.dbai {
.dbai {
font-size: 25px;
font-weight: 600;
color: #FFFFFF;
margin-bottom: 5px;
}
}
.t-bottom {
.t-bottom {
width: 100%;
z-index: 999;
background: #FFFFFF;
@ -691,15 +745,15 @@
background-color: white;
margin-top: 8px;
}
}
.x-title {
.x-title {
font-size: 16px;
font-weight: 600;
color: #333333;
}
}
.jgbox {
.jgbox {
width: 42px;
height: 42px;
background: #EFF2FC;
@ -713,38 +767,38 @@
height: 100%;
}
}
}
.bs-di {
.bs-di {
width: 100%;
display: flex;
align-items: center;
font-size: 22px;
justify-content: space-between;
}
}
.f-box {
.f-box {
width: 25%;
margin-bottom: 10px;
text-align: center;
}
}
.fourbox {
.fourbox {
width: 100%;
display: flex;
// justify-content: space-between;
align-items: center;
flex-wrap: wrap;
margin-top: 20px;
}
}
.h-text {
.h-text {
font-size: 13px;
font-weight: 400;
color: #333333;
}
}
.bai-box {
.bai-box {
width: 100%;
// height: 121px;
background: #FFFFFF;
@ -753,9 +807,9 @@
box-sizing: border-box;
padding: 15px;
}
}
.hui-box {
.hui-box {
width: 100%;
background: #E7E8FD;
border-radius: 8px;
@ -765,14 +819,14 @@
margin-top: 15px;
margin-bottom: 15px;
margin-top: 160px;
}
}
.hui-top {
.hui-top {
box-sizing: border-box;
padding: 15px;
}
}
.l-bai {
.l-bai {
width: 100%;
height: 220px;
box-sizing: border-box;
@ -781,36 +835,36 @@
border-radius: 5px;
white-space: nowrap;
overflow: hidden;
}
}
.l-box {
.l-box {
margin-top: 5px;
width: 100%;
border-bottom: 1px solid #EEEEEE;
}
}
.l-text {
.l-text {
font-size: 15px;
font-weight: 400;
color: #333333;
margin-bottom: 10px;
}
}
.time {
.time {
font-size: 14px;
font-weight: 400;
color: #999999;
margin-bottom: 10px;
}
}
.mubu {
.mubu {
background-color: #F4F4F4;
box-sizing: border-box;
padding: 15px;
z-index: -9;
}
}
.bottom-box {
.bottom-box {
width: 100%;
background-color: white;
border-radius: 8px;
@ -818,9 +872,9 @@
box-sizing: border-box;
padding: 15px;
}
}
.x-top {
.x-top {
width: 100%;
display: flex;
justify-content: space-between;
@ -829,24 +883,24 @@
font-weight: 400;
color: #666666;
margin: 15px auto;
}
}
.x-cont {
.x-cont {
margin: 10px auto;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
}
.dix-zuo {
.dix-zuo {
width: 50%;
display: flex;
align-items: center;
justify-content: space-between;
}
}
.dix-you {
.dix-you {
width: 50%;
display: flex;
align-items: center;
@ -861,34 +915,34 @@
width: 50%;
text-align: center;
}
}
}
.jzuo {
.jzuo {
width: 50%;
font-size: 15px;
font-weight: 400;
color: #333333;
text-align: center;
}
}
.ju {
.ju {
width: 50%;
text-align: left;
font-size: 15px;
font-weight: 400;
color: #FF571A;
}
}
.paim {
.paim {
width: 15%;
text-align: center;
}
}
.paim-you {
.paim-you {
width: 80%;
}
}
.v-icon {
.v-icon {
width: 30px;
height: 30px;
@ -896,5 +950,54 @@
width: 100%;
height: 100%;
}
}
.white-image {
width: 48rpx;
height: 48rpx;
filter: invert(100%) grayscale(100%);
}
.msg-box {
position: relative;
margin-right: 40rpx;
.msg-num {
position: absolute;
right: -15rpx;
color: white;
background: #d74a43;
width: 35rpx;
height: 35rpx;
line-height: 35rpx;
text-align: center;
font-weight: 800;
font-size: 11px;
border-radius: 50%;
top: -15rpx;
}
}
.userInfo {
flex: 1;
//width: 0;
.userName {
font-weight: bold;
font-size: 36rpx;
color: white;
display: block;
margin-bottom: 16rpx;
margin-left: 10rpx;
}
.userType {
font-size: 24rpx;
color: white;
display: inline-block;
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 1rpx solid white;
padding: 8rpx 16rpx;
margin-left: 10rpx;
}
}
</style>

BIN
static/icons/avatar.png Normal file

Binary file not shown.

After

(image error) Size: 4.7 KiB

BIN
static/icons/more.png Normal file

Binary file not shown.

After

(image error) Size: 370 B

BIN
static/imgs/msg.png Normal file

Binary file not shown.

After

(image error) Size: 512 B