Merge pull request '修改参数成功后取消数据请求' (#73) from pc-master into portal

Reviewed-on: #73
portal
xiaomeng 2023-12-14 00:13:35 +00:00
commit 25be1a7ad9
18 changed files with 312 additions and 229 deletions

View File

@ -5,6 +5,7 @@ Vue.use(Vuex)
export default new Vuex.Store({
state: {
nowInput:'',
lateSend: 100,//写入停止后 *100毫秒进行发送 例如10*100就是1000毫秒(1s)
lateSendBtn: 10,//写入停止后 *100毫秒进行发送 例如10*100就是1000毫秒(1s)
equipmentList: [],//当前账户施肥设备

View File

@ -161,9 +161,11 @@ export default {
});
},
//
selectValue(e) {
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
},
//
blurChange(code, el) {
var store=this.$store.state
@ -204,17 +206,20 @@ selectValue(e) {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer=null
this.timer = null
});
},
},

View File

@ -279,6 +279,8 @@ export default {
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
@ -346,15 +348,18 @@ export default {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});

View File

@ -342,9 +342,11 @@ export default {
this.change(store.formulaNum[this.indexs - 1] + 2, dataSel);
},
//
selectValue(e) {
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
},
//
blurChange(code, el) {
var store=this.$store.state
@ -385,18 +387,22 @@ selectValue(e) {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer=null
this.timer = null
});
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {

View File

@ -978,9 +978,11 @@ export default {
});
},
//
selectValue(e) {
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
},
//
blurChange10(code, el) {
var store=this.$store.state
@ -1061,17 +1063,20 @@ selectValue(e) {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer=null
this.timer = null
});
},
handleClose1(done) {

View File

@ -389,6 +389,8 @@ return num
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
getSendData(number) {
@ -499,15 +501,18 @@ return num
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});

View File

@ -266,9 +266,11 @@ return num
});
},
//
selectValue(e) {
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
},
getSendData(number){
var number1=number
this.typeList.some((el, index) => {
@ -377,17 +379,20 @@ getSendData(number){
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer=null
this.timer = null
});
},
},

View File

@ -355,6 +355,8 @@ export default {
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
@ -422,15 +424,18 @@ export default {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});

View File

@ -193,10 +193,10 @@ export default {
message: res.data.msg,
type: "success",
});
this.dataInit();
// this.dataInit();
} else {
this.$message.error("请求出错");
this.$message.error(res.data.msg);
}
if (this.nowSel.index != -1) {
this.timer = null

View File

@ -117,9 +117,11 @@ export default {
});
},
//
selectValue(e) {
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
},
//
blurChange(code, el) {
var store=this.$store.state
@ -160,17 +162,20 @@ selectValue(e) {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer=null
this.timer = null
});
},
},

View File

@ -302,9 +302,11 @@ export default {
});
},
//
selectValue(e) {
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
},
//
blurChange(code, el) {
var store=this.$store.state
@ -370,17 +372,20 @@ selectValue(e) {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer=null
this.timer = null
});
},
selList1(index) {

View File

@ -148,9 +148,11 @@ export default {
});
},
//
selectValue(e) {
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
},
//
blurChange(code, el) {
var store=this.$store.state
@ -216,17 +218,20 @@ selectValue(e) {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer=null
this.timer = null
});
},
selList1(index) {

View File

@ -185,6 +185,8 @@ export default {
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
@ -252,15 +254,19 @@ export default {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});

View File

@ -158,6 +158,8 @@ export default {
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
@ -225,15 +227,18 @@ export default {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});

View File

@ -275,6 +275,8 @@ return hexString;
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
@ -342,15 +344,18 @@ return hexString;
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});

View File

@ -174,6 +174,8 @@ export default {
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
@ -241,15 +243,18 @@ export default {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});

View File

@ -279,6 +279,8 @@ export default {
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
@ -346,15 +348,18 @@ export default {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});

View File

@ -169,6 +169,8 @@ export default {
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
@ -236,15 +238,18 @@ export default {
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
store.nowInput=''
// this.dataInit();
} else {
this.$message.error("请求出错");
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});