|
|
@ -60,6 +60,7 @@ |
|
|
|
return { |
|
|
|
currentIndex: 0, |
|
|
|
processNodeIndex: 0, |
|
|
|
timer: null, |
|
|
|
nodeInfo: { |
|
|
|
fbsj: '', |
|
|
|
jfbSeconds: '', |
|
|
@ -86,7 +87,8 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
async mounted() { |
|
|
|
console.log(this.reportType, this.firstAidId) |
|
|
|
// console.log(this.reportType, this.firstAidId) |
|
|
|
console.log('mounted') |
|
|
|
if (this.reportType == 'modal') { |
|
|
|
this.init(this.dataSource.firstAidId); |
|
|
|
} else if (this.firstAidId) { |
|
|
@ -110,6 +112,12 @@ |
|
|
|
//初始化数据 |
|
|
|
async init(firstAidId) { |
|
|
|
this.getNextNode(firstAidId); |
|
|
|
this.timer = null; |
|
|
|
this.timer = setInterval(()=>{ |
|
|
|
console.log('10mmin') |
|
|
|
this.getNextNode(firstAidId); |
|
|
|
}, 10000) |
|
|
|
|
|
|
|
}, |
|
|
|
async getNextNode(firstAidId) { |
|
|
|
let res = await getNextNode({ |
|
|
@ -131,6 +139,14 @@ |
|
|
|
onSubmit() { |
|
|
|
this.$emit('next') |
|
|
|
} |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
|
console.log("beforeDestroy") |
|
|
|
// 清除定时器 |
|
|
|
if(this.timer){ |
|
|
|
clearInterval(this.timer); |
|
|
|
this.timer = null |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|