pc-master #55

Merged
xiaomeng merged 3 commits from pc-master into portal 2023-11-24 01:45:27 +00:00
15 changed files with 225 additions and 31 deletions

View File

@ -2248,6 +2248,65 @@
align-items: center; align-items: center;
} }
.vrcode .el-menu, .el-submenu__title:hover, .el-menu-item:hover, .el-menu-item:focus {
background: transparent;
}
.vrcode .el-menu {
border-right: none;
}
.vrcode .el-submenu__icon-arrow {
font-size: 16px;
color: #fff;
}
.vrcode .el-submenu .el-menu-item {
display: flex;
align-items: center;
padding-left: 31px;
position: relative;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #A8B6C8;
width: 200px;
height: 40px;
cursor: pointer;
margin: 0 auto;
}
.vrcode .el-submenu .el-menu-item::before {
content: " ";
width: 4px;
height: 4px;
background: #A8B6C8;
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 10px;
}
.vrcode .el-submenu__title, .vrcode .el-menu-item {
display: flex;
align-items: center;
}
.vrcode .el-submenu__title .img, .vrcode .el-menu-item .img {
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 15px;
}
.vrcode .el-submenu .el-menu-item.is-active {
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.3);
color: #fff;
}
.vrcode-textarea { .vrcode-textarea {
width: 100%; width: 100%;
margin-bottom: 15px; margin-bottom: 15px;
@ -2805,3 +2864,36 @@
font-weight: bold; font-weight: bold;
color: #FFFFFF; color: #FFFFFF;
} }
.productTraceability {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width: 100%;
height: 100%;
}
.productTraceability .productTraceability-title {
width: 100%;
max-width: 1182px;
height: 110px;
background: url(../img/vrcode-title1.png) no-repeat;
background-size: 1182px 110px;
background-position: center center;
display: flex;
align-items: center;
justify-content: center;
}
.productTraceability .productTraceability-title > span {
padding: 0 20px;
font-size: 60px;
font-family: Alimama ShuHeiTi;
font-weight: bold;
font-style: italic;
color: #DDF1FF;
background: linear-gradient(0deg, white 0%, #7dabff 76.7334%, #f3f7ff 88.08594%, #f3f7ff 92.62695%, #d2e2ff 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

File diff suppressed because one or more lines are too long

View File

@ -2391,12 +2391,67 @@
} }
} }
} }
//css
.flex-end{ .flex-end{
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
} }
.vrcode .el-menu,.el-submenu__title:hover,.el-menu-item:hover,.el-menu-item:focus{
background: transparent;
}
.vrcode{
.el-menu{
border-right: none;
}
.el-submenu__icon-arrow{
font-size: 16px;
color: #fff;
}
.el-submenu .el-menu-item{
display: flex;
align-items: center;
padding-left: 31px;
position: relative;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #A8B6C8;
width: 200px;
height: 40px;
cursor: pointer;
margin: 0 auto;
&::before{
content: " ";
width: 4px;
height: 4px;
background: #A8B6C8;
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 10px;
}
}
.el-submenu__title,.el-menu-item{
display: flex;
align-items: center;
.img{
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 15px;
}
}
.el-submenu .el-menu-item.is-active{
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.3);
color: #fff;
}
}
.vrcode-textarea{ .vrcode-textarea{
width: 100%; width: 100%;
margin-bottom: 15px; margin-bottom: 15px;
@ -2947,4 +3002,35 @@ color: #FFFFFF;
} }
} }
} }
} }
.productTraceability{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width: 100%;
height: 100%;
.productTraceability-title{
width:100%;
max-width: 1182px;
height: 110px;
background: url(../img/vrcode-title1.png) no-repeat ;
background-size: 1182px 110px;
background-position: center center;
display: flex;
align-items: center;
justify-content: center;
>span{
padding: 0 20px;
font-size: 60px;
font-family: Alimama ShuHeiTi;
font-weight: bold;
font-style: italic;
color: #DDF1FF;
background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(125,171,255,1) 76.7333984375%, rgba(243,247,255,1) 88.0859375%, rgba(243,247,255,1) 92.626953125%, rgba(210,226,255,1) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View File

@ -88,6 +88,7 @@ export default {
userInfo: null, userInfo: null,
loading: true,// loading: true,//
IDTimer: null, IDTimer: null,
deviceId:'',
} }
}, },
watch: { watch: {
@ -100,6 +101,7 @@ export default {
this.getTime() this.getTime()
var router = this.$route.query var router = this.$route.query
if (router.token && router.userid) { if (router.token && router.userid) {
this.deviceId=router.deviceId?router.deviceId:''
localStorage.setItem('token', router.token) localStorage.setItem('token', router.token)
this.api.getUser({ userId: router.userid }).then(res => { this.api.getUser({ userId: router.userid }).then(res => {
@ -166,6 +168,10 @@ export default {
this.leftList[1].list = [] this.leftList[1].list = []
this.leftList[2].list = [] this.leftList[2].list = []
this.$store.state.equipmentList.forEach((el, index) => { this.$store.state.equipmentList.forEach((el, index) => {
//deviceId
if(this.deviceId&&this.deviceId==el.deviceId){
this.$store.state.equipmentIndex = index+1
}
if (el.deviceName == 1) { if (el.deviceName == 1) {
this.leftList.forEach((el1, index1) => { this.leftList.forEach((el1, index1) => {
if (el1.name == '施肥机') { if (el1.name == '施肥机') {

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="index"> <div class="index vrcode">
<div class="header"> <div class="header">
<div class="header-left"> <div class="header-left">
<img src="../assets/image/logo.png" alt=""> <img src="../assets/image/logo.png" alt="">
@ -18,26 +18,26 @@
</div> </div>
<div class="index-content"> <div class="index-content">
<div class="left collapse scroll"> <div class="left collapse scroll">
<el-collapse v-model="activeNames"> <el-menu :default-active="routerNow" class="el-menu-vertical-demo" @open="clickmenu" @close="clickmenu">
<template v-for="item, index in leftList"> <template v-for="item, index in leftList" >
<el-collapse-item :name="index + 1" :key="index" v-if="!item.isRouter"> <el-submenu @click="toRouter1(item)" :index="item.router" v-if="item.list.length">
<template slot="title" class="collapse-title"> <template slot="title">
<div class="img"><img :src="item.img" alt=""></div> {{ item.name }} <div class="img"><img :src="item.img" alt=""></div>
<span>{{ item.name }}</span>
</template> </template>
<ul class="table-ul"> <el-menu-item-group>
<li class="table-li" @click="toRouter1(item1)" <el-menu-item :disabled="item1.router?false:true" @click="toRouter1(item1)" :index="item1.router"
:class="routerNow == item1.router ? 'active' : ''" v-for="item1, index1 in item.list">{{ item1.name }}</el-menu-item>
v-for="item1, index1 in item.list" :key="index1">{{ item1.name }} </el-menu-item-group>
</li> </el-submenu>
</ul> <el-menu-item @click="toRouter1(item)" :index="item.router" v-else>
</el-collapse-item> <div class="img"><img :src="item.img" alt=""></div>
<div @click="toRouter1(item)" :class="routerNow == item.router ? 'active' : ''" class="no-list" <span>{{ item.name }}</span>
v-else> </el-menu-item>
<div class="img"><img :src="item.img" alt=""></div>{{ item.name }}
</div>
</template> </template>
</el-collapse> </el-menu>
</div> </div>
<div class="right right-page"> <div class="right right-page">
<router-view></router-view> <router-view></router-view>
@ -55,10 +55,10 @@ export default {
activeNames: [3], activeNames: [3],
leftList: [ leftList: [
{ name: '种植计划', img: require('../assets/image/vrcode-icon0.png'), list: [], router: 'plantingPlan', isRouter: true, }, { name: '种植计划', router: 'plantingPlan', img: require('../assets/image/vrcode-icon0.png'), list: [], isRouter: true, },
{ name: '生产环节', routerList: ['agricultural','sprayInsecticide','spreadManure','pickingRecords'], img: require('../assets/image/vrcode-icon1.png'), list: [{ name: '农事管理',router:'agricultural' }, { name: '施肥记录',router:'spreadManure' }, { name: '打药记录',router:'sprayInsecticide' }, { name: '采摘记录',router:'pickingRecords' }, { name: '清洁记录' }, { name: '病虫害管理' },] }, { name: '生产环节',router:'productionProcess', routerList: ['agricultural', 'sprayInsecticide', 'spreadManure', 'pickingRecords'], img: require('../assets/image/vrcode-icon1.png'), list: [{ name: '农事管理', router: 'agricultural' }, { name: '施肥记录', router: 'spreadManure' }, { name: '打药记录', router: 'sprayInsecticide' }, { name: '采摘记录', router: 'pickingRecords' }, { name: '清洁记录',router:'' }, { name: '病虫害管理',router:'' },] },
{ name: '产品追溯', routerList: [], img: require('../assets/image/vrcode-icon2.png'), list: [{ name: '产品追溯',router: 'productTraceability' },{ name: '溯源批次' }, { name: '配置溯源版面' }, { name: '各种报告库' }] }, { name: '产品追溯',router:'productTraceability', routerList: [], img: require('../assets/image/vrcode-icon2.png'), list: [{ name: '溯源批次',router:'' }, { name: '配置溯源版面',router:'' }, { name: '各种报告库',router:'' }] },
{ name: '基础信息设置', routerList: [], img: require('../assets/image/vrcode-icon3.png'), list: [{ name: '作物品种' }, { name: '种植栽培模式' }, { name: '农事作业工序' }, { name: '人员管理' }, { name: '农场信息管理' }, { name: '供应商管理' }, { name: '生产资料管理' }, { name: '农机工具管理' }, { name: '作物外观图片库' },] },], { name: '基础信息设置',router:'setting', routerList: [], img: require('../assets/image/vrcode-icon3.png'), list: [{ name: '作物品种',router:'' }, { name: '种植栽培模式',router:'' }, { name: '农事作业工序',router:'' }, { name: '人员管理',router:'' }, { name: '农场信息管理',router:'' }, { name: '供应商管理',router:'' }, { name: '生产资料管理',router:'' }, { name: '农机工具管理',router:'' }, { name: '作物外观图片库',router:'' },] },],
routerNow: 'plantingPlan', routerNow: 'plantingPlan',
deviceName: 1, deviceName: 1,
routerIndex: 1, routerIndex: 1,
@ -106,7 +106,17 @@ export default {
this.IDTimer && clearInterval(this.IDTimer) this.IDTimer && clearInterval(this.IDTimer)
}, },
methods: { methods: {
clickmenu(key, keyPath){
if(key=='productTraceability'&&key!=this.routerNow){
this.$router.push({ name: key })
}
},
handleOpen(key, keyPath) {
console.log(key, keyPath);
},
handleClose(key, keyPath) {
console.log(key, keyPath);
},
gerRouter() { gerRouter() {
var store = this.$store.state var store = this.$store.state
this.routerIndex = this.$route.query.index ? this.$route.query.index : store.equipmentIndex this.routerIndex = this.$route.query.index ? this.$route.query.index : store.equipmentIndex
@ -137,16 +147,16 @@ export default {
toHome() { toHome() {
this.$router.push({ name: 'home' }) this.$router.push({ name: 'home' })
}, },
toRouter1(item) { toRouter1(item) {
console.log(item,11); console.log(item, 11);
if (item.router) { if (item.router) {
if (item.http) { if (item.http) {
window.location.href = item.http; window.location.href = item.http;
}else{ } else {
if(this.routerNow!=item.router){ if (this.routerNow != item.router) {
this.$router.push({ name: item.router }) this.$router.push({ name: item.router })
} }
} }
} else { } else {
this.$message('当前页面正在努力开发中'); this.$message('当前页面正在努力开发中');