Compare commits

..

No commits in common. "7636f663c2262254c36933df7f3f7870aa94b7fd" and "38dd0b3a3cd133fc5e80fa5cdcb83b9cc51484fc" have entirely different histories.

18 changed files with 115 additions and 211 deletions

View File

@ -54,7 +54,12 @@ export default {
var store = this.$store.state; var store = this.$store.state;
var item = store.equipmentList[store.equipmentIndex - 1] var item = store.equipmentList[store.equipmentIndex - 1]
if(item.deviceName == 10 || item.deviceName == 30){ if(item.deviceName == 10 || item.deviceName == 30){
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.dataInit(); this.dataInit();
} }
}, },
@ -81,12 +86,6 @@ export default {
} }
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state; var store = this.$store.state;
var data = store.equipmentList[store.equipmentIndex - 1].deviceId; var data = store.equipmentList[store.equipmentIndex - 1].deviceId;
this.api.getcontrol_cpermission(data).then((res) => { this.api.getcontrol_cpermission(data).then((res) => {
@ -339,9 +338,6 @@ export default {
if (router.token && router.userid) { if (router.token && router.userid) {
return return
} }
if(this.$route.name==this.routerList[0].router){
return
}
this.$router.push({ path: `/${this.routerList[0].router}` }); this.$router.push({ path: `/${this.routerList[0].router}` });

View File

@ -306,14 +306,16 @@ export default {
that.getActive1(); that.getActive1();
}, 0); }, 0);
}, },
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
}, },
mounted() { mounted() {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -563,12 +565,6 @@ export default {
this.changeBtn(21400, dataNum); this.changeBtn(21400, dataNum);
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -319,14 +319,14 @@ export default {
loading:null, loading:null,
} }
}, },
watch:{
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() { mounted() {
const that = this; const that = this;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -489,12 +489,6 @@ export default {
this.changeBtn(code, dataNum); this.changeBtn(code, dataNum);
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -154,14 +154,16 @@ export default {
that.getActive1(); that.getActive1();
}, 0); }, 0);
}, },
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
}, },
mounted() { mounted() {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -278,12 +280,6 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum); this.changeBtn(this.startList[this.indexs - 1], dataNum);
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -93,14 +93,16 @@ export default {
that.getActive1(); that.getActive1();
}, 0); }, 0);
}, },
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
}, },
mounted() { mounted() {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -217,12 +219,6 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum); this.changeBtn(this.startList[this.indexs - 1], dataNum);
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -186,19 +186,26 @@ export default {
$route(newVal, oldVal) { $route(newVal, oldVal) {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
}, },
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
}, },
mounted() { mounted() {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -289,12 +296,6 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum); this.changeBtn(this.startList[this.indexs - 1], dataNum);
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -38,14 +38,13 @@
loading:null, loading:null,
} }
}, },
watch: {
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted(){ mounted(){
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.dataInit() this.dataInit()
}, },
methods:{ methods:{
@ -74,12 +73,6 @@
return list return list
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -173,14 +173,16 @@ export default {
that.getActive1(); that.getActive1();
}, 0); }, 0);
}, },
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
}, },
mounted() { mounted() {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -297,12 +299,6 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum); this.changeBtn(this.startList[this.indexs - 1], dataNum);
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -120,15 +120,17 @@ export default {
that.getActive1(); that.getActive1();
}, 0); }, 0);
}, },
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
}, },
mounted() { mounted() {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
setTimeout(() => { setTimeout(() => {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
that.dataInit(); that.dataInit();
}, 0); }, 0);
//input //input
@ -244,12 +246,6 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum); this.changeBtn(this.startList[this.indexs - 1], dataNum);
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -514,7 +514,7 @@
type="text" placeholder="0"> type="text" placeholder="0">
</div> </div>
</div> </div>
<el-dialog title="请输入密码" class="vrcode-model confirm-psw" top="30vh" :close-on-click-modal="false" :append-to-body="true" :visible.sync="warnModel" <el-dialog title="请输入密码" class="vrcode-model confirm-psw" top="30vh" :append-to-body="true" :visible.sync="warnModel"
width="700px"> width="700px">
<div class="vrcode-model-title vrcode-model-title-282">请输入密码</div> <div class="vrcode-model-title vrcode-model-title-282">请输入密码</div>
<div class="warning-model" style="padding: 0 30px;"> <div class="warning-model" style="padding: 0 30px;">
@ -567,14 +567,13 @@ export default {
loading:null, loading:null,
} }
}, },
watch: {
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() { mounted() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.dataInit() this.dataInit()
//input //input
let inputList = document.querySelectorAll('input'); let inputList = document.querySelectorAll('input');
@ -656,12 +655,6 @@ modelConfirm(){
return name return name
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -143,14 +143,16 @@ export default {
that.getActive1(); that.getActive1();
}, 0); }, 0);
}, },
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
}, },
mounted() { mounted() {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -267,12 +269,6 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum); this.changeBtn(this.startList[this.indexs - 1], dataNum);
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -686,14 +686,13 @@ export default {
loading:null, loading:null,
} }
}, },
watch: {
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() { mounted() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.dataInit() this.dataInit()
//input //input
let inputList = document.querySelectorAll('input'); let inputList = document.querySelectorAll('input');
@ -740,12 +739,6 @@ this.dataInit();
return name return name
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -214,14 +214,16 @@ export default {
that.getActive1(); that.getActive1();
}, 0); }, 0);
}, },
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
}, },
mounted() { mounted() {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -339,12 +341,6 @@ export default {
}, },
dataInit() { dataInit() {
var store = this.$store.state var store = this.$store.state
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
}; };

View File

@ -53,13 +53,13 @@ export default {
} }
}, },
watch:{
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() { mounted() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.dataInit() this.dataInit()
}, },
methods: { methods: {
@ -81,12 +81,6 @@ export default {
return list return list
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -98,14 +98,13 @@ export default {
loading:null, loading:null,
} }
}, },
watch: {
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() { mounted() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.dataInit() this.dataInit()
//input //input
let inputList = document.querySelectorAll('input'); let inputList = document.querySelectorAll('input');
@ -133,12 +132,6 @@ this.dataInit();
return data return data
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -205,16 +205,14 @@ export default {
loading:null, loading:null,
} }
}, },
watch: {
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() { mounted() {
const that = this; const that = this;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -294,12 +292,6 @@ export default {
this.change(code, sendData) this.change(code, sendData)
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -193,13 +193,13 @@ export default {
} }
}, },
watch:{
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() { mounted() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.dataInit() this.dataInit()
//input //input
let inputList = document.querySelectorAll('input'); let inputList = document.querySelectorAll('input');
@ -279,12 +279,6 @@ export default {
}) })
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.actList1New = [] this.actList1New = []
this.list1.forEach((el, index) => { this.list1.forEach((el, index) => {
this.actList1New.push('0') this.actList1New.push('0')

View File

@ -219,9 +219,6 @@
<span>湿帘水泵1:</span> <span>湿帘水泵1:</span>
</div> </div>
<div class="input-btn "> <div class="input-btn ">
<div class="btn" @click="changeOpen(0,21970)" :class="inputData[21970] == 0 ? 'blue' : 'green'">
无效
</div>
<div class="btn" @click="changeOpen(1,21970)" :class="inputData[21970] == 1 ? 'blue' : 'green'"> <div class="btn" @click="changeOpen(1,21970)" :class="inputData[21970] == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet2.png" alt="" />自动运行 <img src="../../assets/image/irrigateSet2.png" alt="" />自动运行
</div> </div>
@ -231,7 +228,6 @@
<div class="btn" @click="changeOpen(3,21970)" :class="inputData[21970] == 3 ? 'blue' : 'green'"> <div class="btn" @click="changeOpen(3,21970)" :class="inputData[21970] == 3 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet1.png" alt="" />手动关闭 <img src="../../assets/image/irrigateSet1.png" alt="" />手动关闭
</div> </div>
</div> </div>
</div> </div>
<div class="flex-view shrink-none"> <div class="flex-view shrink-none">
@ -248,9 +244,6 @@
<span>湿帘水泵2:</span> <span>湿帘水泵2:</span>
</div> </div>
<div class="input-btn "> <div class="input-btn ">
<div class="btn" @click="changeOpen(0,21972)" :class="inputData[21972] == 0 ? 'blue' : 'green'">
无效
</div>
<div class="btn" @click="changeOpen(1,21972)" :class="inputData[21972] == 1 ? 'blue' : 'green'"> <div class="btn" @click="changeOpen(1,21972)" :class="inputData[21972] == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet2.png" alt="" />自动运行 <img src="../../assets/image/irrigateSet2.png" alt="" />自动运行
</div> </div>
@ -395,14 +388,16 @@ export default {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
}, },
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
}, },
mounted() { mounted() {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -633,12 +628,6 @@ export default {
this.changeBtn(code, dataNum); this.changeBtn(code, dataNum);
}, },
dataInit() { dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,