wuyouming666
2024-05-10 3ab0fb6281f55924d49d7e28bd6655d59b2a346d
CanadaMes-ui/src/views/home/index.vue
@@ -235,6 +235,7 @@
    height: 15px;
    position: absolute;
}
</style>
<template>
    <el-container>
@@ -243,7 +244,7 @@
            <div class="box" @click="dialogFormVisible2 = true">
                <div class="text">
                    <!-- Alarm: -->
                    {{ this.text }}
                    {{ this.text }}{{this.plc1}}{{this.plc2}}
                    <label v-for="item in this.alarm" :key="item['id']">
                        {{ item['content'] }}
                    </label>
@@ -263,7 +264,7 @@
                    }}</el-button>
                <el-button type="primary" @click="showform6()" :disabled="OutingQueue"
                    :class="OutingQueue == true ? 'hide' : ''">
                    {{ $t('Outing Queue') }}</el-button>
                    {{ $t('Outfeed Queue') }}</el-button>
                <el-button type="primary" @click="TaskStop(0)" :disabled="OutingQueue"
                    :class="StopTask == true ? 'hide' : ''">
                    {{ $t('Terminate Feeding') }}</el-button>
@@ -294,10 +295,10 @@
                            {{ scope.row.glasswidthmm }}*{{ scope.row.glassheightmm }}
                        </template>
                    </el-table-column>
                    <el-table-column :label="$t('Terminate Task')">
                    <el-table-column :label="$t('Task Complete')">
                        <template slot-scope='scope'>
                            <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                @click="endtask(1, scope.row.glassId, scope.row.cell)">{{ $t('Terminate Task')
                                @click="endtask(1, scope.row.glassId, scope.row.cell)">{{ $t('Task Complete')
                                }}</el-button>
                        </template>
                    </el-table-column>
@@ -320,10 +321,10 @@
                        </template>
                    </el-table-column>
                    <el-table-column :label="$t('Terminate Task')">
                    <el-table-column :label="$t('Task Complete')">
                        <template slot-scope='scope'>
                            <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('Terminate Task')
                                @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('Task Complete')
                                }}</el-button>
                        </template>
                    </el-table-column>
@@ -415,66 +416,66 @@
                <div class="glass D01" style="top: 39px;left: 1055px;position: absolute;">{{ ShowGlassIdList(0) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.2', 0)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
                <div class="glass D02" style="top: 117px;left: 1055px;position: absolute;">{{ ShowGlassIdList(1) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.3', 1)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
                <div class="glass B01" style="top: 270px;left: 640px;position: absolute;">
                    B01:{{ ShowGlassIdList(2) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.2', 2)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
                <div class="glass B02" style="top: 315px;left: 640px;position: absolute;">B02:{{ ShowGlassIdList(3) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.3', 3)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
                <div class="glass A01" style="top: 270px;left: 289px;position: absolute;">
                    A01.1:{{ ShowGlassIdList(4) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.0', 4)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
                <div class="glass A01" style="top: 315px;left: 289px;position: absolute;">A01.2:{{ ShowGlassIdList(5) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.0', 5)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
                <div class="glass A02" style="top: 360px;left: 289px;position: absolute;">A02:{{ ShowGlassIdList(6) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.1', 6)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
                <div class="glass D03" style="top: 122px;left: 42px;position: absolute;">
                    {{ ShowGlassIdList(7) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.4', 7)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
                <div class="glass D04" style="top: 198px;left: 42px;position: absolute;">
                    {{ ShowGlassIdList(8) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.5', 8)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
                <div class="glass D05" style="top: 275px;left: 42px;position: absolute;">
                    {{ ShowGlassIdList(9) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.6', 9)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
                <div class="glass D06" style="top: 352px;left: 42px;position: absolute;">
                    {{ ShowGlassIdList(10) }}
                    <br />
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.5', 10)">
                        {{ $t('Clear') }}</el-button>
                        {{ $t('Confirmation needed') }}</el-button>
                </div>
@@ -601,7 +602,7 @@
                            @click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('Delete') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="scope.row.state == 1 ? false : true"
                            @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('Out') }}</el-button>
                            @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('Outfeed') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)">
                            {{ scope.row.disabled == 0 ? $t('Disable') : $t('Enable') }}</el-button>
@@ -776,7 +777,7 @@
            </el-form>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible6" :title="$t('Outing Queue')" top="5vh">
        <el-dialog :visible.sync="dialogFormVisible6" :title="$t('Outfeed Queue')" top="5vh">
            {{ $t('Queue State') }}:
            {{ this.isAllowQueue
                == true ? $t('Start') : $t('Stop')
@@ -854,7 +855,7 @@
            top="5vh">
            <el-input style="width:15%;" :placeholder="$t('Enter the Frame No')" v-model="framebarcode"></el-input>
            <el-button type="primary" @click="showform7()">{{ $t('Query') }}</el-button>
            <el-button type="primary" @click="AddOutSliceS()">{{ $t('Add') }}</el-button>
            <el-button type="primary" @click="AddOutSliceS()">{{ $t('Outfeed') }}</el-button>
            <el-button type="primary" @click="CloseForm7()">{{ $t('Cancel') }}</el-button>
            <el-table :data="this.AluminumFrame" :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column prop="frameBarcode" :label="$t('Frame No')"></el-table-column>
@@ -1013,20 +1014,22 @@
            count2: 1,
            loadname: "",
            form6state:0,
            StateColor:"green"
            StateColor:"green",
            plc1:"",
            plc2:""
        };
    },
    created() {
        this.load();
        // setInterval(() => {
        //     if(this.count1<this.count2){
        //         this.count1=this.count2;
        //     }else{
        //         const now = new Date();
        //         console.log(now);
        //         alert("websocket停止"+now);
        //     }
        // }, 3000);
        setInterval(() => {
            if(this.count1<this.count2){
                this.count1=this.count2;
            }else{
                const now = new Date();
                console.log(this.count1,this.count2);
                console.log(this.$t('Mes Connection failed')+now);
            }
        }, 60000);
    },
    activated() {
        this.init();
@@ -1063,6 +1066,20 @@
                        // this.car1 = 210 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
                        // this.car2 = 300 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
                    }
                    if (obj.Plc1 != null) {
                        if(obj.Plc1[0]==true){
                            this.plc1="";
                        }else{
                            this.plc1=this.$t('Plc1 Connection failed');
                        }
                    }
                    if (obj.Plc2 != null) {
                        if(obj.Plc2[0]==true){
                            this.plc2="";
                        }else{
                            this.plc2=this.$t('Plc2 Connection failed');
                        }
                    }
                    this.tableData = obj.tableData[0];
                    this.cagelist1 = obj.cagelist1[0];