wu
2023-09-13 697a1ea0547188e267d9c835e584945a0341cbb7
Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes

# Conflicts:
# springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
# springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
# springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
16个文件已修改
2个文件已添加
390 ■■■■■ 已修改文件
CanadaMes-ui/src/img/dipan.png 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/img/taimian.png 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/en-US.json 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/zh-CN.json 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/layout/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/Electrical/Action.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/Electrical/Parameter.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/Electrical/Sign.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/Electrical/State.vue 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/Electrical/alarm.vue 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/home/index.vue 137 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plcstate.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/resources/sql/canadames.sql 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/img/dipan.png
CanadaMes-ui/src/img/taimian.png
CanadaMes-ui/src/lang/locales/en-US.json
@@ -172,16 +172,16 @@
  "Alarm": "Alarm",
  "Distribute": "Distribute",
  "Search": "Search",
  "dvstate": {
    "自动": "automatic",
    "手动": "manual"
  },
  "langUsernameLabel": "Username",
  "langPasswordLabel": "Password",
  "langPasswordPlaceholder": "Please enter your password",
  "langConfirmPasswordLabel": "Confirm Password",
  "langConfirmPasswordPlaceholder": "Please confirm your password",
  "langEmailLabel": "Email",
  "langQQLabel": "QQ",
  "langQQPlaceholder": "Please enter your QQ number",
  "langPhoneNumberLabel": "Phone Number",
@@ -196,10 +196,19 @@
  "langResetButton": "Reset",
  "langCancelButton": "Cancel",
  "langRegisterSuccessMessage": "Registration successful",
  "today": "today",
  "yesterday": "yesterday",
  "week": "week",
  "shijian": "date",
  "Pick a day": "Pick a day",
  "alarmid": "id",
  "alacontent": "content",
  "time-on": "time-on",
  "End-Time": "End-Time",
  "langRegisterSuccessMessage": "Registration successful",
  "添加用户成功":"Successfully add user ",
  "confirmResetPassword": "Are you sure you want to reset the password to the default value?",
  "confirm": "Confirm",
  "cancel": "Cancel",
  "passwordResetSuccess": "Password has been reset to the default value",
@@ -252,6 +261,19 @@
  "glassid":"glassid",
  "order number":"order number",
  "delete":"delete",
  "out":"out"
  "out":"out",
  "Operation successful":"Operation successful",
  "Operation canceled":"Operation canceled",
  "There is no glass for this order":"There is no glass for this order",
  "There are currently tasks":"There are currently tasks",
  "There is no such glass":"There is no such glass",
  "There is no such grid":"There is no such grid",
  "No delete allowed":"No delete allowed",
  "No out allowed":"No out allowed",
  "Are you sure to perform this operation ?":"Are you sure to perform this operation ?",
  "prompt":"prompt",
  "Yes":"Yes",
  "No":"No"
}
CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -168,17 +168,20 @@
  "Parameter": "参数下发",
  "Action": "开关控制",
  "Sign": "IO状态",
  "State": "State",
  "State": "设备状态",
  "Alarm": "报警信息",
  "Distribute": "下发",
  "Search": "搜索",
  "dvstate": {
    "automatic": "自动",
    "manual": "手动"
  },
  "langUsernameLabel": "用户名",
  "langPasswordLabel": "密码",
  "langPasswordPlaceholder": "请输入密码",
  "langConfirmPasswordLabel": "确认密码",
  "langConfirmPasswordPlaceholder": "请确认密码",
  "langEmailLabel": "邮箱",
  "langQQLabel": "QQ",
  "langQQPlaceholder": "请输入QQ号码",
  "langPhoneNumberLabel": "手机号码",
@@ -253,6 +256,27 @@
  "glassid":"玻璃id",
  "order number":"订单",
  "delete":"删除",
  "out":"出片"
  "out":"出片",
  "Operation successful":"操作成功",
  "Operation canceled":"操作取消",
  "There is no such order":"没有此订单的玻璃",
  "There are currently tasks":"当前有任务",
  "There is no such glass":"没有此玻璃",
  "There is no such grid":"没有空闲格子",
  "No delete allowed":"不能删除",
  "No out allowed":"不能出片",
  "Are you sure to perform this operation ?":"确定执行此操作?",
  "prompt":"提示",
  "Yes":"是",
  "No":"否",
  "today": "今天",
  "yesterday": "昨天",
  "week": "一周前",
  "shijian": "日期",
  "Pick a day": "选择日期",
  "alarmid": "id",
  "alacontent": "报警内容",
  "time-on": "开始时间",
  "End-Time": "结束时间"
}
CanadaMes-ui/src/layout/index.vue
@@ -204,9 +204,9 @@
        '用户管理': 'UserManagement',
        '用户列表': 'UserList',
        '设备管理': 'DeviceManagement',
        '报警信息': 'AlarmInformation',
        '参数下发': 'ParameterSetting',
        '开关控制': 'SwitchControl',
        '报警信息': 'Alarm',
        '参数下发': 'Parameter',
        '开关控制': 'Action',
        'IO状态': 'Sign',
        '权限管理': 'PermissionManagement',
        '权限列表': 'PermissionList',
CanadaMes-ui/src/views/Electrical/Action.vue
@@ -2,12 +2,11 @@
  <div class="app">
    <!--面包屑导航区域-->
    <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
      <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
      <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
      <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
      <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</router-link>
    <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
    <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') }}</router-link>
    <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
    <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
    </el-breadcrumb>
    <div>Action</div>
    <el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="{ messagepack }">
CanadaMes-ui/src/views/Electrical/Parameter.vue
@@ -2,11 +2,11 @@
  <div class="app">
    <!-- 面包屑导航区域 -->
    <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
      <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
      <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
      <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
      <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</router-link>
    <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
    <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') }}</router-link>
    <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
    <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
    </el-breadcrumb>
    <div>Parameter</div>
@@ -18,10 +18,11 @@
      </div>
      <div class="kuai_div" v-for="(item, index) in record.xyData" :key="index">
        <el-input style="width: 280px; border:none;" class="in_mc" v-model="item.name" readonly></el-input>
        <span style="margin-right: 5px; width: 50px;">{{ item.value }}</span>
        <span style="margin-right: 5px; font-size: 14px;">|</span>
        <input v-model="item.value2" type="number"
          style="width: 30px; margin-right: 5px; margin-top: 5px; font-size: 16px;">
  <span style="margin-right: 5px; width: 50px;">{{ item.value }}</span>
  <span style="margin-right: 5px; font-size: 14px;color: red;">|</span>
  <input v-model="item.value2" type="number" style="width: 43px; margin-right: 5px; margin-top: 5px; font-size: 16px;">
      </div>
    </el-form>
  </div>
@@ -146,7 +147,7 @@
<style>
.kuai_div {
  width: calc(100% / 3);
  width: calc(100% / 2);
  margin-bottom: 15px;
}
CanadaMes-ui/src/views/Electrical/Sign.vue
@@ -2,13 +2,16 @@
  <div class="app">
    <!--面包屑导航区域-->
    <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
      <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
      <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
      <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
      <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</router-link>
    <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
    <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') }}</router-link>
    <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
    <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
    </el-breadcrumb>
    <div>Sign</div>
    <div>{{ $t('Sign') }}</div>
    <div style="padding-right: 30px;display: flex;flex-wrap: wrap;" class="neir">
      <div class="kuai_sb" v-for="item in record.xyData" :key="item.name">
        <el-col class="deng" :class="getStatusClass(item.value)">
