Compare commits
No commits in common. "adad14e6184626845b9d25c96c694bee007429db" and "8261f38e9a3e79c21fd2441da4c6ee58893103c7" have entirely different histories.
adad14e618
...
8261f38e9a
|
@ -687,13 +687,5 @@ getIccid(data){
|
|||
getFi_updateName(data){
|
||||
return sendPutRequest(`/getFi/updateName`, data)
|
||||
},
|
||||
//系统页面备忘录获取
|
||||
readControl_getMemo(data){
|
||||
return sendGetRequest(`/readControl/getMemo`, data)
|
||||
},
|
||||
//系统页面备忘录修改
|
||||
readControl_setMemo(data){
|
||||
return sendPostRequest(`/readControl/setMemo`, data)
|
||||
},
|
||||
|
||||
};
|
||||
|
|
|
@ -116,10 +116,6 @@
|
|||
max-height: 300px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.border-none {
|
||||
border: none !important;
|
||||
}
|
||||
|
@ -1380,12 +1376,6 @@ textarea {
|
|||
color: #A8B6C8;
|
||||
}
|
||||
|
||||
.system-tips.system-textarea {
|
||||
padding: 10px;
|
||||
height: auto;
|
||||
min-height: 101px;
|
||||
}
|
||||
|
||||
.upload .upload-view {
|
||||
width: 520px;
|
||||
height: 520px;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -118,9 +118,7 @@
|
|||
max-height: 300px;
|
||||
@extend .scroll;
|
||||
}
|
||||
textarea{
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.border-none {
|
||||
border: none !important;
|
||||
}
|
||||
|
@ -1438,11 +1436,6 @@ textarea{
|
|||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
color: #A8B6C8;
|
||||
&.system-textarea{
|
||||
padding: 10px;
|
||||
height: auto;
|
||||
min-height: 101px;
|
||||
}
|
||||
}
|
||||
|
||||
.upload {
|
||||
|
|
|
@ -94,12 +94,6 @@
|
|||
SIM:=0,SIM卡正常;=1,无SIM卡;=2,SIM卡异常(网络注册失败)<br>
|
||||
信号质量:CSQ<11 信号很差;11<CSQ<18,信号不稳定;CSQ>18,信号稳定,最大是31.
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>备忘录</span>
|
||||
</div>
|
||||
<textarea v-model="memoDetail.memo" @blur="blurMemo()" placeholder="备忘录"
|
||||
class="system-tips system-textarea" maxlength="1200">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -114,9 +108,6 @@ export default {
|
|||
inputData: [],
|
||||
loading:null,
|
||||
ICCID:'',
|
||||
memoDetail: {
|
||||
memo: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -258,30 +249,7 @@ this.dataInit();
|
|||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
this.getMemo()
|
||||
|
||||
},
|
||||
getMemo() {
|
||||
var store = this.$store.state
|
||||
var data1 = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.readControl_getMemo(data1).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
if (res.data.data) {
|
||||
this.memoDetail = res.data.data
|
||||
} else {
|
||||
this.memoDetail = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
id: "",
|
||||
memo: "",
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
getType(index) {
|
||||
if (index == 0) {
|
||||
return '控制器正常'
|
||||
|
@ -292,23 +260,6 @@ getMemo() {
|
|||
} else {
|
||||
return ' '
|
||||
}
|
||||
},
|
||||
//备忘录失去焦点
|
||||
blurMemo() {
|
||||
var data = this.memoDetail
|
||||
this.api.readControl_setMemo(data).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: "success",
|
||||
});
|
||||
if(!data.id){
|
||||
this.getMemo()
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
|
|
|
@ -75,12 +75,6 @@
|
|||
SIM:=0,SIM卡正常;=1,无SIM卡;=2,SIM卡异常(网络注册失败)<br>
|
||||
信号质量:CSQ<11 信号很差;11<CSQ<18,信号不稳定;CSQ>18,信号稳定,最大是31.
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>备忘录</span>
|
||||
</div>
|
||||
<textarea v-model="memoDetail.memo" @blur="blurMemo()" placeholder="备忘录"
|
||||
class="system-tips system-textarea" maxlength="1200">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -90,11 +84,7 @@ export default {
|
|||
return {
|
||||
inputData: [],
|
||||
loading:null,
|
||||
ICCID:'',
|
||||
|
||||
memoDetail: {
|
||||
memo: ''
|
||||
},
|
||||
ICCID:''
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -231,29 +221,6 @@ export default {
|
|||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
|
||||
this.getMemo()
|
||||
},
|
||||
getMemo() {
|
||||
var store = this.$store.state
|
||||
var data1 = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.readControl_getMemo(data1).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
if (res.data.data) {
|
||||
this.memoDetail = res.data.data
|
||||
} else {
|
||||
this.memoDetail = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
id: "",
|
||||
memo: "",
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
getType(index) {
|
||||
if (index == 0) {
|
||||
|
@ -266,23 +233,6 @@ export default {
|
|||
return ' '
|
||||
}
|
||||
},
|
||||
//备忘录失去焦点
|
||||
blurMemo() {
|
||||
var data = this.memoDetail
|
||||
this.api.readControl_setMemo(data).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: "success",
|
||||
});
|
||||
if(!data.id){
|
||||
this.getMemo()
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
var store = this.$store.state
|
||||
|
|
|
@ -7,100 +7,76 @@
|
|||
<div class="export-btn">导入设定值</div>
|
||||
</label>
|
||||
<div class="export-btn" @click="downLoadData">导出设定值</div>
|
||||
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt"
|
||||
@change="changeTxt" />
|
||||
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt" @change="changeTxt" />
|
||||
</div>
|
||||
<div class="table-title">
|
||||
<img src="../../assets/image/system.png" alt=""> 系统参数设置
|
||||
</div>
|
||||
<div class="flex-view border-none padding-none">
|
||||
<div class="input-main-80" style="width: auto;">
|
||||
<span>软件版本号</span>
|
||||
<input disabled v-model="inputData['76']" type="text" placeholder="0">
|
||||
<div class="input-main-80" style="width: auto;">
|
||||
<span>软件版本号</span>
|
||||
<input disabled v-model="inputData['76']" type="text" placeholder="0">
|
||||
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>施肥机状况</span>
|
||||
<input disabled v-model="inputData['77']" type="text" placeholder="0">
|
||||
<span></span>
|
||||
|
||||
</div>
|
||||
<div class="input-main-80" style="width: auto;">
|
||||
<span>施肥机剩余使用时间</span>
|
||||
<input disabled v-model="inputData['78']" type="text" placeholder="0">
|
||||
<span>天</span>
|
||||
</div>
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>施肥机状况</span>
|
||||
<input disabled v-model="inputData['77']" type="text" placeholder="0">
|
||||
<span></span>
|
||||
|
||||
</div>
|
||||
<div class="input-main-80" style="width: auto;">
|
||||
<span>施肥机剩余使用时间</span>
|
||||
<input disabled v-model="inputData['78']" type="text" placeholder="0">
|
||||
<span>天</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="input-main">
|
||||
<span>信号质量</span>
|
||||
<input disabled @blur="blurChange('65', $event)" v-model="inputData['65']"
|
||||
@input="change('65', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('65', $event)" v-model="inputData['65']" @input="change('65', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>SIM</span>
|
||||
<input disabled @blur="blurChange('66', $event)" v-model="inputData['66']"
|
||||
@input="change('66', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('66', $event)" v-model="inputData['66']" @input="change('66', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>4G</span>
|
||||
<input disabled @blur="blurChange('67', $event)" v-model="inputData['67']"
|
||||
@input="change('67', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('67', $event)" v-model="inputData['67']" @input="change('67', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-main-80" style="width: 100%;">
|
||||
<span>IP</span>
|
||||
<input disabled @blur="blurChange('68', $event)" v-model="inputData['68']"
|
||||
@input="change('68', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('69', $event)" v-model="inputData['69']"
|
||||
@input="change('69', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('70', $event)" v-model="inputData['70']"
|
||||
@input="change('70', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('71', $event)" v-model="inputData['71']"
|
||||
@input="change('71', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('68', $event)" v-model="inputData['68']" @input="change('68', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('69', $event)" v-model="inputData['69']" @input="change('69', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('70', $event)" v-model="inputData['70']" @input="change('70', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('71', $event)" v-model="inputData['71']" @input="change('71', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view" style="border: none;">
|
||||
|
||||
<div class="input-main-80">
|
||||
<span>ICCID</span>
|
||||
<input disabled @blur="blurChange('55', $event)" v-model="inputData['55']"
|
||||
@input="change16to10('55', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('56', $event)" v-model="inputData['56']"
|
||||
@input="change16to10('56', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('57', $event)" v-model="inputData['57']"
|
||||
@input="change16to10('57', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('58', $event)" v-model="inputData['58']"
|
||||
@input="change16to10('58', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('59', $event)" v-model="inputData['59']"
|
||||
@input="change16to10('59', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('60', $event)" v-model="inputData['60']"
|
||||
@input="change16to10('60', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('61', $event)" v-model="inputData['61']"
|
||||
@input="change16to10('61', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('62', $event)" v-model="inputData['62']"
|
||||
@input="change16to10('62', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('63', $event)" v-model="inputData['63']"
|
||||
@input="change16to10('63', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('64', $event)" v-model="inputData['64']"
|
||||
@input="change16to10('64', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('55', $event)" v-model="inputData['55']" @input="change16to10('55', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('56', $event)" v-model="inputData['56']" @input="change16to10('56', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('57', $event)" v-model="inputData['57']" @input="change16to10('57', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('58', $event)" v-model="inputData['58']" @input="change16to10('58', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('59', $event)" v-model="inputData['59']" @input="change16to10('59', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('60', $event)" v-model="inputData['60']" @input="change16to10('60', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('61', $event)" v-model="inputData['61']" @input="change16to10('61', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('62', $event)" v-model="inputData['62']" @input="change16to10('62', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('63', $event)" v-model="inputData['63']" @input="change16to10('63', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('64', $event)" v-model="inputData['64']" @input="change16to10('64', $event)" type="text" placeholder="0">
|
||||
</div>
|
||||
<div class="input-main-one">
|
||||
<div class="input-main-one">
|
||||
<span>ICCID</span>
|
||||
<input disabled v-model="ICCID" type="text" placeholder="0">
|
||||
<input disabled v-model="ICCID" type="text" placeholder="0">
|
||||
</div>
|
||||
<div class="system-tips">
|
||||
说明:4G:=0,无网络;=2,2G网络;=4,4G网络 <br>
|
||||
SIM:=0,SIM卡正常;=1,无SIM卡;=2,SIM卡异常(网络注册失败)<br>
|
||||
信号质量:CSQ<11 信号很差;11<CSQ<18,信号不稳定;CSQ>18,信号稳定,最大是31.
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>备忘录</span>
|
||||
</div>
|
||||
<textarea v-model="memoDetail.memo" @blur="blurMemo()" placeholder="备忘录"
|
||||
class="system-tips system-textarea" maxlength="1200">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -114,32 +90,28 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
inputData: [],
|
||||
loading: null,
|
||||
ICCID: '',
|
||||
|
||||
memoDetail: {
|
||||
memo: ''
|
||||
},
|
||||
loading:null,
|
||||
ICCID:''
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.dataInit()
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
for (let index = 0; index < inputList.length; index++) {
|
||||
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
|
||||
}
|
||||
},
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
for (let index = 0; index < inputList.length; index++) {
|
||||
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//文件下载导出
|
||||
downLoadData() {
|
||||
//文件下载导出
|
||||
downLoadData() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
|
@ -148,13 +120,13 @@ export default {
|
|||
});
|
||||
var store = this.$store.state
|
||||
var index = store.equipmentIndex;
|
||||
var devicecode = store.equipmentList[index - 1].deviceId
|
||||
var devicecode=store.equipmentList[index - 1].deviceId
|
||||
this.api.FsdataReadValuedownload(devicecode).then(res => {
|
||||
// 创建一个blob对象
|
||||
this.loading.close()
|
||||
console.log(res, 111);
|
||||
console.log(res,111);
|
||||
const blob = new Blob([res.data], { type: 'text/txt' });
|
||||
console.log(blob, 111);
|
||||
console.log(blob,111);
|
||||
// 创建一个a标签
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement('a');
|
||||
|
@ -181,45 +153,45 @@ export default {
|
|||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
var store = this.$store.state
|
||||
var deviceId = store.equipmentList[store.equipmentIndex - 1].deviceId
|
||||
var deviceId=store.equipmentList[store.equipmentIndex - 1].deviceId
|
||||
|
||||
const files = e.target.files
|
||||
const files = e.target.files
|
||||
|
||||
const that = this
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const formData = new FormData()
|
||||
console.log(files[i])
|
||||
formData.append('file', files[i])
|
||||
const fileContent = URL.createObjectURL(files[i])
|
||||
formData.append('devicecode', deviceId)
|
||||
this.api.upLoadFsdataWriteValue(formData).then((res) => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.$message.success(res.data.msg);
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.$refs.fileInput.value = ''
|
||||
}, 100)
|
||||
},
|
||||
change16to10(code, el) {
|
||||
var num = parseInt(el.target.value, 16)
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: num
|
||||
const that = this
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const formData = new FormData()
|
||||
console.log(files[i])
|
||||
formData.append('file', files[i])
|
||||
const fileContent = URL.createObjectURL(files[i])
|
||||
formData.append('devicecode', deviceId)
|
||||
this.api.upLoadFsdataWriteValue(formData).then((res) => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.$message.success(res.data.msg);
|
||||
}else{
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.$refs.fileInput.value = ''
|
||||
}, 100)
|
||||
},
|
||||
change16to10(code,el){
|
||||
var num=parseInt(el.target.value,16)
|
||||
var dataNum={
|
||||
target:{
|
||||
value:num
|
||||
}
|
||||
}
|
||||
this.change(code, dataNum)
|
||||
},
|
||||
fliter2(string) {
|
||||
var data = ''
|
||||
if (string.length < 2) {
|
||||
data = '0' + string
|
||||
} else {
|
||||
data = string
|
||||
fliter2(string){
|
||||
var data=''
|
||||
if(string.length<2){
|
||||
data='0'+string
|
||||
}else{
|
||||
data=string
|
||||
}
|
||||
return data
|
||||
},
|
||||
|
@ -232,58 +204,35 @@ export default {
|
|||
};
|
||||
this.api.postState(data).then((res) => {
|
||||
|
||||
this.loading.close()
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data;
|
||||
this.inputData['55'] = this.fliter2(this.inputData['55'].toString(16))
|
||||
this.inputData['56'] = this.fliter2(this.inputData['56'].toString(16))
|
||||
this.inputData['57'] = this.fliter2(this.inputData['57'].toString(16))
|
||||
this.inputData['58'] = this.fliter2(this.inputData['58'].toString(16))
|
||||
this.inputData['59'] = this.fliter2(this.inputData['59'].toString(16))
|
||||
this.inputData['60'] = this.fliter2(this.inputData['60'].toString(16))
|
||||
this.inputData['61'] = this.fliter2(this.inputData['61'].toString(16))
|
||||
this.inputData['62'] = this.fliter2(this.inputData['62'].toString(16))
|
||||
this.inputData['63'] = this.fliter2(this.inputData['63'].toString(16))
|
||||
this.inputData['64'] = this.fliter2(this.inputData['64'].toString(16))
|
||||
this.inputData['55']= this.fliter2(this.inputData['55'].toString(16))
|
||||
this.inputData['56']= this.fliter2(this.inputData['56'].toString(16))
|
||||
this.inputData['57']= this.fliter2(this.inputData['57'].toString(16))
|
||||
this.inputData['58']= this.fliter2(this.inputData['58'].toString(16))
|
||||
this.inputData['59']= this.fliter2(this.inputData['59'].toString(16))
|
||||
this.inputData['60']= this.fliter2(this.inputData['60'].toString(16))
|
||||
this.inputData['61']= this.fliter2(this.inputData['61'].toString(16))
|
||||
this.inputData['62']= this.fliter2(this.inputData['62'].toString(16))
|
||||
this.inputData['63']= this.fliter2(this.inputData['63'].toString(16))
|
||||
this.inputData['64']= this.fliter2(this.inputData['64'].toString(16))
|
||||
this.inputData['76'] = 'REV:' + this.inputData['76']
|
||||
this.inputData['77'] = this.getType(this.inputData['77'])
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
});
|
||||
var data1 = {
|
||||
var data1 = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.getFsIccid(data1).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.ICCID = res.data.msg
|
||||
} else {
|
||||
this.api.getFsIccid(data1).then(res=>{
|
||||
if(res.data.code==200){
|
||||
this.ICCID=res.data.msg
|
||||
}else{
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
this.getMemo()
|
||||
|
||||
},
|
||||
getMemo() {
|
||||
var store = this.$store.state
|
||||
var data1 = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.readControl_getMemo(data1).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
if (res.data.data) {
|
||||
this.memoDetail = res.data.data
|
||||
} else {
|
||||
this.memoDetail = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
id: "",
|
||||
memo: "",
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
getType(index) {
|
||||
if (index == 0) {
|
||||
|
@ -296,38 +245,21 @@ export default {
|
|||
return ' '
|
||||
}
|
||||
},
|
||||
//备忘录失去焦点
|
||||
blurMemo() {
|
||||
var data = this.memoDetail
|
||||
this.api.readControl_setMemo(data).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: "success",
|
||||
});
|
||||
if(!data.id){
|
||||
this.getMemo()
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
var store = this.$store.state
|
||||
store.nowInput = e.target.value
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
var store = this.$store.state
|
||||
store.nowInput=e.target.value
|
||||
e.currentTarget.select();
|
||||
},
|
||||
//失去焦点
|
||||
blurChange(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
},
|
||||
//失去焦点
|
||||
blurChange(code, el) {
|
||||
var store=this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
|
@ -335,7 +267,7 @@ export default {
|
|||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
},
|
||||
change(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
|
@ -362,24 +294,27 @@ 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
|
||||
// });
|
||||
// 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
|
||||
// });
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue