|
@@ -18,7 +18,7 @@
|
|
|
</div>
|
|
|
<div class="sb">
|
|
|
<a-row type="flex" justify="space-between" :gutter="[20,20]">
|
|
|
-<!-- <a-col :span="6">
|
|
|
+ <!-- <a-col :span="6">
|
|
|
<div class="sb-info">
|
|
|
<div class="sb-info-title">
|
|
|
<span>{{ dataInfo.lineName }}</span>
|
|
@@ -124,7 +124,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</a-col> -->
|
|
|
- <a-col :span="6" v-for="(item,i) in dataInfo.dataList" :key="i" @click="handleView()">
|
|
|
+ <a-col :span="6" v-for="(item,i) in dataInfo.dataList" :key="i" @click="handleView(item)">
|
|
|
<div class="sb-info">
|
|
|
<div class="sb-info-title">
|
|
|
<!-- <span>2G06</span> -->
|
|
@@ -189,27 +189,45 @@
|
|
|
</a-col> -->
|
|
|
</a-row>
|
|
|
</div>
|
|
|
+ <DetailModel ref="detailModel" @ok="handleOk"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { getMeasureByLine } from '@/api/big/screen'
|
|
|
+import DetailModel from './modules/DetailModel'
|
|
|
export default {
|
|
|
- created () {
|
|
|
- this.getDatas(1)
|
|
|
+ components: {
|
|
|
+ DetailModel
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
- date: this.BaseTool.Moment().format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN_CHINESE),
|
|
|
+ date: null,
|
|
|
current: 1,
|
|
|
- dataInfo: {}
|
|
|
+ dataInfo: {},
|
|
|
+ time: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.timer1 = setInterval(() => {
|
|
|
+ this.getDatas(this.current)
|
|
|
+ }, 5000)
|
|
|
+ this.timer2 = setInterval(() => {
|
|
|
+ this.date = this.BaseTool.Moment().format(this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN_CHINESE)
|
|
|
+ }, 1000)
|
|
|
+ },
|
|
|
+ beforeDestroy () {
|
|
|
+ if (this.timer1) {
|
|
|
+ clearInterval(this.timer1)
|
|
|
+ }
|
|
|
+ if (this.timer2) {
|
|
|
+ clearInterval(this.timer2)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
getDatas (lineNum) {
|
|
|
this.current = lineNum
|
|
|
getMeasureByLine({ lineNum: lineNum }).then(res => {
|
|
|
- console.log(res.data)
|
|
|
this.dataInfo = res.data
|
|
|
this.dataInfo.dataList.forEach(item => {
|
|
|
// 截取名称字符串,去掉威胜多功能表
|
|
@@ -222,14 +240,14 @@ export default {
|
|
|
item.yggl = dianya == null ? '##' : yggl.result
|
|
|
item.wendu = item.measureList.find(li => li.type === 16) ? item.measureList.find(li => li.type === 16).result : null
|
|
|
})
|
|
|
- console.log(this.dataInfo)
|
|
|
})
|
|
|
},
|
|
|
- handleView () {
|
|
|
- const a = document.createElement('a')
|
|
|
- a.href = '/TransformerDetailBigScreen'
|
|
|
- a.target = '_blank'
|
|
|
- a.click()
|
|
|
+ handleView (item) {
|
|
|
+ // const a = document.createElement('a')
|
|
|
+ // a.href = '/TransformerDetailBigScreen'
|
|
|
+ // a.target = '_blank'
|
|
|
+ // a.click()
|
|
|
+ this.$refs.detailModel.base(item.measureList)
|
|
|
},
|
|
|
handleDayView () {
|
|
|
const a = document.createElement('a')
|
|
@@ -242,6 +260,9 @@ export default {
|
|
|
a.target = '_blank'
|
|
|
a.href = '/MonthStatistics'
|
|
|
a.click()
|
|
|
+ },
|
|
|
+ handleOk () {
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|