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

@ -161,11 +161,9 @@ export default {
}); });
}, },
// //
selectValue(e) { selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select(); e.currentTarget.select();
}, },
// //
blurChange(code, el) { blurChange(code, el) {
var store=this.$store.state var store=this.$store.state
@ -206,20 +204,17 @@ 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

@ -342,11 +342,9 @@ export default {
this.change(store.formulaNum[this.indexs - 1] + 2, dataSel); 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(); e.currentTarget.select();
}, },
// //
blurChange(code, el) { blurChange(code, el) {
var store=this.$store.state var store=this.$store.state
@ -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

@ -978,11 +978,9 @@ export default {
}); });
}, },
// //
selectValue(e) { selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select(); e.currentTarget.select();
}, },
// //
blurChange10(code, el) { blurChange10(code, el) {
var store=this.$store.state var store=this.$store.state
@ -1063,20 +1061,17 @@ 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
}); });
}, },
handleClose1(done) { handleClose1(done) {

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

@ -266,11 +266,9 @@ 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){
var number1=number var number1=number
this.typeList.some((el, index) => { this.typeList.some((el, index) => {
@ -379,20 +377,17 @@ 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

@ -117,11 +117,9 @@ export default {
}); });
}, },
// //
selectValue(e) { selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select(); e.currentTarget.select();
}, },
// //
blurChange(code, el) { blurChange(code, el) {
var store=this.$store.state var store=this.$store.state
@ -162,20 +160,17 @@ 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

@ -302,11 +302,9 @@ export default {
}); });
}, },
// //
selectValue(e) { selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select(); e.currentTarget.select();
}, },
// //
blurChange(code, el) { blurChange(code, el) {
var store=this.$store.state var store=this.$store.state
@ -372,20 +370,17 @@ 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
}); });
}, },
selList1(index) { selList1(index) {

View File

@ -148,11 +148,9 @@ export default {
}); });
}, },
// //
selectValue(e) { selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select(); e.currentTarget.select();
}, },
// //
blurChange(code, el) { blurChange(code, el) {
var store=this.$store.state var store=this.$store.state
@ -218,20 +216,17 @@ 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
}); });
}, },
selList1(index) { selList1(index) {

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
}); });