大屏滚动

This commit is contained in:
2022-08-01 12:28:31 +08:00
parent ebbf2aa57c
commit a01bfa857a
4 changed files with 23 additions and 14 deletions

View File

@@ -196,7 +196,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="item_wrap"> </div>
<div class="item_wrap">
<div class="item_tip"> <div class="item_tip">
<div class="item_tip_left">近10天设备故障统计</div> <div class="item_tip_left">近10天设备故障统计</div>
</div> </div>
@@ -207,7 +208,6 @@
<div id="echart_d10" style="width: 100%; height: 100%"></div> <div id="echart_d10" style="width: 100%; height: 100%"></div>
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>
</template> </template>
@@ -1696,7 +1696,7 @@ export default {
async _oeeAndTeep () { async _oeeAndTeep () {
let res = await oeeAndTeep() let res = await oeeAndTeep()
if (res.code === '1') { if (res.code === '1') {
console.log(res.result) // console.log(res.result)
this.data03 = res.result this.data03 = res.result
this.setEchart03() // 中1 this.setEchart03() // 中1
} else { } else {
@@ -1707,7 +1707,7 @@ export default {
async _queryDeviceByWork () { async _queryDeviceByWork () {
let res = await queryDeviceByWork() let res = await queryDeviceByWork()
if (res.code === '1') { if (res.code === '1') {
console.log(res.result) // console.log(res.result)
this.xData = [] this.xData = []
this.yData = [] this.yData = []
this.taskDate = [] this.taskDate = []
@@ -1730,7 +1730,7 @@ export default {
async _deviceCensus () { async _deviceCensus () {
let res = await deviceCensus() let res = await deviceCensus()
if (res.code === '1') { if (res.code === '1') {
console.log(res.result) // console.log(res.result)
this.data05_d0 = [] this.data05_d0 = []
this.data05_d1 = [] this.data05_d1 = []
this.data05_d2 = [] this.data05_d2 = []
@@ -1752,7 +1752,7 @@ export default {
async _deviceStatusList () { async _deviceStatusList () {
let res = await deviceStatusList() let res = await deviceStatusList()
if (res.code === '1') { if (res.code === '1') {
console.log(res.result) // console.log(res.result)
// let colors = ['#2D7CEB', '#07E083', '#00D5FF', '#CC6060', '#fc0'] // let colors = ['#2D7CEB', '#07E083', '#00D5FF', '#CC6060', '#fc0']
res.result.map((e, i) => { res.result.map((e, i) => {
if (e.device_status === '02') { if (e.device_status === '02') {
@@ -1782,7 +1782,7 @@ export default {
if (res.code === '1') { if (res.code === '1') {
this.data06_d0 = [] this.data06_d0 = []
this.data06_d1 = [] this.data06_d1 = []
console.log(res.result) // console.log(res.result)
res.result.map((e, i) => { res.result.map((e, i) => {
this.data06_d0.push(e.device_name) this.data06_d0.push(e.device_name)
this.data06_d1.push(e.err_num) this.data06_d1.push(e.err_num)
@@ -1796,7 +1796,7 @@ export default {
async _deviceErrorInfo () { async _deviceErrorInfo () {
let res = await deviceErrorInfo() let res = await deviceErrorInfo()
if (res.code === '1') { if (res.code === '1') {
console.log(res.result) // console.log(res.result)
this.array2 = res.result this.array2 = res.result
} else { } else {
this.Dialog(res.desc) this.Dialog(res.desc)
@@ -1806,7 +1806,7 @@ export default {
async _errCensus () { async _errCensus () {
let res = await errCensus() let res = await errCensus()
if (res.code === '1') { if (res.code === '1') {
console.log(res.result) // console.log(res.result)
this.chartData2 = res.result this.chartData2 = res.result
if (res.result.length) { if (res.result.length) {
clearInterval(this.timeOut3) clearInterval(this.timeOut3)

View File

@@ -5,6 +5,7 @@
</t-header> </t-header>
<Monitoring-Screen v-if="page === 'two'"></Monitoring-Screen> <Monitoring-Screen v-if="page === 'two'"></Monitoring-Screen>
<Device-Screen v-if="page === 'one'"></Device-Screen> <Device-Screen v-if="page === 'one'"></Device-Screen>
<section class="bottom"></section>
</section> </section>
</template> </template>
@@ -77,4 +78,7 @@ export default {
font-family "SourceHanSansCN" font-family "SourceHanSansCN"
_font(.18rem, .30rem, #fff, 700,) _font(.18rem, .30rem, #fff, 700,)
letter-spacing .01rem letter-spacing .01rem
.bottom
_wh(100%, .38rem)
background center bottom / 19.06rem 100% url(../assets/images/screen1/bottom.png) no-repeat
</style> </style>

View File

@@ -324,6 +324,7 @@ export default {
data () { data () {
return { return {
interTime: this.$store.getters.setTime, interTime: this.$store.getters.setTime,
timer1: null,
timer2: null, timer2: null,
timer3: null, timer3: null,
timeOut1: null, timeOut1: null,
@@ -392,6 +393,7 @@ export default {
}, },
beforeDestroy () { beforeDestroy () {
this.$once('hook:beforeDestroy', () => { this.$once('hook:beforeDestroy', () => {
clearInterval(this.timer1)
clearInterval(this.timer2) clearInterval(this.timer2)
clearInterval(this.timer3) clearInterval(this.timer3)
clearInterval(this.interTime) clearInterval(this.interTime)
@@ -403,7 +405,6 @@ export default {
initData () { initData () {
this._planReached() this._planReached()
this._worksectionHarvest() this._worksectionHarvest()
this._monthHarvest()
this._productSchedule() this._productSchedule()
this._output() this._output()
this._unfinishOrder() this._unfinishOrder()
@@ -412,9 +413,13 @@ export default {
}, },
refresh () { refresh () {
this.initData() this.initData()
this._monthHarvest()
this.timer2 = setInterval(() => { this.timer2 = setInterval(() => {
this.initData() this.initData()
}, this.interTime) }, this.interTime)
this.timer1 = setInterval(() => {
this._monthHarvest()
}, 50000)
}, },
setEchart1 () { setEchart1 () {
let date = [] let date = []

View File

@@ -69,8 +69,8 @@ export default {
password: '', password: '',
drift: 0, drift: 0,
baseUrl: this.$store.getters.baseUrl, baseUrl: this.$store.getters.baseUrl,
setTime: this.$store.getters.setTime, setTime: this.$store.getters.setTime / 1000,
setTime1: this.$store.getters.setTime1, setTime1: this.$store.getters.setTime1 / 1000,
fullscreen: false, fullscreen: false,
heightLimit: false, heightLimit: false,
option: [{value: '1', label: '海亮铜管智能车间生产监控中心'}, {value: '2', label: '海亮铜管智能车间设备监控中心'}, {value: '3', label: '海亮铜管智能车间AGV监控中心'}], option: [{value: '1', label: '海亮铜管智能车间生产监控中心'}, {value: '2', label: '海亮铜管智能车间设备监控中心'}, {value: '3', label: '海亮铜管智能车间AGV监控中心'}],
@@ -93,8 +93,8 @@ export default {
_config () { _config () {
let obj = { let obj = {
baseUrl: this.baseUrl, baseUrl: this.baseUrl,
setTime: this.setTime, setTime: this.setTime * 1000,
setTime1: this.setTime1 setTime1: this.setTime1 * 1000
// equipId: this.active // equipId: this.active
} }
this.$store.dispatch('setConfig', obj) this.$store.dispatch('setConfig', obj)