@@ -147,7 +150,7 @@
    this.init();
  },
  methods: {
    onButtonClick() {
    onButtonClick () {
      this.isButtonClicked = true; // 将按钮颜色设置为蓝色
      setTimeout(() => {
        this.isButtonClicked = false; // 重置按钮颜色
@@ -294,6 +297,7 @@
.yellow {
  background-color: yellow;
}
.blue-button {
  background-color: skyblue;
}
CanadaMes-ui/src/views/Electrical/State.vue
@@ -2,20 +2,22 @@
  <div class="app">
    <!--面包屑导航区域-->
    <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
      <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
      <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
      <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
      <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</router-link>
    <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
    <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') }}</router-link>
    <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
    <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
    </el-breadcrumb>
    <div>State</div>
    <div>{{ $t('State') }}</div>
    <el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="messagepack.data">
      <div class="kuai_div" v-for="item in this.record.xyData" :key="item.name">
        <el-input style="width: 280px;" class="in_mc" v-model="item.name"></el-input>
        <el-input v-model="item.value" readonly="readonly" style="width: 80px;"></el-input>
        <el-input v-model="item.value" readonly="readonly" style="width: 90px;"></el-input>
      </div>
@@ -51,22 +53,11 @@
          { name: 'D05.State', value: "自动" },
          { name: 'D06.State', value: "自动" },
        ],
        // canshu: [
        //   'D01.State',
        //   'D02.State',
        //   'B01.State',
        //   'B02.State',
        //   'A01.State',
        //   'A02.State',
        //   'D03.State',
        //   'D04.State',
        //   'D05.State',
        //   'D06.State',
        // ],
      },
      localizedRoles: [],
      messagepack: {
        data: { taskname: "" }
      },
@@ -79,9 +70,10 @@
  },
  created () {
    this.init();
    this.replaceChineseWithEnglish();
  },
  methods: {
    onButtonClick() {
    onButtonClick () {
      this.isButtonClicked = true; // 将按钮颜色设置为蓝色
      setTimeout(() => {
        this.isButtonClicked = false; // 重置按钮颜色
@@ -112,7 +104,6 @@
          //console.log("收到数据====" + msg.data);
          let obj = JSON.parse(msg.data);
          this.record.params[0] = obj.sta[0];
          console.log(this.record.params[0]);
          //将读取到的PLC的数据,与定义的xyData,组合成新的数组
          for (let a = 0; a < this.record.params[0].length; a++) {
            if (!this.record.xyData[a]) {
@@ -122,6 +113,13 @@
            }
          }
          const language = this.$i18n.locale;
          if (language === 'en-US') {
            this.replaceChineseWithEnglish();
          } else {
            this.localizedRoles = [...this.record.xyData];
          }
          //console.log(this.localizedRoles);
          this.$forceUpdate();
        }.bind(this);
@@ -135,19 +133,12 @@
        }
      }
    },
    send () {
      this.messagepack.data = this.record.xyData.map((item) => parseInt(item.value)); // 转换为整数数组
      console.log(this.messagepack);
      socket?.send(JSON.stringify(this.messagepack));
    //语言转换
    replaceChineseWithEnglish () {
      const translation = this.$t('dvstate');
      this.record.xyData = this.record.xyData.map(item => { return { name: item.name, value: translation[item.value] || item.value }; });
      console.log(translation);
    },
    valuezhi (zhi) {
      if (zhi == 1) {
        return "自动";
      }
      else {
        return "手动";
      }
    }
  }
@@ -161,6 +152,11 @@
</script>
<style>
* {
  margin: 0px;
  padding: 0px;
}
.kuai_div {
  width: 30%;
  margin-bottom: 15px;
@@ -171,7 +167,9 @@
  .el-input__inner {
    text-align: center;
    border: 1 solid black;
    padding: 0 10px;
  }
@@ -191,6 +189,7 @@
#btn_div .el-button {
  float: right;
}
.blue-button {
  background-color: skyblue;
}
CanadaMes-ui/src/views/Electrical/alarm.vue
@@ -2,20 +2,22 @@
  <div class="app">
    <!--面包屑导航区域-->
    <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
      <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
      <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
      <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
      <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</router-link>
    <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
    <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') }}</router-link>
    <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
    <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
    </el-breadcrumb>
    <div>Alarm</div>
    <div>{{ $t('Alarm') }}</div>
    <div class="block">
      <span class="demonstration">时间:</span>
      <el-date-picker v-model="shijian1" type="datetime" placeholder="选择日期时间" align="right"
      <span class="demonstration">{{ $t('shijian') }}:</span>
      <el-date-picker v-model="shijian1" type="datetime" :placeholder="$t('Pick a day')" align="right"
        :picker-options="pickerOptions">
      </el-date-picker>
      ~
      <el-date-picker v-model="shijian2" type="datetime" placeholder="选择日期时间" align="right"
      <el-date-picker v-model="shijian2" type="datetime" :placeholder="$t('Pick a day')" align="right"
        :picker-options="pickerOptions">
      </el-date-picker>
      &nbsp;&nbsp;
@@ -23,13 +25,13 @@
    </div>
    <el-table :data="localizedRoles" style="width: 100%;" height="550">
      <el-table-column prop="id" label="id" width="80">
      <el-table-column prop="id" :label="$t('alarmid')" width="80">
      </el-table-column>
      <el-table-column prop="content" label="content">
      <el-table-column prop="content" :label="$t('alacontent')">
      </el-table-column>
      <el-table-column prop="timeon" label="time-on">
      <el-table-column prop="timeon" :label="$t('time-on')">
      </el-table-column>
      <el-table-column prop="endTime" label="End Time">
      <el-table-column prop="endTime" :label="$t('End-Time')">
      </el-table-column>
    </el-table>
  </div>
@@ -47,7 +49,6 @@
  mixins: [LanguageMixin],
  data () {
    return {
      activeButton: '',
      record: {
        params: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
@@ -66,27 +67,33 @@
        pageSize: 10
      },
      pickerOptions: {
        disabledDate (time) {
          return time.getTime() > Date.now();
        },
        shortcuts: [{
          text: '今天',
          text: this.$t('today'),
          onClick (picker) {
            picker.$emit('pick', new Date());
          }
        }, {
          text: '昨天',
        },
        {
          text: this.$t('yesterday'),
          onClick (picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24);
            picker.$emit('pick', date);
          }
        }, {
          text: '一周前',
        },
        {
          text: this.$t('week'),
          onClick (picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', date);
          }
        }],
        }]
      },
      shijian1: "",
      shijian2: "",
@@ -109,12 +116,6 @@
  },
  methods: {
    onButtonClick() {
      this.isButtonClicked = true; // 将按钮颜色设置为蓝色
      setTimeout(() => {
        this.isButtonClicked = false; // 重置按钮颜色
      }, 500); // 这里的500毫秒是根据您希望按钮颜色持续多长时间来定的,可以根据需求进行调整
    },
    load () {
      setAll().then(res => {
@@ -236,8 +237,5 @@
td div,
th div {
  text-align: center;
}
.blue-button {
  background-color: skyblue;
}
</style>
CanadaMes-ui/src/views/home/index.vue
@@ -91,11 +91,36 @@
    background-size: 46px 94px;
    background-attachment: local;
    width: 32px;
    position: absolute;
    /* left: 116px; */
    /* left:1060px;18.88px */
    background-image: url('../../img/bigcar01.png');
}
.blocks-img2 {
    height: 100px;
    max-width: 100vw;
    background-repeat: no-repeat;
    background-size: 85px 100px;
    background-attachment: local;
    width: 100px;
    position: absolute;
    /* left: 116px; */
    /* left:1060px;18.88px */
    background-image: url('../../img/dipan.png');
}
.blocks-img3 {
    height: 90px;
    max-width: 100vw;
    background-repeat: no-repeat;
    background-size: 160px 40px;
    background-attachment: local;
    width: 160px;
    position: absolute;
    /* left: 116px; */
    /* left:1060px;18.88px */
    background-image: url('../../img/taimian.png');
}
.el-table td,
@@ -167,7 +192,7 @@
                    <el-table-column :label="$t('Operate')">
                        <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('end task')}}</el-button>
                                @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
                        </template>
                    </el-table-column>
                </el-table>
@@ -181,7 +206,7 @@
                    <el-table-column :label="$t('Operate')">
                        <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('end task')}}</el-button>
                                @click="endtask(1, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
                        </template>
                    </el-table-column>
                </el-table>
