Compare commits

..

5 Commits

Author SHA1 Message Date
xiaomeng 7636f663c2 Merge pull request 'pc-master' (#140) from pc-master into portal
Reviewed-on: #140
2024-04-11 03:23:01 +00:00
孙萌 de7602f17c 1 2024-04-11 09:04:03 +08:00
孙萌 986a261270 1 2024-04-11 08:54:13 +08:00
孙萌 da8d754fed 1 2024-04-10 14:39:28 +08:00
孙萌 a3d4c5d62a 1 2024-04-08 10:34:00 +08:00
18 changed files with 211 additions and 115 deletions

View File

@ -54,12 +54,7 @@ export default {
var store = this.$store.state;
var item = store.equipmentList[store.equipmentIndex - 1]
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();
}
},
@ -86,6 +81,12 @@ export default {
}
},
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 data = store.equipmentList[store.equipmentIndex - 1].deviceId;
this.api.getcontrol_cpermission(data).then((res) => {
@ -338,6 +339,9 @@ export default {
if (router.token && router.userid) {
return
}
if(this.$route.name==this.routerList[0].router){
return
}
this.$router.push({ path: `/${this.routerList[0].router}` });

View File

@ -306,16 +306,14 @@ export default {
that.getActive1();
}, 0);
},
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() {
const that = this;
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(() => {
that.dataInit();
}, 0);
@ -565,6 +563,12 @@ export default {
this.changeBtn(21400, dataNum);
},
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 data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

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

View File

@ -154,16 +154,14 @@ export default {
that.getActive1();
}, 0);
},
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() {
const that = this;
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(() => {
that.dataInit();
}, 0);
@ -280,6 +278,12 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum);
},
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 data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -93,16 +93,14 @@ export default {
that.getActive1();
}, 0);
},
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() {
const that = this;
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(() => {
that.dataInit();
}, 0);
@ -219,6 +217,12 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum);
},
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 data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

@ -186,26 +186,19 @@ export default {
$route(newVal, oldVal) {
const that = this;
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(() => {
that.dataInit();
}, 0);
},
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() {
const that = this;
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(() => {
that.dataInit();
}, 0);
@ -296,6 +289,12 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum);
},
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 data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

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

View File

@ -173,16 +173,14 @@ export default {
that.getActive1();
}, 0);
},
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() {
const that = this;
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(() => {
that.dataInit();
}, 0);
@ -299,6 +297,12 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum);
},
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 data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

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

View File

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

View File

@ -143,16 +143,14 @@ export default {
that.getActive1();
}, 0);
},
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() {
const that = this;
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(() => {
that.dataInit();
}, 0);
@ -269,6 +267,12 @@ export default {
this.changeBtn(this.startList[this.indexs - 1], dataNum);
},
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 data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,

View File

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

View File

@ -214,16 +214,14 @@ export default {
that.getActive1();
}, 0);
},
'$store.state.equipmentIndex'(newVal, oldVal) {
this.dataInit();
},
},
mounted() {
const that = this;
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(() => {
that.dataInit();
}, 0);
@ -341,6 +339,12 @@ export default {
},
dataInit() {
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 = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
};

View File

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

View File

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

View File

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

View File

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

View File

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