Merge branch 'master' of http://10.153.19.150:10101/r/CanadaMes
# Conflicts:
# CanadaMes-ui/src/views/user/index.vue
# springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
| | |
| | | })
|
| | | }
|
| | |
|
| | | export function UpdateTask(types,shelf_rack) {
|
| | | export function UpdateTask(types,shelfrack) {
|
| | | return request({
|
| | | url: '/home/UpdateTask?types=' + types + '&shelf_rack'+shelf_rack,
|
| | | url: '/home/UpdateTask?types=' + types + '&shelfrack='+shelfrack,
|
| | | method: 'get',
|
| | | data :""
|
| | | })
|
| | | }
|
| | |
|
| | | export function SelectAlarmmgInfo() {
|
| | | return request({
|
| | | url: '/home/SelectAlarmmgInfo',
|
| | | method: 'get',
|
| | | data :""
|
| | | })
|
| | |
| | | {
|
| | | "systemTitle": "Login System",
|
| | | "usernamePlaceholder": "Please enter username",
|
| | | "passwordPlaceholder": "Please enter password",
|
| | | "loginButton": "Login",
|
| | | "registerButton": "Register",
|
| | | "resetButton": "Reset",
|
| | | "usernameRequired": "Please enter username",
|
| | | "usernameLength": "Username must be between 5 and 15 characters",
|
| | | "passwordRequired": "Please enter password",
|
| | | "passwordLength": "Password must be between 5 and 15 characters",
|
| | | "loginSuccess": "Login successful",
|
| | | "langBtnCN": "Chinese",
|
| | | "langBtnEN": "English",
|
| | | "langHome": "Home",
|
| | | "langUserManagement": "User Management",
|
| | | "langUserList": "User List",
|
| | | "langUsernamePlaceholder": "Please enter username",
|
| | | "langEmailPlaceholder": "Please enter email",
|
| | | "langSearch": "Search",
|
| | | "langAddUser": "Add User",
|
| | | "langUsername": "Username",
|
| | | "langEmail": "Email",
|
| | | "langCreateTime": "Create Time",
|
| | | "langDisabled": "Disabled",
|
| | | "langAction": "Action",
|
| | | "langEdit": "Edit",
|
| | | "langDelete": "Delete",
|
| | | "langAddUserTitle": "Add User",
|
| | | "langPassword": "Password",
|
| | | "langState": "State",
|
| | | "langSelect": "Please select",
|
| | | "langCancel": "Cancel",
|
| | | "langConfirm": "Confirm",
|
| | | "langEditUserTitle": "Edit User",
|
| | | "northglassMESsystem": "NorthGlassMesSystem",
|
| | | "exit": "exit",
|
| | | "changePassword": "changePassword",
|
| | | "resetPassword": "resetPassword",
|
| | | "home": "Home",
|
| | | "role": "role",
|
| | | "langRoleManagement": "Role Management",
|
| | | "langRoleList": "Role List",
|
| | | "langEnterRoleName": "Please enter role name",
|
| | | "langAddRole": "Add Role",
|
| | | "langName": "Name",
|
| | | "langIsValid": "Is Valid",
|
| | | "langOperation": "Operation",
|
| | | "langPleaseSelect": "Please select",
|
| | | "langValid": "Valid",
|
| | | "langInvalid": "Invalid",
|
| | | "langAddRoleSuccess": "Add role successfully",
|
| | | "langEnterName": "Please enter name",
|
| | | "langLengthBetween": "Length should be between",
|
| | | "langAnd": "and",
|
| | | "langCharacters": "characters",
|
| | | "langEnterState": "Please enter state",
|
| | | "langUpdateState": "Update state successfully",
|
| | | "langEditRole": "Edit Role",
|
| | | "langEditRoleSuccess": "Edit role successfully",
|
| | | "langDeleteRoleConfirm": "Are you sure you want to delete this role?",
|
| | | "langPrompt": "Prompt",
|
| | | "langDeleteRoleSuccess": "Delete role successfully",
|
| | | "langCancelDelete": "Cancelled deleting",
|
| | | "langRoleName": "langRoleName",
|
| | | "updateSuccessMessage": "updateSuccessMessage",
|
| | | "paginationTotal": "Total {total}",
|
| | | "paginationSizes": "Items per page",
|
| | | "paginationPrev": "Previous",
|
| | | "paginationPager": "{currentPage}/{pageCount}",
|
| | | "paginationNext": "Next",
|
| | | "paginationJumper": "Jump to",
|
| | | "breadcrumb": {
|
| | | "home": "Home",
|
| | | "permissionManagement": "Permission Management",
|
| | | "permissionList": "Permission List"
|
| | | },
|
| | | "search": {
|
| | | "placeholder": "Enter keywords"
|
| | | },
|
| | | "button": {
|
| | | "addPermission": "Add Permission",
|
| | | "cancel": "Cancel",
|
| | | "confirm": "Confirm"
|
| | | },
|
| | | "table": {
|
| | | "role": "Role",
|
| | | "permissionDescription": "Permission Description",
|
| | | "permissionValue": "Permission Value",
|
| | | "createTime": "Create Time",
|
| | | "isActive": "Is Active",
|
| | | "operation": "Operation"
|
| | | },
|
| | | "tooltip": {
|
| | | "edit": "Edit",
|
| | | "delete": "Delete"
|
| | | },
|
| | | "dialog": {
|
| | | "addPermission": "Add Permission",
|
| | | "editPermission": "Edit Permission"
|
| | | },
|
| | | "form": {
|
| | | "role": "Role",
|
| | | "select": "Please Select",
|
| | | "permission": "Permission",
|
| | | "isActive": "Is Active"
|
| | | },
|
| | | "操作": "Operation",
|
| | | "有效": "Valid",
|
| | | "无效": "Invalid",
|
| | | "请输入名称": "Please enter a name",
|
| | | "长度在 2 到 15 个字符": "Length between 2 and 15 characters",
|
| | | "请输入状态": "Please enter the status",
|
| | | "添加角色": "Add Role",
|
| | | "修改角色": "Edit Role",
|
| | | "删除角色": "Delete Role",
|
| | | "此操作将永久删除该角色, 是否继续?": "This operation will permanently delete the role. Continue?",
|
| | | "提示": "Reminder",
|
| | | "确定": "Confirm",
|
| | | "取消": "Cancel",
|
| | | "添加角色成功": "Successfully added role",
|
| | | "更新状态成功": "Successfully updated status",
|
| | | "修改角色成功": "Successfully modified role",
|
| | | "删除角色成功": "Successfully deleted role",
|
| | |
|
| | | "systemTitle": "Login System",
|
| | | "usernamePlaceholder": "Please enter username",
|
| | | "passwordPlaceholder": "Please enter password",
|
| | | "loginButton": "Login",
|
| | | "registerButton": "Register",
|
| | | "resetButton": "Reset",
|
| | | "usernameRequired": "Please enter username",
|
| | | "usernameLength": "Username must be between 5 and 15 characters",
|
| | | "passwordRequired": "Please enter password",
|
| | | "passwordLength": "Password must be between 5 and 15 characters",
|
| | | "loginSuccess": "Login successful",
|
| | | "langBtnCN": "Chinese",
|
| | | "langBtnEN": "English",
|
| | | "langHome": "Home",
|
| | | "langUserManagement": "User Management",
|
| | | "langUserList": "User List",
|
| | | "langUsernamePlaceholder": "Please enter username",
|
| | | "langEmailPlaceholder": "Please enter email",
|
| | | "langSearch": "Search",
|
| | | "langAddUser": "Add User",
|
| | | "langUsername": "Username",
|
| | | "langEmail": "Email",
|
| | | "langCreateTime": "Create Time",
|
| | | "langDisabled": "Disabled",
|
| | | "langAction": "Action",
|
| | | "langEdit": "Edit",
|
| | | "langDelete": "Delete",
|
| | | "langAddUserTitle": "Add User",
|
| | | "langPassword": "Password",
|
| | | "langState": "State",
|
| | | "langSelect": "Please select",
|
| | | "langCancel": "Cancel",
|
| | | "langConfirm": "Confirm",
|
| | | "langEditUserTitle": "Edit User",
|
| | | "northglassMESsystem":"NorthGlassMesSystem",
|
| | | "exit":"exit",
|
| | | "changePassword":"changePassword",
|
| | | "resetPassword": "resetPassword",
|
| | | "home":"Home",
|
| | | "role":"role",
|
| | | "langRoleManagement": "Role Management",
|
| | | "langRoleList": "Role List",
|
| | | "langEnterRoleName": "Please enter role name",
|
| | | "langAddRole": "Add Role",
|
| | | "langName": "Name",
|
| | | "langIsValid": "Is Valid",
|
| | | "langOperation": "Operation",
|
| | | "langPleaseSelect": "Please select",
|
| | | "langValid": "Valid",
|
| | | "langInvalid": "Invalid",
|
| | | "langAddRoleSuccess": "Add role successfully",
|
| | | "langEnterName": "Please enter name",
|
| | | "langLengthBetween": "Length should be between",
|
| | | "langAnd": "and",
|
| | | "langCharacters": "characters",
|
| | | "langEnterState": "Please enter state",
|
| | | "langUpdateState": "Update state successfully",
|
| | | "langEditRole": "Edit Role",
|
| | | "langEditRoleSuccess": "Edit role successfully",
|
| | | "langDeleteRoleConfirm": "Are you sure you want to delete this role?",
|
| | | "langPrompt": "Prompt",
|
| | | "langDeleteRoleSuccess": "Delete role successfully",
|
| | | "langCancelDelete": "Cancelled deleting",
|
| | | "langRoleName":"langRoleName",
|
| | | "updateSuccessMessage":"updateSuccessMessage",
|
| | | "paginationTotal": "Total {total}",
|
| | | "paginationSizes": "Items per page",
|
| | | "paginationPrev": "Previous",
|
| | | "paginationPager": "{currentPage}/{pageCount}",
|
| | | "paginationNext": "Next",
|
| | | "paginationJumper": "Jump to",
|
| | | "breadcrumb": {
|
| | | "home": "Home",
|
| | | "permissionManagement": "Permission Management",
|
| | | "permissionList": "Permission List"
|
| | | },
|
| | | "search": {
|
| | | "placeholder": "Enter keywords"
|
| | | },
|
| | | "button": {
|
| | | "addPermission": "Add Permission",
|
| | | "cancel": "Cancel",
|
| | | "confirm": "Confirm"
|
| | | },
|
| | | "table": {
|
| | | "role": "Role",
|
| | | "permissionDescription": "Permission Description",
|
| | | "permissionValue": "Permission Value",
|
| | | "createTime": "Create Time",
|
| | | "isActive": "Is Active",
|
| | | "operation": "Operation"
|
| | | },
|
| | | "tooltip": {
|
| | | "edit": "Edit",
|
| | | "delete": "Delete"
|
| | | },
|
| | | "dialog": {
|
| | | "addPermission": "Add Permission",
|
| | | "editPermission": "Edit Permission"
|
| | | },
|
| | | "form": {
|
| | | "role": "Role",
|
| | | "select": "Please Select",
|
| | | "permission": "Permission",
|
| | | "isActive": "Is Active"
|
| | | },
|
| | | "操作": "Operation",
|
| | | "有效": "Valid",
|
| | | "无效": "Invalid",
|
| | | "请输入名称": "Please enter a name",
|
| | | "长度在 2 到 15 个字符": "Length between 2 and 15 characters",
|
| | | "请输入状态": "Please enter the status",
|
| | | "添加角色": "Add Role",
|
| | | "修改角色": "Edit Role",
|
| | | "删除角色": "Delete Role",
|
| | | "此操作将永久删除该角色, 是否继续?": "This operation will permanently delete the role. Continue?",
|
| | | "提示": "Reminder",
|
| | | "确定": "Confirm",
|
| | | "取消": "Cancel",
|
| | | "添加角色成功": "Successfully added role",
|
| | | "更新状态成功": "Successfully updated status",
|
| | | "修改角色成功": "Successfully modified role",
|
| | | "删除角色成功": "Successfully deleted role",
|
| | | "修改用户成功":"Successfully modified user",
|
| | | |
| | |
|
| | | "translation": {
|
| | | "D01 VFD error": "D01 VFD error",
|
| | | "D02 VFD error": "D02 VFD error",
|
| | |
| | | "State": "State",
|
| | | "Alarm": "Alarm",
|
| | | "Distribute": "Distribute"
|
| | | } |
| | | }
|
| | |
|
| | |
| | | "exit": "退出",
|
| | | "changePassword": "修改密码",
|
| | | "resetPassword": "重置密码",
|
| | |
|
| | | "home": "主页",
|
| | | "role": "角色",
|
| | | "langRoleManagement": "角色管理",
|
| | |
| | | "State": "State",
|
| | | "Alarm": "报警信息",
|
| | | "Distribute": "下发"
|
| | | } |
| | | }
|
| | |
|
| | |
| | | background-color="#222f3e" text-color="#fff" active-text-color="#ffd04b" |
| | | :collapse="isCollapse" :unique-opened="true" |
| | | :collapse-transition="false" :router="true"> |
| | | <el-menu-item index="/" @click="goToHome"> |
| | | <!-- <el-menu-item index="/" @click="goToHome"> |
| | | <template slot="title"> |
| | | <!--图标--> |
| | | |
| | | <i class="el-icon-menu"></i> |
| | | <!--文本--> |
| | | |
| | | <span>{{ $t('home') }}</span> |
| | | </template> |
| | | </el-menu-item> |
| | | </el-menu-item> --> |
| | | <!--一级菜单--> |
| | | <el-submenu :index="item.id.toString()" v-for="item in menuList" :key="item.id"> |
| | | <!--一级菜单模板区域--> |
| | |
| | | <span>{{ item.name }}</span> |
| | | </template> |
| | | <!--二级菜单--> |
| | | |
| | | <el-menu-item :index="'/'+menu.router" |
| | | v-for="menu in item.menuLists" :key="menu.id" |
| | | @click="addTag(menu.router)"> |
| | |
| | | <el-menu :default-active="activePath1" class="el-menu-demo" mode="horizontal" |
| | | background-color="#576574" text-color="#fff" active-text-color="#ffd04b"> |
| | | <div class="header-left"> |
| | | <el-button :icon="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'" @click="toggleCollapse" style="height:30px"></el-button> |
| | | <el-button :icon="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'" @click="toggleCollapse" style="height:30px;"></el-button> |
| | | </div> |
| | | <div class="tagContainer"> |
| | | <tag v-for="(tag, index) in tags" :key="index" :tag="tag" @removeTag="removeTag(index)" @switchTag="switchTag(index)"></tag> |
| | | <!-- <el-button icon="el-icon-circle-close" class="close-all-btn" @click="removeAllTags"></el-button> --> |
| | | </div> |
| | | <div class="tagContainer" style="display: flex;"> |
| | | <tag v-for="(tag, index) in tags" :key="index" :tag="tag" @removeTag="removeTag(index)" @switchTag="switchTag(index)"></tag> |
| | | </div> |
| | | <template> |
| | | <el-submenu index="1" class="custom-submenu"> |
| | | <el-submenu index="1" class="custom-submenu" > |
| | | <template slot="title"> |
| | | <el-avatar src="../assets/emi.png" style="width:30px;height:30px;margin-top:2px;"></el-avatar> |
| | | <el-avatar src="../assets/emi.png" style="width:20px;height:20px;margin-top:30px;background-color: white;"></el-avatar> |
| | | </template> |
| | | <el-menu-item index="1-1" @click="logout">{{ $t('exit') }}</el-menu-item> |
| | | <el-menu-item index="1-2" @click="showChangePasswordDialog">{{ $t('changePassword') }}</el-menu-item> |
| | |
| | | ...mapState('tags', ['tags']) |
| | | }, |
| | | methods: { |
| | | |
| | | logout: function () { |
| | | removeToken() |
| | | this.$router.push('/login') |
| | |
| | | this.$store.commit('tags/addTag', tag); |
| | | } |
| | | }, |
| | | |
| | | |
| | | removeTag(index) { |
| | | this.$store.commit('tags/removeTag', index); // 从 Vuex Store 中移除标签 |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | |
| | | .el-menu--horizontal > .el-submenu .el-submenu__title { |
| | | height: 45px !important; |
| | | } |
| | | .custom-submenu { |
| | | |
| | | |
| | | height: 90px !important; |
| | | } |
| | | |
| | | |
| | | .header-container { |
| | | |
| | |
| | | |
| | | .header-left { |
| | | margin-right: auto; |
| | | width:30px; |
| | | |
| | | } |
| | | .el-aside { |
| | |
| | |
|
| | | .tag i {
|
| | | margin-left: 5px;
|
| | | font-size: 12px;
|
| | | font-size: 5px;
|
| | | cursor: pointer;
|
| | | }
|
| | | </style> |
| | |
| | | <template>
|
| | | <div class="app">
|
| | | <!--面包屑导航区域-->
|
| | | <!-- 面包屑导航区域 -->
|
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
| | | <router-link to="/home" tag="el-button" type="text">{{ $t('langHome') }}</router-link>
|
| | | <el-button type="text">{{ $t('Distribute') }}</el-button>
|
| | | <el-button type="text">Electrical</el-button>
|
| | | <router-link to="/Electrical/Parameter" tag="el-button" type="text">Parameter</router-link>
|
| | | <router-link to="/Electrical/Action" tag="el-button" type="text">Action</router-link>
|
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text">Sign</router-link>
|
| | | <router-link to="/Electrical/State" tag="el-button" type="text">State</router-link>
|
| | | <router-link to="/Electrical/alarm" tag="el-button" type="text">Alarm</router-link>
|
| | | </el-breadcrumb>
|
| | | |
| | | <div>Parameter</div>
|
| | |
|
| | | <el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="messagepack.data">
|
| | | |
| | | <el-form label-width="100px" style="display: flex; flex-wrap: wrap;" :model="messagepack.data">
|
| | | <div id="btn_div">
|
| | | <el-button type="primary" @click="send()">{{ $t('Distribute') }}</el-button>
|
| | | <el-button type="primary" @click="send()" id="xiafa" :disabled="isButtonDisabled">下发参数</el-button>
|
| | | |
| | | </div>
|
| | | <div class="kuai_div" v-for="(item, index) in record.xyData" :key="index">
|
| | | <el-input style="width: 280px;" class="in_mc" v-model="item.name" readonly></el-input>
|
| | | <el-input v-model.number="item.value" style="width: 80px;"
|
| | | @input="handleChange(index, $event.target.value)"></el-input>
|
| | | </div>
|
| | | <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;">
|
| | | </div>
|
| | | </el-form>
|
| | | </div>
|
| | | </template>
|
| | | |
| | | <script>
|
| | |
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | <script>
|
| | | let socket;
|
| | |
|
| | | export default {
|
| | | name: "Parameter",
|
| | | mixins: [LanguageMixin],
|
| | | data () {
|
| | | data() {
|
| | | return {
|
| | | record: {
|
| | | params: [100, 200, 10, 10, 10, 10],
|
| | | xyData: [
|
| | | { name: "conveyor Velocity(Auto FAST)", value: 0 },
|
| | | { name: "conveyor Velocity(Auto SLOW)", value: 0 },
|
| | | { name: "conveyor Velocity(Manual)", value: 0 },
|
| | | { name: "A01 A02 TURN JOG Velocity", value: 0 },
|
| | | { name: "A01 A02 TRAVEL JOG Velocity", value: 0 },
|
| | | { name: "B01 B02 TRAVEL JOG Velocity", value: 0 },
|
| | | { name: "A01 A02 TURN POS Velocity AUTO", value: 0 },
|
| | | { name: "A01 A02 TURN POS Velocity manual", value: 0 },
|
| | | { name: "A01 A02 TRAVEL POS Velocity AUTO", value: 0 },
|
| | | { name: "A01 A02 TRAVEL POS Velocity manual", value: 0 },
|
| | | { name: "B01 B02 TRAVEL POS Velocity AUTO", value: 0 },
|
| | | { name: "B01 B02 TRAVEL POS Velocity manual", value: 0 }
|
| | | { name: "conveyor Velocity(Auto FAST)", value: 0, value2: 0 },
|
| | | { name: "conveyor Velocity(Auto SLOW)", value: 0, value2: 0 },
|
| | | { name: "conveyor Velocity(Manual)", value: 0 ,value2: 0 },
|
| | | { name: "A01 A02 TURN JOG Velocity", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TRAVEL JOG Velocity", value: 0, value2: 0 },
|
| | | { name: "B01 B02 TRAVEL JOG Velocity", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TURN POS Velocity AUTO", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TURN POS Velocity manual", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TRAVEL POS Velocity AUTO", value: 0, value2: 0 },
|
| | | { name: "A01 A02 TRAVEL POS Velocity manual", value: 0, value2: 0 },
|
| | | { name: "B01 B02 TRAVEL POS Velocity AUTO", value: 0, value2: 0 },
|
| | | { name: "B01 B02 TRAVEL POS Velocity manual", value: 0, value2: 0 }
|
| | | ],
|
| | | canshu: []
|
| | | },
|
| | |
| | | }
|
| | | };
|
| | | },
|
| | | created () {
|
| | | |
| | | |
| | | created() {
|
| | | this.initWebSocket();
|
| | | this.isButtonDisabled = true;
|
| | | },
|
| | | methods: {
|
| | | initWebSocket () {
|
| | | initWebSocket() {
|
| | | let viewname = "Parameter";
|
| | |
|
| | | |
| | | if (typeof WebSocket === "undefined") {
|
| | | console.log("您的浏览器不支持WebSocket");
|
| | | } else {
|
| | | let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
|
| | |
|
| | | |
| | | if (socket != null) {
|
| | | socket.close();
|
| | | socket = null;
|
| | | }
|
| | |
|
| | | |
| | | // 开启一个websocket服务
|
| | | socket = new WebSocket(socketUrl);
|
| | |
|
| | | |
| | | // 打开事件
|
| | | socket.onopen = function () {
|
| | | console.log("websocket已打开");
|
| | | };
|
| | |
|
| | | |
| | | // 收到消息
|
| | | socket.onmessage = (msg) => {
|
| | | if (!msg.data) {
|
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑
|
| | | }
|
| | | if (!msg.data) {
|
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑
|
| | | }
|
| | |
|
| | | let obj = JSON.parse(msg.data);
|
| | | this.record.params[0] = obj.params[0];
|
| | | let obj = JSON.parse(msg.data);
|
| | | this.record.params[0] = obj.params[0];
|
| | | this.record.state = obj.state[0];
|
| | |
|
| | | for (let a = 0; a <= this.record.params[0].length - 1; a++) {
|
| | | if (!this.record.xyData[a]) {
|
| | | this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
|
| | | } else {
|
| | | this.record.xyData[a].value = this.record.params[0][a];
|
| | | }
|
| | | }
|
| | | let isButtonDisabled = this.record.state.includes(1); |
| | | // 判断state中是否存在1
|
| | | console.log(isButtonDisabled)
|
| | | this.isButtonDisabled = isButtonDisabled; // 将判断结果保存到变量isButtonDisabled中
|
| | |
|
| | | console.log(this.record.xyData);
|
| | | this.$forceUpdate();
|
| | | };
|
| | | for (let a = 0; a <= this.record.params[0].length - 1; a++) {
|
| | | if (!this.record.xyData[a]) {
|
| | | this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
|
| | | } else {
|
| | | this.record.xyData[a].value = this.record.params[0][a];
|
| | | }
|
| | | }
|
| | |
|
| | | console.log(this.record.xyData);
|
| | | this.$forceUpdate();
|
| | | };
|
| | | |
| | | // 关闭事件
|
| | | socket.onclose = function () {
|
| | | console.log("websocket已关闭");
|
| | | };
|
| | |
|
| | | |
| | | // 发生错误事件
|
| | | socket.onerror = function () {
|
| | | console.log("websocket发生了错误");
|
| | | };
|
| | | }
|
| | | },
|
| | | send () {
|
| | | this.messagepack.data = this.record.xyData.map((item) => parseInt(item.value)); // 转换为整数数组
|
| | | send() {
|
| | | this.messagepack.data = this.record.xyData.map((item) => parseInt(item.value2)); // 转换为整数数组
|
| | | console.log(this.messagepack);
|
| | | socket?.send(JSON.stringify(this.messagepack));
|
| | | },
|
| | | handleChange (index, value) {
|
| | | handleChange(index, value) {
|
| | | this.record.xyData[index].value = value;
|
| | | }
|
| | | }
|
| | | };
|
| | | </script>
|
| | | |
| | |
|
| | | <style>
|
| | | .kuai_div {
|
| | | width: 30%;
|
| | | width: calc(100% / 3);
|
| | | margin-bottom: 15px;
|
| | | }
|
| | |
|
| | | .el-input {
|
| | | border: none;
|
| | | }
|
| | |
|
| | | .el-input__inner {
|
| | | border: 1px solid black;
|
| | | }
|
| | | .in_mc{
|
| | |
|
| | | .in_mc .el-input__inner {
|
| | | border: none;
|
| | | border:none;
|
| | | }
|
| | |
|
| | |
|
| | | #btn_div {
|
| | | width: 100%;
|
| | |
| | | #btn_div .el-button {
|
| | | float: right;
|
| | | }
|
| | | </style> |
| | | input[type="number"]::-webkit-inner-spin-button,
|
| | | input[type="number"]::-webkit-outer-spin-button {
|
| | | -webkit-appearance: none;
|
| | | margin: 0;
|
| | | }
|
| | |
|
| | | input[type="number"] {
|
| | | -moz-appearance: textfield; /* Firefox中禁用上下箭头 */
|
| | | }
|
| | | </style>
|
| | |
| | | |
| | | }, |
| | | roles: [], |
| | | |
| | | localizedRoles: [], |
| | | |
| | | messagepack: { |
| | | data: { taskname: "" } |
| | | }, |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | load () { |
| | | setAll().then(res => { |
| | | this.roles = res.data.list; |
| | |
| | | content: translation[role.content] || role.content |
| | | })); |
| | | }, |
| | | |
| | | init () { |
| | | let viewname = "alarm"; |
| | | |
| | |
| | |
|
| | |
|
| | | .blocks {
|
| | | min-height: 50vh;
|
| | | min-height: 49vh;
|
| | | max-width: 100vw;
|
| | | background-image: url('../../img/xmjc.png');
|
| | | margin: 0 auto;
|
| | |
| | | .el-table__empty-text {
|
| | | line-height: 41px;
|
| | | }
|
| | |
|
| | | .box {
|
| | | width: 90%;
|
| | | margin-left: 5%;
|
| | | height: 35px;
|
| | | color: red;
|
| | | font-size: 12px;
|
| | | overflow: hidden;
|
| | | }
|
| | |
|
| | | .text {
|
| | | width: auto;
|
| | | line-height: 35px;
|
| | | white-space: nowrap;
|
| | | animation: textScroll 20s linear infinite;
|
| | | margin: 0 auto;
|
| | | }
|
| | |
|
| | | @keyframes textScroll {
|
| | | 0% {
|
| | | transform: translateX(100%);
|
| | | }
|
| | |
|
| | | 100% {
|
| | | transform: translateX(-150%);
|
| | | }
|
| | | }
|
| | | </style>
|
| | | <template>
|
| | | <el-container>
|
| | | <!-- <el-header style="padding: 10px;"></el-header> -->
|
| | | <el-main>
|
| | | <div class="box">
|
| | | <div class="text">
|
| | | Alarm:
|
| | | <label v-for="item in this.alarm" :key="item['id']">
|
| | | {{ item['content'] }}
|
| | | </label>
|
| | | </div>
|
| | | </div>
|
| | |
|
| | | <div style="display:flex;justify-content: space-around;width: 95%;margin: 0 auto;">
|
| | | <el-input style="width:15%;" placeholder="Enter the glass lD" v-model="glassid"></el-input>
|
| | | <el-button type="primary" @click="showform()">Manually feed the glass</el-button>
|
| | | <el-input style="width:15%;" placeholder="Enter the order number" v-model="order"></el-input>
|
| | | <el-button type="warning" @click="getOrder()">Exit the glass by order number</el-button>
|
| | | <el-button type="warning" @click="showform1();">Exit the glass by order number</el-button>
|
| | | </div>
|
| | | <div>
|
| | | <el-table :data="this.tasklist1" border style="width: 100%" >
|
| | | <el-table :data="this.tasklist1" border style="width: 100%">
|
| | | <el-table-column prop="glassId" label="Coming out glass ID"></el-table-column>
|
| | | <el-table-column :width="250" prop="cage" label="The Grille number being used"></el-table-column>
|
| | | <el-table-column :width="250" prop="cell" label="The Grille number being used"></el-table-column>
|
| | | <el-table-column prop="orderId" label="Order Nmuber"></el-table-column>
|
| | | <el-table-column prop="lengthwidth" label="Length and width"></el-table-column>
|
| | | <el-table-column prop="coating" label="coating"></el-table-column>
|
| | | <el-table-column label="Operate">
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;">end task</el-button>
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" @click="endtask(0)">end
|
| | | task</el-button>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | <el-table :data="this.tasklist2" border style="width: 100%">
|
| | | <el-table-column prop="glassId" label="Incoming glass ID"></el-table-column>
|
| | | <el-table-column :width="250" prop="cage" label="The Grille number being used"></el-table-column>
|
| | | <el-table-column :width="250" prop="cell" label="The Grille number being used"></el-table-column>
|
| | | <el-table-column prop="orderId" label="Order Nmuber"></el-table-column>
|
| | | <el-table-column prop="lengthwidth" label="Length and width"></el-table-column>
|
| | | <el-table-column prop="coating" label="coating"></el-table-column>
|
| | | <el-table-column label="Operate">
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;">end task</el-button>
|
| | | <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" @click="endtask(1)">end
|
| | | task</el-button>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | </div>
|
| | |
| | | </el-footer>
|
| | | <el-dialog :visible.sync="dialogFormVisible" title="Please confirm the information">
|
| | | <el-form :model="form" label-width="100px" style="padding-right: 30px">
|
| | | <el-form-item label="Order">
|
| | | <el-form-item label="order">
|
| | | <el-input v-model="form.orderno" autocomplete="off" />
|
| | | </el-form-item>
|
| | | <el-form-item label="length">
|
| | |
| | | </span>
|
| | | </template>
|
| | | </el-dialog>
|
| | | <el-dialog :visible.sync="dialogFormVisible1" title="Ordering Information">
|
| | | <el-form :model="form1" label-width="100px" style="padding-right: 30px">
|
| | | <el-form-item label="order">
|
| | | <el-input v-model="form1.order" autocomplete="off" />
|
| | | </el-form-item>
|
| | | <el-form-item label="number">
|
| | | <el-input v-model="form1.number" autocomplete="off" />
|
| | | </el-form-item>
|
| | | </el-form>
|
| | | <template #footer>
|
| | | <span class="dialog-footer">
|
| | | <el-button @click="cancal1()">cancal</el-button>
|
| | | <el-button @click="getOrder();" type="primary">confirm</el-button>
|
| | | </span>
|
| | | </template>
|
| | | </el-dialog>
|
| | | </el-container>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | |
|
| | | import { home, home2, loadtask, InsertOrder, Addglassid } from "../../api/home";
|
| | | import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo } from "../../api/home";
|
| | |
|
| | | let socket;
|
| | | export default {
|
| | |
| | | data() {
|
| | | return {
|
| | | dialogFormVisible: false,
|
| | | dialogFormVisible1: false,
|
| | | form: {
|
| | | orderno: "NG2210210",
|
| | | length: 800,
|
| | | width: 1000,
|
| | | coating: "red",
|
| | | },
|
| | | form1: {
|
| | | order: "NG2210210",
|
| | | number: 800,
|
| | | },
|
| | | alarm: [],
|
| | | tableData: [],
|
| | | cagelist1: [],
|
| | | cagelist2: [],
|
| | |
| | | glassid: "",
|
| | | url: "../../img/bigcar01.png",
|
| | | car1: 116,
|
| | | car2: 187
|
| | | car2: 187,
|
| | | incell: "",
|
| | | outcell: ""
|
| | | };
|
| | | },
|
| | | created() {
|
| | |
| | |
|
| | | this.car1 = 116 + 18.88 * obj.params[0][0];
|
| | | this.car2 = 187 + 18.8 * obj.params[0][1];
|
| | | this.tableData=obj.tableData[0];
|
| | | this.cagelist1=obj.cagelist1[0];
|
| | | this.cagelist2=obj.cagelist2[0];
|
| | | this.cagelist3=obj.cagelist3[0];
|
| | | this.cagelist4=obj.cagelist4[0];
|
| | | this.tasklist1=obj.tasklist1[0];
|
| | | this.tasklist2=obj.tasklist2[0];
|
| | | |
| | | this.tableData = obj.tableData[0];
|
| | | this.cagelist1 = obj.cagelist1[0];
|
| | | this.cagelist2 = obj.cagelist2[0];
|
| | | this.cagelist3 = obj.cagelist3[0];
|
| | | this.cagelist4 = obj.cagelist4[0];
|
| | | this.tasklist1 = obj.tasklist1[0];
|
| | | this.tasklist2 = obj.tasklist2[0];
|
| | | if (this.tasklist1.length > 0) {
|
| | | this.incell = this.tasklist1[0]['cell'];
|
| | | }
|
| | | if (this.tasklist1.length > 0) {
|
| | | this.outcell = this.tasklist2[0]['cell'];
|
| | | }
|
| | | this.alarm = obj.alarmmg[0];
|
| | | // for (let a = 0; a <= this.record.params.length - 1; a++) {
|
| | | // // this.record.xyData[a] = [this.record.canshu[a], this.record.params[0][a]];
|
| | | // // this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
|
| | |
| | | });
|
| | | loadtask(this.task1).then(res => {
|
| | | this.tasklist1 = res.data.list;
|
| | | console.log(this.tasklist1);
|
| | | 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;
|
| | | });
|
| | | },
|
| | | //根据格子状态修改颜色
|
| | |
| | | },
|
| | | //按订单出片
|
| | | getOrder() {
|
| | | if (this.order != "") {
|
| | | if (this.form1.order != "") {
|
| | | InsertOrder(this.order).then(res => {
|
| | | if (res.data.message == 200) {
|
| | | this.$message.success("Operation successful");
|
| | |
| | | }
|
| | |
|
| | | },
|
| | | showform() {
|
| | | this.form =
|
| | | {
|
| | | orderno: "NG2210210",
|
| | | length: 800,
|
| | | width: 1000,
|
| | | coating: "red",
|
| | | };
|
| | | this.dialogFormVisible = true;
|
| | | },
|
| | | cancal() {
|
| | | this.dialogFormVisible = false;
|
| | | this.form = {};
|
| | | },
|
| | | //手动上片
|
| | | sbumitglassid() {
|
| | | if (this.glassid != "") {
|
| | | if (this.form.order != "") {
|
| | | Addglassid(this.glassid).then(res => {
|
| | | if (res.data.message2 == 200) {
|
| | | this.$message.success("Operation successful");
|
| | |
| | | });
|
| | | }
|
| | | },
|
| | | endtask(type,shelfrack) {
|
| | | alert(type);
|
| | | alert(shelfrack);
|
| | | showform() {
|
| | | if (this.glassid != "") {
|
| | | this.form =
|
| | | {
|
| | | orderno: "NG2210210",
|
| | | length: 800,
|
| | | width: 1000,
|
| | | coating: "red",
|
| | | };
|
| | | this.dialogFormVisible = true;
|
| | | }
|
| | | },
|
| | | showform1() {
|
| | | if (this.order != "") {
|
| | | this.form1 =
|
| | | {
|
| | | order: "NG2210210",
|
| | | number: 800,
|
| | | };
|
| | | this.dialogFormVisible1 = true;
|
| | | }
|
| | |
|
| | |
|
| | | },
|
| | | cancal() {
|
| | | this.dialogFormVisible = false;
|
| | | this.form = {};
|
| | | },
|
| | | cancal1() {
|
| | | this.dialogFormVisible1 = false;
|
| | | this.form1 = {};
|
| | | },
|
| | | endtask(type) {
|
| | | if (type == 0) {
|
| | | UpdateTask(type, this.incell).then(res => {
|
| | | if (res.data.message3 == 200) {
|
| | | this.$message.success("Operation successful");
|
| | | }
|
| | | });
|
| | | } else {
|
| | | UpdateTask(type, this.outcell).then(res => {
|
| | | if (res.data.message3 == 200) {
|
| | | this.$message.success("Operation successful");
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | };
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | </script> |
| | |
| | | <el-row :gutter="20"> |
| | | <!--搜索与添加区域--> |
| | | <el-col :span="6"> |
| | | <el-input :placeholder="$t('langUsernamePlaceholder')" v-model="queryInfo.username" clearable |
| | | @clear="getUserList"> |
| | | <el-input :placeholder= "$t('langUsernamePlaceholder')" v-model="queryInfo.username" clearable @clear="getUserList"> |
| | | </el-input> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-input :placeholder="$t('langEmailPlaceholder')" v-model="queryInfo.email" clearable @clear="getUserList"> |
| | | <el-input :placeholder="$t('langEmailPlaceholder')" v-model="queryInfo.email" clearable @clear="getUserList"> |
| | | </el-input> |
| | | </el-col> |
| | | <!--搜索按钮--> |
| | |
| | | <el-table-column :label="$t('langCreateTime')" prop="createTime"></el-table-column> |
| | | <el-table-column :label="$t('langDisabled')"> |
| | | <template slot-scope="scope"> |
| | | <el-switch :active-value="0" :inactive-value="1" v-model="scope.row.state" @change="stateChange(scope.row)"> |
| | | <el-switch |
| | | :active-value="0" |
| | | :inactive-value="1" |
| | | v-model="scope.row.state" |
| | | @change="stateChange(scope.row)"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" icon="el-icon-refresh" @click="resetPassword(scope.row)"> |
| | | |
| | | {{ $t('resetPassword') }} |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" icon="el-icon-refresh" @click="resetPassword(scope.row)"> |
| | | |
| | | {{ $t('resetPassword') }} |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :label="$t('langAction')"> |
| | | <template slot-scope="scope"> |
| | | <!--修改--> |
| | | <el-tooltip effect="dark" :content="$t('langEdit')" placement="top" :enterable="false"> |
| | | <el-button type="primary" icon="el-icon-edit" size="mini" @click="showEditDialog(scope.row.id)"></el-button> |
| | | <el-button type="primary" icon="el-icon-edit" size="mini" |
| | | @click="showEditDialog(scope.row.id)"></el-button> |
| | | </el-tooltip> |
| | | <!--删除--> |
| | | <el-tooltip effect="dark" :content="$t('langDelete')" placement="top" :enterable="false"> |
| | | <el-button type="danger" icon="el-icon-delete" size="mini" @click="removeUserById(scope.row)"></el-button> |
| | | <el-button type="danger" icon="el-icon-delete" size="mini" |
| | | @click="removeUserById(scope.row)"></el-button> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--分页区域--> |
| | | <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
| | | :current-page="queryInfo.pageNum" :page-sizes="[6, 12, 18, 24]" :page-size="queryInfo.pageSize" |
| | | :total="userList.total" :pager-count="7" :layout="layout"> |
| | | </el-pagination> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="queryInfo.pageNum" |
| | | :page-sizes="[6, 12, 18, 24]" |
| | | :page-size="queryInfo.pageSize" |
| | | :total="userList.total" |
| | | |
| | | :pager-count="7" |
| | | :layout="layout" |
| | | > |
| | | </el-pagination> |
| | | </el-card> |
| | | <!--添加用户的对话框--> |
| | | <el-dialog :title="$t('langAddUserTitle')" :visible.sync="addDialogVisible" width="50%" @close="addDialogClosed"> |
| | | <el-dialog |
| | | :title="$t('langAddUserTitle')" |
| | | :visible.sync="addDialogVisible" |
| | | width="50%" |
| | | @close="addDialogClosed"> |
| | | <!--内容主体区域--> |
| | | <el-form :model="addUserForm" :rules="addUserRules" ref="addUserRef" label-width="100px"> |
| | | <el-form-item :label="$t('langUsername')" prop="username"> |
| | | <el-input v-model="addUserForm.username"></el-input> |
| | | <el-form-item :label="$t('langUsername')" prop="username" > |
| | | <el-input v-model="addUserForm.username" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('langPassword')" prop="password"> |
| | | <el-form-item :label="$t('langPassword')" prop="password" > |
| | | <el-input v-model="addUserForm.password" type="password"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('langEmail')" prop="email"> |
| | | <el-input v-model="addUserForm.email"></el-input> |
| | | </el-form-item> |
| | | |
| | | |
| | | |
| | | <el-form-item :label="$t('langState')" prop="state"> |
| | | <el-select v-model="addUserForm.state"> |
| | | <el-option v-for="(item, index) in options" :key="index" :value="item.value" :label="item.label"> |
| | | <el-select v-model="addUserForm.state" > |
| | | <el-option v-for="(item,index) in options" |
| | | :key="index" |
| | | :value="item.value" |
| | | :label="item.label"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="角色" prop="roleId"> |
| | | <el-select filterable v-model="addUserForm.roleId" placeholder="请选择"> |
| | | <el-option v-for="item in roleList" :key="item.id" :value="item.id" :label="item.name"> |
| | | <el-form-item :label="$t('role')" prop="roleId"> |
| | | <el-select filterable v-model="addUserForm.roleId" :placeholder="$t('langSelect')" > |
| | | <el-option v-for="item in roleList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | <!--修改用户的对话框--> |
| | | <el-dialog :title="$t('langEditUserTitle')" :visible.sync="editDialogVisible" width="50%"> |
| | | <el-dialog |
| | | :title="$t('langEditUserTitle')" |
| | | :visible.sync="editDialogVisible" |
| | | width="50%"> |
| | | <!--内容主体区域--> |
| | | <el-form :model="editUserForm" :rules="addUserRules" ref="addCategoryRef" label-width="100px"> |
| | | <el-form-item :label="$t('langUsername')" prop="username"> |
| | | <el-input v-model="editUserForm.username" disabled></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('role')" prop="roleId"> |
| | | <el-select filterable v-model="editUserForm.roleId" placeholder="请选择"> |
| | | <el-option v-for="item in roleList" :key="item.id" :value="item.id" :label="item.name"> |
| | | <el-select filterable v-model="editUserForm.roleId" :placeholder="$t('langSelect')" > |
| | | <el-option v-for="item in roleList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-input v-model="editUserForm.email"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('langDisabled')" prop="state"> |
| | | <el-select v-model="editUserForm.state"> |
| | | <el-option v-for="(item, index) in options" :key="index" :value="item.value" :label="item.label"> |
| | | <el-select v-model="editUserForm.state" > |
| | | <el-option v-for="(item,index) in options" |
| | | :key="index" |
| | | :value="item.value" |
| | | :label="item.label"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | |
| | | |
| | | <script> |
| | | import { getById, removeById, saveOrUpdate, selectPage, resetPass } from "../../api/user"; |
| | | import { select } from "../../api/role"; |
| | | import {getById, removeById, saveOrUpdate, selectPage,resetPass} from "../../api/user"; |
| | | import {select} from "../../api/role"; |
| | | |
| | | import LanguageMixin from '../../lang/LanguageMixin' |
| | | export default { |
| | | name: "User", |
| | | mixins: [LanguageMixin], |
| | | |
| | | data () { |
| | | data() { |
| | | return { |
| | | layout: 'total, sizes, prev, pager, next, jumper', |
| | | queryInfo: { |
| | |
| | | editUserForm: { |
| | | |
| | | roleId: null, |
| | | name: null, |
| | | roleid: null, |
| | | name:null, |
| | | roleid:null, |
| | | }, |
| | | // 添加分类的验证规则 |
| | | addUserRules: { |
| | | roleId: null, |
| | | username: [ |
| | | { required: true, message: '请输入用户名', trigger: 'blur' }, |
| | | { min: 5, max: 15, message: '长度在 5 到 15 个字符', trigger: 'blur' } |
| | | {required: true, message: '请输入用户名', trigger: 'blur'}, |
| | | {min: 5, max: 15, message: '长度在 5 到 15 个字符', trigger: 'blur'} |
| | | ], |
| | | password: [ |
| | | { required: true, message: '请输入密码', trigger: 'blur' }, |
| | | { min: 5, max: 15, message: '长度在 5 到 15 个字符', trigger: 'blur' } |
| | | {required: true, message: '请输入密码', trigger: 'blur'}, |
| | | {min: 5, max: 15, message: '长度在 5 到 15 个字符', trigger: 'blur'} |
| | | ], |
| | | email: [ |
| | | { required: true, message: '请输入邮箱', trigger: 'blur' }, |
| | | { type: 'email', message: '请输入正确格式的邮箱地址', trigger: 'blur' } |
| | | {required: true, message: '请输入邮箱', trigger: 'blur'}, |
| | | {type: 'email', message: '请输入正确格式的邮箱地址', trigger: 'blur'} |
| | | ] |
| | | }, |
| | | // 控制添加用户弹框的显示和隐藏 |
| | |
| | | // 控制修改用户弹框的显示和隐藏 |
| | | editDialogVisible: false, |
| | | options: [ |
| | | { label: '正常', value: 1 }, |
| | | { label: '禁用', value: 0 } |
| | | {label: '正常', value: 1}, |
| | | {label: '禁用', value: 0} |
| | | ], |
| | | roleList: [], |
| | | } |
| | | }, |
| | | created () { |
| | | created() { |
| | | this.getUserList(); |
| | | }, |
| | | methods: { |
| | | getUserList () { |
| | | getUserList() { |
| | | selectPage(this.queryInfo).then(res => { |
| | | this.userList.records = res.data.records; |
| | | |
| | | this.userList.total = res.data.total |
| | | }); |
| | | |
| | | // test().then(res => { |
| | | // console.log(res.data) |
| | | // }); |
| | | // const data6 = [ |
| | | // { id: 32, deviceName: 'Device 7', address: 'Address 1' }, |
| | | // { id: 33, deviceName: 'Device 8', address: 'Address 2' }, |
| | | |
| | | // test().then(res => { |
| | | // console.log(res.data) |
| | | // }); |
| | | // const data6 = [ |
| | | // { id: 32, deviceName: 'Device 7', address: 'Address 1' }, |
| | | // { id: 33, deviceName: 'Device 8', address: 'Address 2' }, |
| | | // ]; |
| | | |
| | | // ]; |
| | | |
| | | // testup(data6).then(res => { |
| | | // console.log(res.data); |
| | | // }); |
| | | |
| | | // call({ |
| | | // id: 1, |
| | | // name: 12345 |
| | | // }).then(res => { |
| | | // console.log(res.data); |
| | | // }); |
| | | // testup(data6).then(res => { |
| | | // console.log(res.data); |
| | | // }); |
| | | |
| | | // call({ |
| | | // id: 1, |
| | | // name: 12345 |
| | | // }).then(res => { |
| | | // console.log(res.data); |
| | | // }); |
| | | |
| | | }, |
| | | |
| | | showAddDialog () { |
| | | |
| | | showAddDialog() { |
| | | this.addDialogVisible = true; |
| | | select().then(res => { |
| | | this.roleList = res.data; |
| | | }); |
| | | select().then(res => { |
| | | this.roleList = res.data; |
| | | }); |
| | | }, |
| | | // stateChange(info) { |
| | | // saveOrUpdate(info).then(() => { |
| | | // this.$message.success("更新状态成功") |
| | | // }); |
| | | // }, |
| | | stateChange (info) { |
| | | saveOrUpdate(info).then(() => { |
| | | const successMessage = this.$t('updateSuccessMessage'); |
| | | this.$message.success(successMessage); |
| | | stateChange(info) { |
| | | saveOrUpdate(info).then(() => { |
| | | const successMessage = this.$t('updateSuccessMessage'); |
| | | this.$message.success(successMessage); |
| | | }); |
| | | }, |
| | | resetPassword(info) { |
| | | this.$confirm('确认重置密码为默认值吗?', '重置密码', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | resetPass(info).then(() => { |
| | | this.$message.success('密码已重置为默认值'); |
| | | }); |
| | | }, |
| | | resetPassword (info) { |
| | | this.$confirm('确认重置密码为默认值吗?', '重置密码', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | resetPass(info).then(() => { |
| | | this.$message.success('密码已重置为默认值'); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | // 用户取消重置密码操作 |
| | | }); |
| | | }, |
| | | showEditDialog (id) { |
| | | getById({ id: id }).then(res => { |
| | | }) |
| | | .catch(() => { |
| | | // 用户取消重置密码操作 |
| | | }); |
| | | }, |
| | | showEditDialog(id) { |
| | | getById({id: id}).then(res => { |
| | | this.editUserForm = res.data; |
| | | this.editDialogVisible = true; |
| | | }); |
| | | |
| | | |
| | | |
| | | select().then(res => { |
| | | this.roleList = res.data; |
| | | }); |
| | | this.roleList = res.data; |
| | | }); |
| | | }, |
| | | removeUserById (user) { |
| | | removeUserById(user) { |
| | | // 弹框询问用户是否删除分类 |
| | | this.$confirm('此操作将永久删除该分类, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | removeById({ id: user.id }).then(() => { |
| | | removeById({id: user.id}).then(() => { |
| | | // 重新获取分类列表 |
| | | this.getUserList(); |
| | | this.$message.success("删除用户成功"); |
| | |
| | | this.$message.info('已取消删除'); |
| | | }); |
| | | }, |
| | | handleSizeChange (newSize) { |
| | | handleSizeChange(newSize) { |
| | | this.queryInfo.pageSize = newSize; |
| | | this.getUserList() |
| | | }, |
| | | handleCurrentChange (newPage) { |
| | | handleCurrentChange(newPage) { |
| | | this.queryInfo.pageNum = newPage; |
| | | this.getUserList() |
| | | }, |
| | | addDialogClosed () { |
| | | addDialogClosed() { |
| | | this.$refs['addUserRef'].resetFields(); |
| | | }, |
| | | addUser () { |
| | | addUser() { |
| | | this.$refs.addUserRef.validate(async valid => { |
| | | if (!valid) return; |
| | | saveOrUpdate(this.addUserForm).then(() => { |
| | |
| | | }); |
| | | }) |
| | | }, |
| | | editUserInfo () { |
| | | editUserInfo() { |
| | | this.$refs.addCategoryRef.validate(async valid => { |
| | | if (!valid) return; |
| | | |
| | | |
| | | saveOrUpdate(this.editUserForm).then(() => { |
| | | this.$message.success("修改用户成功"); |
| | | const 修改用户成功 = this.$t('修改用户成功'); |
| | | this.$message.success(修改用户成功); |
| | | // 隐藏添加分类对话框 |
| | | this.editDialogVisible = false; |
| | | // 重新获取分类列表 |
| | |
| | | while (this != null) { |
| | | try { |
| | | |
| | | Thread.sleep(10000); |
| | | Thread.sleep(500); |
| | | } catch (InterruptedException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | |
| | | List<Boolean> bitlist = S7control.getinstance().ReadBits("DB2.0.0", 100); |
| | | |
| | | List<Short> paramlist = S7control.getinstance().ReadWord("DB100.6", 1); |
| | | |
| | | |
| | | //判断进片请求 |
| | | List<Short> datas1List=S7control.getinstance().ReadWord("DB106.24", 1); |
| | | |
| | | // 查询数据库 |
| | | // 推送到前端 |
| | | |
| | |
| | | import java.util.List; |
| | | |
| | | public class PlcParameter extends Thread { |
| | | private static final int SEND_INTERVAL = 10000; |
| | | private static final int WRITE_INTERVAL = 100; |
| | | |
| | | @Override |
| | | |
| | | public void run() { |
| | | try { |
| | | // 发送一次消息 |
| | | sendMessages(); |
| | | |
| | | // 延迟一段时间 |
| | | Thread.sleep(SEND_INTERVAL); |
| | | |
| | | while (true) { |
| | | // 写入PLC |
| | | writeToPlc(); |
| | | Thread.sleep(WRITE_INTERVAL); |
| | | |
| | | // 发送消息 |
| | | sendMessages(); |
| | | Thread.sleep(SEND_INTERVAL); |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | private void sendMessages() { |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter"); |
| | | if (sendwServer != null) { |
| | | List<Short> paramlist = S7control.getinstance().ReadWord("DB100.DBW", 12); |
| | | List<Short> state = S7control.getinstance().ReadWord("DB103.DBW0", 10); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // new short[]{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0} |
| | | jsonObject.append("params", new short[]{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0}); |
| | | sendwServer.sendMessage(jsonObject.toString()); |
| | | } |
| | | } |
| | | jsonObject.append("params", new short[]{1111,121, 3232, 0, 1, 0, 1, 0, 1, 0, 1, 0}); |
| | | jsonObject.append("state", new short[]{0, 1, 0, 0, 0, 0, 0,0, 0, 0}); |
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter"); |
| | | if (sendwServer != null) { |
| | | sendwServer.sendMessage(jsonObject.toString()); |
| | | } |
| | | |
| | | private void writeToPlc() { |
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter"); |
| | | if (webSocketServer != null) { |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter"); |
| | | if (webSocketServer != null) { |
| | | List<String> messages = webSocketServer.getMessages(); |
| | | |
| | | String addressList = "DB100.DBW0"; |
| | | String addressList = "DB100.DBW0"; |
| | | |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | System.out.println("messages:" + messages); |
| | | String[] parts = lastMessage.split(","); |
| | | List<Short> messageValues = new ArrayList<>(); |
| | | for (String part : parts) { |
| | | try { |
| | | // 使用正则表达式清除非数字字符 |
| | | String cleanedPart = part.replaceAll("[^0-9-]", ""); |
| | | short value = Short.parseShort(cleanedPart.trim()); |
| | | messageValues.add(value); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | e.printStackTrace(); |
| | | if (!messages.isEmpty()) { |
| | | // 将最后一个消息转换为 short 类型的列表 |
| | | String lastMessage = messages.get(messages.size() - 1); |
| | | System.out.println("messages:" + messages); |
| | | String[] parts = lastMessage.split(","); |
| | | List<Short> messageValues = new ArrayList<>(); |
| | | for (String part : parts) { |
| | | try { |
| | | // 使用正则表达式清除非数字字符 |
| | | String cleanedPart = part.replaceAll("[^0-9-]", ""); |
| | | short value = Short.parseShort(cleanedPart.trim()); |
| | | messageValues.add(value); |
| | | } catch (NumberFormatException e) { |
| | | // 如果无法解析为 short 类型,则忽略该部分 |
| | | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 将消息值写入 PLC |
| | | S7control.getinstance().WriteWord(addressList, messageValues); |
| | | System.out.println("messageValues:" + messageValues); |
| | | System.out.println("addressList:" + addressList); |
| | | // 清空消息列表 |
| | | webSocketServer.clearMessages(); |
| | | // 将消息值写入 PLC |
| | | S7control.getinstance().WriteWord(addressList, messageValues); |
| | | System.out.println("messageValues:" + messageValues); |
| | | System.out.println("addressList:" + addressList); |
| | | // 清空消息列表 |
| | | webSocketServer.clearMessages(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | import cn.hutool.json.JSONObject;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.List;
|
| | |
|
| | | public class Plcaction extends Thread {
|
| | | private static final long SEND_INTERVAL = 2000; // 发送消息的时间间隔
|
| | | private static final long WRITE_INTERVAL = 100; // 写入PLC的时间间隔
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | try {
|
| | | // 发送一次消息
|
| | | sendMessages();
|
| | |
|
| | | // 延迟一段时间
|
| | | Thread.sleep(SEND_INTERVAL);
|
| | |
|
| | | while (true) {
|
| | | // 写入PLC
|
| | | writeToPlc();
|
| | | Thread.sleep(WRITE_INTERVAL);
|
| | |
|
| | | // 发送消息
|
| | | sendMessages();
|
| | | Thread.sleep(SEND_INTERVAL);
|
| | | while (this != null) {
|
| | | try {
|
| | | Thread.sleep(1000);
|
| | | } catch (InterruptedException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | } catch (InterruptedException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | // List<Boolean> paramlist = S7control.getinstance().ReadBits("DB100.DBW", 12);
|
| | | ////
|
| | | // 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});
|
| | |
|
| | | private void sendMessages() {
|
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("action");
|
| | | if (sendwServer != null) {
|
| | | // List<Boolean> paramlist = S7control.getinstance().ReadBits("DB100.DBW", 12);
|
| | | Boolean[] values = {false, true,false, true,false, true,false, true,false, true,false, true,false, true,false, true,false, true,false, true,false, true};
|
| | | List<Boolean> paramlist = new ArrayList<>(Arrays.asList(values));
|
| | | if (paramlist == null) {
|
| | |
|
| | | List<Boolean> paramlist = S7control.getinstance().ReadBits("DB100.DBW", 12);
|
| | | // 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}
|
| | | 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 });
|
| | | } else {
|
| | | short[] params = new short[paramlist.size()];
|
| | |
|
| | | sendwServer.sendMessage(jsonObject.toString());
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void writeToPlc() {
|
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("action");
|
| | | if (webSocketServer != null) {
|
| | | List<String> messages = webSocketServer.getMessages();
|
| | |
|
| | | String addressList = "DB100.DBW0";
|
| | |
|
| | | if (!messages.isEmpty()) {
|
| | | // 将最后一个消息转换为整数类型的列表
|
| | | String lastMessage = messages.get(messages.size() - 1);
|
| | | System.out.println("messages:" + messages);
|
| | | String[] parts = lastMessage.split(",");
|
| | | List<Integer> messageValues = new ArrayList<>();
|
| | | for (String part : parts) {
|
| | | try {
|
| | | // 使用正则表达式清除非数字字符
|
| | | String cleanedPart = part.replaceAll("[^0-9-]", "");
|
| | | Integer value = Integer.parseInt(cleanedPart.trim());
|
| | | messageValues.add(value);
|
| | | } catch (NumberFormatException e) {
|
| | | // 如果无法解析为整数类型,则忽略该部分
|
| | | e.printStackTrace();
|
| | | }
|
| | | for (int i = 0; i < paramlist.size(); i++) {
|
| | | boolean value = paramlist.get(i);
|
| | | params[i] = value ? (short) 1 : (short) 0;
|
| | | }
|
| | |
|
| | | // 将消息值转换为布尔列表
|
| | | List<Boolean> messageBooleans = new ArrayList<>();
|
| | | for (Integer value : messageValues) {
|
| | | messageBooleans.add(value == 0 ? true : false);
|
| | | JSONObject jsonObject = new JSONObject();
|
| | | jsonObject.append("params", params);
|
| | | WebSocketServer sendwServer = WebSocketServer.sessionMap.get("action");
|
| | | if (sendwServer != null) {
|
| | | sendwServer.sendMessage(jsonObject.toString());
|
| | | }
|
| | | }
|
| | |
|
| | | // 将布尔列表写入 PLC
|
| | | S7control.getinstance().WriteBit(addressList, messageBooleans);
|
| | | System.out.println("messageValues:" + messageBooleans);
|
| | | System.out.println("addressList:" + addressList);
|
| | |
|
| | | // 清空消息列表
|
| | | webSocketServer.clearMessages();
|
| | | WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("action");
|
| | | if (webSocketServer != null) {
|
| | |
|
| | | List<String> messages = webSocketServer.getMessages();
|
| | |
|
| | | String addressList = "DB100.DBW0";
|
| | |
|
| | | if (!messages.isEmpty()) {
|
| | | // 将最后一个消息转换为整数类型的列表
|
| | | String lastMessage = messages.get(messages.size() - 1);
|
| | | System.out.println("messages:" + messages);
|
| | | String[] parts = lastMessage.split(",");
|
| | | List<Integer> messageValues = new ArrayList<>();
|
| | | for (String part : parts) {
|
| | | try {
|
| | | // 使用正则表达式清除非数字字符
|
| | | String cleanedPart = part.replaceAll("[^0-9-]", "");
|
| | | Integer value = Integer.parseInt(cleanedPart.trim());
|
| | | messageValues.add(value);
|
| | | } catch (NumberFormatException e) {
|
| | | // 如果无法解析为整数类型,则忽略该部分
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | // 将消息值转换为布尔列表
|
| | | List<Boolean> messageBooleans = new ArrayList<>();
|
| | | for (Integer value : messageValues) {
|
| | | messageBooleans.add(value == 0 ? true : false);
|
| | | }
|
| | |
|
| | | // 将布尔列表写入 PLC
|
| | | S7control.getinstance().WriteBit(addressList, messageBooleans);
|
| | | System.out.println("messageValues:" + messageBooleans);
|
| | | System.out.println("addressList:" + addressList);
|
| | | // 清空消息列表
|
| | | webSocketServer.clearMessages();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private List<Boolean> paramList() {
|
| | | // 获取参数列表的逻辑
|
| | |
|
| | | return new ArrayList<>(); // 假设返回空列表
|
| | | }
|
| | | } |
| | | }
|
| | |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.alarmmg; |
| | | import com.example.springboot.mapper.HomeMapper; |
| | | |
| | | public class Plchome extends Thread { |
| | |
| | | List<StorageCage> tasklist2=homeMapper.selectinout(3); |
| | | jsonObject.append("tasklist1", tasklist1); |
| | | jsonObject.append("tasklist2", tasklist2); |
| | | |
| | | //查询报警信息 |
| | | List<alarmmg> alarmmg=homeMapper.SelectAlarmmgInfo(); |
| | | jsonObject.append("alarmmg", alarmmg); |
| | | //读去Plc进片车与出片车位置 |
| | | // List<String> addressList = new ArrayList<>(); |
| | | // addressList.add("DB100.DBW0"); |
| | |
| | | new PlcHold().start(); |
| | | new Plcaction().start(); |
| | | new PlcParameter().start(); |
| | | |
| | | new Plchome().start(); |
| | | |
| | | new PlcParameter().start(); |
| | | |
| | | new Plcalarm().start(); |
| | | |
| | | new Plcsign().start(); |
| | | |
| | | new Plcstate().start(); |
| | | } |
| | | } |
| | |
| | | import com.example.springboot.service.HomeService; |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.alarmmg; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | } |
| | | |
| | | @GetMapping("/UpdateTask") |
| | | public Result UpdateTask(Integer types,Integer shelf_rack){ |
| | | public Result UpdateTask(Integer types,Integer shelfrack){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | homeMapper.UpdateTask(types,shelf_rack); |
| | | map.put("message2","200"); |
| | | homeMapper.UpdateTask(types,shelfrack); |
| | | if(types==0){ |
| | | homeMapper.UpdateCageTask1(shelfrack); |
| | | }else{ |
| | | homeMapper.UpdateCageTask2(shelfrack); |
| | | } |
| | | map.put("message3","200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @GetMapping("/SelectAlarmmgInfo") |
| | | public Result SelectAlarmmgInfo(){ |
| | | List<alarmmg> alarmmg=homeMapper.SelectAlarmmgInfo(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("alarmmg",alarmmg); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.example.springboot.controller; |
| | | |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.component.S7control; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.mapper.SpianMapper; |
| | | import com.example.springboot.service.SpianService; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | @RestController |
| | |
| | | //出片任务 |
| | | @GetMapping("/all2") |
| | | public Result selectdd(String orderid){ |
| | | |
| | | |
| | | |
| | | //获取优先出片的位置 |
| | | StorageCage cageout=spianMapper.selectOut(orderid); |
| | | int cage =cageout.getCage(); //储存出片位置,笼子格子几号玻璃 |
| | |
| | | if(cage<6){ |
| | | StorageCage cagecell= spianMapper.selectGlassCage(cage,glasswidth,0,6); |
| | | //获取调拨位置进行调拨 |
| | | List<String> adddresslist=new ArrayList<>(); |
| | | adddresslist.add("DB105.6"); |
| | | adddresslist.add("DB105.8"); |
| | | adddresslist.add("DB105.10"); |
| | | adddresslist.add("DB105.14"); |
| | | List<Short> datas=new ArrayList<>(); |
| | | datas.add((short)0); |
| | | datas.add((short)0); |
| | | datas.add((short)0); |
| | | datas.add((short)0); |
| | | S7control.getinstance().WriteWord(adddresslist, datas); |
| | | return Result.success(cagecell); //调拨位置的参数内容 |
| | | //判断调拨结束后再次出片 |
| | | }else{ |
| | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.alarmmg; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface HomeMapper { |
| | | //查询每个笼子的使用情况 |
| | | @Select("SELECT cage,round(round(sum(state)/42,2)*100) as cell,42-sum(state) as state FROM storage_cage group by cage") |
| | | List<StorageCage> selectAll(); |
| | | |
| | |
| | | short SelectOutTask(); |
| | | |
| | | // 手动完成任务 |
| | | @Select("update storage_task set state=1 where shelf_rack=#{shelf_rack} and task_type=#{task_type} and task_state=0") |
| | | short UpdateTask(@Param("task_type") Integer task_type, @Param("shelf_rack") Integer shelf_rack); |
| | | @Update("update storage_task set task_state=1 where shelf_rack=#{shelf_rack} and task_type=#{task_type} and task_state=0") |
| | | void UpdateTask(@Param("task_type") Integer task_type, @Param("shelf_rack") Integer shelf_rack); |
| | | |
| | | // 手动完成进片任务修改笼子数据 |
| | | @Update("update storage_cage set state=1 where cell=#{cell} and state=2") |
| | | void UpdateCageTask1(@Param("cell") Integer cell); |
| | | |
| | | // 手动完成出片任务修改笼子数据 |
| | | @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null,coating=null where cell=#{cell} and state=2") |
| | | void UpdateCageTask2(@Param("cell") Integer cell); |
| | | |
| | | //获取报警信息 |
| | | @Select("select * from alarmmg where endTime is null") |
| | | List<alarmmg> SelectAlarmmgInfo(); |
| | | } |
| | |
| | | //判断该调拨的笼子 |
| | | @Select("select cage,cell,max(state)as shu from storage_cage where width>=#{width} and cage>#{cage1} and cage<#{cage2} GROUP BY cage,cell HAVING shu=0 order by abs(#{cage} - cage) limit 1;") |
| | | StorageCage selectGlassCage(int cage,double width,int cage1,int cage2); |
| | | |
| | | //修改笼子信息(进片) |
| | | // @Update("update storage_cage set state=1,width=width #{width},glass_id=#{glassid},order_id=#{orderid},glasswidth=#{glasswidth} where cage=#{cage} and cell=#{cell} and tier=#{tier}"); |
| | | |
| | | // @Insert("insert into user(name, date, address, user_no) values (#{name}, #{date}, #{address}, #{userNo})") |
| | | // void insert (Spian spian); |
| | | |