@@ -219,6 +244,8 @@
                </div>
                <div class="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
                <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')">
@@ -280,6 +307,8 @@
                    <template slot-scope='scope'>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('delete') }}</el-button>
                        <!-- <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" @click="open">{{ $t('delete')
                        }}</el-button> -->
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('out') }}</el-button>
                    </template>
@@ -441,11 +470,11 @@
            if (this.form1.order != "") {
                InsertOrder(this.order).then(res => {
                    if (res.data.message == 200) {
                        this.dialogFormVisible1=false;
                        this.$message.success("Operation successful");
                        this.dialogFormVisible1 = false;
                        this.$message.success(this.$t('Operation successful'));
                    } else {
                        this.$message.success("There is no such order");
                        this.$message.success(this.$t('There is no glass for this order'));
                    }
                    this.load();
                });
@@ -457,16 +486,16 @@
            if (this.form.order != "") {
                Addglassid(this.glassid).then(res => {
                    if (res.data.message2 == 200) {
                        this.$message.success("Operation successful");
                        this.$message.success(this.$t('Operation successful'));
                        this.cancal();
                    } else if(res.data.message2 == 500) {
                        this.$message.success("There are currently tasks");
                    } else if (res.data.message2 == 500) {
                        this.$message.success(this.$t('There are currently tasks'));
                    }
                    else if(res.data.message2 == 300) {
                        this.$message.success("There is no such glass");
                    else if (res.data.message2 == 300) {
                        this.$message.success(this.$t('There is no such glass'));
                    }
                    else if(res.data.message2 == 400) {
                        this.$message.success("There is no such grid");
                    else if (res.data.message2 == 400) {
                        this.$message.success(this.$t('There is no such grid'));
                    }
                });
            }
@@ -504,11 +533,23 @@
            this.form1 = {};
        },
        endtask(type, glassid, cell) {
            UpdateTask(type, glassid, cell).then(res => {
                if (res.data.message3 == 200) {
                    this.$message.success("Operation successful");
                }
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
                confirmButtonText: this.$t('Yes'),
                cancelButtonText: this.$t('No'),
                type: 'warning'
            }).then(() => {
                UpdateTask(type, glassid, cell).then(res => {
                    if (res.data.message3 == 200) {
                        this.$message.success(this.$t('Operation successful'));
                    }
                });
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: this.$t('Operation canceled')
                });
            });
        },
        showcageinfo(cage) {
            this.cage = cage;
@@ -518,31 +559,55 @@
            });
        },
        deleteglass(glassid, state) {
            if (state == 1) {
                DeleteByGlassID(glassid).then(res => {
                    if (res.data.message3 == 200) {
                        this.$message.success("Operation successful");
                    }
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
                confirmButtonText: this.$t('Yes'),
                cancelButtonText: this.$t('No'),
                type: 'warning'
            }).then(() => {
                if (state == 1) {
                    DeleteByGlassID(glassid).then(res => {
                        if (res.data.message3 == 200) {
                            this.$message.success(this.$t('Operation successful'));
                        }
                    });
                } else {
                    this.$message.success(this.$t('No delete allowed'));
                }
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: this.$t('Operation canceled')
                });
            } else {
                this.$message.success("No out allowed");
            }
            });
        },
        outglass(glassid, state) {
            if (state == 1) {
                OutByGlassID(glassid).then(res => {
                    if (res.data.message3 == 200) {
                        this.$message.success("Operation successful");
                    }
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
                confirmButtonText: this.$t('Yes'),
                cancelButtonText: this.$t('No'),
                type: 'warning'
            }).then(() => {
                if (state == 1) {
                    OutByGlassID(glassid).then(res => {
                        if (res.data.message3 == 200) {
                            this.$message.success(this.$t('Operation successful'));
                        }
                        else if (res.data.message2 == 300) {
                            this.$message.success(this.$t('There is no such grid'));
                        }
                    });
                } else {
                    this.$message.success(this.$t('No out allowed'));
                }
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: this.$t('Operation canceled')
                });
            } else {
                this.$message.success("No out allowed");
            }
            });
        }
    }
}
</script>
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java
@@ -18,9 +18,10 @@
            List<Short> arraylist = S7control.getinstance().ReadWord("DB100.DBW0", 12);
            List<Short> state = S7control.getinstance().ReadWord("DB103.DBW0", 10);
            JSONObject jsonObject = new JSONObject();
