| | |
| | |
|
| | | .gezi {
|
| | | height: 35px;
|
| | | width: 4.22px;
|
| | | width: 3.07px;
|
| | | /* width: 4.22px; */
|
| | | }
|
| | |
|
| | | .gezi:nth-child(22),
|
| | | .gezi:nth-child(43),
|
| | | .gezi:nth-child(64),
|
| | | .gezi:nth-child(85) {
|
| | | margin-left: 10px;
|
| | | margin-left: 7px;
|
| | | /* margin-left: 10px; */
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | .blocks {
|
| | | min-height: 55vh;
|
| | | max-width: 100vw;
|
| | | |
| | | max-width: 94vw;
|
| | | background-image: url('../../img/xmjc.png');
|
| | | margin: 0 auto;
|
| | | background-repeat: no-repeat;
|
| | | /* background-size: 100% 100%; */
|
| | | background-size: 1660px 560px;
|
| | | background-attachment: local;
|
| | | width: 1660px;
|
| | | min-height: 55vh;
|
| | | background-size: 1200px 510px;
|
| | | /* max-width: 100vw;
|
| | | background-size: 1660px 560px; */
|
| | | |
| | | |
| | | }
|
| | |
|
| | | .blocks-img {
|
| | | height: 100px;
|
| | | max-width: 100vw;
|
| | | background-repeat: no-repeat;
|
| | | background-size: 46px 94px;
|
| | | background-attachment: local;
|
| | | width: 32px;
|
| | | position: absolute;
|
| | | /* left: 116px; */
|
| | | /* left:1060px;18.88px */
|
| | | background-image: url('../../img/bigcar01.png');
|
| | | background-size: 40px 87px;
|
| | | /* background-size: 46px 94px; */
|
| | | }
|
| | |
|
| | | .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');
|
| | | background-size: 70px 85px;
|
| | | left: 654px;
|
| | | top: 333px;
|
| | | /* background-size: 85px 100px;
|
| | | left: 912px;
|
| | | top: 366px; */
|
| | | }
|
| | |
|
| | | .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');
|
| | | background-size: 120px 30px;
|
| | | left: 630px;
|
| | | top: 420px;
|
| | | /* background-size: 160px 40px;
|
| | | left: 875px;
|
| | | top: 455px; */
|
| | | }
|
| | |
|
| | | .el-table td,
|
| | |
| | | </el-main>
|
| | | <el-footer>
|
| | | <div class="blocks" style="position: relative;">
|
| | | <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
|
| | | <div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:237px;">
|
| | | <div :class="getStatusClass(item.state)" v-for="item in cagelist1" :key="item['date']"
|
| | | @click="showcageinfo(item['cage'])"></div>
|
| | | </div>
|
| | | <div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:640px;">
|
| | | <div :class="getStatusClass(item.state)" v-for="item in cagelist2" :key="item['date']"
|
| | | @click="showcageinfo(item['cage'])"></div>
|
| | | </div>
|
| | | <div style="display:flex;position: absolute;float:left;z-index: 999;top:138px;left:237px;">
|
| | | <div :class="getStatusClass(item.state)" v-for="item in cagelist3" :key="item['date']"
|
| | | @click="showcageinfo(item['cage'])"></div>
|
| | | </div>
|
| | | <div style="display:flex;position: absolute;float:left;z-index: 999;top:138px;left:640px;">
|
| | | <div :class="getStatusClass(item.state)" v-for="item in cagelist4" :key="item['date']"
|
| | | @click="showcageinfo(item['cage'])"></div>
|
| | | </div>
|
| | | <div class="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
|
| | | <div class="blocks-img" :style="{ left: car2 + 'px', top: '175px' }"></div>
|
| | | <div class="blocks-img2"></div>
|
| | | <div class="blocks-img3"></div>
|
| | | <!-- <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
|
| | | <div :class="getStatusClass(item.state)" v-for="item in cagelist1" :key="item['date']"
|
| | | @click="showcageinfo(item['cage'])"></div>
|
| | | </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 class="blocks-img3" :style="{ left: '875px', top: '455px' }"></div> -->
|
| | | </div>
|
| | | </el-footer>
|
| | | <el-dialog :visible.sync="dialogFormVisible" :title="$t('Please confirm the glass information')">
|
| | |
| | | order: "",
|
| | | glassid: "",
|
| | | url: "../../img/bigcar01.png",
|
| | | car1: 150,
|
| | | car2: 242,
|
| | | car1: 107,
|
| | | car2: 175,
|
| | | // car1: 150,
|
| | | // car2: 242,
|
| | | cageinfo: [],
|
| | | cage: 0
|
| | | };
|
| | |
| | | //console.log("收到数据====" + msg.data);
|
| | | let obj = JSON.parse(msg.data);
|
| | | if (obj.params != null) {
|
| | | this.car1 = 150 + 24.6 * obj.params[0][0];
|
| | | this.car2 = 242 + 24.6 * obj.params[0][1];
|
| | | this.car1 = 107 + 17.62 * obj.params[0][0];
|
| | | this.car2 = 175 + 17.62 * obj.params[0][1];
|
| | | // this.car1 = 150 + 24.6 * obj.params[0][0];
|
| | | // this.car2 = 242 + 24.6 * obj.params[0][1];
|
| | | }
|
| | | this.tableData = obj.tableData[0];
|
| | | this.cagelist1 = obj.cagelist1[0];
|
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | List<Short> arraylist = S7control.getinstance().ReadWord("DB100.DBW0", 12); |
| | | List<Short> state = S7control.getinstance().ReadWord("DB103.DBW0", 10); |
| | | List<Short> arraylist = S7control.getinstance().ReadWord("DB100.0", 12); |
| | | List<Short> state = S7control.getinstance().ReadWord("DB103.0", 10); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // 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} |
| | |
| | | if (webSocketServer != null) { |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | |
| | | String addressList = "DB100.DBW0"; |
| | | String addressList = "DB100.0"; |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | |
| | | // JSONObject jsonObject = new JSONObject();
|
| | | // jsonObject.append("params", new short[]{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0});
|
| | |
|
| | | List<Boolean> paramlist = S7control.getinstance().ReadBits("DB2.DBX0.0 ", 26);
|
| | | List<Boolean> paramlist = S7control.getinstance().ReadBits("DB2.0.0 ", 26);
|
| | | // Boolean[] values = {true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,true, true,false, true};
|
| | | // List<Boolean> paramlist = new ArrayList<>(Arrays.asList(values));
|
| | | if (paramlist == null) {
|
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB104.DBx0.0", 40); |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB104.0.0", 40); |
| | | // Boolean[] values = { true, false, true, false, true, false, true, false, |
| | | // true, false, true, false, true, false, |
| | | // true, false, true, false, true, false, true, false, true, false, true, false, |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.DBX0.0", 58); |
| | | List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.0.0", 58); |
| | | // Boolean[] values = { true, false, true, false, true, false, true, false, |
| | | // true, false, true, false, true, false, |
| | | // true, false, true, false, true, false, true, false, true, false, true, false, |
| | |
| | | public class S7control { |
| | | |
| | | S7PLC s7PLC; // PLC通讯类实例 |
| | | private EPlcType plcType = EPlcType.S1200; // 西门子PLC类型 |
| | | private String ip = "127.0.0.1"; // plc ip地址 |
| | | private int port = 21; // plc 端口号 |
| | | private EPlcType plcType = EPlcType.S1500; // 西门子PLC类型 |
| | | private String ip = "192.168.10.1"; // plc ip地址 |
| | | private int port = 102; // plc 端口号 |
| | | |
| | | private static volatile S7control instance = null; |
| | | |
| | | private S7control() { |
| | | if (s7PLC == null) |
| | | s7PLC = new S7PLC(plcType, ip, port); |
| | | s7PLC.connect(); |
| | | System.out.println(ip); |
| | | } |
| | | |
| | | // 单例模式 获取类的唯一实例 |
| | |
| | | public List<Short> ReadWord(List<String> address) { |
| | | if (!s7PLC.checkConnected()) |
| | | return null; |
| | | |
| | | return s7PLC.readInt16(address); |
| | | } |
| | | |