Compare commits

..

No commits in common. "25be1a7ad91b6c0fe4143451640f3199d0b544c5" and "f56e86569056c50f304f0849c4f57c84ee229e9e" have entirely different histories.

18 changed files with 229 additions and 312 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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