gaoshp
2024-10-09 9e2f8a956b55f2ab39262a7b6cf832eac63e22c3
update
已修改1个文件
已添加1个文件
24 ■■■■ 文件已修改
src/views/mdc/realtime-status/index.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/realtime-status/station1.jpg 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/realtime-status/index.vue
@@ -1,8 +1,8 @@
<!--
 * @Date: 2024-04-09 22:11:21
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-10-09 11:40:18
 * @FilePath: /mdc/Users/mache/Documents/demo/cps-web/src/views/mdc/realtime-status/index.vue
 * @LastEditors: gaoshp
 * @LastEditTime: 2024-10-09 20:40:22
 * @FilePath: /cps-web/src/views/mdc/realtime-status/index.vue
 实时看板
-->
<template>
@@ -44,7 +44,8 @@
                    <ArrowRight />
                </el-icon>
            </div>
            <div class="status-content-cardp" v-for="(item,index) in timestatus" :style="{ 'width': (100 / column) + '%' }">
            <div class="status-content-cardp" v-for="(item, index) in timestatus"
                :style="{ 'width': (100 / column) + '%' }">
                <div class="status-card-box" style="border-color: #ccc;">
                    <div class="status-card-top">
                        <div class="status-card-detail">
@@ -59,7 +60,8 @@
                        </div>
                        <div class="status-card-machine" style="border-color: #ccc;">
                            <div class="status-card-machine-img">
                                <img src="./station.png" width="68" height="68">
                                <img src="./station1.jpg" width="68" height="68">
                            </div>
                            <div class="status-card-machine-mesg">
                                <div class="status-card-machine-mesg-form">
@@ -70,7 +72,7 @@
                        </div>
                    </div>
                    <div class="status-card-bottom">
                        <div class="status-card-bottom-realtime" @click="showvisible(item,index)"><i
                        <div class="status-card-bottom-realtime" @click="showvisible(item, index)"><i
                                class="iconfont saber-xiangqing status-card-bottom-icon"></i> 实时数据</div>
                        <div class="status-card-bottom-detail" @click="gostatus(item)"><i
                                class="iconfont saber-shuju status-card-bottom-icon"></i> 工位详情</div>
@@ -124,7 +126,7 @@
        }
    },
    mounted() {
        this.deviceStatus = this.$route.query.currentTag?[...this.$route.query.currentTag]:[];
        this.deviceStatus = this.$route.query.currentTag ? [...this.$route.query.currentTag] : [];
        this.getstationlabelList();  //获取标签视图下的list
        this.getprocess(); //获取颜色==》获取顶部title==》设置几行几列==》ws
    },
@@ -190,14 +192,14 @@
            this.$HTTP.get("/api/blade-cps/group/get-mdc-group").then(res => {
                if (res.code == 200) {
                    this.stationlabelList = res.data;
                    if(res.data.length != 0) {
                    if (res.data.length != 0) {
                        this.stationlabel = res.data[0].groupName;
                    }
                }
            })
        },
        changestatus(name) {
            if(this.stationlabelList.length == 0) {
            if (this.stationlabelList.length == 0) {
                this.station = "状态视图";
                this.$message.error('未选定实时看板查询组,请到"分析设置 -> 实时看板查询组设置"中选择工位组');
                return;
@@ -211,7 +213,7 @@
            }
            this.gettimestatus();  //查询列表
        },
        showvisible(item,index) {
        showvisible(item, index) {
            //clickIndex
            this.clickIndex = index;
            // if (item.properties == null || item.properties.length == 0) {
@@ -325,7 +327,7 @@
                    this.$TOOL.socket.websocket.onmessage = function (event) {
                        //num++;
                        var eventData = JSON.parse(event.data);
                        if(Object.keys(eventData.data).length == 0) return;
                        if (Object.keys(eventData.data).length == 0) return;
                        if (that.timestatus.length == 0) return;  //没值不用循环
                        that.timestatus.forEach((item, index) => {  //第一步把v放到code里
                            if (eventData.id == item.id) {
src/views/mdc/realtime-status/station1.jpg