ZengTao
2024-04-29 7687eb6cc76ab8ca20b39e7567255939abc4ff66
CanadaMes-ui/src/views/home/index.vue
@@ -249,7 +249,7 @@
                    </label>
                </div>
            </div>
            <div style="display:flex;justify-content: space-around;width: 9zz5%;margin: 0 auto;">
            <div style="display:flex;justify-content: space-around;width: 95%;margin: 0 auto;">
                <!-- <el-input style="width:15%;" :placeholder="$t('Enter the glass barcode')" v-model="glassid1"
                    :class="ManuallyInfeedGlass == true ? 'hide' : ''"></el-input> -->
                <el-button type="primary" @click="SelectGlassByGlassIDs()" :disabled="ManuallyInfeedGlass"
@@ -257,6 +257,9 @@
                    {{ $t('Manually Infeed Glass') }}</el-button>
                <el-button type="primary" @click="showform2()" :disabled="OrderInfo"
                    :class="OrderInfo == true ? 'hide' : ''">{{ $t('Order Info')
                    }}</el-button>
                <el-button type="primary" @click="showcageinfo(1)" :disabled="OrderInfo"
                    :class="CageDetails == true ? 'hide' : ''">{{ $t('Cage Details')
                    }}</el-button>
                <el-button type="primary" @click="showform6()" :disabled="OutingQueue"
                    :class="OutingQueue == true ? 'hide' : ''">
@@ -278,7 +281,11 @@
                    <el-table-column :min-width="180" prop="glassId"
                        :label="$t('Outfeed glass barcode')"></el-table-column>
                    <el-table-column :min-width="130" prop="cage" :label="$t('Cage No')"></el-table-column>
                    <el-table-column :min-width="130" prop="cell" :label="$t('Slot No')"></el-table-column>
                    <el-table-column :min-width="130" prop="cell" :label="$t('Slot No')">
                        <template slot-scope='scope'>
                            {{ (scope.row.cage - 1) * 21 + scope.row.cell }}
                        </template>
                    </el-table-column>
                    <el-table-column :min-width="130" prop="orderId" :label="$t('Order No')"></el-table-column>
                    <el-table-column prop="orderId" :label="$t('List No')"></el-table-column>
                    <el-table-column prop="orderId" :label="$t('Box No')"></el-table-column>
@@ -299,7 +306,11 @@
                    <el-table-column :min-width="180" prop="glassId"
                        :label="$t('Infeed glass barcode')"></el-table-column>
                    <el-table-column :min-width="130" prop="cage" :label="$t('Cage No')"></el-table-column>
                    <el-table-column :min-width="130" prop="cell" :label="$t('Slot No')"></el-table-column>
                    <el-table-column :min-width="130" prop="cell" :label="$t('Slot No')">
                        <template slot-scope='scope'>
                            {{ (scope.row.cage - 1) * 21 + scope.row.cell }}
                        </template>
                    </el-table-column>
                    <el-table-column :min-width="130" prop="orderId" :label="$t('Order No')"></el-table-column>
                    <el-table-column prop="orderId" :label="$t('List No')"></el-table-column>
                    <el-table-column prop="orderId" :label="$t('Box No')"></el-table-column>
