screenFront/src/views/MicroExhibition/index.vue

241 lines
5.9 KiB
Vue
Raw Normal View History

2023-12-05 09:01:51 +00:00
<!--
* @Author: hzz hzz
* @Date: 2023-12-05 13:30:45
* @LastEditors: hzz hzz
2023-12-06 07:18:31 +00:00
* @LastEditTime: 2023-12-06 15:17:05
2023-12-05 09:01:51 +00:00
* @FilePath: \screenFront\src\views\MicroExhibition\index.vue
* @Description:
*
* Copyright (c) 2023 by ${hzz}, All Rights Reserved.
-->
2023-08-23 10:06:47 +00:00
<template>
<div class="container">
<div class="header">
<div class="title">
2023-12-06 07:18:31 +00:00
<Header :title="'富怡服装微工厂物联管理平台'" :wh="{ width: '100%', height: '100px' }"></Header>
2023-08-23 10:06:47 +00:00
</div>
</div>
<div class="content">
<div class="left">
2023-12-05 09:01:51 +00:00
<div class="ltop">
<BoardVue :title="'裁剪设备'"></BoardVue>
2023-08-23 10:06:47 +00:00
</div>
2023-12-05 09:01:51 +00:00
<div class="lbottom">
2023-12-06 07:18:31 +00:00
<BoardVue :title="'缝前设备'">
<ScrollBoard :data="fqdata"></ScrollBoard>
</BoardVue>
2023-08-23 10:06:47 +00:00
</div>
</div>
2023-12-05 09:01:51 +00:00
<div class="right">
<div class="rtop">
<div class="rtleft">
2023-12-06 07:18:31 +00:00
<div class="rtltop">
<StepItem v-for="i in 4"></StepItem>
</div>
<div class="rtlbottom">
<video controls loop autoplay="true" width="777">
<source src="https://tjgoa.oss-cn-beijing.aliyuncs.com/20230914%E5%BE%AE%E5%B7%A5%E5%8E%82%E5%AE%A3%E4%BC%A0%E8%A7%86%E9%A2%91%E4%BA%8E%E6%89%BF%E5%BF%97.mp4"
type="video/mp4" />
</video>
<!-- <video class="video"
src="https://tjgoa.oss-cn-beijing.aliyuncs.com/20230914%E5%BE%AE%E5%B7%A5%E5%8E%82%E5%AE%A3%E4%BC%A0%E8%A7%86%E9%A2%91%E4%BA%8E%E6%89%BF%E5%BF%97.mp4"
autoplay></video> -->
</div>
2023-08-23 10:06:47 +00:00
</div>
2023-12-05 09:01:51 +00:00
<div class="rtright">
2023-12-06 07:18:31 +00:00
<BoardVue :title="'缝中设备'">
<ScrollBoard :data="fzdata"></ScrollBoard>
</BoardVue>
2023-08-23 10:06:47 +00:00
</div>
</div>
2023-12-05 09:01:51 +00:00
<div class="rbottom">
2023-12-06 07:18:31 +00:00
<BottomBorder></BottomBorder>
2023-08-24 10:10:09 +00:00
</div>
2023-08-23 10:06:47 +00:00
</div>
</div>
2023-12-06 07:18:31 +00:00
2023-08-23 10:06:47 +00:00
</div>
</template>
<script setup lang='ts'>
2023-12-05 09:01:51 +00:00
import Header from './component/Header.vue'
import BoardVue from './component/Border.vue'
2023-12-06 07:18:31 +00:00
import StepItem from './component/StepItem.vue'
import BottomBorder from './component/BottomBorder.vue'
import ScrollBoard from './component/ScrollBoard.vue'
2023-12-05 09:01:51 +00:00
2023-12-06 07:18:31 +00:00
import { ref, onMounted, onUnmounted, getCurrentInstance, watch, onUpdated, computed, reactive } from 'vue'
import { useMicroExhibitionStore } from '@/store/module/MicroExhibition'
2023-09-11 08:46:02 +00:00
import { connectWebsocket, closeWebsocket } from "@/utils/websocket"
2023-08-23 10:06:47 +00:00
import { useI18n } from 'vue-i18n'
let { t } = useI18n();
const store = useMicroExhibitionStore()
2023-12-06 07:18:31 +00:00
let fqdata = ref({
list: [],
rowNum: 3,
})
let fzdata = ref({
list: [],
rowNum: 10,
})
let listdata = reactive([])
let list = [
[1, '自动缝纫机', 29, 1, '95%', '12min'],
[1, '自动缝纫机', 29, 1, '95%', '12min'],
[1, '自动缝纫机', 29, 1, '95%', '12min'],
[1, '自动缝纫机', 29, 1, '95%', '12min'],
[1, '自动缝纫机', 29, 1, '95%', '12min'],]
setTimeout(() => {
fqdata.value.list.push(...list)
fzdata.value.list.push(...[...list, ...list, ...list])
}, 1000);
2023-09-12 10:11:14 +00:00
2023-09-09 04:01:37 +00:00
2023-09-11 08:46:02 +00:00
function getWebsocket(val) {
try {
let data = JSON.parse(val)
2023-12-05 09:01:51 +00:00
// if (data.type == 'StateChart') {
// store.setDevnum(data.msg)
// }
// if (data.type == 'WorkingState') {
// store.changestatus(data.msg)
// }
2023-09-11 08:46:02 +00:00
} catch (err) {
console.log(err);
2023-09-09 04:01:37 +00:00
}
2023-09-11 08:46:02 +00:00
}
function errWebsocket(val) {
2023-09-09 04:01:37 +00:00
// console.log(val);
}
2023-09-08 08:03:33 +00:00
onMounted(() => {
2023-09-11 08:46:02 +00:00
connectWebsocket(null, null, getWebsocket, errWebsocket)
2023-12-05 09:01:51 +00:00
document.getElementById('app').style.backgroundColor = 'rgba(0, 11, 18, 1)'
2023-09-08 08:03:33 +00:00
})
onUnmounted(() => {
2023-09-12 10:11:14 +00:00
closeWebsocket()
2023-12-05 09:01:51 +00:00
document.getElementById('app').style.backgroundColor = 'rgba(0, 11, 18, 1)'
2023-09-08 08:03:33 +00:00
})
2023-08-23 10:06:47 +00:00
</script>
2023-09-08 08:03:33 +00:00
2023-08-23 10:06:47 +00:00
<style scoped>
.container {
height: 1080px;
width: 1920px;
2023-09-06 10:05:57 +00:00
color: #FFFFFF;
2023-12-05 09:01:51 +00:00
background-color: rgba(0, 11, 18, 1);
2023-09-08 08:03:33 +00:00
position: relative;
2023-09-06 10:05:57 +00:00
2023-08-23 10:06:47 +00:00
}
.header {
2023-09-06 10:05:57 +00:00
height: 100px;
2023-08-23 10:06:47 +00:00
width: 1920px;
}
.content {
2023-09-06 10:05:57 +00:00
height: 980px;
2023-08-23 10:06:47 +00:00
width: 1920px;
display: flex;
flex-direction: row;
justify-content: space-between;
2023-09-06 10:05:57 +00:00
padding: 0 5px;
box-sizing: border-box;
2023-08-23 10:06:47 +00:00
}
2023-12-05 09:01:51 +00:00
.left {
width: 540px;
height: 100%;
margin-left: 13px;
2023-08-23 10:06:47 +00:00
display: flex;
flex-direction: column;
justify-content: space-between;
2023-12-05 09:01:51 +00:00
align-items: center;
2023-08-23 10:06:47 +00:00
}
2023-12-06 07:18:31 +00:00
2023-12-05 09:01:51 +00:00
.ltop {
2023-09-06 10:05:57 +00:00
width: 100%;
2023-12-05 09:01:51 +00:00
height: 630px;
2023-09-06 10:05:57 +00:00
}
2023-09-08 08:03:33 +00:00
2023-12-05 09:01:51 +00:00
.lbottom {
2023-09-06 10:05:57 +00:00
width: 100%;
2023-12-05 09:01:51 +00:00
height: 335px;
2023-09-06 10:05:57 +00:00
}
2023-08-24 10:10:09 +00:00
2023-12-05 09:01:51 +00:00
.right {
width: 1330px;
2023-08-24 10:10:09 +00:00
height: 100%;
2023-12-05 09:01:51 +00:00
margin-right: 13px;
2023-08-24 10:10:09 +00:00
display: flex;
2023-12-05 09:01:51 +00:00
flex-direction: column;
justify-content: space-between;
2023-08-24 10:10:09 +00:00
align-items: center;
2023-08-23 10:06:47 +00:00
}
2023-08-24 10:10:09 +00:00
2023-12-05 09:01:51 +00:00
.rtop {
width: 100%;
height: 715px;
2023-09-08 08:03:33 +00:00
display: flex;
2023-12-05 09:01:51 +00:00
flex-direction: row;
2023-09-08 08:03:33 +00:00
justify-content: space-between;
align-items: center;
}
2023-09-08 10:02:15 +00:00
2023-12-05 09:01:51 +00:00
.rbottom {
width: 100%;
height: 250px;
}
.rtleft {
width: 777px;
2023-09-08 08:03:33 +00:00
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
2023-09-08 10:02:15 +00:00
2023-12-05 09:01:51 +00:00
.rtltop {
width: 100%;
height: 120px;
2023-12-06 07:18:31 +00:00
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
2023-09-08 08:03:33 +00:00
}
2023-12-06 07:18:31 +00:00
2023-12-05 09:01:51 +00:00
.rtlbottom {
width: 100%;
height: 580px;
2023-12-06 07:18:31 +00:00
display: flex;
justify-content: center;
align-items: center;
/* background-image: url('./images/border.png');
background-repeat: no-repeat;
background-size: 100% 100%;
box-sizing: border-box;
padding: 10px; */
}
.rtlbottom .video {
width: 100%;
height: 100%;
object-fit: fill;
2023-09-08 08:03:33 +00:00
}
2023-09-08 10:02:15 +00:00
2023-12-05 09:01:51 +00:00
.rtright {
width: 540px;
2023-09-08 08:03:33 +00:00
height: 100%;
}
2023-09-11 08:46:02 +00:00
</style>