修改参数成功后取消数据请求 #73

Merged
xiaomeng merged 1 commits from pc-master into portal 2023-12-14 00:13:36 +00:00
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

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

View File

@ -277,10 +277,12 @@ 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
@ -346,18 +348,21 @@ export default {
}, 100);
},
changeData(data) {
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
} else {
this.$message.error("请求出错");
}
this.timer = null
});
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
},
},

View File

@ -341,10 +341,12 @@ export default {
}
this.change(store.formulaNum[this.indexs - 1] + 2, dataSel);
},
//
selectValue(e) {
e.currentTarget.select();
},
//
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) {
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
var store = this.$store.state
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
this.dataInit();
} else {
this.$message.error("请求出错");
}
this.timer=null
});
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {

View File

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

View File

@ -387,10 +387,12 @@ 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) => {
@ -499,18 +501,21 @@ return num
}, 100);
},
changeData(data) {
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
} else {
this.$message.error("请求出错");
}
this.timer = null
});
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
},
},

View File

@ -265,10 +265,12 @@ return num
}
});
},
//
selectValue(e) {
e.currentTarget.select();
},
//
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,18 +379,21 @@ getSendData(number){
}, 100);
},
changeData(data) {
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
} else {
this.$message.error("请求出错");
}
this.timer=null
});
var store = this.$store.state
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
},
},

View File

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

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

View File

@ -301,10 +301,12 @@ export default {
}
});
},
//
selectValue(e) {
e.currentTarget.select();
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
@ -369,19 +371,22 @@ selectValue(e) {
}
}, 100);
},
changeData(data) {
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
} else {
this.$message.error("请求出错");
}
this.timer=null
});
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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
},
selList1(index) {
if (this.actList1.indexOf(index) == -1) {

View File

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

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

View File

@ -273,10 +273,12 @@ return hexString;
})
this.getStatus(data)
},
//
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
@ -342,18 +344,21 @@ return hexString;
}, 100);
},
changeData(data) {
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
} else {
this.$message.error("请求出错");
}
this.timer = null
});
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
},
},

View File

@ -172,10 +172,12 @@ 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
@ -241,18 +243,21 @@ export default {
}, 100);
},
changeData(data) {
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
} else {
this.$message.error("请求出错");
}
this.timer = null
});
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
},
},

View File

@ -276,11 +276,13 @@ export default {
this.statusNum=res.data.data['1015']
}
})
},
//
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
@ -346,18 +348,21 @@ export default {
}, 100);
},
changeData(data) {
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
} else {
this.$message.error("请求出错");
}
this.timer = null
});
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
},
},

View File

@ -166,11 +166,13 @@ 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
@ -236,18 +238,21 @@ export default {
}, 100);
},
changeData(data) {
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
this.dataInit();
} else {
this.$message.error("请求出错");
}
this.timer = null
});
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
},
},