wu
2024-09-18 02bda1d18155af18daf5a0e8642c4a3bbb4f2dc4
Merge branch 'master' of http://10.153.19.25:10105/r/JiuMuMES
6个文件已修改
252 ■■■■ 已修改文件
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/AccountServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/zh.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/layout/MainErpView.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/router/index.js 157 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Marking/marking.vue 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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"));
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("成功");
        }
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:'是否确认破损?',
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.');  
  }  
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',
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
//     }); // 替换为你的API端点
//     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
//     }); // 替换为你的API端点
//     if (response.code === 200) {
//       findMachine.value= response.data;
//     } else {
//       ElMessage.warning(res.msg)
//     }
//   } catch (error) {
//     // console.error('Error fetching rects :', error);
//   }
// }
//修改工作状态 【失败/正在工作/完工】
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>