fix(物联网): 调整首页报警、统计触发、设备详情解决分组切换问题和input默认值问题
This commit is contained in:
parent
e6a52dcfe9
commit
8383f214d9
|
@ -20,7 +20,7 @@
|
||||||
props:{
|
props:{
|
||||||
// 选择值
|
// 选择值
|
||||||
value: {
|
value: {
|
||||||
type: [String,null],
|
type: [String,Number],
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
// 图标
|
// 图标
|
||||||
|
@ -51,12 +51,20 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
if(this.value!=null){
|
||||||
|
this.inputValue = this.value+'';
|
||||||
|
}else{
|
||||||
this.inputValue = this.value;
|
this.inputValue = this.value;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value(newValue) {
|
value(newValue) {
|
||||||
|
if(newValue!=null){
|
||||||
|
this.inputValue = newValue+'';
|
||||||
|
}else{
|
||||||
this.inputValue = newValue;
|
this.inputValue = newValue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 输入值变化
|
// 输入值变化
|
||||||
|
|
|
@ -170,7 +170,7 @@
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
:name="item.name"
|
:name="item.name"
|
||||||
v-model="item.value"
|
v-model="item.value"
|
||||||
:unit="item.ioObj?item.ioObj.unit?item.ioObj.unit:'':''"
|
:unit="item.ioObj ? item.ioObj.unit ?item.ioObj.unit:'': ''"
|
||||||
@change="downData($event,index)"
|
@change="downData($event,index)"
|
||||||
@clickLog="clickLog(index)"
|
@clickLog="clickLog(index)"
|
||||||
></iots-input>
|
></iots-input>
|
||||||
|
@ -480,6 +480,7 @@
|
||||||
},
|
},
|
||||||
// 选择分组
|
// 选择分组
|
||||||
changeGroup(e){
|
changeGroup(e){
|
||||||
|
this.dataIndex = e;
|
||||||
if(e != 0){
|
if(e != 0){
|
||||||
const identifierMap = new Map();
|
const identifierMap = new Map();
|
||||||
this.dataAllData.forEach(val => {
|
this.dataAllData.forEach(val => {
|
||||||
|
@ -535,7 +536,6 @@
|
||||||
if(thingModel.contents.prop.length){
|
if(thingModel.contents.prop.length){
|
||||||
this.dataList = thingModel.contents.prop.map(item=>{
|
this.dataList = thingModel.contents.prop.map(item=>{
|
||||||
if(item.dataType=='int'){
|
if(item.dataType=='int'){
|
||||||
|
|
||||||
if(item.ioObj.IoDeployForm.min!=undefined){
|
if(item.ioObj.IoDeployForm.min!=undefined){
|
||||||
item.value = parseFloat(item.ioObj.IoDeployForm.min);
|
item.value = parseFloat(item.ioObj.IoDeployForm.min);
|
||||||
}else{
|
}else{
|
||||||
|
@ -824,7 +824,7 @@
|
||||||
// this.addLog('up',obj);
|
// this.addLog('up',obj);
|
||||||
this.deviceTime = this.$u.timeFormat(obj.fg_device_ts, 'yyyy-mm-dd hh:MM:ss');
|
this.deviceTime = this.$u.timeFormat(obj.fg_device_ts, 'yyyy-mm-dd hh:MM:ss');
|
||||||
if (obj) {
|
if (obj) {
|
||||||
let dataList = JSON.parse(JSON.stringify(this.dataList));
|
let dataList = JSON.parse(JSON.stringify(this.dataAllData));
|
||||||
// 这是连接的第一次获取,虽然进页面已经获取一次最新数据,但是可能存在断开之后的请求,所以需要遍历覆盖
|
// 这是连接的第一次获取,虽然进页面已经获取一次最新数据,但是可能存在断开之后的请求,所以需要遍历覆盖
|
||||||
for (let i = 0; i < dataList.length; i++) {
|
for (let i = 0; i < dataList.length; i++) {
|
||||||
for (let key in obj) {
|
for (let key in obj) {
|
||||||
|
@ -840,7 +840,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.$set(this,'dataList',dataList)
|
this.$set(this,'dataAllData',dataList)
|
||||||
|
this.changeGroup(this.dataIndex)
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,18 +170,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// showToggle() {
|
showToggle() {
|
||||||
// console.log("show变化")
|
console.log("show变化")
|
||||||
// clearInterval(this.timer);
|
// clearInterval(this.timer);
|
||||||
// this.timer = setInterval(() => {
|
// this.timer = setInterval(() => {
|
||||||
// this.mescroll.resetUpScroll();
|
// this.mescroll.resetUpScroll();
|
||||||
// console.log("当前起始项Index为", this.showStartIndex, this.showEndIndex);
|
this.getDeviceInfo();
|
||||||
|
console.log("当前起始项Index为", this.showStartIndex, this.showEndIndex);
|
||||||
// }, 5000)
|
// }, 5000)
|
||||||
// },
|
},
|
||||||
// hideToggle() {
|
hideToggle() {
|
||||||
// console.log("hide变化")
|
console.log("hide变化")
|
||||||
// clearInterval(this.timer);
|
// clearInterval(this.timer);
|
||||||
// },
|
},
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
|
Loading…
Reference in New Issue