ZengTao
2024-01-19 70a93a33fabd58e1f4b3a50410060ae1b855c8ed
CanadaMes-ui/src/views/home/index.vue
@@ -375,37 +375,81 @@
                <div class="device" :style="'top: 262px;left: 150px;background-color: ' + ShowDeviceList(8) + ';'">D05</div>
                <div class="device" :style="'top: 339px;left: 150px;background-color: ' + ShowDeviceList(9) + ';'">D06</div>
                <div class="glass D01" style="top: 54px;left: 1055px;position: absolute;"
                    @click="ClearGlassId('DB101.9.2', 0)">{{ ShowGlassIdList(0) }}</div>
                <div class="glass D02" style="top: 132px;left: 1055px;position: absolute;"
                    @click="ClearGlassId('DB101.9.2', 1)">{{ ShowGlassIdList(1) }}</div>
                <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>
                </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.2', 1)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass B01" style="top: 270px;left: 640px;position: absolute;"
                    @click="ClearGlassId('DB101.10.2', 2)">
                    B01:{{ ShowGlassIdList(2) }}</div>
                    >
                    B01:{{ ShowGlassIdList(2) }}
                    <br/>
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.2', 2)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass B02" style="top: 290px;left: 640px;position: absolute;"
                    @click="ClearGlassId('DB101.10.3', 3)">B02:{{ ShowGlassIdList(3) }}</div>
                    >B02:{{ ShowGlassIdList(3) }}
                    <br/>
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.3', 3)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass A01" style="top: 270px;left: 289px;position: absolute;"
                    @click="ClearGlassId('DB101.10.0', 4)">
                    A01.1:{{ ShowGlassIdList(4) }}</div>
                    >
                    A01.1:{{ ShowGlassIdList(4) }}
                    <br/>
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.0', 4)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass A01" style="top: 290px;left: 289px;position: absolute;"
                    @click="ClearGlassId('DB101.10.1,5',5)">A01.2:{{ ShowGlassIdList(5) }}</div>
                <div class="glass A01" style="top: 315px;left: 289px;position: absolute;"
                    >A01.2:{{ ShowGlassIdList(5) }}X21942611703GV
                    <br/>
                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.1,5', 5)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass A02" style="top: 310px;left: 289px;position: absolute;"
                    @click="ClearGlassId('DB101.10.2,6',6)">A02:{{ ShowGlassIdList(6) }}</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.2,6', 6)">
                        {{ $t('Clear') }}</el-button>
                </div>
                <div class="glass D03" style="top: 137px;left: 42px;position: absolute;"
                    @click="ClearGlassId('DB101.9.4', 7)">
                    {{ ShowGlassIdList(7) }}</div>
                <div class="glass D04" style="top: 213px;left: 42px;position: absolute;"
                    @click="ClearGlassId('DB101.9.5', 8)">
                    {{ ShowGlassIdList(8) }}</div>
                <div class="glass D05" style="top: 290px;left: 42px;position: absolute;"
                    @click="ClearGlassId('DB101.9.6', 9)">
                    {{ ShowGlassIdList(9) }}</div>
                <div class="glass D06" style="top: 367px;left: 42px;position: absolute;"
                    @click="ClearGlassId('DB101.9.5', 10)">
                    {{ ShowGlassIdList(10) }}</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>
                </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>
                </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>
                </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>
                </div>
            </div>
@@ -578,7 +622,7 @@
                            {{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}</el-button>
                    </el-form-item>
                    <el-form-item>
                        {{ $t('Current State') }}:{{ this.Scanningmethod==true?$t('Automatic'):$t('Hand Movement')}}
                        {{ $t('Current State') }}:{{ this.Scanningmethod == true ? $t('Automatic') : $t('Hand Movement') }}
                        <el-button type="primary" @click="SwitchScanMethod()">{{ $t('Switch')
                        }}</el-button>
                    </el-form-item>
@@ -595,7 +639,7 @@
                </div>
                <div style="display: flex;justify-content: space-around;">
                    <label for="">{{ $t('Upper film position') }}</label>
                    <label for="">{{ $t('Scan Code Point') }}</label>
                </div>
                <div style="display: flex;justify-content: space-around;height: 40px;">
@@ -981,7 +1025,7 @@
            DeviceList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
            GlassIdList: [],
            Scanningmethod: true,
            CurrrentGlassId:""
            CurrrentGlassId: ""
        };
    },
    created() {
@@ -1029,15 +1073,15 @@
                    this.alarm = obj.alarmmg[0];
                    //获取当前扫码方式
                    if (obj.Scanningmethod != null) {
                        this.Scanningmethod=obj.Scanningmethod[0];
                        this.Scanningmethod = obj.Scanningmethod[0];
                    }
                    //获取当前扫码枪玻璃id
                    if(obj.CurrrentGlassId!=null){
                    if (obj.CurrrentGlassId != null) {
                        const specialChars = /[^\w\s]/g;
                        this.CurrrentGlassId=obj.CurrrentGlassId[0].replace(specialChars, "");
                        this.CurrrentGlassId = obj.CurrrentGlassId[0].replace(specialChars, "");
                    }
                    //查询当前铝框信息
                    this.CurrentFrame = obj.CurrentFrame;
                    //获取设备状态
@@ -1122,10 +1166,10 @@
                    } else {
                        this.form3 = {};
                    }
                    if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 0) {
                        this.loadglassheight1 = 70;
                        if(this.form5.glassId!=obj.form3[0].glassId){
                        if (this.form5.glassId != obj.form3[0].glassId) {
                            this.showform3();
                        }
                        this.form5 = obj.form3[0];
@@ -1323,12 +1367,12 @@
        },
        //手动写入plc扫码位玻璃id
        WriteGlassID() {
            if (this.glassid1.length ==14) {
            if (this.glassid1.length == 14) {
                WriteGlassID(this.glassid1).then(res => {
                    console.log(res.data);
                    this.$message.success(this.$t('Successful operation'));
                });
            }else{
            } else {
                this.$message.error(this.$t('Please enter the correct glassID'));
            }
        },
@@ -2044,7 +2088,7 @@
        //清除玻璃id
        ClearGlassId(position, num) {
            if (this.ClearGlassID == false) {
                console.log(this.DeviceList,num);
                console.log(this.DeviceList, num);
                if (this.DeviceList[num] == 0) {
                    if (this.GlassIdList[num].length < 14) {
                        this.$confirm(this.$t('Are you sure to clear this barcode ?'), this.$t('confirm'), {
@@ -2104,9 +2148,9 @@
            });
        },
        //切换二维码获取方式
        SwitchScanMethod(){
        SwitchScanMethod() {
            SwitchScanMethod(!this.Scanningmethod).then(res => {
                if(res.data.message == 200) {
                if (res.data.message == 200) {
                    this.$message.success(this.$t('Operation successful'));
                }
            });