pc-master #12

Merged
clibing merged 5 commits from pc-master into portal 2023-10-13 02:43:37 +00:00
23 changed files with 933 additions and 82 deletions

View File

@ -1,20 +1,20 @@
@charset "UTF-8"; @charset "UTF-8";
.scroll, .el-dropdown-menu, .formula .page-content { .scroll, .el-dropdown-menu, .formula .page-content, .history .page-content .el-table--scrollable-x .el-table__body-wrapper {
overflow-y: auto; overflow-y: auto;
} }
.scroll::-webkit-scrollbar, .el-dropdown-menu::-webkit-scrollbar, .formula .page-content::-webkit-scrollbar { .scroll::-webkit-scrollbar, .el-dropdown-menu::-webkit-scrollbar, .formula .page-content::-webkit-scrollbar, .history .page-content .el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar {
/*滚动条整体*/ /*滚动条整体*/
width: 10px; width: 10px;
cursor: pointer; cursor: pointer;
} }
.scroll::-webkit-scrollbar-track, .el-dropdown-menu::-webkit-scrollbar-track, .formula .page-content::-webkit-scrollbar-track { .scroll::-webkit-scrollbar-track, .el-dropdown-menu::-webkit-scrollbar-track, .formula .page-content::-webkit-scrollbar-track, .history .page-content .el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-track {
/*滚动条轨道*/ /*滚动条轨道*/
background: #013769; background: #013769;
} }
.scroll::-webkit-scrollbar-thumb, .el-dropdown-menu::-webkit-scrollbar-thumb, .formula .page-content::-webkit-scrollbar-thumb { .scroll::-webkit-scrollbar-thumb, .el-dropdown-menu::-webkit-scrollbar-thumb, .formula .page-content::-webkit-scrollbar-thumb, .history .page-content .el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-thumb {
/*滚动条里面的滑块*/ /*滚动条里面的滑块*/
width: 4px; width: 4px;
cursor: pointer; cursor: pointer;
@ -22,14 +22,24 @@
border: 3px solid #013769; border: 3px solid #013769;
} }
.scroll::-webkit-scrollbar-thumb:hover, .el-dropdown-menu::-webkit-scrollbar-thumb:hover, .formula .page-content::-webkit-scrollbar-thumb:hover { .scroll::-webkit-scrollbar-thumb:hover, .el-dropdown-menu::-webkit-scrollbar-thumb:hover, .formula .page-content::-webkit-scrollbar-thumb:hover, .history .page-content .el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
/*滚动条鼠标事件,鼠标放上去出现的事件*/ /*滚动条鼠标事件,鼠标放上去出现的事件*/
} }
.scroll::-webkit-scrollbar-corner, .el-dropdown-menu::-webkit-scrollbar-corner, .formula .page-content::-webkit-scrollbar-corner { .scroll::-webkit-scrollbar-corner, .el-dropdown-menu::-webkit-scrollbar-corner, .formula .page-content::-webkit-scrollbar-corner, .history .page-content .el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-corner {
/*滚动条边角*/ /*滚动条边角*/
} }
.el-date-table td span,
.el-date-range-picker__header div {
color: #606266;
}
.el-date-table td.end-date div span,
.el-date-table td.start-date div span {
color: #fff !important;
}
.el-dropdown-menu { .el-dropdown-menu {
max-height: 300px; max-height: 300px;
} }
@ -1379,6 +1389,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
flex-shrink: 0; flex-shrink: 0;
margin-right: 100px;
} }
.realTime .page-content .realTime-list .seamless-warp .list-view { .realTime .page-content .realTime-list .seamless-warp .list-view {
@ -1453,3 +1464,190 @@
min-width: 230px; min-width: 230px;
height: 100%; height: 100%;
} }
.history .page-content {
width: 100%;
}
.history .page-content .el-table--scrollable-x .el-table__body-wrapper .el-table__row {
height: 60px;
}
.history .page-content .search-flex {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
margin-top: 20px;
}
.history .page-content .search-flex .search-left {
display: flex;
align-items: center;
flex-shrink: 0;
padding: 15px 0;
}
.history .page-content .search-flex .search-left > div {
display: flex;
align-items: center;
}
.history .page-content .search-flex .search-left > div > div {
margin-left: 10px;
width: 80px;
height: 34px;
background: rgba(0, 186, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.4);
display: flex;
align-items: center;
justify-content: center;
border-radius: 3px;
cursor: pointer;
}
.history .page-content .search-flex .search-left > div > div.active {
border: 2px solid #0294E2;
background: #0294E2;
}
.history .page-content .search-flex .search-right {
display: flex;
align-items: center;
flex-shrink: 0;
padding: 15px 0;
}
.history .page-content .search-flex .search-right span {
margin-right: 10px;
}
.history .page-content .search-flex .search-right .el-input__inner {
height: 44px;
background: rgba(0, 186, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.4);
}
.history .page-content .search-flex .search-right .el-date-editor .el-range-separator {
color: #fff;
}
.history .page-content .search-flex .search-right .el-date-editor .el-range-input {
background-color: transparent;
color: #fff;
}
.dataAnalysis .page-content .search-flex {
display: flex;
align-items: center;
justify-content: center;
}
.dataAnalysis .page-content .analysis-charts {
width: 100%;
height: 560px;
}
.dataAnalysis .page-content .analysis-charts > div {
width: 100%;
height: 100%;
}
.systemManage .page-content .manage-sel {
display: flex;
align-items: center;
padding: 20px 0;
border-bottom: 1px solid rgba(0, 180, 255, 0.35);
}
.systemManage .page-content .manage-sel > div {
margin-right: 20px;
padding: 0 20px;
height: 40px;
background: rgba(0, 186, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.4);
display: flex;
align-items: center;
justify-content: center;
border-radius: 3px;
cursor: pointer;
}
.systemManage .page-content .manage-sel > div > img {
width: 14px;
height: auto;
margin-right: 5px;
}
.systemManage .page-content .manage-sel > div.active {
border: 2px solid #0294E2;
background: #0294E2;
}
.systemManage .page-content .manage-content {
width: 100%;
height: calc(100% - 160px);
}
.systemManage .page-content .manage-content .manage-input {
margin-bottom: 25px;
}
.systemManage .page-content .manage-content .manage-input > div {
margin-bottom: 10px;
}
.systemManage .page-content .manage-content .manage-input > input {
width: 500px;
height: 44px;
background: rgba(0, 186, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.4);
padding: 0 15px;
}
.systemManage .page-content .manage-content .manage-input > input::placeholder {
color: #859bb6;
}
.systemManage .page-content .manage-content .manage-btn {
width: 300px;
height: 60px;
background: #0294E2;
border-radius: 10px;
margin-top: 25px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
}
.systemManage .page-content .manage-content.manage-content-input {
height: 400px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.systemManage .page-content .manage-content.manage-content-form {
margin-top: 15px;
display: flex;
align-items: center;
flex-direction: column;
}
.systemManage .page-content .manage-content.manage-content-form .manage-input > input {
width: 660px;
}
.systemManage .page-content .manage-content.manage-content-form .manage-html > div {
margin-bottom: 10px;
}
.systemManage .page-content .manage-content.manage-content-form .manage-html > .html {
width: 660px;
height: 120px;
background: rgba(0, 186, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.4);
}

File diff suppressed because one or more lines are too long

View File

@ -33,6 +33,16 @@
} }
.el-date-table td span,
.el-date-range-picker__header div {
color: #606266;
}
.el-date-table td.end-date div span,
.el-date-table td.start-date div span {
color: #fff !important;
}
.el-dropdown-menu { .el-dropdown-menu {
max-height: 300px; max-height: 300px;
@extend .scroll; @extend .scroll;
@ -224,6 +234,7 @@
background: url(../image/index-background.png) no-repeat; background: url(../image/index-background.png) no-repeat;
background-size: 1920px 1080px; background-size: 1920px 1080px;
background-position: center top; background-position: center top;
.no-list { .no-list {
color: #fff; color: #fff;
display: flex; display: flex;
@ -1431,28 +1442,35 @@
margin-left: 10px; margin-left: 10px;
} }
} }
.realTime-list { .realTime-list {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
.seamless-warp { .seamless-warp {
display: flex; display: flex;
align-items: center; align-items: center;
>div { >div {
// width: 100%!important; // width: 100%!important;
display: flex; display: flex;
overflow: unset !important; overflow: unset !important;
>div { >div {
display: flex; display: flex;
align-items: center; align-items: center;
flex-shrink: 0; flex-shrink: 0;
margin-right: 100px;
} }
} }
.list-view { .list-view {
flex-shrink: 0; flex-shrink: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-right: 20px; margin-right: 20px;
img { img {
width: 80px; width: 80px;
height: 80px; height: 80px;
@ -1480,6 +1498,7 @@
} }
} }
.flex-list { .flex-list {
display: flex; display: flex;
align-items: center; align-items: center;
@ -1526,3 +1545,216 @@
} }
} }
} }
.history {
.page-content {
width: 100%;
.el-table--scrollable-x .el-table__body-wrapper {
@extend .scroll;
.el-table__row {
height: 60px;
}
}
.search-flex {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
margin-top: 20px;
.search-left {
display: flex;
align-items: center;
flex-shrink: 0;
padding: 15px 0;
span {}
>div {
display: flex;
align-items: center;
>div {
margin-left: 10px;
width: 80px;
height: 34px;
background: rgba(0, 186, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.4);
display: flex;
align-items: center;
justify-content: center;
border-radius: 3px;
cursor: pointer;
&.active {
border: 2px solid #0294E2;
background: #0294E2;
}
}
}
}
.search-right {
display: flex;
align-items: center;
flex-shrink: 0;
padding: 15px 0;
span {
margin-right: 10px;
}
.el-input__inner {
height: 44px;
background: rgba(0, 186, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.40);
}
.el-date-editor .el-range-separator {
color: #fff;
}
.el-date-editor .el-range-input {
background-color: transparent;
color: #fff;
}
}
}
}
}
.dataAnalysis {
.page-content {
.search-flex {
display: flex;
align-items: center;
justify-content: center;
}
.analysis-charts {
width: 100%;
height: 560px;
>div {
width: 100%;
height: 100%;
}
}
}
}
.systemManage {
.page-content {
.manage-sel {
display: flex;
align-items: center;
padding: 20px 0;
border-bottom: 1px solid rgba(0, 180, 255, .35);
>div {
margin-right: 20px;
padding: 0 20px;
height: 40px;
background: rgba(0, 186, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.4);
display: flex;
align-items: center;
justify-content: center;
border-radius: 3px;
cursor: pointer;
>img {
width: 14px;
height: auto;
margin-right: 5px;
}
&.active {
border: 2px solid #0294E2;
background: #0294E2;
}
}
}
.manage-content {
width: 100%;
height: calc(100% - 160px);
.manage-input {
margin-bottom: 25px;
>div {
margin-bottom: 10px;
}
>input {
width: 500px;
height: 44px;
background: rgba(0, 186, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.40);
padding: 0 15px;
&::placeholder {
color: rgba(133, 155, 182, 1);
}
}
}
.manage-btn {
width: 300px;
height: 60px;
background: #0294E2;
border-radius: 10px;
margin-top: 25px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
}
&.manage-content-input {
height: 400px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
&.manage-content-form {
margin-top: 15px;
display: flex;
align-items: center;
flex-direction: column;
.manage-input {
>input {
width: 660px;
}
}
.manage-html {
>div {
margin-bottom: 10px;
}
>.html {
width: 660px;
height: 120px;
background: rgba(0, 186, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.40);
>div {
}
}
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

View File

@ -13,17 +13,21 @@ export function realTimeLine(id,data) {
var data7=[]//1#水肥EC var data7=[]//1#水肥EC
var data8=[]//2#水肥EC var data8=[]//2#水肥EC
var data9=[]//1#空气温度 var data9=[]//1#空气温度
var data10=[]//1#管道压力
data.forEach((el,index)=>{ data.forEach((el,index)=>{
Xdata.push(el.time) Xdata.push(el.time)
data1.push(el.value['目标水肥PH']) data1.push(el.value['目标水肥PH'])
data2.push(el.value['目标水肥EC']) data2.push(el.value['目标水肥EC'])
data3.push(el.value['平均值水肥PH']) data3.push(el.value['1#平均水肥EC'])
data4.push(el.value['平均值水肥EC']) data4.push(el.value['1#平均水肥PH'])
data5.push(el.value['1#水肥PH']) data5.push(el.value['1#水肥PH'])
data6.push(el.value['2#水肥PH']) data6.push(el.value['2#水肥PH'])
data7.push(el.value['1#水肥EC']) data7.push(el.value['1#水肥EC'])
data8.push(el.value['2#水肥EC']) data8.push(el.value['2#水肥EC'])
data10.push(el.value['1#管道压力'])
data9.push(el.value['1#空气温度']) data9.push(el.value['1#空气温度'])
}) })
console.log(data1,data2); console.log(data1,data2);
var list = [ var list = [
@ -404,6 +408,48 @@ export function realTimeLine(id,data) {
borderWidth: 1, borderWidth: 1,
}, },
}, },
},
{
name: '1#管道压力',
data: data9,
type: "line",
symbol: "circle",
smooth: true,
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 2,
},
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "rgba(255, 156, 154, 0.50)",
},
{
offset: 0.8,
color: "rgba(255, 156, 154, 0)",
},
],
false
),
},
},
itemStyle: {
normal: {
color: "rgba(255, 156, 154, 1)",
borderColor: "rgba(255, 156, 154, 1)",
borderWidth: 1,
},
},
}] }]
var option = { var option = {
tooltip: { tooltip: {

BIN
src/assets/ttf.zip 100644

Binary file not shown.

View File

@ -77,9 +77,9 @@ export default {
store.nameList.forEach((el,index)=>{ store.nameList.forEach((el,index)=>{
if(index<8){ if(index<8){
if(store.equipmentName['fertilization'+store.nameList[index]]){ if(store.equipmentName['fertilization'+store.nameList[index]]){
console.log(store.equipmentName,2); // store.equipmentName['fertilization'+store.nameList[index]]
this.routerList[0].list.push({ this.routerList[0].list.push({
name:store.equipmentName['fertilization'+store.nameList[index]], name:'配方'+(index+1),
status: -1, status: -1,
index:index+1, index:index+1,
router: 'formula' router: 'formula'

View File

@ -56,6 +56,18 @@ const routes = [
path: '/sensorSet', path: '/sensorSet',
name: 'sensorSet', name: 'sensorSet',
component: () => import('../views/page/sensorSet.vue') component: () => import('../views/page/sensorSet.vue')
},{
path: '/history',
name: 'history',
component: () => import('../views/page/history.vue')
},{
path: '/dataAnalysis',
name: 'dataAnalysis',
component: () => import('../views/page/dataAnalysis.vue')
},{
path: '/systemManage',
name: 'systemManage',
component: () => import('../views/page/systemManage.vue')
},] },]
}, },
] ]

View File

@ -6,6 +6,7 @@ Vue.use(Vuex)
export default new Vuex.Store({ export default new Vuex.Store({
state: { state: {
lateSend: 100,//写入停止后 *100毫秒进行发送 例如10*100就是1000毫秒(1s) lateSend: 100,//写入停止后 *100毫秒进行发送 例如10*100就是1000毫秒(1s)
lateSendBtn: 10,//写入停止后 *100毫秒进行发送 例如10*100就是1000毫秒(1s)
equipmentList: [],//当前账户施肥设备 equipmentList: [],//当前账户施肥设备
equipmentIndex: 1,//当前在第几个设备 equipmentIndex: 1,//当前在第几个设备
equipmentName: null,//当前设备 小设备的各个名字 equipmentName: null,//当前设备 小设备的各个名字

View File

@ -64,16 +64,19 @@ export default {
{ name: '设定值参数', router: 'formula', index: 1, routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet'], img: require('../assets/image/header-img0.png') }, { name: '设定值参数', router: 'formula', index: 1, routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet'], img: require('../assets/image/header-img0.png') },
{ name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img1.png') }, { name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img1.png') },
{ name: '视频监控', router: '', routerList: [], img: require('../assets/image/header-img2.png') }, { name: '视频监控', router: '', routerList: [], img: require('../assets/image/header-img2.png') },
{ name: '历史数据', router: '', routerList: [], img: require('../assets/image/header-img3.png') }, // history history
{ name: '图库数据', router: '', routerList: [], img: require('../assets/image/header-img4.png') }, { name: '历史数据', router: '',index: 1, routerList: [''], img: require('../assets/image/header-img3.png') },
//dataAnalysis dataAnalysis
{ name: '数据分析', router: '',index: 1, routerList: [''], img: require('../assets/image/header-img4.png') },
{ name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img5.png') }, { name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img5.png') },
{ name: '管理', router: '', routerList: [], img: require('../assets/image/header-img6.png') }], //systemManage systemManage
{ name: '管理', router: '', routerList: [''], img: require('../assets/image/header-img6.png') }],
activeNames: [4], activeNames: [4],
leftList: [ leftList: [
{ name: '首页', img: require('../assets/image/index-icon.png'), list: [], router: 'realTime', isRouter: true, }, { name: '首页', img: require('../assets/image/index-icon.png'), list: [], router: 'realTime', isRouter: true, },
{ name: '一号温室', img: require('../assets/image/left-img0.png'), list: [] }, { name: '一号温室', img: require('../assets/image/left-img0.png'), list: [] },
{ name: '二号温室', img: require('../assets/image/left-img1.png'), list: [] }, { name: '二号温室', img: require('../assets/image/left-img1.png'), list: [] },
{ name: '施肥机', routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet', 'realTime'], img: require('../assets/image/left-img2.png'), list: [] },], { name: '施肥机', routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet', 'realTime','history','dataAnalysis'], img: require('../assets/image/left-img2.png'), list: [] },],
routerNow: 'realTime', routerNow: 'realTime',
routerIndex: 1, routerIndex: 1,
equipmentList: [], equipmentList: [],
@ -189,6 +192,12 @@ export default {
this.$store.state.equipmentIndex = item.index this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/${item.router}?index=${item.index ? item.index : 1}` }) this.$router.push({ path: `/${item.router}?index=${item.index ? item.index : 1}` })
}else if (item.router == 'history' && this.$route.query.index != item.index) {
this.$router.push({ path: `/history?index=${item.index ? item.index : 1}` })
}else if (item.router == 'dataAnalysis' && this.$route.query.index != item.index) {
this.$router.push({ path: `/dataAnalysis?index=${item.index ? item.index : 1}` })
} else if (item.router != this.routerNow && !item.http) { } else if (item.router != this.routerNow && !item.http) {
this.$router.push({ name: item.router }) this.$router.push({ name: item.router })
} }
@ -203,10 +212,13 @@ export default {
} else if (item.router == 'formula' && this.$route.query.index != item.index) { } else if (item.router == 'formula' && this.$route.query.index != item.index) {
if (this.routerNow == 'realTime') { if (this.routerNow == 'realTime') {
this.$router.push({ path: `/realTime?index=${item.index ? item.index : 1}` }) this.$router.push({ path: `/realTime?index=${item.index ? item.index : 1}` })
} else { } else if(this.routerNow == 'formula'){
this.$store.state.equipmentIndex = item.index this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/formula?index=${item.index ? item.index : 1}` }) this.$router.push({ path: `/formula?index=${item.index ? item.index : 1}` })
} else if(this.routerNow == 'history'){
this.$router.push({ path: `/history?index=${item.index ? item.index : 1}` })
} else if(this.routerNow == 'dataAnalysis'){
this.$router.push({ path: `/dataAnalysis?index=${item.index ? item.index : 1}` })
} }
} else if (item.router != this.routerNow && !item.http) { } else if (item.router != this.routerNow && !item.http) {
this.$router.push({ name: item.router }) this.$router.push({ name: item.router })

View File

@ -0,0 +1,66 @@
<template>
<div class="formula history dataAnalysis">
<!-- 数据分析 -->
<div class="page-content">
<div class="table-title">
<img src="../../assets/image/analysis.png" alt="" />
智慧水肥(数据分析)
</div>
<div class="search-flex">
<div class="search-right">
<span>时间段</span>
<el-date-picker v-model="value1" unlink-panels type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
<div class="input-btn">
<div class="btn green">
<img src="../../assets/image/irrigateSet1.png" alt="" />查询
</div>
</div>
</div>
</div>
<div class="analysis-charts">
<div class="charts" id="realTime-line"></div>
</div>
</div>
</div>
</template>
<script>
import { realTimeLine } from '@/assets/js/charts'
export default {
data() {
return {
value1: '',
indexs: 1,
}
},
mounted() {
this.indexs = this.$route.query.index ? this.$route.query.index : 1;
this.dataInit()
},
methods: {
dataInit() {
var store = this.$store.state
var equipmentId=store.equipmentList[this.indexs - 1].deviceId
var data1 = store.equipmentList[this.indexs - 1].deviceId
this.api.postFsdata(data1).then(res => {
if (res.data.code == 200) {
var chartsData = res.data.data
realTimeLine('realTime-line', chartsData)
} else {
this.$message.error(res.data.msg);
}
})
}
},
}
</script>
<style lang="scss"></style>

View File

@ -21,13 +21,13 @@
</div> </div>
<div class="input-main"> <div class="input-main">
<span>目标PH值</span> <span>目标PH值</span>
<input @blur="blurChange(store.formulaNum[indexs - 1], $event)" <input @blur="blurChangeCount(store.formulaNum[indexs - 1], $event)"
v-model="inputData[store.formulaNum[indexs - 1]]" v-model="inputData[store.formulaNum[indexs - 1]]"
@input="changeCount(store.formulaNum[indexs - 1], $event)" type="number" placeholder="0.0"> @input="changeCount(store.formulaNum[indexs - 1], $event)" type="number" placeholder="0.0">
</div> </div>
<div class="input-main"> <div class="input-main">
<span>目标EC值</span> <span>目标EC值</span>
<input @blur="blurChange(store.formulaNum[indexs - 1] + 1, $event)" <input @blur="blurChangeCount(store.formulaNum[indexs - 1] + 1, $event)"
v-model="inputData[store.formulaNum[indexs - 1] + 1]" v-model="inputData[store.formulaNum[indexs - 1] + 1]"
@input="changeCount(store.formulaNum[indexs - 1] + 1, $event)" type="number" placeholder="0.0"> @input="changeCount(store.formulaNum[indexs - 1] + 1, $event)" type="number" placeholder="0.0">
</div> </div>
@ -65,7 +65,7 @@
<div class="type0" v-if="scope.row.type == 0"> <div class="type0" v-if="scope.row.type == 0">
<div class="input-main-80 table-input"> <div class="input-main-80 table-input">
<span> {{ scope.row.data3 }}</span> <span> {{ scope.row.data3 }}</span>
<input @blur="blurChange(store.formulaNum[indexs - 1] + 24 + scope.$index, $event)" <input @blur="blurChangeCount(store.formulaNum[indexs - 1] + 24 + scope.$index, $event)"
v-model="inputData[store.formulaNum[indexs - 1] + 24]" v-model="inputData[store.formulaNum[indexs - 1] + 24]"
@input="changeCount(store.formulaNum[indexs - 1] + 24, $event)" type="number" style="height: 34px;" @input="changeCount(store.formulaNum[indexs - 1] + 24, $event)" type="number" style="height: 34px;"
placeholder="0.0"> placeholder="0.0">
@ -74,7 +74,7 @@
<div class="type0" v-if="scope.row.type == 1"> <div class="type0" v-if="scope.row.type == 1">
<div class="input-main-80 table-input"> <div class="input-main-80 table-input">
<span> {{ scope.row.data3 }}</span> <span> {{ scope.row.data3 }}</span>
<input @blur="blurChange(store.formulaNum[indexs - 1] + 25 + scope.$index, $event)" <input @blur="blurChangeCount(store.formulaNum[indexs - 1] + 25 + scope.$index, $event)"
v-model="inputData[store.formulaNum[indexs - 1] + 25]" v-model="inputData[store.formulaNum[indexs - 1] + 25]"
@input="changeCount(store.formulaNum[indexs - 1] + 25, $event)" type="number" style="height: 34px;" @input="changeCount(store.formulaNum[indexs - 1] + 25, $event)" type="number" style="height: 34px;"
placeholder="0.0"> placeholder="0.0">
@ -294,7 +294,22 @@ export default {
value: el.target.value * 10 value: el.target.value * 10
} }
}; };
console.log(data,11);
this.change(code, data) this.change(code, data)
},
//
blurChangeCount(code, el) {
var store=this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
regAddress: code,
num: el.target.value * 10,
}; //
if(this.timer){
this.timer && clearInterval(this.timer);
this.changeData(data);
}
}, },
// /10 // /10
countData1(data) { countData1(data) {

View File

@ -0,0 +1,129 @@
<template>
<div class="formula history">
<!-- 历史记录 -->
<div class="page-content">
<div class="table-title">
<img src="../../assets/image/history.png" alt="" />
智慧水肥(历史数据)
</div>
<div class="search-flex">
<div class="search-left">
<span>快速查询</span>
<div class="">
<div :class="timeSel==index?'active':''" @click="timeSel=index" v-for="item,index in timeList" :key="index">{{ item }}</div>
</div>
</div>
<div class="search-right" v-if="timeSel==2">
<span>快速查询</span>
<el-date-picker
v-model="value1"
unlink-panels
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
<div class="input-btn">
<div class="btn green">
<img src="../../assets/image/irrigateSet1.png" alt="" />查询
</div>
<div class="btn blue">
<img src="../../assets/image/irrigateSet3.png" alt="" />下载
</div>
<div class="btn blue" >
<img src="../../assets/image/irrigateSet2.png" alt="" />统计
</div>
</div>
</div>
</div>
<div class="table-view">
<el-table :data="tableData" :row-class-name="tableRowClassName" height="420" style="width: 100%">
<el-table-column prop="data0" width="180" label="时间">
<template slot-scope="scope">
<div>2023-09-23 14:08:19</div>
</template>
</el-table-column>
<el-table-column prop="data0" width="160" label="目标水肥PH">
<template slot-scope="scope">
<div>111</div>
</template>
</el-table-column>
<el-table-column prop="data0" width="200" label="1#肥EC(mS/cm)">
<template slot-scope="scope">
<div>111</div>
</template>
</el-table-column>
<el-table-column prop="data0" width="160" label="水肥PH">
<template slot-scope="scope">
<div>111</div>
</template>
</el-table-column>
<el-table-column prop="data0" width="200" label="目标水肥EC(mS/cm)">
<template slot-scope="scope">
<div>111</div>
</template>
</el-table-column>
<el-table-column prop="data0" width="160" label="2#水肥PH">
<template slot-scope="scope">
<div>111</div>
</template>
</el-table-column>
<el-table-column prop="data0" width="160" label="水肥EC(mS/cm)">
<template slot-scope="scope">
<div>111</div>
</template>
</el-table-column>
<el-table-column prop="data0" width="160" label="1#水肥PH">
<template slot-scope="scope">
<div>111</div>
</template>
</el-table-column>
<el-table-column prop="data0" width="200" label="2#水肥EC(mS/cm)">
<template slot-scope="scope">
<div>111</div>
</template>
</el-table-column>
<el-table-column prop="data0" width="160" label="1#水肥PH">
<template slot-scope="scope">
<div>111</div>
</template>
</el-table-column>
<el-table-column prop="data0" width="160" label="1#水肥PH">
<template slot-scope="scope">
<div>111</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
tableData:[{},{},{},{},{},{},],
timeList:['今日','昨日','自定义'],
timeSel:0,
value1:''
}
},
mounted() { },
methods: {
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return 'warning-row';
} else if (rowIndex % 2 == 0) {
return 'success-row';
}
return '';
}
},
}
</script>
<style lang="scss"></style>