@@ -543,7 +554,11 @@
            <el-table :data="cageinfo.slice((currentPages - 1) * pagesizes, currentPages * pagesizes)" :height="700"
                border style="width: 100%;overflow: auto;">
                <el-table-column :min-width="50" prop="cage" :label="$t('Cage No')"></el-table-column>
                <el-table-column :min-width="50" prop="cell" :label="$t('Slot No')"></el-table-column>
                <el-table-column :min-width="50" prop="cell" :label="$t('Slot No')">
                    <template slot-scope='scope'>
                        {{ (scope.row.cage - 1) * 21 + scope.row.cell }}
                    </template>
                </el-table-column>
                <el-table-column :min-width="55" prop="tier" :label="$t('The Side')">
                    <template slot-scope='scope'>
                        {{
@@ -842,7 +857,11 @@
                <el-table-column prop="glasslength" :label="$t('Length')"></el-table-column>
                <el-table-column prop="glassheight" :label="$t('Width')"></el-table-column>
                <el-table-column prop="storageCage.cage" :label="$t('Cage No')"></el-table-column>
                <el-table-column prop="storageCage.cell" :label="$t('Slot No')"></el-table-column>
                <el-table-column prop="storageCage.cell" :label="$t('Slot No')">
                    <template slot-scope='scope'>
                        {{ (scope.row.cage - 1) * 21 + scope.row.cell }}
                    </template>
                </el-table-column>
                <el-table-column prop="storageCage.tier" :label="$t('The Side')">
                    <template slot-scope='scope'>
                        {{
@@ -978,12 +997,23 @@
            DeviceList: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            GlassIdList: [],
            Scanningmethod: true,
            CurrrentGlassId: ""
            CurrrentGlassId: "",
            feedglassid:"",
            count1:0,
            count2:1
        };
    },
    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);
    },
    activated() {
        this.init();
@@ -1009,6 +1039,7 @@
                };
                //  浏览器端收消息,获得从服务端发送过来的文本消息
                socket.onmessage = function (msg) {
                    this.count2=this.count2+1;
                    //console.log("收到数据====" + msg.data);
                    let obj = JSON.parse(msg.data);
                    if (obj.params != null) {
@@ -1052,6 +1083,7 @@
                    }
                    //获取待确认的铝框玻璃信息
                    if (obj.AluminumFrame != null) {
                        this.AluminumFrame = obj.AluminumFrame[0];
                        if (this.dialogFormVisible6 == true) {
                            this.dialogFormVisible7 = true;
@@ -1065,6 +1097,9 @@
                        }
                    }
                    if(obj.feedglassid!=null){
                        this.feedglassid=obj.feedglassid[0];
                    }
                    // if (obj.alarmmg[0].length > 0) {
                    //     if (this.alarm.length > 0) {
@@ -1271,7 +1306,16 @@
        //手动上片
        sbumitglassid() {
            if (this.form.order != "") {
                if (this.form.height < 380 || this.form.width < 390 || this.form.height > 1810 || this.form.width > 2760) {
                let width=0;
                let height=0;
                if(this.form.glassheight<this.form.glasswidth){
                    width=this.form.glasswidth;
                    height=this.form.glassheight;
                }else{
                    height=this.form.glasswidth;
                    width=this.form.glassheight;
                }
                if (height < 380 || width < 380 || height > 1810 || width > 2760) {
                    this.$message.error(this.$t('The glass size is not within the range'));
                } else {
                    if (this.zhuangtai == true) {
@@ -1355,9 +1399,9 @@
        },
        //显示客户玻璃信息
        showform2() {
            SelectGlass(this.orderid).then(res => {
                this.GlassInfo = res.data.glass;
            });
            // SelectGlass(this.orderid).then(res => {
            //     this.GlassInfo = res.data.glass;
            // });
            this.dialogFormVisible4 = true;
        },
        //显示出片队列
@@ -1631,7 +1675,7 @@
                                this.$message.success(this.$t('Operation successful'));
                            }
                            else if (res.data.message == 400) {
                                this.$message.error(this.$t('The glass size is not within the range'));
                                this.$message.error(this.$t('There is no such slot'));
                            } else {
                                this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
                            }
@@ -1902,8 +1946,18 @@
        },
        //判断玻璃是否超出范围
        Sizerange(Glass, position) {
            console.log(position);
            if (this.ManuallyInfeedGlass == false) {
                if ((Glass.glassheight < 380 || Glass.glasswidth < 390 || Glass.glassheight > 1810 || Glass.glasswidth > 2760) || (Glass.glassheight < 390 || Glass.glasswidth < 380 || Glass.glassheight > 2760 || Glass.glasswidth > 1810)) {
                let width=0;
                let height=0;
                if(Glass.glassheight<Glass.glasswidth){
                    width=Glass.glasswidth;
                    height=Glass.glassheight;
                }else{
                    height=Glass.glasswidth;
                    width=Glass.glassheight;
                }
                if (height < 380 || width < 380 || height > 1810 || width > 2760) {
                    this.$alert(this.$t('The glass size is not within the range'), this.$t('confirm'), {
                        confirmButtonText: this.$t('Yes'),
                        type: 'info',