clll
2023-10-27 254899911b6ca9b2e6085060902990cff8c84ef0
CanadaMes-ui/src/views/home/index.vue
@@ -66,12 +66,10 @@
  /* width: 4.22px; */
}
.blocks {
  background-image: url('../../img/xmjclzh.png');
    background-image: url('../../img/xmjc.png');
  margin: 0 auto;
  background-repeat: no-repeat;
  background-attachment: local;
@@ -111,6 +109,12 @@
  /* background-size: 85px 100px;
    left: 912px;
    top: 366px; */
}
.orderbutton {
    position: absolute;
    left: 1070px;
    top: 70px;
}
.blocks-img3 {
@@ -270,6 +274,8 @@
        <div class="blocks-img" :style="{ left: car2 + 'px', top: '175px' }"></div>
        <div class="blocks-img2"></div>
        <div class="blocks-img3"></div>
                <el-button class="orderbutton" type="primary" @click="showform2()">{{ $t('OrderInfo') }}</el-button>
        <!-- <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
                    <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist1" :key="item['date']"
                        :style="{ height: 35 * item['glassWidth'] + 'px',left:4.22*index+'px' }"
@@ -294,7 +300,6 @@
                <div class="blocks-img" :style="{ left: car2 + 'px', top: '194px' }"></div>
                <div class="blocks-img2" :style="{ left: '912px', top: '366px' }"></div>
                <div class="blocks-img3" :style="{ left: '875px', top: '455px' }"></div> -->
      </div>
    </el-footer>
    <el-dialog :visible.sync="dialogFormVisible" :title="$t('Please confirm the glass information')">
@@ -302,7 +307,7 @@
        <el-form-item :label="$t('Barcodid')">
          <el-input style="width:15%;" :placeholder="$t('Enter the glass lD')" v-model="glassid"></el-input>
          <el-button type="primary" @click="showform(3)">query</el-button>
                    <el-button type="primary" @click="showform(3)">{{ $t('Query') }}</el-button>
        </el-form-item>
        <el-form-item :label="$t('order')">
          <el-input v-model="form.orderId" readonly autocomplete="off" />
@@ -319,11 +324,13 @@
      </el-form>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="sbumitglassid()" :style="{ display: confirm1 == true ? '' : 'none' }" type="primary">{{
                    <el-button @click="sbumitglassid()" :style="{ display: confirm1 == true ? '' : 'none' }"
                        type="primary">{{
            $t('confirm') }}</el-button>
          <el-button @click="FeedInglassid()" :style="{ display: confirm2 == true ? '' : 'none' }" type="primary">{{
                    <el-button @click="FeedInglassid()" :style="{ display: confirm2 == true ? '' : 'none' }"
                        type="primary">{{
            $t('confirm') }}</el-button>
          <el-button @click="cancal()">{{ $t('cancal') }}</el-button>
                    <el-button @click="cancel()">{{ $t('cancel') }}</el-button>
        </span>
      </template>
    </el-dialog>
@@ -339,7 +346,7 @@
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="getOrder();" type="primary">{{ $t('confirm') }}</el-button>
          <el-button @click="cancal1()">{{ $t('cancal') }}</el-button>
                    <el-button @click="cancel1()">{{ $t('cancel') }}</el-button>
        </span>
      </template>
    </el-dialog>
@@ -377,13 +384,24 @@
        </el-table-column>
      </el-table>
    </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible4" :title="$t('OrderInfo')" top="5vh">
            <el-input style="width:15%;" :placeholder="$t('Enter the Order lD')" v-model="orderid"></el-input>
            <el-button type="primary" @click="selectglassinfo()">{{ $t('Query') }}</el-button>
            <el-table :data="this.GlassInfo" :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column prop="glassId" :label="$t('Barcodid')"></el-table-column>
                <el-table-column prop="orderId" :label="$t('Order Number')"></el-table-column>
                <el-table-column prop="width" :label="$t('length')"></el-table-column>
                <el-table-column prop="height" :label="$t('width')"></el-table-column>
            </el-table>
        </el-dialog>
  </el-container>
</template>
<script>
//:disabled="scope.row.glassId > 0 || scope.row.disabled == 1 ? true : false"
import {
  home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo,
  SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist, SelectPassword, SelectGlassByGlassID, Disabled, Inglassid
    SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist, SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass
} from "../../api/home";
@@ -404,6 +422,7 @@
      dialogFormVisible1: false,
      dialogFormVisible2: false,
      dialogFormVisible3: false,
            dialogFormVisible4: false,
      form: {
        orderId: "",
        glassId: "",
@@ -437,7 +456,9 @@
      loadglassheight: 0,
      password: 1,
      text: "",
      zhuangtai: ""
            zhuangtai: "",
            orderid: "",
            GlassInfo: []
    };
  },
  created () {
@@ -490,6 +511,9 @@
          SelectCageInfo(this.cage).then(res => {
            this.cageinfo = res.data.cageinfo;
          });
                    SelectGlass(this.orderid).then(res => {
                        this.GlassInfo = res.data.glass;
                    });
          this.$forceUpdate();
@@ -505,36 +529,34 @@
      }
    },
    load () {
            //加载笼子使用情况数据
      home().then(res => {
        this.tableData = res.data.list;
      });
            //加载理片笼玻璃数据
      home2().then(res => {
        this.cagelist1 = res.data.list1;
        this.cagelist2 = res.data.list2;
        this.cagelist3 = res.data.list3;
        this.cagelist4 = res.data.list4;
      });
            //加载进片任务数据
      loadtask(this.task1).then(res => {
        this.tasklist1 = res.data.list;
        if (res.data.list.length > 0) {
          this.incell = this.tasklist1[0]['cell'];
        }
      });
      loadtask(this.task2).then(res => {
        this.tasklist2 = res.data.list;
        if (res.data.list.length > 0) {
          this.outcell = this.tasklist2[0]['cell'];
        }
      });
            //加载进出片任务数据
      loadtask(this.task2).then(res => {
        this.tasklist2 = res.data.list;
      });
            //加载报警信息
      SelectAlarmmgInfo().then(res => {
        this.alarm = res.data.alarmmg;
      });
            //加载小车位置信息
      Loadcarlist().then(res => {
        this.carlist = res.data.carlist;
      });
            //加载确认密码
      SelectPassword().then(res => {
        this.password = res.data.password;
      });
@@ -579,7 +601,7 @@
            Addglassid(this.glassid).then(res => {
              if (res.data.message2 == 200) {
                this.$message.success(this.$t('Operation successful'));
                this.cancal();
                                this.cancel();
              } else if (res.data.message2 == 500) {
                this.$message.error(this.$t('There are currently tasks'));
              }
@@ -596,6 +618,7 @@
        }
      }
    },
        //显示确认玻璃信息也没
    showform (buttons) {
      if (buttons == 1) {
        this.confirm1 = true;
@@ -604,6 +627,7 @@
        this.confirm1 = false;
        this.confirm2 = true;
      }
            //根据输入的玻璃id获取玻璃信息
      SelectGlassByGlassID(this.glassid).then(res => {
        if (res.data.form != null) {
          this.form = res.data.form;
@@ -615,6 +639,7 @@
        }
      });
    },
        //显示订单信息页面
    showform1 () {
      if (this.order != "") {
        this.form1 =
@@ -624,10 +649,20 @@
        };
        this.dialogFormVisible1 = true;
      }
    },
    cancal () {
        selectglassinfo() {
            SelectGlass(this.orderid).then(res => {
                this.GlassInfo = res.data.glass;
            });
        },
        showform2() {
            SelectGlass(this.orderid).then(res => {
                this.GlassInfo = res.data.glass;
            });
            this.dialogFormVisible4 = true;
        },
        //取消操作时关闭页面
        cancel() {
      this.dialogFormVisible = false;
      this.form = {
        orderId: "",
@@ -636,10 +671,12 @@
        width: ""
      };
    },
    cancal1 () {
        //取消操作时关闭页面
        cancel1() {
      this.dialogFormVisible1 = false;
      this.form1 = {};
    },
        //结束进/出片任务
    endtask (type, glassid, cell) {
      this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
        inputType: 'password',
@@ -664,6 +701,7 @@
        });
      });
    },
        //显示理片笼详情信息
    showcageinfo (cage) {
      this.cage = cage;
      SelectCageInfo(cage).then(res => {
@@ -671,6 +709,7 @@
        this.dialogFormVisible3 = true;
      });
    },
        //删除理片笼玻璃
    deleteglass (glassid, state) {
      this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
        inputType: 'password',
@@ -700,6 +739,7 @@
        });
      });
    },
        //手动出片
    outglass (glassid, state) {
      this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
        inputType: 'password',
@@ -734,6 +774,7 @@
        });
      });
    },
        //手动往理片笼添加玻璃
    insertglass (cage, cell, tier) {
      this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
        inputType: 'password',
@@ -743,14 +784,6 @@
        type: 'warning'
      }).then(({ value }) => {
        if (this.password == value) {
          // OutByGlassID(glassid).then(res => {
          //     if (res.data.message3 == 200) {
          //         this.$message.success(this.$t('Operation successful'));
          //     }
          //     else if (res.data.message2 == 300) {
          //         this.$message.error(this.$t('There is no such grid'));
          //     }
          // });
          this.insertcage = cage;
          this.insertcell = cell;
          this.inserttier = tier;
@@ -765,6 +798,7 @@
        });
      });
    },
        //手动上片
    FeedInglassid () {
      Inglassid(this.insertcage, this.insertcell, this.inserttier, this.form).then(res => {
        if (this.form.glassId != "") {
@@ -780,6 +814,7 @@
      });
    },
        //启用//理片笼禁用
    UpdateDisabled (cage, cell, disabled) {
      Disabled(cage, cell, disabled).then(res => {
        if (res.data.message == 200) {