View File

@ -874,7 +874,7 @@ export default {
value: parseInt(num, 2), value: parseInt(num, 2),
}, },
}; };
this.change(10 + (this.indexs - 1) + "00", dataNum); this.changeBtn(10 + (this.indexs - 1) + "00", dataNum);
}, },
padString(str, length) { padString(str, length) {
return str.padStart(length, '0'); return str.padStart(length, '0');
@ -920,7 +920,7 @@ export default {
value: parseInt(num, 2), value: parseInt(num, 2),
}, },
}; };
this.change(10 + (this.indexs - 1) + "59", dataNum); this.changeBtn(10 + (this.indexs - 1) + "59", dataNum);
}, },
getType() { getType() {
var number =this.padString( this.inputData[10 + (this.indexs - 1) + "59"].toString(2),4) var number =this.padString( this.inputData[10 + (this.indexs - 1) + "59"].toString(2),4)
@ -993,6 +993,31 @@ selectValue(e) {
} }
}, },
changeBtn(code,el){
var store=this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
regAddress: code,
num: el.target.value,
};
this.delayTimerBtn(0, data);
},
//btn j*100
delayTimerBtn(i, data) {
const that = this;
//
let j = this.$store.state.lateSendBtn;
//
this.timer && clearInterval(this.timer);
this.timer = setInterval(() => {
++i;
if (i == j) {
that.changeData(data);
clearInterval(this.timer);
}
}, 100);
},
// //
change(code, el) { change(code, el) {
var store=this.$store.state var store=this.$store.state

View File

@ -180,15 +180,15 @@ export default {
// } // }
if(el.equipmentNumber==0){ if(el.equipmentNumber==0){
if(el.targetValue==1){ if(el.targetValue==1){
name=el.environmentDataId+'(目标值)' name='目标'+el.environmentDataId
}else{ }else{
name=el.environmentDataId+'(1号平均值)' name='1#平均'+el.environmentDataId
} }
}else if(el.equipmentNumber==15){ }else if(el.equipmentNumber==15){
if(el.targetValue==1){ if(el.targetValue==1){
name=el.environmentDataId+'(目标值)' name='目标'+el.environmentDataId
}else{ }else{
name=el.environmentDataId+'(2号平均值)' name='2#平均'+el.environmentDataId
} }
}else{ }else{
name=el.equipmentNumber+'#'+el.environmentDataId name=el.equipmentNumber+'#'+el.environmentDataId
@ -212,7 +212,6 @@ export default {
var data1 = store.equipmentList[this.indexs - 1].deviceId var data1 = store.equipmentList[this.indexs - 1].deviceId
this.api.postFsdata(data1).then(res => { this.api.postFsdata(data1).then(res => {
console.log(res.data, 11);
if (res.data.code == 200) { if (res.data.code == 200) {
var chartsData=res.data.data var chartsData=res.data.data
realTimeLine('realTime-line',chartsData) realTimeLine('realTime-line',chartsData)

View File

@ -130,7 +130,7 @@ export default {
value:command, value:command,
}, },
}; };
this.change(this.numberList[this.active], dataNum); this.changeBtn(this.numberList[this.active], dataNum);
}, },
getSensorType(){ getSensorType(){
this.typeList.forEach((el,index)=>{ this.typeList.forEach((el,index)=>{
@ -163,7 +163,7 @@ export default {
value: parseInt(listNew, 2), value: parseInt(listNew, 2),
}, },
}; };
this.change('272', dataNum); this.changeBtn('272', dataNum);
}, },
getData272() { getData272() {
var inputData = this.inputData var inputData = this.inputData
@ -213,6 +213,31 @@ selectValue(e) {
this.changeData(data); this.changeData(data);
} }
},
changeBtn(code,el){
var store=this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
regAddress: code,
num: el.target.value,
};
this.delayTimerBtn(0, data);
},
//btn j*100
delayTimerBtn(i, data) {
const that = this;
//
let j = this.$store.state.lateSendBtn;
//
this.timer && clearInterval(this.timer);
this.timer = setInterval(() => {
++i;
if (i == j) {
that.changeData(data);
clearInterval(this.timer);
}
}, 100);
}, },
change(code, el) { change(code, el) {
var store = this.$store.state var store = this.$store.state

View File

@ -288,6 +288,7 @@ export default {
const that = this; const that = this;
if (localStorage.getItem('token')) { if (localStorage.getItem('token')) {
that.getEqbyid(); that.getEqbyid();
this.getReg()
setTimeout(() => { setTimeout(() => {
that.pageTimer && clearInterval(that.pageTimer) that.pageTimer && clearInterval(that.pageTimer)
that.pageTimer = setInterval(() => { that.pageTimer = setInterval(() => {
@ -525,7 +526,7 @@ export default {
var data = { var data = {
"equipmentId": deviceDetail.deviceId, "equipmentId": deviceDetail.deviceId,
"pattern": 0,// //6ph- "pattern": 0,// //6ph-
"regNum": 71 "regNum": 72
} }
var week = [ var week = [
"星期日", "星期日",
@ -542,7 +543,7 @@ export default {
this.getData30() //30/ this.getData30() //30/
this.getData29()//29 / this.getData29()//29 /
this.getReg()
this.getleft2List()// this.getleft2List()//
this.getrightList3()// this.getrightList3()//
this.getcenterBottom()// this.getcenterBottom()//
@ -570,7 +571,7 @@ export default {
return i; return i;
}, },
getReg() { getReg() {
var deviceDetail = this.deviceDetail var deviceDetail = store.equipmentList[store.equipmentIndex - 1]
// //
var data1 = { var data1 = {
equipmentId: deviceDetail.deviceId, equipmentId: deviceDetail.deviceId,

View File

@ -0,0 +1,62 @@
<template>
<div class="formula history systemManage">
<!-- 系统管理 -->
<div class="page-content">
<div class="table-title">
<img src="../../assets/image/set.png" alt="" />
管理
</div>
<div class="manage-sel">
<div @click="manageSel=0" :class="manageSel==0?'active':''"><img src="../../assets/image/user.png" alt="">系统信息修改</div>
<div @click="manageSel=1" :class="manageSel==1?'active':''"><img src="../../assets/image/compose.png" alt="">登录名称修改</div>
</div>
<!-- 系统信息修改 -->
<div class="manage-content manage-content-form scroll" v-if="manageSel==0">
<div class="manage-input">
<div>项目标头文字</div>
<input type="text" placeholder="输入项目标头文字" v-model="form.title">
</div>
<div class="manage-html">
<div>标头文字预贤</div>
<div class="html">
<div :style="form.style">{{ form.title }}</div>
</div>
</div>
<div class="manage-btn">保存</div>
</div>
<!-- 登录名称修改 -->
<div class="manage-content manage-content-input" v-if="manageSel==1">
<div class="manage-input">
<div>登录名</div>
<input type="text" placeholder="输入登录名" >
</div>
<div class="manage-input">
<div>昵称</div>
<input type="text" placeholder="输入昵称" >
</div>
<div class="manage-btn">保存</div>
</div>
</div>
</div>
</template>
<script>
export default {
data(){
return {
manageSel:0,
form:{
title:'智慧农业数字李生系统3.0版本 (西安邮电-西安交大联合开发)',
}
}
},
mounted(){},
methods:{},
}
</script>
<style lang="scss">
</style>

View File

@ -90,8 +90,8 @@ export default {
var store = this.$store.state var store = this.$store.state
var data = { var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId, equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
pattern: 55, // //6ph- pattern: 0, // //6ph-
regNum: 17, regNum: 72,
}; };
this.api.postState(data).then((res) => { this.api.postState(data).then((res) => {
console.log(res, 11); console.log(res, 11);

View File

@ -120,6 +120,7 @@ export default {
this.actList2.push(this.actList2New.length-index-1) this.actList2.push(this.actList2New.length-index-1)
} }
}) })
console.log(this.actList2);
}, },
dataInit() { dataInit() {
this.actList1New = [] this.actList1New = []
@ -164,6 +165,31 @@ selectValue(e) {
this.changeData(data); this.changeData(data);
} }
},
changeBtn(code,el){
var store=this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
regAddress: code,
num: el.target.value,
};
this.delayTimerBtn(0, data);
},
//btn j*100
delayTimerBtn(i, data) {
const that = this;
//
let j = this.$store.state.lateSendBtn;
//
this.timer && clearInterval(this.timer);
this.timer = setInterval(() => {
++i;
if (i == j) {
that.changeData(data);
clearInterval(this.timer);
}
}, 100);
}, },
change(code, el) { change(code, el) {
var store = this.$store.state var store = this.$store.state
@ -210,6 +236,7 @@ selectValue(e) {
} else { } else {
this.actList1.splice(this.actList1.indexOf(index), 1) this.actList1.splice(this.actList1.indexOf(index), 1)
} }
this.actList1New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0',]
this.actList1.forEach((el, index) => { this.actList1.forEach((el, index) => {
this.actList1New[this.actList1New.length-el-1] = '1' this.actList1New[this.actList1New.length-el-1] = '1'
}) })
@ -220,7 +247,7 @@ selectValue(e) {
value: parseInt(num, 2), value: parseInt(num, 2),
}, },
}; };
this.change('500', dataNum); this.changeBtn('500', dataNum);
}, },
selList2(index) { selList2(index) {
if (this.actList2.indexOf(index) == -1) { if (this.actList2.indexOf(index) == -1) {
@ -228,17 +255,18 @@ selectValue(e) {
} else { } else {
this.actList2.splice(this.actList2.indexOf(index), 1) this.actList2.splice(this.actList2.indexOf(index), 1)
} }
this.actList2New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0',]
this.actList2.forEach((el, index) => { this.actList2.forEach((el, index) => {
this.actList2New[this.actList2New.length-el-1] = '1' this.actList2New[this.actList2New.length-el-1] = '1'
}) })
console.log(this.actList2,this.actList2New,this.actList2New.join(""));
var num = this.actList2New.join(""); var num = this.actList2New.join("");
var dataNum = { var dataNum = {
target: { target: {
value: parseInt(num, 2), value: parseInt(num, 2),
}, },
}; };
this.change('501', dataNum); this.changeBtn('501', dataNum);
}, },
}, },