| | |
| | | "devDependencies": { |
| | | "@types/sortablejs": "^1.15.7", |
| | | "@vitejs/plugin-vue": "^4.3.4", |
| | | "http-proxy-middleware": "^3.0.0", |
| | | "vite": "^4.4.9" |
| | | } |
| | | }, |
| | |
| | | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", |
| | | "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==" |
| | | }, |
| | | "node_modules/@types/http-proxy": { |
| | | "version": "1.17.14", |
| | | "resolved": "https://registry.npmmirror.com/@types/http-proxy/-/http-proxy-1.17.14.tgz", |
| | | "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==", |
| | | "dev": true, |
| | | "dependencies": { |
| | | "@types/node": "*" |
| | | } |
| | | }, |
| | | "node_modules/@types/lodash": { |
| | | "version": "4.14.199", |
| | | "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.199.tgz", |
| | |
| | | "integrity": "sha512-ZTcmhiI3NNU7dEvWLZJkzG6ao49zOIjEgIE0RgV7wbPxU0f2xT3VSAHw2gmst8swH6V0YkLRGp4qPlX/6I90MQ==", |
| | | "dependencies": { |
| | | "@types/lodash": "*" |
| | | } |
| | | }, |
| | | "node_modules/@types/node": { |
| | | "version": "20.12.5", |
| | | "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.12.5.tgz", |
| | | "integrity": "sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==", |
| | | "dev": true, |
| | | "dependencies": { |
| | | "undici-types": "~5.26.4" |
| | | } |
| | | }, |
| | | "node_modules/@types/sortablejs": { |
| | |
| | | "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", |
| | | "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" |
| | | }, |
| | | "node_modules/debug": { |
| | | "version": "4.3.4", |
| | | "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", |
| | | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", |
| | | "dev": true, |
| | | "dependencies": { |
| | | "ms": "2.1.2" |
| | | }, |
| | | "engines": { |
| | | "node": ">=6.0" |
| | | }, |
| | | "peerDependenciesMeta": { |
| | | "supports-color": { |
| | | "optional": true |
| | | } |
| | | } |
| | | }, |
| | | "node_modules/delayed-stream": { |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", |
| | |
| | | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", |
| | | "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" |
| | | }, |
| | | "node_modules/eventemitter3": { |
| | | "version": "4.0.7", |
| | | "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz", |
| | | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", |
| | | "dev": true |
| | | }, |
| | | "node_modules/fill-range": { |
| | | "version": "7.0.1", |
| | | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", |
| | |
| | | "node": ">= 6" |
| | | } |
| | | }, |
| | | "node_modules/http-proxy": { |
| | | "version": "1.18.1", |
| | | "resolved": "https://registry.npmmirror.com/http-proxy/-/http-proxy-1.18.1.tgz", |
| | | "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", |
| | | "dev": true, |
| | | "dependencies": { |
| | | "eventemitter3": "^4.0.0", |
| | | "follow-redirects": "^1.0.0", |
| | | "requires-port": "^1.0.0" |
| | | }, |
| | | "engines": { |
| | | "node": ">=8.0.0" |
| | | } |
| | | }, |
| | | "node_modules/http-proxy-middleware": { |
| | | "version": "3.0.0", |
| | | "resolved": "https://registry.npmmirror.com/http-proxy-middleware/-/http-proxy-middleware-3.0.0.tgz", |
| | | "integrity": "sha512-36AV1fIaI2cWRzHo+rbcxhe3M3jUDCNzc4D5zRl57sEWRAxdXYtw7FSQKYY6PDKssiAKjLYypbssHk+xs/kMXw==", |
| | | "dev": true, |
| | | "dependencies": { |
| | | "@types/http-proxy": "^1.17.10", |
| | | "debug": "^4.3.4", |
| | | "http-proxy": "^1.18.1", |
| | | "is-glob": "^4.0.1", |
| | | "is-plain-obj": "^3.0.0", |
| | | "micromatch": "^4.0.5" |
| | | }, |
| | | "engines": { |
| | | "node": "^14.15.0 || ^16.10.0 || >=18.0.0" |
| | | } |
| | | }, |
| | | "node_modules/is-binary-path": { |
| | | "version": "2.1.0", |
| | | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", |
| | |
| | | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", |
| | | "engines": { |
| | | "node": ">=0.12.0" |
| | | } |
| | | }, |
| | | "node_modules/is-plain-obj": { |
| | | "version": "3.0.0", |
| | | "resolved": "https://registry.npmmirror.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz", |
| | | "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", |
| | | "dev": true, |
| | | "engines": { |
| | | "node": ">=10" |
| | | } |
| | | }, |
| | | "node_modules/local-pkg": { |
| | |
| | | "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", |
| | | "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==" |
| | | }, |
| | | "node_modules/micromatch": { |
| | | "version": "4.0.5", |
| | | "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.5.tgz", |
| | | "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", |
| | | "dev": true, |
| | | "dependencies": { |
| | | "braces": "^3.0.2", |
| | | "picomatch": "^2.3.1" |
| | | }, |
| | | "engines": { |
| | | "node": ">=8.6" |
| | | } |
| | | }, |
| | | "node_modules/mime-db": { |
| | | "version": "1.52.0", |
| | | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", |
| | |
| | | "engines": { |
| | | "node": "*" |
| | | } |
| | | }, |
| | | "node_modules/ms": { |
| | | "version": "2.1.2", |
| | | "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", |
| | | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", |
| | | "dev": true |
| | | }, |
| | | "node_modules/nanoid": { |
| | | "version": "3.3.6", |
| | |
| | | "node": ">=8.10.0" |
| | | } |
| | | }, |
| | | "node_modules/requires-port": { |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmmirror.com/requires-port/-/requires-port-1.0.0.tgz", |
| | | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", |
| | | "dev": true |
| | | }, |
| | | "node_modules/rollup": { |
| | | "version": "3.29.4", |
| | | "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", |
| | |
| | | "engines": { |
| | | "node": ">=8.0" |
| | | } |
| | | }, |
| | | "node_modules/undici-types": { |
| | | "version": "5.26.5", |
| | | "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-5.26.5.tgz", |
| | | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", |
| | | "dev": true |
| | | }, |
| | | "node_modules/unplugin": { |
| | | "version": "1.5.0", |
| | |
| | | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", |
| | | "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==" |
| | | }, |
| | | "@types/http-proxy": { |
| | | "version": "1.17.14", |
| | | "resolved": "https://registry.npmmirror.com/@types/http-proxy/-/http-proxy-1.17.14.tgz", |
| | | "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==", |
| | | "dev": true, |
| | | "requires": { |
| | | "@types/node": "*" |
| | | } |
| | | }, |
| | | "@types/lodash": { |
| | | "version": "4.14.199", |
| | | "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.199.tgz", |
| | |
| | | "integrity": "sha512-ZTcmhiI3NNU7dEvWLZJkzG6ao49zOIjEgIE0RgV7wbPxU0f2xT3VSAHw2gmst8swH6V0YkLRGp4qPlX/6I90MQ==", |
| | | "requires": { |
| | | "@types/lodash": "*" |
| | | } |
| | | }, |
| | | "@types/node": { |
| | | "version": "20.12.5", |
| | | "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.12.5.tgz", |
| | | "integrity": "sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==", |
| | | "dev": true, |
| | | "requires": { |
| | | "undici-types": "~5.26.4" |
| | | } |
| | | }, |
| | | "@types/sortablejs": { |
| | |
| | | "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", |
| | | "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" |
| | | }, |
| | | "debug": { |
| | | "version": "4.3.4", |
| | | "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", |
| | | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", |
| | | "dev": true, |
| | | "requires": { |
| | | "ms": "2.1.2" |
| | | } |
| | | }, |
| | | "delayed-stream": { |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", |
| | |
| | | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", |
| | | "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" |
| | | }, |
| | | "eventemitter3": { |
| | | "version": "4.0.7", |
| | | "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz", |
| | | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", |
| | | "dev": true |
| | | }, |
| | | "fill-range": { |
| | | "version": "7.0.1", |
| | | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", |
| | |
| | | "is-glob": "^4.0.1" |
| | | } |
| | | }, |
| | | "http-proxy": { |
| | | "version": "1.18.1", |
| | | "resolved": "https://registry.npmmirror.com/http-proxy/-/http-proxy-1.18.1.tgz", |
| | | "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", |
| | | "dev": true, |
| | | "requires": { |
| | | "eventemitter3": "^4.0.0", |
| | | "follow-redirects": "^1.0.0", |
| | | "requires-port": "^1.0.0" |
| | | } |
| | | }, |
| | | "http-proxy-middleware": { |
| | | "version": "3.0.0", |
| | | "resolved": "https://registry.npmmirror.com/http-proxy-middleware/-/http-proxy-middleware-3.0.0.tgz", |
| | | "integrity": "sha512-36AV1fIaI2cWRzHo+rbcxhe3M3jUDCNzc4D5zRl57sEWRAxdXYtw7FSQKYY6PDKssiAKjLYypbssHk+xs/kMXw==", |
| | | "dev": true, |
| | | "requires": { |
| | | "@types/http-proxy": "^1.17.10", |
| | | "debug": "^4.3.4", |
| | | "http-proxy": "^1.18.1", |
| | | "is-glob": "^4.0.1", |
| | | "is-plain-obj": "^3.0.0", |
| | | "micromatch": "^4.0.5" |
| | | } |
| | | }, |
| | | "is-binary-path": { |
| | | "version": "2.1.0", |
| | | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", |
| | |
| | | "version": "7.0.0", |
| | | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", |
| | | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" |
| | | }, |
| | | "is-plain-obj": { |
| | | "version": "3.0.0", |
| | | "resolved": "https://registry.npmmirror.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz", |
| | | "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", |
| | | "dev": true |
| | | }, |
| | | "local-pkg": { |
| | | "version": "0.4.3", |
| | |
| | | "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", |
| | | "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==" |
| | | }, |
| | | "micromatch": { |
| | | "version": "4.0.5", |
| | | "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.5.tgz", |
| | | "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", |
| | | "dev": true, |
| | | "requires": { |
| | | "braces": "^3.0.2", |
| | | "picomatch": "^2.3.1" |
| | | } |
| | | }, |
| | | "mime-db": { |
| | | "version": "1.52.0", |
| | | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", |
| | |
| | | "version": "2.30.1", |
| | | "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", |
| | | "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" |
| | | }, |
| | | "ms": { |
| | | "version": "2.1.2", |
| | | "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", |
| | | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", |
| | | "dev": true |
| | | }, |
| | | "nanoid": { |
| | | "version": "3.3.6", |
| | |
| | | "picomatch": "^2.2.1" |
| | | } |
| | | }, |
| | | "requires-port": { |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmmirror.com/requires-port/-/requires-port-1.0.0.tgz", |
| | | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", |
| | | "dev": true |
| | | }, |
| | | "rollup": { |
| | | "version": "3.29.4", |
| | | "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", |
| | |
| | | "is-number": "^7.0.0" |
| | | } |
| | | }, |
| | | "undici-types": { |
| | | "version": "5.26.5", |
| | | "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-5.26.5.tgz", |
| | | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", |
| | | "dev": true |
| | | }, |
| | | "unplugin": { |
| | | "version": "1.5.0", |
| | | "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.5.0.tgz", |
| | |
| | | "devDependencies": { |
| | | "@types/sortablejs": "^1.15.7", |
| | | "@vitejs/plugin-vue": "^4.3.4", |
| | | "http-proxy-middleware": "^3.0.0", |
| | | "vite": "^4.4.9" |
| | | } |
| | | } |
| | |
| | | const router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | | const user = userStore.user.userName |
| | | store.createWebSocket(); |
| | | // store.createWebSocket(); |
| | | function quit(){ |
| | | userStore.$patch({ |
| | | user:null |
| | |
| | | import {defineStore} from 'pinia' |
| | | import {ref} from "vue"; |
| | | import {createWebSocket, global_callback1} from "@/utils/webSocket"; |
| | | // import {createWebSocket, global_callback1} from "@/utils/webSocket"; |
| | | |
| | | export default defineStore("userInfo",{ |
| | | state: () =>{ |
| | |
| | | } |
| | | }, |
| | | actions:{ |
| | | createWebSocket(){ |
| | | createWebSocket(global_callback1) |
| | | } |
| | | // createWebSocket(){ |
| | | // createWebSocket(global_callback1) |
| | | // } |
| | | |
| | | }, |
| | | persist: true//数据持久化,防止刷新数据消失 |
| | |
| | | <script setup> |
| | | import { useRouter, useRoute } from 'vue-router' |
| | | |
| | | import { sendSock, createWebSocket, closeSock } from "@/utils/webSocket" |
| | | |
| | | // function global_callback(msg) { |
| | | // console.log("websocket的回调函数收到服务器信息:" + JSON.stringify(msg)); |
| | | // // console.log("收到服务器信息:" + msg); |
| | |
| | | import { Lock,Avatar } from '@element-plus/icons-vue' |
| | | import request from '@/utils/request' |
| | | import userInfo from '@/stores/userInfo' |
| | | import { sendSock, createWebSocket, closeSock,global_callback1 } from "@/utils/webSocket" |
| | | |
| | | |
| | | const store=userInfo() |
| | | let ruleFormRef = ref<FormInstance>() |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {reactive, onMounted} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | const dialogFormVisiblea = ref(false) |
| | | import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import Landingindication from "./Landingindication.vue"; |
| | | // import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | import unloadrequest from "@/utils/unloadrequest"; |
| | | const dialogFormVisiblea = ref(false) |
| | | |
| | | const tableData = [ |
| | | { |
| | | id: '1', |
| | | long: '1005', |
| | | wide: '183.6', |
| | | thick: '1991', |
| | | state: '未启用', |
| | | }, |
| | | { |
| | | id: '2', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '2', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | ] |
| | | |
| | | |
| | | const dialogFormVisiblea2 = ref(false) |
| | | |
| | | |
| | | const tableData = reactive([]); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 数据 |
| | | const loading = ref(false); |
| | | |
| | | |
| | | // 弹框显示控制 |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | |
| | | // 表单数据 |
| | | const workstationId = ref(''); |
| | | const flowCardId = ref(''); |
| | | const flowCardOptions = ref([]); |
| | | |
| | | |
| | | // 方法 |
| | | const handleSelectionChange = () => { |
| | | // 处理表格行选择事件 |
| | | }; |
| | | |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | // 发起接口请求获取流程卡号 |
| | | fetchFlowCardId(); |
| | | |
| | | |
| | | dialogFormVisiblea.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | |
| | | |
| | | |
| | | //获取流程卡号 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await unloadrequest.get('/api/downWorkstation/getflowCardId'); |
| | | console.log(response) |
| | | if (response.code === 200) { |
| | | flowCardOptions.value = response.data.map(item => ({ flowcard_id: item.flowcard_id })); |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | }; |
| | | //确认 |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const response = await unloadrequest.post('/api/downWorkstation/updateFlowCardId', { |
| | | workstationId: workstationId.value, |
| | | flowCardId: flowCardId.value |
| | | }); |
| | | |
| | | console.log(response) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | console.log('绑定成功'); |
| | | ElMessage.success(response.message); |
| | | dialogFormVisiblea.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | const handleBindRack2 = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | |
| | | |
| | | |
| | | dialogFormVisiblea2.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | //清除内容 |
| | | const handleclear = async () => { |
| | | try { |
| | | const response = await unloadrequest.post('/api/downWorkstation/clear', { |
| | | workstationId: workstationId.value, |
| | | }); |
| | | |
| | | console.log(response); |
| | | |
| | | if (response.code === 200) { |
| | | // 清除成功的逻辑 |
| | | console.log('清除成功'); |
| | | ElMessage.success(response.message); |
| | | dialogFormVisiblea2.value = false; |
| | | } else if (response.code === 400) { |
| | | // 清除失败的逻辑 |
| | | console.log('清除失败'); |
| | | console.log(response.message); // 打印服务器返回的错误信息 |
| | | ElMessage.error(response.message); |
| | | dialogFormVisiblea2.value = false; |
| | | } |
| | | } catch (error) { |
| | | // console.log(error); |
| | | ElMessage.error("清除失败"); |
| | | dialogFormVisiblea2.value = false; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | const response = await unloadrequest.get('/api/downWorkstation/getone'); |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | | // 更新表格数据 |
| | | console.log('成功获取表格数据:', response.data); |
| | | tableData.splice(0, tableData.length, ...response.data); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | // initWebSocket(); |
| | | onMounted(fetchTableData); |
| | | setInterval(fetchTableData, 2000) |
| | | |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | |
| | | ], |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <el-table height="100%" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" label="下片位" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="架号" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="总数量" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="已落架数量" min-width="120" /> |
| | | <el-table-column prop="state" align="center" label="启用状态" min-width="120" /> |
| | | <el-table-column prop="workstationId" align="center" label="下片位" min-width="80" /> |
| | | <el-table-column prop="workstationId" align="center" label="架号" min-width="120" /> |
| | | <el-table-column prop="flowCardId" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="totalquantity" align="center" label="总数量" min-width="120" /> |
| | | <el-table-column prop="racksnumber" align="center" label="已落架数量" min-width="120" /> |
| | | <el-table-column prop="work_state" align="center" label="状态" min-width="120" /> |
| | | <el-table-column prop="deviceId" align="center" label="设备号" min-width="120" /> |
| | | <el-table-column prop="enableState" align="center" label="启用状态" min-width="120" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="200"> |
| | | <template #default> |
| | | <el-button size="mini" type="text" plain v-show="state !== '已启用' " @click="dialogFormVisiblea = true">绑定架子</el-button> |
| | | <el-button size="mini" type="text" plain @click="dialogFormVisible = true">清空</el-button> |
| | | </template> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain v-show="scope.row.enableState !== '已启用' " @click="handleBindRack(scope.row)">绑定架子</el-button> |
| | | <el-button size="mini" type="text" plain @click="handleBindRack2(scope.row)">清空</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div id="main-body"> |
| | | <Landingindication></Landingindication> |
| | | </div> |
| | | <!-- <div id="main-bodya"> |
| | | <Landingindicationtwo></Landingindicationtwo> |
| | | </div> --> |
| | | </div> |
| | | |
| | | |
| | | <el-dialog v-model="dialogFormVisiblea" top="21vh" width="30%" title="绑定架子" > |
| | | <div style="margin-left: 50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-form-item label="架号:" :required="true" style="width: 18vw"> |
| | | <el-input autocomplete="off"/> |
| | | </el-form-item> |
| | | <el-form-item label="流程卡号:" :required="true" style="width: 18vw;"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-form-item label="架号:" :required="true" style="width: 18vw"> |
| | | <el-input v-model="workstationId" autocomplete="off"/> |
| | | </el-form-item> |
| | | <el-form-item label="流程卡号:" :required="true" style="width: 18vw;"> |
| | | <el-select v-model="flowCardId" placeholder="请选择流程卡号"> |
| | | <el-option v-for="item in flowCardOptions" :key="item.flowcard_id" :label="item.flowcard_id" :value="item.flowcard_id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="dialogFormVisiblea = false"> |
| | | <el-button type="primary" @click="handleConfirm"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisiblea = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | |
| | | <el-dialog v-model="dialogFormVisiblea2" top="21vh" width="30%" title="清除架子玻璃" > |
| | | |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleclear"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisiblea2 = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | <!-- workstationId: '1', |
| | | workstationId: '1005', |
| | | flowCardId: '183.6', |
| | | totalquantity: '1991', |
| | | racksnumber:"1", |
| | | work_state: '待识别', --> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div id="main-body"> |
| | | <Landingindication></Landingindication> |
| | | </div> |
| | | <div id="main-bodya"> |
| | | <Landingindicationtwo></Landingindicationtwo> |
| | | </div></div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | |
| | | } |
| | | #main-body{ |
| | | margin-top: -20px; |
| | | margin-left: 450px; |
| | | margin-left: 300px; |
| | | } |
| | | #main-bodya{ |
| | | margin-top: -10px; |
| | | margin-left: 100px; |
| | | } |
| | | </style> |
| | |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '2', |
| | | id: '3', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '4', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '5', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | |
| | | } |
| | | }, |
| | | server: { |
| | | port: 801,//端口号 |
| | | host: true,//ip地址 或 '0.0.0.0' 或 "loaclhost" |
| | | open: false, //启动后是否自动打开浏览器 |
| | | https: false, // 是否开启 https |
| | | port: 801, |
| | | host: true, |
| | | open: false, |
| | | https: false, |
| | | proxy: { |
| | | '^/api': { |
| | | target: 'localhost:8080/mesModuleTools', //目标源,目标服务器,真实请求地址 |
| | | changeOrigin: true, //支持跨域 |
| | | rewrite: (path) => path.replace(/^\/api/, "/mesModuleTools"), //重写真实路径,替换/api |
| | | // pathRewrite: { |
| | | // '^/api': '' |
| | | // } |
| | | // rewrite: (path) => path.replace(/^\/api/, "/mesModuleTools"), //重写真实路径,替换/api |
| | | '/api': { |
| | | target: 'http://localhost:8080/mesModuleTools', |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/api/, '/mesModuleTools'), |
| | | }, |
| | | '/api2': { |
| | | target: 'localhost:8080/mesModuleTools', |
| | | target: 'http://localhost:8081/mesModuleTools', |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/api2/, "mesModuleTools"), |
| | | pathRewrite: { |
| | | '^/api2': '', |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | configureServer: ({ middlewares }) => { |
| | | middlewares.use( |
| | | '/mesModuleTools', |
| | | createProxyMiddleware({ |
| | | target: 'ws://localhost:8081', |
| | | ws: true, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/mesModuleTools': '', |
| | | }, |
| | | }) |
| | | ); |
| | | }, |
| | | }); |
| | |
| | | import com.mes.service.DownWorkstationService;
|
| | | import com.mes.service.GlassInfoService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.HttpStatus;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | @RestController
|
| | | @RequestMapping("/downWorkstation")
|
| | | @RequestMapping("/api/downWorkstation")
|
| | | public class DownWorkstationController {
|
| | |
|
| | | @Autowired
|
| | |
| | | private GlassInfoService glassInfoService;
|
| | |
|
| | | @GetMapping("/getone")
|
| | | public List<DownWorkstation> getoneDownWorkstations() {
|
| | | return downWorkstationService.getoneDownWorkstations();
|
| | | public ResponseEntity<?> getOneDownWorkstations() {
|
| | | try {
|
| | | List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations();
|
| | | // 构建符合预期格式的响应数据
|
| | | Map<String, Object> responseData = new HashMap<>();
|
| | | responseData.put("code", 200);
|
| | | responseData.put("msg", "成功");
|
| | | responseData.put("data", data);
|
| | | // 返回 ResponseEntity 对象,包含响应数据和状态码
|
| | | return ResponseEntity.ok(responseData);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | // 如果出现异常,返回错误信息
|
| | | Map<String, Object> errorResponse = new HashMap<>();
|
| | | errorResponse.put("code", 500);
|
| | | errorResponse.put("msg", "服务器内部错误");
|
| | | return ResponseEntity.status(500).body(errorResponse);
|
| | | }
|
| | | }
|
| | |
|
| | | @GetMapping("/gettwo")
|
| | |
| | | return downWorkstationService.gettwoDownWorkstations();
|
| | | }
|
| | | @GetMapping("/getflowCardId")
|
| | | public List<Map<String, Object>> getflowCardId() {
|
| | | return downWorkstationService.getflowCardId();
|
| | | public ResponseEntity<Map<String, Object>> getflowCardId() {
|
| | | Map<String, Object> responseData = new HashMap<>();
|
| | | try {
|
| | | List<Map<String, Object>> data = downWorkstationService.getflowCardId();
|
| | | responseData.put("code", 200);
|
| | | responseData.put("msg", "成功");
|
| | | responseData.put("data", data);
|
| | | return ResponseEntity.ok(responseData);
|
| | | } catch (Exception e) {
|
| | | responseData.put("code", 500);
|
| | | responseData.put("msg", "失败");
|
| | | responseData.put("data", null);
|
| | | return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(responseData);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | @PostMapping("/updateFlowCardId")
|
| | | public String updateFlowCardId(@RequestBody Map<String, Object> requestData) {
|
| | | public ResponseEntity<Map<String, Object>> updateFlowCardId(@RequestBody Map<String, Object> requestData) {
|
| | | // 从 requestData 中获取传入的 flowCardId
|
| | | String flowCardId = (String) requestData.get("flowCardId");
|
| | | int workstationId = (int) requestData.get("workstationId");
|
| | |
|
| | | // 查询对应 flowCardId 的玻璃信息总数量
|
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId);
|
| | |
|
| | | // 更新 down_workstation 表中的总数量
|
| | | glassInfoService.updateFlowCardIdAndCount(flowCardId, glassInfoCount);
|
| | | glassInfoService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId);
|
| | |
|
| | | // 返回处理结果,比如成功或失败信息
|
| | | return "updated successfully";
|
| | | // 构建响应数据
|
| | | Map<String, Object> responseData = new HashMap<>();
|
| | | responseData.put("message", "updated successfully");
|
| | | responseData.put("code", 200);
|
| | | // 返回处理结果
|
| | | return ResponseEntity.ok(responseData);
|
| | | }
|
| | |
|
| | |
|
| | | @DeleteMapping("/clear/{workstationId}")
|
| | | public String clearWorkstationInfo(@PathVariable("workstationId") int workstationId) {
|
| | | @PostMapping("/clear")
|
| | | public ResponseEntity<Map<String, Object>> clearWorkstationInfo(@RequestBody Map<String, Object> requestData) {
|
| | | // 调用 DownWorkstationService 中的方法清除指定工位ID的信息
|
| | | downWorkstationService.clearFlowCardId(workstationId);
|
| | | // 返回处理结果,比如成功或失败信息
|
| | | return "cleared successfully";
|
| | | int workstationId = (int) requestData.get("workstationId");
|
| | |
|
| | | int totalWorkstations = downWorkstationService.getTotalQuantity(workstationId);
|
| | | int downWorkstations = downWorkstationService.getRacksNumber(workstationId);
|
| | |
|
| | |
|
| | | if (downWorkstations == totalWorkstations) {
|
| | | downWorkstationService.clearFlowCardId(workstationId);
|
| | | Map<String, Object> responseData = new HashMap<>();
|
| | | responseData.put("message", "cleared successfully");
|
| | | responseData.put("code", 200);
|
| | | // 返回处理结果
|
| | | return ResponseEntity.ok(responseData);
|
| | | }
|
| | | else {
|
| | | // 如果总数量和落架数量不一致,返回错误响应
|
| | | Map<String, Object> errorResponse = new HashMap<>();
|
| | | errorResponse.put("message", "Total workstations count does not match down workstations count.");
|
| | | errorResponse.put("code", 400);
|
| | | return ResponseEntity.badRequest().body(errorResponse);
|
| | | }
|
| | |
|
| | |
|
| | | // 构建响应数据
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
| | | private String flowCardId;
|
| | |
|
| | | /**
|
| | | * 膜系id
|
| | | */
|
| | | private int filmsid;
|
| | | /**
|
| | | * 玻璃类型
|
| | | */
|
| | | private int glassType;
|
| | |
| | | @ResultType(Map.class)
|
| | | List<Map<String, Object>> getflowCardId();
|
| | |
|
| | | @Update("UPDATE down_workstation SET flow_card_id = NULL, total_quantity = NULL, racks_number = NULL WHERE workstation_id = #{workstationId}")
|
| | | @Update("UPDATE down_workstation SET flow_card_id = NULL, total_quantity = 0, racks_number = 0 WHERE workstation_id = #{workstationId}")
|
| | | void clearFlowCardInfoByWorkstationId(@Param("workstationId") int workstationId);
|
| | |
|
| | | // 获取总数量
|
| | | @Select("SELECT total_quantity FROM down_workstation WHERE workstation_id = #{workstationId}")
|
| | | int getTotalQuantity(@Param("workstationId") int workstationId);
|
| | |
|
| | | // 获取落架数量
|
| | | @Select("SELECT racks_number FROM down_workstation WHERE workstation_id = #{workstationId}")
|
| | | int getRacksNumber(@Param("workstationId") int workstationId);
|
| | |
|
| | | }
|
| | |
| | | @Mapper
|
| | | public interface GlassInfoMapper {
|
| | |
|
| | | @Select("SELECT COUNT(*) FROM glass_info WHERE flow_card_id = #{flowCardId}")
|
| | | @Select("SELECT COUNT(*) FROM glass_info WHERE flowcard_id = #{flowCardId}")
|
| | | int getGlassInfoCountByFlowCardId(@Param("flowCardId") String flowCardId);
|
| | |
|
| | | @Update("UPDATE down_workstation SET total_quantity = #{glassInfoCount} WHERE flow_card_id = #{flowCardId}")
|
| | | int updateFlowCardIdAndCount(@Param("flowCardId") String flowCardId, @Param("glassInfoCount") int glassInfoCount);
|
| | | @Update("UPDATE down_workstation SET total_quantity = #{glassInfoCount},flow_card_id=#{flowCardId} WHERE workstation_id = #{workstationId}")
|
| | | int updateFlowCardIdAndCount(@Param("flowCardId") String flowCardId, @Param("glassInfoCount") int glassInfoCount,@Param("workstationId")int workstationId);
|
| | |
|
| | | // 这里可以添加其他 SQL 语句
|
| | | } |
| | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface SelectInfo { |
| | |
| | | // @Select("select * from `v_optimize_heat_layout` where project_no=#{projeceid} ") |
| | | // List<Tempered> SelectTemperedTerritory(String projeceid); |
| | | // |
| | | // 切割版图按工程查询 |
| | | @Select("select * from optimize_detail where project_no=#{projeceid} ") |
| | | List<Map> SelectCutTerritory(String projeceid); |
| | | |
| | | // 查询磨边信息 |
| | | @Select("select * from task_cache where task_type='2' and task_stauts='2' and end_cell=#{EndCell}") |
| | | List<Map> SelectEdgInfo(String EndCell); |
| | | // // 切割版图按工程查询 |
| | | // @Select("select * from optimize_detail where project_no=#{projeceid} ") |
| | | // List<Map> SelectCutTerritory(String projeceid); |
| | | // |
| | | // // 查询磨边信息 |
| | | // @Select("select * from task_cache where task_type='2' and task_stauts='2' and end_cell=#{EndCell}") |
| | | // List<Map> SelectEdgInfo(String EndCell); |
| | | |
| | | // 查询笼子内空闲 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is null order by escd.slot") |
| | |
| | | @Select("select * from down_glass_task where task_type='2' and task_stauts='0'") |
| | | List<TaskCache> SelectOutCacheInfo(); |
| | | |
| | | // 查询 A04 或 A15 最新的一片 出片任务 |
| | | // 查询 A06 或 A11 最新的一片 出片任务 |
| | | @Select("select * from down_glass_task where task_type='2' and task_stauts='2' and end_cell=#{EndCell} limit 1") |
| | | GlassInfo SelectLastOutCacheInfo(String EndCell); |
| | | |
| | |
| | | @Insert("INSERT into down_glass_task VALUES(#{id},#{start},#{end},#{type},0,)") |
| | | Integer insertCacheTask(String id, String start, String end, String type,double width,double height,Integer filmsId,double thickness,String flowCardId); |
| | | |
| | | // |
| | | // @Insert("INSERT `order`(order_id)VALUES(#{order_id})") |
| | | // Integer insert(Order order); |
| | | // |
| | | // @Delete("delete from `order` where id=#{id}") |
| | | // Integer deleteById(@Param("id") Integer id); |
| | | // |
| | | // @Update("update `order` set order_id=#{order_id} where id=#{id}") |
| | | // Integer update(@Param("id") Integer id,@Param("order_id") String order_id); |
| | | |
| | | } |
| | |
| | | boolean isOut=true; |
| | | if (list.size()>0&&isOut) { |
| | | DownStorageCageDetails item=list.get(0); |
| | | // |
| | | if(G06=="0"&&G11=="1"){ |
| | | //出到 G06 |
| | | |
| | | selectInfo.insertCacheTask(item.getGlassId()+"","0","06","2",item.getWidth(),item.getHeight(),0,item.getThickness(),item.getFlowCardId()); |
| | | selectInfo.insertCacheTask(item.getGlassId()+"","0","06","2",item.getWidth(),item.getHeight(),item.getFilmsid(),item.getThickness(),item.getFlowCardId()); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "1"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | }else if(G06=="1"&&G11=="0"){ |
| | | //出到 G11 |
| | | |
| | | selectInfo.insertCacheTask(item.getGlassId()+"","0","11","2",item.getWidth(),item.getHeight(),0,item.getThickness(),item.getFlowCardId()); |
| | | selectInfo.insertCacheTask(item.getGlassId()+"","0","11","2",item.getWidth(),item.getHeight(),item.getFilmsid(),item.getThickness(),item.getFlowCardId()); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | |
| | | String endcell="06"; |
| | | String SendEndcell="1"; |
| | | boolean If_=false; |
| | | GlassInfo glassInfo04= selectInfo.SelectLastOutCacheInfo("06"); |
| | | GlassInfo glassInfo05= selectInfo.SelectLastOutCacheInfo("11"); |
| | | if(glassInfo05!=null&&glassInfo05.getWidth()==item.getWidth()&&glassInfo05.getHeight()==item.getHeight()){ |
| | | GlassInfo glassInfo06= selectInfo.SelectLastOutCacheInfo("06"); |
| | | GlassInfo glassInfo11= selectInfo.SelectLastOutCacheInfo("11"); |
| | | GlassInfo glassInfo13= selectInfo.SelectLastOutCacheInfo("13"); |
| | | if(glassInfo06!=null&&glassInfo11.getWidth()==item.getWidth()&&glassInfo06.getHeight()==item.getHeight()){ |
| | | endcell="11"; |
| | | SendEndcell="2"; |
| | | }else if(glassInfo05!=null&&If_){ |
| | | //其他条件 |
| | | }else if(item.getHeight()>=3440&&item.getWidth()>=1440){ |
| | | //其他条件人工处理 |
| | | |
| | | } |
| | | |
| | | selectInfo.insertCacheTask(item.getGlassId()+"","0",endcell,"2",item.getWidth(),item.getHeight(),0,item.getThickness(),item.getFlowCardId()); |
| | | selectInfo.insertCacheTask(item.getGlassId()+"","0",endcell,"2",item.getWidth(),item.getHeight(),item.getFilmsid(),item.getThickness(),item.getFlowCardId()); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), SendEndcell); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | |
| | | }
|
| | |
|
| | |
|
| | | public int getTotalQuantity(int workstationId) {
|
| | | // 执行获取总数量的逻辑,可以是数据库查询或其他业务逻辑
|
| | | Integer totalQuantity = DownWorkstationMapper.getTotalQuantity(workstationId);
|
| | | return totalQuantity != null ? totalQuantity : 0;
|
| | | }
|
| | |
|
| | | public int getRacksNumber(int workstationId) {
|
| | | // 执行获取落架数量的逻辑,可以是数据库查询或其他业务逻辑
|
| | | Integer racksNumber = DownWorkstationMapper.getRacksNumber(workstationId);
|
| | | return racksNumber != null ? racksNumber : 0;
|
| | | }
|
| | |
|
| | | public void clearFlowCardId(int workstationId) {
|
| | | // 执行清除指定工位ID的流程卡信息的逻辑,可以是数据库操作或其他业务逻辑
|
| | | // 例如:
|
| | | // 判断如果落架数量等于总数量执行清除,否则不执行
|
| | | DownWorkstationMapper.clearFlowCardInfoByWorkstationId(workstationId);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
| | | return glassInfoMapper.getGlassInfoCountByFlowCardId(flowCardId);
|
| | | }
|
| | |
|
| | | public void updateFlowCardIdAndCount(String flowCardId, int glassInfoCount) {
|
| | | public void updateFlowCardIdAndCount(String flowCardId, int glassInfoCount,int workstationId) {
|
| | | // 调用 GlassInfoMapper 的 updateFlowCardIdAndCount 方法
|
| | | int rowsAffected = glassInfoMapper.updateFlowCardIdAndCount(flowCardId, glassInfoCount);
|
| | | int rowsAffected = glassInfoMapper.updateFlowCardIdAndCount(flowCardId, glassInfoCount,workstationId);
|
| | | if (rowsAffected > 0) {
|
| | | System.out.println("更新流程卡 ID 和数量成功");
|
| | | System.out.println("更新架子上流程卡 ID 和数量成功");
|
| | | } else {
|
| | | System.out.println("更新流程卡 ID 和数量失败");
|
| | | System.out.println("更新架子上流程卡 ID 和数量失败");
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | package com.mes.service;
|
| | |
|
| | | import cn.hutool.json.JSONObject;
|
| | | import com.mes.tools.WebSocketServer;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import org.apache.logging.log4j.LogManager;
|
| | | import org.apache.logging.log4j.Logger;
|
| | | import java.util.ArrayList;
|
| | | import java.util.function.Supplier;
|
| | |
|
| | | @Component
|
| | | public class Plchome extends Thread {
|
| | | private int i = 1;
|
| | | private static final Logger log = LogManager.getLogger(Plchome.class);
|
| | |
|
| | | private final Supplier<DownGlassLogic> plcServiceSupplier;
|
| | |
|
| | | public Plchome() {
|
| | |
| | | Thread.currentThread().interrupt();
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | JSONObject jsonObject = new JSONObject();
|
| | | // System.out.println(arraylist6);
|
| | | jsonObject.append("data", 1);
|
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass");
|
| | | if (sendwServer != null) {
|
| | | for (WebSocketServer webserver : sendwServer) {
|
| | | webserver.sendMessage(jsonObject.toString());
|
| | | log.info("准备向 WebSocket 服务器发送消息: {}", jsonObject.toString());
|
| | | }}
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | public void clearMessages() { |
| | | messages.clear(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |