|
|
@ -2,13 +2,22 @@
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div class="bg">
|
|
|
|
<div class="bg">
|
|
|
|
<div class="title1">黑蚊香车间生产监控看板</div>
|
|
|
|
<div class="title1">黑蚊香车间生产监控看板</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 新增横向滚动标题 -->
|
|
|
|
|
|
|
|
<div class="scroll-title-container">
|
|
|
|
|
|
|
|
<div class="scroll-title-content">
|
|
|
|
|
|
|
|
{{ scrollText }} <!-- Vue数据绑定 -->
|
|
|
|
|
|
|
|
<!-- 如需静态文字可直接写在这里 -->
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="floorNum floorNum1">1F</div>
|
|
|
|
<div class="floorNum floorNum1">1F</div>
|
|
|
|
<div class="floorNum floorNum2">2F</div>
|
|
|
|
<div class="floorNum floorNum2">2F</div>
|
|
|
|
<div class="floorNum floorNum3">3F</div>
|
|
|
|
<div class="floorNum floorNum3">3F</div>
|
|
|
|
<div class="floorNum floorNum4" @click="$router.push('/cs2')">4F</div>
|
|
|
|
<div class="floorNum floorNum4" @click="$router.push('/cs2')">4F</div>
|
|
|
|
<div class="floorNum floorNum5">5F</div>
|
|
|
|
<div class="floorNum floorNum5">5F</div>
|
|
|
|
<div class="floorNum floorNum6">6F</div>
|
|
|
|
<div class="floorNum floorNum6">6F</div>
|
|
|
|
<div class="output" v-for="i in outputData" :style="`left:${i.left}%`"><span>产量:10车</span></div>
|
|
|
|
<div class="output" v-for="i in outputData" :style="`left:${i.left}%`"><span>{{i.no}}</span></div>
|
|
|
|
<div v-for="i in equipmentData" class="equipment" :style="`left: ${i.left}%`">
|
|
|
|
<div v-for="i in equipmentData" class="equipment" :style="`left: ${i.left}%`">
|
|
|
|
<div :class="i.isRight?'equipmentName1':'equipmentName'"><span>设备名称</span></div>
|
|
|
|
<div :class="i.isRight?'equipmentName1':'equipmentName'"><span>设备名称</span></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -125,19 +134,55 @@
|
|
|
|
<div class="arrow" :style="`top: 62%;left: 75.3%;transform: rotate(345deg);`"></div>
|
|
|
|
<div class="arrow" :style="`top: 62%;left: 75.3%;transform: rotate(345deg);`"></div>
|
|
|
|
<div class="arrow" :style="`top: 66%;left: 76.1%;transform: rotate(345deg);`"></div>
|
|
|
|
<div class="arrow" :style="`top: 66%;left: 76.1%;transform: rotate(345deg);`"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="bottomArrows" v-for="(i,k) in 9">
|
|
|
|
<div class="bottomArrows" v-for="(i,k) in 9">
|
|
|
|
<div class="arrow" :style="`top: 72.5%;left: ${31.9 + 5.2*k}%;`"></div>
|
|
|
|
<div class="arrow" :style="`top: 72.5%;left: ${31.9 + 5.2*k}%;`"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="bottomArrows" v-for="(i,k) in 5">
|
|
|
|
<div class="bottomArrows" v-for="(i,k) in 5">
|
|
|
|
<div class="arrow" :style="`top: 73.7%;left: ${50.5 - 5.2*k}%;`"></div>
|
|
|
|
<div class="arrow" :style="`top: 73.7%;left: ${50.5 - 5.2*k}%;`"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- <div class="fixed-table-container">-->
|
|
|
|
|
|
|
|
<!-- <el-table ref="autoScrollTable" :data="tableData" style="width: 80%" height="200" class="transparent-table">-->
|
|
|
|
|
|
|
|
<!-- <el-table-column prop="time" label="时间" width="120"></el-table-column>-->
|
|
|
|
|
|
|
|
<!-- <el-table-column prop="device" label="设备" width="120"></el-table-column>-->
|
|
|
|
|
|
|
|
<!-- </el-table>-->
|
|
|
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
|
|
|
|
|
|
|
<div v-for="i in infoData " class="info"
|
|
|
|
<div v-for="i in infoData " class="info"
|
|
|
|
:style="`top: ${i.top}%;left: ${i.left}%;transform: rotate(${i.rotate}deg);`">
|
|
|
|
:style="`width: ${i.width}%; height: ${i.height}%;top: ${i.top}%;left: ${i.left}%;transform: rotate(${i.rotate}deg); background: #CB4C4C${i.alpha};border-radius: ${i.radius}%;`">
|
|
|
|
<div :class="i.isRight?'infoModel':'infoModel'" :style="`transform: rotate(${360 -i.rotate}deg);`">
|
|
|
|
<div :class="i.isRight?'infoModel':'infoModel'" :style="`transform: rotate(${360 -i.rotate}deg);`">
|
|
|
|
<div class="title">设备名称</div>
|
|
|
|
<div class="title">{{ i.equipmentName }}</div>
|
|
|
|
<div class="equipmentOutput"><span style="color: #fff9">设备产量:</span> 10</div>
|
|
|
|
<div style="color: #fff;
|
|
|
|
<div class="equipmentInfo"><span style="color: #fff9">设备信息:</span> 10</div>
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 65%;
|
|
|
|
|
|
|
|
font-size: 0.6vw;
|
|
|
|
|
|
|
|
letter-spacing: 3px;
|
|
|
|
|
|
|
|
left: 7%;"><span style="color: #fff9">产品:</span> <span>{{ i.productName }}</span></div>
|
|
|
|
|
|
|
|
<div style="color: #fff;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 90%;
|
|
|
|
|
|
|
|
font-size: 0.6vw;
|
|
|
|
|
|
|
|
letter-spacing: 3px;
|
|
|
|
|
|
|
|
left: 7%;"><span style="color: #fff9">产量:</span> <span>{{ i.quantityFeedback }}</span></div>
|
|
|
|
|
|
|
|
<div style="color: #fff;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 110%;
|
|
|
|
|
|
|
|
font-size: 0.6vw;
|
|
|
|
|
|
|
|
letter-spacing: 3px;
|
|
|
|
|
|
|
|
left: 7%;"><span style="color: #fff9">订单号:</span> <span>{{ i.workorderCodeSap }}</span></div>
|
|
|
|
|
|
|
|
<div style="color: #fff;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 130%;
|
|
|
|
|
|
|
|
font-size: 0.6vw;
|
|
|
|
|
|
|
|
letter-spacing: 3px;
|
|
|
|
|
|
|
|
left: 7%;"><span style="color: #fff9">工单日期:</span> <span>{{ i.productDate }}</span></div>
|
|
|
|
|
|
|
|
<div style="color: #fff;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 155%;
|
|
|
|
|
|
|
|
font-size: 0.6vw;
|
|
|
|
|
|
|
|
letter-spacing: 3px;
|
|
|
|
|
|
|
|
left: 7%;"><span style="color: #fff9">组长:</span> <span>{{ i.teamLeaderNames }}</span></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -145,118 +190,208 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import {getDailyReportNew} from "../../api/mes/reportWork";
|
|
|
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
isRun: [1, 2, 3, 4, 5, 6, 7, 8],
|
|
|
|
url: "ws://127.0.0.1:9208/websocket/message",
|
|
|
|
|
|
|
|
message: "",
|
|
|
|
|
|
|
|
text_content: "",
|
|
|
|
|
|
|
|
scrollText: "",
|
|
|
|
|
|
|
|
repairOrders:[],
|
|
|
|
|
|
|
|
ws: null,
|
|
|
|
|
|
|
|
// 查询参数
|
|
|
|
|
|
|
|
queryParams: {
|
|
|
|
|
|
|
|
timeArray: [],
|
|
|
|
|
|
|
|
productDateStart: null,
|
|
|
|
|
|
|
|
productDateEnd: null,
|
|
|
|
|
|
|
|
sapName: null,
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
|
|
|
workCenter: null,
|
|
|
|
|
|
|
|
factoryCode: null
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
tableData: [
|
|
|
|
|
|
|
|
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
|
|
|
|
|
|
|
|
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
|
|
|
|
|
|
|
|
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
|
|
|
|
|
|
|
|
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
|
|
|
|
|
|
|
|
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
|
|
|
|
|
|
|
|
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
|
|
|
|
|
|
|
|
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
|
|
|
|
|
|
|
|
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
|
|
|
|
|
|
|
|
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
|
|
|
|
|
|
|
|
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
|
|
|
|
|
|
|
|
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
|
|
|
|
|
|
|
|
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
|
|
|
|
|
|
|
|
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
|
|
|
|
|
|
|
|
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
|
|
|
|
|
|
|
|
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
|
|
|
|
|
|
|
|
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
|
|
|
|
|
|
|
|
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
|
|
|
|
|
|
|
|
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更多数据...
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
scrollInterval: null,
|
|
|
|
|
|
|
|
isRun: [1, 2, 3, 4, 5, 6, 7, 8,9],
|
|
|
|
infoData: [
|
|
|
|
infoData: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
top: 28,
|
|
|
|
top: 31,
|
|
|
|
left: 32.7,
|
|
|
|
left: 13.6,
|
|
|
|
|
|
|
|
rotate: 14,
|
|
|
|
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
height:40,
|
|
|
|
|
|
|
|
alpha: '80',
|
|
|
|
|
|
|
|
radius:20,
|
|
|
|
|
|
|
|
isRight: false,
|
|
|
|
|
|
|
|
equipmentName: "包装线11"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
top: 31,
|
|
|
|
|
|
|
|
left: 20.3,
|
|
|
|
|
|
|
|
rotate: 14,
|
|
|
|
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
height:40,
|
|
|
|
|
|
|
|
alpha: '80',
|
|
|
|
|
|
|
|
radius:20,
|
|
|
|
|
|
|
|
isRight: false,
|
|
|
|
|
|
|
|
equipmentName: "包装线10"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
top: 31,
|
|
|
|
|
|
|
|
left: 24.3,
|
|
|
|
|
|
|
|
rotate: 10,
|
|
|
|
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
height:40,
|
|
|
|
|
|
|
|
alpha: '80',
|
|
|
|
|
|
|
|
radius:20,
|
|
|
|
|
|
|
|
isRight: false,
|
|
|
|
|
|
|
|
equipmentName: "包装线09"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
top: 31,
|
|
|
|
|
|
|
|
left: 33.7,
|
|
|
|
rotate: 7,
|
|
|
|
rotate: 7,
|
|
|
|
isRight: false
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
height:40,
|
|
|
|
|
|
|
|
alpha: '80',
|
|
|
|
|
|
|
|
radius:20,
|
|
|
|
|
|
|
|
isRight: false,
|
|
|
|
|
|
|
|
equipmentName: "包装线08"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
top: 27,
|
|
|
|
top: 31,
|
|
|
|
left: 37.1,
|
|
|
|
left: 38.5,
|
|
|
|
rotate: 3,
|
|
|
|
rotate: 3,
|
|
|
|
isRight: true
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
height:40,
|
|
|
|
|
|
|
|
isRight: true,
|
|
|
|
|
|
|
|
equipmentName: "包装线07"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
top: 26.5,
|
|
|
|
top: 31,
|
|
|
|
left: 44.1,
|
|
|
|
left: 45.1,
|
|
|
|
rotate: 2,
|
|
|
|
rotate: 2,
|
|
|
|
isRight: false
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
height:40,
|
|
|
|
|
|
|
|
isRight: false,
|
|
|
|
|
|
|
|
equipmentName: "包装线06"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
top: 26,
|
|
|
|
top: 31,
|
|
|
|
left: 48.8,
|
|
|
|
left: 50.5,
|
|
|
|
rotate: 358,
|
|
|
|
rotate: 358,
|
|
|
|
isRight: true
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
height:40,
|
|
|
|
|
|
|
|
isRight: true,
|
|
|
|
|
|
|
|
equipmentName: "包装线05"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
top: 25,
|
|
|
|
top: 31,
|
|
|
|
left: 55.8,
|
|
|
|
left: 56.8,
|
|
|
|
rotate: 355,
|
|
|
|
rotate: 357,
|
|
|
|
isRight: false
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
height:40,
|
|
|
|
|
|
|
|
isRight: false,
|
|
|
|
|
|
|
|
equipmentName: "包装线04"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
top: 24,
|
|
|
|
top: 31,
|
|
|
|
left: 60.2,
|
|
|
|
left: 61.5,
|
|
|
|
|
|
|
|
rotate: 354,
|
|
|
|
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
height:40,
|
|
|
|
|
|
|
|
isRight: true,
|
|
|
|
|
|
|
|
equipmentName: "包装线03"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
top: 31,
|
|
|
|
|
|
|
|
left: 68.1,
|
|
|
|
rotate: 351,
|
|
|
|
rotate: 351,
|
|
|
|
isRight: true
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
height:40,
|
|
|
|
|
|
|
|
isRight: false,
|
|
|
|
|
|
|
|
equipmentName: "包装线02"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
top: 24,
|
|
|
|
top: 31,
|
|
|
|
left: 66.8,
|
|
|
|
left: 72.9,
|
|
|
|
rotate: 351,
|
|
|
|
rotate: 348,
|
|
|
|
isRight: false
|
|
|
|
width: 2,
|
|
|
|
},
|
|
|
|
height:40,
|
|
|
|
{
|
|
|
|
isRight: false,
|
|
|
|
top: 22.5,
|
|
|
|
equipmentName: "包装线01"
|
|
|
|
left: 71.6,
|
|
|
|
|
|
|
|
rotate: 346,
|
|
|
|
|
|
|
|
isRight: false
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
equipmentData: [
|
|
|
|
equipmentData: [
|
|
|
|
// {
|
|
|
|
|
|
|
|
// left: 16,
|
|
|
|
|
|
|
|
// isRight: false,
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// left: 23.5,
|
|
|
|
|
|
|
|
// isRight: true,
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// left: 38,
|
|
|
|
|
|
|
|
// isRight: false,
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// left: 45.3,
|
|
|
|
|
|
|
|
// isRight: true,
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// left: 59.3,
|
|
|
|
|
|
|
|
// isRight: false,
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// left: 66.6,
|
|
|
|
|
|
|
|
// isRight: true,
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// left: 81.2,
|
|
|
|
|
|
|
|
// isRight: false,
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// left: 88.5,
|
|
|
|
|
|
|
|
// isRight: false,
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
outputData: [
|
|
|
|
outputData: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
left: 13.6,
|
|
|
|
|
|
|
|
no:"11"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
left: 20.3,
|
|
|
|
|
|
|
|
no:"10"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
left: 25.3,
|
|
|
|
|
|
|
|
no:"09"
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
left: 33.3,
|
|
|
|
left: 33.3,
|
|
|
|
|
|
|
|
no:"08"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
left: 37.7,
|
|
|
|
left: 37.7,
|
|
|
|
|
|
|
|
no:"07"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
left: 43.9,
|
|
|
|
left: 43.9,
|
|
|
|
|
|
|
|
no:"06"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
left: 48.5,
|
|
|
|
left: 48.5,
|
|
|
|
|
|
|
|
no:"05"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
left: 54.5,
|
|
|
|
left: 54.5,
|
|
|
|
|
|
|
|
no:"04"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
left: 59,
|
|
|
|
left: 59,
|
|
|
|
|
|
|
|
no:"03"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
left: 65,
|
|
|
|
left: 65,
|
|
|
|
|
|
|
|
no:"02"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
left: 69.5,
|
|
|
|
left: 69.5,
|
|
|
|
|
|
|
|
no:"01"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
arrowData: [
|
|
|
|
arrowData: [
|
|
|
@ -287,16 +422,141 @@ export default {
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {},
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
Fungetdate(num) {
|
|
|
|
|
|
|
|
var dd = new Date();
|
|
|
|
|
|
|
|
dd.setDate(dd.getDate() + num);
|
|
|
|
|
|
|
|
var y = dd.getFullYear();
|
|
|
|
|
|
|
|
var m = dd.getMonth() + 1; //获取当前月份的日期
|
|
|
|
|
|
|
|
var d = dd.getDate();
|
|
|
|
|
|
|
|
return y + "-" + m + "-" + d;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
getDate() {
|
|
|
|
|
|
|
|
let start = this.Fungetdate(0);
|
|
|
|
|
|
|
|
let end = this.Fungetdate(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.queryParams.timeArray.push(start, end);
|
|
|
|
|
|
|
|
this.getData();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
getData() {
|
|
|
|
|
|
|
|
if(this.queryParams.timeArray.length>0){
|
|
|
|
|
|
|
|
this.queryParams.productDateStart = moment(this.queryParams.timeArray[0]).format('YYYY-MM-DD');
|
|
|
|
|
|
|
|
this.queryParams.productDateEnd = moment(this.queryParams.timeArray[1]).format('YYYY-MM-DD');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
getDailyReportNew(this.queryParams).then(e => {
|
|
|
|
|
|
|
|
// 假设接口返回的数据在 e.rows 中,且为数组格式
|
|
|
|
|
|
|
|
if (e.rows && Array.isArray(e.rows)) {
|
|
|
|
|
|
|
|
// 创建以 equipmentName 为键的映射表
|
|
|
|
|
|
|
|
const rowMap = e.rows.reduce((map, row) => {
|
|
|
|
|
|
|
|
map[row.equipmentName] = row; // 假设 equipmentName 唯一
|
|
|
|
|
|
|
|
return map;
|
|
|
|
|
|
|
|
}, {});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更新 infoData
|
|
|
|
|
|
|
|
this.infoData = this.infoData.map(infoItem => {
|
|
|
|
|
|
|
|
const matchedRow = rowMap[infoItem.equipmentName];
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
...infoItem,
|
|
|
|
|
|
|
|
productName: matchedRow?.productName || null ,// 匹配成功则注入 productName
|
|
|
|
|
|
|
|
teamLeaderNames: matchedRow?.teamLeaderNames || null,
|
|
|
|
|
|
|
|
prodType: matchedRow?.prodType || null,
|
|
|
|
|
|
|
|
quantityFeedback: matchedRow?.quantityFeedback || null,
|
|
|
|
|
|
|
|
productDate: matchedRow?.productDate || null,
|
|
|
|
|
|
|
|
workorderCodeSap: matchedRow?.workorderCodeSap || null,
|
|
|
|
|
|
|
|
sapCode:matchedRow?.sapCode || null,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
console.log(this.infoData)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
|
|
|
console.error("获取数据失败:", error);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
startAutoScroll() {
|
|
|
|
|
|
|
|
const tableBody = this.$refs.autoScrollTable.$el.querySelector('.el-table__body-wrapper')
|
|
|
|
|
|
|
|
let scrollTop = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.scrollInterval = setInterval(() => {
|
|
|
|
|
|
|
|
if (tableBody) {
|
|
|
|
|
|
|
|
// 每次滚动1像素
|
|
|
|
|
|
|
|
scrollTop += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 判断是否滚动到底部
|
|
|
|
|
|
|
|
if (scrollTop >= tableBody.scrollHeight - tableBody.clientHeight) {
|
|
|
|
|
|
|
|
scrollTop = 0 // 重置到顶部实现循环滚动
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tableBody.scrollTop = scrollTop
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 50) // 调整时间间隔控制滚动速度
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
stopAutoScroll() {
|
|
|
|
|
|
|
|
clearInterval(this.scrollInterval)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
join() {
|
|
|
|
|
|
|
|
const wsuri = this.url;
|
|
|
|
|
|
|
|
this.ws = new WebSocket(wsuri);
|
|
|
|
|
|
|
|
const self = this;
|
|
|
|
|
|
|
|
this.ws.onopen = function (event) {
|
|
|
|
|
|
|
|
self.text_content = self.text_content + "已经打开连接!" + "\n";
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.ws.onmessage = function (event) {
|
|
|
|
|
|
|
|
self.text_content = event.data + "\n";
|
|
|
|
|
|
|
|
console.log(self.text_content);
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
// 解析JSON数据
|
|
|
|
|
|
|
|
const receivedData = JSON.parse(event.data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Array.isArray(receivedData)) {
|
|
|
|
|
|
|
|
// 更新响应式数据
|
|
|
|
|
|
|
|
this.repairOrders = receivedData.map(item => ({
|
|
|
|
|
|
|
|
...item,
|
|
|
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
console.warn('收到非数组格式数据:', receivedData)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
console.error("JSON parsing failed:", error)
|
|
|
|
|
|
|
|
this.$notify.error({ title: '数据错误', message: '接收数据格式异常' })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.ws.onclose = function (event) {
|
|
|
|
|
|
|
|
self.text_content = self.text_content + "已经关闭连接!" + "\n";
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
exit() {
|
|
|
|
|
|
|
|
if (this.ws) {
|
|
|
|
|
|
|
|
this.ws.close();
|
|
|
|
|
|
|
|
this.ws = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
send() {
|
|
|
|
|
|
|
|
if (this.ws) {
|
|
|
|
|
|
|
|
this.ws.send(this.message);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
alert("未连接到服务器");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
created(){
|
|
|
|
|
|
|
|
this.join();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
}
|
|
|
|
this.getDate();
|
|
|
|
|
|
|
|
this.startAutoScroll();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
beforeDestroy() {
|
|
|
|
|
|
|
|
this.stopAutoScroll()
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.bg {
|
|
|
|
.bg {
|
|
|
|
background-image: url("~@/assets/board/车间监控系统 - 02.jpg");
|
|
|
|
background-image: url("~@/assets/board/车间监控系统 - 02 - 2.jpg");
|
|
|
|
background-size: 100% 100%;
|
|
|
|
background-size: 100% 100%;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
position: absolute;
|
|
|
|
position: absolute;
|
|
|
@ -312,7 +572,7 @@ export default {
|
|
|
|
font-weight: 700;
|
|
|
|
font-weight: 700;
|
|
|
|
letter-spacing: 0.1vw;
|
|
|
|
letter-spacing: 0.1vw;
|
|
|
|
font-size: 2.1vw;
|
|
|
|
font-size: 2.1vw;
|
|
|
|
color: #fff;
|
|
|
|
color: #ffffff;
|
|
|
|
transform: translateX(-50%);
|
|
|
|
transform: translateX(-50%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -489,7 +749,7 @@ export default {
|
|
|
|
.infoModel, .infoModel1 {
|
|
|
|
.infoModel, .infoModel1 {
|
|
|
|
position: absolute;
|
|
|
|
position: absolute;
|
|
|
|
top: 0%;
|
|
|
|
top: 0%;
|
|
|
|
left: -295%;
|
|
|
|
left: -700%;
|
|
|
|
width: 14.1vw;
|
|
|
|
width: 14.1vw;
|
|
|
|
height: 14.7vh;
|
|
|
|
height: 14.7vh;
|
|
|
|
color: #fff;
|
|
|
|
color: #fff;
|
|
|
@ -501,24 +761,38 @@ export default {
|
|
|
|
top: 0;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
height: 180%;
|
|
|
|
background-image: url("~@/assets/board/弹窗1-设备信息.png");
|
|
|
|
background-image: url("~@/assets/board/弹窗1-设备信息.png");
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-size: 100% 100%;
|
|
|
|
background-size: 100% 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
.title {
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
position: absolute;
|
|
|
|
position: absolute;
|
|
|
|
top: 7%;
|
|
|
|
top: 15%;
|
|
|
|
font-size: 1vw;
|
|
|
|
font-size: 0.8vw;
|
|
|
|
letter-spacing: 3px;
|
|
|
|
letter-spacing: 3px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 高度自适应方案 */
|
|
|
|
|
|
|
|
min-height: 60px; /* 设置最小高度保障基础显示 */
|
|
|
|
|
|
|
|
line-height: 1.5; /* 行高增加到字号的1.5倍 */
|
|
|
|
|
|
|
|
overflow: visible; /* 解除内容截断限制 */
|
|
|
|
|
|
|
|
display: inline-flex; /* 启用弹性布局 */
|
|
|
|
|
|
|
|
align-items: flex-start; /* 顶部对齐防止偏移 */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 换行增强配置 */
|
|
|
|
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
|
|
|
|
word-break: break-word; /* 优化为更自然的换词策略 */
|
|
|
|
|
|
|
|
max-width: 120px;
|
|
|
|
|
|
|
|
white-space: pre-wrap; /* 保留空格换行符 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.equipmentOutput {
|
|
|
|
.equipmentOutput {
|
|
|
|
color: #fff;
|
|
|
|
color: #fff;
|
|
|
|
position: absolute;
|
|
|
|
position: absolute;
|
|
|
|
top: 45%;
|
|
|
|
top: 45%;
|
|
|
|
font-size: 0.9vw;
|
|
|
|
font-size: 0.6vw;
|
|
|
|
letter-spacing: 3px;
|
|
|
|
letter-spacing: 3px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -526,7 +800,21 @@ export default {
|
|
|
|
color: #fff;
|
|
|
|
color: #fff;
|
|
|
|
position: absolute;
|
|
|
|
position: absolute;
|
|
|
|
top: 70%;
|
|
|
|
top: 70%;
|
|
|
|
font-size: 0.9vw;
|
|
|
|
font-size: 0.8vw;
|
|
|
|
|
|
|
|
letter-spacing: 3px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.equipmentInfo2 {
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 70%;
|
|
|
|
|
|
|
|
font-size: 0.6vw;
|
|
|
|
|
|
|
|
letter-spacing: 3px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.equipmentInfo3 {
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 95%;
|
|
|
|
|
|
|
|
font-size: 0.6vw;
|
|
|
|
letter-spacing: 3px;
|
|
|
|
letter-spacing: 3px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -544,6 +832,12 @@ export default {
|
|
|
|
.equipmentInfo {
|
|
|
|
.equipmentInfo {
|
|
|
|
left: 7%;
|
|
|
|
left: 7%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.equipmentInfo2 {
|
|
|
|
|
|
|
|
left: 7%;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.equipmentInfo3 {
|
|
|
|
|
|
|
|
left: 7%;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.infoModel1 {
|
|
|
|
.infoModel1 {
|
|
|
@ -690,5 +984,35 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 新增样式 */
|
|
|
|
|
|
|
|
.scroll-title-container {
|
|
|
|
|
|
|
|
top:10%;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
|
|
background: rgba(0, 128, 255, 0.1);
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
|
|
|
border: none !important;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.scroll-title-content {
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
animation: scroll 15s linear infinite;
|
|
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
|
|
color: #00f7ff;
|
|
|
|
|
|
|
|
line-height: 30px;
|
|
|
|
|
|
|
|
text-shadow: 0 0 5px rgba(0, 247, 255, 0.5);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes scroll {
|
|
|
|
|
|
|
|
0% {
|
|
|
|
|
|
|
|
transform: translateX(100%);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
100% {
|
|
|
|
|
|
|
|
transform: translateX(-100%);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|