KWD 3 місяців тому
батько
коміт
fb3fb40177

+ 180 - 9
TeamAAS-VM/Resources/Languages/Lang.Designer.cs

@@ -906,15 +906,6 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
-        /// <summary>
-        ///   查找类似  X  的本地化字符串。
-        /// </summary>
-        public static string X {
-            get {
-                return ResourceManager.GetString("X", resourceCulture);
-            }
-        }
-        
         /// <summary>
         ///   查找类似 X坐标: 的本地化字符串。
         /// </summary>
@@ -1302,6 +1293,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 保存的CSV文件路径 的本地化字符串。
+        /// </summary>
+        public static string 保存的CSV文件路径 {
+            get {
+                return ResourceManager.GetString("保存的CSV文件路径", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 保存脚本 的本地化字符串。
         /// </summary>
@@ -1860,6 +1860,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 启用 MES 的本地化字符串。
+        /// </summary>
+        public static string 启用_MES {
+            get {
+                return ResourceManager.GetString("启用 MES", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 启用二次定位相机 的本地化字符串。
         /// </summary>
@@ -3012,6 +3021,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 拍照结果 的本地化字符串。
+        /// </summary>
+        public static string 拍照结果 {
+            get {
+                return ResourceManager.GetString("拍照结果", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 持续时长 的本地化字符串。
         /// </summary>
@@ -3300,6 +3318,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 时间 的本地化字符串。
+        /// </summary>
+        public static string 时间 {
+            get {
+                return ResourceManager.GetString("时间", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 是否保存 的本地化字符串。
         /// </summary>
@@ -3309,6 +3336,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 是否保存CSV文件 的本地化字符串。
+        /// </summary>
+        public static string 是否保存CSV文件 {
+            get {
+                return ResourceManager.GetString("是否保存CSV文件", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 是否保存Feeder? 的本地化字符串。
         /// </summary>
@@ -3327,6 +3363,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 是否保存ppid 的本地化字符串。
+        /// </summary>
+        public static string 是否保存ppid {
+            get {
+                return ResourceManager.GetString("是否保存ppid", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 是否保存产品[{0}]? 的本地化字符串。
         /// </summary>
@@ -3399,6 +3444,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 是否保存键盘格JMP数据 的本地化字符串。
+        /// </summary>
+        public static string 是否保存键盘格JMP数据 {
+            get {
+                return ResourceManager.GetString("是否保存键盘格JMP数据", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 是否关闭软件? 的本地化字符串。
         /// </summary>
@@ -3444,6 +3498,24 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 是否启用两次产品编号 的本地化字符串。
+        /// </summary>
+        public static string 是否启用两次产品编号 {
+            get {
+                return ResourceManager.GetString("是否启用两次产品编号", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 是否启用键盘相邻键保存差值 的本地化字符串。
+        /// </summary>
+        public static string 是否启用键盘相邻键保存差值 {
+            get {
+                return ResourceManager.GetString("是否启用键盘相邻键保存差值", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 是否开始测试? 的本地化字符串。
         /// </summary>
@@ -4002,6 +4074,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 检测结果为1 的本地化字符串。
+        /// </summary>
+        public static string 检测结果为1 {
+            get {
+                return ResourceManager.GetString("检测结果为1", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 检测重复点位并剔除重复点位 的本地化字符串。
         /// </summary>
@@ -4218,6 +4299,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 流线 的本地化字符串。
+        /// </summary>
+        public static string 流线 {
+            get {
+                return ResourceManager.GetString("流线", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 测试 的本地化字符串。
         /// </summary>
@@ -4236,6 +4326,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 测量数据 的本地化字符串。
+        /// </summary>
+        public static string 测量数据 {
+            get {
+                return ResourceManager.GetString("测量数据", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 添加 的本地化字符串。
         /// </summary>
@@ -4371,6 +4470,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 生产 的本地化字符串。
+        /// </summary>
+        public static string 生产 {
+            get {
+                return ResourceManager.GetString("生产", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 生产排班 的本地化字符串。
         /// </summary>
@@ -5055,6 +5163,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 良率 的本地化字符串。
+        /// </summary>
+        public static string 良率 {
+            get {
+                return ResourceManager.GetString("良率", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 节点头 的本地化字符串。
         /// </summary>
@@ -5073,6 +5190,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 虚拟SN 的本地化字符串。
+        /// </summary>
+        public static string 虚拟SN {
+            get {
+                return ResourceManager.GetString("虚拟SN", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 行 的本地化字符串。
         /// </summary>
@@ -5352,6 +5478,42 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 设备列表 的本地化字符串。
+        /// </summary>
+        public static string 设备列表 {
+            get {
+                return ResourceManager.GetString("设备列表", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 设备名称 的本地化字符串。
+        /// </summary>
+        public static string 设备名称 {
+            get {
+                return ResourceManager.GetString("设备名称", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 设备描述 的本地化字符串。
+        /// </summary>
+        public static string 设备描述 {
+            get {
+                return ResourceManager.GetString("设备描述", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 设备编号 的本地化字符串。
+        /// </summary>
+        public static string 设备编号 {
+            get {
+                return ResourceManager.GetString("设备编号", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 设定参数 的本地化字符串。
         /// </summary>
@@ -5370,6 +5532,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 详情 的本地化字符串。
+        /// </summary>
+        public static string 详情 {
+            get {
+                return ResourceManager.GetString("详情", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 请填写产品名称并选择对应模板! 的本地化字符串。
         /// </summary>

+ 24 - 2
TeamAAS-VM/ViewModels/HomeViewModel.cs

@@ -175,6 +175,14 @@ namespace TeamAAS_VP.ViewModels
             set { SetProperty(ref _LockResults, value); }
         }
 
+        private bool _IsAllowEdit = false;
+
+        public bool IsAllowEdit
+        {
+            get { return _IsAllowEdit; }
+            set { SetProperty(ref _IsAllowEdit, value); }
+        }
+
         #endregion
 
         #region 命令
@@ -382,7 +390,14 @@ namespace TeamAAS_VP.ViewModels
 
         private void LoginChange(Models.User user)
         {
-            
+            if (user.userPart == Enums.UserPart.Operator)
+            {
+                IsAllowEdit = false;
+            }
+            else
+            {
+                IsAllowEdit = true;
+            }
         }
 
         /// <summary>
@@ -506,7 +521,14 @@ namespace TeamAAS_VP.ViewModels
         /// <exception cref="NotImplementedException"></exception>
         public async void OnNavigatedTo(NavigationContext navigationContext)
         {
-
+            if (_systemDatabaseService.GetCurrentUser().userPart == Enums.UserPart.Operator || _systemDatabaseService.GetCurrentUser().userPart == Enums.UserPart.Engineer)
+            {
+                IsAllowEdit = false;
+            }
+            else
+            {
+                IsAllowEdit = true;
+            }
             try
             {
                 ProductList = new ObservableCollection<ProductModel>(_productService.GetAllProducts());

+ 1 - 0
TeamAAS-VM/Views/HomeView.xaml

@@ -441,6 +441,7 @@
                         HorizontalAlignment="Right"
                         materialDesign:ButtonAssist.CornerRadius="10"
                         Style="{StaticResource MaterialDesignRaisedButton}"
+                        IsEnabled="{Binding IsAllowEdit}"
                         Command="{Binding ResetCounterCommand}" />
             </Grid>
             <Border Grid.Row="1"