From 02bda1d18155af18daf5a0e8642c4a3bbb4f2dc4 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期三, 18 九月 2024 16:45:45 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/JiuMuMES
---
UI-Project/src/layout/MainErpView.vue | 4
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/AccountServiceImpl.java | 4
UI-Project/src/lang/zh.js | 13 ++
JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java | 2
UI-Project/src/router/index.js | 157 +++++++++++++++++++++++++++++++
UI-Project/src/views/Marking/marking.vue | 72 ++++----------
6 files changed, 193 insertions(+), 59 deletions(-)
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/AccountServiceImpl.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/AccountServiceImpl.java
index 43e6058..7723716 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/AccountServiceImpl.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/AccountServiceImpl.java
@@ -72,7 +72,6 @@
accountRole.put("account",frist.get("account").toString());
accountRole.put("role_id",frist.get("role_id").toString());
for (Map<String,Object> item:username){
-
if(keyMenus.contains(item.get("menu_id").toString())){
//瀛樺湪姝よ彍鍗�
int index=keyMenus.indexOf(item.get("menu_id").toString());
@@ -90,8 +89,9 @@
thisMenu.put("pages",thisPages);
thisMenus.set(index,thisMenu);
accountRole.put("menus",thisMenus);
- }else if(keyMenus.size()>0){
+ }else if(keyMenus.size()>0&&!keyMenus.contains(item.get("menu_id").toString())){
//涓嶅瓨鍦ㄦ鑿滃崟
+ keyMenus.add(item.get("menu_id").toString());
List<Map<String, Object>> thisMenus= (List<Map<String, Object>>) accountRole.get("menus");
Map<String, Object> thisMenu=new HashMap<>();
thisMenu.put("menu_id",item.get("menu_id"));
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java
index 63bcf46..8cc2ba9 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java
@@ -36,7 +36,7 @@
}
@Test
public void testFindAccount() {
- Map<String, Object> Account=accountService.selectAccount("admin","12345");
+ Map<String, Object> Account=accountService.selectAccount("beibo","57858555");
if(Account.isEmpty()){
System.out.println("鎴愬姛");
}
diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index a145589..c392387 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -144,11 +144,20 @@
state: '鐢熶骇鐘舵��',
glassState: '鐜荤拑鐘舵��'
},
-
machine: {
+ upperSlice:'鑷姩涓婄墖鏈�',
+ scanQrCodesIdentify:'鎵爜璇嗗埆',
+ edging:'纾ㄨ竟鏈�',
+ edging:'娓呮礂鏈�',
+ edging:'缈荤墖鍙�',
+ scanQrCodesVerify:'鎵爜纭',
marking: '鑷姩鎵撴爣鏈�',
silkScreen:'鑷姩涓濆嵃鏈�',
- GlueDispenser:'鑷姩鐐硅兌鏈�'
+ glueDispenser:'鑷姩鐐硅兌鏈�',
+ drying:'鐑樺共绾�',
+ rotate:'鏃嬭浆鍙�',
+ lamination:'璐磋啘鏈�',
+ scanQrCodesReport:'鎵爜鎶ュ伐',
},
functionState:{
deleteTips:'鏄惁纭鐮存崯锛�',
diff --git a/UI-Project/src/layout/MainErpView.vue b/UI-Project/src/layout/MainErpView.vue
index 2d71852..e999560 100644
--- a/UI-Project/src/layout/MainErpView.vue
+++ b/UI-Project/src/layout/MainErpView.vue
@@ -34,7 +34,9 @@
onMounted(() => {
const storedData = localStorage.getItem('userData');
if (storedData) {
- userData.value = JSON.parse(storedData);
+ userData.value = JSON.parse(storedData);
+ console.log(111); // 鎵撳嵃 menus 鏁扮粍
+ console.log(userData.value.menus); // 鎵撳嵃 menus 鏁扮粍
} else {
console.log('No data found in localStorage.');
}
diff --git a/UI-Project/src/router/index.js b/UI-Project/src/router/index.js
index 2f9efb7..026b2f6 100644
--- a/UI-Project/src/router/index.js
+++ b/UI-Project/src/router/index.js
@@ -37,6 +37,71 @@
]
},
{
+ /*----------- 鑷姩鎵爜 ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
+ {
+ /*----------- 纾ㄨ竟鏈� ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
+ {
+ /*----------- 娓呮礂鏈� ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
+ {
+ /*----------- 缈荤墖鍙� ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
+ {
+ /*----------- 鎵爜2 ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
+ {
/*----------- 鑷姩鎵撴爣鏈� ----------------*/
path: 'Marking',
name: 'marking',
@@ -49,7 +114,97 @@
}
]
},
-
+ {
+ /*----------- 鑷姩涓濆嵃鏈� ----------------*/
+ path: 'SilkScreen',
+ name: 'silkScreen',
+ component: () => import('../views/SilkScreen/silkScreen.vue'),
+ children: [
+ {
+ path: '/SilkScreen/silkScreen',
+ name: 'silkScreen',
+ component: () => import('../views/SilkScreen/silkScreen.vue'),
+ }
+ ]
+ },
+ {
+ /*----------- 鑷姩鐐硅兌鏈� ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
+ {
+ /*----------- 鐑樺共绾� ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
+ {
+ /*----------- 鏃嬭浆鍙� ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
+ {
+ /*----------- 鑷姩璐磋啘鏈� ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
+ {
+ /*----------- 鎶ュ伐绠$悊 ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
+ {
+ /*----------- 鎶ヨ〃绠$悊 ----------------*/
+ path: 'ZiDongShangpian',
+ name: 'zidongshangpian',
+ component: () => import('../views/Marking/marking.vue'),
+ children: [
+ {
+ path: '/Marking/marking',
+ name: 'marking',
+ component: () => import('../views/Marking/marking.vue'),
+ }
+ ]
+ },
/*----------- 绯荤粺绠$悊 ----------------*/
{
path: 'User',
diff --git a/UI-Project/src/views/Marking/marking.vue b/UI-Project/src/views/Marking/marking.vue
index 4421a9f..c8b2702 100644
--- a/UI-Project/src/views/Marking/marking.vue
+++ b/UI-Project/src/views/Marking/marking.vue
@@ -6,6 +6,7 @@
import { useI18n } from 'vue-i18n'
import { WebSocketHost ,host} from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
+
let language = ref(localStorage.getItem('lang') || 'zh')
const { t } = useI18n()
const requestData = reactive({
@@ -37,42 +38,7 @@
onMounted(async () => {
//浣跨敤WebSocket鏂瑰紡灞曠ず鏁版嵁
socket = initializeWebSocket(socketUrl, handleMessage);// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
-
- //浣跨敤鎺ュ彛鏂瑰紡灞曠ず鏁版嵁
- //load();
});
-
-// //鑾峰彇鏁版嵁
-// const load = async() => {
-// //鑾峰彇璁惧浠诲姟鏁版嵁
-// try {
-// const response = await request.post('/deviceInteraction/tasking/findMachineTask',
-// {
-// "id": 11
-// }); // 鏇挎崲涓轰綘鐨凙PI绔偣
-// if (response.code === 200) {
-// loadData.value.findTaskingData= response.data;
-// } else {
-// ElMessage.warning(res.msg)
-// }
-// } catch (error) {
-// // console.error('Error fetching rects :', error);
-// }
-// //鑾峰彇璁惧鐘舵��
-// try {
-// const response = await request.post('/deviceInteraction/machine/findMachine',
-// {
-// "id": 11
-// }); // 鏇挎崲涓轰綘鐨凙PI绔偣
-// if (response.code === 200) {
-// findMachine.value= response.data;
-// } else {
-// ElMessage.warning(res.msg)
-// }
-// } catch (error) {
-// // console.error('Error fetching rects :', error);
-// }
-// }
//淇敼宸ヤ綔鐘舵�� 銆愬け璐�/姝e湪宸ヤ綔/瀹屽伐銆�
const workStatus = async(row,state) => {
let url;
@@ -86,11 +52,11 @@
return;
}
ElMessageBox.confirm(
- t('marking.tips'),
+ t('functionState.tips'),
t('delivery.prompt'),
{
- confirmButtonText: t('marking.sure'),
- cancelButtonText: t('marking.cancel'),
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
type: 'warning',
}
)
@@ -110,7 +76,7 @@
.catch(() => {
ElMessage({
type: 'info',
- message: t('marking.cancel'),
+ message: t('functionState.cancel'),
})
})
@@ -119,11 +85,11 @@
//寮�宸�/鏆傚仠
const machineStatus = async(state) => {
ElMessageBox.confirm(
- t('marking.tips'),
+ t('functionState.tips'),
t('delivery.prompt'),
{
- confirmButtonText: t('marking.sure'),
- cancelButtonText: t('marking.cancel'),
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
type: 'warning',
}
)
@@ -144,18 +110,18 @@
.catch(() => {
ElMessage({
type: 'info',
- message: t('marking.cancel'),
+ message: t('functionState.cancel'),
})
})
}
//鐮存崯
const damagedTask = async(row) => {
ElMessageBox.confirm(
- t('marking.tips'),
+ t('functionState.tips'),
t('delivery.prompt'),
{
- confirmButtonText: t('marking.sure'),
- cancelButtonText: t('marking.cancel'),
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
type: 'warning',
}
)
@@ -175,18 +141,18 @@
.catch(() => {
ElMessage({
type: 'info',
- message: t('marking.cancel'),
+ message: t('functionState.cancel'),
})
})
}
//涓嬬嚎(鎷胯蛋)
const glassDownLine = async(row) => {
ElMessageBox.confirm(
- t('marking.tips'),
+ t('functionState.tips'),
t('delivery.prompt'),
{
- confirmButtonText: t('marking.sure'),
- cancelButtonText: t('marking.cancel'),
+ confirmButtonText: t('functionState.sure'),
+ cancelButtonText: t('functionState.cancel'),
type: 'warning',
}
)
@@ -206,7 +172,7 @@
.catch(() => {
ElMessage({
type: 'info',
- message: t('marking.cancel'),
+ message: t('functionState.cancel'),
})
})
}
@@ -225,7 +191,9 @@
<br>
<div id="search" >
<!-- 鍔熻兘 -->
- <el-button type="primary" id="ButtonMachineStatus" @click="machineStatus((findMachine['state']=='鏆傚仠'?'寮�宸�':'鏆傚仠'))">{{findMachine['state']=='寮�宸�'?$t('functionState.start'):$t('functionState.stop')}}</el-button>
+ <el-button :type="(findMachine['state']=='鏆傚仠'?'danger':'success')" id="ButtonMachineStatus"
+ @click="machineStatus((findMachine['state']=='鏆傚仠'?'寮�宸�':'鏆傚仠'))">
+ {{findMachine['state']=='寮�宸�'?$t('functionState.start'):$t('functionState.stop')}}</el-button>
<el-button type="primary" id="ButtonTopLine" @click="topLine">{{$t('functionState.topLine')}}</el-button>
<!-- <el-button type="primary" id="searchButton" @click="downLine('涓嬬嚎')">涓嬬嚎</el-button>
<el-button type="primary" id="searchButton" @click="workStatus('鐮存崯')">鐮存崯</el-button>
--
Gitblit v1.8.0