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({
state: {
nowInput:'',
lateSend: 100,//写入停止后 *100毫秒进行发送 例如10*100就是1000毫秒(1s)
lateSendBtn: 10,//写入停止后 *100毫秒进行发送 例如10*100就是1000毫秒(1s)
equipmentList: [],//当前账户施肥设备

View File

@ -160,12 +160,10 @@ export default {
}
});
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
@ -206,21 +204,18 @@ export default {
}, 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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
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
});
},
},

View File

@ -277,12 +277,10 @@ export default {
}
});
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
//
selectValue(e) {
e.currentTarget.select();
},
},
//
blurChange(code, el) {
var store = this.$store.state
@ -348,21 +346,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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
},

View File

@ -341,12 +341,10 @@ export default {
}
this.change(store.formulaNum[this.indexs - 1] + 2, dataSel);
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
@ -387,22 +385,18 @@ export default {
}, 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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
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
});
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {

View File

@ -978,11 +978,9 @@ export default {
});
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
selectValue(e) {
e.currentTarget.select();
},
//
blurChange10(code, el) {
var store=this.$store.state
@ -1063,21 +1061,18 @@ export default {
}, 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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
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
});
},
handleClose1(done) {
// this.$confirm('')

View File

@ -387,12 +387,10 @@ return num
}
});
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
//
selectValue(e) {
e.currentTarget.select();
},
},
getSendData(number) {
var number1 = number
this.typeList.some((el, index) => {
@ -501,21 +499,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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
},

View File

@ -265,12 +265,10 @@ return num
}
});
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
selectValue(e) {
e.currentTarget.select();
},
getSendData(number){
var number1=number
this.typeList.some((el, index) => {
@ -379,21 +377,18 @@ 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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
},

View File

@ -355,9 +355,7 @@ export default {
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
e.currentTarget.select();
},
//
blurChange(code, el) {
@ -424,21 +422,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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
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
});
},
},

View File

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

View File

@ -116,12 +116,10 @@ export default {
}
});
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
@ -162,21 +160,18 @@ export default {
}, 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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
},

View File

@ -301,12 +301,10 @@ export default {
}
});
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
@ -372,21 +370,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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
selList1(index) {
if (this.actList1.indexOf(index) == -1) {

View File

@ -147,12 +147,10 @@ export default {
}
});
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
@ -218,21 +216,18 @@ export default {
}, 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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
selList1(index) {
if (this.actList1.indexOf(index) == -1) {

View File

@ -185,8 +185,6 @@ export default {
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
},
//
@ -254,19 +252,15 @@ 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",
});
store.nowInput=''
// this.dataInit();
this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
this.$message.error("请求出错");
}
this.timer = null
});

View File

@ -158,10 +158,8 @@ 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
@ -227,21 +225,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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
},

View File

@ -273,12 +273,10 @@ return hexString;
})
this.getStatus(data)
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
//
selectValue(e) {
e.currentTarget.select();
},
},
//
blurChange(code, el) {
var store = this.$store.state
@ -344,21 +342,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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
},

View File

@ -172,12 +172,10 @@ export default {
})
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
//
selectValue(e) {
e.currentTarget.select();
},
},
//
blurChange(code, el) {
var store = this.$store.state
@ -243,21 +241,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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
},

View File

@ -277,12 +277,10 @@ export default {
}
})
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
//
selectValue(e) {
e.currentTarget.select();
},
},
//
blurChange(code, el) {
var store = this.$store.state
@ -348,21 +346,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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
},

View File

@ -168,11 +168,9 @@ export default {
})
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput=e.target.value
selectValue(e) {
e.currentTarget.select();
},
},
//
blurChange(code, el) {
var store = this.$store.state
@ -238,21 +236,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",
});
store.nowInput=''
// this.dataInit();
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
}
this.timer = null
});
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
});
},
},