瀏覽代碼

中英文翻译更新版

pm 5 月之前
父節點
當前提交
1eaa229b17
共有 61 個文件被更改,包括 3551 次插入1401 次删除
  1. 60 6
      src/components/Breadcrumb/index.vue
  2. 50 3
      src/components/TopNav/index.vue
  3. 536 47
      src/i18n/lang/en.js
  4. 492 3
      src/i18n/lang/zh.js
  5. 49 2
      src/layout/components/Sidebar/SidebarItem.vue
  6. 54 7
      src/layout/components/TagsView/index.vue
  7. 46 35
      src/views/mes/Exceptions/Exception/index.vue
  8. 37 27
      src/views/mes/Exceptions/doorException/index.vue
  9. 128 54
      src/views/mes/Exceptions/manualException/index.vue
  10. 37 34
      src/views/mes/cal/plan/shift.vue
  11. 49 46
      src/views/mes/cal/team/index.vue
  12. 11 11
      src/views/mes/cal/team/member.vue
  13. 102 66
      src/views/mes/dv/lotoStation/index.vue
  14. 77 74
      src/views/mes/dv/repair/index.vue
  15. 122 104
      src/views/mes/dv/segregationpoint/index.vue
  16. 65 48
      src/views/mes/dv/technology/technologyList/index.vue
  17. 61 56
      src/views/mes/email/emailNotify/index.vue
  18. 46 11
      src/views/mes/hw/Lock/index.vue
  19. 61 14
      src/views/mes/hw/information/index.vue
  20. 5 5
      src/views/mes/hw/lockCabinet/MapData.vue
  21. 90 17
      src/views/mes/hw/lockCabinet/index.vue
  22. 2 2
      src/views/mes/hw/lockCabinet/lookDetail.vue
  23. 46 12
      src/views/mes/hw/padLocks/index.vue
  24. 43 8
      src/views/mes/hw/rfid/index.vue
  25. 10 4
      src/views/mes/hw/type/index.vue
  26. 33 9
      src/views/mes/hw/workCard/index.vue
  27. 49 42
      src/views/mes/job/joblist/index.vue
  28. 91 89
      src/views/mes/job/jobm/NewMarsJob.vue
  29. 45 27
      src/views/mes/job/jobplay/index.vue
  30. 85 15
      src/views/mes/material/Inspectionrecords/index.vue
  31. 74 15
      src/views/mes/material/collectionmanagement/index.vue
  32. 166 44
      src/views/mes/material/inspectionplan/index.vue
  33. 10 2
      src/views/mes/material/instructions/index.vue
  34. 2 0
      src/views/mes/material/inventory/index.vue
  35. 5 5
      src/views/mes/material/lockers/DetailsIndex.vue
  36. 46 8
      src/views/mes/material/lockers/index.vue
  37. 81 21
      src/views/mes/material/materialinformation/index.vue
  38. 119 15
      src/views/mes/material/replacementrecords/index.vue
  39. 5 1
      src/views/mes/material/typeofmaterial/index.vue
  40. 52 53
      src/views/mes/md/locksettype/index.vue
  41. 47 48
      src/views/mes/md/locktype/index.vue
  42. 58 55
      src/views/mes/sop/sopm/index.vue
  43. 23 21
      src/views/mes/statisticians/LockerChange.vue
  44. 21 19
      src/views/mes/statisticians/LockerCollection.vue
  45. 27 25
      src/views/mes/statisticians/LockerDaily.vue
  46. 21 19
      src/views/mes/statisticians/LockerLending.vue
  47. 20 18
      src/views/mes/statisticians/LockerMistake.vue
  48. 14 10
      src/views/mes/statisticians/LockerOne.vue
  49. 21 19
      src/views/mes/statisticians/LockerOpen.vue
  50. 22 21
      src/views/mes/statisticians/LockerReturn.vue
  51. 24 22
      src/views/mes/statisticians/LockerSpeciality.vue
  52. 14 10
      src/views/mes/statisticians/LockerTwo.vue
  53. 57 54
      src/views/mes/tm/tooltype/index.vue
  54. 1 1
      src/views/monitor/logininfor/index.vue
  55. 1 1
      src/views/monitor/operlog/index.vue
  56. 3 3
      src/views/system/configuration/index.vue
  57. 10 5
      src/views/system/dict/index.vue
  58. 1 1
      src/views/system/mapconfig/index.vue
  59. 2 2
      src/views/system/mappoint/index.vue
  60. 15 3
      src/views/system/notice/index.vue
  61. 7 2
      src/views/system/user/index.vue

+ 60 - 6
src/components/Breadcrumb/index.vue

@@ -2,8 +2,8 @@
   <el-breadcrumb class="app-breadcrumb" separator="/">
     <transition-group name="breadcrumb">
       <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
-        <span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title }}</span>
-        <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
+        <span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ getTitle(item.meta.title) }}</span>
+        <a v-else @click.prevent="handleLink(item)">{{ getTitle(item.meta.title) }}</a>
       </el-breadcrumb-item>
     </transition-group>
   </el-breadcrumb>
@@ -24,7 +24,12 @@ export default {
         return
       }
       // 这里时为了面包屑再作业执行-作业状态离开之后关闭那个页面的websocket
-      if (route.name !== '作业执行-作业状态') {
+      // 判断是否是作业执行页面(通过路径或title判断)
+      const isJobExecutePage = route.path.includes('jobplay') || 
+                                route.meta?.title === '作业执行-作业状态' ||
+                                route.meta?.title === 'router.jobExecute' ||
+                                this.getTitle(route.meta?.title) === this.$t('router.jobExecute');
+      if (!isJobExecutePage) {
         closeWebsocket();
       }
       this.getBreadcrumb()
@@ -35,20 +40,69 @@ export default {
   },
   beforeRouteEnter(to, from, next) {
     if (to.query.ticketId !== "null" && to.query.ticketId) {
-      to.meta.title = "作业管理-编辑作业票"; // 动态修改标题
+      // 动态修改标题 - 使用i18n key
+      to.meta.title = "router.jobEdit";
     } else {
-      to.meta.title = "作业管理-新建作业票"; // 动态修改标题
+      to.meta.title = "router.jobNew";
     }
     next();
   },
   methods: {
+    // 转换title,如果是i18n key则翻译,否则原样显示
+    getTitle(title) {
+      if (!title) return '';
+      
+      // 如果是i18n key格式(router.xxx),则进行翻译
+      if (title.startsWith('router.')) {
+        try {
+          return this.$t(title);
+        } catch (e) {
+          // 如果翻译失败,返回原值
+          return title;
+        }
+      }
+      
+      // 创建title到i18n key的映射
+      const titleMap = {
+        '首页': 'router.home',
+        '个人中心': 'router.profile',
+        '分配角色': 'router.assignRole',
+        'SOP管理-新建SOP': 'router.sopNew',
+        'SOP管理-编辑SOP': 'router.sopEdit',
+        'SOP管理-查看SOP': 'router.sopView',
+        '作业管理-新建作业票': 'router.jobNew',
+        '作业管理-编辑作业票': 'router.jobEdit',
+        '作业执行-作业状态': 'router.jobExecute',
+        '预览': 'router.preview',
+        '工艺详情': 'router.craftDetail',
+        '物资使用说明详情': 'router.materialInstructionDetail',
+        '设备详情': 'router.deviceDetail',
+        '详情': 'router.detail',
+        '物资规格': 'router.materialSpec',
+        '分配用户': 'router.assignUser',
+        '字典数据': 'router.dictData',
+        '规则组成': 'router.ruleComposition'
+      };
+      
+      // 如果title在映射中,使用i18n翻译
+      if (titleMap[title]) {
+        try {
+          return this.$t(titleMap[title]);
+        } catch (e) {
+          return title;
+        }
+      }
+      
+      // 如果不在映射中,可能是从接口获取的,原样返回
+      return title;
+    },
     getBreadcrumb() {
       // only show routes with meta.title
       let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
       const first = matched[0]
 
       if (!this.isDashboard(first)) {
-        matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
+        matched = [{ path: '/index', meta: { title: this.$t('router.home') }}].concat(matched)
       }
 
       this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)

+ 50 - 3
src/components/TopNav/index.vue

@@ -7,20 +7,20 @@
     <template v-for="(item, index) in topMenus">
       <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"
         ><svg-icon :icon-class="item.meta.icon" />
-        {{ item.meta.title }}</el-menu-item
+        {{ getTitle(item.meta.title) }}</el-menu-item
       >
     </template>
 
     <!-- 顶部菜单超出数量折叠 -->
     <el-submenu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber">
-      <template slot="title">更多菜单</template>
+      <template slot="title">{{ $t('navbar.moreMenu') }}</template>
       <template v-for="(item, index) in topMenus">
         <el-menu-item
           :index="item.path"
           :key="index"
           v-if="index >= visibleNumber"
           ><svg-icon :icon-class="item.meta.icon" />
-          {{ item.meta.title }}</el-menu-item
+          {{ getTitle(item.meta.title) }}</el-menu-item
         >
       </template>
     </el-submenu>
@@ -111,6 +111,53 @@ export default {
     this.setVisibleNumber();
   },
   methods: {
+    // 转换title,如果是i18n key则翻译,否则通过映射表转换
+    getTitle(title) {
+      if (!title) return '';
+      
+      // 如果是i18n key格式(router.xxx),则进行翻译
+      if (title.startsWith('router.')) {
+        try {
+          return this.$t(title);
+        } catch (e) {
+          return title;
+        }
+      }
+      
+      // 创建title到i18n key的映射
+      const titleMap = {
+        '首页': 'router.home',
+        '个人中心': 'router.profile',
+        '分配角色': 'router.assignRole',
+        'SOP管理-新建SOP': 'router.sopNew',
+        'SOP管理-编辑SOP': 'router.sopEdit',
+        'SOP管理-查看SOP': 'router.sopView',
+        '作业管理-新建作业票': 'router.jobNew',
+        '作业管理-编辑作业票': 'router.jobEdit',
+        '作业执行-作业状态': 'router.jobExecute',
+        '预览': 'router.preview',
+        '工艺详情': 'router.craftDetail',
+        '物资使用说明详情': 'router.materialInstructionDetail',
+        '设备详情': 'router.deviceDetail',
+        '详情': 'router.detail',
+        '物资规格': 'router.materialSpec',
+        '分配用户': 'router.assignUser',
+        '字典数据': 'router.dictData',
+        '规则组成': 'router.ruleComposition'
+      };
+      
+      // 如果title在映射中,使用i18n翻译
+      if (titleMap[title]) {
+        try {
+          return this.$t(titleMap[title]);
+        } catch (e) {
+          return title;
+        }
+      }
+      
+      // 如果不在映射中,可能是从接口获取的,原样返回
+      return title;
+    },
     // 根据宽度计算设置显示栏数
     setVisibleNumber() {
       const width = document.body.getBoundingClientRect().width / 3;

+ 536 - 47
src/i18n/lang/en.js

@@ -36,7 +36,11 @@ export default {
     importFileFormat: 'Only xls and xlsx format files are allowed.',
     importResult: 'Import Result',
     batchDelete: 'Batch Delete',
-    view: 'View'
+    view: 'View',
+    lastWeek: 'Last Week',
+    lastMonth: 'Last Month',
+    lastThreeMonths: 'Last Three Months',
+    to: 'To'
   },
   login: {
     title: 'System Login',
@@ -66,18 +70,27 @@ export default {
     switchLanguageSuccess: 'Switch Language Success',
     chinese: '中文',
     english: 'English',
-    layoutSize: 'Layout Size'
+    layoutSize: 'Layout Size',
+    moreMenu: 'More Menu'
+  },
+  tagsView: {
+    refresh: 'Refresh Page',
+    closeCurrent: 'Close Current',
+    closeOthers: 'Close Others',
+    closeLeft: 'Close Left',
+    closeRight: 'Close Right',
+    closeAll: 'Close All'
   },
   dashboard: {
     materialsTotal: 'Total Materials',
     cabinetMaterials: 'Materials in Cabinet',
     loanMaterials: 'Loaned Materials',
     exceptionCount: 'Exception Count',
-    ongoingJobs: 'Jobs in Progress',
+    ongoingJobs: 'Works in Progress',
     ticketName: 'Work Permit Name',
     workstation: 'Station',
     machinery: 'Equipment Process',
-    jobType: 'Job Type',
+    jobType: 'Work Type',
     startTime: 'Start Time',
     loan: 'Loan',
     return: 'Return'
@@ -363,8 +376,9 @@ export default {
     sopNew: 'SOP Management - New SOP',
     sopEdit: 'SOP Management - Edit SOP',
     sopView: 'SOP Management - View SOP',
-    jobNew: 'Job Management - New Work Permit',
-    jobExecute: 'Job Execution - Job Status',
+    jobNew: 'Work Management - New Work Permit',
+    jobEdit: 'Work Management - Edit Work Permit',
+    jobExecute: 'Work Execution - Work Status',
     preview: 'Preview',
     craftDetail: 'Process Detail',
     materialInstructionDetail: 'Material Instruction Detail',
@@ -848,8 +862,8 @@ export default {
     jobList: {
       ticketName: 'Work Permit Name',
       ticketNamePlaceholder: 'Please enter work permit name',
-      jobType: 'Job Type',
-      jobTypePlaceholder: 'Please select job type',
+      jobType: 'Work Type',
+      jobTypePlaceholder: 'Please select work type',
       status: 'Status',
       statusPlaceholder: 'Please select status',
       batchDelete: 'Batch Delete',
@@ -860,7 +874,7 @@ export default {
       remarkPlaceholder: 'Please enter remark',
       ticketNameRequired: 'Work permit name cannot be empty',
       ticketNoRequired: 'Work permit number cannot be empty',
-      jobTypeRequired: 'Job type cannot be empty',
+      jobTypeRequired: 'Work type cannot be empty',
       addTicket: 'Add Work Permit',
       editTicket: 'Edit Work Permit',
       editSuccess: 'Updated successfully',
@@ -871,7 +885,7 @@ export default {
     jobManagement: {
       selectPost: 'Select Post',
       selectSop: 'Select SOP',
-      jobDetail: 'Job Detail',
+      jobDetail: 'Work Detail',
       selectCraftDevice: 'Select Process/Equipment',
       deviceCraftName: 'Equipment/Process Name',
       sopType: 'SOP Type',
@@ -888,10 +902,10 @@ export default {
       content: 'Content',
       detail: 'Detail',
       view: 'View',
-      jobLog: 'Job Log',
+      jobLog: 'Work Log',
       all: 'All',
-      finishJob: 'Finish Job',
-      cancelJob: 'Cancel Job',
+      finishJob: 'Finish Work',
+      cancelJob: 'Cancel Work',
       newLogAlert: 'New Log Alert',
       addPersonnel: 'Add Personnel',
       locker: 'Locker',
@@ -906,9 +920,9 @@ export default {
       externalCoLockerList: 'External Group Lock Member List',
       externalPersonId: 'External Personnel ID',
       lockerRequired: 'Locker cannot be empty',
-      jobStatus: 'Job Status',
-      jobNo: 'Job No.',
-      jobName: 'Job Name',
+      jobStatus: 'Work Status',
+      jobNo: 'Work No.',
+      jobName: 'Work Name',
       lockKey: 'Lock Key',
       unlockKey: 'Unlock Key',
       personnelStatus: 'Personnel Status',
@@ -926,7 +940,7 @@ export default {
       lockStationInfo2: 'Lock Station Info',
       isolationPointName: 'Isolation Point Name',
       function: 'Function',
-      ongoingJobs: 'Jobs in Progress',
+      ongoingJobs: 'Works in Progress',
       post: 'Post',
       no: 'No.',
       icon: 'Icon',
@@ -935,7 +949,7 @@ export default {
     jobExecution: {
       selectPost: 'Select Post',
       selectSop: 'Select SOP',
-      jobDetail: 'Job Detail',
+      jobDetail: 'Work Detail',
       selectCraftDevice: 'Select Process/Equipment',
       deviceCraftName: 'Equipment/Process Name',
       sopType: 'SOP Type',
@@ -965,8 +979,8 @@ export default {
       step8Content: 'Remove locks and restore isolation devices to normal position'
     },
     jobDetail: {
-      jobStatus: 'Job Status',
-      jobName: 'Job Name',
+      jobStatus: 'Work Status',
+      jobName: 'Work Name',
       status: 'Status',
       lockKey: 'Lock Key',
       unlockKey: 'Unlock Key',
@@ -1846,7 +1860,13 @@ export default {
       serialNo: 'Serial Number',
       serialNoPlaceholder: 'Please enter lotoSerialNumber',
       content: 'Content',
-      contentPlaceholder: 'Please enter content'
+      contentPlaceholder: 'Please enter content',
+      cabinetView: 'Cabinet View',
+      listView: 'List View',
+      lastUpdate: 'Last Update',
+      exceptionInfo: 'Exception Information',
+      unknownException: 'Unknown Exception',
+      getDataFailed: 'Failed to get data'
     },
     hardwareInfo: {
       hardwareCode: 'Hardware Code',
@@ -2051,29 +2071,29 @@ export default {
       second: 'Second'
     },
     lockers: {
-      cabinetLocation: 'Cabinet Location',
-      cabinetList: 'Cabinet List',
-      noDataTip: 'No data, please configure in Basic Data menu',
-      exceptionInfo: 'Exception Info',
-      cabinet: 'Cabinet',
+      cabinetLocation: 'Material Cabinet Location',
+      cabinetList: 'Material Cabinet List',
+      noDataTip: 'No data available. Please configure in Basic Data menu.',
+      exceptionInfo: 'Exception Information',
+      cabinet: 'Material Cabinet',
       exceptionType: 'Exception Type',
       workstationNamePlaceholder: 'Please enter workstation name',
-      cabinetId: 'Cabinet ID',
-      cabinetIdPlaceholder: 'Please enter cabinet ID',
-      cabinetName: 'Cabinet Name',
-      cabinetNamePlaceholder: 'Please enter cabinet name',
-      cabinetCode: 'Cabinet Code',
-      cabinetCodePlaceholder: 'Please enter cabinet code',
-      cabinetPicture: 'Cabinet Picture',
-      cabinetStatus: 'Cabinet Status',
-      cabinetDetail: 'Cabinet Detail',
+      cabinetId: 'Material Cabinet ID',
+      cabinetIdPlaceholder: 'Please enter material cabinet ID',
+      cabinetName: 'Material Cabinet Name',
+      cabinetNamePlaceholder: 'Please enter material cabinet name',
+      cabinetCode: 'Material Cabinet Code',
+      cabinetCodePlaceholder: 'Please enter material cabinet code',
+      cabinetPicture: 'Cabinet Image',
+      cabinetStatus: 'Material Cabinet Status',
+      cabinetDetail: 'Cabinet Details',
       workstation: 'Workstation',
       workstationPlaceholder: 'Select workstation',
-      autoGenerate: 'Auto Generate',
-      addCabinetInfo: 'Add Cabinet Info',
-      editCabinetInfo: 'Edit Cabinet Info',
-      cabinetCodeRequired: 'Cabinet code cannot be empty',
-      cabinetNameRequired: 'Cabinet name cannot be empty',
+      autoGenerate: 'Auto-Generate',
+      addCabinetInfo: 'Add Material Cabinet',
+      editCabinetInfo: 'Edit Material Cabinet',
+      cabinetCodeRequired: 'Material cabinet code cannot be empty',
+      cabinetNameRequired: 'Material cabinet name cannot be empty',
       editSuccess: 'Updated successfully',
       addSuccess: 'Added successfully',
       deleteSuccess: 'Deleted successfully',
@@ -2082,14 +2102,14 @@ export default {
       lastThreeMonths: 'Last Three Months',
       misplacedCabinet: 'Materials Misplaced',
       expiredDamaged: 'Materials Expired/Damaged',
-      timeoutUnclosed: 'Timeout Unclosed',
+      timeoutUnclosed: 'Cabinet Door Not Closed',
       unknown: 'Unknown',
-      second: 'Second',
-      minute: 'Minute',
-      hour: 'Hour',
-      misplacedCount: '{count} materials misplaced',
-      expiredDamagedCount: '{count} materials expired or damaged',
-      timeoutUnclosedStatus: 'Cabinet door unclosed for {time}'
+      second: 's',
+      minute: 'min',
+      hour: 'hr',
+      misplacedCount: '{count} material(s) misplaced',
+      expiredDamagedCount: '{count} material(s) expired or damaged',
+      timeoutUnclosedStatus: 'Cabinet door left open for {time}'
     },
     replacementRecords: {
       cabinet: 'Cabinet',
@@ -2450,6 +2470,475 @@ export default {
       addSuccess: 'Added successfully',
       deleteSuccess: 'Deleted successfully',
       deleteConfirm: 'Confirm to delete selected items?'
+    },
+    manualException: {
+      exceptionCategory: 'Exception Category',
+      sourceName: 'Exception Source',
+      sourceNamePlaceholder: 'Please enter exception source',
+      exceptionType: 'Exception Type',
+      exceptionLevel: 'Severity Level',
+      raiserName: 'Reporter',
+      raiserNamePlaceholder: 'Please enter reporter',
+      raiseTime: 'Exception Occurrence Time',
+      handleTime: 'Exception Resolution Time',
+      exceptionId: 'ID',
+      exceptionDescription: 'Exception Description',
+      all: 'All',
+      pending: 'Pending',
+      processed: 'Processed',
+      exceptionDetail: 'Exception Details',
+      handle: 'Handle',
+      editSuccess: 'Updated successfully'
+    },
+    repair: {
+      repairCode: 'Repair Code',
+      repairCodePlaceholder: 'Please enter repair code',
+      repairName: 'Repair Name',
+      repairNamePlaceholder: 'Please enter repair name',
+      machineryCode: 'Machinery Code',
+      machineryCodePlaceholder: 'Please enter machinery code',
+      machineryName: 'Machinery Name',
+      machineryNamePlaceholder: 'Please enter machinery name',
+      machineryBrand: 'Brand',
+      machinerySelectPlaceholder: 'Please select machinery',
+      repairResult: 'Repair Result',
+      repairResultPlaceholder: 'Please select repair result',
+      status: 'Status',
+      statusPlaceholder: 'Please select status',
+      requireDate: 'Require Date',
+      requireDatePlaceholder: 'Please select require date',
+      finishDate: 'Finish Date',
+      finishDatePlaceholder: 'Please select finish date',
+      confirmDate: 'Confirm Date',
+      confirmDatePlaceholder: 'Please select confirm date',
+      acceptedBy: 'Repair Person',
+      confirmBy: 'Confirm Person',
+      repairContent: 'Repair Content',
+      autoGenerate: 'Auto Generate',
+      remarkPlaceholder: 'Please enter content',
+      addRepair: 'Add Equipment Repair Order',
+      editRepair: 'Edit Equipment Repair Order',
+      repairCodeRequired: 'Repair code cannot be empty',
+      machineryIdRequired: 'Machinery ID cannot be empty',
+      machineryCodeRequired: 'Machinery code cannot be empty',
+      machineryNameRequired: 'Machinery name cannot be empty',
+      requireDateRequired: 'Please select require date',
+      editSuccess: 'Updated successfully',
+      addSuccess: 'Added successfully',
+      deleteSuccess: 'Deleted successfully',
+      deleteConfirm: 'Confirm to delete repair order with code "{repairId}"?',
+      finishRepair: 'Finish Repair',
+      confirmPass: 'Confirm Pass',
+      notPass: 'Not Pass'
+    },
+    team: {
+      calendarType: 'Team Type',
+      calendarTypePlaceholder: 'Please select team type',
+      teamCode: 'Team Code',
+      teamCodePlaceholder: 'Please enter team code',
+      teamName: 'Team Name',
+      teamNamePlaceholder: 'Please enter team name',
+      teamMembers: 'Team Members',
+      autoGenerate: 'Auto Generate',
+      remarkPlaceholder: 'Please enter content',
+      addTeam: 'Add Team',
+      editTeam: 'Edit Team',
+      viewTeam: 'View Team',
+      teamCodeRequired: 'Team code cannot be empty',
+      teamNameRequired: 'Team name cannot be empty',
+      calendarTypeRequired: 'Please select team type',
+      editSuccess: 'Updated successfully',
+      addSuccess: 'Added successfully',
+      deleteSuccess: 'Deleted successfully',
+      deleteConfirm: 'Confirm to delete team with code "{teamId}"?'
+    },
+    teamMember: {
+      userName: 'User Name',
+      nickName: 'Nick Name',
+      tel: 'Phone',
+      addTeamMember: 'Add Team Member',
+      deleteConfirm: 'Confirm to delete team member?',
+      deleteSuccess: 'Deleted successfully'
+    },
+    shift: {
+      shiftName: 'Shift Name',
+      shiftNamePlaceholder: 'Please enter shift name',
+      startTime: 'Start Time',
+      startTimePlaceholder: 'Please select start time',
+      endTime: 'End Time',
+      endTimePlaceholder: 'Please select end time',
+      orderNumPlaceholder: 'Please enter serial number',
+      addShift: 'Add Shift',
+      editShift: 'Edit Plan Shift',
+      shiftNameRequired: 'Shift name cannot be empty',
+      startTimeRequired: 'Start time cannot be empty',
+      endTimeRequired: 'End time cannot be empty',
+      editSuccess: 'Updated successfully',
+      addSuccess: 'Added successfully',
+      deleteSuccess: 'Deleted successfully',
+      deleteConfirm: 'Confirm to delete shift?'
+    },
+    toolType: {
+      toolTypeCode: 'Type Code',
+      toolTypeCodePlaceholder: 'Please enter type code',
+      toolTypeName: 'Type Name',
+      toolTypeNamePlaceholder: 'Please enter type name',
+      codeFlag: 'Code Management',
+      maintenType: 'Maintenance Type',
+      maintenTypePlaceholder: 'Please select maintenance type',
+      maintenPeriod: 'Maintenance Period',
+      maintenPeriodPlaceholder: 'Please enter maintenance period',
+      autoGenerate: 'Auto Generate',
+      remarkPlaceholder: 'Please enter content',
+      none: 'None',
+      day: 'Day',
+      times: 'Times',
+      addToolType: 'Add Tool Type',
+      editToolType: 'Edit Tool Type',
+      viewToolType: 'View Type Information',
+      toolTypeCodeRequired: 'Type code cannot be empty',
+      toolTypeNameRequired: 'Type name cannot be empty',
+      codeFlagRequired: 'Code flag cannot be empty',
+      editSuccess: 'Updated successfully',
+      addSuccess: 'Added successfully',
+      deleteSuccess: 'Deleted successfully',
+      deleteConfirm: 'Confirm to delete tool type with code "{toolTypeId}"?'
+    },
+    emailNotify: {
+      reminderItem: 'Reminder Item',
+      reminderItemPlaceholder: 'Please enter reminder item',
+      emailTemplate: 'Email Template',
+      emailTemplatePlaceholder: 'Please enter email template',
+      status: 'Status',
+      reminderTime: 'Reminder Time',
+      day: 'Day',
+      hour: 'Hour',
+      minute: 'Minute',
+      second: 'Second',
+      addEmailNotify: 'Add Email Notification',
+      editEmailNotify: 'Edit Email Notification',
+      templateCodeRequired: 'Email template code cannot be empty',
+      nameRequired: 'Email template name cannot be empty',
+      contentRequired: 'Email template content cannot be empty',
+      activateSuccess: 'Activated successfully',
+      deactivate: 'Deactivated',
+      editSuccess: 'Updated successfully',
+      addSuccess: 'Added successfully',
+      deleteSuccess: 'Deleted successfully',
+      deleteConfirm: 'Confirm to delete selected items?'
+    },
+    job: {
+      ticketName: 'Work Permit Name',
+      ticketNamePlaceholder: 'Please enter work permit name',
+      workstation: 'Workstation',
+      selectWorkstation: 'Select Workstation',
+      machinery: 'Equipment/Process',
+      selectMachinery: 'Select Equipment/Process',
+      ticketType: 'Work Type',
+      ticketTypePlaceholder: 'Please select work type',
+      pointCount: 'Total Isolation Points',
+      addSopTicket: 'Add SOP Work Permit',
+      addIsolationPoint: 'Add Isolation Point',
+      editIsolationPoint: 'Edit Isolation Point',
+      deleteConfirm: 'Confirm to delete selected items?',
+      deleteSuccess: 'Deleted successfully',
+      ticketId: 'Work Number',
+      ticketIdPlaceholder: 'Please enter work number',
+      lockStatus: 'Lock Status',
+      colockStatus: 'Co-lock Status',
+      selectSop: 'Select SOP',
+      jobDetail: 'Work Detail',
+      machineryName: 'Equipment/Process Name',
+      sopType: 'SOP Type',
+      startExecute: 'Start Execute',
+      machineryDiagram: 'Process/Equipment Diagram',
+      lockStationInfo: 'Lock Station Information',
+      eightSteps: 'Eight Steps',
+      step: 'Step',
+      stepNumber: 'Step {step}',
+      assign: 'Assign',
+      execute: 'Execute',
+      executed: 'Executed',
+      content: 'Content',
+      jobLogs: 'Work Logs',
+      all: 'All',
+      finishJob: 'Finish Work',
+      cancelJob: 'Cancel Work',
+      newLogReminder: 'New Log Reminder',
+      addPerson: 'Add Person',
+      locker: 'Locker',
+      selectedPersonList: 'Selected Person List',
+      name: 'Name',
+      source: 'Source',
+      internal: 'Internal',
+      external: 'External',
+      internalColockerList: 'Internal Co-locker List',
+      externalColockerList: 'External Co-locker List',
+      internalPersonId: 'Internal Person ID',
+      externalPersonId: 'External Person ID',
+      searchName: 'Search Name',
+      jobStatus: 'Work Status',
+      lockKey: 'Lock Key',
+      unlockKey: 'Unlock Key',
+      personStatus: 'Person Status',
+      colocker: 'Co-locker',
+      isolationPointStatus: 'Isolation Point Status',
+      isolationPoint: 'Isolation Point',
+      padlockName: 'Padlock Name',
+      lockset: 'Lockset',
+      affectedTickets: 'Affected Work Permits',
+      ticketStatus: 'Work Permit Status',
+      isolationPointName: 'Isolation Point Name',
+      function: 'Function',
+      ongoingJobs: '{workstation} Ongoing Works',
+      number: 'Number',
+      icon: 'Icon',
+      lockerRequired: 'Locker cannot be empty',
+      selectMachineryOrSopType: 'Please select equipment/process or SOP type first',
+      jobStartExecute: 'Work started executing',
+      executeSuccess: 'Executed successfully',
+      assignPersonSuccess: 'Assigned person successfully',
+      jobTicketFinished: 'Work permit finished',
+      jobTicketCancelled: 'Work permit cancelled'
+    },
+    material: {
+      materialList: 'Material List',
+      collectionRecord: 'Collection Record',
+      inspectionPlan: 'Inspection Plan',
+      inspectionRecord: 'Inspection Record',
+      repairReplacementRecord: 'Repair/Replacement Record'
+    },
+    lockType: {
+      lockTypeCode: 'Padlock Type Code',
+      lockTypeCodePlaceholder: 'Please enter padlock type code',
+      lockTypeName: 'Padlock Type Name',
+      lockTypeNamePlaceholder: 'Please enter padlock type name',
+      lockTypeIcon: 'Padlock Type Icon',
+      lockTypeImg: 'Padlock Type Image',
+      lockTypeSpec: 'Padlock Model',
+      lockTypeSpecPlaceholder: 'Please enter padlock model',
+      parentType: 'Parent Type',
+      selectParent: 'Select Parent',
+      hardwareType: 'Hardware Type',
+      hardwareTypePlaceholder: 'Please select hardware type',
+      autoGenerate: 'Auto Generate',
+      addLockType: 'Add Padlock Type',
+      editLockType: 'Edit Padlock Type',
+      lockTypeCodeRequired: 'Padlock type code cannot be empty',
+      lockTypeNameRequired: 'Padlock type name cannot be empty',
+      deleteConfirm: 'Are you sure to delete the data item with code "{code}"?'
+    },
+    sop: {
+      sopName: 'SOP Name',
+      sopNamePlaceholder: 'Please enter SOP name',
+      sopCode: 'SOP Code',
+      sopCodePlaceholder: 'Please enter SOP code',
+      sopType: 'SOP Type',
+      sopTypePlaceholder: 'Please select SOP type',
+      workstation: 'Workstation',
+      selectWorkstation: 'Select Workstation',
+      machinery: 'Equipment/Process',
+      selectMachinery: 'Select Equipment/Process',
+      createTime: 'Creation Time',
+      addSop: 'Add SOP',
+      editSop: 'Edit SOP',
+      viewSop: 'View SOP',
+      newSop: 'New SOP',
+      sopCodeRequired: 'SOP code cannot be empty',
+      sopNameRequired: 'SOP name cannot be empty',
+      workstationRequired: 'Workstation cannot be empty',
+      lotoRequired: 'Locking station cannot be empty',
+      machineryRequired: 'Equipment/Process cannot be empty',
+      deleteConfirm: 'Are you sure to delete the selected data items?',
+      importTitle: 'SOP Import',
+      importResult: 'Import Result',
+      dragFileText: 'Drag file here, or',
+      clickUpload: 'click to upload',
+      updateExistingData: 'Update existing user data',
+      onlyXlsXlsx: 'Only xls, xlsx format files are allowed.',
+      downloadTemplate: 'Download Template',
+      editSuccess: 'Updated successfully',
+      addSuccess: 'Added successfully',
+      deleteSuccess: 'Deleted successfully'
+    },
+    statisticians: {
+      lastWeek: 'Last Week',
+      lastMonth: 'Last Month',
+      lastThreeMonths: 'Last Three Months',
+      times: 'Times',
+      timesUnit: 'times',
+      dailyLoanReturnStats: 'Daily Loan and Return Statistics',
+      totalLoanCount: 'Total Loan Count',
+      totalNormalReturnCount: 'Total Normal Return Count',
+      totalTimeoutReturnCount: 'Total Timeout Return Count',
+      materialsLoanStats: 'Materials Loan Statistics',
+      loanCount: 'Loan Count',
+      materialsChangeStats: 'Materials Change Statistics',
+      normalChangeCount: 'Normal Change Count',
+      expireChangeCount: 'Expire Change Count',
+      damageChangeCount: 'Damage Change Count',
+      materialsReturnStats: 'Materials Return Statistics',
+      normalReturnCount: 'Normal Return Count',
+      timeoutReturnCount: 'Timeout Return Count',
+      cabinetOpenCloseCount: 'Cabinet Open/Close Count',
+      openCloseCount: 'Open/Close Count',
+      specialStatusStats: 'Special Status Materials Statistics (Current Time)',
+      aboutToExpire: 'About to Expire',
+      expired: 'Expired',
+      damaged: 'Damaged',
+      countUnit: 'pcs',
+      exportDataTable: 'Export Data Table',
+      statisticsRange: 'Statistics Range',
+      materialsLoanAvgDuration: 'Materials Loan Average Duration',
+      avgLoanDuration: 'Average Loan Duration (Hours)',
+      hour: 'Hour',
+      cabinetExceptionStats: 'Cabinet Exception Statistics',
+      misplaced: 'Misplaced',
+      timeoutNotClosed: 'Timeout Not Closed'
+    },
+    locksetType: {
+      locksetTypeCode: 'Lock Set Type Code',
+      locksetTypeCodePlaceholder: 'Please enter lock set type code',
+      locksetTypeName: 'Lock Set Type Name',
+      locksetTypeNamePlaceholder: 'Please enter lock set type name',
+      locksetTypeIcon: 'Lock Set Type Icon',
+      locksetTypeImg: 'Lock Set Type Image',
+      locksetTypeSpec: 'Lock Set Type Spec',
+      locksetTypeSpecPlaceholder: 'Please enter lock set type spec',
+      parentType: 'Parent Type',
+      selectParent: 'Select Parent',
+      autoGenerate: 'Auto Generate',
+      addLocksetType: 'Add Lock Set Type',
+      editLocksetType: 'Edit Lock Set Type',
+      deleteConfirm: 'Are you sure to delete the data item with code "{code}"?'
+    },
+    lotoStation: {
+      lotoName: 'Loto Station Name',
+      lotoNamePlaceholder: 'Please enter loto station name',
+      workstation: 'Workstation',
+      selectWorkstation: 'Please select workstation',
+      machinery: 'Equipment/Process',
+      selectMachinery: 'Please select equipment/process',
+      sort: 'Sort',
+      mapName: 'Map Name',
+      motorMapName: 'Motor Map Name',
+      hardwareSerialNumber: 'Hardware Serial Number',
+      lotoDetail: 'Loto Station Detail',
+      motorMapDetail: 'Motor Map Detail',
+      view: 'View',
+      addLotoStation: 'Add Loto Station Info',
+      editLotoStation: 'Edit Loto Station Info',
+      lotoNameRequired: 'Loto station name cannot be empty',
+      mapNameRequired: 'Map name cannot be empty',
+      selectWorkstationPlaceholder: 'Select workstation',
+      selectHardware: 'Please select hardware',
+      lotoInfo: 'Loto Station Info',
+      lotoInfoPlaceholder: 'Please enter loto station info',
+      deleteConfirm: 'Are you sure to delete the selected data items?',
+      editSuccess: 'Updated successfully',
+      addSuccess: 'Added successfully',
+      deleteSuccess: 'Deleted successfully'
+    },
+    technologyList: {
+      selectWorkstationPlaceholder: 'Please select workstation name below',
+      craft: 'Craft',
+      device: 'Device',
+      craftName: 'Craft Name',
+      deviceName: 'Device Name',
+      craftNamePlaceholder: 'Please enter craft name',
+      deviceNamePlaceholder: 'Please enter device name',
+      craftCode: 'Craft Code',
+      deviceCode: 'Device Code',
+      craftImage: 'Craft Image',
+      deviceImage: 'Device Image',
+      workstation: 'Workstation',
+      selectWorkstation: 'Please select workstation',
+      selectCabinet: 'Please select cabinet',
+      cabinet: 'Cabinet',
+      detail: 'Detail',
+      view: 'View',
+      addCraft: 'Add Craft',
+      addDevice: 'Add Device',
+      editCraft: 'Edit Craft',
+      editDevice: 'Edit Device',
+      namePlaceholder: 'Please enter name',
+      machineryCodeRequired: 'Equipment/process code cannot be empty',
+      machineryNameRequired: 'Equipment/process name cannot be empty',
+      workstationRequired: 'Workstation cannot be empty',
+      cabinetRequired: 'Cabinet cannot be empty',
+      editSuccess: 'Updated successfully',
+      addSuccess: 'Added successfully',
+      deleteSuccess: 'Deleted successfully',
+      deleteConfirm: 'Are you sure to delete the selected data items?'
+    },
+    segregationPoint: {
+      pointName: 'Isolation Point Name',
+      pointNamePlaceholder: 'Please enter isolation point name',
+      workstation: 'Workstation',
+      selectWorkstation: 'Select workstation',
+      machinery: 'Equipment/Process',
+      selectMachinery: 'Select equipment/process',
+      lotoStation: 'Loto Station',
+      selectLotoStation: 'Please select loto station',
+      layoutMap: 'Layout Map',
+      selectLayoutMap: 'Please select layout map',
+      powerType: 'Power Type',
+      selectPowerType: 'Please select power type',
+      pointCode: 'Isolation Point Code',
+      pointCodePlaceholder: 'Please enter isolation point code',
+      pointNfc: 'Isolation Point NFC',
+      pointIcon: 'Isolation Point Icon',
+      pointPicture: 'Isolation Point Picture',
+      pointSerialNumber: 'Isolation Point Serial Number',
+      pointSerialNumberPlaceholder: 'Please enter isolation point serial number',
+      remark: 'Remark',
+      remarkPlaceholder: 'Please enter remark',
+      switchStatus: 'Switch Status',
+      autoGenerate: 'Auto Generate',
+      addPoint: 'Add Isolation Point',
+      editPoint: 'Edit Isolation Point Info',
+      pointCodeRequired: 'Isolation point code cannot be empty',
+      pointNameRequired: 'Isolation point name cannot be empty',
+      lotoIdRequired: 'Loto station cannot be empty',
+      rfidIdRequired: 'Isolation point NFC cannot be empty',
+      switchMapIdRequired: 'Layout map cannot be empty',
+      pointIconRequired: 'Icon cannot be empty',
+      editSuccess: 'Updated successfully',
+      addSuccess: 'Added successfully',
+      deleteSuccess: 'Deleted successfully',
+      deleteConfirm: 'Are you sure to delete the selected data items?'
+    },
+    doorException: {
+      cabinet: 'Materials Cabinet',
+      selectCabinet: 'Please select materials cabinet',
+      status: 'Status',
+      selectStatus: 'Please select status',
+      exceptionOccurTime: 'Exception Occur Time',
+      exceptionHandleTime: 'Exception Handle Time',
+      startDate: 'Start Date',
+      endDate: 'End Date',
+      code: 'Code',
+      occurTime: 'Exception Occur Time',
+      handleTime: 'Exception Handle Time'
+    },
+    materialException: {
+      cabinet: 'Materials Cabinet',
+      selectCabinet: 'Please select materials cabinet',
+      materialName: 'Material Name',
+      materialNamePlaceholder: 'Please enter material name',
+      returnUser: 'Return User',
+      returnUserPlaceholder: 'Please enter return user',
+      status: 'Status',
+      selectStatus: 'Please select status',
+      exceptionOccurTime: 'Exception Occur Time',
+      exceptionHandleTime: 'Exception Handle Time',
+      startDate: 'Start Date',
+      endDate: 'End Date',
+      code: 'Code',
+      rfid: 'RFID',
+      returnCabinet: 'Return Cabinet',
+      occurTime: 'Exception Occur Time',
+      handleTime: 'Exception Handle Time'
     }
   }
 }

+ 492 - 3
src/i18n/lang/zh.js

@@ -36,7 +36,11 @@ export default {
     importFileFormat: '仅允许导入xls、xlsx格式文件。',
     importResult: '导入结果',
     batchDelete: '批量删除',
-    view: '查看'
+    view: '查看',
+    lastWeek: '最近一周',
+    lastMonth: '最近一个月',
+    lastThreeMonths: '最近三个月',
+    to: '至'
   },
   login: {
     title: '系统登录',
@@ -66,7 +70,16 @@ export default {
     switchLanguageSuccess: '切换语言成功',
     chinese: '中文',
     english: 'English',
-    layoutSize: '布局大小'
+    layoutSize: '布局大小',
+    moreMenu: '更多菜单'
+  },
+  tagsView: {
+    refresh: '刷新页面',
+    closeCurrent: '关闭当前',
+    closeOthers: '关闭其他',
+    closeLeft: '关闭左侧',
+    closeRight: '关闭右侧',
+    closeAll: '全部关闭'
   },
   dashboard: {
     materialsTotal: '物资总数',
@@ -364,6 +377,7 @@ export default {
     sopEdit: 'SOP管理-编辑SOP',
     sopView: 'SOP管理-查看SOP',
     jobNew: '作业管理-新建作业票',
+    jobEdit: '作业管理-编辑作业票',
     jobExecute: '作业执行-作业状态',
     preview: '预览',
     craftDetail: '工艺详情',
@@ -1842,7 +1856,13 @@ export default {
       serialNo: '序列号',
       serialNoPlaceholder: '请输入lotoSerialNumber',
       content: '内容',
-      contentPlaceholder: '请输入content'
+      contentPlaceholder: '请输入content',
+      cabinetView: '锁柜视图',
+      listView: '列表视图',
+      lastUpdate: '最后更新',
+      exceptionInfo: '异常信息',
+      unknownException: '未知异常',
+      getDataFailed: '获取数据失败'
     },
     hardwareInfo: {
       hardwareCode: '硬件编码',
@@ -2446,6 +2466,475 @@ export default {
       addSuccess: '新增成功',
       deleteSuccess: '删除成功',
       deleteConfirm: '是否确认删除所选数据项?'
+    },
+    manualException: {
+      exceptionCategory: '异常分类',
+      sourceName: '异常来源',
+      sourceNamePlaceholder: '请输入异常来源',
+      exceptionType: '异常类型',
+      exceptionLevel: '严重等级',
+      raiserName: '上报人',
+      raiserNamePlaceholder: '请输入上报人',
+      raiseTime: '异常发生时间',
+      handleTime: '异常解除时间',
+      exceptionId: '编号',
+      exceptionDescription: '异常描述',
+      all: '全部',
+      pending: '待处理',
+      processed: '已处理',
+      exceptionDetail: '异常详情',
+      handle: '处理',
+      editSuccess: '修改成功'
+    },
+    repair: {
+      repairCode: '维修单编号',
+      repairCodePlaceholder: '请输入维修单编号',
+      repairName: '维修单名称',
+      repairNamePlaceholder: '请输入维修单名称',
+      machineryCode: '设备编码',
+      machineryCodePlaceholder: '请输入设备编码',
+      machineryName: '设备名称',
+      machineryNamePlaceholder: '请输入设备名称',
+      machineryBrand: '品牌',
+      machinerySelectPlaceholder: '请选择设备',
+      repairResult: '维修结果',
+      repairResultPlaceholder: '请选择维修结果',
+      status: '单据状态',
+      statusPlaceholder: '请选择单据状态',
+      requireDate: '报修日期',
+      requireDatePlaceholder: '请选择报修日期',
+      finishDate: '维修完成日期',
+      finishDatePlaceholder: '请选择维修完成日期',
+      confirmDate: '验收日期',
+      confirmDatePlaceholder: '请选择验收日期',
+      acceptedBy: '维修人员',
+      confirmBy: '验收人员',
+      repairContent: '维修内容',
+      autoGenerate: '自动生成',
+      remarkPlaceholder: '请输入内容',
+      addRepair: '添加设备维修单',
+      editRepair: '修改设备维修单',
+      repairCodeRequired: '维修单编号不能为空',
+      machineryIdRequired: '设备ID不能为空',
+      machineryCodeRequired: '设备编码不能为空',
+      machineryNameRequired: '设备名称不能为空',
+      requireDateRequired: '请选择报修日期',
+      editSuccess: '修改成功',
+      addSuccess: '新增成功',
+      deleteSuccess: '删除成功',
+      deleteConfirm: '是否确认删除设备维修单编号为"{repairId}"的数据项?',
+      finishRepair: '完成维修',
+      confirmPass: '验收通过',
+      notPass: '不通过'
+    },
+    team: {
+      calendarType: '班组类型',
+      calendarTypePlaceholder: '请选择班组类型',
+      teamCode: '班组编号',
+      teamCodePlaceholder: '请输入班组编号',
+      teamName: '班组名称',
+      teamNamePlaceholder: '请输入班组名称',
+      teamMembers: '项目组成员',
+      autoGenerate: '自动生成',
+      remarkPlaceholder: '请输入内容',
+      addTeam: '添加班组',
+      editTeam: '修改班组',
+      viewTeam: '查看班组',
+      teamCodeRequired: '班组编号不能为空',
+      teamNameRequired: '班组名称不能为空',
+      calendarTypeRequired: '请选择班组类型',
+      editSuccess: '修改成功',
+      addSuccess: '新增成功',
+      deleteSuccess: '删除成功',
+      deleteConfirm: '是否确认删除班组编号为"{teamId}"的数据项?'
+    },
+    teamMember: {
+      userName: '用户名',
+      nickName: '用户昵称',
+      tel: '电话',
+      addTeamMember: '添加班组成员',
+      deleteConfirm: '是否确认删除班组成员?',
+      deleteSuccess: '删除成功'
+    },
+    shift: {
+      shiftName: '班次名称',
+      shiftNamePlaceholder: '请输入班次名称',
+      startTime: '开始时间',
+      startTimePlaceholder: '请选择开始时间',
+      endTime: '结束时间',
+      endTimePlaceholder: '请选择结束时间',
+      orderNumPlaceholder: '请输入序号',
+      addShift: '添加班次',
+      editShift: '修改计划班次',
+      shiftNameRequired: '班次名称不能为空',
+      startTimeRequired: '开始时间不能为空',
+      endTimeRequired: '结束时间不能为空',
+      editSuccess: '修改成功',
+      addSuccess: '新增成功',
+      deleteSuccess: '删除成功',
+      deleteConfirm: '是否确认删除班次?'
+    },
+    toolType: {
+      toolTypeCode: '类型编码',
+      toolTypeCodePlaceholder: '请输入类型编码',
+      toolTypeName: '类型名称',
+      toolTypeNamePlaceholder: '请输入类型名称',
+      codeFlag: '是否编码管理',
+      maintenType: '保养维护类型',
+      maintenTypePlaceholder: '请选择保养维护类型',
+      maintenPeriod: '保养周期',
+      maintenPeriodPlaceholder: '请输入保养周期',
+      autoGenerate: '自动生成',
+      remarkPlaceholder: '请输入内容',
+      none: '无',
+      day: '天',
+      times: '次',
+      addToolType: '添加工装夹具类型',
+      editToolType: '修改工装夹具类型',
+      viewToolType: '查看类型信息',
+      toolTypeCodeRequired: '类型编码不能为空',
+      toolTypeNameRequired: '类型名称不能为空',
+      codeFlagRequired: '是否启用不能为空',
+      editSuccess: '修改成功',
+      addSuccess: '新增成功',
+      deleteSuccess: '删除成功',
+      deleteConfirm: '是否确认删除工装夹具类型编号为"{toolTypeId}"的数据项?'
+    },
+    emailNotify: {
+      reminderItem: '提醒事项',
+      reminderItemPlaceholder: '请输入提醒事项',
+      emailTemplate: '邮件模板',
+      emailTemplatePlaceholder: '请输入邮件模板',
+      status: '是否激活',
+      reminderTime: '提醒时长',
+      day: '天',
+      hour: '小时',
+      minute: '分钟',
+      second: '秒',
+      addEmailNotify: '新增邮件提醒',
+      editEmailNotify: '修改邮件提醒',
+      templateCodeRequired: '邮件模板编号不能为空',
+      nameRequired: '邮件模板名称不能为空',
+      contentRequired: '邮件模板内容不能为空',
+      activateSuccess: '激活成功',
+      deactivate: '取消激活',
+      editSuccess: '修改成功',
+      addSuccess: '新增成功',
+      deleteSuccess: '删除成功',
+      deleteConfirm: '是否确认删除所选数据项?'
+    },
+    job: {
+      ticketName: '作业票名称',
+      ticketNamePlaceholder: '请输入作业票名称',
+      workstation: '岗位',
+      selectWorkstation: '选择岗位',
+      machinery: '设备/工艺',
+      selectMachinery: '选择设备工艺',
+      ticketType: '作业类型',
+      ticketTypePlaceholder: '请选择作业类型',
+      pointCount: '隔离点总数',
+      addSopTicket: '新增sop作业票',
+      addIsolationPoint: '添加隔离点',
+      editIsolationPoint: '修改隔离点信息',
+      deleteConfirm: '是否确认删除所选数据项?',
+      deleteSuccess: '删除成功',
+      ticketId: '作业编号',
+      ticketIdPlaceholder: '请输入作业编号',
+      lockStatus: '上锁状态',
+      colockStatus: '共锁状态',
+      selectSop: '选择SOP',
+      jobDetail: '作业详情',
+      machineryName: '设备/工艺名称',
+      sopType: 'sop类型',
+      startExecute: '开始执行',
+      machineryDiagram: '工艺/设备 工艺图',
+      lockStationInfo: '锁定站信息',
+      eightSteps: '八大步骤',
+      step: '步骤',
+      stepNumber: '第{step}步',
+      assign: '分配',
+      execute: '执行',
+      executed: '已执行',
+      content: '内容',
+      jobLogs: '作业日志',
+      all: '全部',
+      finishJob: '结束作业',
+      cancelJob: '取消作业',
+      newLogReminder: '新日志提醒',
+      addPerson: '添加人员',
+      locker: '上锁人',
+      selectedPersonList: '选中人员列表',
+      name: '姓名',
+      source: '来源',
+      internal: '内部',
+      external: '外部',
+      internalColockerList: '内部共锁人列表',
+      externalColockerList: '外部共锁人列表',
+      internalPersonId: '内部人员Id',
+      externalPersonId: '外部人员Id',
+      searchName: '搜索姓名',
+      jobStatus: '作业状态',
+      lockKey: '上锁钥匙',
+      unlockKey: '解锁钥匙',
+      personStatus: '人员状态',
+      colocker: '共锁人',
+      isolationPointStatus: '隔离点状态',
+      isolationPoint: '隔离点',
+      padlockName: '挂锁名称',
+      lockset: '锁具机构',
+      affectedTickets: '受影响作业票',
+      ticketStatus: '作业票状态',
+      isolationPointName: '隔离点名称',
+      function: '作用',
+      ongoingJobs: '{workstation} 进行中的作业',
+      number: '编号',
+      icon: '图标',
+      lockerRequired: '上锁人不能为空',
+      selectMachineryOrSopType: '请先选择对应设备工艺或sop类型',
+      jobStartExecute: '作业开始执行',
+      executeSuccess: '执行成功',
+      assignPersonSuccess: '分配人员成功',
+      jobTicketFinished: '作业票结束',
+      jobTicketCancelled: '作业票取消'
+    },
+    material: {
+      materialList: '物资清单',
+      collectionRecord: '领取记录',
+      inspectionPlan: '检查计划',
+      inspectionRecord: '检查记录',
+      repairReplacementRecord: '维修/更换记录'
+    },
+    lockType: {
+      lockTypeCode: '挂锁类型编码',
+      lockTypeCodePlaceholder: '请输入挂锁类型编码',
+      lockTypeName: '挂锁类型名称',
+      lockTypeNamePlaceholder: '请输入挂锁类型名称',
+      lockTypeIcon: '挂锁类型图标',
+      lockTypeImg: '挂锁类型图片',
+      lockTypeSpec: '挂锁型号',
+      lockTypeSpecPlaceholder: '请输入挂锁型号',
+      parentType: '父类型',
+      selectParent: '选择父级',
+      hardwareType: '硬件类型',
+      hardwareTypePlaceholder: '请选择硬件类型',
+      autoGenerate: '自动生成',
+      addLockType: '添加挂锁类型',
+      editLockType: '修改挂锁类型',
+      lockTypeCodeRequired: '挂锁类型编号不能为空',
+      lockTypeNameRequired: '挂锁类型名称不能为空',
+      deleteConfirm: '是否确认删除编号为"{code}"的数据项?'
+    },
+    sop: {
+      sopName: 'SOP名称',
+      sopNamePlaceholder: '请输入sop名称',
+      sopCode: 'SOP编号',
+      sopCodePlaceholder: '请输入SOP编号',
+      sopType: 'SOP类型',
+      sopTypePlaceholder: '请选择SOP类型',
+      workstation: '所属岗位',
+      selectWorkstation: '选择岗位',
+      machinery: '设备/工艺',
+      selectMachinery: '选择设备/工艺',
+      createTime: '创建时间',
+      addSop: '新增SOP',
+      editSop: '修改SOP',
+      viewSop: '查看SOP',
+      newSop: '新建SOP',
+      sopCodeRequired: 'SOP编码不能为空',
+      sopNameRequired: 'SOP名称不能为空',
+      workstationRequired: '岗位不能为空',
+      lotoRequired: '锁定站不能为空',
+      machineryRequired: '设备/工艺不能为空',
+      deleteConfirm: '是否确认删除所选数据项?',
+      importTitle: 'sop导入',
+      importResult: '导入结果',
+      dragFileText: '将文件拖到此处,或',
+      clickUpload: '点击上传',
+      updateExistingData: '是否更新已经存在的用户数据',
+      onlyXlsXlsx: '仅允许导入xls、xlsx格式文件。',
+      downloadTemplate: '下载模板',
+      editSuccess: '修改成功',
+      addSuccess: '新增成功',
+      deleteSuccess: '删除成功'
+    },
+    statisticians: {
+      lastWeek: '最近一周',
+      lastMonth: '最近一个月',
+      lastThreeMonths: '最近三个月',
+      times: '次数',
+      timesUnit: '次',
+      dailyLoanReturnStats: '每日领取归还统计',
+      totalLoanCount: '累计领取次数',
+      totalNormalReturnCount: '累计正常归还次数',
+      totalTimeoutReturnCount: '累计超时归还次数',
+      materialsLoanStats: '物资领取统计',
+      loanCount: '领取次数',
+      materialsChangeStats: '物资更换统计',
+      normalChangeCount: '正常更换次数',
+      expireChangeCount: '过期更换次数',
+      damageChangeCount: '损坏更换次数',
+      materialsReturnStats: '物资归还统计',
+      normalReturnCount: '正常归还次数',
+      timeoutReturnCount: '超时归还次数',
+      cabinetOpenCloseCount: '物资柜开关次数',
+      openCloseCount: '开关次数',
+      specialStatusStats: '特殊状态物资统计(当前时刻)',
+      aboutToExpire: '即将过期',
+      expired: '已过期',
+      damaged: '损坏数',
+      countUnit: '个',
+      exportDataTable: '导出数据表',
+      statisticsRange: '统计区间',
+      materialsLoanAvgDuration: '物资借出平均时长',
+      avgLoanDuration: '平均借出时长(小时)',
+      hour: '小时',
+      cabinetExceptionStats: '物资柜异常统计',
+      misplaced: '物资错放',
+      timeoutNotClosed: '超时未关'
+    },
+    locksetType: {
+      locksetTypeCode: '锁具机构类型编码',
+      locksetTypeCodePlaceholder: '请输入锁具机构类型编码',
+      locksetTypeName: '锁具机构类型名称',
+      locksetTypeNamePlaceholder: '请输入锁具机构类型名称',
+      locksetTypeIcon: '锁具机构类型图标',
+      locksetTypeImg: '锁具机构类型图片',
+      locksetTypeSpec: '锁具机构类型规格',
+      locksetTypeSpecPlaceholder: '请输入锁具机构类型规格',
+      parentType: '父类型',
+      selectParent: '选择父级',
+      autoGenerate: '自动生成',
+      addLocksetType: '新增锁具机构类型',
+      editLocksetType: '修改锁具机构类型',
+      deleteConfirm: '是否确认删除编码为"{code}"的数据项?'
+    },
+    lotoStation: {
+      lotoName: '锁定站名称',
+      lotoNamePlaceholder: '请输入锁定站名称',
+      workstation: '岗位',
+      selectWorkstation: '请选择岗位',
+      machinery: '设备/工艺',
+      selectMachinery: '请选择设备/工艺',
+      sort: '排序',
+      mapName: '地图名称',
+      motorMapName: '电机地图名称',
+      hardwareSerialNumber: '所属硬件序列号',
+      lotoDetail: '锁定站详情',
+      motorMapDetail: '电机地图详情',
+      view: '查看',
+      addLotoStation: '新增锁定站信息',
+      editLotoStation: '修改锁定站信息',
+      lotoNameRequired: '锁定站名称不能为空',
+      mapNameRequired: '地图名称不能为空',
+      selectWorkstationPlaceholder: '选择岗位',
+      selectHardware: '请选择所属硬件',
+      lotoInfo: '锁定站信息',
+      lotoInfoPlaceholder: '请输入锁定站信息',
+      deleteConfirm: '是否确认删除所选数据项?',
+      editSuccess: '修改成功',
+      addSuccess: '新增成功',
+      deleteSuccess: '删除成功'
+    },
+    technologyList: {
+      selectWorkstationPlaceholder: '请在下方选择岗位名称',
+      craft: '工艺',
+      device: '设备',
+      craftName: '工艺名称',
+      deviceName: '设备名称',
+      craftNamePlaceholder: '请输入工艺名称',
+      deviceNamePlaceholder: '请输入设备名称',
+      craftCode: '工艺编号',
+      deviceCode: '设备编号',
+      craftImage: '工艺图',
+      deviceImage: '设备图',
+      workstation: '岗位',
+      selectWorkstation: '请选择岗位',
+      selectCabinet: '请选择所属电柜',
+      cabinet: '所属电柜',
+      detail: '详情',
+      view: '查看',
+      addCraft: '新增工艺',
+      addDevice: '新增设备',
+      editCraft: '修改工艺',
+      editDevice: '修改设备',
+      namePlaceholder: '请输入名称',
+      machineryCodeRequired: '设备/工艺编码不能为空',
+      machineryNameRequired: '设备/工艺名称不能为空',
+      workstationRequired: '岗位不能为空',
+      cabinetRequired: '电柜不能为空',
+      editSuccess: '修改成功',
+      addSuccess: '新增成功',
+      deleteSuccess: '删除成功',
+      deleteConfirm: '确认是否删除所选数据项?'
+    },
+    segregationPoint: {
+      pointName: '隔离点名称',
+      pointNamePlaceholder: '请输入隔离点名称',
+      workstation: '岗位',
+      selectWorkstation: '选择岗位',
+      machinery: '设备/工艺',
+      selectMachinery: '选择设备/工艺',
+      lotoStation: '锁定站',
+      selectLotoStation: '请选择锁定站',
+      layoutMap: '布局地图',
+      selectLayoutMap: '请选择布局地图',
+      powerType: '能量源',
+      selectPowerType: '请选择能量源',
+      pointCode: '隔离点编号',
+      pointCodePlaceholder: '请输入隔离点编号',
+      pointNfc: '隔离点NFC',
+      pointIcon: '隔离点图标',
+      pointPicture: '隔离点图片',
+      pointSerialNumber: '隔离点序列号',
+      pointSerialNumberPlaceholder: '请输入隔离点序列号',
+      remark: '作用',
+      remarkPlaceholder: '请输入作用',
+      switchStatus: '开关状态',
+      autoGenerate: '自动生成',
+      addPoint: '新增隔离点',
+      editPoint: '修改隔离点信息',
+      pointCodeRequired: '隔离点编号不能为空',
+      pointNameRequired: '隔离点名称不能为空',
+      lotoIdRequired: '锁定站不能为空',
+      rfidIdRequired: '隔离点NFC不能为空',
+      switchMapIdRequired: '布局地图不能为空',
+      pointIconRequired: '图标不能为空',
+      editSuccess: '修改成功',
+      addSuccess: '新增成功',
+      deleteSuccess: '删除成功',
+      deleteConfirm: '是否确认删除所选数据项?'
+    },
+    doorException: {
+      cabinet: '物资柜',
+      selectCabinet: '请选择物资柜',
+      status: '状态',
+      selectStatus: '请选择状态',
+      exceptionOccurTime: '异常发生时间',
+      exceptionHandleTime: '异常解除时间',
+      startDate: '开始日期',
+      endDate: '结束日期',
+      code: '编号',
+      occurTime: '异常发生时间',
+      handleTime: '异常解除时间'
+    },
+    materialException: {
+      cabinet: '物资柜',
+      selectCabinet: '请选择物资柜',
+      materialName: '物资名称',
+      materialNamePlaceholder: '请输入物资名称',
+      returnUser: '归还人',
+      returnUserPlaceholder: '请输入归还人',
+      status: '状态',
+      selectStatus: '请选择状态',
+      exceptionOccurTime: '异常发生时间',
+      exceptionHandleTime: '异常解除时间',
+      startDate: '开始日期',
+      endDate: '结束日期',
+      code: '编号',
+      rfid: 'rfid',
+      returnCabinet: '归还柜',
+      occurTime: '异常发生时间',
+      handleTime: '异常解除时间'
     }
   }
 }

+ 49 - 2
src/layout/components/Sidebar/SidebarItem.vue

@@ -3,14 +3,14 @@
     <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
       <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
         <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
-          <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
+          <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="getTitle(onlyOneChild.meta.title)" />
         </el-menu-item>
       </app-link>
     </template>
 
     <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
       <template slot="title">
-        <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
+        <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="getTitle(item.meta.title)" />
       </template>
       <sidebar-item
         v-for="child in item.children"
@@ -55,6 +55,53 @@ export default {
     return {}
   },
   methods: {
+    // 转换title,如果是i18n key则翻译,否则通过映射表转换
+    getTitle(title) {
+      if (!title) return '';
+      
+      // 如果是i18n key格式(router.xxx),则进行翻译
+      if (title.startsWith('router.')) {
+        try {
+          return this.$t(title);
+        } catch (e) {
+          return title;
+        }
+      }
+      
+      // 创建title到i18n key的映射
+      const titleMap = {
+        '首页': 'router.home',
+        '个人中心': 'router.profile',
+        '分配角色': 'router.assignRole',
+        'SOP管理-新建SOP': 'router.sopNew',
+        'SOP管理-编辑SOP': 'router.sopEdit',
+        'SOP管理-查看SOP': 'router.sopView',
+        '作业管理-新建作业票': 'router.jobNew',
+        '作业管理-编辑作业票': 'router.jobEdit',
+        '作业执行-作业状态': 'router.jobExecute',
+        '预览': 'router.preview',
+        '工艺详情': 'router.craftDetail',
+        '物资使用说明详情': 'router.materialInstructionDetail',
+        '设备详情': 'router.deviceDetail',
+        '详情': 'router.detail',
+        '物资规格': 'router.materialSpec',
+        '分配用户': 'router.assignUser',
+        '字典数据': 'router.dictData',
+        '规则组成': 'router.ruleComposition'
+      };
+      
+      // 如果title在映射中,使用i18n翻译
+      if (titleMap[title]) {
+        try {
+          return this.$t(titleMap[title]);
+        } catch (e) {
+          return title;
+        }
+      }
+      
+      // 如果不在映射中,可能是从接口获取的,原样返回
+      return title;
+    },
     hasOneShowingChild(children = [], parent) {
       if (!children) {
         children = [];

+ 54 - 7
src/layout/components/TagsView/index.vue

@@ -13,17 +13,17 @@
         @click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
         @contextmenu.prevent.native="openMenu(tag,$event)"
       >
-        {{ tag.title }}
+        {{ getTitle(tag.title) }}
         <span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
       </router-link>
     </scroll-pane>
     <ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
-      <li @click="refreshSelectedTag(selectedTag)"><i class="el-icon-refresh-right"></i> 刷新页面</li>
-      <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><i class="el-icon-close"></i> 关闭当前</li>
-      <li @click="closeOthersTags"><i class="el-icon-circle-close"></i> 关闭其他</li>
-      <li v-if="!isFirstView()" @click="closeLeftTags"><i class="el-icon-back"></i> 关闭左侧</li>
-      <li v-if="!isLastView()" @click="closeRightTags"><i class="el-icon-right"></i> 关闭右侧</li>
-      <li @click="closeAllTags(selectedTag)"><i class="el-icon-circle-close"></i> 全部关闭</li>
+      <li @click="refreshSelectedTag(selectedTag)"><i class="el-icon-refresh-right"></i> {{ $t('tagsView.refresh') }}</li>
+      <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><i class="el-icon-close"></i> {{ $t('tagsView.closeCurrent') }}</li>
+      <li @click="closeOthersTags"><i class="el-icon-circle-close"></i> {{ $t('tagsView.closeOthers') }}</li>
+      <li v-if="!isFirstView()" @click="closeLeftTags"><i class="el-icon-back"></i> {{ $t('tagsView.closeLeft') }}</li>
+      <li v-if="!isLastView()" @click="closeRightTags"><i class="el-icon-right"></i> {{ $t('tagsView.closeRight') }}</li>
+      <li @click="closeAllTags(selectedTag)"><i class="el-icon-circle-close"></i> {{ $t('tagsView.closeAll') }}</li>
     </ul>
   </div>
 </template>
@@ -72,6 +72,53 @@ export default {
     this.addTags()
   },
   methods: {
+    // 转换title,如果是i18n key则翻译,否则通过映射表转换
+    getTitle(title) {
+      if (!title) return '';
+      
+      // 如果是i18n key格式(router.xxx),则进行翻译
+      if (title.startsWith('router.')) {
+        try {
+          return this.$t(title);
+        } catch (e) {
+          return title;
+        }
+      }
+      
+      // 创建title到i18n key的映射
+      const titleMap = {
+        '首页': 'router.home',
+        '个人中心': 'router.profile',
+        '分配角色': 'router.assignRole',
+        'SOP管理-新建SOP': 'router.sopNew',
+        'SOP管理-编辑SOP': 'router.sopEdit',
+        'SOP管理-查看SOP': 'router.sopView',
+        '作业管理-新建作业票': 'router.jobNew',
+        '作业管理-编辑作业票': 'router.jobEdit',
+        '作业执行-作业状态': 'router.jobExecute',
+        '预览': 'router.preview',
+        '工艺详情': 'router.craftDetail',
+        '物资使用说明详情': 'router.materialInstructionDetail',
+        '设备详情': 'router.deviceDetail',
+        '详情': 'router.detail',
+        '物资规格': 'router.materialSpec',
+        '分配用户': 'router.assignUser',
+        '字典数据': 'router.dictData',
+        '规则组成': 'router.ruleComposition'
+      };
+      
+      // 如果title在映射中,使用i18n翻译
+      if (titleMap[title]) {
+        try {
+          return this.$t(titleMap[title]);
+        } catch (e) {
+          return title;
+        }
+      }
+      
+      // 如果不在映射中,可能是从接口获取的,原样返回
+      return title;
+    },
     isActive(route) {
       return route.path === this.$route.path
     },

+ 46 - 35
src/views/mes/Exceptions/Exception/index.vue

@@ -6,13 +6,13 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '180px' : '100px'"
       @submit.native.prevent
     >
-      <el-form-item label="物资柜" prop="loanFromId">
+      <el-form-item :label="$t('mes.materialException.cabinet')" prop="loanFromId">
         <el-select
           v-model="queryParams.loanFromId"
-          placeholder="请选择物资柜"
+          :placeholder="$t('mes.materialException.selectCabinet')"
           clearable
         >
           <el-option
@@ -23,24 +23,24 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="物资名称" prop="materialsName">
+      <el-form-item :label="$t('mes.materialException.materialName')" prop="materialsName">
         <el-input
           v-model="queryParams.materialsName"
-          placeholder="请输入物资名称"
+          :placeholder="$t('mes.materialException.materialNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="归还人" prop="restitutionUserName">
+      <el-form-item :label="$t('mes.materialException.returnUser')" prop="restitutionUserName">
         <el-input
           v-model="queryParams.restitutionUserName"
-          placeholder="请输入归还人"
+          :placeholder="$t('mes.materialException.returnUserPlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
+      <el-form-item :label="$t('mes.materialException.status')" prop="status">
+        <el-select v-model="queryParams.status" :placeholder="$t('mes.materialException.selectStatus')" clearable>
           <el-option
             v-for="dict in dict.type.material_exception_status"
             :key="dict.value"
@@ -49,32 +49,32 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="异常发生时间">
+      <el-form-item :label="$t('mes.materialException.exceptionOccurTime')">
         <el-date-picker
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           :default-time="['00:00:00', '23:59:59']"
           v-model="createTime"
           type="datetimerange"
           :picker-options="pickerOptions"
           range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+          :start-placeholder="$t('mes.materialException.startDate')"
+          :end-placeholder="$t('mes.materialException.endDate')"
           align="right"
           @change="handleClearTime"
         >
         </el-date-picker>
       </el-form-item>
 
-      <el-form-item label="异常解除时间">
+      <el-form-item :label="$t('mes.materialException.exceptionHandleTime')">
         <el-date-picker
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           :default-time="['00:00:00', '23:59:59']"
           v-model="handleTime"
           type="datetimerange"
           :picker-options="pickerOptions"
           range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+          :start-placeholder="$t('mes.materialException.startDate')"
+          :end-placeholder="$t('mes.materialException.endDate')"
           align="right"
           @change="handleClearTime2"
         >
@@ -87,7 +87,7 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-        >搜索
+        >{{ $t('common.search') }}
         </el-button
         >
         <el-button
@@ -95,7 +95,7 @@
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-        >重置
+        >{{ $t('common.reset') }}
         </el-button
         >
       </el-form-item>
@@ -106,30 +106,33 @@
       :data="ExceptionList"
 
     >
-      <el-table-column label="编号" align="center" prop="misplaceId">
+      <el-table-column :label="$t('mes.materialException.code')" align="center" prop="misplaceId" :width="isEnglish ? '120px' : '100px'">
+      </el-table-column>
+      <el-table-column :label="$t('mes.materialException.cabinet')" align="center" prop="loanFromName" :width="isEnglish ? '200px' : '160px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="物资柜" align="center" prop="loanFromName" />
 
-      <el-table-column label="物资名称" align="center" prop="materialsName">
+      <el-table-column :label="$t('mes.materialException.materialName')" align="center" prop="materialsName" :width="isEnglish ? '200px' : '160px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="rfid" align="center" prop="materialsRfid" width="300">
+      <el-table-column :label="$t('mes.materialException.rfid')" align="center" prop="materialsRfid" :width="isEnglish ? '320px' : '300px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="归还柜" align="center" prop="restitutionToName">
+      <el-table-column :label="$t('mes.materialException.returnCabinet')" align="center" prop="restitutionToName" :width="isEnglish ? '180px' : '140px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="归还人" align="center" prop="restitutionUserName">
+      <el-table-column :label="$t('mes.materialException.returnUser')" align="center" prop="restitutionUserName" :width="isEnglish ? '160px' : '120px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="状态" align="center" prop="status">
+      <el-table-column :label="$t('mes.materialException.status')" align="center" prop="status" :width="isEnglish ? '140px' : '120px'">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.material_exception_status" :value="scope.row.status"/>
         </template>
       </el-table-column>
       <el-table-column
-        label="异常发生时间"
+        :label="$t('mes.materialException.occurTime')"
         align="center"
         prop="occurTime"
+        :width="isEnglish ? '220px' : '180px'"
+        show-overflow-tooltip
       >
       </el-table-column>
-      <el-table-column label="异常解除时间" align="center" prop="handleTime">
+      <el-table-column :label="$t('mes.materialException.handleTime')" align="center" prop="handleTime" :width="isEnglish ? '220px' : '180px'" show-overflow-tooltip>
       </el-table-column>
     </el-table>
     <pagination
@@ -199,10 +202,20 @@ export default {
       // 表单参数
       form: {},
       cabinets: [], //物资所属柜
-      pickerOptions: {
+      pickerOptions: {},
+
+    }
+  },
+
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    },
+    pickerOptions() {
+      return {
         shortcuts: [
           {
-            text: "最近一周",
+            text: this.$t('mes.statisticians.lastWeek'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -211,7 +224,7 @@ export default {
             },
           },
           {
-            text: "最近一个月",
+            text: this.$t('mes.statisticians.lastMonth'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -220,7 +233,7 @@ export default {
             },
           },
           {
-            text: "最近三个月",
+            text: this.$t('mes.statisticians.lastThreeMonths'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -229,11 +242,9 @@ export default {
             },
           },
         ],
-      },
-
+      }
     }
   },
-
   created() {
     this.getList()
     this.materialsCabinets()

+ 37 - 27
src/views/mes/Exceptions/doorException/index.vue

@@ -6,12 +6,12 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '180px' : '100px'"
     >
-      <el-form-item label="物资柜" prop="loanFromId">
+      <el-form-item :label="$t('mes.doorException.cabinet')" prop="loanFromId">
         <el-select
           v-model="queryParams.loanFromId"
-          placeholder="请选择物资柜"
+          :placeholder="$t('mes.doorException.selectCabinet')"
           clearable
         >
           <el-option
@@ -38,8 +38,8 @@
 <!--          @keyup.enter.native="handleQuery"-->
 <!--        />-->
 <!--      </el-form-item>-->
-      <el-form-item label="状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
+      <el-form-item :label="$t('mes.doorException.status')" prop="status">
+        <el-select v-model="queryParams.status" :placeholder="$t('mes.doorException.selectStatus')" clearable>
           <el-option
             v-for="dict in dict.type.material_exception_status"
             :key="dict.value"
@@ -48,32 +48,32 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="异常发生时间">
+      <el-form-item :label="$t('mes.doorException.exceptionOccurTime')">
         <el-date-picker
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           :default-time="['00:00:00', '23:59:59']"
           v-model="createTime"
           type="datetimerange"
           :picker-options="pickerOptions"
           range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+          :start-placeholder="$t('mes.doorException.startDate')"
+          :end-placeholder="$t('mes.doorException.endDate')"
           align="right"
           @change="handleClearTime"
         >
         </el-date-picker>
       </el-form-item>
 
-      <el-form-item label="异常解除时间">
+      <el-form-item :label="$t('mes.doorException.exceptionHandleTime')">
         <el-date-picker
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           :default-time="['00:00:00', '23:59:59']"
           v-model="handleTime"
           type="datetimerange"
           :picker-options="pickerOptions"
           range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+          :start-placeholder="$t('mes.doorException.startDate')"
+          :end-placeholder="$t('mes.doorException.endDate')"
           align="right"
           @change="handleClearTime2"
         >
@@ -86,7 +86,7 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-        >搜索
+        >{{ $t('common.search') }}
         </el-button
         >
         <el-button
@@ -94,7 +94,7 @@
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-        >重置
+        >{{ $t('common.reset') }}
         </el-button
         >
       </el-form-item>
@@ -105,9 +105,10 @@
       :data="ExceptionList"
 
     >
-      <el-table-column label="编号" align="center" prop="misplaceId">
+      <el-table-column :label="$t('mes.doorException.code')" align="center" prop="misplaceId" >
+      </el-table-column>
+      <el-table-column :label="$t('mes.doorException.cabinet')" align="center" prop="loanFromName" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="物资柜" align="center" prop="loanFromName" />
 
 <!--      <el-table-column label="物资名称" align="center" prop="materialsName">-->
 <!--      </el-table-column>-->
@@ -115,18 +116,19 @@
 <!--      </el-table-column>-->
 <!--      <el-table-column label="归还人" align="center" prop="restitutionUserName">-->
 <!--      </el-table-column>-->
-      <el-table-column label="状态" align="center" prop="status">
+      <el-table-column :label="$t('mes.doorException.status')" align="center" prop="status" >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.material_exception_status" :value="scope.row.status"/>
         </template>
       </el-table-column>
       <el-table-column
-        label="异常发生时间"
+        :label="$t('mes.doorException.occurTime')"
         align="center"
         prop="occurTime"
+        show-overflow-tooltip
       >
       </el-table-column>
-      <el-table-column label="异常解除时间" align="center" prop="handleTime">
+      <el-table-column :label="$t('mes.doorException.handleTime')" align="center" prop="handleTime"  show-overflow-tooltip>
       </el-table-column>
     </el-table>
     <pagination
@@ -196,10 +198,20 @@ export default {
       // 表单参数
       form: {},
       cabinets: [], //物资所属柜
-      pickerOptions: {
+      pickerOptions: {},
+
+    }
+  },
+
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    },
+    pickerOptions() {
+      return {
         shortcuts: [
           {
-            text: "最近一周",
+            text: this.$t('mes.statisticians.lastWeek'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -208,7 +220,7 @@ export default {
             },
           },
           {
-            text: "最近一个月",
+            text: this.$t('mes.statisticians.lastMonth'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -217,7 +229,7 @@ export default {
             },
           },
           {
-            text: "最近三个月",
+            text: this.$t('mes.statisticians.lastThreeMonths'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -226,11 +238,9 @@ export default {
             },
           },
         ],
-      },
-
+      }
     }
   },
-
   created() {
     this.getList()
     this.materialsCabinets()

+ 128 - 54
src/views/mes/Exceptions/manualException/index.vue

@@ -6,11 +6,16 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '180px' : '100px'"
       @submit.native.prevent
     >
-      <el-form-item label="异常分类" prop="exceptionCategory">
-        <el-select v-model="queryParams.exceptionCategory" placeholder="请选择" clearable>
+      <el-form-item :label="$t('mes.manualException.exceptionCategory')" prop="exceptionCategory">
+        <el-select 
+          v-model="queryParams.exceptionCategory" 
+          :placeholder="$t('common.pleaseSelect')" 
+          :style="{ width: isEnglish ? '240px' : '215px' }"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.classification_of_exceptions"
             :key="dict.value"
@@ -19,17 +24,23 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="异常来源" prop="sourceName">
+      <el-form-item :label="$t('mes.manualException.sourceName')" prop="sourceName">
         <el-input
           v-model="queryParams.sourceName"
-          placeholder="请输入异常来源"
+          :placeholder="$t('mes.manualException.sourceNamePlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="异常类型" prop="exceptionType">
-        <el-select v-model="queryParams.exceptionType" placeholder="请选择" clearable>
+      <el-form-item :label="$t('mes.manualException.exceptionType')" prop="exceptionType">
+        <el-select 
+          v-model="queryParams.exceptionType" 
+          :placeholder="$t('common.pleaseSelect')" 
+          :style="{ width: isEnglish ? '240px' : '215px' }"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.type_of_exception"
             :key="dict.value"
@@ -38,8 +49,13 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="严重等级" prop="exceptionLevel">
-        <el-select v-model="queryParams.exceptionLevel" placeholder="请选择" clearable>
+      <el-form-item :label="$t('mes.manualException.exceptionLevel')" prop="exceptionLevel">
+        <el-select 
+          v-model="queryParams.exceptionLevel" 
+          :placeholder="$t('common.pleaseSelect')" 
+          :style="{ width: isEnglish ? '240px' : '215px' }"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.severity_level"
             :key="dict.value"
@@ -48,41 +64,42 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="上报人" prop="raiserName">
+      <el-form-item :label="$t('mes.manualException.raiserName')" prop="raiserName">
         <el-input
           v-model="queryParams.raiserName"
-          placeholder="请输入上报人"
+          :placeholder="$t('mes.manualException.raiserNamePlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="异常发生时间">
+      <el-form-item :label="$t('mes.manualException.raiseTime')" :label-width="isEnglish ? '200px' : '100px'">
         <el-date-picker
-          style="width: 215px"
+          :style="{ width: isEnglish ? '290px' : '215px' }"
           :default-time="['00:00:00', '23:59:59']"
           v-model="raiseTime"
           type="datetimerange"
           :picker-options="pickerOptions"
           range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+          :start-placeholder="$t('common.startDate')"
+          :end-placeholder="$t('common.endDate')"
           align="right"
           @change="handleClearTime"
         >
         </el-date-picker>
       </el-form-item>
 
-      <el-form-item label="异常解除时间">
+      <el-form-item :label="$t('mes.manualException.handleTime')" :label-width="isEnglish ? '200px' : '100px'">
         <el-date-picker
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           :default-time="['00:00:00', '23:59:59']"
           v-model="handleTime"
           type="datetimerange"
           :picker-options="pickerOptions"
           range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+          :start-placeholder="$t('common.startDate')"
+          :end-placeholder="$t('common.endDate')"
           align="right"
           @change="handleClearTime2"
         >
@@ -95,7 +112,7 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-        >搜索
+        >{{ $t('common.search') }}
         </el-button
         >
         <el-button
@@ -103,51 +120,101 @@
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-        >重置
+        >{{ $t('common.reset') }}
         </el-button
         >
       </el-form-item>
     </el-form>
     <el-radio-group v-model="tabPosition" style="margin: 5px">
-      <el-radio-button label="first">全部</el-radio-button>
-      <el-radio-button label="second">待处理</el-radio-button>
-      <el-radio-button label="third">已处理</el-radio-button>
+      <el-radio-button label="first">{{ $t('mes.manualException.all') }}</el-radio-button>
+      <el-radio-button label="second">{{ $t('mes.manualException.pending') }}</el-radio-button>
+      <el-radio-button label="third">{{ $t('mes.manualException.processed') }}</el-radio-button>
     </el-radio-group>
     <el-table
       v-loading="loading"
       :data="ExceptionList"
     >
-      <el-table-column label="编号" align="center" prop="exceptionId">
+      <el-table-column 
+        :label="$t('mes.manualException.exceptionId')" 
+        align="center" 
+        prop="exceptionId"
+        :width="isEnglish ? '150px' : '130px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column label="异常分类" align="center" prop="exceptionCategory">
+      <el-table-column 
+        :label="$t('mes.manualException.exceptionCategory')" 
+        align="center" 
+        prop="exceptionCategory"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
+      >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.classification_of_exceptions" :value="scope.row.exceptionCategory"/>
         </template>
       </el-table-column>
-      <el-table-column label="异常来源" align="center" prop="sourceName">
+      <el-table-column 
+        :label="$t('mes.manualException.sourceName')" 
+        align="center" 
+        prop="sourceName"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column label="异常类型" align="center" prop="exceptionTypeName">
+      <el-table-column 
+        :label="$t('mes.manualException.exceptionType')" 
+        align="center" 
+        prop="exceptionTypeName"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column label="严重等级" align="center" prop="exceptionLevelName">
+      <el-table-column 
+        :label="$t('mes.manualException.exceptionLevel')" 
+        align="center" 
+        prop="exceptionLevelName"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column label="上报人" align="center" prop="raiserName">
+      <el-table-column 
+        :label="$t('mes.manualException.raiserName')" 
+        align="center" 
+        prop="raiserName"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column label="状态" align="center" prop="status">
+      <el-table-column 
+        :label="$t('common.status')" 
+        align="center" 
+        prop="status"
+        :width="isEnglish ? '120px' : '100px'"
+      >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.manual_status" :value="scope.row.status"/>
         </template>
       </el-table-column>
       <el-table-column
-        label="异常发生时间"
+        :label="$t('mes.manualException.raiseTime')"
         align="center"
         prop="raiseTime"
+        show-overflow-tooltip
       >
       </el-table-column>
-      <el-table-column label="异常解除时间" align="center" prop="handleTime">
+      <el-table-column 
+        :label="$t('mes.manualException.handleTime')" 
+        align="center" 
+        prop="handleTime"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column label="操作">
+      <el-table-column 
+        :label="$t('common.operation')"
+        min-width="100"
+      >
         <template slot-scope="scope">
-          <el-button type="text" @click="handleCheck(scope.row)">查看</el-button>
+          <el-button type="text" @click="handleCheck(scope.row)">{{ $t('common.view') }}</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -169,7 +236,7 @@
           <!-- 异常分类 -->
           <tr style="border-bottom: 1px solid #ddd;">
             <td style="text-align: right; width: 120px;">
-              <strong>异常分类:</strong>
+              <strong>{{ $t('mes.manualException.exceptionCategory') }}:</strong>
             </td>
             <td style="text-align: left;">
               <dict-tag :options="dict.type.classification_of_exceptions" :value="exceptionData.exceptionCategory"/>
@@ -179,7 +246,7 @@
           <!-- 异常来源 -->
           <tr style="border-bottom: 1px solid #ddd;">
             <td style="text-align: right;">
-              <strong>异常来源:</strong>
+              <strong>{{ $t('mes.manualException.sourceName') }}:</strong>
             </td>
             <td style="text-align: left;">
               {{ exceptionData.sourceName }}
@@ -189,7 +256,7 @@
           <!-- 异常类型 -->
           <tr style="border-bottom: 1px solid #ddd;">
             <td style="text-align: right;">
-              <strong>异常类型:</strong>
+              <strong>{{ $t('mes.manualException.exceptionType') }}:</strong>
             </td>
             <td style="text-align: left;">
               {{ exceptionData.exceptionTypeName }}
@@ -199,7 +266,7 @@
           <!-- 严重等级 -->
           <tr style="border-bottom: 1px solid #ddd;">
             <td style="text-align: right;">
-              <strong>严重等级:</strong>
+              <strong>{{ $t('mes.manualException.exceptionLevel') }}:</strong>
             </td>
             <td style="text-align: left;">
               {{ exceptionData.exceptionLevelName }}
@@ -209,7 +276,7 @@
           <!-- 状态 -->
           <tr style="border-bottom: 1px solid #ddd;">
             <td style="text-align: right;">
-              <strong>状态:</strong>
+              <strong>{{ $t('common.status') }}:</strong>
             </td>
             <td style="text-align: left;">
               <dict-tag :options="dict.type.manual_status" :value="exceptionData.status"/>
@@ -219,7 +286,7 @@
           <!-- 上报人 -->
           <tr style="border-bottom: 1px solid #ddd;">
             <td style="text-align: right;">
-              <strong>上报人:</strong>
+              <strong>{{ $t('mes.manualException.raiserName') }}:</strong>
             </td>
             <td style="text-align: left;">
               {{ exceptionData.raiserName }}
@@ -229,7 +296,7 @@
           <!-- 异常发生时间 -->
           <tr style="border-bottom: 1px solid #ddd;">
             <td style="text-align: right;">
-              <strong>异常发生时间:</strong>
+              <strong>{{ $t('mes.manualException.raiseTime') }}:</strong>
             </td>
             <td style="text-align: left;">
               {{ exceptionData.raiseTime }}
@@ -239,7 +306,7 @@
           <!-- 异常解除时间 -->
           <tr style="border-bottom: 1px solid #ddd;">
             <td style="text-align: right;">
-              <strong>异常解除时间:</strong>
+              <strong>{{ $t('mes.manualException.handleTime') }}:</strong>
             </td>
             <td style="text-align: left;">
               {{ exceptionData.handleTime }}
@@ -249,7 +316,7 @@
           <!-- 异常描述 -->
           <tr style="border-bottom: 1px solid #ddd; height: 250px;">
             <td style="text-align: right; vertical-align: top;">
-              <strong>异常描述:</strong>
+              <strong>{{ $t('mes.manualException.exceptionDescription') }}:</strong>
             </td>
             <td style="text-align: left; vertical-align: top;">
               {{ exceptionData.exceptionDescription }}
@@ -264,10 +331,10 @@
           v-no-more-click
           type="primary"
           @click="handleDeal"
-        >处 理
+        >{{ $t('mes.manualException.handle') }}
         </el-button>
         <el-button v-no-more-click type="primary" @click="cancel"
-        >关 闭
+        >{{ $t('common.close') }}
         </el-button>
       </div>
     </el-dialog>
@@ -342,10 +409,18 @@ export default {
       // 表单参数
       form: {},
       cabinets: [], //物资所属柜
-      pickerOptions: {
+
+    }
+  },
+  computed: {
+    isEnglish() {
+      return this.$i18n.locale === 'en'
+    },
+    pickerOptions() {
+      return {
         shortcuts: [
           {
-            text: '最近一周',
+            text: this.$t('common.lastWeek'),
             onClick(picker) {
               const end = new Date()
               const start = new Date()
@@ -354,7 +429,7 @@ export default {
             }
           },
           {
-            text: '最近一个月',
+            text: this.$t('common.lastMonth'),
             onClick(picker) {
               const end = new Date()
               const start = new Date()
@@ -363,7 +438,7 @@ export default {
             }
           },
           {
-            text: '最近三个月',
+            text: this.$t('common.lastThreeMonths'),
             onClick(picker) {
               const end = new Date()
               const start = new Date()
@@ -372,8 +447,7 @@ export default {
             }
           }
         ]
-      }
-
+      };
     }
   },
   watch: {
@@ -428,7 +502,7 @@ export default {
     },
     // 查看
     handleCheck(row) {
-      this.title = '异常详情'
+      this.title = this.$t('mes.manualException.exceptionDetail')
       this.open = true
       this.loadStatus=this.$loading({
         target:".elDialog .el-dialog"
@@ -456,7 +530,7 @@ export default {
 
       updateIsException(data).then((response) => {
         console.log(response)
-        this.$modal.msgSuccess("修改成功");
+        this.$modal.msgSuccess(this.$t('mes.manualException.editSuccess'));
         this.open = false
         this.getList()
       })

+ 37 - 34
src/views/mes/cal/plan/shift.vue

@@ -9,7 +9,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['mes:cal:calplan:add']"
-        >新增</el-button>
+        >{{ $t('common.add') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -20,7 +20,7 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['mes:cal:calplan:edit']"
-        >修改</el-button>
+        >{{ $t('common.edit') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -31,21 +31,21 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['mes:cal:calplan:remove']"
-        >删除</el-button>
+        >{{ $t('common.delete') }}</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="shiftList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="序号" align="center" prop="orderNum" />
-      <el-table-column label="班次名称" align="center" prop="shiftName" />
-      <el-table-column label="开始时间" align="center" prop="startTime" width="180">
+      <el-table-column :label="$t('common.serialNo')" align="center" prop="orderNum" />
+      <el-table-column :label="$t('mes.shift.shiftName')" align="center" prop="shiftName" />
+      <el-table-column :label="$t('mes.shift.startTime')" align="center" prop="startTime" width="180">
       </el-table-column>
-      <el-table-column label="结束时间" align="center" prop="endTime" width="180">
+      <el-table-column :label="$t('mes.shift.endTime')" align="center" prop="endTime" width="180">
       </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column label="操作" align="center" v-if="optType !='view'" class-name="small-padding fixed-width">
+      <el-table-column :label="$t('common.remark')" align="center" prop="remark" />
+      <el-table-column :label="$t('common.operation')" align="center" v-if="optType !='view'" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button v-no-more-click
             size="mini"
@@ -53,14 +53,14 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['mes:cal:calplan:edit']"
-          >修改</el-button>
+          >{{ $t('common.edit') }}</el-button>
           <el-button v-no-more-click
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:cal:calplan:remove']"
-          >删除</el-button>
+          >{{ $t('common.delete') }}</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -78,22 +78,22 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-row>
             <el-col :span="12">
-                <el-form-item label="序号" prop="orderNum">
-                    <el-input-number :min="1" v-model="form.orderNum" placeholder="请输入序号" />
+                <el-form-item :label="$t('common.serialNo')" prop="orderNum">
+                    <el-input-number :min="1" v-model="form.orderNum" :placeholder="$t('mes.shift.orderNumPlaceholder')" />
                 </el-form-item>
             </el-col>
             <el-col :span="12">
-                <el-form-item label="班次名称" prop="shiftName">
-                    <el-input v-model="form.shiftName" placeholder="请输入班次名称" />
+                <el-form-item :label="$t('mes.shift.shiftName')" prop="shiftName">
+                    <el-input v-model="form.shiftName" :placeholder="$t('mes.shift.shiftNamePlaceholder')" />
                 </el-form-item>
             </el-col>
         </el-row>
         <el-row>
             <el-col :span="12">
-                <el-form-item label="开始时间" prop="startTime">
+                <el-form-item :label="$t('mes.shift.startTime')" prop="startTime">
                 <el-time-picker
                 v-model="form.startTime"
-                placeholder="请选择开始时间"
+                :placeholder="$t('mes.shift.startTimePlaceholder')"
                 format ="HH:mm"
                 value-format="HH:mm"
                 >
@@ -101,10 +101,10 @@
                 </el-form-item>
             </el-col>
             <el-col :span="12">
-                <el-form-item label="结束时间" prop="endTime">
+                <el-form-item :label="$t('mes.shift.endTime')" prop="endTime">
                 <el-time-picker
                 v-model="form.endTime"
-                placeholder="请选择结束时间"
+                :placeholder="$t('mes.shift.endTimePlaceholder')"
                 format ="HH:mm"
                 value-format="HH:mm"
                 >                    
@@ -114,8 +114,8 @@
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button v-no-more-click type="primary" @click="submitForm">确 定</el-button>
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click type="primary" @click="submitForm">{{ $t('common.confirm') }}</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -162,19 +162,22 @@ export default {
       },
       // 表单参数
       form: {},
-      // 表单校验
-      rules: {
+    };
+  },
+  computed: {
+    rules() {
+      return {
         shiftName: [
-          { required: true, message: "班次名称不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.shift.shiftNameRequired'), trigger: "blur" }
         ],
         startTime: [
-          { required: true, message: "开始时间不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.shift.startTimeRequired'), trigger: "blur" }
         ],
         endTime: [
-          { required: true, message: "结束时间不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.shift.endTimeRequired'), trigger: "blur" }
         ],
-      }
-    };
+      };
+    }
   },
   created() {
     this.getList();
@@ -235,7 +238,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加班次";
+      this.title = this.$t('mes.shift.addShift');
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -244,7 +247,7 @@ export default {
       getShift(shiftId).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改计划班次";
+        this.title = this.$t('mes.shift.editShift');
       });
     },
     /** 提交按钮 */
@@ -253,13 +256,13 @@ export default {
         if (valid) {
           if (this.form.shiftId != null) {
             updateShift(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
+              this.$modal.msgSuccess(this.$t('mes.shift.editSuccess'));
               this.open = false;
               this.getList();
             });
           } else {
             addShift(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
+              this.$modal.msgSuccess(this.$t('mes.shift.addSuccess'));
               this.open = false;
               this.getList();
             });
@@ -270,11 +273,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const shiftIds = row.shiftId || this.ids;
-      this.$modal.confirm('是否确认删除班次?').then(function() {
+      this.$modal.confirm(this.$t('mes.shift.deleteConfirm')).then(function() {
         return delShift(shiftIds);
       }).then(() => {
         this.getList();
-        this.$modal.msgSuccess("删除成功");
+        this.$modal.msgSuccess(this.$t('mes.shift.deleteSuccess'));
       }).catch(() => {});
     },
   }

+ 49 - 46
src/views/mes/cal/team/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="班组类型" prop="calendarType">
-        <el-select v-model="queryParams.calendarType" placeholder="请选择班组类型">
+      <el-form-item :label="$t('mes.team.calendarType')" prop="calendarType">
+        <el-select v-model="queryParams.calendarType" :placeholder="$t('mes.team.calendarTypePlaceholder')">
           <el-option
             v-for="dict in dict.type.mes_calendar_type"
             :key="dict.value"
@@ -11,25 +11,25 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="班组编号" prop="teamCode">
+      <el-form-item :label="$t('mes.team.teamCode')" prop="teamCode">
         <el-input
           v-model="queryParams.teamCode"
-          placeholder="请输入班组编号"
+          :placeholder="$t('mes.team.teamCodePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="班组名称" prop="teamName">
+      <el-form-item :label="$t('mes.team.teamName')" prop="teamName">
         <el-input
           v-model="queryParams.teamName"
-          placeholder="请输入班组名称"
+          :placeholder="$t('mes.team.teamNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
       <el-form-item>
-        <el-button v-no-more-click type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button v-no-more-click icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button v-no-more-click type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('common.search') }}</el-button>
+        <el-button v-no-more-click icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</el-button>
       </el-form-item>
     </el-form>
 
@@ -42,7 +42,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['mes:cal:team:add']"
-        >新增</el-button>
+        >{{ $t('common.add') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -53,7 +53,7 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['mes:cal:team:edit']"
-        >修改</el-button>
+        >{{ $t('common.edit') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -64,7 +64,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['mes:cal:team:remove']"
-        >删除</el-button>
+        >{{ $t('common.delete') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -74,14 +74,14 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['mes:cal:team:export']"
-        >导出</el-button>
+        >{{ $t('common.export') }}</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="teamList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="班组编号" align="center" prop="teamCode" >
+      <el-table-column :label="$t('mes.team.teamCode')" align="center" prop="teamCode" >
           <template slot-scope="scope">
                 <el-button v-no-more-click              
                   type="text"
@@ -90,14 +90,14 @@
                 >{{scope.row.teamCode}}</el-button>
           </template>
       </el-table-column>
-      <el-table-column label="班组名称" align="center" prop="teamName" />
-      <el-table-column label="班组类型" align="center" prop="calendarType">
+      <el-table-column :label="$t('mes.team.teamName')" align="center" prop="teamName" />
+      <el-table-column :label="$t('mes.team.calendarType')" align="center" prop="calendarType">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.mes_calendar_type" :value="scope.row.calendarType"/>
         </template>
       </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column :label="$t('common.remark')" align="center" prop="remark" />
+      <el-table-column :label="$t('common.operation')" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button v-no-more-click
             size="mini"
@@ -105,14 +105,14 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['mes:cal:team:edit']"
-          >修改</el-button>
+          >{{ $t('common.edit') }}</el-button>
           <el-button v-no-more-click
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:cal:team:remove']"
-          >删除</el-button>
+          >{{ $t('common.delete') }}</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -130,27 +130,27 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-row>
           <el-col :span="8">
-            <el-form-item label="班组编号" prop="teamCode">
-              <el-input v-model="form.teamCode" placeholder="请输入班组编号" />
+            <el-form-item :label="$t('mes.team.teamCode')" prop="teamCode">
+              <el-input v-model="form.teamCode" :placeholder="$t('mes.team.teamCodePlaceholder')" />
             </el-form-item>
           </el-col>
           <el-col :span="3">
             <el-form-item  label-width="80">
               <el-switch v-model="autoGenFlag"
                   active-color="#13ce66"
-                  active-text="自动生成"
+                  :active-text="$t('mes.team.autoGenerate')"
                   @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'" >               
               </el-switch>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="班组名称" prop="teamName">
-              <el-input v-model="form.teamName" placeholder="请输入班组名称" />
+            <el-form-item :label="$t('mes.team.teamName')" prop="teamName">
+              <el-input v-model="form.teamName" :placeholder="$t('mes.team.teamNamePlaceholder')" />
             </el-form-item>
           </el-col>
           <el-col :span="5">
-            <el-form-item label="班组类型" prop="calendarType">
-              <el-select v-model="form.calendarType" placeholder="请选择班组类型">
+            <el-form-item :label="$t('mes.team.calendarType')" prop="calendarType">
+              <el-select v-model="form.calendarType" :placeholder="$t('mes.team.calendarTypePlaceholder')">
                 <el-option
                   v-for="dict in dict.type.mes_calendar_type"
                   :key="dict.value"
@@ -163,18 +163,18 @@
         </el-row>
         <el-row>
           <el-col :span="24">
-            <el-form-item label="备注" prop="remark">
-              <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+            <el-form-item :label="$t('common.remark')" prop="remark">
+              <el-input v-model="form.remark" type="textarea" :placeholder="$t('mes.team.remarkPlaceholder')" />
             </el-form-item>
           </el-col>          
         </el-row>
       </el-form>
-      <el-divider v-if="form.teamId !=null" content-position="center">项目组成员</el-divider>
+      <el-divider v-if="form.teamId !=null" content-position="center">{{ $t('mes.team.teamMembers') }}</el-divider>
       <Teammember v-if="form.teamId !=null" :optType="optType" :teamId="form.teamId"></Teammember>
       <div slot="footer" class="dialog-footer">
-        <el-button v-no-more-click type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
-        <el-button v-no-more-click type="primary" @click="submitForm" v-else>确 定</el-button>
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click type="primary" @click="cancel" v-if="optType =='view'">{{ $t('common.back') }}</el-button>
+        <el-button v-no-more-click type="primary" @click="submitForm" v-else>{{ $t('common.confirm') }}</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -221,19 +221,22 @@ export default {
       },
       // 表单参数
       form: {},
-      // 表单校验
-      rules: {
+    };
+  },
+  computed: {
+    rules() {
+      return {
         teamCode: [
-          { required: true, message: "班组编号不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.team.teamCodeRequired'), trigger: "blur" }
         ],
         teamName: [
-          { required: true, message: "班组名称不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.team.teamNameRequired'), trigger: "blur" }
         ],
         calendarType:[
-          { required: true, message: "清选择班组类型", trigger: "blur" }
+          { required: true, message: this.$t('mes.team.calendarTypeRequired'), trigger: "blur" }
         ]
-      }
-    };
+      };
+    }
   },
   created() {
     this.getList();
@@ -292,7 +295,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加班组";
+      this.title = this.$t('mes.team.addTeam');
       this.optType = "add";
     },
         // 查询明细按钮操作
@@ -302,7 +305,7 @@ export default {
       getTeam(teamId).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "查看班组";
+        this.title = this.$t('mes.team.viewTeam');
         this.optType = "view";
       });
     },
@@ -313,7 +316,7 @@ export default {
       getTeam(teamId).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改班组";
+        this.title = this.$t('mes.team.editTeam');
         this.optType = "edit";
       });
     },
@@ -323,13 +326,13 @@ export default {
         if (valid) {
           if (this.form.teamId != null) {
             updateTeam(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
+              this.$modal.msgSuccess(this.$t('mes.team.editSuccess'));
               this.open = false;
               this.getList();
             });
           } else {
             addTeam(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
+              this.$modal.msgSuccess(this.$t('mes.team.addSuccess'));
               this.open = false;
               this.getList();
             });
@@ -340,11 +343,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const teamIds = row.teamId || this.ids;
-      this.$modal.confirm('是否确认删除班组编号为"' + teamIds + '"的数据项?').then(function() {
+      this.$modal.confirm(this.$t('mes.team.deleteConfirm', { teamId: teamIds })).then(function() {
         return delTeam(teamIds);
       }).then(() => {
         this.getList();
-        this.$modal.msgSuccess("删除成功");
+        this.$modal.msgSuccess(this.$t('mes.team.deleteSuccess'));
       }).catch(() => {});
     },
     /** 导出按钮操作 */

+ 11 - 11
src/views/mes/cal/team/member.vue

@@ -9,7 +9,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['mes:cal:team:add']"
-        >新增</el-button>
+        >{{ $t('common.add') }}</el-button>
         <UserMultiSelect ref="userSelect" @onSelected="userSelected"></UserMultiSelect>
       </el-col>
       <el-col :span="1.5">
@@ -21,7 +21,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['mes:cal:team:remove']"
-        >删除</el-button>
+        >{{ $t('common.delete') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -31,17 +31,17 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['mes:cal:team:export']"
-        >导出</el-button>
+        >{{ $t('common.export') }}</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="teammemberList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="用户名" align="center" prop="userName" />
-      <el-table-column label="用户昵称" align="center" prop="nickName" />
-      <el-table-column label="电话" align="center" prop="tel" />
-      <el-table-column label="操作" align="center" v-if="optType !='view'" class-name="small-padding fixed-width">
+      <el-table-column :label="$t('mes.teamMember.userName')" align="center" prop="userName" />
+      <el-table-column :label="$t('mes.teamMember.nickName')" align="center" prop="nickName" />
+      <el-table-column :label="$t('mes.teamMember.tel')" align="center" prop="tel" />
+      <el-table-column :label="$t('common.operation')" align="center" v-if="optType !='view'" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button v-no-more-click
             size="mini"
@@ -49,7 +49,7 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:cal:team:remove']"
-          >删除</el-button>
+          >{{ $t('common.delete') }}</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -167,7 +167,7 @@ export default {
     handleAdd() {
       this.$refs.userSelect.showFlag = true;
       this.open = true;
-      this.title = "添加班组成员";
+      this.title = this.$t('mes.teamMember.addTeamMember');
     },
     userSelected(rows){
       if(rows !=null){
@@ -187,11 +187,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const memberIds = row.memberId || this.ids;
-      this.$modal.confirm('是否确认删除班组成员?').then(function() {
+      this.$modal.confirm(this.$t('mes.teamMember.deleteConfirm')).then(function() {
         return delTeammember(memberIds);
       }).then(() => {
         this.getList();
-        this.$modal.msgSuccess("删除成功");
+        this.$modal.msgSuccess(this.$t('mes.teamMember.deleteSuccess'));
       }).catch(() => {});
     },
     /** 导出按钮操作 */

+ 102 - 66
src/views/mes/dv/lotoStation/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '140px' : '100px'"
       @submit.native.prevent
     >
       <el-row>
@@ -18,19 +18,19 @@
 <!--            @keyup.enter.native="handleQuery"-->
 <!--          />-->
 <!--        </el-form-item>-->
-        <el-form-item label="锁定站名称" prop="lotoName">
+        <el-form-item :label="$t('mes.lotoStation.lotoName')" prop="lotoName">
           <el-input
             v-model="queryParams.lotoName"
-            placeholder="请输入锁定站名称"
+            :placeholder="$t('mes.lotoStation.lotoNamePlaceholder')"
             clearable
             @keyup.enter.native="handleQuery"
           />
         </el-form-item>
-        <el-form-item label="岗位" prop="workstationId" >
-          <treeselect style="width: 200px" v-model="queryParams.workstationId" :options="marsOptions" :normalizer="Marsnormalizer" placeholder="请选择岗位"/>
+        <el-form-item :label="$t('mes.lotoStation.workstation')" prop="workstationId" >
+          <treeselect style="width: 200px" v-model="queryParams.workstationId" :options="marsOptions" :normalizer="Marsnormalizer" :placeholder="$t('mes.lotoStation.selectWorkstation')"/>
         </el-form-item>
-        <el-form-item label="设备/工艺" prop="lotoId" >
-          <treeselect style="width: 200px" v-model="queryParams.lotoId" :options="machineryOptions" :normalizer="Machinerynormalizer" placeholder="请选择设备/工艺"/>
+        <el-form-item :label="$t('mes.lotoStation.machinery')" prop="lotoId" >
+          <treeselect style="width: 200px" v-model="queryParams.lotoId" :options="machineryOptions" :normalizer="Machinerynormalizer" :placeholder="$t('mes.lotoStation.selectMachinery')"/>
         </el-form-item>
         <el-form-item style="margin-left: 20px">
           <el-button v-no-more-click
@@ -38,10 +38,10 @@
                      icon="el-icon-search"
                      size="mini"
                      @click="handleQuery"
-          >搜索
+          >{{ $t('common.search') }}
           </el-button>
           <el-button v-no-more-click icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置
+          >{{ $t('common.reset') }}
           </el-button>
         </el-form-item>
       </el-row>
@@ -55,7 +55,7 @@
                    size="mini"
                    @click="handleAdd"
                    v-hasPermi="['iscs:station:add']"
-        >新增
+        >{{ $t('common.add') }}
         </el-button>
       </el-col>
 
@@ -68,7 +68,7 @@
                    :disabled="multiple"
                    @click="handleDelete"
                    v-hasPermi="['iscs:station:remove']"
-        >批量删除
+        >{{ $t('common.deleteBatch') }}
         </el-button>
       </el-col>
       <right-toolbar
@@ -90,26 +90,51 @@
 <!--        prop="lotoCode"-->
 <!--      />-->
       <el-table-column
-        label="锁定站名称"
-        width="180px"
+        :label="$t('mes.lotoStation.lotoName')"
+        :width="isEnglish ? '220px' : '180px'"
         align="center"
         prop="lotoName"
+        show-overflow-tooltip
       />
       <el-table-column
-        label="排序"
-        width="180px"
+        :label="$t('mes.lotoStation.sort')"
+        :width="isEnglish ? '120px' : '100px'"
         align="center"
         prop="orderNum"
       />
-      <el-table-column label="岗位" align="center" prop="workstationName" />
-      <el-table-column label="地图名称" align="center" prop="mapName" />
-      <el-table-column label="电机地图名称" align="center" prop="motorMapName" />
-      <el-table-column label="所属硬件序列号" align="center" prop="lotoSerialNumber"></el-table-column>
+      <el-table-column 
+        :label="$t('mes.lotoStation.workstation')" 
+        :width="isEnglish ? '180px' : '120px'"
+        align="center" 
+        prop="workstationName"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.lotoStation.mapName')" 
+        :width="isEnglish ? '180px' : '140px'"
+        align="center" 
+        prop="mapName"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.lotoStation.motorMapName')" 
+        :width="isEnglish ? '200px' : '160px'"
+        align="center" 
+        prop="motorMapName"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.lotoStation.hardwareSerialNumber')" 
+        :width="isEnglish ? '220px' : '180px'"
+        align="center" 
+        prop="lotoSerialNumber"
+        show-overflow-tooltip
+      ></el-table-column>
       <el-table-column
-        label="锁定站详情"
+        :label="$t('mes.lotoStation.lotoDetail')"
         align="center"
         prop="create"
-        width="200"
+        :width="isEnglish ? '180px' : '150px'"
       >
         <template slot-scope="scope">
           <el-button
@@ -117,15 +142,15 @@
             size="mini"
             type="text"
             @click="look(scope.row)"
-          >查看
+          >{{ $t('mes.lotoStation.view') }}
           </el-button>
         </template>
       </el-table-column>
       <el-table-column
-        label="电机地图详情"
+        :label="$t('mes.lotoStation.motorMapDetail')"
         align="center"
         prop="create"
-        width="200"
+        :width="isEnglish ? '200px' : '160px'"
       >
         <template slot-scope="scope">
           <el-button
@@ -133,7 +158,7 @@
             size="mini"
             type="text"
             @click="lookMotor(scope.row)"
-          >查看
+          >{{ $t('mes.lotoStation.view') }}
           </el-button>
         </template>
       </el-table-column>
@@ -149,7 +174,7 @@
 <!--      </el-table-column>-->
 
       <el-table-column
-        label="操作"
+        :label="$t('common.action')"
         align="center"
         class-name="small-padding fixed-width"
         fixed="right"
@@ -161,7 +186,7 @@
                      icon="el-icon-edit"
                      @click="handleUpdate(scope.row)"
                      v-hasPermi="['iscs:station:edit','iscs:station:query']"
-          >修改
+          >{{ $t('common.edit') }}
           </el-button>
           <el-button v-no-more-click
                      size="mini"
@@ -169,7 +194,7 @@
                      icon="el-icon-delete"
                      @click="handleDelete(scope.row)"
                      v-hasPermi="['iscs:station:remove']"
-          >删除
+          >{{ $t('common.delete') }}
           </el-button>
           <!--          <el-button v-no-more-click size="mini" type="text">预览</el-button>-->
         </template>
@@ -185,19 +210,19 @@
     />
 
     <!-- 添加或修改设备维修单对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="450px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-        <el-form-item label="锁定站名称" prop="lotoName">
-          <el-input v-model="form.lotoName" placeholder="请输入锁定站名称" />
+    <el-dialog :title="title" :visible.sync="open" :width="isEnglish ? '550px' : '450px'" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '120px'">
+        <el-form-item :label="$t('mes.lotoStation.lotoName')" prop="lotoName">
+          <el-input v-model="form.lotoName" :placeholder="$t('mes.lotoStation.lotoNamePlaceholder')" />
         </el-form-item>
-        <el-form-item label="地图名称" prop="mapId">
-          <el-select style="width:290px" v-model="form.mapId" placeholder="地图名称">
+        <el-form-item :label="$t('mes.lotoStation.mapName')" prop="mapId">
+          <el-select style="width:290px" v-model="form.mapId" :placeholder="$t('mes.lotoStation.mapName')">
             <el-option v-for="item in this.MapOptions" :key="item.id" :label="item.name" :value="item.id">
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="电机地图" prop="motorMapId">
-          <el-select style="width:290px" v-model="form.motorMapId" placeholder="电机地图">
+        <el-form-item :label="$t('mes.lotoStation.motorMapName')" prop="motorMapId">
+          <el-select style="width:290px" v-model="form.motorMapId" :placeholder="$t('mes.lotoStation.motorMapName')">
             <el-option v-for="item in this.MapOptions" :key="item.id" :label="item.name" :value="item.id">
             </el-option>
           </el-select>
@@ -224,16 +249,16 @@
 <!--            </el-form-item>-->
 <!--          </el-col>-->
 <!--        </el-row>-->
-        <el-form-item label="排序" prop="orderNum">
+        <el-form-item :label="$t('mes.lotoStation.sort')" prop="orderNum">
           <el-input-number type="number" v-model="form.orderNum" />
         </el-form-item>
-        <el-form-item label="岗位" prop="workstationId" >
-          <treeselect v-model="form.workstationId" :options="marsOptions" :normalizer="Marsnormalizer" placeholder="选择岗位"/>
+        <el-form-item :label="$t('mes.lotoStation.workstation')" prop="workstationId" >
+          <treeselect v-model="form.workstationId" :options="marsOptions" :normalizer="Marsnormalizer" :placeholder="$t('mes.lotoStation.selectWorkstationPlaceholder')"/>
         </el-form-item>
-        <el-form-item label="所属硬件" prop="lotoSerialNumber">
+        <el-form-item :label="$t('mes.lotoStation.hardwareSerialNumber')" prop="lotoSerialNumber">
           <el-select
             v-model="form.lotoSerialNumber"
-            placeholder="请选择所属硬件"
+            :placeholder="$t('mes.lotoStation.selectHardware')"
             clearable
           >
             <el-option
@@ -245,18 +270,18 @@
           </el-select>
         </el-form-item>
 
-        <el-form-item label="锁定站信息" prop="map">
+        <el-form-item :label="$t('mes.lotoStation.lotoInfo')" prop="map">
           <el-input
             v-model="form.map"
-            placeholder="请输入锁定站信息"
+            :placeholder="$t('mes.lotoStation.lotoInfoPlaceholder')"
 
           />
         </el-form-item>
 
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button v-no-more-click type="primary" @click="submitForm">确 定</el-button>
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click type="primary" @click="submitForm">{{ $t('common.confirm') }}</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -322,22 +347,36 @@ export default {
       MapOptions: null,
       hardWareList:[],//所属硬件
       // 表单校验
-      rules: {
+      rules: {},
+      // 日期选择
+      pickerOptions: {},
+      EditId: 0, //修改判断
+      machinerytypeOptions: [], //锁具机构类型
+      machineryOptions:[],//查询 设备工艺数据
+    };
+  },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    },
+    rules() {
+      return {
         lotoCode: [
-          { required: true, message: "锁定站编码不能为空", trigger: "blur" },
+          { required: true, message: this.$t('mes.lotoStation.lotoNameRequired'), trigger: "blur" },
         ],
         lotoName: [
-          { required: true, message: "锁定站名称不能为空", trigger: "blur" },
+          { required: true, message: this.$t('mes.lotoStation.lotoNameRequired'), trigger: "blur" },
         ],
         mapId:[
-          { required: true, message: "地图名称不能为空", trigger: "blur" },
+          { required: true, message: this.$t('mes.lotoStation.mapNameRequired'), trigger: "blur" },
         ]
-      },
-      // 日期选择
-      pickerOptions: {
+      }
+    },
+    pickerOptions() {
+      return {
         shortcuts: [
           {
-            text: "最近一周",
+            text: this.$t('mes.statisticians.lastWeek'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -346,7 +385,7 @@ export default {
             },
           },
           {
-            text: "最近一个月",
+            text: this.$t('mes.statisticians.lastMonth'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -355,7 +394,7 @@ export default {
             },
           },
           {
-            text: "最近三个月",
+            text: this.$t('mes.statisticians.lastThreeMonths'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -364,11 +403,8 @@ export default {
             },
           },
         ],
-      },
-      EditId: 0, //修改判断
-      machinerytypeOptions: [], //锁具机构类型
-      machineryOptions:[],//查询 设备工艺数据
-    };
+      }
+    }
   },
   created() {
     this.getList();
@@ -497,7 +533,7 @@ export default {
       this.reset();
       this.open = true;
       this.EditId = null;
-      this.title = "新增锁定站信息";
+      this.title = this.$t('mes.lotoStation.addLotoStation');
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -506,7 +542,7 @@ export default {
       selectIsLotoStationById(this.EditId).then((response) => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改锁定站信息";
+        this.title = this.$t('mes.lotoStation.editLotoStation');
       });
     },
     /** 提交按钮 */
@@ -515,14 +551,14 @@ export default {
         if (valid) {
           if (this.EditId != null) {
             updateLoto(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
+              this.$modal.msgSuccess(this.$t('mes.lotoStation.editSuccess'));
               this.open = false;
               this.getList();
             });
           } else {
             // console.log(this.form, "form");
             addLoto(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
+              this.$modal.msgSuccess(this.$t('mes.lotoStation.addSuccess'));
               this.open = false;
               this.EditId = null;
               this.getList();
@@ -549,13 +585,13 @@ export default {
       const repairIds = row.lotoId || this.ids;
       const repairCodes = row.lotoName || this.codes;
       this.$modal
-        .confirm('是否确认删除所选数据项?')
+        .confirm(this.$t('mes.lotoStation.deleteConfirm'))
         .then(function () {
           return delLoto(repairIds);
         })
         .then(() => {
           this.getList();
-          this.$modal.msgSuccess("删除成功");
+          this.$modal.msgSuccess(this.$t('mes.lotoStation.deleteSuccess'));
         })
         .catch(() => {});
     },

+ 77 - 74
src/views/mes/dv/repair/index.vue

@@ -1,41 +1,41 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
-      <el-form-item label="维修单编号" prop="repairCode">
+      <el-form-item :label="$t('mes.repair.repairCode')" prop="repairCode">
         <el-input
           v-model="queryParams.repairCode"
-          placeholder="请输入维修单编号"
+          :placeholder="$t('mes.repair.repairCodePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="维修单名称" prop="repairName">
+      <el-form-item :label="$t('mes.repair.repairName')" prop="repairName">
         <el-input
           v-model="queryParams.repairName"
-          placeholder="请输入维修单名称"
+          :placeholder="$t('mes.repair.repairNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
      
-      <el-form-item label="设备编码" prop="machineryCode">
+      <el-form-item :label="$t('mes.repair.machineryCode')" prop="machineryCode">
         <el-input
           v-model="queryParams.machineryCode"
-          placeholder="请输入设备编码"
+          :placeholder="$t('mes.repair.machineryCodePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="设备名称" prop="machineryName">
+      <el-form-item :label="$t('mes.repair.machineryName')" prop="machineryName">
         <el-input
           v-model="queryParams.machineryName"
-          placeholder="请输入设备名称"
+          :placeholder="$t('mes.repair.machineryNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="维修结果" prop="repairResult">
-        <el-select v-model="queryParams.repairResult" placeholder="请选择维修结果" clearable>
+      <el-form-item :label="$t('mes.repair.repairResult')" prop="repairResult">
+        <el-select v-model="queryParams.repairResult" :placeholder="$t('mes.repair.repairResultPlaceholder')" clearable>
           <el-option
             v-for="dict in dict.type.mes_repair_result"
             :key="dict.value"
@@ -44,8 +44,8 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="单据状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
+      <el-form-item :label="$t('mes.repair.status')" prop="status">
+        <el-select v-model="queryParams.status" :placeholder="$t('mes.repair.statusPlaceholder')" clearable>
           <el-option
             v-for="dict in dict.type.mes_order_status"
             :key="dict.value"
@@ -55,8 +55,8 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button v-no-more-click type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button v-no-more-click icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button v-no-more-click type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('common.search') }}</el-button>
+        <el-button v-no-more-click icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</el-button>
       </el-form-item>
     </el-form>
 
@@ -69,7 +69,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['mes:dv:repair:add']"
-        >新增</el-button>
+        >{{ $t('common.add') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -80,7 +80,7 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['mes:dv:repair:edit']"
-        >修改</el-button>
+        >{{ $t('common.edit') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -91,45 +91,45 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['mes:dv:repair:remove']"
-        >删除</el-button>
+        >{{ $t('common.delete') }}</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="repairList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="维修单编号" width="120px" align="center" prop="repairCode" />
-      <el-table-column label="维修单名称" width="150px" align="center" prop="repairName" :show-overflow-tooltip="true"/>
-      <el-table-column label="设备编码" align="center" prop="machineryCode" />
-      <el-table-column label="设备名称" align="center" prop="machineryName" />
-      <el-table-column label="报修日期" align="center" prop="requireDate" width="120">
+      <el-table-column :label="$t('mes.repair.repairCode')" width="120px" align="center" prop="repairCode" />
+      <el-table-column :label="$t('mes.repair.repairName')" width="150px" align="center" prop="repairName" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('mes.repair.machineryCode')" align="center" prop="machineryCode" />
+      <el-table-column :label="$t('mes.repair.machineryName')" align="center" prop="machineryName" />
+      <el-table-column :label="$t('mes.repair.requireDate')" align="center" prop="requireDate" width="120">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.requireDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="维修完成日期" align="center" prop="finishDate" width="120">
+      <el-table-column :label="$t('mes.repair.finishDate')" align="center" prop="finishDate" width="120">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.finishDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="验收日期" align="center" prop="confirmDate" width="120">
+      <el-table-column :label="$t('mes.repair.confirmDate')" align="center" prop="confirmDate" width="120">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.confirmDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="维修结果" align="center" prop="repairResult">
+      <el-table-column :label="$t('mes.repair.repairResult')" align="center" prop="repairResult">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.mes_repair_result" :value="scope.row.repairResult"/>
         </template>
       </el-table-column>
-      <el-table-column label="维修人员" align="center" prop="acceptedBy" />
-      <el-table-column label="验收人员" align="center" prop="confirmBy" />
-      <el-table-column label="单据状态" align="center" prop="status">
+      <el-table-column :label="$t('mes.repair.acceptedBy')" align="center" prop="acceptedBy" />
+      <el-table-column :label="$t('mes.repair.confirmBy')" align="center" prop="confirmBy" />
+      <el-table-column :label="$t('mes.repair.status')" align="center" prop="status">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column :label="$t('common.operation')" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button v-no-more-click
             size="mini"
@@ -137,14 +137,14 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['mes:dv:repair:edit']"
-          >修改</el-button>
+          >{{ $t('common.edit') }}</el-button>
           <el-button v-no-more-click
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:dv:repair:remove']"
-          >删除</el-button>
+          >{{ $t('common.delete') }}</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -162,83 +162,83 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-row>
           <el-col :span="8">
-            <el-form-item label="维修单编号" prop="repairCode">
-              <el-input v-model="form.repairCode" placeholder="请输入维修单编号" />
+            <el-form-item :label="$t('mes.repair.repairCode')" prop="repairCode">
+              <el-input v-model="form.repairCode" :placeholder="$t('mes.repair.repairCodePlaceholder')" />
             </el-form-item>
           </el-col>
            <el-col :span="4">
             <el-form-item  label-width="80">
               <el-switch v-model="autoGenFlag"
                   active-color="#13ce66"
-                  active-text="自动生成"
+                  :active-text="$t('mes.repair.autoGenerate')"
                   @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">               
               </el-switch>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="维修单名称" prop="repairName">
-              <el-input v-model="form.repairName" placeholder="请输入维修单名称" />
+            <el-form-item :label="$t('mes.repair.repairName')" prop="repairName">
+              <el-input v-model="form.repairName" :placeholder="$t('mes.repair.repairNamePlaceholder')" />
             </el-form-item>
           </el-col>          
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item label="设备编号" prop="machineryCode">
-              <el-input v-model="form.machineryCode" placeholder="请选择设备" disabled >
+            <el-form-item :label="$t('mes.repair.machineryCode')" prop="machineryCode">
+              <el-input v-model="form.machineryCode" :placeholder="$t('mes.repair.machinerySelectPlaceholder')" disabled >
                 <el-button v-no-more-click style="border-color: #46a6ff; background-color: #46a6ff;color: white;" slot="append" @click="handleMachineryAdd" icon="el-icon-search"></el-button>
               </el-input>
             </el-form-item>
             <MachinerySelectSingle ref="machinerySelect" @onSelected="onMachineryAdd"></MachinerySelectSingle>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="设备名称" prop="machineryName">
-              <el-input v-model="form.machineryName" placeholder="请选择设备" disabled />
+            <el-form-item :label="$t('mes.repair.machineryName')" prop="machineryName">
+              <el-input v-model="form.machineryName" :placeholder="$t('mes.repair.machinerySelectPlaceholder')" disabled />
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="品牌" prop="machineryBrand">
-              <el-input v-model="form.machineryBrand" placeholder="请选择设备" disabled/>
+            <el-form-item :label="$t('mes.repair.machineryBrand')" prop="machineryBrand">
+              <el-input v-model="form.machineryBrand" :placeholder="$t('mes.repair.machinerySelectPlaceholder')" disabled/>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item label="报修日期" prop="requireDate">
+            <el-form-item :label="$t('mes.repair.requireDate')" prop="requireDate">
               <el-date-picker clearable
                 v-model="form.requireDate"
                 style="width: 187px"
                 type="date"                
                 value-format="yyyy-MM-dd"
-                placeholder="请选择报修日期">
+                :placeholder="$t('mes.repair.requireDatePlaceholder')">
               </el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="维修完成日期" v-if="form.status =='APPROVING' || form.status=='FINISHED' || form.status=='CONFIRMED' " prop="finishDate">
+            <el-form-item :label="$t('mes.repair.finishDate')" v-if="form.status =='APPROVING' || form.status=='FINISHED' || form.status=='CONFIRMED' " prop="finishDate">
               <el-date-picker clearable
                 v-model="form.finishDate"
                 style="width: 187px"
                 type="date"
                 value-format="yyyy-MM-dd"
-                placeholder="请选择维修完成日期">
+                :placeholder="$t('mes.repair.finishDatePlaceholder')">
               </el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="验收日期" v-if="form.status=='FINISHED' || form.status=='CONFIRMED' " prop="confirmDate">
+            <el-form-item :label="$t('mes.repair.confirmDate')" v-if="form.status=='FINISHED' || form.status=='CONFIRMED' " prop="confirmDate">
               <el-date-picker clearable
                 v-model="form.confirmDate"
                 style="width: 187px"
                 type="date"
                 value-format="yyyy-MM-dd"
-                placeholder="请选择验收日期">
+                :placeholder="$t('mes.repair.confirmDatePlaceholder')">
               </el-date-picker>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item label="维修结果" v-if="form.status =='APPROVING' || form.status=='FINISHED' || form.status=='CONFIRMED' ">
+            <el-form-item :label="$t('mes.repair.repairResult')" v-if="form.status =='APPROVING' || form.status=='FINISHED' || form.status=='CONFIRMED' ">
               <el-radio-group v-model="form.repairResult">
                 <el-radio
                   v-for="dict in dict.type.mes_repair_result"
@@ -249,35 +249,35 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="维修人员" prop="acceptedName" v-if="form.status =='APPROVING' || form.status=='FINISHED' || form.status=='CONFIRMED' ">
+            <el-form-item :label="$t('mes.repair.acceptedBy')" prop="acceptedName" v-if="form.status =='APPROVING' || form.status=='FINISHED' || form.status=='CONFIRMED' ">
               <el-input v-model="form.acceptedName" readonly="readonly"/>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="验收人员" prop="confirmName" v-if="form.status=='FINISHED' || form.status=='CONFIRMED' ">
+            <el-form-item :label="$t('mes.repair.confirmBy')" prop="confirmName" v-if="form.status=='FINISHED' || form.status=='CONFIRMED' ">
               <el-input v-model="form.confirmName" readonly="readonly"/>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="24">
-            <el-form-item label="备注" prop="remark">
-              <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+            <el-form-item :label="$t('common.remark')" prop="remark">
+              <el-input v-model="form.remark" type="textarea" :placeholder="$t('mes.repair.remarkPlaceholder')" />
             </el-form-item>
           </el-col>          
         </el-row>
       </el-form>
-      <el-divider v-if="form.repairId !=null" content-position="center">维修内容</el-divider>
+      <el-divider v-if="form.repairId !=null" content-position="center">{{ $t('mes.repair.repairContent') }}</el-divider>
       <el-card shadow="always" v-if="form.repairId !=null" class="box-card">
         <Repairline ref="line" :repairId="form.repairId" :optType="optType"></Repairline>    
       </el-card>
 
       <div slot="footer" class="dialog-footer">
-        <el-button v-no-more-click type="primary" v-if="form.status =='PREPARE' && optType !='view'" @click="submitForm">提 交</el-button>
-        <el-button v-no-more-click type="primary" v-if="form.status == 'APPROVING' && optType !='view'" @click="finish">完成维修</el-button> 
-        <el-button v-no-more-click type="success" v-if="form.status == 'FINISHED' && optType !='view'" @click="confirm">验收通过</el-button>
-        <el-button v-no-more-click type="danger" v-if="form.status == 'FINISHED' && optType !='view'" @click="unconfirm">不通过</el-button>
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click type="primary" v-if="form.status =='PREPARE' && optType !='view'" @click="submitForm">{{ $t('common.submit') }}</el-button>
+        <el-button v-no-more-click type="primary" v-if="form.status == 'APPROVING' && optType !='view'" @click="finish">{{ $t('mes.repair.finishRepair') }}</el-button> 
+        <el-button v-no-more-click type="success" v-if="form.status == 'FINISHED' && optType !='view'" @click="confirm">{{ $t('mes.repair.confirmPass') }}</el-button>
+        <el-button v-no-more-click type="danger" v-if="form.status == 'FINISHED' && optType !='view'" @click="unconfirm">{{ $t('mes.repair.notPass') }}</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -336,25 +336,28 @@ export default {
       },
       // 表单参数
       form: {},
-      // 表单校验
-      rules: {
+    };
+  },
+  computed: {
+    rules() {
+      return {
         repairCode: [
-          { required: true, message: "维修单编号不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.repair.repairCodeRequired'), trigger: "blur" }
         ],
         machineryId: [
-          { required: true, message: "设备ID不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.repair.machineryIdRequired'), trigger: "blur" }
         ],
         machineryCode: [
-          { required: true, message: "设备编码不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.repair.machineryCodeRequired'), trigger: "blur" }
         ],
         machineryName: [
-          { required: true, message: "设备名称不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.repair.machineryNameRequired'), trigger: "blur" }
         ],
         requireDate: [
-          { required: true, message: "请选择报修日期", trigger: "blur" }
+          { required: true, message: this.$t('mes.repair.requireDateRequired'), trigger: "blur" }
         ],
-      }
-    };
+      };
+    }
   },
   created() {
     this.getList();
@@ -426,7 +429,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加设备维修单";
+      this.title = this.$t('mes.repair.addRepair');
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -435,7 +438,7 @@ export default {
       getRepair(repairId).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改设备维修单";
+        this.title = this.$t('mes.repair.editRepair');
       });
     },
     /** 提交按钮 */
@@ -444,13 +447,13 @@ export default {
         if (valid) {
           if (this.form.repairId != null) {
             updateRepair(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
+              this.$modal.msgSuccess(this.$t('mes.repair.editSuccess'));
               this.open = false;
               this.getList();
             });
           } else {
             addRepair(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
+              this.$modal.msgSuccess(this.$t('mes.repair.addSuccess'));
               this.open = false;
               this.getList();
             });
@@ -461,11 +464,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const repairIds = row.repairId || this.ids;
-      this.$modal.confirm('是否确认删除设备维修单编号为"' + repairIds + '"的数据项?').then(function() {
+      this.$modal.confirm(this.$t('mes.repair.deleteConfirm', { repairId: repairIds })).then(function() {
         return delRepair(repairIds);
       }).then(() => {
         this.getList();
-        this.$modal.msgSuccess("删除成功");
+        this.$modal.msgSuccess(this.$t('mes.repair.deleteSuccess'));
       }).catch(() => {});
     },
     /** 导出按钮操作 */

+ 122 - 104
src/views/mes/dv/segregationpoint/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '160px' : '100px'"
       @submit.native.prevent
     >
       <!--      <el-form-item label="隔离点编号" prop="pointCode">-->
@@ -17,28 +17,28 @@
       <!--          @keyup.enter.native="handleQuery"-->
       <!--        />-->
       <!--      </el-form-item>-->
-      <el-form-item label="隔离点名称" prop="pointName">
+      <el-form-item :label="$t('mes.segregationPoint.pointName')" prop="pointName">
         <el-input
           v-model="queryParams.pointName"
-          placeholder="请输入隔离点名称"
+          :placeholder="$t('mes.segregationPoint.pointNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="岗位" prop="workstationId">
+      <el-form-item :label="$t('mes.segregationPoint.workstation')" prop="workstationId">
         <treeselect style="width: 200px" v-model="queryParams.workstationId" :options="deptOptions"
-                    :normalizer="normalizer" placeholder="选择岗位"
+                    :normalizer="normalizer" :placeholder="$t('mes.segregationPoint.selectWorkstation')"
         />
       </el-form-item>
-      <el-form-item label="设备/工艺" prop="machineryId">
+      <el-form-item :label="$t('mes.segregationPoint.machinery')" prop="machineryId">
         <treeselect style="width: 200px" v-model="queryParams.machineryId" :options="machineryOptions"
-                    :normalizer="Machinerynormalizer" placeholder="选择设备/工艺"
+                    :normalizer="Machinerynormalizer" :placeholder="$t('mes.segregationPoint.selectMachinery')"
         />
       </el-form-item>
-      <el-form-item label="锁定站" prop="lotoId">
+      <el-form-item :label="$t('mes.segregationPoint.lotoStation')" prop="lotoId">
         <el-select
           v-model="queryParams.lotoId"
-          placeholder="请选择锁定站"
+          :placeholder="$t('mes.segregationPoint.selectLotoStation')"
         >
           <el-option
             v-for="dict in lotoOptions"
@@ -48,10 +48,10 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="布局地图" prop="switchMapId">
+      <el-form-item :label="$t('mes.segregationPoint.layoutMap')" prop="switchMapId">
         <el-select
           v-model="queryParams.switchMapId"
-          placeholder="请选择锁定站"
+          :placeholder="$t('mes.segregationPoint.selectLayoutMap')"
         >
           <el-option
             v-for="dict in switchMapOptions"
@@ -80,11 +80,11 @@
       <!--          />-->
       <!--        </el-select>-->
       <!--      </el-form-item>-->
-      <el-form-item label="能量源" prop="powerType">
+      <el-form-item :label="$t('mes.segregationPoint.powerType')" prop="powerType">
         <el-select
           style="width: 200px"
           v-model="queryParams.powerType"
-          placeholder="请选择能量源"
+          :placeholder="$t('mes.segregationPoint.selectPowerType')"
         >
           <el-option
             v-for="dict in dict.type.power_type"
@@ -115,7 +115,7 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-        >搜索
+        >{{ $t('common.search') }}
         </el-button
         >
         <el-button
@@ -123,7 +123,7 @@
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-        >重置
+        >{{ $t('common.reset') }}
         </el-button
         >
       </el-form-item>
@@ -139,7 +139,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['iscs:point:add']"
-        >新增
+        >{{ $t('common.add') }}
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -152,7 +152,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['iscs:point:remove']"
-        >批量删除
+        >{{ $t('common.deleteBatch') }}
         </el-button>
       </el-col>
       <!--      <el-col :span="1.5">-->
@@ -187,7 +187,7 @@
           </el-button>
         </template>
       </el-table-column> -->
-      <el-table-column label="隔离点编号" align="center" prop="pointCode" width="100">
+      <el-table-column :label="$t('mes.segregationPoint.pointCode')" align="center" prop="pointCode" :width="isEnglish ? '150px' : '120px'">
         <template slot-scope="scope">
           <el-button
             v-no-more-click
@@ -198,12 +198,18 @@
           </el-button>
         </template>
       </el-table-column>
-      <el-table-column label="隔离点名称" align="center" prop="pointName"/>
+      <el-table-column 
+        :label="$t('mes.segregationPoint.pointName')" 
+        align="center" 
+        prop="pointName"
+        :width="isEnglish ? '200px' : '160px'"
+        show-overflow-tooltip
+      />
       <el-table-column
-        label="隔离点图标"
+        :label="$t('mes.segregationPoint.pointIcon')"
         align="center"
         prop="pointIcon"
-        width="90"
+        :width="isEnglish ? '140px' : '110px'"
       >
         <template slot-scope="scope">
           <img
@@ -215,7 +221,7 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column label="开关状态" align="center" prop="switchStatus">
+      <el-table-column :label="$t('mes.segregationPoint.switchStatus')" align="center" prop="switchStatus" :width="isEnglish ? '140px' : '120px'">
         <template slot-scope="scope">
 <!--          <dict-tag :options="dict.type.switch_status" :value="scope.row.switchStatus"></dict-tag>-->
           <el-switch
@@ -232,19 +238,19 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column label="隔离点NFC" align="center" prop="pointNfc" >
+      <el-table-column :label="$t('mes.segregationPoint.pointNfc')" align="center" prop="pointNfc" :width="isEnglish ? '180px' : '140px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="岗位" align="center" prop="workstationName">
+      <el-table-column :label="$t('mes.segregationPoint.workstation')" align="center" prop="workstationName" :width="isEnglish ? '180px' : '120px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="设备/工艺" align="center" prop="machineryName">
+      <el-table-column :label="$t('mes.segregationPoint.machinery')" align="center" prop="machineryName" :width="isEnglish ? '200px' : '160px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="锁定站" align="center" prop="lotoName">
+      <el-table-column :label="$t('mes.segregationPoint.lotoStation')" align="center" prop="lotoName" :width="isEnglish ? '180px' : '140px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="布局地图" align="center" prop="switchMapName">
+      <el-table-column :label="$t('mes.segregationPoint.layoutMap')" align="center" prop="switchMapName" :width="isEnglish ? '180px' : '140px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="隔离点序列号" align="center" prop="pointSerialNumber">
+      <el-table-column :label="$t('mes.segregationPoint.pointSerialNumber')" align="center" prop="pointSerialNumber" :width="isEnglish ? '200px' : '160px'" show-overflow-tooltip>
       </el-table-column>
-      <el-table-column label="作用" align="center" prop="remark">
+      <el-table-column :label="$t('mes.segregationPoint.remark')" align="center" prop="remark" :width="isEnglish ? '150px' : '120px'" show-overflow-tooltip>
       </el-table-column>
       <!-- <el-table-column label="状态" align="center" prop="calendarType">
         <template slot-scope="scope">
@@ -257,10 +263,10 @@
 
 
       <el-table-column
-        label="隔离点图片"
+        :label="$t('mes.segregationPoint.pointPicture')"
         align="center"
         prop="pointPicture"
-        width="90"
+        :width="isEnglish ? '140px' : '110px'"
       >
         <template slot-scope="scope">
           <img
@@ -282,7 +288,7 @@
       <!--      </el-table-column>-->
 
       <!--危险能量类型-->
-      <el-table-column label="能量源" align="center" prop="powerType">
+      <el-table-column :label="$t('mes.segregationPoint.powerType')" align="center" prop="powerType" :width="isEnglish ? '140px' : '120px'">
         <template slot-scope="scope">
           <dict-tag
             :options="dict.type.power_type"
@@ -327,9 +333,10 @@
       <!--      </el-table-column>-->
 
       <el-table-column
-        label="操作"
+        :label="$t('common.action')"
         align="center"
         class-name="small-padding fixed-width"
+        :width="isEnglish ? '180px' : '150px'"
       >
         <template slot-scope="scope">
           <el-button
@@ -339,7 +346,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['iscs:point:edit']"
-          >修改
+          >{{ $t('common.edit') }}
           </el-button>
           <el-button
             v-no-more-click
@@ -348,7 +355,7 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['iscs:point:remove']"
-          >删除
+          >{{ $t('common.delete') }}
           </el-button>
         </template>
       </el-table-column>
@@ -363,18 +370,18 @@
     />
 
     <!-- 添加或修改班组对话框 -->
-    <el-dialog :visible.sync="open" width="960px" append-to-body>
+    <el-dialog :visible.sync="open" :width="isEnglish ? '1100px' : '960px'" append-to-body>
       <div slot="title" class="dialog-title">
         <i></i>
         <span class="title">{{ title }}</span>
       </div>
-      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '110px'">
         <el-row>
           <el-col :span="7">
-            <el-form-item label="隔离点编号" prop="pointCode">
+            <el-form-item :label="$t('mes.segregationPoint.pointCode')" prop="pointCode">
               <el-input
                 v-model="form.pointCode"
-                placeholder="请输入隔离点编号"
+                :placeholder="$t('mes.segregationPoint.pointCodePlaceholder')"
               />
             </el-form-item>
           </el-col>
@@ -383,7 +390,7 @@
               <el-switch
                 v-model="autoGenFlag"
                 active-color="#13ce66"
-                active-text="自动生成"
+                :active-text="$t('mes.segregationPoint.autoGenerate')"
                 @change="handleAutoGenChange(autoGenFlag)"
                 v-if="optType != 'view'"
               >
@@ -391,11 +398,11 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="隔离点名称" prop="pointName">
+            <el-form-item :label="$t('mes.segregationPoint.pointName')" prop="pointName">
               <el-input
                 style="width: 300px"
                 v-model="form.pointName"
-                placeholder="请输入隔离点名称"
+                :placeholder="$t('mes.segregationPoint.pointNamePlaceholder')"
               />
             </el-form-item>
 
@@ -419,14 +426,14 @@
           <!--            </el-form-item>-->
           <!--          </el-col>-->
           <el-col :span="11">
-            <el-form-item label="岗位" prop="workstationId">
+            <el-form-item :label="$t('mes.segregationPoint.workstation')" prop="workstationId">
               <treeselect style="width: 300px" v-model="form.workstationId" :options="deptOptions"
-                          :normalizer="normalizer" placeholder="选择岗位"
+                          :normalizer="normalizer" :placeholder="$t('mes.segregationPoint.selectWorkstation')"
               />
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="隔离点NFC" prop="rfidId" >
+            <el-form-item :label="$t('mes.segregationPoint.pointNfc')" prop="rfidId" >
 <!--              <el-input-->
 <!--                style="width: 300px"-->
 <!--                v-model="form.pointNfc"-->
@@ -453,11 +460,11 @@
 
           <el-col :span="11">
 
-            <el-form-item label="锁定站" prop="lotoId">
+            <el-form-item :label="$t('mes.segregationPoint.lotoStation')" prop="lotoId">
               <el-select
                 style="width: 300px"
                 v-model="form.lotoId"
-                placeholder="请选择锁定站"
+                :placeholder="$t('mes.segregationPoint.selectLotoStation')"
                 :disabled="this.optType=='edit'"
               >
                 <el-option
@@ -471,11 +478,11 @@
 
           </el-col>
           <el-col :span="11">
-            <el-form-item label="布局地图" prop="switchMapId">
+            <el-form-item :label="$t('mes.segregationPoint.layoutMap')" prop="switchMapId">
               <el-select
                 style="width: 300px"
                 v-model="form.switchMapId"
-                placeholder="请选择布局地图"
+                :placeholder="$t('mes.segregationPoint.selectLayoutMap')"
                 :disabled="this.optType=='edit'"
               >
                 <el-option
@@ -513,11 +520,11 @@
           <!--            </el-form-item>-->
           <!--          </el-col>-->
           <el-col :span="11">
-            <el-form-item label="能量源" prop="powerType">
+            <el-form-item :label="$t('mes.segregationPoint.powerType')" prop="powerType">
               <el-select
                 style="width: 300px"
                 v-model="form.powerType"
-                placeholder="请选择能量源"
+                :placeholder="$t('mes.segregationPoint.selectPowerType')"
               >
                 <el-option
                   v-for="dict in dict.type.power_type"
@@ -529,21 +536,21 @@
             </el-form-item>
 
             <!--            <el-form-item label="锁具机构类型" prop="locksetTypeId">-->
-            <!--              <treeselect-->
-            <!--                style="width: 300px"-->
-            <!--                v-model="form.locksetTypeId"-->
-            <!--                :options="LockTypeOptions"-->
-            <!--                :normalizer="normalizerLockset"-->
-            <!--                placeholder="选择锁具机构类型"-->
-            <!--              />-->
+            <!--              <treeselect--> 
+            <!--                style="width: 300px"--> 
+            <!--                v-model="form.locksetTypeId"--> 
+            <!--                :options="LockTypeOptions"--> 
+            <!--                :normalizer="normalizerLockset"--> 
+            <!--                placeholder="选择锁具机构类型"--> 
+            <!--              />--> 
             <!--            </el-form-item>-->
           </el-col>
         <el-col :span="11">
-          <el-form-item label="隔离点序列号" prop="pointSerialNumber">
+          <el-form-item :label="$t('mes.segregationPoint.pointSerialNumber')" prop="pointSerialNumber">
             <el-input
               style="width: 300px"
               v-model="form.pointSerialNumber"
-              placeholder="请输入隔离点序列号"
+              :placeholder="$t('mes.segregationPoint.pointSerialNumberPlaceholder')"
               clearable
               @keyup.enter.native="handleQuery"
             />
@@ -552,18 +559,18 @@
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item label="作用" prop="remark">
+            <el-form-item :label="$t('mes.segregationPoint.remark')" prop="remark">
               <el-input
                 style="width: 300px"
                 v-model="form.remark"
-                placeholder="请输入作用"
+                :placeholder="$t('mes.segregationPoint.remarkPlaceholder')"
               />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="隔离点图标" prop="pointIcon">
+            <el-form-item :label="$t('mes.segregationPoint.pointIcon')" prop="pointIcon">
 <!--              <ImageUploadSingle-->
 <!--                :limit="1"-->
 <!--                :value="form.pointIcon"-->
@@ -709,10 +716,37 @@ export default {
         startTime: '',
         endTime: ''
       },
-      pickerOptions: {
+      pickerOptions: {},
+      // 表单参数
+      form: {},
+      //工艺树
+      machineryOptions: [],
+      LockTypeOptions: [],//锁具机构类型下拉
+      padLockTypeOptions: [],//挂锁类型下拉
+
+      lotoOptions: [],//电柜下拉
+      switchMapOptions: [],//布局地图下拉
+      // 表单校验
+      rules: {},
+      imageMap: {
+        0: '', //电能
+        1: '', //阀门
+        2: '', //空气能
+        3: '' //急停开关
+      },
+      selectedImageIndex: -1, // 用于记录选中的图片索引
+      RfidTokenData:null,//绑定rfid的列表
+    }
+  },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    },
+    pickerOptions() {
+      return {
         shortcuts: [
           {
-            text: '最近一周',
+            text: this.$t('mes.statisticians.lastWeek'),
             onClick(picker) {
               const end = new Date()
               const start = new Date()
@@ -721,7 +755,7 @@ export default {
             }
           },
           {
-            text: '最近一个月',
+            text: this.$t('mes.statisticians.lastMonth'),
             onClick(picker) {
               const end = new Date()
               const start = new Date()
@@ -730,7 +764,7 @@ export default {
             }
           },
           {
-            text: '最近三个月',
+            text: this.$t('mes.statisticians.lastThreeMonths'),
             onClick(picker) {
               const end = new Date()
               const start = new Date()
@@ -739,57 +773,41 @@ export default {
             }
           }
         ]
-      },
-      // 表单参数
-      form: {},
-      //工艺树
-      machineryOptions: [],
-      LockTypeOptions: [],//锁具机构类型下拉
-      padLockTypeOptions: [],//挂锁类型下拉
-
-      lotoOptions: [],//电柜下拉
-      switchMapOptions: [],//布局地图下拉
-      // 表单校验
-      rules: {
+      }
+    },
+    rules() {
+      return {
         pointCode: [
-          { required: true, message: '隔离点编号不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.segregationPoint.pointCodeRequired'), trigger: 'blur' }
         ],
         pointName: [
-          { required: true, message: '隔离点名称不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.segregationPoint.pointNameRequired'), trigger: 'blur' }
         ],
         workshopId: [
-          { required: true, message: '所属车间不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.segregationPoint.lotoIdRequired'), trigger: 'blur' }
         ],
         workareaId: [
-          { required: true, message: '作业区域不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.segregationPoint.lotoIdRequired'), trigger: 'blur' }
         ],
         lotoId: [
-          { required: true, message: '锁定站不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.segregationPoint.lotoIdRequired'), trigger: 'blur' }
         ],
         pointType: [
-          { required: true, message: '隔离点类型不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.segregationPoint.pointNameRequired'), trigger: 'blur' }
         ],
         lockTypeId: [
-          { required: true, message: '挂锁类型不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.segregationPoint.pointNameRequired'), trigger: 'blur' }
         ],
         rfidId: [
-          { required: true, message: '隔离点NFC不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.segregationPoint.rfidIdRequired'), trigger: 'blur' }
         ],
         switchMapId:[
-          {required: true, message: '布局地图不能为空', trigger: 'blur'}
+          {required: true, message: this.$t('mes.segregationPoint.switchMapIdRequired'), trigger: 'blur'}
         ],
         pointIcon:[
-          {required: true, message: '图标不能为空', trigger: 'blur'}
+          {required: true, message: this.$t('mes.segregationPoint.pointIconRequired'), trigger: 'blur'}
         ]
-      },
-      imageMap: {
-        0: '', //电能
-        1: '', //阀门
-        2: '', //空气能
-        3: '' //急停开关
-      },
-      selectedImageIndex: -1, // 用于记录选中的图片索引
-      RfidTokenData:null,//绑定rfid的列表
+      }
     }
   },
   created() {
@@ -1003,7 +1021,7 @@ export default {
     handleAdd() {
       this.reset()
       this.open = true
-      this.title = '新增隔离点'
+      this.title = this.$t('mes.segregationPoint.addPoint')
       this.optType = 'add'
       this.pointId = null
       this.form.workshopId = 0
@@ -1020,7 +1038,7 @@ export default {
         // 确定选中的图片索引
         this.selectedImageIndex = this.getImageIndexByIcon(response.data.pointIcon);
         this.open = true
-        this.title = '修改隔离点信息'
+        this.title = this.$t('mes.segregationPoint.editPoint')
         this.optType = 'edit'
       })
     },
@@ -1041,14 +1059,14 @@ export default {
           if (this.pointId != null) {
             console.log(this.form, '隔离点修改form')
             updateIsIsolationPoint(this.form).then((response) => {
-              this.$modal.msgSuccess('修改成功')
+              this.$modal.msgSuccess(this.$t('mes.segregationPoint.editSuccess'))
               this.open = false
               this.getList()
             })
           } else {
             console.log(this.form, '新增参数')
             addinsertIsIsolationPoint(this.form).then((response) => {
-              this.$modal.msgSuccess('新增成功')
+              this.$modal.msgSuccess(this.$t('mes.segregationPoint.addSuccess'))
               this.open = false
               this.getList()
               this.pointId = null
@@ -1063,13 +1081,13 @@ export default {
       // const pointcodes = row.pointCode || this.codes
       // '是否确认删除隔离点编号为"' + pointcodes + '"的数据项?'
       this.$modal
-        .confirm('是否确认删除所选数据项?')
+        .confirm(this.$t('mes.segregationPoint.deleteConfirm'))
         .then(function() {
           return deleteIsIsolationPointByPointIds(teamIds)
         })
         .then(() => {
           this.getList()
-          this.$modal.msgSuccess('删除成功')
+          this.$modal.msgSuccess(this.$t('mes.segregationPoint.deleteSuccess'))
         })
         .catch(() => {
         })

+ 65 - 48
src/views/mes/dv/technology/technologyList/index.vue

@@ -6,7 +6,7 @@
         <div class="head-container">
           <el-input
             v-model="queryParams.workstationName"
-            placeholder="请在下方选择岗位名称"
+            :placeholder="$t('mes.technologyList.selectWorkstationPlaceholder')"
             clearable
             size="small"
             prefix-icon="el-icon-search"
@@ -33,8 +33,8 @@
     </div>
     <div class="right">
       <el-radio-group v-model="tabPosition" style="margin-bottom: 30px">
-        <el-radio-button label="craft">工艺</el-radio-button>
-        <el-radio-button label="device">设备</el-radio-button>
+        <el-radio-button label="craft">{{ $t('mes.technologyList.craft') }}</el-radio-button>
+        <el-radio-button label="device">{{ $t('mes.technologyList.device') }}</el-radio-button>
       </el-radio-group>
 
       <div v-if="tabPosition === 'craft' || tabPosition === 'device'">
@@ -46,10 +46,10 @@
           v-show="showSearch"
           @submit.native.prevent
         >
-          <el-form-item :label="tabPosition === 'craft' ? '工艺名称' : '设备名称'" prop="machineryName">
+          <el-form-item :label="tabPosition === 'craft' ? $t('mes.technologyList.craftName') : $t('mes.technologyList.deviceName')" prop="machineryName">
             <el-input
               v-model="queryParams.machineryName"
-              :placeholder="tabPosition === 'craft' ? '请输入工艺名称' : '请输入设备名称'"
+              :placeholder="tabPosition === 'craft' ? $t('mes.technologyList.craftNamePlaceholder') : $t('mes.technologyList.deviceNamePlaceholder')"
               clearable
               @keyup.enter.native="handleQuery"
             />
@@ -62,14 +62,14 @@
               icon="el-icon-search"
               size="mini"
               @click="handleQuery"
-            >搜索
+            >{{ $t('common.search') }}
             </el-button>
             <el-button
               v-no-more-click
               icon="el-icon-refresh"
               size="mini"
               @click="resetQuery"
-            >重置
+            >{{ $t('common.reset') }}
             </el-button>
           </el-form-item>
         </el-form>
@@ -83,7 +83,7 @@
               size="mini"
               @click="handleAdd"
               v-hasPermi="['iscs:machinery:add']"
-            >新增
+            >{{ $t('common.add') }}
             </el-button>
           </el-col>
           <el-col :span="1.5">
@@ -96,7 +96,7 @@
               :disabled="multiple"
               @click="handleDelete"
               v-hasPermi="['iscs:machinery:remove']"
-            >批量删除
+            >{{ $t('common.deleteBatch') }}
             </el-button>
           </el-col>
           <right-toolbar
@@ -117,19 +117,26 @@
           <el-table-column type="selection" width="55" align="center"/>
           <el-table-column
             prop="machineryId"
-            :label="tabPosition === 'craft' ? '工艺编号' : '设备编号'"
+            :label="tabPosition === 'craft' ? $t('mes.technologyList.craftCode') : $t('mes.technologyList.deviceCode')"
+
+            show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             prop="machineryName"
-            :label="tabPosition === 'craft' ? '工艺名称' : '设备名称'"
+            :label="tabPosition === 'craft' ? $t('mes.technologyList.craftName') : $t('mes.technologyList.deviceName')"
+
+            show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             prop="workstationName"
-            label="岗位"
+            :label="$t('mes.technologyList.workstation')"
+
+            show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             prop="machineryImg"
-            :label="tabPosition === 'craft' ? '工艺图' : '设备图'"
+            :label="tabPosition === 'craft' ? $t('mes.technologyList.craftImage') : $t('mes.technologyList.deviceImage')"
+
           >
             <template slot-scope="scope">
               <div  class="img-box" >
@@ -149,9 +156,10 @@
             </template>
           </el-table-column>
           <el-table-column
-            label="详情"
+            :label="$t('mes.technologyList.detail')"
             align="center"
             class-name="small-padding fixed-width"
+
           >
             <template slot-scope="scope">
               <el-button
@@ -159,14 +167,15 @@
                 size="mini"
                 type="text"
                 @click="handleLook(scope.row)"
-              >查看
+              >{{ $t('mes.technologyList.view') }}
               </el-button>
             </template>
           </el-table-column>
           <el-table-column
-            label="操作"
+            :label="$t('common.action')"
             align="center"
             class-name="small-padding fixed-width"
+
           >
             <template slot-scope="scope">
               <el-button
@@ -176,7 +185,7 @@
                 icon="el-icon-edit"
                 @click="handleUpdate(scope.row)"
                 v-hasPermi="['iscs:machinery:edit']"
-              >修改
+              >{{ $t('common.edit') }}
               </el-button>
               <el-button
                 v-no-more-click
@@ -185,7 +194,7 @@
                 icon="el-icon-delete"
                 @click="handleDelete(scope.row)"
                 v-hasPermi="['iscs:machinery:remove']"
-              >删除
+              >{{ $t('common.delete') }}
               </el-button>
             </template>
           </el-table-column>
@@ -207,8 +216,8 @@
       </div>
     </div>
     <!-- 添加或修改部门对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="460px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+    <el-dialog :title="title" :visible.sync="open" :width="isEnglish ? '560px' : '460px'" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '120px'">
 <!--        <el-form-item label="上级" prop="parentId">-->
 <!--          <treeselect-->
 <!--            v-model="form.parentId"-->
@@ -218,10 +227,10 @@
 <!--          />-->
 <!--        </el-form-item>-->
 
-        <el-form-item :label="this.tabPosition=='craft'?'工艺名称':'设备名称'" prop="machineryName">
+        <el-form-item :label="this.tabPosition=='craft'?$t('mes.technologyList.craftName'):$t('mes.technologyList.deviceName')" prop="machineryName">
           <el-input
             v-model="form.machineryName"
-            placeholder="请输入名称"
+            :placeholder="$t('mes.technologyList.namePlaceholder')"
           />
         </el-form-item>
 <!--        <el-row>-->
@@ -246,19 +255,19 @@
 <!--          </el-col>-->
 <!--        </el-row>-->
 <!--        mars岗位-->
-        <el-form-item label="岗位" prop="workstationId" >
+        <el-form-item :label="$t('mes.technologyList.workstation')" prop="workstationId" >
           <treeselect
             v-model="form.workstationId"
             :options="marsOptions"
             :normalizer="Marsnormalizer"
-            placeholder="请选择岗位"
+            :placeholder="$t('mes.technologyList.selectWorkstation')"
           />
         </el-form-item>
-        <el-form-item label="所属电柜" prop="lotoId">
+        <el-form-item :label="$t('mes.technologyList.cabinet')" prop="lotoId">
           <el-select
             style="width: 300px"
             v-model="form.lotoId"
-            placeholder="请选择所属电柜"
+            :placeholder="$t('mes.technologyList.selectCabinet')"
           >
             <el-option
               v-for="dict in LotoOptions"
@@ -275,7 +284,7 @@
 <!--          />-->
 <!--        </el-form-item>-->
 
-        <el-form-item :label="this.tabPosition=='craft'?'工艺图':'设备图'" prop="machineryImg">
+        <el-form-item :label="this.tabPosition=='craft'?$t('mes.technologyList.craftImage'):$t('mes.technologyList.deviceImage')" prop="machineryImg">
           <ImageUploadSingle
             :limit="1"
             :value="form.machineryImg"
@@ -287,10 +296,10 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-no-more-click type="primary" @click="submitForm"
-        >确 定
+        >{{ $t('common.confirm') }}
         </el-button
         >
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -360,23 +369,31 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {
+      rules: {},
+      defaultProps: {
+        children: 'children',
+        label: 'label'
+      },
+      workstationOptions: []//岗位
+    }
+  },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    },
+    rules() {
+      return {
         machineryCode: [
-          { required: true, message: '设备/工艺编码不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.technologyList.machineryCodeRequired'), trigger: 'blur' }
         ],
         machineryName: [
-          { required: true, message: '设备/工艺名称不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.technologyList.machineryNameRequired'), trigger: 'blur' }
         ],
         workstationId: [
-          { required: true, message: '岗位不能为空', trigger: 'blur' }
+          { required: true, message: this.$t('mes.technologyList.workstationRequired'), trigger: 'blur' }
         ],
-        lotoId: [{ required: true, message: '电柜不能为空', trigger: 'blur' }]
-      },
-      defaultProps: {
-        children: 'children',
-        label: 'label'
-      },
-      workstationOptions: []//岗位
+        lotoId: [{ required: true, message: this.$t('mes.technologyList.cabinetRequired'), trigger: 'blur' }]
+      }
     }
   },
   created() {
@@ -748,10 +765,10 @@ export default {
       // 在工艺新增就是工艺 设备新增就是设备
       if(this.tabPosition=='craft'){
         this.form.machineryType='工艺'
-        this.title = '新增工艺'
+        this.title = this.$t('mes.technologyList.addCraft')
       }else if(this.tabPosition=='device'){
         this.form.machineryType='设备'
-        this.title = '新增设备'
+        this.title = this.$t('mes.technologyList.addDevice')
       }
       this.open = true
 
@@ -765,10 +782,10 @@ export default {
         this.open = true
         if(this.tabPosition=='craft'){
           this.form.machineryType='工艺'
-          this.title = '修改工艺'
+          this.title = this.$t('mes.technologyList.editCraft')
         }else if(this.tabPosition=='device'){
           this.form.machineryType='设备'
-          this.title = '修改设备'
+          this.title = this.$t('mes.technologyList.editDevice')
         }
         setTimeout(()=>{
           this.isEditing = false
@@ -791,7 +808,7 @@ export default {
         if (valid) {
           if (this.form.machineryId != undefined) {
             updateTechnology(this.form).then((response) => {
-              this.$modal.msgSuccess('修改成功')
+              this.$modal.msgSuccess(this.$t('mes.technologyList.editSuccess'))
               this.open = false
               this.getList()
             })
@@ -800,7 +817,7 @@ export default {
               this.form.parentId=0
             }
             addTechnology(this.form).then((response) => {
-              this.$modal.msgSuccess('新增成功')
+              this.$modal.msgSuccess(this.$t('mes.technologyList.addSuccess'))
               this.open = false
               this.getList()
             })
@@ -818,11 +835,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const machineryIds = row.machineryId || this.ids;
-      this.$modal.confirm('确认是否删除所选数据项?').then(function() {
+      this.$modal.confirm(this.$t('mes.technologyList.deleteConfirm')).then(function() {
         return delTechnology(machineryIds);
       }).then(() => {
         this.getList();
-        this.$modal.msgSuccess("删除成功");
+        this.$modal.msgSuccess(this.$t('mes.technologyList.deleteSuccess'));
       }).catch(() => {});
     }
   }

+ 61 - 56
src/views/mes/email/emailNotify/index.vue

@@ -8,18 +8,18 @@
       v-show="showSearch"
       @submit.native.prevent
     >
-      <el-form-item label="提醒事项" prop="name">
+      <el-form-item :label="$t('mes.emailNotify.reminderItem')" prop="name">
         <el-input
           v-model="queryParams.name"
-          placeholder="请输入提醒事项"
+          :placeholder="$t('mes.emailNotify.reminderItemPlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="邮件模板" prop="templateName">
+      <el-form-item :label="$t('mes.emailNotify.emailTemplate')" prop="templateName">
         <el-input
           v-model="queryParams.templateName"
-          placeholder="请输入邮件模板"
+          :placeholder="$t('mes.emailNotify.emailTemplatePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -31,14 +31,14 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索
+          >{{ $t('common.search') }}
         </el-button>
         <el-button
           v-no-more-click
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-          >重置</el-button
+          >{{ $t('common.reset') }}</el-button
         >
       </el-form-item>
     </el-form>
@@ -52,7 +52,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['iscs:notify:add']"
-          >新增
+          >{{ $t('common.add') }}
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -65,7 +65,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['iscs:notify:remove']"
-          >批量删除
+          >{{ $t('common.batchDelete') }}
         </el-button>
       </el-col>
       <right-toolbar
@@ -81,8 +81,8 @@
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="提醒事项"  prop="name"  ></el-table-column>
-      <el-table-column label="是否激活"  prop="status">
+      <el-table-column :label="$t('mes.emailNotify.reminderItem')"  prop="name"  ></el-table-column>
+      <el-table-column :label="$t('mes.emailNotify.status')"  prop="status">
         <template slot-scope="scope">
           <el-switch
             v-model="scope.row.status"
@@ -92,15 +92,15 @@
           ></el-switch>
         </template>
       </el-table-column>
-      <el-table-column prop="templateName" label="邮件模板"></el-table-column>
-      <el-table-column prop="reminderTime" label="提醒时长">
+      <el-table-column prop="templateName" :label="$t('mes.emailNotify.emailTemplate')"></el-table-column>
+      <el-table-column prop="reminderTime" :label="$t('mes.emailNotify.reminderTime')">
         <template slot-scope="scope">
           {{formattedTime(scope.row.reminderTime)}}
         </template>
       </el-table-column>
 
       <el-table-column
-        label="操作"
+        :label="$t('common.operation')"
         align="center"
         class-name="small-padding fixed-width"
       >
@@ -112,7 +112,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['iscs:notify:edit']"
-            >修改
+            >{{ $t('common.edit') }}
           </el-button>
           <el-button
             v-no-more-click
@@ -121,7 +121,7 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['iscs:notify:remove']"
-          >删除
+          >{{ $t('common.delete') }}
           </el-button>
         </template>
       </el-table-column>
@@ -136,16 +136,16 @@
     <!-- 新增或修改对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="550px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <el-form-item label="提醒事项" prop="name">
-          <el-input v-model="form.name" placeholder="请输入提醒事项" />
+        <el-form-item :label="$t('mes.emailNotify.reminderItem')" prop="name">
+          <el-input v-model="form.name" :placeholder="$t('mes.emailNotify.reminderItemPlaceholder')" />
         </el-form-item>
-        <el-form-item label="邮件模板" prop="templateCode">
+        <el-form-item :label="$t('mes.emailNotify.emailTemplate')" prop="templateCode">
          <el-select v-model="form.templateCode">
            <el-option v-for="item in templatesList" :key="item.templateCode" :label="item.templateName" :value="item.templateCode" >
            </el-option>
          </el-select>
         </el-form-item>
-        <el-form-item label="提醒时长" prop="reminderTime">
+        <el-form-item :label="$t('mes.emailNotify.reminderTime')" prop="reminderTime">
           <div class="time-picker">
             <div
               class="time-unit"
@@ -171,9 +171,9 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-no-more-click type="primary" @click="submitForm"
-          >确 定</el-button
+          >{{ $t('common.confirm') }}</el-button
         >
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -234,51 +234,56 @@ export default {
       isEdit: false,
       // 表单参数
       form: {},
-      // 表单校验
-      rules: {
+      // 借用时长
+      timeValues: {
+        reminderTime: {
+          days: 0,
+          hours: 0,
+          minutes: 0,
+          seconds: 0,
+        },
+
+      },
+    };
+  },
+  computed: {
+    rules() {
+      return {
         templateCode: [
-          { required: true, message: "邮件模板编号不能为空", trigger: "blur" },
+          { required: true, message: this.$t('mes.emailNotify.templateCodeRequired'), trigger: "blur" },
         ],
         name: [
-          { required: true, message: "邮件模板名称不能为空", trigger: "blur" },
+          { required: true, message: this.$t('mes.emailNotify.nameRequired'), trigger: "blur" },
         ],
         content: [
-          { required: true, message: "邮件模板内容不能为空", trigger: "blur" },
+          { required: true, message: this.$t('mes.emailNotify.contentRequired'), trigger: "blur" },
         ],
-      },
-      timeUnits: [
+      };
+    },
+    timeUnits() {
+      return [
         {
           name: "days",
-          label: "天",
+          label: this.$t('mes.emailNotify.day'),
           options: Array.from({ length: 31 }, (_, i) => i),
         },
         {
           name: "hours",
-          label: "小时",
+          label: this.$t('mes.emailNotify.hour'),
           options: Array.from({ length: 24 }, (_, i) => i),
         },
         {
           name: "minutes",
-          label: "分钟",
+          label: this.$t('mes.emailNotify.minute'),
           options: Array.from({ length: 60 }, (_, i) => i),
         },
         {
           name: "seconds",
-          label: "秒",
+          label: this.$t('mes.emailNotify.second'),
           options: Array.from({ length: 60 }, (_, i) => i),
         },
-      ],
-      // 借用时长
-      timeValues: {
-        reminderTime: {
-          days: 0,
-          hours: 0,
-          minutes: 0,
-          seconds: 0,
-        },
-
-      },
-    };
+      ];
+    }
   },
   created() {
     this.getList();
@@ -292,9 +297,9 @@ export default {
       updateIsMailNotifyConfig(row).then(response => {
         console.log(response);
         if(row.status == "0"){
-          this.$message.info('取消激活')
+          this.$message.info(this.$t('mes.emailNotify.deactivate'))
         }else if(row.status == "1"){
-          this.$message.success('激活成功')
+          this.$message.success(this.$t('mes.emailNotify.activateSuccess'))
         }
 
       })
@@ -368,7 +373,7 @@ export default {
       this.reset();
       this.open = true;
       this.isEdit = false;
-      this.title = "新增邮件提醒";
+      this.title = this.$t('mes.emailNotify.addEmailNotify');
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -385,7 +390,7 @@ export default {
 
         this.timeValues.reminderTime = convertTime(response.data.reminderTime);
         this.open = true;
-        this.title = "修改邮件提醒";
+        this.title = this.$t('mes.emailNotify.editEmailNotify');
       });
     },
     // 时间转换
@@ -396,10 +401,10 @@ export default {
       const seconds = totalSeconds % 60;
 
       const parts = [];
-      if (days > 0) parts.push(`${days}`);
-      if (hours > 0) parts.push(`${hours}小时`);
-      if (minutes > 0) parts.push(`${minutes}分钟`);
-      if (seconds > 0) parts.push(`${seconds}`);
+      if (days > 0) parts.push(`${days}${this.$t('mes.emailNotify.day')}`);
+      if (hours > 0) parts.push(`${hours}${this.$t('mes.emailNotify.hour')}`);
+      if (minutes > 0) parts.push(`${minutes}${this.$t('mes.emailNotify.minute')}`);
+      if (seconds > 0) parts.push(`${seconds}${this.$t('mes.emailNotify.second')}`);
 
       return parts.join(" ");
     },
@@ -415,13 +420,13 @@ export default {
         if (valid) {
           if (this.isEdit) {
             updateIsMailNotifyConfig(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
+              this.$modal.msgSuccess(this.$t('mes.emailNotify.editSuccess'));
               this.open = false;
               this.getList();
             });
           } else {
             addIsMailNotifyConfig(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
+              this.$modal.msgSuccess(this.$t('mes.emailNotify.addSuccess'));
               this.open = false;
               this.getList();
             });
@@ -433,13 +438,13 @@ export default {
     handleDelete(row) {
       const templateCodes = row.configId || this.codes;
       this.$modal
-        .confirm('是否确认删除所选数据项?')
+        .confirm(this.$t('mes.emailNotify.deleteConfirm'))
         .then(function () {
           return deleteIsMailNotifyConfig(templateCodes);
         })
         .then(() => {
           this.getList();
-          this.$modal.msgSuccess("删除成功");
+          this.$modal.msgSuccess(this.$t('mes.emailNotify.deleteSuccess'));
         })
         .catch(() => {});
     },

+ 46 - 11
src/views/mes/hw/Lock/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '140px' : '100px'"
     >
       <el-row>
         <el-form-item :label="$t('mes.lock.locksetCode')" prop="locksetCode">
@@ -91,27 +91,58 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column
         :label="$t('mes.lock.locksetCode')"
-        width="150px"
+
         align="center"
         prop="locksetCode"
+        show-overflow-tooltip
       />
       <el-table-column
         :label="$t('mes.lock.locksetName')"
-        width="180px"
+
         align="center"
         prop="locksetName"
-        :show-overflow-tooltip="true"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('mes.lock.locksetType')"
+
+        align="center"
+        prop="locksetTypeName"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('mes.lock.locksetNfc')"
+
+        align="center"
+        prop="locksetNfc"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('mes.lock.locksetRfid')"
+
+        align="center"
+        prop="locksetRfid"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('mes.lock.materialsName')"
+
+        align="center"
+        prop="materialsName"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('mes.lock.locksetSpec')"
+
+        align="center"
+        prop="locksetSpec"
+        show-overflow-tooltip
       />
-      <el-table-column :label="$t('mes.lock.locksetType')" align="center" prop="locksetTypeName" />
-      <el-table-column :label="$t('mes.lock.locksetNfc')" align="center" prop="locksetNfc" />
-      <el-table-column :label="$t('mes.lock.locksetRfid')" align="center" prop="locksetRfid" />
-      <el-table-column :label="$t('mes.lock.materialsName')" align="center" prop="materialsName" />
-      <el-table-column :label="$t('mes.lock.locksetSpec')" align="center" prop="locksetSpec" />
       <el-table-column
         :label="$t('common.createTime')"
+
         align="center"
         prop="createTime"
-        width="180"
       >
         <template slot-scope="scope">
           <span>{{ scope.row.createTime }}</span>
@@ -120,6 +151,7 @@
 
       <el-table-column
         :label="$t('common.operation')"
+
         align="center"
         class-name="small-padding fixed-width"
         fixed="right"
@@ -157,7 +189,7 @@
 
     <!-- 添加或修改设备维修单对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="450px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '120px'">
         <el-form-item :label="$t('mes.lock.locksetType')" prop="locksetTypeId">
           <treeselect
             v-model="form.locksetTypeId"
@@ -310,6 +342,9 @@ export default {
     };
   },
   computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    },
     pickerOptions() {
       return {
         shortcuts: [

+ 61 - 14
src/views/mes/hw/information/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '140px' : '100px'"
     >
       <el-row>
         <el-form-item :label="$t('mes.hardwareInfo.hardwareCode')" prop="hardwareCode">
@@ -158,26 +158,46 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column
         :label="$t('mes.hardwareInfo.hardwareCode')"
-        width="120px"
+        :width="isEnglish ? '140px' : '120px'"
         align="center"
         prop="hardwareCode"
+        show-overflow-tooltip
       />
       <el-table-column
         :label="$t('mes.hardwareInfo.hardwareName')"
-        width="150px"
+        :width="isEnglish ? '180px' : '150px'"
         align="center"
         prop="hardwareName"
-        :show-overflow-tooltip="true"
+        show-overflow-tooltip
       />
       <el-table-column
         :label="$t('mes.hardwareInfo.hardwareType')"
+        :width="isEnglish ? '180px' : '150px'"
         align="center"
         prop="hardwareTypeName"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.hardwareInfo.specModel')" 
+        :width="isEnglish ? '150px' : '120px'"
+        align="center" 
+        prop="hardwareSpec"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.hardwareInfo.serialNo')" 
+        :width="isEnglish ? '140px' : '120px'"
+        align="center" 
+        prop="serialNumber"
+        show-overflow-tooltip
       />
-      <el-table-column :label="$t('mes.hardwareInfo.specModel')" align="center" prop="hardwareSpec" />
-      <el-table-column :label="$t('mes.hardwareInfo.serialNo')" align="center" prop="serialNumber" />
       <!-- <el-table-column label="所属车间" align="center" prop="workshopName" /> -->
-      <el-table-column :label="$t('mes.hardwareInfo.hardwareStatus')" align="center" prop="status">
+      <el-table-column 
+        :label="$t('mes.hardwareInfo.hardwareStatus')" 
+        :width="isEnglish ? '140px' : '120px'"
+        align="center" 
+        prop="status"
+      >
         <template slot-scope="scope">
           <dict-tag
             :options="dict.type.hardware_status"
@@ -187,9 +207,9 @@
       </el-table-column>
       <el-table-column
         :label="$t('common.createTime')"
+        :width="isEnglish ? '200px' : '180px'"
         align="center"
         prop="createTime"
-        width="180"
       >
         <template slot-scope="scope">
           <span>{{ scope.row.createTime }}</span>
@@ -197,18 +217,42 @@
       </el-table-column>
       <el-table-column
         :label="$t('mes.hardwareInfo.enableTime')"
+        :width="isEnglish ? '140px' : '120px'"
         align="center"
         prop="activationTime"
-        width="120"
       >
         <template slot-scope="scope">
           <span>{{ scope.row.activationTime }}</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.hardwareInfo.availableCount')" align="center" prop="availableTimes" />
-      <el-table-column :label="$t('mes.hardwareInfo.usedCount')" align="center" prop="usedTimes" />
-      <el-table-column :label="$t('mes.hardwareInfo.availableLifespan')" align="center" prop="availableLife" />
-      <el-table-column :label="$t('mes.hardwareInfo.usedLifespan')" align="center" prop="usedLife" />
+      <el-table-column 
+        :label="$t('mes.hardwareInfo.availableCount')" 
+        :width="isEnglish ? '140px' : '120px'"
+        align="center" 
+        prop="availableTimes"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.hardwareInfo.usedCount')" 
+        :width="isEnglish ? '130px' : '110px'"
+        align="center" 
+        prop="usedTimes"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.hardwareInfo.availableLifespan')" 
+        :width="isEnglish ? '160px' : '130px'"
+        align="center" 
+        prop="availableLife"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.hardwareInfo.usedLifespan')" 
+        :width="isEnglish ? '150px' : '120px'"
+        align="center" 
+        prop="usedLife"
+        show-overflow-tooltip
+      />
       <el-table-column
         :label="$t('common.operation')"
         align="center"
@@ -254,7 +298,7 @@
       width="1100px"
       append-to-body
     >
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '120px'">
         <el-row>
           <el-col :span="8">
             <el-form-item :label="$t('mes.hardwareInfo.hardwareCode')" prop="hardwareCode">
@@ -507,6 +551,9 @@ export default {
     };
   },
   computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    },
     pickerOptions() {
       return {
         shortcuts: [

+ 5 - 5
src/views/mes/hw/lockCabinet/MapData.vue

@@ -3,16 +3,16 @@
     <div class="time-card">
       <i class="el-icon-time"></i>
       <div class="time-content">
-        <div class="label">最后更新</div>
+        <div class="label">{{ $t('mes.lockCabinet.lastUpdate') }}</div>
         <div class="time">{{ updateTime }}</div>
       </div>
     </div>
     <div ref="container" style="width: 900px; height: 400px;margin: 0 auto"></div>
 
-    <el-dialog title="异常信息" :visible.sync="dialogVisible" width="400px">
+    <el-dialog :title="$t('mes.lockCabinet.exceptionInfo')" :visible.sync="dialogVisible" width="400px">
       <h4 style="text-align: center; font-weight: bolder">{{ errorInfo }}</h4>
       <div slot="footer" class="dialog-footer">
-        <el-button v-no-more-click @click="cancel">关 闭</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.close') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -71,11 +71,11 @@ export default {
         await this.preloadImages()
         this.renderSlots()
       } catch (err) {
-        console.error('获取数据失败:', err)
+        console.error(this.$t('mes.lockCabinet.getDataFailed'), err)
       }
     },
     showErrorDialog(slot) {
-      this.errorInfo = slot.remark || '未知异常'
+      this.errorInfo = slot.remark || this.$t('mes.lockCabinet.unknownException')
       this.dialogVisible = true
     },
     initKonva() {

+ 90 - 17
src/views/mes/hw/lockCabinet/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '160px' : '100px'"
     >
       <el-row>
         <el-form-item :label="$t('mes.lockCabinet.cabinetName')" prop="cabinetName">
@@ -108,16 +108,45 @@
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column
         :label="$t('mes.lockCabinet.cabinetCode')"
-        width="150px"
+        :width="isEnglish ? '170px' : '150px'"
         align="center"
         prop="cabinetCode"
+        show-overflow-tooltip
       />
-      <el-table-column :label="$t('mes.lockCabinet.cabinetName')" align="center" prop="cabinetName"/>
-      <el-table-column :label="$t('mes.lockCabinet.hardwareId')" align="center" prop="hardwareId"></el-table-column>
-      <el-table-column :label="$t('mes.lockCabinet.serialNumber')" align="center" prop="serialNumber"></el-table-column>
-      <el-table-column :label="$t('system.post.postName')" align="center" prop="workstationName">
-      </el-table-column>
-      <el-table-column :label="$t('mes.lockCabinet.picture')" align="left" prop="cabinetPicture">
+      <el-table-column
+        :label="$t('mes.lockCabinet.cabinetName')"
+        :width="isEnglish ? '180px' : '150px'"
+        align="center"
+        prop="cabinetName"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('mes.lockCabinet.hardwareId')"
+        :width="isEnglish ? '140px' : '120px'"
+        align="center"
+        prop="hardwareId"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('mes.lockCabinet.serialNumber')"
+        :width="isEnglish ? '180px' : '150px'"
+        align="center"
+        prop="serialNumber"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('system.post.postName')"
+        :width="isEnglish ? '150px' : '120px'"
+        align="center"
+        prop="workstationName"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('mes.lockCabinet.picture')"
+        :width="isEnglish ? '120px' : '100px'"
+        align="center"
+        prop="cabinetPicture"
+      >
         <template slot-scope="scope">
           <div class="img-box" v-if="scope.row.cabinetPicture">
             <el-image
@@ -137,7 +166,12 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.lockCabinet.icon')" align="left" prop="cabinetIcon">
+      <el-table-column
+        :label="$t('mes.lockCabinet.icon')"
+        :width="isEnglish ? '120px' : '100px'"
+        align="center"
+        prop="cabinetIcon"
+      >
         <template slot-scope="scope">
           <div class="img-box" v-if="scope.row.cabinetIcon">
             <el-image
@@ -157,13 +191,23 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.lockCabinet.isOnline')" align="center" prop="isOnline">
+      <el-table-column
+        :label="$t('mes.lockCabinet.isOnline')"
+        :width="isEnglish ? '120px' : '100px'"
+        align="center"
+        prop="isOnline"
+      >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.isOnline_status" :value="scope.row.isOnline"/>
 
         </template>
       </el-table-column>
-      <el-table-column :label="$t('common.status')" align="center" prop="status">
+      <el-table-column
+        :label="$t('common.status')"
+        :width="isEnglish ? '100px' : '80px'"
+        align="center"
+        prop="status"
+      >
         <template slot-scope="scope">
           <el-switch
             style="pointer-events: none;"
@@ -177,20 +221,44 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('common.remark')" align="center" prop="remark"></el-table-column>
-      <el-table-column :label="$t('common.createTime')" align="center" prop="createTime"></el-table-column>
-      <el-table-column :label="$t('mes.lockCabinet.detail')" align="center" prop="detail">
+      <el-table-column
+        :label="$t('common.remark')"
+        :width="isEnglish ? '150px' : '120px'"
+        align="center"
+        prop="remark"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('common.createTime')"
+        :width="isEnglish ? '180px' : '160px'"
+        align="center"
+        prop="createTime"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('mes.lockCabinet.detail')"
+        :width="isEnglish ? '100px' : '80px'"
+        align="center"
+        prop="detail"
+      >
         <template slot-scope="scope">
           <el-button type="text" @click="lookDetail(scope.row)">{{ $t('common.view') }}</el-button>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.lockCabinet.test')" align="center" prop="detail" v-hasPermi="['iscs:cabinet:test']">
+      <el-table-column
+        :label="$t('mes.lockCabinet.test')"
+        :width="isEnglish ? '100px' : '80px'"
+        align="center"
+        prop="detail"
+        v-hasPermi="['iscs:cabinet:test']"
+      >
         <template slot-scope="scope">
           <el-button type="text" @click="openDialogFunction(scope.row)">{{ $t('common.view') }}</el-button>
         </template>
       </el-table-column>
       <el-table-column
         :label="$t('common.operation')"
+        :width="isEnglish ? '160px' : '140px'"
         align="center"
         class-name="small-padding fixed-width"
         fixed="right"
@@ -228,7 +296,7 @@
     />
     <!-- 添加或修改设备维修单对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="650px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '120px'">
         <el-row>
           <el-col :span="15">
             <el-form-item :label="$t('mes.lockCabinet.cabinetCode')" prop="cabinetCode">
@@ -334,7 +402,7 @@
     </el-dialog>
 <!--    测试弹框-->
     <el-dialog :title="$t('mes.lockCabinet.test')" :visible.sync="openDialog" width="650px" append-to-body>
-      <el-form ref="form" :model="DialogData"  label-width="100px">
+      <el-form ref="form" :model="DialogData"  :label-width="isEnglish ? '140px' : '100px'">
         <el-form-item :label="$t('mes.lockCabinet.type')">
           <el-input v-model="DialogData.type" :placeholder="$t('mes.lockCabinet.typePlaceholder')"></el-input>
         </el-form-item>
@@ -436,6 +504,11 @@ export default {
       EditId: 0, //修改判断
     };
   },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    }
+  },
   created() {
     this.getList();
     this.getOtherList()

+ 2 - 2
src/views/mes/hw/lockCabinet/lookDetail.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
     <el-radio-group v-model="tabPosition" style="margin: 5px">
-      <el-radio-button label="first">锁柜视图</el-radio-button>
-      <el-radio-button label="second">列表视图</el-radio-button>
+      <el-radio-button label="first">{{ $t('mes.lockCabinet.cabinetView') }}</el-radio-button>
+      <el-radio-button label="second">{{ $t('mes.lockCabinet.listView') }}</el-radio-button>
     </el-radio-group>
     <component :is="currentComponent" :cabinetId="this.cabinetId"/>
   </div>

+ 46 - 12
src/views/mes/hw/padLocks/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '140px' : '100px'"
     >
       <el-row>
         <el-form-item :label="$t('mes.padLocks.lockCode')" prop="lockCode">
@@ -88,28 +88,53 @@
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column
         :label="$t('mes.padLocks.lockCode')"
-        width="150px"
+        :width="isEnglish ? '160px' : '150px'"
         align="center"
         prop="lockCode"
+        show-overflow-tooltip
       />
       <el-table-column
         :label="$t('mes.padLocks.lockName')"
-        width="200px"
+        :width="isEnglish ? '180px' : '150px'"
         align="center"
         prop="lockName"
+        show-overflow-tooltip
       />
       <el-table-column
         :label="$t('mes.padLocks.lockNfc')"
-        width="180px"
+        :width="isEnglish ? '150px' : '130px'"
         align="center"
         prop="lockNfc"
-        :show-overflow-tooltip="true"
+        show-overflow-tooltip
       />
 
-      <el-table-column :label="$t('mes.padLocks.hardwareName')" align="center" prop="hardwareName"/>
-      <el-table-column :label="$t('mes.padLocks.lockTypeName')" align="center" prop="lockTypeName"/>
-      <el-table-column :label="$t('mes.padLocks.lockSpec')" align="center" prop="lockSpec"/>
-      <el-table-column :label="$t('common.status')" align="center" prop="exStatus">
+      <el-table-column 
+        :label="$t('mes.padLocks.hardwareName')" 
+        :width="isEnglish ? '140px' : '120px'"
+        align="center" 
+        prop="hardwareName"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.padLocks.lockTypeName')" 
+        :width="isEnglish ? '150px' : '120px'"
+        align="center" 
+        prop="lockTypeName"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.padLocks.lockSpec')" 
+        :width="isEnglish ? '140px' : '120px'"
+        align="center" 
+        prop="lockSpec"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('common.status')" 
+        :width="isEnglish ? '100px' : '80px'"
+        align="center" 
+        prop="exStatus"
+      >
         <template slot-scope="scope">
           <el-switch
             style="pointer-events: none;"
@@ -133,7 +158,13 @@
 <!--          <span>{{ scope.row.remark }}</span>-->
 <!--        </template>-->
 <!--      </el-table-column>-->
-      <el-table-column :label="$t('common.remark')" align="center" prop="exRemark">
+      <el-table-column 
+        :label="$t('common.remark')" 
+        :width="isEnglish ? '150px' : '120px'"
+        align="center" 
+        prop="exRemark"
+        show-overflow-tooltip
+      >
 <!--        <template slot-scope="scope">-->
 <!--          <dict-tag v-if="scope.row.exRemark" :options="dict.type.padlock_reason" :value="scope.row.exRemark"/>-->
 <!--          <span v-else>-</span>-->
@@ -141,9 +172,9 @@
       </el-table-column>
       <el-table-column
         :label="$t('common.createTime')"
+        :width="isEnglish ? '180px' : '160px'"
         align="center"
         prop="createTime"
-        width="180"
       >
         <template slot-scope="scope">
           <span>{{ scope.row.createTime }}</span>
@@ -190,7 +221,7 @@
 
     <!-- 添加或修改设备维修单对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="450px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '120px'">
         <el-form-item :label="$t('mes.padLocks.hardwareName')" prop="hardwareId">
           <el-select
             v-model="form.hardwareId"
@@ -361,6 +392,9 @@ export default {
     };
   },
   computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    },
     rules() {
       return {
         lockCode: [

+ 43 - 8
src/views/mes/hw/rfid/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '140px' : '100px'"
     >
       <el-row>
         <el-form-item :label="$t('mes.rfid.rfidCode')" prop="rfidCode">
@@ -116,12 +116,24 @@
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column
         :label="$t('mes.rfid.rfidCode')"
-        width="150px"
+
         align="center"
         prop="rfidCode"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        :label="$t('mes.rfid.rfidContent')"
+
+        align="center"
+        prop="rfid"
+        show-overflow-tooltip
       />
-      <el-table-column :label="$t('mes.rfid.rfidContent')" align="center" prop="rfid"/>
-      <el-table-column :label="$t('mes.rfid.rfidType')" align="center" prop="rfidType">
+      <el-table-column
+        :label="$t('mes.rfid.rfidType')"
+
+        align="center"
+        prop="rfidType"
+      >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.rfid_token_type" :value="scope.row.rfidType"/>
         </template>
@@ -130,7 +142,12 @@
 
 <!--      </el-table-column>-->
 
-      <el-table-column :label="$t('common.status')" align="center" prop="status">
+      <el-table-column
+        :label="$t('common.status')"
+
+        align="center"
+        prop="status"
+      >
         <template slot-scope="scope">
           <el-switch
             style="pointer-events: none;"
@@ -144,12 +161,25 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('common.remark')" align="center" prop="remark"></el-table-column>
+      <el-table-column
+        :label="$t('common.remark')"
 
-      <el-table-column :label="$t('common.createTime')" align="center" prop="createTime"></el-table-column>
+        align="center"
+        prop="remark"
+        show-overflow-tooltip
+      />
+
+      <el-table-column
+        :label="$t('common.createTime')"
+
+        align="center"
+        prop="createTime"
+        show-overflow-tooltip
+      />
 
       <el-table-column
         :label="$t('common.operation')"
+
         align="center"
         class-name="small-padding fixed-width"
         fixed="right"
@@ -187,7 +217,7 @@
     />
     <!-- 添加或修改设备维修单对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="650px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '120px'">
         <el-row>
           <el-col :span="15">
             <el-form-item :label="$t('mes.rfid.rfidCode')" prop="rfidCode">
@@ -352,6 +382,11 @@ export default {
       EditId: 0, //修改判断
     };
   },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    }
+  },
   created() {
     this.getList();
     this.getOtherList()

+ 10 - 4
src/views/mes/hw/type/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '140px' : '100px'"
     >
       <el-form-item :label="$t('mes.hardwareType.hardwareTypeCode')" prop="hardwareTypeCode">
         <el-input
@@ -78,16 +78,17 @@
     >
       <el-table-column
         :label="$t('mes.hardwareType.hardwareTypeCode')"
-        width="220"
+        :width="isEnglish ? '240px' : '220px'"
         align="center"
         prop="hardwareTypeCode"
+        show-overflow-tooltip
       />
       <el-table-column
         :label="$t('mes.hardwareType.typeName')"
-        width="150px"
+        :width="isEnglish ? '180px' : '150px'"
         align="center"
         prop="hardwareTypeName"
-        :show-overflow-tooltip="true"
+        show-overflow-tooltip
       />
       <el-table-column :label="$t('common.status')" align="center" prop="enableFlag">
         <template slot-scope="scope">
@@ -291,6 +292,11 @@ export default {
       },
     };
   },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    }
+  },
   created() {
     this.getList();
   },

+ 33 - 9
src/views/mes/hw/workCard/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '140px' : '100px'"
     >
       <el-row>
         <el-form-item :label="$t('mes.workCard.cardCode')" prop="cardCode">
@@ -110,13 +110,14 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column
         :label="$t('mes.workCard.cardCode')"
-        width="150px"
+        :width="isEnglish ? '160px' : '150px'"
         align="center"
         prop="cardCode"
+        show-overflow-tooltip
       />
       <el-table-column
         :label="$t('mes.workCard.cardType')"
-        width="180px"
+        :width="isEnglish ? '150px' : '130px'"
         align="center"
         prop="cardType"
       >
@@ -129,13 +130,24 @@
       </el-table-column>
       <el-table-column
         :label="$t('mes.workCard.cardNfc')"
-        width="180px"
+        :width="isEnglish ? '150px' : '130px'"
         align="center"
         prop="cardNfc"
-        :show-overflow-tooltip="true"
+        show-overflow-tooltip
       />
-      <el-table-column :label="$t('mes.workCard.userName')" align="center" prop="userName" />
-      <el-table-column :label="$t('common.status')" align="center" prop="exStatus">
+      <el-table-column 
+        :label="$t('mes.workCard.userName')" 
+        :width="isEnglish ? '150px' : '130px'"
+        align="center" 
+        prop="userName"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('common.status')" 
+        :width="isEnglish ? '100px' : '80px'"
+        align="center" 
+        prop="exStatus"
+      >
         <template slot-scope="scope">
           <el-switch
             style="pointer-events: none;"
@@ -149,7 +161,13 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('common.remark')" align="center" prop="exRemark">
+      <el-table-column 
+        :label="$t('common.remark')" 
+        :width="isEnglish ? '150px' : '120px'"
+        align="center" 
+        prop="exRemark"
+        show-overflow-tooltip
+      >
 <!--        <template slot-scope="scope">-->
 <!--          <dict-tag v-if="scope.row.exRemark" :options="dict.type.job_card_reason" :value="scope.row.exRemark"/>-->
 <!--          <span v-else>-</span>-->
@@ -157,6 +175,7 @@
       </el-table-column>
       <el-table-column
         :label="$t('common.operation')"
+        :width="isEnglish ? '160px' : '140px'"
         align="center"
         class-name="small-padding fixed-width"
         fixed="right"
@@ -195,7 +214,7 @@
 
     <!-- 添加或修改设备维修单对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="450px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '120px'">
         <el-form-item :label="$t('mes.workCard.userName')" prop="userId" style="width: 340px">
           <el-select
             v-model="form.userId"
@@ -369,6 +388,11 @@ export default {
       EditId: 0, //修改判断
     };
   },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    }
+  },
   created() {
     this.getList();
   },

+ 49 - 42
src/views/mes/job/joblist/index.vue

@@ -6,38 +6,38 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '150px' : '100px'"
       @submit.native.prevent
     >
-      <el-form-item label="作业票名称" prop="ticketName">
+      <el-form-item :label="$t('mes.job.ticketName')" prop="ticketName">
         <el-input
           v-model="queryParams.ticketName"
-          placeholder="请输入作业票名称"
+          :placeholder="$t('mes.job.ticketNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
 
-      <el-form-item label="岗位" prop="workstationId">
+      <el-form-item :label="$t('mes.job.workstation')" prop="workstationId">
         <treeselect
           style="width: 218px"
           v-model="queryParams.workstationId"
           :options="marsOptions"
           :normalizer="normalizer"
-          placeholder="选择岗位"
+          :placeholder="$t('mes.job.selectWorkstation')"
         />
       </el-form-item>
-      <el-form-item label="设备/工艺" prop="machineryId">
+      <el-form-item :label="$t('mes.job.machinery')" prop="machineryId">
         <treeselect
           style="width: 218px"
           v-model="queryParams.machineryId"
           :options="TechnologyOptions"
           :normalizer="Technologynormalizer"
-          placeholder="选择设备工艺"
+          :placeholder="$t('mes.job.selectMachinery')"
         />
       </el-form-item>
-      <el-form-item label="状态" prop="ticketStatus">
-        <el-select v-model="queryParams.ticketStatus" placeholder="状态">
+      <el-form-item :label="$t('common.status')" prop="ticketStatus">
+        <el-select v-model="queryParams.ticketStatus" :placeholder="$t('common.status')">
           <el-option
             v-for="dict in dict.type.ticket_status"
             :key="dict.value"
@@ -46,10 +46,10 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="作业类型" prop="ticketType">
+      <el-form-item :label="$t('mes.job.ticketType')" prop="ticketType">
         <el-select
           v-model="queryParams.ticketType"
-          placeholder="请选择作业类型"
+          :placeholder="$t('mes.job.ticketTypePlaceholder')"
         >
           <el-option
             v-for="dict in dict.type.ticket_type"
@@ -59,16 +59,16 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="创建时间">
+      <el-form-item :label="$t('common.createTime')">
         <el-date-picker
           style="width: 218px"
           v-model="createTime"
           type="daterange"
           align="right"
           unlink-panels
-          range-separator="至"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+          :range-separator="$t('common.to')"
+          :start-placeholder="$t('common.startDate')"
+          :end-placeholder="$t('common.endDate')"
           :picker-options="pickerOptions"
         >
         </el-date-picker>
@@ -81,14 +81,14 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索</el-button
+          >{{ $t('common.search') }}</el-button
         >
         <el-button
           v-no-more-click
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-          >重置</el-button
+          >{{ $t('common.reset') }}</el-button
         >
       </el-form-item>
     </el-form>
@@ -103,7 +103,7 @@
           size="mini"
           @click="handleAdd('hasSop')"
           v-hasPermi="['mes:job:jobm:add']"
-          >新增sop作业票
+          >{{ $t('mes.job.addSopTicket') }}
         </el-button>
       </el-col>
       <!--      <el-col :span="1.5">-->
@@ -127,7 +127,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['mes:sop:sopm:batchremove']"
-          >批量删除
+          >{{ $t('common.batchDelete') }}
         </el-button>
       </el-col>
       <right-toolbar
@@ -143,19 +143,19 @@
     >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column
-        label="作业票名称"
+        :label="$t('mes.job.ticketName')"
         align="center"
         prop="ticketName"
         width="350"
       />
-      <el-table-column label="岗位" align="center" prop="workstationName">
+      <el-table-column :label="$t('mes.job.workstation')" align="center" prop="workstationName">
       </el-table-column>
       <el-table-column
-        label="设备工艺"
+        :label="$t('mes.job.machinery')"
         align="center"
         prop="machineryName"
       ></el-table-column>
-      <el-table-column label="状态" align="center" prop="ticketStatus">
+      <el-table-column :label="$t('common.status')" align="center" prop="ticketStatus">
         <template slot-scope="scope">
           <dict-tag
             :options="dict.type.ticket_status"
@@ -163,7 +163,7 @@
           />
         </template>
       </el-table-column>
-      <el-table-column label="作业类型" align="center" prop="ticketType">
+      <el-table-column :label="$t('mes.job.ticketType')" align="center" prop="ticketType">
         <template slot-scope="scope">
           <dict-tag
             :options="dict.type.ticket_type"
@@ -171,12 +171,12 @@
           />
         </template>
       </el-table-column>
-      <el-table-column label="隔离点总数" align="center" prop="pointCount">
+      <el-table-column :label="$t('mes.job.pointCount')" align="center" prop="pointCount">
       </el-table-column>
-      <el-table-column label="创建时间" align="center" prop="createTime">
+      <el-table-column :label="$t('common.createTime')" align="center" prop="createTime">
       </el-table-column>
       <el-table-column
-        label="操作"
+        :label="$t('common.operation')"
         align="center"
         class-name="small-padding fixed-width"
       >
@@ -204,7 +204,7 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:job:jobm:remove']"
-            >删除
+            >{{ $t('common.delete') }}
           </el-button>
         </template>
       </el-table-column>
@@ -283,10 +283,21 @@ export default {
         startTime: "",
         endTime: "",
       },
-      pickerOptions: {
+      // 表单参数
+      form: {},
+      TechnologyOptions: [], //设备工艺查询下拉
+      //
+    };
+  },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en';
+    },
+    pickerOptions() {
+      return {
         shortcuts: [
           {
-            text: "最近一周",
+            text: this.$t('common.lastWeek'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -295,7 +306,7 @@ export default {
             },
           },
           {
-            text: "最近一个月",
+            text: this.$t('common.lastMonth'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -304,7 +315,7 @@ export default {
             },
           },
           {
-            text: "最近三个月",
+            text: this.$t('common.lastThreeMonths'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -313,12 +324,8 @@ export default {
             },
           },
         ],
-      },
-      // 表单参数
-      form: {},
-      TechnologyOptions: [], //设备工艺查询下拉
-      //
-    };
+      };
+    }
   },
   created() {
     this.getList();
@@ -456,7 +463,7 @@ export default {
       this.$router.push({
         name: "NewMarsJob",
       });
-      this.title = "添加隔离点";
+      this.title = this.$t('mes.job.addIsolationPoint');
       this.optType = "add";
       this.setSopLook(false);
       this.setMapData(null);
@@ -482,7 +489,7 @@ export default {
       getJobTicketInfo(teamId).then((response) => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改隔离点信息";
+        this.title = this.$t('mes.job.editIsolationPoint');
         this.optType = "edit";
       });
     },
@@ -512,13 +519,13 @@ export default {
       const ticketNames = row.ticketName || this.codes;
       // '是否确认删除作业票编号为"' + ticketNames + '"的数据项?'
       this.$modal
-        .confirm("是否确认删除所选数据项?")
+        .confirm(this.$t('mes.job.deleteConfirm'))
         .then(function () {
           return deleteIsJobTicket(teamIds);
         })
         .then(() => {
           this.getList();
-          this.$modal.msgSuccess("删除成功");
+          this.$modal.msgSuccess(this.$t('mes.job.deleteSuccess'));
         })
         .catch(() => {});
     },

+ 91 - 89
src/views/mes/job/jobm/NewMarsJob.vue

@@ -1,9 +1,9 @@
 <template>
   <div>
     <el-radio-group v-model="tabPosition" style="margin: 5px">
-      <el-radio-button label="first">选择岗位</el-radio-button>
-      <el-radio-button label="second">选择SOP</el-radio-button>
-      <el-radio-button label="third">作业详情</el-radio-button>
+      <el-radio-button label="first">{{ $t('mes.job.selectWorkstation') }}</el-radio-button>
+      <el-radio-button label="second">{{ $t('mes.job.selectSop') }}</el-radio-button>
+      <el-radio-button label="third">{{ $t('mes.job.jobDetail') }}</el-radio-button>
     </el-radio-group>
     <div
       style="
@@ -138,7 +138,7 @@
       v-show="tabPosition == 'second'"
     >
       <h3 style="margin-left: 20px">{{ this.marsSopTitle }} SOP</h3>
-      <span style="margin-left: 20px">选择 工艺/设备</span>
+      <span style="margin-left: 20px">{{ $t('mes.job.selectMachinery') }}</span>
       <!--      :data="marsSopPage"-->
       <el-table
         style="width: 50%; margin: 20px"
@@ -154,7 +154,7 @@
         <!--          prop="sopName"-->
         <!--        ></el-table-column>-->
         <el-table-column
-          label="设备/工艺名称"
+          :label="$t('mes.job.machineryName')"
           align="center"
           prop="machineryName"
         ></el-table-column>
@@ -164,7 +164,7 @@
         <!--          prop="workstationName"-->
         <!--        ></el-table-column>-->
       </el-table>
-      <h2 style="margin-left: 20px">sop类型</h2>
+      <h2 style="margin-left: 20px">{{ $t('mes.job.sopType') }}</h2>
       <el-radio-group
         v-model="selectedOption"
         size="small"
@@ -186,7 +186,7 @@
         type="primary"
         style="margin-left: 140px"
         @click="handelChange('third')"
-      >开始执行
+      >{{ $t('mes.job.startExecute') }}
       </el-button>
     </div>
     <div
@@ -200,7 +200,7 @@
         <div class="left-top">
           <el-card class="box-card" style="margin: 10px" v-loading="loading">
             <div slot="header" class="clearfix">
-              <span>工艺/设备 工艺图</span>
+              <span>{{ $t('mes.job.machineryDiagram') }}</span>
             </div>
             <img style="margin-left: 25%;width: 200px;height: 230px" :src="this.machineryImg" alt=""/>
           </el-card>
@@ -208,7 +208,7 @@
         <div class="left-bottom">
           <el-card class="box-card" style="height: 102%; margin: 10px" v-loading="loading">
             <div slot="header" class="clearfix">
-              <span>锁定站信息</span>
+              <span>{{ $t('mes.job.lockStationInfo') }}</span>
               <i
                 class="el-icon-search"
                 style="
@@ -259,7 +259,7 @@
 <!--            <span>八大步骤</span>-->
 <!--          </div>-->
           <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick">
-            <el-tab-pane label="八大步骤" name="eightSteps">
+            <el-tab-pane :label="$t('mes.job.eightSteps')" name="eightSteps">
           <div
             style="
               width: 100%;
@@ -274,12 +274,12 @@
                 <div>
                   <!--                  :show-header="false"-->
                   <el-table :data="EightStepForm" style="margin-top: 60px">
-                    <el-table-column label="步骤" prop="stepIndex">
+                    <el-table-column :label="$t('mes.job.step')" prop="stepIndex">
                       <template slot-scope="scope">
-                        <span>第{{ scope.row.stepIndex }}步</span>
+                        <span>{{ $t('mes.job.stepNumber', { step: scope.row.stepIndex }) }}</span>
                       </template>
                     </el-table-column>
-                    <el-table-column label="步骤" prop="number">
+                    <el-table-column :label="$t('mes.job.step')" prop="number">
                       <template slot-scope="scope">
                         <span v-if="scope.row.lockNum !== null">
                           <!--                          <img src="@/assets/images/lockImg.png" alt="" style="width: 12px;height:13px;margin-top: 5px;">-->
@@ -295,7 +295,7 @@
                         </span>
                       </template>
                     </el-table-column>
-                    <el-table-column label="状态" prop="stepStatus">
+                    <el-table-column :label="$t('common.status')" prop="stepStatus">
                       <template slot-scope="scope">
                         <!-- 判断逻辑 -->
                         <span
@@ -312,7 +312,7 @@
                             size="small"
                             @click="addInside(scope.row)"
                           >
-                            分配
+                            {{ $t('mes.job.assign') }}
                           </el-button>
                         </span>
                         <span
@@ -332,7 +332,7 @@
                               background: #6aabfb;
                             "
                           ></span>
-                          <span>已执行</span>
+                          <span>{{ $t('mes.job.executed') }}</span>
                         </span>
 
                         <!-- 其他步骤 -->
@@ -349,7 +349,7 @@
                             size="small"
                             @click="addInside(scope.row)"
                           >
-                            执行
+                            {{ $t('mes.job.execute') }}
                           </el-button>
                         </span>
                         <span
@@ -368,17 +368,17 @@
                               background: #6aabfb;
                             "
                           ></span>
-                          <span>已执行</span>
+                          <span>{{ $t('mes.job.executed') }}</span>
                         </span>
                       </template>
                     </el-table-column>
 
                     <el-table-column
-                      label="内容"
+                      :label="$t('mes.job.content')"
                       prop="stepContent"
                       width="300"
                     ></el-table-column>
-                    <el-table-column label="详情" prop="">
+                    <el-table-column :label="$t('common.detail')" prop="">
                       <template slot-scope="scope">
                         <span
                           v-if="
@@ -391,7 +391,7 @@
                             type="text"
                             size="small"
                             @click="checkDetail(scope.row)"
-                          >查看</el-button
+                          >{{ $t('common.view') }}</el-button
                           >
                         </span>
                       </template>
@@ -402,7 +402,7 @@
             </div>
           </div>
             </el-tab-pane>
-            <el-tab-pane label="作业日志" name="jobLogs">
+            <el-tab-pane :label="$t('mes.job.jobLogs')" name="jobLogs">
               <div class="joblogBox">
               <div class="joblogCon">
                   <!--顶部日志内容-->
@@ -420,7 +420,7 @@
                     style="margin:3px 25px;font-size: 16px"
 
                   >
-                    全部
+                    {{ $t('mes.job.all') }}
                   </el-checkbox>
 
                   <!-- 多选项 -->
@@ -444,14 +444,14 @@
             </el-tab-pane>
           </el-tabs>
           <el-button style="float: right" type="primary" @click="finshJobticket"  :disabled="operationTypeVisible"
-          >结束作业
+          >{{ $t('mes.job.finishJob') }}
           </el-button>
           <el-button
             style="float: right; margin-right: 10px"
             type="danger"
             :disabled="operationTypeVisible"
             @click="cancelJobticket"
-          >取消作业
+          >{{ $t('mes.job.cancelJob') }}
           </el-button>
         </el-card>
       </div>
@@ -459,7 +459,7 @@
     <!-- 作业日志检索内容中未选中类型的新消息-->
     <el-dialog
       :visible.sync="JoblogdialogVisible"
-      title="新日志提醒"
+      :title="$t('mes.job.newLogReminder')"
       width="50%"
       :close-on-click-modal="true"
     >
@@ -473,7 +473,7 @@
     <el-dialog :visible.sync="open" width="1400px" append-to-body>
       <div slot="title" class="dialog-title">
         <i></i>
-        <span class="title">添加人员</span>
+        <span class="title">{{ $t('mes.job.addPerson') }}</span>
       </div>
       <el-form
         ref="dialogForm"
@@ -482,10 +482,10 @@
         label-width="70px"
       >
         <el-row>
-          <el-form-item label="上锁人" prop="locker">
+          <el-form-item :label="$t('mes.job.locker')" prop="locker">
             <el-select
               v-model="dialogForm.locker"
-              placeholder="上锁人"
+              :placeholder="$t('mes.job.locker')"
               clearable
               style="width: 230px"
               @change="handlelockerChage"
@@ -503,20 +503,20 @@
 
         <el-row style="display: flex; justify-content: space-between">
           <el-col :span="7">
-            <h3>选中人员列表</h3>
+            <h3>{{ $t('mes.job.selectedPersonList') }}</h3>
             <el-table :data="AllUserTable" stripe height="400">
               <!--              <el-table-column type="selection" width="55" align="center"/>-->
               <!--            <el-table-column prop="userId" label="外部人员Id">-->
               <!--            </el-table-column>-->
-              <el-table-column prop="userName" label="姓名">
+              <el-table-column prop="userName" :label="$t('mes.job.name')">
                 <template slot-scope="scope">
                   <span style="color: #2a87ff">{{ scope.row.userName }}</span>
                 </template>
               </el-table-column>
-              <el-table-column prop="userType" label="来源">
+              <el-table-column prop="userType" :label="$t('mes.job.source')">
                 <template slot-scope="scope">
                   <span style="color: #2a87ff">{{
-                      scope.row.userType == '0' ? '内部' : '外部'
+                      scope.row.userType == '0' ? $t('mes.job.internal') : $t('mes.job.external')
                     }}</span>
                 </template>
               </el-table-column>
@@ -538,7 +538,7 @@
           </el-col>
           <!--         内部共锁人-->
           <el-col :span="7">
-            <h3>内部共锁人列表</h3>
+            <h3>{{ $t('mes.job.internalColockerList') }}</h3>
             <el-table
               :data="insideTableData"
               stripe
@@ -553,18 +553,18 @@
               <el-table-column type="selection" width="55" align="center"/>
               <el-table-column
                 prop="userId"
-                label="内部人员Id"
+                :label="$t('mes.job.internalPersonId')"
               ></el-table-column>
-              <el-table-column prop="nickName" label="姓名">
+              <el-table-column prop="nickName" :label="$t('mes.job.name')">
                 <template slot-scope="scope">
                   <span style="color: #2a87ff">{{ scope.row.nickName }}</span>
                 </template>
               </el-table-column>
               <!-- 添加搜索条件的列 -->
-              <el-table-column label="搜索">
+              <el-table-column :label="$t('common.search')">
                 <template slot="header">
                   <el-input
-                    placeholder="搜索姓名"
+                    :placeholder="$t('mes.job.searchName')"
                     v-model="insideSearchQuery"
                     size="small"
                     @input="filterInsideTable"
@@ -576,7 +576,7 @@
           </el-col>
 
           <el-col :span="7">
-            <h3>外部共锁人列表</h3>
+            <h3>{{ $t('mes.job.externalColockerList') }}</h3>
             <el-table
               :data="outsideTableData"
               stripe
@@ -591,18 +591,18 @@
               <el-table-column type="selection" width="55" align="center"/>
               <el-table-column
                 prop="userId"
-                label="外部人员Id"
+                :label="$t('mes.job.externalPersonId')"
               ></el-table-column>
-              <el-table-column prop="nickName" label="姓名">
+              <el-table-column prop="nickName" :label="$t('mes.job.name')">
                 <template slot-scope="scope">
                   <span style="color: #2a87ff">{{ scope.row.nickName }}</span>
                 </template>
               </el-table-column>
               <!-- 添加搜索条件的列 -->
-              <el-table-column label="搜索">
+              <el-table-column :label="$t('common.search')">
                 <template slot="header">
                   <el-input
-                    placeholder="搜索姓名"
+                    :placeholder="$t('mes.job.searchName')"
                     v-model="outsideSearchQuery"
                     size="small"
                     @input="filterOutsideTable"
@@ -616,9 +616,9 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-no-more-click type="primary" @click="confirmAddUser"
-        >确认
+        >{{ $t('common.confirm') }}
         </el-button>
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
 
@@ -627,18 +627,18 @@
       <el-row>
         <el-card class="box-cardStatus">
           <div slot="header" class="clearfix">
-            <span style="font-weight: bolder">作业状态</span>
+            <span style="font-weight: bolder">{{ $t('mes.job.jobStatus') }}</span>
           </div>
           <el-table
             :data="jobTicket"
             :header-cell-style="{ 'text-align': 'center' }"
             :cell-style="{ 'text-align': 'center' }"
           >
-            <el-table-column label="作业编号" prop="ticketId">
+            <el-table-column :label="$t('mes.job.ticketId')" prop="ticketId">
             </el-table-column>
-            <el-table-column label="作业名称" prop="ticketName">
+            <el-table-column :label="$t('mes.job.ticketName')" prop="ticketName">
             </el-table-column>
-            <el-table-column label="状态" align="center" prop="ticketStatus">
+            <el-table-column :label="$t('common.status')" align="center" prop="ticketStatus">
               <template slot-scope="scope">
                 <dict-tag
                   :options="dict.type.ticket_status"
@@ -646,9 +646,9 @@
                 />
               </template>
             </el-table-column>
-            <el-table-column label="上锁钥匙" prop="lockKeyName">
+            <el-table-column :label="$t('mes.job.lockKey')" prop="lockKeyName">
             </el-table-column>
-            <el-table-column label="解锁钥匙" prop="colockKeyName">
+            <el-table-column :label="$t('mes.job.unlockKey')" prop="colockKeyName">
             </el-table-column>
           </el-table>
         </el-card>
@@ -657,11 +657,11 @@
         <el-col :span="7" style="height: 400px">
           <el-card class="box-card1">
             <div slot="header" class="clearfix">
-              <span style="font-weight: bolder">人员状态</span>
+              <span style="font-weight: bolder">{{ $t('mes.job.personStatus') }}</span>
             </div>
             <el-table :data="lockUserList">
-              <el-table-column label="上锁人" prop="userName"></el-table-column>
-              <el-table-column label="状态" align="center" prop="jobStatus">
+              <el-table-column :label="$t('mes.job.locker')" prop="userName"></el-table-column>
+              <el-table-column :label="$t('common.status')" align="center" prop="jobStatus">
                 <template slot-scope="scope">
                   <div
                     class="box"
@@ -700,8 +700,8 @@
           </el-card>
           <el-card class="box-cardgsr">
             <el-table :data="colockUserList">
-              <el-table-column label="共锁人" prop="userName"></el-table-column>
-              <el-table-column label="状态" align="center" prop="jobStatus">
+              <el-table-column :label="$t('mes.job.colocker')" prop="userName"></el-table-column>
+              <el-table-column :label="$t('common.status')" align="center" prop="jobStatus">
                 <template slot-scope="scope">
                   <div
                     class="box"
@@ -742,12 +742,12 @@
         <el-col :span="6">
           <el-card class="box-card2">
             <div slot="header" class="clearfix">
-              <span style="font-weight: bolder">隔离点状态</span>
+              <span style="font-weight: bolder">{{ $t('mes.job.isolationPointStatus') }}</span>
             </div>
             <el-table :data="ticketPointsList">
-              <el-table-column label="隔离点" prop="pointName" width="80">
+              <el-table-column :label="$t('mes.job.isolationPoint')" prop="pointName" width="80">
               </el-table-column>
-              <el-table-column label="状态" align="center" prop="pointStatus">
+              <el-table-column :label="$t('common.status')" align="center" prop="pointStatus">
                 <template slot-scope="scope">
                   <div
                     class="box"
@@ -775,10 +775,10 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column label="挂锁名称" prop="lockName">
+              <el-table-column :label="$t('mes.job.padlockName')" prop="lockName">
               </el-table-column>
               <el-table-column
-                label="锁具机构"
+                :label="$t('mes.job.lockset')"
                 prop="locksetName"
               ></el-table-column>
             </el-table>
@@ -786,23 +786,23 @@
         </el-col>
       </el-row>
       <div slot="footer" class="dialog-footer">
-        <el-button v-no-more-click @click="cancel">关 闭</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.close') }}</el-button>
       </div>
     </el-dialog>
 
     <!--    第八步查看影响作业票-->
     <el-dialog
       :visible.sync="EightDetailvisible"
-      title="受影响作业票"
+      :title="$t('mes.job.affectedTickets')"
       width="650px"
       append-to-body
     >
       <el-table :data="AffectedTickets">
-        <el-table-column label="作业票编号" prop="ticketId"></el-table-column>
-        <el-table-column label="作业票名称" prop="ticketName" width="220">
+        <el-table-column :label="$t('mes.job.ticketId')" prop="ticketId"></el-table-column>
+        <el-table-column :label="$t('mes.job.ticketName')" prop="ticketName" width="220">
         </el-table-column>
 
-        <el-table-column label="作业票状态" prop="ticketStatus">
+        <el-table-column :label="$t('mes.job.ticketStatus')" prop="ticketStatus">
           <template slot-scope="scope">
             <dict-tag
               :options="dict.type.ticket_status"
@@ -810,7 +810,7 @@
             />
           </template>
         </el-table-column>
-        <el-table-column label="作业票类型" prop="ticketType">
+        <el-table-column :label="$t('mes.job.ticketType')" prop="ticketType">
           <template slot-scope="scope">
             <dict-tag
               :options="dict.type.sop_type"
@@ -821,14 +821,14 @@
       </el-table>
 
       <div slot="footer" class="dialog-footer">
-        <el-button v-no-more-click @click="cancel">关 闭</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.close') }}</el-button>
       </div>
     </el-dialog>
 
     <!--    锁定站放大按钮呈现diaolog-->
     <el-dialog
       :visible.sync="LockDetailvisible"
-      title="锁定站信息"
+      :title="$t('mes.job.lockStationInfo')"
       width="1200px"
       append-to-body
       class="elDialog"
@@ -839,11 +839,11 @@
             <el-table :data="selectPointList" :show-header="false" style="width: 200px;height: 175px;">
               <el-table-column
                 prop="entityName"
-                label="隔离点名称"
+                :label="$t('mes.job.isolationPointName')"
               ></el-table-column>
               <el-table-column
                 prop="remark"
-                label="作用"
+                :label="$t('mes.job.function')"
               ></el-table-column>
             </el-table>
           </div>
@@ -858,31 +858,31 @@
     <!--    地图数字打开正在执行作业票页面-->
     <el-dialog
       :visible.sync="ticketVisible"
-      :title="`${currentWorkstationName} 进行中的作业`"
+      :title="$t('mes.job.ongoingJobs', { workstation: currentWorkstationName })"
       width="700px"
       append-to-body
       class="elDialog"
     >
       <el-table :data="TicketListPage[currentWorkstationId] || []">
-        <el-table-column label="岗位" prop="workstationId" width="70">
+        <el-table-column :label="$t('mes.job.workstation')" prop="workstationId" width="70">
           <template slot-scope="scope">
             {{ currentWorkstationName }}
           </template>
         </el-table-column>
-        <el-table-column label="编号" prop="ticketName" width="50">
+        <el-table-column :label="$t('mes.job.number')" prop="ticketName" width="50">
           <template slot-scope="scope" style="width: 50px">
             {{ scope.$index + 1 }}
           </template>
         </el-table-column>
-        <el-table-column label="图标" prop="ticketType" width="100">
+        <el-table-column :label="$t('mes.job.icon')" prop="ticketType" width="100">
           <template slot-scope="scope">
             <img :src="imageMap[scope.row.ticketType]" style="width:30px;height:30px"/>
           </template>
         </el-table-column>
-        <el-table-column label="作业票名称" prop="ticketName"></el-table-column>
-        <el-table-column label="操作" width="80">
+        <el-table-column :label="$t('mes.job.ticketName')" prop="ticketName"></el-table-column>
+        <el-table-column :label="$t('common.operation')" width="80">
           <template slot-scope="scope">
-            <el-button type="text" @click="handleTicketClick(scope.row)">查看</el-button>
+            <el-button type="text" @click="handleTicketClick(scope.row)">{{ $t('common.view') }}</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -987,11 +987,6 @@ export default {
       sopTypeOption: [],
       sopId: null,
       workstationId: null, //岗位Id
-      rules: {
-        locker: [
-          { required: true, message: '上锁人不能为空', trigger: 'change' }
-        ]
-      },
       tableVisible: true, //表格显示
       LockDetailvisible: false, //锁定站详情'
       deptXLGPosition: {
@@ -1027,6 +1022,13 @@ export default {
       const stepFour = this.EightStepForm.find((step) => step.stepIndex == '4')
       return stepFour && stepFour.stepStatus === '1'
     },
+    rules() {
+      return {
+        locker: [
+          { required: true, message: this.$t('mes.job.lockerRequired'), trigger: 'change' }
+        ]
+      };
+    }
   },
   watch: {
     tabPosition: function(val, oldVal) {
@@ -1301,7 +1303,7 @@ export default {
         // })
       }
       if (!this.sopId && val == 'third') {
-        this.$message.error('请先选择对应设备工艺或sop类型')
+        this.$message.error(this.$t('mes.job.selectMachineryOrSopType'))
         return
       }
       this.tabPosition = val
@@ -1315,7 +1317,7 @@ export default {
           }
           addJobTicket(data).then((res) => {
             console.log(res, '作业票新增')
-            this.$message.success('作业开始执行')
+            this.$message.success(this.$t('mes.job.jobStartExecute'))
             this.ticketId = res.data
             getStepInfo(this.ticketId).then((res) => {
               this.EightStepForm = res.data
@@ -1457,7 +1459,7 @@ export default {
           stepStatus: '1'
         }
         updateJobStep(data).then((res) => {
-          this.$message.success('执行成功')
+          this.$message.success(this.$t('mes.job.executeSuccess'))
           getStepInfo(this.ticketId).then((res) => {
             this.EightStepForm = res.data
             console.log(res, '作业票-详细信息')
@@ -1565,7 +1567,7 @@ export default {
           addJobUsers(data).then((res) => {
             console.log(res, '添加人员')
             if (res.data) {
-              this.$message.success('分配人员成功')
+              this.$message.success(this.$t('mes.job.assignPersonSuccess'))
               this.open = false
               this.AllUserTable = []
               this.dialogForm.locker = ''
@@ -1605,7 +1607,7 @@ export default {
       updateJobToFinish(data).then((res) => {
         console.log(res, '结束作业票')
         if (res.data) {
-          this.$message.success('作业票结束')
+          this.$message.success(this.$t('mes.job.jobTicketFinished'))
           this.tabPosition = 'first'
           this.getList()
         }
@@ -1619,7 +1621,7 @@ export default {
       updateJobToCancel(data).then((res) => {
         console.log(res, '取消作业票')
         if (res.data) {
-          this.$message.success('作业票取消')
+          this.$message.success(this.$t('mes.job.jobTicketCancelled'))
           this.tabPosition = 'first'
           this.getList()
         }

+ 45 - 27
src/views/mes/job/jobplay/index.vue

@@ -6,20 +6,20 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '140px' : '100px'"
     >
-      <el-form-item label="作业编号" prop="ticketId">
+      <el-form-item :label="$t('mes.job.ticketId')" prop="ticketId">
         <el-input
           v-model="queryParams.ticketId"
-          placeholder="请输入作业编号"
+          :placeholder="$t('mes.job.ticketIdPlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="作业名称" prop="ticketName">
+      <el-form-item :label="$t('mes.job.ticketName')" prop="ticketName">
         <el-input
           v-model="queryParams.ticketName"
-          placeholder="请输入作业名称"
+          :placeholder="$t('mes.job.ticketNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -41,14 +41,14 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索</el-button
+          >{{ $t('common.search') }}</el-button
         >
         <el-button
           v-no-more-click
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-          >重置</el-button
+          >{{ $t('common.reset') }}</el-button
         >
       </el-form-item>
     </el-form>
@@ -59,17 +59,19 @@
     >
       <el-table-column type="selection" width="70" align="center" />
       <el-table-column
-        label="作业编号"
+        :label="$t('mes.job.ticketId')"
+        
         align="center"
         prop="ticketId"
-        width="200"
+        show-overflow-tooltip
       >
       </el-table-column>
       <el-table-column
-        label="作业名称"
+        :label="$t('mes.job.ticketName')"
+     
         align="center"
         prop="ticketName"
-        width="200"
+        show-overflow-tooltip
       />
 <!--      <el-table-column-->
 <!--        label="作业区域"-->
@@ -78,11 +80,15 @@
 <!--        width="200"-->
 <!--      />-->
       <!-- 上锁状态 -->
-      <el-table-column label="上锁状态" align="center" width="230">
+      <el-table-column 
+        :label="$t('mes.job.lockStatus')" 
+      
+        align="center"
+      >
         <template slot-scope="scope">
           <div
             class="status-container"
-            style="width: 100%; height: 100%; display: flex; tetx-align: center"
+            style="width: 100%; height: 100%; display: flex; text-align: center"
           >
             <!-- 渲染 lockNum 框子 -->
             <div
@@ -116,7 +122,11 @@
       </el-table-column>
 
       <!-- 共锁状态 -->
-      <el-table-column label="共锁状态" align="center" width="500">
+      <el-table-column 
+        :label="$t('mes.job.colockStatus')" 
+      
+        align="center"
+      >
         <template slot-scope="scope">
           <div
             class="status-container"
@@ -162,7 +172,8 @@
       </el-table-column>
 
       <el-table-column
-        label="操作"
+        :label="$t('common.operation')"
+       
         align="center"
         class-name="small-padding fixed-width"
       >
@@ -174,7 +185,7 @@
             icon="el-icon-view"
             @click="handleLook(scope.row)"
             v-hasPermi="['mes:job:jobplay:view']"
-            >详情
+            >{{ $t('common.detail') }}
           </el-button>
         </template>
       </el-table-column>
@@ -250,10 +261,22 @@ export default {
         startTime: "",
         endTime: "",
       },
-      pickerOptions: {
+
+      // 表单参数
+      form: {},
+      //
+      isFetching: false, // 标志位,控制接口请求是否已经执行过
+    };
+  },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    },
+    pickerOptions() {
+      return {
         shortcuts: [
           {
-            text: "最近一周",
+            text: this.$t('common.lastWeek'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -262,7 +285,7 @@ export default {
             },
           },
           {
-            text: "最近一个月",
+            text: this.$t('common.lastMonth'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -271,7 +294,7 @@ export default {
             },
           },
           {
-            text: "最近三个月",
+            text: this.$t('common.lastThreeMonths'),
             onClick(picker) {
               const end = new Date();
               const start = new Date();
@@ -280,13 +303,8 @@ export default {
             },
           },
         ],
-      },
-
-      // 表单参数
-      form: {},
-      //
-      isFetching: false, // 标志位,控制接口请求是否已经执行过
-    };
+      };
+    }
   },
   created() {
     this.getList();

+ 85 - 15
src/views/mes/material/Inspectionrecords/index.vue

@@ -6,13 +6,14 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '180px' : '100px'"
       @submit.native.prevent
     >
       <el-form-item :label="$t('mes.inspectionRecord.planName')" prop="planName">
         <el-input
           v-model="queryParams.planName"
           :placeholder="$t('mes.inspectionRecord.planNamePlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -23,6 +24,7 @@
           :disabled="visibleSelect"
           v-model="queryParams.cabinetId"
           :placeholder="$t('mes.inspectionRecord.cabinetPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
         >
           <el-option
@@ -37,13 +39,14 @@
         <el-input
           v-model="queryParams.materialsName"
           :placeholder="$t('mes.inspectionRecord.materialsNamePlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
       <el-form-item :label="$t('mes.inspectionRecord.materialsType')" prop="materialsTypeId">
         <treeselect
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           v-model="queryParams.materialsTypeId"
           :options="materialstypeOptions"
           :normalizer="materialnormalizer"
@@ -54,13 +57,14 @@
         <el-input
           v-model="queryParams.materialsRfid"
           :placeholder="$t('mes.inspectionRecord.rfidPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
       <el-form-item :label="$t('mes.inspectionRecord.checkTime')">
         <el-date-picker
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           :default-time="['00:00:00', '23:59:59']"
           v-model="createTime"
           type="datetimerange"
@@ -85,7 +89,11 @@
 
 
       <el-form-item :label="$t('mes.inspectionRecord.checkResult')" prop="status">
-        <el-select v-model="queryParams.status" :placeholder="$t('mes.inspectionRecord.checkResult')">
+        <el-select 
+          v-model="queryParams.status" 
+          :placeholder="$t('mes.inspectionRecord.checkResult')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
+        >
           <el-option
             v-for="dict in dict.type.checks_status"
             :key="dict.value"
@@ -95,7 +103,11 @@
         </el-select>
       </el-form-item>
       <el-form-item :label="$t('mes.inspectionRecord.exceptionReason')" prop="reason">
-        <el-select v-model="queryParams.reason" :placeholder="$t('common.status')">
+        <el-select 
+          v-model="queryParams.reason" 
+          :placeholder="$t('common.status')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
+        >
           <el-option
             v-for="dict in dict.type.exceptions_status"
             :key="dict.value"
@@ -170,22 +182,53 @@
       @selection-change="handleSelectionChange"
     >
       <!--      <el-table-column type="selection" width="55" align="center"/>-->
-      <el-table-column :label="$t('mes.inspectionRecord.planName')" align="center" prop="planName" width="200">
+      <el-table-column 
+        :label="$t('mes.inspectionRecord.planName')" 
+        align="center" 
+        prop="planName"
+        :width="isEnglish ? '200px' : '180px'"
+        show-overflow-tooltip
+      >
         <template slot-scope="scope">
           <span v-if="scope.row.planName">{{scope.row.planName}}</span>
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionRecord.cabinet')" align="center" prop="cabinetName">
+      <el-table-column 
+        :label="$t('mes.inspectionRecord.cabinet')" 
+        align="center" 
+        prop="cabinetName"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionRecord.materialsId')" align="center" prop="materialsId">
+      <el-table-column 
+        :label="$t('mes.inspectionRecord.materialsId')" 
+        align="center" 
+        prop="materialsId"
+        :width="isEnglish ? '150px' : '130px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionRecord.materialsName')" align="center" prop="materialsName"/>
-      <el-table-column :label="$t('mes.inspectionRecord.materialsType')" align="center" prop="materialsTypeName"/>
+      <el-table-column 
+        :label="$t('mes.inspectionRecord.materialsName')" 
+        align="center" 
+        prop="materialsName"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.inspectionRecord.materialsType')" 
+        align="center" 
+        prop="materialsTypeName"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
+      />
       <el-table-column
         :label="$t('mes.inspectionRecord.materialsPicture')"
         align="center"
         prop="materialsTypePicture"
+        :width="isEnglish ? '130px' : '100px'"
       >
         <template slot-scope="scope">
           <img
@@ -197,7 +240,13 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionRecord.rfid')" align="center" prop="materialsRfid">
+      <el-table-column 
+        :label="$t('mes.inspectionRecord.rfid')" 
+        align="center" 
+        prop="materialsRfid"
+        :width="isEnglish ? '150px' : '130px'"
+        show-overflow-tooltip
+      >
         <template slot-scope="scope">
           <span v-if="scope.row.materialsRfid">{{scope.row.materialsRfid}}</span>
           <span v-else>-</span>
@@ -207,18 +256,29 @@
         :label="$t('mes.inspectionRecord.checkTime')"
         align="center"
         prop="createTime"
-        width="250"
+        :width="isEnglish ? '250px' : '200px'"
       >
         <template slot-scope="scope">
           {{ scope.row.createTime }}
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionRecord.checkResult')" align="center" prop="status">
+      <el-table-column 
+        :label="$t('mes.inspectionRecord.checkResult')" 
+        align="center" 
+        prop="status"
+        :width="isEnglish ? '140px' : '120px'"
+      >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.checks_status" :value="scope.row.status"/>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionRecord.exceptionReason')" align="center" prop="reason">
+      <el-table-column 
+        :label="$t('mes.inspectionRecord.exceptionReason')" 
+        align="center" 
+        prop="reason"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
+      >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.exceptions_status" :value="scope.row.reason" v-if="scope.row.reason!=='0'"/>
           <span v-else>-</span>
@@ -228,13 +288,20 @@
         :label="$t('mes.inspectionRecord.measure')"
         align="center"
         prop="measure"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
       >
         <template slot-scope="scope">
          <span v-if="scope.row.measure">{{scope.row.measure}}</span>
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionRecord.replacementRecord')" align="center" prop="status">
+      <el-table-column 
+        :label="$t('mes.inspectionRecord.replacementRecord')" 
+        align="center" 
+        prop="status"
+        :width="isEnglish ? '160px' : '140px'"
+      >
         <template slot-scope="scope">
           <el-button type="text" @click="goto(scope.row)">{{ $t('common.view') }}</el-button>
         </template>
@@ -364,6 +431,9 @@ export default {
     }
   },
   computed: {
+    isEnglish() {
+      return this.$i18n.locale === 'en'
+    },
     pickerOptions() {
       return {
         shortcuts: [

+ 74 - 15
src/views/mes/material/collectionmanagement/index.vue

@@ -6,14 +6,14 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '180px' : '100px'"
       @submit.native.prevent
     >
       <el-row>
         <el-form-item :label="$t('mes.collectionManagement.cabinet')" prop="loanFromId">
           <el-select
             :disabled="visibleSelect"
-            style="width: 215px"
+            :style="{ width: isEnglish ? '240px' : '215px' }"
             v-model="queryParams.loanFromId"
             :placeholder="$t('mes.collectionManagement.cabinetPlaceholder')"
             clearable
@@ -30,13 +30,14 @@
           <el-input
             v-model="queryParams.materialsName"
             :placeholder="$t('mes.collectionManagement.materialsNamePlaceholder')"
+            :style="{ width: isEnglish ? '240px' : '215px' }"
             clearable
             @keyup.enter.native="handleQuery"
           />
         </el-form-item>
         <el-form-item :label="$t('mes.collectionManagement.materialsType')" prop="materialsTypeId">
           <treeselect
-            style="width: 215px"
+            :style="{ width: isEnglish ? '240px' : '215px' }"
             v-model="queryParams.materialsTypeId"
             :options="machinerytypeOptions"
             :normalizer="normalizer"
@@ -47,13 +48,14 @@
           <el-input
             v-model="queryParams.loanUserName"
             :placeholder="$t('mes.collectionManagement.loanUserPlaceholder')"
+            :style="{ width: isEnglish ? '240px' : '215px' }"
             clearable
             @keyup.enter.native="handleQuery"
           />
         </el-form-item>
         <el-form-item :label="$t('mes.collectionManagement.loanTime')" prop="">
           <el-date-picker
-            style="width: 210px"
+            :style="{ width: isEnglish ? '240px' : '210px' }"
             :default-time="['00:00:00', '23:59:59']"
             v-model="loanTime"
             type="datetimerange"
@@ -70,13 +72,14 @@
           <el-input
             v-model="queryParams.restitutionUserName"
             :placeholder="$t('mes.collectionManagement.restitutionUserPlaceholder')"
+            :style="{ width: isEnglish ? '240px' : '215px' }"
             clearable
             @keyup.enter.native="handleQuery"
           />
         </el-form-item>
         <el-form-item :label="$t('mes.collectionManagement.restitutionTime')" prop="">
           <el-date-picker
-            style="width: 215px"
+            :style="{ width: isEnglish ? '240px' : '215px' }"
             :default-time="['00:00:00', '23:59:59']"
             v-model="restitutionTime"
             type="datetimerange"
@@ -90,7 +93,11 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item :label="$t('common.status')" prop="status">
-          <el-select v-model="queryParams.status" :placeholder="$t('common.status')">
+          <el-select 
+            v-model="queryParams.status" 
+            :placeholder="$t('common.status')"
+            :style="{ width: isEnglish ? '240px' : '215px' }"
+          >
             <el-option
               v-for="dict in dict.type.record_of_collection"
               :key="dict.value"
@@ -167,18 +174,38 @@
         :label="$t('mes.collectionManagement.cabinet')"
         align="center"
         prop="loanFromName"
+       
+        show-overflow-tooltip
       >
       </el-table-column>
-      <el-table-column :label="$t('mes.collectionManagement.materialsId')" align="center" prop="materialsId">
+      <el-table-column 
+        :label="$t('mes.collectionManagement.materialsId')" 
+        align="center" 
+        prop="materialsId"
+        :width="isEnglish ? '150px' : '130px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.collectionManagement.materialsName')" align="center" prop="materialsName" />
+      <el-table-column 
+        :label="$t('mes.collectionManagement.materialsName')" 
+        align="center" 
+        prop="materialsName"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
+      />
       <el-table-column
         :label="$t('mes.collectionManagement.materialsType')"
         align="center"
         prop="materialsTypeName"
-        width="180"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
       />
-      <el-table-column :label="$t('mes.collectionManagement.materialsPicture')" prop="materialsTypePicture" width="90">
+      <el-table-column 
+        :label="$t('mes.collectionManagement.materialsPicture')" 
+        prop="materialsTypePicture" 
+        :width="isEnglish ? '150px' : '100px'"
+        align="center"
+      >
         <template slot-scope="scope">
           <div class="img-box" v-if="scope.row.materialsTypePicture">
             <el-image
@@ -198,19 +225,48 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.collectionManagement.loanUser')" align="center" prop="loanUserName">
+      <el-table-column 
+        :label="$t('mes.collectionManagement.loanUser')" 
+        align="center" 
+        prop="loanUserName"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.collectionManagement.loanTime')" align="center" prop="loanTime" />
-      <el-table-column :label="$t('mes.collectionManagement.restitutionUser')" align="center" prop="restitutionUserName">
+      <el-table-column 
+        :label="$t('mes.collectionManagement.loanTime')" 
+        align="center" 
+        prop="loanTime"
+        :width="isEnglish ? '180px' : '160px'"
+      />
+      <el-table-column 
+        :label="$t('mes.collectionManagement.restitutionUser')" 
+        align="center" 
+        prop="restitutionUserName"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
       <!--      实际归还时间-->
       <el-table-column
         :label="$t('mes.collectionManagement.restitutionTime')"
         align="center"
         prop="actualRestitutionTime"
+        :width="isEnglish ? '180px' : '160px'"
+      />
+      <el-table-column 
+        :label="$t('mes.collectionManagement.loanDuration')" 
+        align="center" 
+        prop="loanDuration"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
       />
-      <el-table-column :label="$t('mes.collectionManagement.loanDuration')" align="center" prop="loanDuration" />
-      <el-table-column :label="$t('common.status')" align="center" prop="status">
+      <el-table-column 
+        :label="$t('common.status')" 
+        align="center" 
+        prop="status"
+        :width="isEnglish ? '120px' : '100px'"
+      >
         <template slot-scope="scope">
           <dict-tag
             :options="dict.type.record_of_collection"
@@ -344,6 +400,9 @@ export default {
     };
   },
   computed: {
+    isEnglish() {
+      return this.$i18n.locale === 'en'
+    },
     pickerOptions() {
       return {
         shortcuts: [

+ 166 - 44
src/views/mes/material/inspectionplan/index.vue

@@ -6,13 +6,14 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="90px"
+      :label-width="isEnglish ? '180px' : '90px'"
       @submit.native.prevent
     >
       <el-form-item :label="$t('mes.inspectionPlan.planName')" prop="planName" v-if="!visibleSelect">
         <el-input
           v-model="queryParams.planName"
           :placeholder="$t('mes.inspectionPlan.planNamePlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -21,6 +22,7 @@
         <el-select
           v-model="queryParams.cabinetId"
           :placeholder="$t('mes.inspectionPlan.cabinetPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           :disabled="visibleSelect"
         >
@@ -34,6 +36,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.inspectionPlan.planDate')">
         <el-date-picker
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           :default-time="['00:00:00', '23:59:59']"
           v-model="createTime"
           type="datetimerange"
@@ -50,6 +53,7 @@
         <el-select
           v-model="queryParams.checkUserName"
           :placeholder="$t('mes.inspectionPlan.checkUserPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
         >
           <el-option
@@ -61,7 +65,11 @@
         </el-select>
       </el-form-item>
       <el-form-item :label="$t('common.status')" prop="status">
-        <el-select v-model="queryParams.status" :placeholder="$t('common.status')">
+        <el-select 
+          v-model="queryParams.status" 
+          :placeholder="$t('common.status')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
+        >
           <el-option
             v-for="dict in dict.type.checking_status"
             :key="dict.value"
@@ -86,11 +94,6 @@
           @click="resetQuery"
         >{{ $t('common.reset') }}
         </el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
         <el-button
           v-no-more-click
           type="primary"
@@ -101,7 +104,13 @@
           v-hasPermi="['iscs:plan:add']"
         >{{ $t('common.add') }}
         </el-button>
-      </el-col>
+      </el-form-item>
+    </el-form>
+    <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+   
       <!--       <el-col :span="1.5">-->
       <!--        <el-button-->
       <!--          v-no-more-click-->
@@ -115,26 +124,21 @@
       <!--          >批量删除-->
       <!--        </el-button>-->
       <!--      </el-col>-->
-
-      <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar>
-    </el-row>
     <!--    自动配置检查计划开始-->
     <el-row :gutter="10" class="mb8">
-      <el-form label-width="70px">
-        <el-col :span="2" style="margin-top: 8px">
+      <el-form :label-width="isEnglish ? '160px' : '70px'">
+        <el-col :span="isEnglish ? 3 : 2" style="margin-top: 8px">
           <el-checkbox style="transform: scale(1.5);" v-model="autoConfig.startStatus" @change="handleClickStatus"
           ></el-checkbox>
           <span style="margin-left: 6%;">{{ $t('mes.inspectionPlan.enableAutoCreate') }}</span>
         </el-col>
-        <el-col :span="4">
+        <el-col :span="isEnglish ? 5 : 4">
           <el-form-item :label="$t('mes.inspectionPlan.planFrequency')">
             <el-select
               :disabled="!autoConfig.startStatus"
               v-model="autoConfig.planFrequency"
               :placeholder="$t('mes.inspectionPlan.planFrequencyPlaceholder')"
+              :style="{ width: isEnglish ? '240px' : '180px' }"
               clearable
               @change="handleFrequencyChange"
             >
@@ -149,12 +153,13 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="4">
+        <el-col :span="isEnglish ? 5 : 4">
           <el-form-item :label="$t('mes.inspectionPlan.planDate')">
             <el-select
               :disabled="!autoConfig.startStatus"
               v-model="autoConfig.planDate"
               :placeholder="$t('mes.inspectionPlan.planDateSelectPlaceholder')"
+              :style="{ width: isEnglish ? '240px' : '180px' }"
               clearable
               @change="handleClickAuto"
             >
@@ -167,12 +172,13 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="5.5">
+        <el-col :span="isEnglish ? 6 : 5.5">
           <el-form-item :label="$t('mes.inspectionPlan.checkUser')">
             <el-select
               :disabled="!autoConfig.startStatus"
               v-model="autoConfig.checkUserId"
               :placeholder="$t('mes.inspectionPlan.checkUserPlaceholder')"
+              :style="{ width: isEnglish ? '260px' : '215px' }"
               clearable
               @change="handleClickAuto"
             >
@@ -185,11 +191,12 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="5.5 " style="margin-top: 8px">
-          <span>{{ $t('mes.inspectionPlan.autoCreateTip') }}</span>
-        </el-col>
       </el-form>
-
+    </el-row>
+    <el-row :gutter="10" class="mb8" style="margin-top: 0">
+      <el-col :span="24" style="padding-left: 10px; margin-top: -10px; margin-bottom: 10px;">
+        <span style="color: #909399; font-size: 12px;">{{ $t('mes.inspectionPlan.autoCreateTip') }}</span>
+      </el-col>
     </el-row>
     <!--    自动配置检查计划结束-->
     <el-table
@@ -198,11 +205,29 @@
       @selection-change="handleSelectionChange"
     >
       <!-- <el-table-column type="selection" width="55" align="center" /> -->
-      <el-table-column :label="$t('mes.inspectionPlan.planId')" align="center" prop="planId">
+      <el-table-column 
+        :label="$t('mes.inspectionPlan.planId')" 
+        align="center" 
+        prop="planId"
+        
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionPlan.planName')" align="center" prop="planName">
+      <el-table-column 
+        :label="$t('mes.inspectionPlan.planName')" 
+        align="center" 
+        prop="planName"
+       
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionPlan.cabinet')" align="center" prop="cabinetName">
+      <el-table-column 
+        :label="$t('mes.inspectionPlan.cabinet')" 
+        align="center" 
+        prop="cabinetName"
+   
+        show-overflow-tooltip
+      >
         <template slot-scope="scope">
           <el-tooltip :content="scope.row.cabinetName" placement="top">
             <span style="color:#1890ff;cursor: pointer" @click="PlanDetail(scope.row)"
@@ -210,17 +235,33 @@
           </el-tooltip>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionPlan.planDate')" align="center" prop="planDate">
+      <el-table-column 
+        :label="$t('mes.inspectionPlan.planDate')" 
+        align="center" 
+        prop="planDate"
+     
+      >
         <template slot-scope="scope">
           {{ scope.row.planDate }}
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionPlan.checkUser')" align="center" prop="checkUserName">
+      <el-table-column 
+        :label="$t('mes.inspectionPlan.checkUser')" 
+        align="center" 
+        prop="checkUserName"
+     
+        show-overflow-tooltip
+      >
         <template slot-scope="scope">
           {{ scope.row.checkUserName }}
         </template>
       </el-table-column>
-      <el-table-column :label="$t('common.status')" align="center" prop="status">
+      <el-table-column 
+        :label="$t('common.status')" 
+        align="center" 
+        prop="status"
+       
+      >
         <template slot-scope="scope">
           <dict-tag
             :options="dict.type.checking_status"
@@ -228,7 +269,12 @@
           />
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.inspectionPlan.checkRecord')" align="center" prop="status">
+      <el-table-column 
+        :label="$t('mes.inspectionPlan.checkRecord')" 
+        align="center" 
+        prop="status"
+      
+      >
         <template slot-scope="scope">
           <el-button type="text" @click="goto(scope.row)">{{ $t('common.view') }}</el-button>
         </template>
@@ -237,6 +283,7 @@
         :label="$t('common.operation')"
         align="center"
         class-name="small-padding fixed-width"
+        min-width="140"
       >
         <template slot-scope="scope">
           <el-button
@@ -275,7 +322,7 @@
         <i></i>
         <span class="title">{{ title }}</span>
       </div>
-      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '110px'">
         <el-form-item :label="$t('mes.inspectionPlan.planName')" prop="planName">
           <el-input v-model="form.planName" :placeholder="$t('mes.inspectionPlan.planNamePlaceholder')"/>
         </el-form-item>
@@ -345,11 +392,28 @@
         <span class="title">{{ $t('mes.inspectionPlan.cabinetDetail') }}</span>
       </div>
       <el-table v-loading="loading" :data="PlanDetailTableList">
-        <el-table-column :label="$t('mes.inspectionPlan.planName')" align="center" prop="planName">
+        <el-table-column 
+          :label="$t('mes.inspectionPlan.planName')" 
+          align="center" 
+          prop="planName"
+          :width="isEnglish ? '200px' : '180px'"
+          show-overflow-tooltip
+        >
         </el-table-column>
-        <el-table-column :label="$t('mes.inspectionPlan.inspectionCabinet')" align="center" prop="cabinetName">
+        <el-table-column 
+          :label="$t('mes.inspectionPlan.inspectionCabinet')" 
+          align="center" 
+          prop="cabinetName"
+          :width="isEnglish ? '180px' : '150px'"
+          show-overflow-tooltip
+        >
         </el-table-column>
-        <el-table-column :label="$t('mes.inspectionPlan.signature')" align="left" prop="signatureImg">
+        <el-table-column 
+          :label="$t('mes.inspectionPlan.signature')" 
+          align="center" 
+          prop="signatureImg"
+          :width="isEnglish ? '120px' : '100px'"
+        >
           <template slot-scope="scope">
             <div class="img-box" v-if="scope.row.signatureImg">
               <el-image
@@ -369,7 +433,12 @@
             <span v-else>-</span>
           </template>
         </el-table-column>
-        <el-table-column :label="$t('common.operation')" align="left" prop="">
+        <el-table-column 
+          :label="$t('common.operation')" 
+          align="center" 
+          prop=""
+          :width="isEnglish ? '120px' : '100px'"
+        >
           <template slot-scope="scope">
             <el-button type="text" @click="PlanDialogDetail(scope.row)">{{ $t('mes.inspectionPlan.detail') }}</el-button>
           </template>
@@ -386,21 +455,52 @@
         <span class="title">{{ $t('mes.inspectionPlan.cabinetCheckRecord') }}</span>
       </div>
       <el-table v-loading="loading" :data="RecordList">
-        <el-table-column :label="$t('mes.inspectionPlan.planName')" align="center" prop="planName" width="200">
+        <el-table-column 
+          :label="$t('mes.inspectionPlan.planName')" 
+          align="center" 
+          prop="planName"
+          :width="isEnglish ? '200px' : '180px'"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.planName }}
           </template>
         </el-table-column>
-        <el-table-column :label="$t('mes.inspectionPlan.cabinet')" align="center" prop="cabinetName">
+        <el-table-column 
+          :label="$t('mes.inspectionPlan.cabinet')" 
+          align="center" 
+          prop="cabinetName"
+          :width="isEnglish ? '150px' : '120px'"
+          show-overflow-tooltip
+        >
         </el-table-column>
-        <el-table-column :label="$t('mes.inspectionPlan.materialsId')" align="center" prop="materialsId">
+        <el-table-column 
+          :label="$t('mes.inspectionPlan.materialsId')" 
+          align="center" 
+          prop="materialsId"
+          :width="isEnglish ? '150px' : '130px'"
+          show-overflow-tooltip
+        >
         </el-table-column>
-        <el-table-column :label="$t('mes.inspectionPlan.materialsName')" align="center" prop="materialsName"/>
-        <el-table-column :label="$t('mes.inspectionPlan.materialsType')" align="center" prop="materialsTypeName"/>
+        <el-table-column 
+          :label="$t('mes.inspectionPlan.materialsName')" 
+          align="center" 
+          prop="materialsName"
+          :width="isEnglish ? '180px' : '150px'"
+          show-overflow-tooltip
+        />
+        <el-table-column 
+          :label="$t('mes.inspectionPlan.materialsType')" 
+          align="center" 
+          prop="materialsTypeName"
+          :width="isEnglish ? '180px' : '150px'"
+          show-overflow-tooltip
+        />
         <el-table-column
           :label="$t('mes.inspectionPlan.materialsPicture')"
           align="center"
           prop="materialsTypePicture"
+          :width="isEnglish ? '120px' : '100px'"
         >
           <template slot-scope="scope">
             <img
@@ -412,24 +512,41 @@
             <span v-else>-</span>
           </template>
         </el-table-column>
-        <el-table-column :label="$t('mes.inspectionPlan.rfid')" align="center" prop="materialsRfid">
+        <el-table-column 
+          :label="$t('mes.inspectionPlan.rfid')" 
+          align="center" 
+          prop="materialsRfid"
+          :width="isEnglish ? '150px' : '130px'"
+          show-overflow-tooltip
+        >
         </el-table-column>
         <el-table-column
           :label="$t('mes.inspectionPlan.checkTime')"
           align="center"
           prop="createTime"
-          width="250"
+          :width="isEnglish ? '250px' : '200px'"
         >
           <template slot-scope="scope">
             {{ scope.row.createTime }}
           </template>
         </el-table-column>
-        <el-table-column :label="$t('common.status')" align="center" prop="status">
+        <el-table-column 
+          :label="$t('common.status')" 
+          align="center" 
+          prop="status"
+          :width="isEnglish ? '120px' : '100px'"
+        >
           <template slot-scope="scope">
             <dict-tag :options="dict.type.checks_status" :value="scope.row.status"/>
           </template>
         </el-table-column>
-        <el-table-column :label="$t('mes.inspectionPlan.exceptionReason')" align="center" prop="reason">
+        <el-table-column 
+          :label="$t('mes.inspectionPlan.exceptionReason')" 
+          align="center" 
+          prop="reason"
+          :width="isEnglish ? '180px' : '150px'"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             <dict-tag :options="dict.type.exceptions_status" :value="scope.row.reason"/>
           </template>
@@ -576,6 +693,11 @@ export default {
       planDateOptions: null
     }
   },
+  computed: {
+    isEnglish() {
+      return this.$i18n.locale === 'en'
+    }
+  },
   watch: {
     'form.workstationId': function(newVal, oldVal) {
       if (newVal) {

+ 10 - 2
src/views/mes/material/instructions/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '180px' : '100px'"
       @submit.native.prevent
     >
       <el-form-item :label="$t('mes.instructions.title')" prop="instructionsTitle">
@@ -19,7 +19,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.instructions.materialsType')" prop="materialsTypeId">
         <treeselect
-          style="width: 200px"
+          :style="treeselectStyle"
           v-model="queryParams.materialsTypeId"
           :options="materialstypeOptions"
           :normalizer="materialnormalizer"
@@ -384,6 +384,14 @@ export default {
     };
   },
   computed: {
+    isEnglish() {
+      return this.$i18n.locale === 'en'
+    },
+    treeselectStyle() {
+      return {
+        width: this.isEnglish ? '220px' : '200px'
+      }
+    },
     rules() {
       return {
         materialsName: [

+ 2 - 0
src/views/mes/material/inventory/index.vue

@@ -1,3 +1,5 @@
+
+
 <template>
   <div>
     <!-- Tab部分 使用 el-radio-group -->

+ 5 - 5
src/views/mes/material/lockers/DetailsIndex.vue

@@ -1,11 +1,11 @@
 <template>
   <div class="app-container">
     <el-radio-group v-model="tabPosition" style="margin: 5px" @change="handleTabChange">
-      <el-radio-button label="first">物资清单</el-radio-button>
-      <el-radio-button label="second">领取记录</el-radio-button>
-      <el-radio-button label="third">检查计划</el-radio-button>
-      <el-radio-button label="fourth">检查记录</el-radio-button>
-      <el-radio-button label="fifth">维修/更换记录</el-radio-button>
+      <el-radio-button label="first">{{ $t('mes.material.materialList') }}</el-radio-button>
+      <el-radio-button label="second">{{ $t('mes.material.collectionRecord') }}</el-radio-button>
+      <el-radio-button label="third">{{ $t('mes.material.inspectionPlan') }}</el-radio-button>
+      <el-radio-button label="fourth">{{ $t('mes.material.inspectionRecord') }}</el-radio-button>
+      <el-radio-button label="fifth">{{ $t('mes.material.repairReplacementRecord') }}</el-radio-button>
     </el-radio-group>
     <!-- 物资清单 -->
     <div v-if="tabPosition == 'first'" class="materialsListcon">

+ 46 - 8
src/views/mes/material/lockers/index.vue

@@ -69,7 +69,7 @@
         <!--          @click="handleCabinetClick(cabinet)"-->
         <!--        />-->
 
-        <div v-for="(item, index) in jobconfigPoint.records" :key="item.id">
+        <div v-for="item in jobconfigPoint.records" :key="item.id">
           <div
             class="deptXLG"
             :style="{left:item.x+'px',top:item.y+'px'}"
@@ -162,12 +162,13 @@
             size="small"
             :inline="true"
             v-show="showSearch"
-            label-width="100px"
+            :label-width="isEnglish ? '180px' : '100px'"
           >
             <el-form-item :label="$t('mes.lockers.cabinetId')" prop="cabinetId">
               <el-input
                 v-model="queryParams.cabinetId"
                 :placeholder="$t('mes.lockers.cabinetIdPlaceholder')"
+                :style="{ width: isEnglish ? '200px' : '180px' }"
                 clearable
                 oninput="value=value.replace(/[^\d.]/g,'')"
                 @keyup.enter.native="handleQuery"
@@ -177,6 +178,7 @@
               <el-input
                 v-model="queryParams.cabinetName"
                 :placeholder="$t('mes.lockers.cabinetNamePlaceholder')"
+                :style="{ width: isEnglish ? '200px' : '180px' }"
                 clearable
                 @keyup.enter.native="handleQuery"
               />
@@ -236,10 +238,26 @@
           @selection-change="handleSelectionChange"
         >
           <!--          <el-table-column type="selection" width="55" align="center"/>-->
-          <el-table-column :label="$t('mes.lockers.cabinetId')" align="center" prop="cabinetId">
+          <el-table-column 
+            :label="$t('mes.lockers.cabinetId')" 
+            align="center" 
+            prop="cabinetId"
+            :width="isEnglish ? '180px' : '120px'"
+            show-overflow-tooltip
+          >
           </el-table-column>
-          <el-table-column :label="$t('mes.lockers.cabinetName')" prop="cabinetName" width="150"/>
-          <el-table-column :label="$t('mes.lockers.cabinetPicture')" prop="cabinetPicture" width="100">
+          <el-table-column 
+            :label="$t('mes.lockers.cabinetName')" 
+            prop="cabinetName" 
+            :width="isEnglish ? '200px' : '150px'"
+            show-overflow-tooltip
+          />
+          <el-table-column 
+            :label="$t('mes.lockers.cabinetPicture')" 
+            prop="cabinetPicture" 
+            width="120"
+            align="center"
+          >
             <template slot-scope="scope">
               <div class="img-box" v-if="scope.row.cabinetPicture">
                 <el-image
@@ -259,7 +277,12 @@
               <span v-else>-</span>
             </template>
           </el-table-column>
-          <el-table-column :label="$t('mes.lockers.cabinetStatus')" align="center" prop="status">
+          <el-table-column 
+            :label="$t('mes.lockers.cabinetStatus')" 
+            align="center" 
+            prop="status"
+            :width="isEnglish ? '180px' : '120px'"
+          >
             <template slot-scope="scope">
               <dict-tag
                 :options="dict.type.cabinet_status"
@@ -267,7 +290,12 @@
               />
             </template>
           </el-table-column>
-          <el-table-column :label="$t('mes.lockers.exceptionType')" prop="exReason" width="100">
+          <el-table-column 
+            :label="$t('mes.lockers.exceptionType')" 
+            prop="exReason" 
+            :width="isEnglish ? '180px' : '120px'"
+            align="center"
+          >
             <template slot-scope="scope">
               <dict-tag
                 :options="dict.type.exception_reason"
@@ -275,7 +303,10 @@
               />
             </template>
           </el-table-column>
-          <el-table-column :label="$t('mes.lockers.cabinetDetail')" align="center">
+          <el-table-column 
+            :label="$t('mes.lockers.cabinetDetail')" 
+            align="center"
+          >
             <template slot-scope="scope">
               <el-button
                 v-no-more-click
@@ -290,6 +321,7 @@
             :label="$t('common.operation')"
             align="center"
             class-name="small-padding fixed-width"
+            
           >
             <template slot-scope="scope">
               <el-button
@@ -492,6 +524,12 @@ export default {
     }
   },
 
+  computed: {
+    isEnglish() {
+      return this.$i18n.locale === 'en'
+    }
+  },
+
   watch: {
     'queryParams.workstationId': function(newVal, oldVal) {
       if (newVal) {

+ 81 - 21
src/views/mes/material/materialinformation/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '180px' : '140px'"
       @submit.native.prevent
     >
       <el-form-item
@@ -14,7 +14,7 @@
         prop="materialsCabinetId"
       >
         <el-select
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           :disabled="visibleSelect"
           v-model="queryParams.materialsCabinetId"
           :placeholder="$t('mes.materialInfo.materialsCabinetPlaceholder')"
@@ -29,7 +29,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.materialInfo.materialsName')" prop="materialsName">
         <el-input
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           v-model="queryParams.materialsName"
           :placeholder="$t('mes.materialInfo.materialsNamePlaceholder')"
           clearable
@@ -38,7 +38,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.materialInfo.materialsType')" prop="materialsTypeId">
         <treeselect
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           v-model="queryParams.materialsTypeId"
           :options="machinerytypeOptions"
           :normalizer="normalizer"
@@ -47,7 +47,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.materialInfo.propertyType')" prop="propertyId">
         <el-select
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           v-model="queryParams.propertyId"
           :placeholder="$t('mes.materialInfo.propertyTypePlaceholder')"
           @change="handlePropertyChange"
@@ -62,7 +62,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.materialInfo.properties')" prop="recordId">
         <el-select
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           v-model="queryParams.recordId"
           :placeholder="$t('mes.materialInfo.propertiesPlaceholder')"
           :disabled="!queryParams.propertyId"
@@ -77,7 +77,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.materialInfo.rfid')" prop="materialsRfid">
         <el-input
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           v-model="queryParams.materialsRfid"
           :placeholder="$t('mes.materialInfo.rfidPlaceholder')"
           clearable
@@ -86,7 +86,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.materialInfo.supplier')" prop="supplier">
         <el-input
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           v-model="queryParams.supplier"
           :placeholder="$t('mes.materialInfo.supplierPlaceholder')"
           clearable
@@ -95,7 +95,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.materialInfo.expirationDate')" prop="">
         <el-date-picker
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           :default-time="['00:00:00', '23:59:59']"
           v-model="createTime"
           type="datetimerange"
@@ -110,7 +110,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.materialInfo.inCabinet')" prop="loanState">
         <el-select
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           v-model="queryParams.loanState"
           :placeholder="$t('mes.materialInfo.inCabinetPlaceholder')"
         >
@@ -124,7 +124,7 @@
       </el-form-item>
       <el-form-item :label="$t('common.status')" prop="status">
         <el-select
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           v-model="queryParams.status"
           :placeholder="$t('mes.materialInfo.statusPlaceholder')"
         >
@@ -225,27 +225,56 @@
         :label="visibleSelect ? $t('mes.materialInfo.materialsCabinet') : $t('mes.materialInfo.bindMaterialsCabinet')"
         align="center"
         prop="cabinetName"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
       >
         <template slot-scope="scope">
           <span v-if="scope.row.cabinetName">{{ scope.row.cabinetName }}</span>
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.materialInfo.materialsId')" align="center" prop="materialsId">
+      <el-table-column 
+        :label="$t('mes.materialInfo.materialsId')" 
+        align="center" 
+        prop="materialsId"
+        :width="isEnglish ? '150px' : '130px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.materialInfo.materialsName')" align="center" prop="materialsName" />
+      <el-table-column 
+        :label="$t('mes.materialInfo.materialsName')" 
+        align="center" 
+        prop="materialsName"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
+      />
       <el-table-column
         :label="$t('mes.materialInfo.materialsType')"
         align="center"
         prop="materialsTypeName"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
       />
       <el-table-column
         :label="$t('mes.materialInfo.propertyType')"
         align="center"
         prop="propertiesProperty"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
+      />
+      <el-table-column 
+        :label="$t('mes.materialInfo.properties')" 
+        align="center" 
+        prop="propertiesValue"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
       />
-      <el-table-column :label="$t('mes.materialInfo.properties')" align="center" prop="propertiesValue" />
-      <el-table-column :label="$t('mes.materialInfo.materialsPicture')" prop="materialsTypePicture" width="90">
+      <el-table-column 
+        :label="$t('mes.materialInfo.materialsPicture')" 
+        prop="materialsTypePicture" 
+        :width="isEnglish ? '150px' : '120px'"
+        align="center"
+      >
         <template slot-scope="scope">
           <div class="img-box" v-if="scope.row.materialsTypePicture">
             <el-image
@@ -265,7 +294,13 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.materialInfo.rfid')" align="center" prop="materialsRfid">
+      <el-table-column 
+        :label="$t('mes.materialInfo.rfid')" 
+        align="center" 
+        prop="materialsRfid"
+        :width="isEnglish ? '150px' : '130px'"
+        show-overflow-tooltip
+      >
         <template slot-scope="scope">
           <span v-if="scope.row.materialsRfid">{{
             scope.row.materialsRfid
@@ -273,15 +308,31 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.materialInfo.supplier')" align="center" prop="supplier">
+      <el-table-column 
+        :label="$t('mes.materialInfo.supplier')" 
+        align="center" 
+        prop="supplier"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
       <!--      <el-table-column label="所属柜" align="center" prop="cabinetName" />-->
-      <el-table-column :label="$t('mes.materialInfo.expirationDate')" align="center" prop="expirationDate">
+      <el-table-column 
+        :label="$t('mes.materialInfo.expirationDate')" 
+        align="center" 
+        prop="expirationDate"
+        :width="isEnglish ? '180px' : '160px'"
+      >
         <template slot-scope="scope">
           {{ scope.row.expirationDate }}
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.materialInfo.inCabinet')" align="center" prop="loanState">
+      <el-table-column 
+        :label="$t('mes.materialInfo.inCabinet')" 
+        align="center" 
+        prop="loanState"
+        :width="isEnglish ? '140px' : '120px'"
+      >
         <template slot-scope="scope">
           <!--          <dict-tag-->
           <!--            :options="dict.type.material_status"-->
@@ -303,7 +354,12 @@
           <span v-if="scope.row.loanState == '1'">√</span> -->
         </template>
       </el-table-column>
-      <el-table-column :label="$t('common.status')" align="center" prop="status">
+      <el-table-column 
+        :label="$t('common.status')" 
+        align="center" 
+        prop="status"
+        :width="isEnglish ? '120px' : '100px'"
+      >
         <template slot-scope="scope">
           <dict-tag
             :options="dict.type.material_info_status"
@@ -315,6 +371,7 @@
         :label="$t('common.operation')"
         align="center"
         class-name="small-padding fixed-width"
+        min-width="140"
       >
         <template slot-scope="scope">
           <el-button
@@ -351,7 +408,7 @@
         <i></i>
         <span class="title">{{ title }}</span>
       </div>
-      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '160px' : '110px'">
         <el-row>
           <el-col :span="12">
             <el-form-item :label="$t('mes.materialInfo.bindMaterialsCabinet')" prop="materialsCabinetId">
@@ -772,6 +829,9 @@ export default {
     this.getTreeselect();
   },
   computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en';
+    },
     pickerOptions() {
       return {
         shortcuts: [

+ 119 - 15
src/views/mes/material/replacementrecords/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '180px' : '100px'"
       @submit.native.prevent
     >
       <el-form-item :label="$t('mes.replacementRecords.cabinet')" prop="cabinetId">
@@ -14,6 +14,7 @@
           :disabled="visibleSelect"
           v-model="queryParams.cabinetId"
           :placeholder="$t('mes.replacementRecords.cabinetPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
         >
           <el-option
@@ -26,7 +27,7 @@
       </el-form-item>
       <el-form-item :label="$t('mes.replacementRecords.materialsType')" prop="materialsTypeId">
         <treeselect
-          style="width: 210px"
+          :style="{ width: isEnglish ? '240px' : '210px' }"
           v-model="queryParams.materialsTypeId"
           :options="materialstypeOptions"
           :normalizer="materialnormalizer"
@@ -38,6 +39,7 @@
         <el-input
           v-model="queryParams.oldMaterialsId"
           :placeholder="$t('mes.replacementRecords.oldMaterialsIdPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           oninput="value=value.replace(/[^\d.]/g,'')"
           @keyup.enter.native="handleQuery"
@@ -48,6 +50,7 @@
         <el-input
           v-model="queryParams.oldMaterialsRfid"
           :placeholder="$t('mes.replacementRecords.oldRfidPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -56,6 +59,7 @@
         <el-input
           v-model="queryParams.newMaterialsId"
           :placeholder="$t('mes.replacementRecords.newMaterialsIdPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           oninput="value=value.replace(/[^\d.]/g,'')"
           @keyup.enter.native="handleQuery"
@@ -65,6 +69,7 @@
         <el-input
           v-model="queryParams.newMaterialsRfid"
           :placeholder="$t('mes.replacementRecords.newRfidPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -73,13 +78,14 @@
         <el-input
           v-model="queryParams.changeUserName"
           :placeholder="$t('mes.replacementRecords.changeUserPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
       <el-form-item :label="$t('mes.replacementRecords.changeTime')">
         <el-date-picker
-          style="width: 215px"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
           :default-time="['00:00:00', '23:59:59']"
           v-model="createTime"
           type="datetimerange"
@@ -93,7 +99,11 @@
         </el-date-picker>
       </el-form-item>
       <el-form-item :label="$t('mes.replacementRecords.operateType')" prop="operateType">
-        <el-select v-model="queryParams.operateType" :placeholder="$t('mes.replacementRecords.operateTypePlaceholder')">
+        <el-select 
+          v-model="queryParams.operateType" 
+          :placeholder="$t('mes.replacementRecords.operateTypePlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '215px' }"
+        >
           <el-option
             v-for="dict in dict.type.material_change_type"
             :key="dict.value"
@@ -155,18 +165,31 @@
       @selection-change="handleSelectionChange"
     >
 <!--      <el-table-column type="selection" width="55" align="center"/>-->
-      <el-table-column :label="$t('mes.replacementRecords.cabinet')" align="center" prop="cabinetName">
+      <el-table-column 
+        :label="$t('mes.replacementRecords.cabinet')" 
+        align="center" 
+        prop="cabinetName"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
+      >
         <template slot-scope="scope">
           <span v-if="scope.row.cabinetName">{{scope.row.cabinetName}}</span>
           <span v-else>-</span>
         </template>
       </el-table-column>
 <!--      <el-table-column label="物资名称" align="center" prop="materialsName" />-->
-      <el-table-column :label="$t('mes.replacementRecords.materialsType')" align="center" prop="materialsTypeName" />
+      <el-table-column 
+        :label="$t('mes.replacementRecords.materialsType')" 
+        align="center" 
+        prop="materialsTypeName"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
+      />
       <el-table-column
         :label="$t('mes.replacementRecords.materialsPicture')"
         align="center"
         prop="materialsTypePicture"
+        :width="isEnglish ? '130px' : '100px'"
       >
         <template slot-scope="scope">
           <img
@@ -178,25 +201,68 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('mes.replacementRecords.oldMaterialsId')" align="center" prop="oldMaterialsId">
+      <el-table-column 
+        :label="$t('mes.replacementRecords.oldMaterialsId')" 
+        align="center" 
+        prop="oldMaterialsId"
+        :width="isEnglish ? '150px' : '130px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.replacementRecords.oldMaterialsName')" align="center" prop="oldMaterialsName">
+      <el-table-column 
+        :label="$t('mes.replacementRecords.oldMaterialsName')" 
+        align="center" 
+        prop="oldMaterialsName"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.replacementRecords.oldRfid')" align="center" prop="oldMaterialsRfid">
+      <el-table-column 
+        :label="$t('mes.replacementRecords.oldRfid')" 
+        align="center" 
+        prop="oldMaterialsRfid"
+        :width="isEnglish ? '150px' : '130px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.replacementRecords.newMaterialsId')" align="center" prop="newMaterialsId">
+      <el-table-column 
+        :label="$t('mes.replacementRecords.newMaterialsId')" 
+        align="center" 
+        prop="newMaterialsId"
+        :width="isEnglish ? '150px' : '130px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.replacementRecords.newMaterialsName')" align="center" prop="newMaterialsName">
+      <el-table-column 
+        :label="$t('mes.replacementRecords.newMaterialsName')" 
+        align="center" 
+        prop="newMaterialsName"
+        :width="isEnglish ? '180px' : '150px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
-      <el-table-column :label="$t('mes.replacementRecords.newRfid')" align="center" prop="newMaterialsRfid">
+      <el-table-column 
+        :label="$t('mes.replacementRecords.newRfid')" 
+        align="center" 
+        prop="newMaterialsRfid"
+        :width="isEnglish ? '150px' : '130px'"
+        show-overflow-tooltip
+      >
       </el-table-column>
       <el-table-column
         :label="$t('mes.replacementRecords.changeUser')"
         align="center"
         prop="changeUserName"
+        :width="isEnglish ? '150px' : '120px'"
+        show-overflow-tooltip
       >
       </el-table-column>
-      <el-table-column :label="$t('mes.replacementRecords.changeTime')" align="center" prop="changeDate">
+      <el-table-column 
+        :label="$t('mes.replacementRecords.changeTime')" 
+        align="center" 
+        prop="changeDate"
+        :width="isEnglish ? '180px' : '160px'"
+      >
         <template slot-scope="scope">
           <span v-if="scope.row.changeDate">{{scope.row.changeDate}}</span>
           <span v-else>-</span>
@@ -206,6 +272,7 @@
         :label="$t('mes.replacementRecords.operateType')"
         align="center"
         prop="operateType"
+        :width="isEnglish ? '140px' : '120px'"
       >
         <template slot-scope="scope">
           <span v-if="scope.row.operateType==3">{{ $t('mes.replacementRecords.repair') }}</span>
@@ -253,7 +320,7 @@
         <i></i>
         <span class="title">{{ title }}</span>
       </div>
-      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '180px' : '110px'">
         <el-form-item :label="$t('mes.replacementRecords.planId')" prop="planId">
           <el-select
             style="width: 348px"
@@ -448,7 +515,44 @@ export default {
       visibleSelect:false,
     }
   },
-
+  computed: {
+    isEnglish() {
+      return this.$i18n.locale === 'en'
+    },
+    pickerOptions() {
+      return {
+        shortcuts: [
+          {
+            text: this.$t('mes.replacementRecords.lastWeek'),
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', [start, end])
+            }
+          },
+          {
+            text: this.$t('mes.replacementRecords.lastMonth'),
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+              picker.$emit('pick', [start, end])
+            }
+          },
+          {
+            text: this.$t('mes.replacementRecords.lastThreeMonths'),
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+              picker.$emit('pick', [start, end])
+            }
+          }
+        ]
+      };
+    }
+  },
   created() {
     if(this.cabinetId){
       this.visibleSelect=true

+ 5 - 1
src/views/mes/material/typeofmaterial/index.vue

@@ -6,7 +6,7 @@
       size="small"
       :inline="true"
       v-show="showSearch"
-      label-width="100px"
+      :label-width="isEnglish ? '180px' : '100px'"
       @submit.native.prevent
     >
       <!-- <el-form-item label="物资类型编码" prop="materialsTypeCode">
@@ -21,6 +21,7 @@
         <el-input
           v-model="queryParams.materialsTypeName"
           :placeholder="$t('mes.materialType.materialsTypeNamePlaceholder')"
+          :style="{ width: isEnglish ? '200px' : '180px' }"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -458,6 +459,9 @@ export default {
     };
   },
   computed: {
+    isEnglish() {
+      return this.$i18n.locale === 'en'
+    },
     rules() {
       return {
         materialsTypeCode: [

+ 52 - 53
src/views/mes/md/locksettype/index.vue

@@ -6,19 +6,20 @@
       size="small"
       :inline="true"
       v-show="showSearch"
+      :label-width="isEnglish ? '180px' : '140px'"
     >
-      <el-form-item label="锁具机构类型编码" prop="locksetTypeCode">
+      <el-form-item :label="$t('mes.locksetType.locksetTypeCode')" prop="locksetTypeCode">
         <el-input
           v-model="queryParams.locksetTypeCode"
-          placeholder="请输入锁具机构类型编码"
+          :placeholder="$t('mes.locksetType.locksetTypeCodePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="锁具机构类型名称" prop="locksetTypeName">
+      <el-form-item :label="$t('mes.locksetType.locksetTypeName')" prop="locksetTypeName">
         <el-input
           v-model="queryParams.locksetTypeName"
-          placeholder="请输入锁具机构类型名称"
+          :placeholder="$t('mes.locksetType.locksetTypeNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -32,14 +33,14 @@
           size="mini"
 
           @click="handleQuery"
-          >搜索</el-button
+          >{{ $t('common.search') }}</el-button
         >
         <el-button
           v-no-more-click
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-          >重置</el-button
+          >{{ $t('common.reset') }}</el-button
         >
       </el-form-item>
     </el-form>
@@ -53,7 +54,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['mes:md:locksettype:add']"
-          >新增
+          >{{ $t('common.add') }}
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -64,7 +65,7 @@
           icon="el-icon-sort"
           size="mini"
           @click="toggleExpandAll"
-          >展开/折叠
+          >{{ $t('common.expandCollapse') }}
         </el-button>
       </el-col>
       <right-toolbar
@@ -83,16 +84,19 @@
     >
       <el-table-column
         prop="locksetTypeCode"
-        label="锁具机构类型编码"
-        width="260"
+        :label="$t('mes.locksetType.locksetTypeCode')"
+        :width="isEnglish ? '240px' : '200px'"
+        show-overflow-tooltip
       ></el-table-column>
       <el-table-column
         prop="locksetTypeName"
-        label="锁具机构类型名称"
-        width="260"
+        :label="$t('mes.locksetType.locksetTypeName')"
+        :width="isEnglish ? '240px' : '200px'"
+        show-overflow-tooltip
       ></el-table-column>
       <el-table-column
-        label="锁具机构类型图标"
+        :label="$t('mes.locksetType.locksetTypeIcon')"
+        :width="isEnglish ? '180px' : '150px'"
         align="center"
         prop="locksetTypeIcon"
       >
@@ -107,7 +111,8 @@
         </template>
       </el-table-column>
       <el-table-column
-        label="锁具机构类型图片"
+        :label="$t('mes.locksetType.locksetTypeImg')"
+        :width="isEnglish ? '180px' : '150px'"
         align="center"
         prop="locksetTypeImg"
       >
@@ -128,11 +133,13 @@
 <!--      ></el-table-column>-->
       <el-table-column
         prop="locksetTypeSpec"
-        label="锁具机构类型规格"
-        width="260"
+        :label="$t('mes.locksetType.locksetTypeSpec')"
+        :width="isEnglish ? '200px' : '180px'"
+        show-overflow-tooltip
       ></el-table-column>
       <el-table-column
-        label="操作"
+        :label="$t('common.operation')"
+        :width="isEnglish ? '180px' : '160px'"
         align="center"
         class-name="small-padding fixed-width"
       >
@@ -144,7 +151,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['mes:md:locksettype:edit']"
-            >修改
+            >{{ $t('common.edit') }}
           </el-button>
           <el-button
             v-no-more-click
@@ -153,7 +160,7 @@
             icon="el-icon-plus"
             @click="handleAdd(scope.row)"
             v-hasPermi="['mes:md:locksettype:add']"
-            >新增
+            >{{ $t('common.add') }}
           </el-button>
 <!--           v-if="scope.row.parentTypeId != 0"-->
           <el-button
@@ -163,7 +170,7 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:md:locksettype:remove']"
-            >删除
+            >{{ $t('common.delete') }}
           </el-button>
         </template>
       </el-table-column>
@@ -171,16 +178,16 @@
 
     <!-- 添加或修改部门对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="640px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="150px">
+      <el-form ref="form" :model="form" :rules="rules" :label-width="isEnglish ? '200px' : '150px'">
         <el-row>
           <el-col :span="18">
-            <el-form-item label="父级" prop="parentTypeId">
+            <el-form-item :label="$t('mes.locksetType.parentType')" prop="parentTypeId">
               <treeselect
                 style="width: 318px"
                 v-model="form.parentTypeId"
                 :options="deptOptions"
                 :normalizer="normalizer"
-                placeholder="选择父级"
+                :placeholder="$t('mes.locksetType.selectParent')"
               />
             </el-form-item>
           </el-col>
@@ -188,11 +195,11 @@
 
         <el-row>
           <el-col :span="19">
-            <el-form-item label="锁具机构类型编码" prop="locksetTypeCode">
+            <el-form-item :label="$t('mes.locksetType.locksetTypeCode')" prop="locksetTypeCode">
               <el-input
                 style="width: 318px"
                 v-model="form.locksetTypeCode"
-                placeholder="请输入锁具机构类型编码"
+                :placeholder="$t('mes.locksetType.locksetTypeCodePlaceholder')"
               />
             </el-form-item>
           </el-col>
@@ -202,7 +209,7 @@
                 style="width: 170px"
                 v-model="autoGenFlag"
                 active-color="#13ce66"
-                active-text="自动生成"
+                :active-text="$t('mes.locksetType.autoGenerate')"
                 @change="handleAutoGenChange(autoGenFlag)"
               >
               </el-switch>
@@ -211,18 +218,18 @@
         </el-row>
         <el-row>
           <el-col :span="18">
-            <el-form-item label="锁具机构类型名称" prop="locksetTypeName">
+            <el-form-item :label="$t('mes.locksetType.locksetTypeName')" prop="locksetTypeName">
               <el-input
                 style="width: 318px"
                 v-model="form.locksetTypeName"
-                placeholder="请输入锁具机构类型名称"
+                :placeholder="$t('mes.locksetType.locksetTypeNamePlaceholder')"
               />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="锁具机构类型图标" prop="locksetTypeIcon">
+            <el-form-item :label="$t('mes.locksetType.locksetTypeIcon')" prop="locksetTypeIcon">
               <ImageUploadSingle
                 :limit="1"
                 :value="form.locksetTypeIcon"
@@ -233,7 +240,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="锁具机构类型图片" prop="locksetTypeImg">
+            <el-form-item :label="$t('mes.locksetType.locksetTypeImg')" prop="locksetTypeImg">
               <ImageUploadSingle
                 :limit="1"
                 :value="form.locksetTypeImg"
@@ -246,12 +253,12 @@
         </el-row>
         <el-row>
           <el-col :span="10">
-            <el-form-item label="锁具机构类型描述" prop="locksetTypeSpec">
+            <el-form-item :label="$t('mes.locksetType.locksetTypeSpec')" prop="locksetTypeSpec">
               <el-input
                 type="text"
                 style="width: 318px"
                 v-model="form.locksetTypeSpec"
-                placeholder="请输入锁具机构类型规格"
+                :placeholder="$t('mes.locksetType.locksetTypeSpecPlaceholder')"
               />
             </el-form-item>
 <!--            <el-form-item label="锁具机构类型描述" prop="locksetTypeDescription">-->
@@ -267,9 +274,9 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-no-more-click type="primary" @click="submitForm"
-          >确 定</el-button
+          >{{ $t('common.confirm') }}</el-button
         >
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -337,21 +344,13 @@ export default {
       },
       WorkShopListOptions: null, //所属车间下拉数据
       EditId: null, //判断是否是编辑弹框的值
-      // 表单校验
-      rules: {
-        // parentId: [
-        //   { required: true, message: '父级不能为空', trigger: 'blur' }
-        // ],
-
-        locksetTypeCode: [
-          { required: true, message: "锁具机构类型编号不能为空", trigger: "blur" },
-        ],
-        locksetTypeName: [
-          { required: true, message: "锁具机构类型名称不能为空", trigger: "blur" },
-        ],
-      },
     };
   },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    }
+  },
   created() {
     this.getList();
   },
@@ -428,7 +427,7 @@ export default {
         this.form.parentTypeId = 0;
       }
       this.open = true;
-      this.title = "添加锁具机构类型";
+      this.title = this.$t('mes.locksetType.addLocksetType');
       listLockType().then((response) => {
         this.deptOptions = this.handleTree(
           response.data.records,
@@ -457,7 +456,7 @@ export default {
           this.form.parentTypeId=null
         }
         this.open = true;
-        this.title = "修改锁具机构类型";
+        this.title = this.$t('mes.locksetType.editLocksetType');
       });
       listLockType().then((response) => {
         this.deptOptions = this.handleTree(
@@ -483,14 +482,14 @@ export default {
         if (valid) {
           if (this.form.locksetTypeId != undefined) {
             updateLockType(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
+              this.$modal.msgSuccess(this.$t('common.editSuccess'));
               this.open = false;
               this.getList();
             });
           } else {
             console.log(this.form, "新增作业区域参数");
             addLockType(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
+              this.$modal.msgSuccess(this.$t('common.addSuccess'));
               this.open = false;
               this.getList();
             });
@@ -532,13 +531,13 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       this.$modal
-        .confirm('是否确认删除编号为"' + row.locksetTypeCode + '"的数据项?')
+        .confirm(this.$t('mes.locksetType.deleteConfirm', { code: row.locksetTypeCode }))
         .then(function () {
           return delLockType(row.locksetTypeId);
         })
         .then(() => {
           this.getList();
-          this.$modal.msgSuccess("删除成功");
+          this.$modal.msgSuccess(this.$t('common.deleteSuccess'));
         })
         .catch(() => {});
     },

+ 47 - 48
src/views/mes/md/locktype/index.vue

@@ -7,18 +7,18 @@
       :inline="true"
       v-show="showSearch"
     >
-      <el-form-item label="挂锁类型编码" prop="lockTypeCode">
+      <el-form-item :label="$t('mes.lockType.lockTypeCode')" prop="lockTypeCode">
         <el-input
           v-model="queryParams.lockTypeCode"
-          placeholder="请输入挂锁类型编码"
+          :placeholder="$t('mes.lockType.lockTypeCodePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="挂锁类型名称" prop="lockTypeName">
+      <el-form-item :label="$t('mes.lockType.lockTypeName')" prop="lockTypeName">
         <el-input
           v-model="queryParams.lockTypeName"
-          placeholder="请输入挂锁类型名称"
+          :placeholder="$t('mes.lockType.lockTypeNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -31,14 +31,14 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索</el-button
+          >{{ $t('common.search') }}</el-button
         >
         <el-button
           v-no-more-click
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-          >重置</el-button
+          >{{ $t('common.reset') }}</el-button
         >
       </el-form-item>
     </el-form>
@@ -52,7 +52,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['mes:md:locktype:add']"
-          >新增
+          >{{ $t('common.add') }}
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -63,7 +63,7 @@
           icon="el-icon-sort"
           size="mini"
           @click="toggleExpandAll"
-          >展开/折叠
+          >{{ $t('common.expandCollapse') }}
         </el-button>
       </el-col>
       <right-toolbar
@@ -82,15 +82,15 @@
     >
       <el-table-column
         prop="lockTypeCode"
-        label="挂锁类型编码"
+        :label="$t('mes.lockType.lockTypeCode')"
         width="260"
       ></el-table-column>
       <el-table-column
         prop="lockTypeName"
-        label="挂锁类型名称"
+        :label="$t('mes.lockType.lockTypeName')"
         width="260"
       ></el-table-column>
-      <el-table-column prop="lockTypeIcon" label="挂锁类型图标" width="260">
+      <el-table-column prop="lockTypeIcon" :label="$t('mes.lockType.lockTypeIcon')" width="260">
         <template slot-scope="scope">
           <img
             style="width: 50px; height: 50px"
@@ -101,7 +101,7 @@
           <span v-else>-</span>
         </template>
       </el-table-column>
-      <el-table-column prop="lockTypeImg" label="挂锁类型图片" width="260">
+      <el-table-column prop="lockTypeImg" :label="$t('mes.lockType.lockTypeImg')" width="260">
         <template slot-scope="scope">
           <img
             style="width: 50px; height: 50px"
@@ -114,7 +114,7 @@
       </el-table-column>
       <el-table-column
         prop="lockTypeSpec"
-        label="挂锁型号"
+        :label="$t('mes.lockType.lockTypeSpec')"
         width="260"
       ></el-table-column>
 <!--      <el-table-column-->
@@ -123,7 +123,7 @@
 <!--        width="260"-->
 <!--      ></el-table-column>-->
       <el-table-column
-        label="操作"
+        :label="$t('common.operation')"
         align="center"
         class-name="small-padding fixed-width"
       >
@@ -135,7 +135,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['mes:md:locktype:edit']"
-            >修改
+            >{{ $t('common.edit') }}
           </el-button>
           <el-button
             v-no-more-click
@@ -144,7 +144,7 @@
             icon="el-icon-plus"
             @click="handleAdd(scope.row)"
             v-hasPermi="['mes:md:locktype:add']"
-            >新增
+            >{{ $t('common.add') }}
           </el-button>
           <el-button
             v-no-more-click
@@ -153,7 +153,7 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:md:locktype:remove']"
-            >删除
+            >{{ $t('common.delete') }}
           </el-button>
         </template>
       </el-table-column>
@@ -164,44 +164,44 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-row>
           <el-col :span="18">
-            <el-form-item label="父类型" prop="parentTypeId">
+            <el-form-item :label="$t('mes.lockType.parentType')" prop="parentTypeId">
               <treeselect
                 style="width: 318px"
                 v-model="form.parentTypeId"
                 :options="deptOptions"
                 :normalizer="normalizer"
-                placeholder="选择父级"
+                :placeholder="$t('mes.lockType.selectParent')"
               />
             </el-form-item>
           </el-col>
         </el-row>
-        <el-form-item label="硬件类型" prop="hardwareTypeId">
+        <el-form-item :label="$t('mes.lockType.hardwareType')" prop="hardwareTypeId">
           <treeselect
             style="width: 318px"
             v-model="form.hardwareTypeId"
             :options="machinerytypeOptions"
             :normalizer="normalizer1"
-            placeholder="请选择硬件类型"
+            :placeholder="$t('mes.lockType.hardwareTypePlaceholder')"
           />
         </el-form-item>
         <el-row>
           <el-col :span="18">
-            <el-form-item label="挂锁类型名称" prop="lockTypeName">
+            <el-form-item :label="$t('mes.lockType.lockTypeName')" prop="lockTypeName">
               <el-input
                 style="width: 318px"
                 v-model="form.lockTypeName"
-                placeholder="请输入挂锁类型名称"
+                :placeholder="$t('mes.lockType.lockTypeNamePlaceholder')"
               />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="19">
-            <el-form-item label="挂锁类型编码" prop="lockTypeCode">
+            <el-form-item :label="$t('mes.lockType.lockTypeCode')" prop="lockTypeCode">
               <el-input
                 style="width: 318px"
                 v-model="form.lockTypeCode"
-                placeholder="请输入挂锁类型编码"
+                :placeholder="$t('mes.lockType.lockTypeCodePlaceholder')"
               />
             </el-form-item>
           </el-col>
@@ -211,7 +211,7 @@
                 style="width: 170px"
                 v-model="autoGenFlag"
                 active-color="#13ce66"
-                active-text="自动生成"
+                :active-text="$t('mes.lockType.autoGenerate')"
                 @change="handleAutoGenChange(autoGenFlag)"
               >
               </el-switch>
@@ -220,12 +220,12 @@
         </el-row>
         <el-row>
           <el-col :span="10">
-            <el-form-item label="挂锁型号" prop="lockTypeSpec">
+            <el-form-item :label="$t('mes.lockType.lockTypeSpec')" prop="lockTypeSpec">
               <el-input
                 type="text"
                 style="width: 318px"
                 v-model="form.lockTypeSpec"
-                placeholder="请输入挂锁型号"
+                :placeholder="$t('mes.lockType.lockTypeSpecPlaceholder')"
               />
             </el-form-item>
 <!--            <el-form-item label="挂锁类型描述" prop="lockTypeDescription">-->
@@ -240,7 +240,7 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="挂锁类型图标" prop="lockTypeIcon">
+            <el-form-item :label="$t('mes.lockType.lockTypeIcon')" prop="lockTypeIcon">
               <ImageUploadSingle
                 :limit="1"
                 :value="form.lockTypeIcon"
@@ -251,7 +251,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="挂锁类型图片" prop="lockTypeImg">
+            <el-form-item :label="$t('mes.lockType.lockTypeImg')" prop="lockTypeImg">
               <ImageUploadSingle
                 :limit="1"
                 :value="form.lockTypeImg"
@@ -265,9 +265,9 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-no-more-click type="primary" @click="submitForm"
-          >确 定</el-button
+          >{{ $t('common.confirm') }}</el-button
         >
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -336,20 +336,19 @@ export default {
       },
       machinerytypeOptions: [], //硬件类型
       EditId: null, //判断是否是编辑弹框的值
-      // 表单校验
-      rules: {
-        // parentId: [
-        //   { required: true, message: '父级不能为空', trigger: 'blur' }
-        // ],
-
+    };
+  },
+  computed: {
+    rules() {
+      return {
         lockTypeCode: [
-          { required: true, message: "挂锁类型编号不能为空", trigger: "blur" },
+          { required: true, message: this.$t('mes.lockType.lockTypeCodeRequired'), trigger: "blur" },
         ],
         lockTypeName: [
-          { required: true, message: "挂锁类型名称不能为空", trigger: "blur" },
+          { required: true, message: this.$t('mes.lockType.lockTypeNameRequired'), trigger: "blur" },
         ],
-      },
-    };
+      };
+    }
   },
   created() {
     this.getList();
@@ -453,7 +452,7 @@ export default {
         this.form.parentTypeId = 0;
       }
       this.open = true;
-      this.title = "添加挂锁类型";
+      this.title = this.$t('mes.lockType.addLockType');
       listPadLockTypeAPI().then((response) => {
         this.deptOptions = this.handleTree(
           response.data.records,
@@ -482,7 +481,7 @@ export default {
           this.form.parentTypeId=null
         }
         this.open = true;
-        this.title = "修改挂锁类型";
+        this.title = this.$t('mes.lockType.editLockType');
       });
       listPadLockTypeAPI().then((response) => {
         this.deptOptions = this.handleTree(
@@ -500,14 +499,14 @@ export default {
         if (valid) {
           if (this.form.lockTypeId != undefined) {
             updatePadLockTypeAPI(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
+              this.$modal.msgSuccess(this.$t('common.editSuccess'));
               this.open = false;
               this.getList();
             });
           } else {
             console.log(this.form, "新增作业区域参数");
             addPadLockTypeAPI(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
+              this.$modal.msgSuccess(this.$t('common.addSuccess'));
               this.open = false;
               this.getList();
             });
@@ -518,13 +517,13 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       this.$modal
-        .confirm('是否确认删除编号为"' + row.lockTypeCode + '"的数据项?')
+        .confirm(this.$t('mes.lockType.deleteConfirm', { code: row.lockTypeCode }))
         .then(function () {
           return delPadLockTypeAPI(row.lockTypeId);
         })
         .then(() => {
           this.getList();
-          this.$modal.msgSuccess("删除成功");
+          this.$modal.msgSuccess(this.$t('common.deleteSuccess'));
         })
         .catch(() => {});
     },

+ 58 - 55
src/views/mes/sop/sopm/index.vue

@@ -16,10 +16,10 @@
       <!--          @keyup.enter.native="handleQuery"-->
       <!--        />-->
       <!--      </el-form-item>-->
-      <el-form-item label="SOP名称" prop="sopName">
+      <el-form-item :label="$t('mes.sop.sopName')" prop="sopName">
         <el-input
           v-model="queryParams.sopName"
-          placeholder="请输入sop名称"
+          :placeholder="$t('mes.sop.sopNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -32,14 +32,14 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索
+          >{{ $t('common.search') }}
         </el-button>
         <el-button
           v-no-more-click
           icon="el-icon-refresh"
           size="mini"
           @click="resetQuery"
-          >重置</el-button
+          >{{ $t('common.reset') }}</el-button
         >
       </el-form-item>
     </el-form>
@@ -53,7 +53,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['iscs:mars:sop:add']"
-          >新增
+          >{{ $t('common.add') }}
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -65,7 +65,7 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['iscs:sop:export']"
-          >导出</el-button
+          >{{ $t('common.export') }}</el-button
         >
       </el-col>
       <el-col :span="1.5">
@@ -77,7 +77,7 @@
           size="mini"
           @click="handleImport"
           v-hasPermi="['iscs:sop:import']"
-          >导入</el-button
+          >{{ $t('common.import') }}</el-button
         >
       </el-col>
       <!--      <el-col :span="1.5">-->
@@ -100,27 +100,27 @@
       <!--      <el-table-column prop="sopIndex" label="SOP序号" ></el-table-column>-->
       <el-table-column
         prop="sopName"
-        label="SOP名称"
+        :label="$t('mes.sop.sopName')"
         width="360"
       ></el-table-column>
-      <el-table-column prop="sopType" label="SOP类型">
+      <el-table-column prop="sopType" :label="$t('mes.sop.sopType')">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sop_type" :value="scope.row.sopType" />
         </template>
       </el-table-column>
-      <el-table-column prop="workstationName" label="所属岗位">
+      <el-table-column prop="workstationName" :label="$t('mes.sop.workstation')">
         <template slot-scope="scope">
           <span>{{ scope.row.workstationName }}</span>
         </template>
       </el-table-column>
 
-      <el-table-column prop="machineryName" label="设备/工艺">
+      <el-table-column prop="machineryName" :label="$t('mes.sop.machinery')">
         <template slot-scope="scope">
           {{ scope.row.machineryName }}
         </template>
       </el-table-column>
       <el-table-column
-        label="创建时间"
+        :label="$t('mes.sop.createTime')"
         align="center"
         prop="createTime"
         width="200"
@@ -130,7 +130,7 @@
         </template>
       </el-table-column>
       <el-table-column
-        label="操作"
+        :label="$t('common.operation')"
         align="center"
         class-name="small-padding fixed-width"
       >
@@ -142,7 +142,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['iscs:mars:sop:edit', 'iscs:mars:sop:query']"
-            >修改
+            >{{ $t('common.edit') }}
           </el-button>
 
           <!--          v-if="scope.row.parentId != 0"-->
@@ -153,7 +153,7 @@
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['iscs:mars:sop:remove']"
-            >删除
+            >{{ $t('common.delete') }}
           </el-button>
         </template>
       </el-table-column>
@@ -197,12 +197,12 @@
         <!--          </el-col>-->
         <!--        </el-row>-->
 
-        <el-form-item label="所属岗位" prop="workstationId">
+        <el-form-item :label="$t('mes.sop.workstation')" prop="workstationId">
           <treeselect
             v-model="form.workstationId"
             :options="marsOptions"
             :normalizer="Marsnormalizer"
-            placeholder="选择岗位"
+            :placeholder="$t('mes.sop.selectWorkstation')"
             @change="handleWorkstationChange"
           />
         </el-form-item>
@@ -220,18 +220,18 @@
         <!--            />-->
         <!--          </el-select>-->
         <!--        </el-form-item>-->
-        <el-form-item label="设备/工艺" prop="machineryId">
+        <el-form-item :label="$t('mes.sop.machinery')" prop="machineryId">
           <treeselect
             v-model="form.machineryId"
             :options="machineryOptions"
             :normalizer="machinerynormalizer"
-            placeholder="选择设备/工艺"
+            :placeholder="$t('mes.sop.selectMachinery')"
           />
         </el-form-item>
-        <el-form-item label="SOP类型" prop="sopType" >
+        <el-form-item :label="$t('mes.sop.sopType')" prop="sopType" >
           <el-select
             v-model="form.sopType"
-            placeholder="请选择SOP类型"
+            :placeholder="$t('mes.sop.sopTypePlaceholder')"
             clearable
 
           >
@@ -247,9 +247,9 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-no-more-click type="primary" @click="submitForm"
-          >确 定</el-button
+          >{{ $t('common.confirm') }}</el-button
         >
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
     <!--    导入文件-->
@@ -272,28 +272,28 @@
         drag
       >
         <i class="el-icon-upload"></i>
-        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__text">{{ $t('mes.sop.dragFileText') }}<em>{{ $t('mes.sop.clickUpload') }}</em></div>
         <div class="el-upload__tip text-center" slot="tip">
           <div class="el-upload__tip" slot="tip">
             <el-checkbox v-model="upload.updateSupport" />
-            是否更新已经存在的用户数据
+            {{ $t('mes.sop.updateExistingData') }}
           </div>
-          <span>仅允许导入xls、xlsx格式文件。</span>
+          <span>{{ $t('mes.sop.onlyXlsXlsx') }}</span>
           <el-link
             type="primary"
             :underline="false"
             style="font-size: 12px; vertical-align: baseline"
             @click="importTemplate"
-            >下载模板</el-link
+            >{{ $t('mes.sop.downloadTemplate') }}</el-link
           >
         </div>
       </el-upload>
       <div slot="footer" class="dialog-footer">
         <el-button v-no-more-click type="primary" @click="submitFileForm"
-          >确 定</el-button
+          >{{ $t('common.confirm') }}</el-button
         >
         <el-button v-no-more-click @click="upload.open = false"
-          >取 消</el-button
+          >{{ $t('common.cancel') }}</el-button
         >
       </div>
     </el-dialog>
@@ -363,24 +363,6 @@ export default {
       form: {
         machineryId: "",
       },
-      // 表单校验
-      rules: {
-        sopCode: [
-          { required: true, message: "SOP编码不能为空", trigger: "blur" },
-        ],
-        sopName: [
-          { required: true, message: "SOP名称不能为空", trigger: "blur" },
-        ],
-        workstationId: [
-          { required: true, message: "岗位不能为空", trigger: "blur" },
-        ],
-        lotoId: [
-          { required: true, message: "锁定站不能为空", trigger: "blur" },
-        ],
-        machineryId: [
-          { required: true, message: "设备/工艺不能为空", trigger: "blur" },
-        ],
-      },
       // 用户导入参数
       upload: {
         // 是否显示弹出层(用户导入)
@@ -398,6 +380,27 @@ export default {
       },
     };
   },
+  computed: {
+    rules() {
+      return {
+        sopCode: [
+          { required: true, message: this.$t('mes.sop.sopCodeRequired'), trigger: "blur" },
+        ],
+        sopName: [
+          { required: true, message: this.$t('mes.sop.sopNameRequired'), trigger: "blur" },
+        ],
+        workstationId: [
+          { required: true, message: this.$t('mes.sop.workstationRequired'), trigger: "blur" },
+        ],
+        lotoId: [
+          { required: true, message: this.$t('mes.sop.lotoRequired'), trigger: "blur" },
+        ],
+        machineryId: [
+          { required: true, message: this.$t('mes.sop.machineryRequired'), trigger: "blur" },
+        ],
+      };
+    }
+  },
   created() {
     this.getList();
     this.getOtherList();
@@ -548,7 +551,7 @@ export default {
     handleAdd(row) {
       this.reset();
       this.open = true;
-      this.title = "新增SOP";
+      this.title = this.$t('mes.sop.addSop');
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -560,7 +563,7 @@ export default {
         setTimeout(() => {
           this.isEditing = false;
         }, 1000);
-        this.title = "修改SOP";
+        this.title = this.$t('mes.sop.editSop');
       });
     },
     /** 提交按钮 */
@@ -569,14 +572,14 @@ export default {
         if (valid) {
           if (this.form.sopId != undefined) {
             updateIsMarsSop(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
+              this.$modal.msgSuccess(this.$t('mes.sop.editSuccess'));
               this.open = false;
 
               this.getList();
             });
           } else {
             addinsertIsMarsSop(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
+              this.$modal.msgSuccess(this.$t('mes.sop.addSuccess'));
               this.open = false;
               this.getList();
             });
@@ -588,13 +591,13 @@ export default {
     // confirm('是否确认删除名称为"' + row.sopName + '"的数据项?')
     handleDelete(row) {
       this.$modal
-        .confirm("是否确认删除所选数据项?")
+        .confirm(this.$t('mes.sop.deleteConfirm'))
         .then(function () {
           return deleteIsMarsSopByMarsSopIds(row.sopId);
         })
         .then(() => {
           this.getList();
-          this.$modal.msgSuccess("删除成功");
+          this.$modal.msgSuccess(this.$t('mes.sop.deleteSuccess'));
         })
         .catch(() => {});
     },
@@ -610,7 +613,7 @@ export default {
     },
     /** 导入按钮操作 */
     handleImport() {
-      this.upload.title = "sop导入";
+      this.upload.title = this.$t('mes.sop.importTitle');
       this.upload.open = true;
     },
     /** 下载模板操作 */
@@ -634,7 +637,7 @@ export default {
         "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
           response.msg +
           "</div>",
-        "导入结果",
+        this.$t('mes.sop.importResult'),
         { dangerouslyUseHTMLString: true }
       );
       this.getList();

+ 23 - 21
src/views/mes/statisticians/LockerChange.vue

@@ -41,9 +41,19 @@ export default {
         startTime: null,
         endTime: null,
       },
-      pickerOptions: {
+    }
+  },
+  computed: {
+    dateRange() {
+      return {
+        startTime: this.startTime,
+        endTime: this.endTime
+      };
+    },
+    pickerOptions() {
+      return {
         shortcuts: [{
-          text: '最近一周',
+          text: this.$t('mes.statisticians.lastWeek'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -51,7 +61,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近一个月',
+          text: this.$t('mes.statisticians.lastMonth'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -59,7 +69,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近三个月',
+          text: this.$t('mes.statisticians.lastThreeMonths'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -67,14 +77,6 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }]
-      },
-    }
-  },
-  computed: {
-    dateRange() {
-      return {
-        startTime: this.startTime,
-        endTime: this.endTime
       };
     }
   },
@@ -139,7 +141,7 @@ export default {
       // 配置图表的选项
       const options = {
         title: {
-          text: '物资更换统计',
+          text: this.$t('mes.statisticians.materialsChangeStats'),
           left: 'center',
           top: '0%'
         },
@@ -161,7 +163,7 @@ export default {
         //   }
         // },
         legend: {
-          data: ['正常更换次数','过期更换次数','损坏更换次数'],
+          data: [this.$t('mes.statisticians.normalChangeCount'), this.$t('mes.statisticians.expireChangeCount'), this.$t('mes.statisticians.damageChangeCount')],
           top: '6%',  // 调整图例距离顶部的距离,确保图例在标题下方
           left: 'center',  // 图例居中显示
         },
@@ -184,9 +186,9 @@ export default {
         yAxis: [
           {
             type: 'value',
-            name: '次数',
+            name: this.$t('mes.statisticians.times'),
             axisLabel: {
-              formatter: '{value} '  // 修改单位为 次
+              formatter: `{value} ${this.$t('mes.statisticians.timesUnit')}`  // 修改单位为 次
             },
             splitLine: {
               show: false  // 隐藏纵向的网格线
@@ -195,13 +197,13 @@ export default {
         ],
         series: [
           {
-            name: '正常更换次数',  // 修改为适当的名称
+            name: this.$t('mes.statisticians.normalChangeCount'),  // 修改为适当的名称
             type: 'bar',
             stack: 'Ad',  // 启用堆叠效果
             barWidth: '25%',
             tooltip: {
-              valueFormatter: function (value) {
-                return value + ' 次';  // 修改单位为 次
+              valueFormatter: (value) => {
+                return value + ' ' + this.$t('mes.statisticians.timesUnit');  // 修改单位为 次
               }
             },
             data: allCount,
@@ -210,7 +212,7 @@ export default {
             }
           },
           {
-            name: '过期更换次数',
+            name: this.$t('mes.statisticians.expireChangeCount'),
             type: 'bar',
             stack: 'Ad',
             emphasis: {
@@ -222,7 +224,7 @@ export default {
             }
           },
           {
-            name: '损坏更换次数',
+            name: this.$t('mes.statisticians.damageChangeCount'),
             type: 'bar',
             stack: 'Ad',
             emphasis: {

+ 21 - 19
src/views/mes/statisticians/LockerCollection.vue

@@ -41,9 +41,19 @@ export default {
         startTime: null,
         endTime: null,
       },
-      pickerOptions: {
+    }
+  },
+  computed: {
+    dateRange() {
+      return {
+        startTime: this.startTime,
+        endTime: this.endTime
+      };
+    },
+    pickerOptions() {
+      return {
         shortcuts: [{
-          text: '最近一周',
+          text: this.$t('mes.statisticians.lastWeek'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -51,7 +61,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近一个月',
+          text: this.$t('mes.statisticians.lastMonth'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -59,7 +69,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近三个月',
+          text: this.$t('mes.statisticians.lastThreeMonths'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -67,14 +77,6 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }]
-      },
-    }
-  },
-  computed: {
-    dateRange() {
-      return {
-        startTime: this.startTime,
-        endTime: this.endTime
       };
     }
   },
@@ -138,7 +140,7 @@ export default {
       // 配置图表的选项
       const options = {
         title: {
-          text: '物资领取统计',
+          text: this.$t('mes.statisticians.materialsLoanStats'),
           left: 'center',
           top: '0%'
         },
@@ -160,7 +162,7 @@ export default {
         //   }
         // },
         legend: {
-          data: ['领取次数'],
+          data: [this.$t('mes.statisticians.loanCount')],
           top: '6%',  // 调整图例距离顶部的距离,确保图例在标题下方
           left: 'center',  // 图例居中显示
         },
@@ -183,9 +185,9 @@ export default {
         yAxis: [
           {
             type: 'value',
-            name: '次数',
+            name: this.$t('mes.statisticians.times'),
             axisLabel: {
-              formatter: '{value} 次'  // 修改单位为 次
+              formatter: `{value} ${this.$t('mes.statisticians.timesUnit')}`  // 修改单位为 次
             },
             splitLine: {
               show: false  // 隐藏纵向的网格线
@@ -194,12 +196,12 @@ export default {
         ],
         series: [
           {
-            name: '领取次数',  // 修改为适当的名称
+            name: this.$t('mes.statisticians.loanCount'),  // 修改为适当的名称
             type: 'bar',
             barWidth: '25%',
             tooltip: {
-              valueFormatter: function (value) {
-                return value + ' 次';  // 修改单位为 次
+              valueFormatter: (value) => {
+                return value + ' ' + this.$t('mes.statisticians.timesUnit');  // 修改单位为 次
               }
             },
             data: allCount,

+ 27 - 25
src/views/mes/statisticians/LockerDaily.vue

@@ -41,9 +41,19 @@ export default {
         startTime: null,
         endTime: null,
       },
-      pickerOptions: {
+    }
+  },
+  computed: {
+    dateRange() {
+      return {
+        startTime: this.startTime,
+        endTime: this.endTime
+      };
+    },
+    pickerOptions() {
+      return {
         shortcuts: [{
-          text: '最近一周',
+          text: this.$t('mes.statisticians.lastWeek'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -51,7 +61,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近一个月',
+          text: this.$t('mes.statisticians.lastMonth'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -59,7 +69,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近三个月',
+          text: this.$t('mes.statisticians.lastThreeMonths'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -67,14 +77,6 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }]
-      },
-    }
-  },
-  computed: {
-    dateRange() {
-      return {
-        startTime: this.startTime,
-        endTime: this.endTime
       };
     }
   },
@@ -147,7 +149,7 @@ export default {
       // 配置图表的选项
       const options = {
         title: {
-          text: '每日领取归还统计',
+          text: this.$t('mes.statisticians.dailyLoanReturnStats'),
           left: 'center',
           top: '0%'
         },
@@ -169,7 +171,7 @@ export default {
         //   }
         // },
         legend: {
-          data: ['累计领取次数', '累计正常归还次数', '累计超时归还次数'],
+          data: [this.$t('mes.statisticians.totalLoanCount'), this.$t('mes.statisticians.totalNormalReturnCount'), this.$t('mes.statisticians.totalTimeoutReturnCount')],
           top: '6%',  // 调整图例距离顶部的距离,确保图例在标题下方
           left: 'center',  // 图例居中显示
         },
@@ -192,9 +194,9 @@ export default {
         yAxis: [
           {
             type: 'value',
-            name: '次数',
+            name: this.$t('mes.statisticians.times'),
             axisLabel: {
-              formatter: '{value} 次'  // 修改单位为 次
+              formatter: `{value} ${this.$t('mes.statisticians.timesUnit')}`  // 修改单位为 次
             },
             splitLine: {
               show: false  // 隐藏纵向的网格线
@@ -203,13 +205,13 @@ export default {
         ],
         series: [
           {
-            name: '累计领取次数',
+            name: this.$t('mes.statisticians.totalLoanCount'),
             type: 'bar',  // 改为柱状图
             barWidth:'40%',
             // stack: 'total',  // 启用堆叠效果
             tooltip: {
-              valueFormatter: function (value) {
-                return value + ' 次';
+              valueFormatter: (value) => {
+                return value + ' ' + this.$t('mes.statisticians.timesUnit');
               }
             },
             data: allCount,
@@ -218,13 +220,13 @@ export default {
             }
           },
           {
-            name: '累计正常归还次数',
+            name: this.$t('mes.statisticians.totalNormalReturnCount'),
             type: 'bar',  // 改为柱状图
             barWidth:'40%',
             stack: 'total',  // 启用堆叠效果
             tooltip: {
-              valueFormatter: function (value) {
-                return value + ' 次';
+              valueFormatter: (value) => {
+                return value + ' ' + this.$t('mes.statisticians.timesUnit');
               }
             },
             data: returnCount,
@@ -233,12 +235,12 @@ export default {
             }
           },
           {
-            name: '累计超时归还次数',
+            name: this.$t('mes.statisticians.totalTimeoutReturnCount'),
             type: 'bar',  // 改为柱状图
             stack: 'total',  // 启用堆叠效果
             tooltip: {
-              valueFormatter: function (value) {
-                return value + ' 次';
+              valueFormatter: (value) => {
+                return value + ' ' + this.$t('mes.statisticians.timesUnit');
               }
             },
             data: timeoutCount,

+ 21 - 19
src/views/mes/statisticians/LockerLending.vue

@@ -41,9 +41,19 @@ export default {
         startTime: null,
         endTime: null,
       },
-      pickerOptions: {
+    }
+  },
+  computed: {
+    dateRange() {
+      return {
+        startTime: this.startTime,
+        endTime: this.endTime
+      };
+    },
+    pickerOptions() {
+      return {
         shortcuts: [{
-          text: '最近一周',
+          text: this.$t('mes.statisticians.lastWeek'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -51,7 +61,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近一个月',
+          text: this.$t('mes.statisticians.lastMonth'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -59,7 +69,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近三个月',
+          text: this.$t('mes.statisticians.lastThreeMonths'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -67,14 +77,6 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }]
-      },
-    }
-  },
-  computed: {
-    dateRange() {
-      return {
-        startTime: this.startTime,
-        endTime: this.endTime
       };
     }
   },
@@ -142,7 +144,7 @@ export default {
       // 配置图表的选项
       const options = {
         title: {
-          text: '物资借出平均时长',
+          text: this.$t('mes.statisticians.materialsLoanAvgDuration'),
           left: 'center',
           top: '0%'
         },
@@ -164,7 +166,7 @@ export default {
         //   }
         // },
         legend: {
-          data: ['平均借出时长(小时)'],
+          data: [this.$t('mes.statisticians.avgLoanDuration')],
           top: '6%',  // 调整图例距离顶部的距离,确保图例在标题下方
           left: 'center',  // 图例居中显示
         },
@@ -187,9 +189,9 @@ export default {
         yAxis: [
           {
             type: 'value',
-            name: '小时',
+            name: this.$t('mes.statisticians.hour'),
             axisLabel: {
-              formatter: '{value} 小时'  // 修改单位为 小时
+              formatter: `{value} ${this.$t('mes.statisticians.hour')}`  // 修改单位为 小时
             },
             splitLine: {
               show: false  // 隐藏纵向的网格线
@@ -198,12 +200,12 @@ export default {
         ],
         series: [
           {
-            name: '平均借出时长(小时)',  // 修改为适当的名称
+            name: this.$t('mes.statisticians.avgLoanDuration'),  // 修改为适当的名称
             type: 'bar',
             barWidth: '25%',
             tooltip: {
-              valueFormatter: function (value) {
-                return value + ' 小时';  // 修改单位为 小时
+              valueFormatter: (value) => {
+                return value + ' ' + this.$t('mes.statisticians.hour');  // 修改单位为 小时
               }
             },
             data: averageTime,

+ 20 - 18
src/views/mes/statisticians/LockerMistake.vue

@@ -31,10 +31,20 @@ export default {
         startTime: null,
         endTime: null
       },
-      pickerOptions: {
+    }
+  },
+  computed: {
+    dateRange() {
+      return {
+        startTime: this.startTime,
+        endTime: this.endTime
+      }
+    },
+    pickerOptions() {
+      return {
         shortcuts: [
           {
-            text: '最近一周',
+            text: this.$t('mes.statisticians.lastWeek'),
             onClick(picker) {
               const end = new Date()
               const start = new Date()
@@ -43,7 +53,7 @@ export default {
             }
           },
           {
-            text: '最近一个月',
+            text: this.$t('mes.statisticians.lastMonth'),
             onClick(picker) {
               const end = new Date()
               const start = new Date()
@@ -52,7 +62,7 @@ export default {
             }
           },
           {
-            text: '最近三个月',
+            text: this.$t('mes.statisticians.lastThreeMonths'),
             onClick(picker) {
               const end = new Date()
               const start = new Date()
@@ -61,15 +71,7 @@ export default {
             }
           }
         ]
-      }
-    }
-  },
-  computed: {
-    dateRange() {
-      return {
-        startTime: this.startTime,
-        endTime: this.endTime
-      }
+      };
     }
   },
   watch: {
@@ -128,7 +130,7 @@ export default {
         // 配置柱状图的选项
         const options = {
           title: {
-            text: '物资柜异常统计',
+            text: this.$t('mes.statisticians.cabinetExceptionStats'),
             left: 'center',
           },
           tooltip: {
@@ -138,7 +140,7 @@ export default {
             }
           },
           legend: {
-            data: ['物资错放', '超时未关'],
+            data: [this.$t('mes.statisticians.misplaced'), this.$t('mes.statisticians.timeoutNotClosed')],
             top: '6%',
             left: 'center',
             textStyle: {
@@ -163,14 +165,14 @@ export default {
           },
           yAxis: {
             type: 'value',
-            name: '次数',
+            name: this.$t('mes.statisticians.times'),
             splitLine: {
               show: false  // 隐藏纵向的网格线
             }
           },
           series: [
             {
-              name: '物资错放',
+              name: this.$t('mes.statisticians.misplaced'),
               type: 'bar',
               stack: '异常情况',
               barWidth: '25',
@@ -180,7 +182,7 @@ export default {
               }
             },
             {
-              name: '超时未关',
+              name: this.$t('mes.statisticians.timeoutNotClosed'),
               type: 'bar',
               stack: '异常情况',
               data: timeoutData, // 超时未关数据

+ 14 - 10
src/views/mes/statisticians/LockerOne.vue

@@ -1,16 +1,16 @@
 <template>
   <div>
     <div style="width: 100%;">
-      <span style="margin: 10px;">统计区间:</span>
+      <span style="margin: 10px;">{{ $t('mes.statisticians.statisticsRange') }}:</span>
       <el-date-picker
         style="margin: 10px"
         v-model="value2"
         type="datetimerange"
         align="right"
         unlink-panels
-        range-separator="至"
-        start-placeholder="开始日期"
-        end-placeholder="结束日期"
+        :range-separator="$t('common.to')"
+        :start-placeholder="$t('common.startDate')"
+        :end-placeholder="$t('common.endDate')"
         :picker-options="pickerOptions"
       >
       </el-date-picker>
@@ -21,7 +21,7 @@
                  size="mini"
                  @click="handleExport"
 
-      >导出数据表</el-button>
+      >{{ $t('mes.statisticians.exportDataTable') }}</el-button>
     </div>
     <div style="display: flex; flex-wrap: wrap; gap: 10px;">
       <div style="flex: 1 1 45%; min-width: 620px;"> <!-- Adjust width and allow flexibility -->
@@ -68,9 +68,13 @@ export default {
         startTime: null,
         endTime: null
       },
-      pickerOptions: {
+    }
+  },
+  computed: {
+    pickerOptions() {
+      return {
         shortcuts: [{
-          text: '最近一周',
+          text: this.$t('mes.statisticians.lastWeek'),
           onClick(picker) {
             const end = new Date()
             const start = new Date()
@@ -78,7 +82,7 @@ export default {
             picker.$emit('pick', [start, end])
           }
         }, {
-          text: '最近一个月',
+          text: this.$t('mes.statisticians.lastMonth'),
           onClick(picker) {
             const end = new Date()
             const start = new Date()
@@ -86,7 +90,7 @@ export default {
             picker.$emit('pick', [start, end])
           }
         }, {
-          text: '最近三个月',
+          text: this.$t('mes.statisticians.lastThreeMonths'),
           onClick(picker) {
             const end = new Date()
             const start = new Date()
@@ -94,7 +98,7 @@ export default {
             picker.$emit('pick', [start, end])
           }
         }]
-      }
+      };
     }
   },
   watch: {

+ 21 - 19
src/views/mes/statisticians/LockerOpen.vue

@@ -41,9 +41,19 @@ export default {
         startTime: null,
         endTime: null,
       },
-      pickerOptions: {
+    }
+  },
+  computed: {
+    dateRange() {
+      return {
+        startTime: this.startTime,
+        endTime: this.endTime
+      };
+    },
+    pickerOptions() {
+      return {
         shortcuts: [{
-          text: '最近一周',
+          text: this.$t('mes.statisticians.lastWeek'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -51,7 +61,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近一个月',
+          text: this.$t('mes.statisticians.lastMonth'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -59,7 +69,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近三个月',
+          text: this.$t('mes.statisticians.lastThreeMonths'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -67,14 +77,6 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }]
-      },
-    }
-  },
-  computed: {
-    dateRange() {
-      return {
-        startTime: this.startTime,
-        endTime: this.endTime
       };
     }
   },
@@ -139,7 +141,7 @@ export default {
       // 配置图表的选项
       const options = {
         title: {
-          text: '物资柜开关次数',
+          text: this.$t('mes.statisticians.cabinetOpenCloseCount'),
           left: 'center',
           top: '0%'
         },
@@ -161,7 +163,7 @@ export default {
         //   }
         // },
         legend: {
-          data: ['开关次数'],
+          data: [this.$t('mes.statisticians.openCloseCount')],
           top: '6%',  // 调整图例距离顶部的距离,确保图例在标题下方
           left: 'center',  // 图例居中显示
         },
@@ -184,9 +186,9 @@ export default {
         yAxis: [
           {
             type: 'value',
-            name: '次数',
+            name: this.$t('mes.statisticians.times'),
             axisLabel: {
-              formatter: '{value} 次'  // 修改单位为 次
+              formatter: `{value} ${this.$t('mes.statisticians.timesUnit')}`  // 修改单位为 次
             },
             splitLine: {
               show: false  // 隐藏纵向的网格线
@@ -195,12 +197,12 @@ export default {
         ],
         series: [
           {
-            name: '开关次数',  // 修改为适当的名称
+            name: this.$t('mes.statisticians.openCloseCount'),  // 修改为适当的名称
             type: 'bar',
             barWidth: '20',
             tooltip: {
-              valueFormatter: function (value) {
-                return value + ' 次';  // 修改单位为 次
+              valueFormatter: (value) => {
+                return value + ' ' + this.$t('mes.statisticians.timesUnit');  // 修改单位为 次
               }
             },
             data: openCounts,

+ 22 - 21
src/views/mes/statisticians/LockerReturn.vue

@@ -41,9 +41,19 @@ export default {
         startTime: null,
         endTime: null,
       },
-      pickerOptions: {
+    }
+  },
+  computed: {
+    dateRange() {
+      return {
+        startTime: this.startTime,
+        endTime: this.endTime
+      };
+    },
+    pickerOptions() {
+      return {
         shortcuts: [{
-          text: '最近一周',
+          text: this.$t('mes.statisticians.lastWeek'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -51,7 +61,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近一个月',
+          text: this.$t('mes.statisticians.lastMonth'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -59,7 +69,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近三个月',
+          text: this.$t('mes.statisticians.lastThreeMonths'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -67,14 +77,6 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }]
-      },
-    }
-  },
-  computed: {
-    dateRange() {
-      return {
-        startTime: this.startTime,
-        endTime: this.endTime
       };
     }
   },
@@ -139,7 +141,7 @@ export default {
       // 配置图表的选项
       const options = {
         title: {
-          text: '物资归还统计',
+          text: this.$t('mes.statisticians.materialsReturnStats'),
           left: 'center',
           top: '0%'
         },
@@ -161,7 +163,7 @@ export default {
         //   }
         // },
         legend: {
-          data: ['正常归还次数','超时归还次数'],
+          data: [this.$t('mes.statisticians.normalReturnCount'), this.$t('mes.statisticians.timeoutReturnCount')],
           top: '6%',  // 调整图例距离顶部的距离,确保图例在标题下方
           left: 'center',  // 图例居中显示
         },
@@ -184,9 +186,9 @@ export default {
         yAxis: [
           {
             type: 'value',
-            name: '次数',
+            name: this.$t('mes.statisticians.times'),
             axisLabel: {
-              formatter: '{value} '  // 修改单位为 次
+              formatter: `{value} ${this.$t('mes.statisticians.timesUnit')}`  // 修改单位为 次
             },
             splitLine: {
               show: false  // 隐藏纵向的网格线
@@ -195,13 +197,13 @@ export default {
         ],
         series: [
           {
-            name: '正常归还次数',  // 修改为适当的名称
+            name: this.$t('mes.statisticians.normalReturnCount'),  // 修改为适当的名称
             type: 'bar',
             stack: 'Ad',
             barWidth: '25%',
             tooltip: {
-              valueFormatter: function (value) {
-                return value + ' 次';  // 修改单位为 次
+              valueFormatter: (value) => {
+                return value + ' ' + this.$t('mes.statisticians.timesUnit');  // 修改单位为 次
               }
             },
             data: returnCount,
@@ -209,9 +211,8 @@ export default {
               color: '#5470c6',  // 设置柱子的颜色为蓝色(你可以根据需要修改)
             }
           },
-          ,
           {
-            name: '超时归还次数',
+            name: this.$t('mes.statisticians.timeoutReturnCount'),
             type: 'bar',
             stack: 'Ad',
             emphasis: {

+ 24 - 22
src/views/mes/statisticians/LockerSpeciality.vue

@@ -43,9 +43,20 @@ export default {
         startTime: null,
         endTime: null,
       },
-      pickerOptions: {
+
+    }
+  },
+  computed: {
+    dateRange() {
+      return {
+        startTime: this.startTime,
+        endTime: this.endTime
+      };
+    },
+    pickerOptions() {
+      return {
         shortcuts: [{
-          text: '最近一周',
+          text: this.$t('mes.statisticians.lastWeek'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -53,7 +64,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近一个月',
+          text: this.$t('mes.statisticians.lastMonth'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -61,7 +72,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近三个月',
+          text: this.$t('mes.statisticians.lastThreeMonths'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -69,15 +80,6 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }]
-      },
-
-    }
-  },
-  computed: {
-    dateRange() {
-      return {
-        startTime: this.startTime,
-        endTime: this.endTime
       };
     }
   },
@@ -143,7 +145,7 @@ export default {
       // 配置图表的选项
       const options = {
         title: {
-          text: '特殊状态物资统计(当前时刻)',
+          text: this.$t('mes.statisticians.specialStatusStats'),
           left: 'center',
           top: '0%'
         },
@@ -165,7 +167,7 @@ export default {
         //   }
         // },
         legend: {
-          data: ['即将过期','已过期','损坏数'],
+          data: [this.$t('mes.statisticians.aboutToExpire'), this.$t('mes.statisticians.expired'), this.$t('mes.statisticians.damaged')],
           top: '6%',  // 调整图例距离顶部的距离,确保图例在标题下方
           left: 'center',  // 图例居中显示
         },
@@ -188,9 +190,9 @@ export default {
         yAxis: [
           {
             type: 'value',
-            name: '个',
+            name: this.$t('mes.statisticians.countUnit'),
             axisLabel: {
-              formatter: '{value} '  // 修改单位为 次
+              formatter: `{value} ${this.$t('mes.statisticians.countUnit')}`  // 修改单位为 次
             },
             splitLine: {
               show: false  // 隐藏纵向的网格线
@@ -199,13 +201,13 @@ export default {
         ],
         series: [
           {
-            name: '即将过期',  // 修改为适当的名称
+            name: this.$t('mes.statisticians.aboutToExpire'),  // 修改为适当的名称
             type: 'bar',
             stack: 'Ad',
             barWidth: '25%',
             tooltip: {
-              valueFormatter: function (value) {
-                return value + ' 次';  // 修改单位为 次
+              valueFormatter: (value) => {
+                return value + ' ' + this.$t('mes.statisticians.countUnit');  // 修改单位为 次
               }
             },
             data: willExpireCount,
@@ -214,7 +216,7 @@ export default {
             }
           },
           {
-            name: '已过期',
+            name: this.$t('mes.statisticians.expired'),
             type: 'bar',
             stack: 'Ad',
             emphasis: {
@@ -226,7 +228,7 @@ export default {
             }
           },
           {
-            name: '损坏数',
+            name: this.$t('mes.statisticians.damaged'),
             type: 'bar',
             stack: 'Ad',
             emphasis: {

+ 14 - 10
src/views/mes/statisticians/LockerTwo.vue

@@ -1,16 +1,16 @@
 <template>
   <div>
     <div style="width: 100%;">
-      <span style="margin: 10px;">统计区间:</span>
+      <span style="margin: 10px;">{{ $t('mes.statisticians.statisticsRange') }}:</span>
       <el-date-picker
         style="margin: 10px"
         v-model="value2"
         type="datetimerange"
         align="right"
         unlink-panels
-        range-separator="至"
-        start-placeholder="开始日期"
-        end-placeholder="结束日期"
+        :range-separator="$t('common.to')"
+        :start-placeholder="$t('common.startDate')"
+        :end-placeholder="$t('common.endDate')"
         :picker-options="pickerOptions" >
       </el-date-picker>
       <el-button v-no-more-click
@@ -20,7 +20,7 @@
                  size="mini"
                  @click="handleExport"
 
-      >导出数据表</el-button>
+      >{{ $t('mes.statisticians.exportDataTable') }}</el-button>
     </div>
     <div style="display: flex; flex-wrap: wrap; gap: 10px;">
       <div style="flex: 1 1 45%; min-width: 620px;"> <!-- Adjust width and allow flexibility -->
@@ -72,9 +72,13 @@ export default {
         startTime: null,
         endTime: null,
       },
-      pickerOptions: {
+    }
+  },
+  computed: {
+    pickerOptions() {
+      return {
         shortcuts: [{
-          text: '最近一周',
+          text: this.$t('mes.statisticians.lastWeek'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -82,7 +86,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近一个月',
+          text: this.$t('mes.statisticians.lastMonth'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -90,7 +94,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }, {
-          text: '最近三个月',
+          text: this.$t('mes.statisticians.lastThreeMonths'),
           onClick(picker) {
             const end = new Date();
             const start = new Date();
@@ -98,7 +102,7 @@ export default {
             picker.$emit('pick', [start, end]);
           }
         }]
-      },
+      };
     }
   },
   watch: {

+ 57 - 54
src/views/mes/tm/tooltype/index.vue

@@ -1,24 +1,24 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
-      <el-form-item label="类型编码" prop="toolTypeCode">
+      <el-form-item :label="$t('mes.toolType.toolTypeCode')" prop="toolTypeCode">
         <el-input
           v-model="queryParams.toolTypeCode"
-          placeholder="请输入类型编码"
+          :placeholder="$t('mes.toolType.toolTypeCodePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="类型名称" prop="toolTypeName">
+      <el-form-item :label="$t('mes.toolType.toolTypeName')" prop="toolTypeName">
         <el-input
           v-model="queryParams.toolTypeName"
-          placeholder="请输入类型名称"
+          :placeholder="$t('mes.toolType.toolTypeNamePlaceholder')"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="保养维护类型" prop="maintenType">
-        <el-select v-model="queryParams.maintenType" placeholder="请选择保养维护类型" clearable>
+      <el-form-item :label="$t('mes.toolType.maintenType')" prop="maintenType">
+        <el-select v-model="queryParams.maintenType" :placeholder="$t('mes.toolType.maintenTypePlaceholder')" clearable>
           <el-option
             v-for="dict in dict.type.mes_mainten_type"
             :key="dict.value"
@@ -28,8 +28,8 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button v-no-more-click type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button v-no-more-click icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button v-no-more-click type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('common.search') }}</el-button>
+        <el-button v-no-more-click icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</el-button>
       </el-form-item>
     </el-form>
 
@@ -42,7 +42,7 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['mes:tm:tooltype:add']"
-        >新增</el-button>
+        >{{ $t('common.add') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -53,7 +53,7 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['mes:tm:tooltype:edit']"
-        >修改</el-button>
+        >{{ $t('common.edit') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -64,7 +64,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['mes:tm:tooltype:remove']"
-        >删除</el-button>
+        >{{ $t('common.delete') }}</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button v-no-more-click
@@ -74,14 +74,14 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['mes:tm:tooltype:export']"
-        >导出</el-button>
+        >{{ $t('common.export') }}</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="tooltypeList" @selection-change="handleSelectionChange">      
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="类型编码" align="center" prop="toolTypeCode" >
+      <el-table-column :label="$t('mes.toolType.toolTypeCode')" align="center" prop="toolTypeCode" >
         <template slot-scope="scope">
           <el-button v-no-more-click
             type="text"
@@ -90,27 +90,27 @@
           >{{scope.row.toolTypeCode}}</el-button>
         </template>
       </el-table-column>
-      <el-table-column label="类型名称" align="center" prop="toolTypeName" :show-overflow-tooltip="true"/>
-      <el-table-column label="是否编码管理" align="center" prop="codeFlag">
+      <el-table-column :label="$t('mes.toolType.toolTypeName')" align="center" prop="toolTypeName" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('mes.toolType.codeFlag')" align="center" prop="codeFlag">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.codeFlag"/>
         </template>
       </el-table-column>
-      <el-table-column label="保养维护类型" align="center" prop="maintenType">
+      <el-table-column :label="$t('mes.toolType.maintenType')" align="center" prop="maintenType">
         <template slot-scope="scope">
           <dict-tag v-if="scope.row.codeFlag =='Y'" :options="dict.type.mes_mainten_type" :value="scope.row.maintenType"/>
-          <span v-else>{{ "无"  }}</span>
+          <span v-else>{{ $t('mes.toolType.none') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="保养周期" align="center" prop="maintenPeriod" >
+      <el-table-column :label="$t('mes.toolType.maintenPeriod')" align="center" prop="maintenPeriod" >
         <template slot-scope="scope">
-          <span v-if="scope.row.codeFlag =='Y' && scope.row.maintenType =='REGULAR'">{{ scope.row.maintenPeriod +"天"  }}</span>
-          <span v-else-if="scope.row.codeFlag =='Y' && scope.row.maintenType =='USAGE'">{{ scope.row.maintenPeriod +"次"  }}</span>
-          <span v-else>{{ "无"  }}</span>
+          <span v-if="scope.row.codeFlag =='Y' && scope.row.maintenType =='REGULAR'">{{ scope.row.maintenPeriod }}{{ $t('mes.toolType.day') }}</span>
+          <span v-else-if="scope.row.codeFlag =='Y' && scope.row.maintenType =='USAGE'">{{ scope.row.maintenPeriod }}{{ $t('mes.toolType.times') }}</span>
+          <span v-else>{{ $t('mes.toolType.none') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column :label="$t('common.remark')" align="center" prop="remark" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('common.operation')" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button v-no-more-click
             size="mini"
@@ -118,14 +118,14 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['mes:tm:tooltype:edit']"
-          >修改</el-button>
+          >{{ $t('common.edit') }}</el-button>
           <el-button v-no-more-click
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['mes:tm:tooltype:remove']"
-          >删除</el-button>
+          >{{ $t('common.delete') }}</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -143,26 +143,26 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-row>
           <el-col :span="8">
-            <el-form-item label="类型编码" prop="toolTypeCode">
-              <el-input v-model="form.toolTypeCode" placeholder="请输入类型编码" />
+            <el-form-item :label="$t('mes.toolType.toolTypeCode')" prop="toolTypeCode">
+              <el-input v-model="form.toolTypeCode" :placeholder="$t('mes.toolType.toolTypeCodePlaceholder')" />
             </el-form-item>
           </el-col>
           <el-col :span="4">
             <el-switch v-model="autoGenFlag"
                 active-color="#13ce66"
-                active-text="自动生成"
+                :active-text="$t('mes.toolType.autoGenerate')"
                 @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">               
             </el-switch>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="类型名称" prop="toolTypeName">
-              <el-input v-model="form.toolTypeName" placeholder="请输入类型名称" />
+            <el-form-item :label="$t('mes.toolType.toolTypeName')" prop="toolTypeName">
+              <el-input v-model="form.toolTypeName" :placeholder="$t('mes.toolType.toolTypeNamePlaceholder')" />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item label="是否编码管理" prop="codeFlag">
+            <el-form-item :label="$t('mes.toolType.codeFlag')" prop="codeFlag">
               <el-radio-group v-model="form.codeFlag" disabled v-if="optType=='view'">
                     <el-radio
                       v-for="dict in dict.type.sys_yes_no"
@@ -180,8 +180,8 @@
             </el-form-item>
           </el-col>
           <el-col :span="8" v-if="form.codeFlag=='Y'">
-            <el-form-item label="保养维护类型" prop="maintenType">
-              <el-select v-model="form.maintenType" placeholder="请选择保养维护类型">
+            <el-form-item :label="$t('mes.toolType.maintenType')" prop="maintenType">
+              <el-select v-model="form.maintenType" :placeholder="$t('mes.toolType.maintenTypePlaceholder')">
                 <el-option
                   v-for="dict in dict.type.mes_mainten_type"
                   :key="dict.value"
@@ -192,23 +192,23 @@
             </el-form-item>
           </el-col>
           <el-col :span="8" v-if="form.codeFlag=='Y'">
-            <el-form-item label="保养周期" prop="maintenPeriod">
-              <el-input v-model="form.maintenPeriod" placeholder="请输入保养周期" />
+            <el-form-item :label="$t('mes.toolType.maintenPeriod')" prop="maintenPeriod">
+              <el-input v-model="form.maintenPeriod" :placeholder="$t('mes.toolType.maintenPeriodPlaceholder')" />
             </el-form-item>
           </el-col>
         </el-row>        
         <el-row>
           <el-col :span="24">
-            <el-form-item label="备注" prop="remark">
-              <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+            <el-form-item :label="$t('common.remark')" prop="remark">
+              <el-input v-model="form.remark" type="textarea" :placeholder="$t('mes.toolType.remarkPlaceholder')" />
             </el-form-item>
           </el-col>          
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button v-no-more-click type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
-        <el-button v-no-more-click type="primary" @click="submitForm" v-else>确 定</el-button>
-        <el-button v-no-more-click @click="cancel">取 消</el-button>
+        <el-button v-no-more-click type="primary" @click="cancel" v-if="optType =='view'">{{ $t('common.back') }}</el-button>
+        <el-button v-no-more-click type="primary" @click="submitForm" v-else>{{ $t('common.confirm') }}</el-button>
+        <el-button v-no-more-click @click="cancel">{{ $t('common.cancel') }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -255,19 +255,22 @@ export default {
       },
       // 表单参数
       form: {},
-      // 表单校验
-      rules: {
+    };
+  },
+  computed: {
+    rules() {
+      return {
         toolTypeCode: [
-          { required: true, message: "类型编码不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.toolType.toolTypeCodeRequired'), trigger: "blur" }
         ],
         toolTypeName: [
-          { required: true, message: "类型名称不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.toolType.toolTypeNameRequired'), trigger: "blur" }
         ],
         codeFlag: [
-          { required: true, message: "是否启用不能为空", trigger: "blur" }
+          { required: true, message: this.$t('mes.toolType.codeFlagRequired'), trigger: "blur" }
         ],
-      }
-    };
+      };
+    }
   },
   created() {
     this.getList();
@@ -325,7 +328,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加工装夹具类型";
+      this.title = this.$t('mes.toolType.addToolType');
       this.optType = "add";
     },
     // 查询明细按钮操作
@@ -335,7 +338,7 @@ export default {
       getTooltype(toolTypeId).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "查看类型信息";
+        this.title = this.$t('mes.toolType.viewToolType');
         this.optType = "view";
       });
     },
@@ -346,7 +349,7 @@ export default {
       getTooltype(toolTypeId).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改工装夹具类型";
+        this.title = this.$t('mes.toolType.editToolType');
         this.optType = "edit";
       });
     },
@@ -356,13 +359,13 @@ export default {
         if (valid) {
           if (this.form.toolTypeId != null) {
             updateTooltype(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
+              this.$modal.msgSuccess(this.$t('mes.toolType.editSuccess'));
               this.open = false;
               this.getList();
             });
           } else {
             addTooltype(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
+              this.$modal.msgSuccess(this.$t('mes.toolType.addSuccess'));
               this.open = false;
               this.getList();
             });
@@ -373,11 +376,11 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const toolTypeIds = row.toolTypeId || this.ids;
-      this.$modal.confirm('是否确认删除工装夹具类型编号为"' + toolTypeIds + '"的数据项?').then(function() {
+      this.$modal.confirm(this.$t('mes.toolType.deleteConfirm', { toolTypeId: toolTypeIds })).then(function() {
         return delTooltype(toolTypeIds);
       }).then(() => {
         this.getList();
-        this.$modal.msgSuccess("删除成功");
+        this.$modal.msgSuccess(this.$t('mes.toolType.deleteSuccess'));
       }).catch(() => {});
     },
     /** 导出按钮操作 */

+ 1 - 1
src/views/monitor/logininfor/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="118px">
       <el-form-item :label="$t('monitor.logininfor.loginAddress')" prop="ipaddr">
         <el-input
           v-model="queryParams.ipaddr"

+ 1 - 1
src/views/monitor/operlog/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="118px">
       <el-form-item :label="$t('monitor.operlog.systemModule')" prop="title">
         <el-input
           v-model="queryParams.title"

+ 3 - 3
src/views/system/configuration/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="118px">
       <el-form-item :label="$t('systemOther.configuration.paramName')" prop="sysAttrName">
         <el-input
           v-model="queryParams.sysAttrName"
@@ -79,8 +79,8 @@
           <span>{{ scope.row.sysAttrName }}</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('systemOther.configuration.paramKey')"  prop="sysAttrKey" :show-overflow-tooltip="true"/>
-      <el-table-column  :label="$t('systemOther.configuration.paramType')" width="90"  prop="sysAttrType" :show-overflow-tooltip="true">
+      <el-table-column :label="$t('systemOther.configuration.paramKey')"  width="110px" prop="sysAttrKey" :show-overflow-tooltip="true"/>
+      <el-table-column  :label="$t('systemOther.configuration.paramType')" width="110"  prop="sysAttrType" :show-overflow-tooltip="true">
         <template slot-scope="scope">
           <dict-tag
             :options="dict.type.sys_type"

+ 10 - 5
src/views/system/dict/index.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" :label-width="isEnglish ? '140px' : '68px'">
       <el-form-item :label="$t('systemOther.dict.dictName')" prop="dictName">
         <el-input
           v-model="queryParams.dictName"
           :placeholder="$t('systemOther.dict.dictNamePlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '240px' }"
           clearable
-          style="width: 240px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
@@ -14,8 +14,8 @@
         <el-input
           v-model="queryParams.dictType"
           :placeholder="$t('systemOther.dict.dictTypePlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '240px' }"
           clearable
-          style="width: 240px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
@@ -23,8 +23,8 @@
         <el-select
           v-model="queryParams.status"
           :placeholder="$t('systemOther.dict.statusPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '240px' }"
           clearable
-          style="width: 240px"
         >
           <el-option
             v-for="dict in dict.type.sys_normal_disable"
@@ -37,7 +37,7 @@
       <el-form-item :label="$t('common.createTime')">
         <el-date-picker
           v-model="dateRange"
-          style="width: 240px"
+          :style="{ width: isEnglish ? '240px' : '240px' }"
           value-format="yyyy-MM-dd"
           type="daterange"
           range-separator="-"
@@ -193,6 +193,11 @@ import { listType, getType, delType, addType, updateType, refreshCache } from "@
 export default {
   name: "Dict",
   dicts: ['sys_normal_disable'],
+  computed: {
+    isEnglish() {
+      return this.$i18n.locale === 'en'
+    }
+  },
   data() {
     return {
       // 遮罩层

+ 1 - 1
src/views/system/mapconfig/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
-      <el-form-item :label="$t('systemOther.mapConfig.mapName')" prop="name">
+      <el-form-item :label="$t('systemOther.mapConfig.mapName')" prop="name" label-width="118px">
         <el-input
           v-model="queryParams.name"
           :placeholder="$t('systemOther.mapConfig.mapNamePlaceholder')"

+ 2 - 2
src/views/system/mappoint/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item :label="$t('systemOther.mapPoint.mapName')" prop="mapId">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="118px">
+      <el-form-item :label="$t('systemOther.mapPoint.mapName')" prop="mapId" >
         <el-select v-model="queryParams.mapId" :placeholder="$t('systemOther.mapPoint.mapName')">
           <el-option v-for="item in this.MapOptions" :key="item.id" :label="item.name" :value="item.id">
           </el-option>

+ 15 - 3
src/views/system/notice/index.vue

@@ -1,10 +1,11 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" :label-width="isEnglish ? '140px' : '68px'">
       <el-form-item :label="$t('systemOther.notice.noticeTitle')" prop="noticeTitle">
         <el-input
           v-model="queryParams.noticeTitle"
           :placeholder="$t('systemOther.notice.noticeTitlePlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '240px' }"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -13,12 +14,18 @@
         <el-input
           v-model="queryParams.createBy"
           :placeholder="$t('systemOther.notice.operatorPlaceholder')"
+          :style="{ width: isEnglish ? '240px' : '240px' }"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
       <el-form-item :label="$t('systemOther.notice.type')" prop="noticeType">
-        <el-select v-model="queryParams.noticeType" :placeholder="$t('systemOther.notice.noticeTypePlaceholder')" clearable>
+        <el-select 
+          v-model="queryParams.noticeType" 
+          :placeholder="$t('systemOther.notice.noticeTypePlaceholder')" 
+          :style="{ width: isEnglish ? '240px' : '240px' }"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.sys_notice_type"
             :key="dict.value"
@@ -89,7 +96,7 @@
         </template>
       </el-table-column>
       <el-table-column :label="$t('systemOther.notice.creator')" align="center" prop="createBy" width="100" />
-      <el-table-column :label="$t('common.createTime')" align="center" prop="createTime" width="100">
+      <el-table-column :label="$t('common.createTime')" align="center" prop="createTime" width="110">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
         </template>
@@ -175,6 +182,11 @@ import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api
 export default {
   name: "Notice",
   dicts: ['sys_notice_status', 'sys_notice_type'],
+  computed: {
+    isEnglish() {
+      return this.$i18n.locale === 'en'
+    }
+  },
   data() {
     return {
       // 遮罩层

+ 7 - 2
src/views/system/user/index.vue

@@ -33,7 +33,7 @@
           size="small"
           :inline="true"
           v-show="showSearch"
-          label-width="68px"
+          :label-width="isEnglish ? '120px' : '90px'"
         >
           <el-form-item :label="$t('system.user.userNo')" prop="userId">
             <el-input
@@ -54,7 +54,7 @@
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-          <el-form-item :label="$t('system.user.phone')" prop="phonenumber" label-width="100px">
+          <el-form-item :label="$t('system.user.phone')" prop="phonenumber">
             <el-input
               v-model="queryParams.phonenumber"
               :placeholder="$t('system.user.phonePlaceholder')"
@@ -903,6 +903,11 @@ export default {
       },
     },
   },
+  computed: {
+    isEnglish() {
+      return this.$store.getters.language === 'en'
+    }
+  },
   created() {
     this.getList();
     this.getOtherList();