Compare commits
No commits in common. "98550c0e6be6f0469cb52e5a496027d5adcacda8" and "5c44f7060ef02e5a0878bfdc0720d755b3f2832a" have entirely different histories.
98550c0e6b
...
5c44f7060e
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "zhihuiyun",
|
||||
"name": "ysws-vue",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -43,12 +43,7 @@ input::-webkit-inner-spin-button {
|
|||
-webkit-appearance: none !important;
|
||||
margin: 0;
|
||||
}
|
||||
#app{
|
||||
min-width: 1290px;
|
||||
min-height: 900px;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Oswald;
|
||||
src: url(./assets/ttf/Oswald-Medium.ttf);
|
||||
|
|
|
@ -112,8 +112,4 @@ export default {
|
|||
getGethls(data){
|
||||
return sendGetRequest("/camera/gethls",data);
|
||||
},
|
||||
//根据ID查询用户信息
|
||||
getUser(data){
|
||||
return sendGetRequest('/api/sel/user',data)
|
||||
},
|
||||
};
|
|
@ -203,8 +203,8 @@
|
|||
}
|
||||
|
||||
.index {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
min-height: 900px;
|
||||
overflow: auto;
|
||||
background: url(../image/index-background.png) no-repeat;
|
||||
|
@ -377,13 +377,11 @@
|
|||
height: 100%;
|
||||
background: rgba(0, 29, 68, 0.25);
|
||||
border-right: 2px solid rgba(0, 180, 255, 0.25);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.index .index-content .right {
|
||||
width: calc(100% - 240px);
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.input-view {
|
||||
|
@ -1360,45 +1358,29 @@
|
|||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.realTime .page-content .realTime-list {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.realTime .page-content .realTime-list .seamless-warp {
|
||||
.realTime .page-content .flex-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.realTime .page-content .realTime-list .seamless-warp > div {
|
||||
display: flex;
|
||||
overflow: unset !important;
|
||||
}
|
||||
|
||||
.realTime .page-content .realTime-list .seamless-warp > div > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.realTime .page-content .realTime-list .seamless-warp .list-view {
|
||||
.realTime .page-content .flex-list > div {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.realTime .page-content .realTime-list .seamless-warp .list-view img {
|
||||
.realTime .page-content .flex-list > div img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.realTime .page-content .realTime-list .seamless-warp .list-view .text {
|
||||
.realTime .page-content .flex-list > div .text {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.realTime .page-content .realTime-list .seamless-warp .list-view .number {
|
||||
.realTime .page-content .flex-list > div .number {
|
||||
width: 106px;
|
||||
height: 40px;
|
||||
background: url(../image/real-time-text.png) no-repeat center;
|
||||
|
@ -1412,12 +1394,6 @@
|
|||
justify-content: center;
|
||||
}
|
||||
|
||||
.realTime .page-content .flex-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.realTime .page-content .realTime-bottom {
|
||||
height: 440px;
|
||||
margin-top: 30px;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -217,13 +217,14 @@
|
|||
}
|
||||
|
||||
.index {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
min-height: 900px;
|
||||
overflow: auto;
|
||||
background: url(../image/index-background.png) no-repeat;
|
||||
background-size: 1920px 1080px;
|
||||
background-position: center top;
|
||||
|
||||
.no-list {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
|
@ -391,13 +392,12 @@
|
|||
background: rgba(0, 29, 68, 0.25);
|
||||
border-right: 2px solid rgba(0, 180, 255, 0.25);
|
||||
|
||||
overflow: auto;
|
||||
|
||||
}
|
||||
|
||||
.right {
|
||||
width: calc(100% - 240px);
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1431,28 +1431,19 @@
|
|||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.realTime-list{
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
.seamless-warp{
|
||||
|
||||
.flex-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
// flex-wrap: wrap;
|
||||
|
||||
>div {
|
||||
// width: 100%!important;
|
||||
display: flex;
|
||||
overflow: unset!important;
|
||||
>div{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
.list-view {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-right: 20px;
|
||||
|
||||
img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
|
@ -1477,15 +1468,6 @@
|
|||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.flex-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
// flex-wrap: wrap;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -65,12 +65,5 @@ const router = new VueRouter({
|
|||
base: process.env.BASE_URL,
|
||||
routes
|
||||
})
|
||||
router.beforeEach(async (to,from,next) => {
|
||||
if (to.meta.title) { // 判断是否有标题
|
||||
document.title = to.meta.title;
|
||||
}else{
|
||||
document.title ='温室智慧云'
|
||||
}
|
||||
next();
|
||||
});
|
||||
|
||||
export default router
|
||||
|
|
|
@ -44,7 +44,7 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
// this.getTime()
|
||||
this.getTime()
|
||||
this.gerRouter();
|
||||
|
||||
if (localStorage.getItem('token')) {
|
||||
|
@ -53,10 +53,6 @@ export default {
|
|||
this.$router.push({ name: 'login' })
|
||||
|
||||
}
|
||||
this.$bus.$on('refreshTime',(res)=>{
|
||||
console.log(res,'time');
|
||||
this.time=res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
refreshData(){
|
||||
|
@ -108,8 +104,8 @@ export default {
|
|||
</script>
|
||||
<style lang="scss">
|
||||
.home {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
min-height: 900px;
|
||||
overflow: auto;
|
||||
background: url(../assets/image/background.jpg) no-repeat;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div class="header-right" v-if="userInfo">
|
||||
<img src="../assets/image/avatar.png" alt="">
|
||||
<div class="user-data">
|
||||
<div class="name">欢迎,{{ userInfo.nickName }}</div>
|
||||
<div class="name">欢迎,{{ userInfo.nickname }}</div>
|
||||
<div class="time" v-if="time"> {{ time.year.year }}-{{ time.year.month }}-{{ time.year.date }}</div>
|
||||
</div>
|
||||
<div class="login-out" @click="loginOut"></div>
|
||||
|
@ -32,9 +32,9 @@
|
|||
<li class="table-li" @click="toRouter1(item1)"
|
||||
:class="item.routerList.indexOf(routerNow) != -1 && routerIndex == item1.index ? 'active' : ''"
|
||||
v-for="item1, index1 in item.list" :key="index1">{{ item1.deviceTypeName }} <div
|
||||
class="status" :class="item1.deviceState == 0 ? 'outline' : 'online'"
|
||||
v-if="item1.deviceState >= 0">{{
|
||||
item1.deviceState == 0 ? '离线' : '在线' }}</div>
|
||||
class="status" :class="item1.status == 0 ? 'outline' : 'online'"
|
||||
v-if="item1.status >= 0">{{
|
||||
item1.status == 0 ? '离线' : '在线' }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</el-collapse-item>
|
||||
|
@ -79,7 +79,6 @@ export default {
|
|||
equipmentList: [],
|
||||
userInfo: null,
|
||||
loading:true,//页面加载
|
||||
IDTimer:null,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -88,36 +87,14 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
const that = this
|
||||
this.getTime()
|
||||
var router = this.$route.query
|
||||
if (router.token && router.userid) {
|
||||
localStorage.setItem('token', router.token)
|
||||
|
||||
this.api.getUser({ userId: router.userid }).then(res => {
|
||||
var data=res.data.data
|
||||
data.userid=router.userid
|
||||
localStorage.setItem('userInfo', JSON.stringify(data))
|
||||
this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
|
||||
this.gerRouter();
|
||||
this.getEqbyid()
|
||||
})
|
||||
return
|
||||
} else {
|
||||
if (localStorage.getItem('token')) {
|
||||
this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
|
||||
}
|
||||
this.gerRouter();
|
||||
this.getEqbyid()
|
||||
}
|
||||
this.IDTimer&&clearInterval( this.IDTimer)
|
||||
this.IDTimer= setInterval(() => {
|
||||
that.getEqbyid()
|
||||
}, 120000);
|
||||
|
||||
},
|
||||
beforeDestroy(){
|
||||
this.IDTimer&&clearInterval( this.IDTimer)
|
||||
|
||||
},
|
||||
methods: {
|
||||
//获取设备名称/配方名称
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<template>
|
||||
<div class="formula realTime">
|
||||
<div class="page-content">
|
||||
<div class="timeNow" v-if="list.length">
|
||||
<!-- {{ time.year.year }}-{{ time.year.month }}-{{ time.year.date }}<span> {{ time.time }}:{{ time.timeS
|
||||
}}</span> -->
|
||||
{{ list[0].updateTime?list[0].updateTime:'' }}
|
||||
<div class="timeNow" v-if="time">
|
||||
{{ time.year.year }}-{{ time.year.month }}-{{ time.year.date }}<span> {{ time.time }}:{{ time.timeS
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="table-title">
|
||||
<img src="../../assets/image/real-time.png" alt="" />
|
||||
|
@ -21,15 +20,12 @@
|
|||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="realTime-list" v-if="list.length">
|
||||
<vue-seamless class="seamless-warp" :data="list" :class-option="defaultOption">
|
||||
<div class="list-view" v-for="item, index in list " :key="index">
|
||||
<div class="flex-list scroll">
|
||||
<div class="" v-for="item, index in list " :key="index">
|
||||
<img :src="item.img" alt="">
|
||||
<div class="text">{{ item.name }}</div>
|
||||
<div class="number">{{ item.num }}</div>
|
||||
</div>
|
||||
</vue-seamless>
|
||||
|
||||
</div>
|
||||
<div class="flex-list realTime-bottom">
|
||||
<div class="left">
|
||||
|
@ -47,23 +43,8 @@ import { getnowtime } from '../../assets/js/nowTime'
|
|||
import { realTimeLine } from '@/assets/js/charts'
|
||||
import videojs from 'video.js';
|
||||
import video_zhCN from 'video.js/dist/lang/zh-CN.json'
|
||||
import vueSeamless from 'vue-seamless-scroll'
|
||||
export default {
|
||||
components: { vueSeamless },
|
||||
computed: {
|
||||
defaultOption() {
|
||||
return {
|
||||
step: 0.3, // 数值越大速度滚动越快
|
||||
limitMoveNum: 9, // 开始无缝滚动的数据量 this.dataList.length
|
||||
hoverStop: true, // 是否开启鼠标悬停stop
|
||||
direction: 2, // 0向下 1向上 2向左 3向右
|
||||
openWatch: true, // 开启数据实时监控刷新dom
|
||||
singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
|
||||
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
|
||||
waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
time: null,//右上角时间
|
||||
|
@ -88,7 +69,7 @@ export default {
|
|||
const that = this;
|
||||
this.indexs = this.$route.query.index ? this.$route.query.index : 1;
|
||||
|
||||
// this.getTime()
|
||||
this.getTime()
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
|
@ -98,7 +79,6 @@ export default {
|
|||
that.dataInit();
|
||||
}, 60000);
|
||||
}, 0);
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
const that = this;
|
||||
|
@ -107,7 +87,6 @@ export default {
|
|||
this.player.dispose();
|
||||
}
|
||||
that.timer&&clearInterval(that.timer)
|
||||
this.$bus.$off('refreshTime')
|
||||
},
|
||||
methods: {
|
||||
createVideo() {
|
||||
|
@ -195,11 +174,9 @@ export default {
|
|||
}
|
||||
|
||||
this.list.push({
|
||||
...el,
|
||||
name:name,
|
||||
num: num,
|
||||
img: require(`../../assets/image/real-time-${el.formula}.png`)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
@ -282,18 +282,18 @@ export default {
|
|||
beforeDestroy(){
|
||||
const that = this;
|
||||
this.$bus.$off('refreshData')
|
||||
that.pageTimer && clearInterval(that.pageTimer)
|
||||
// that.pageTimer&&clearInterval(that.pageTimer)
|
||||
},
|
||||
mounted() {
|
||||
const that = this;
|
||||
if (localStorage.getItem('token')) {
|
||||
that.getEqbyid();
|
||||
setTimeout(() => {
|
||||
that.pageTimer && clearInterval(that.pageTimer)
|
||||
that.pageTimer = setInterval(() => {
|
||||
that.getEqbyid();
|
||||
}, 5000);
|
||||
}, 0);
|
||||
// setTimeout(() => {
|
||||
// that.pageTimer&&clearInterval(that.pageTimer)
|
||||
// that.pageTimer= setInterval(() => {
|
||||
// that.getEqbyid();
|
||||
// }, 5000);
|
||||
// }, 0);
|
||||
} else {
|
||||
// this.$router.push({ name: 'login' })
|
||||
}
|
||||
|
@ -492,16 +492,15 @@ export default {
|
|||
var statusIndex = 8
|
||||
for (var j = 0; j < statusIndex; j++) {
|
||||
if (Number(number[number.length-1 - j])) {
|
||||
if (j == 0) {
|
||||
this.right2Index.push('1')
|
||||
} else if (j == 1) {
|
||||
this.right2Index.push('0')
|
||||
if(j=0){
|
||||
this.right2Index.push(1)
|
||||
}else if(j=1){
|
||||
this.right2Index.push(0)
|
||||
}else{
|
||||
this.right2Index.push(j)
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(this.right2Index, 123);
|
||||
},
|
||||
//进水泵和出水泵状态
|
||||
getData30() {
|
||||
|
@ -520,22 +519,12 @@ export default {
|
|||
// }
|
||||
},
|
||||
dataInit() {
|
||||
const that = this
|
||||
var deviceDetail = this.deviceDetail
|
||||
var data = {
|
||||
"equipmentId": deviceDetail.deviceId,
|
||||
"pattern": 0,//需要根据文档填写 //6目标ph-数值
|
||||
"regNum": 71
|
||||
}
|
||||
var week = [
|
||||
"星期日",
|
||||
"星期一",
|
||||
"星期二",
|
||||
"星期三",
|
||||
"星期四",
|
||||
"星期五",
|
||||
"星期六",
|
||||
]
|
||||
this.api.postState(data).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data;
|
||||
|
@ -546,29 +535,12 @@ export default {
|
|||
this.getleft2List()//获取左下角数据
|
||||
this.getrightList3()//获取又下角数据
|
||||
this.getcenterBottom()//获取电磁阀
|
||||
var h = this.checkTime(this.inputData[3])
|
||||
var m = this.checkTime(this.inputData[4])
|
||||
var month_ = this.checkTime(this.inputData[1])
|
||||
var date_ = this.checkTime(this.inputData[2])
|
||||
var time = {
|
||||
year: { year: this.inputData[0], month: month_, date: date_ },
|
||||
week: week[this.inputData[5]],
|
||||
time: h + ":" + m,
|
||||
}
|
||||
this.$bus.$emit('refreshTime',time)
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
checkTime(i) {
|
||||
if (i < 10) {
|
||||
i = "0" + i;
|
||||
}
|
||||
|
||||
return i;
|
||||
},
|
||||
getReg() {
|
||||
var deviceDetail = this.deviceDetail
|
||||
//获取传感器种类
|
||||
|
|
Loading…
Reference in New Issue