//            new short[]{1111,121, 3232, 0, 1, 0, 1, 0, 1, 0, 1, 0}
//            new short[]{65545,65545, 65545, 65545, 65545, 65545, 65545, 65545, 65545,65545, 65545, 65545}
            //            new short[]{65545,65545, 65545, 65545, 65545, 65545, 65545, 65545, 65545, 65545}
            jsonObject.append("params",  arraylist );
            jsonObject.append("state", state);
            jsonObject.append("state",  state);
            WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter");
            if (sendwServer != null) {
                sendwServer.sendMessage(jsonObject.toString());
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -17,7 +17,7 @@
    public void run() {
        while (this != null) {
            try {
                Thread.sleep(5000);
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
springboot-vue3/src/main/java/com/example/springboot/component/Plcstate.java
@@ -16,10 +16,10 @@
        e.printStackTrace();
      }
      List<Short> plclist = S7control.getinstance().ReadWord("DB103.DBW0", 10);
      // Short[] values = { 0, 1, 1, 0, 1, 0, 1, 0,
      // 1, 0, };
      // List<Short> plclist = new ArrayList<>(Arrays.asList(values));
      // List<Short> plclist = S7control.getinstance().ReadWord("DB103.DBW0", 10);
      Short[] values = { 0, 1, 1, 0, 1, 0, 1, 0,
          1, 0, };
      List<Short> plclist = new ArrayList<>(Arrays.asList(values));
      if (plclist != null) {
        List<String> Intlist = new ArrayList<>();
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -25,19 +25,15 @@
    //
    System.out.println("启动完成");
  new PlcHold().start();
    new PlcHold().start();
    new Plcaction().start();
    new Plchome().start();
    new PlcParameter().start();
 new Plcalarm().start();
    new Plcalarm().start();
    new Plcsign().start();
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -133,7 +133,6 @@
        spianService.selectout2(glassid);
        Map<String, Object> map = new HashMap<>();
        // 调用伍上片函数
        Short results = spianService.selectout2(glassid);
        if (results == 200) {
@@ -143,6 +142,7 @@
        } else if (results == 400) {
            map.put("message2", "400");
        }
        return Result.success(map);
    }
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -365,3 +365,4 @@
    // }
}
springboot-vue3/src/main/resources/sql/canadames.sql
@@ -11,7 +11,7 @@
 Target Server Version : 80019
 File Encoding         : 65001
 Date: 13/09/2023 09:22:22
 Date: 13/09/2023 09:48:14
*/
SET NAMES utf8mb4;