wuyouming666
2023-12-21 81826e66f68a37486516ee93c4e11d92a00c3fb6
CanadaMes-ui/src/views/home/index.vue
@@ -211,6 +211,14 @@
    text-align: right;
}
.hide {
    display: none;
}
.el-table .cell {
    display: flex;
}
/* .el-table td,
.el-table th {
    padding: 0px 0;
@@ -230,8 +238,10 @@
                </div>
            </div>
            <div style="display:flex;justify-content: space-around;width: 9zz5%;margin: 0 auto;">
                <el-input style="width:15%;" :placeholder="$t('Enter the glass barcode')" v-model="glassid1"></el-input>
                <el-button type="primary" @click="SelectGlassByGlassIDs(2)" :disabled="ManuallyInfeedGlass">
                <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(2)" :disabled="ManuallyInfeedGlass"
                    :class="ManuallyInfeedGlass == true ? 'hide' : ''">
                    {{ $t('Manually Infeed Glass') }}</el-button>
                <!-- <el-input style="width:15%;" :placeholder="$t('Enter the Order No')" v-model="order"></el-input>
                <el-button type="warning" @click="showform1();">{{ $t('Exit the glass by order number') }}</el-button> -->
@@ -325,9 +335,11 @@
                <div class="blocks-img" :style="{ left: car2 + 'px', top: '175px' }"></div>
                <div class="blocks-img2"></div>
                <div class="blocks-img3"></div>
                <el-button class="orderbutton1" type="primary" @click="showform2()" :disabled="OrderInfo">{{ $t('OrderInfo')
                }}</el-button>
                <el-button class="orderbutton2" type="primary" @click="showform6()" :disabled="OutingQueue">
                <el-button class="orderbutton1" type="primary" @click="showform2()" :disabled="OrderInfo"
                    :class="OrderInfo == true ? 'hide' : ''">{{ $t('OrderInfo')
                    }}</el-button>
                <el-button class="orderbutton2" type="primary" @click="showform6()" :disabled="OutingQueue"
                    :class="OutingQueue == true ? 'hide' : ''">
                    {{ $t('Outing Queue') }}</el-button>
                <!-- <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
@@ -464,7 +476,7 @@
                            {{ scope.row.disabled == 0 ? $t('Enable') : $t('Disable') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="scope.row.glassId != null ? true : false"
                            @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Increase')
                            @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Add')
                            }}</el-button>
                    </template>
                </el-table-column>
@@ -472,7 +484,7 @@
            <el-pagination :style="'margin-top:-2px'" @size-change="handleSizeChanges"
                @current-change="handleCurrentChanges" :pager-count="7" :current-page="currentPages"
                :page-sizes="[21, 42, 84, 420]" :page-size="pagesizes" layout="total, sizes, prev, pager, next, jumper"
                :page-sizes="[42, 84, 126, 420]" :page-size="pagesizes" layout="total, sizes, prev, pager, next, jumper"
                :total="cageinfo.length > 0 ? cageinfo.length : null" background style="float: right; margin-top: 20px">
            </el-pagination>
@@ -636,12 +648,12 @@
            }}</el-button>
            <el-table :data="this.OutSlice" :height="700" :span-method="objectSpanMethod" border :cell-style="cellStyle"
                style="width: 100%;overflow: auto;font-size: 18px;">
                <el-table-column :min-width="100" prop="glassId" :label="$t('Barcode')"></el-table-column>
                <el-table-column prop="storageCage.orderId" :label="$t('Order No')"></el-table-column>
                <el-table-column prop="storageCage.listId" :label="$t('List No')"></el-table-column>
                <el-table-column prop="storageCage.boxId" :label="$t('Box No')"></el-table-column>
                <el-table-column prop="storageCage.glasswidthmm" :label="$t('Length')"></el-table-column>
                <el-table-column prop="storageCage.glassheightmm" :label="$t('Width')"></el-table-column>
                <el-table-column :min-width="175" prop="glassId" :label="$t('Barcode')"></el-table-column>
                <el-table-column :min-width="90" prop="orderId" :label="$t('Order No')"></el-table-column>
                <el-table-column :min-width="70" prop="listId" :label="$t('List No')"></el-table-column>
                <el-table-column :min-width="70" prop="boxId" :label="$t('Box No')"></el-table-column>
                <el-table-column :min-width="100" prop="glasswidthmm" :label="$t('Length')"></el-table-column>
                <el-table-column :min-width="100" prop="glassheightmm" :label="$t('Width')"></el-table-column>
                <el-table-column :min-width="90" prop="state" :label="$t('Glass State')">
                    <template slot-scope='scope'>
                        {{ scope.row.state == 0 ? $t('Waiting') : scope.row.state == 1 ? $t('Outing') : scope.row.state == 2
@@ -649,26 +661,33 @@
                    </template>
                </el-table-column>
                <el-table-column prop="sequence" :label="$t('Sequence')"></el-table-column>
                <el-table-column prop="position" :label="$t('Position')" style="font-size: 20px;">
                    <template slot-scope='scope'>
                        {{ scope.row.position == 1 ? "▄▄▄" : "▋" }}
                    </template>
                </el-table-column>
                <el-table-column prop="position" :label="$t('Flip')">
                    <template slot-scope='scope'>
                        {{ scope.row.flip == 1 ? $t('Yes') : $t('No') }}
                    </template>
                </el-table-column>
                <el-table-column prop="barcode" :label="$t('Frame No')"></el-table-column>
                <el-table-column prop="barcode" :label="$t('Complete')">
                    <template slot-scope='scope'>
                <el-table-column :min-width="90" prop="barcode" :label="$t('Complete')">
                    <template slot-scope='scope' style="height:100px;height:100px;">
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="(!isAllowQueue || scope.row.state != 1)"
                            :disabled="!(!isAllowQueue && scope.row.state != 2&&scope.row.state != 4)"
                            @click="CompleteQueue(scope.row.id, scope.row.barcode, scope.row.glassId)">{{ $t('Complete')
                            }}</el-button>
                    </template>
                </el-table-column>
                <el-table-column :min-width="300" prop="position" :label="$t('Position')" style="font-size: 20px;">
                    <template slot-scope='scope'>
                        <!-- {{ scope.row.position == 1 ? "<>▄▄▄" : "▋" }} -->
                        <div
                            :style="'width:' + (scope.row.position == 1 ? '300' : '100') + 'px;height:' + (scope.row.position == 1 ? '100' : '200') + 'px;background-Color:gray;margin:0 auto;'">
                            <!-- <div :style="'width:100px;height:300px;background-Color:red;'"></div> -->
                        </div>
                        <!-- {{ scope.row.position == 1 ? "<div></div>" : "<div></div>" }} -->
                    </template>
                </el-table-column>
                <el-table-column prop="position" :label="$t('Flipped')" :min-width="200">
                    <template slot-scope='scope'>
                        {{ scope.row.flip == true ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT')
                            : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }}
                    </template>
                </el-table-column>
                <el-table-column prop="barcode" :label="$t('Frame No')"></el-table-column>
                <el-table-column :width="280" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-button type="text" size="small" @click="getTopMove(scope.row, scope.$index)"
@@ -697,7 +716,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="addoutslice()">{{ $t('Increase') }}</el-button>
            <el-button type="primary" @click="addoutslice()">{{ $t('Add') }}</el-button>
            <el-table :data="this.AluminumFrame" :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column prop="barcode" :label="$t('Barcode')"></el-table-column>
@@ -710,7 +729,7 @@
                <el-table-column prop="storageCage.cell" :label="$t('Slot No')"></el-table-column>
                <el-table-column prop="storageCage.tier" :label="$t('The Side')"></el-table-column>
                <el-table-column prop="FrameNo" :label="$t('Frame No')"></el-table-column>
                <el-table-column prop="Flip" :label="$t('Flip')"></el-table-column>
                <el-table-column prop="Flip" :label="$t('Flipped')"></el-table-column>
                <el-table-column prop="out_slice.state" :label="$t('In the queue')">
                    <template slot-scope='scope'>
                        {{ scope.row.out_slice != null ? $t('Yes') : $t('No') }}
@@ -733,6 +752,7 @@
        <el-dialog :visible.sync="dialogFormCountDown" :title="$t('Approximately resettable time')" top="5vh">
            <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'">
                <!-- {{ this.CountDowns }} -->
                {{ this.CountDowns }}
            </div>
        </el-dialog>
@@ -816,7 +836,7 @@
            pagesize: 15,    //每页默认显示的数据
            pageCount: 0,
            currentPages: 1,  //默认初始页
            pagesizes: 21,    //每页默认显示的数据
            pagesizes: 42,    //每页默认显示的数据
            pageCounts: 0,
            OutSlice: [],
            AluminumFrame: [],
@@ -829,15 +849,15 @@
            OutingQueue: true,
            OrderInfo: true,
            CageDetails: true,
            CountDowns: "EMERGENCY STOP",
            CountDowns: "0",
            D01RequestState: false,
            EmergencyStop: false,
            PromptSize: 250
            PromptSize: 250,
            reset: false
        };
    },
    created() {
        this.load();
        this.init();
    }
    ,
@@ -878,20 +898,33 @@
                    this.tasklist1 = obj.tasklist1[0];
                    this.tasklist2 = obj.tasklist2[0];
                    this.alarm = obj.alarmmg[0];
                    if (this.alarm.length > 0) {
                    if (this.alarm.length > 0&&this.alarm!=obj.alarmmg[0]) {
                        this.dialogFormVisible2 = true;
                    } else {
                        this.dialogFormVisible2 = false;
                    }
                    //是否急停
                    this.EmergencyStop = obj.emergencystop[0];
                    if (obj.emergencystop != null) {
                        this.EmergencyStop = obj.emergencystop[0];
                    }
                    //复位倒计时
                    if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
                        this.CountDown();
                    if (obj.countdown != null) {
                        if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
                            this.CountDown();
                        }
                    }
                    //复位完成信号
                    if (obj.reset != null) {
                        this.reset = obj.reset[0];
                    }
                    //是否有进片请求
                    this.D01RequestState = obj.D01RequestState[0];
                    if (obj.D01RequestState != null) {
                        this.D01RequestState = obj.D01RequestState[0];
                    }
                    //是否允许出片
                    this.isAllowQueue = obj.isAllowQueue[0];
@@ -946,8 +979,6 @@
                            this.cageinfo = res.data.cageinfo;
                        });
                    }
                    this.$forceUpdate();
                }.bind(this);
@@ -982,6 +1013,10 @@
                });
            });
            //加载小车位置信息
            Loadcarlist().then(res => {
                this.carlist = res.data.carlist;
            });
            //加载笼子使用情况数据
            home().then(res => {
                this.tableData = res.data.list;
@@ -1010,10 +1045,7 @@
            SelectAlarmmgInfo().then(res => {
                this.alarm = res.data.alarmmg;
            });
            //加载小车位置信息
            Loadcarlist().then(res => {
                this.carlist = res.data.carlist;
            });
            //加载确认密码
            SelectPassword().then(res => {
                this.password = res.data.password;
@@ -1066,7 +1098,7 @@
                                this.$message.error(this.$t('There is no such glass'));
                            }
                            else if (res.data.message2 == 400) {
                                this.$message.error(this.$t('There is no such grid'));
                                this.$message.error(this.$t('There is no such slot'));
                            }
                        });
                    } else {
@@ -1417,6 +1449,7 @@
                            this.form5 = {};
                            this.$message.success(this.$t('Operation successful'));
                        } else {
                            alert(1);
                            this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
                        }
                    });
@@ -1621,21 +1654,20 @@
            });
        }
        ,
        cellStyle({ row, column, rowIndex, columnIndex }) {
        cellStyle({  column, rowIndex, columnIndex }) {
            // console.log(row, column, "ss");
            column = rowIndex;
            rowIndex = column;
            let style = "";
            if (columnIndex === 8) {
                style = "font-size:25px;text-align: center;";
                style = "font-size:200px;text-align: center;";
            }
            if (columnIndex === 9 && row.flip == 1) {
                style = "background-Color:yellow;";
            }
            if (columnIndex === 6 && row.state == 3) {
                style = "background-Color:gray;";
            }
            style
            // if (columnIndex === 9 && row.flip == 1) {
            //     style = "background-Color:yellow;";
            // }
            // if (columnIndex === 6 && row.state == 3) {
            //     style = "background-Color:gray;";
            // }
            return style;
        }
        ,
@@ -1653,7 +1685,7 @@
            if (rowIndex != 0) {
                barcode2 = arrOutSlice[rowIndex - 1].barcode;
            }
            if (columnIndex === 12) {
            if (columnIndex === 12 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11) {
                if (barcode != barcode2) {
                    // this.FrameNoFlag = barcode;
                    for (let i = rowIndex; i < this.OutSlice.length; i++) {
@@ -1661,7 +1693,6 @@
                            barcode = arrOutSlice[i].barcode;
                            rowspans += 1;
                        } else {
                            break;
                        }
                    }
@@ -1728,9 +1759,9 @@
            let timer = setInterval(
                () => {
                    if (this.EmergencyStop == true) {
                        this.dialogFormCountDown = false;
                        clearInterval(timer);
                        this.PromptSize = 250;
                        this.CountDowns = "EMERGENCY STOP";
                        this.CountDowns = "0";
                    } else {
                        if (count > 0) {
                            this.PromptSize = 500;
@@ -1738,13 +1769,12 @@
                            count--;
                        }
                        else {
                            this.PromptSize = 250;
                            this.PromptSize = 200;
                            this.CountDowns = "Waiting for reset";
                            // if(复位完成==true){
                            //     clearInterval(timer);
                            //     this.dialogFormCountDown = false;
                            // }
                            if (this.reset == true) {
                                clearInterval(timer);
                                this.dialogFormCountDown = false;
                            }
                        }
                    }
                },