去掉冰箱设备页面功能
This commit is contained in:
parent
a94eaeed2e
commit
1547b03914
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
|
|
||||||
<!--是否有冰箱抽屉0无,1有一个,2两个-->
|
<!--是否有冰箱抽屉0无,1有一个,2两个-->
|
||||||
<add key="hasFridge" value="0"/>
|
<add key="hasFridge" value="1"/>
|
||||||
<!-- 冰箱的串口号 -->
|
<!-- 冰箱的串口号 -->
|
||||||
<add key="FridgePortPath" value="COM7" />
|
<add key="FridgePortPath" value="COM7" />
|
||||||
|
|
||||||
|
|
|
@ -130,11 +130,11 @@ namespace DM_Weight.ViewModels
|
||||||
}
|
}
|
||||||
else if (value.PremissionPath.Equals("SettingMainWindow") || value.PremissionPath.Equals("SettingWindow"))
|
else if (value.PremissionPath.Equals("SettingMainWindow") || value.PremissionPath.Equals("SettingWindow"))
|
||||||
{
|
{
|
||||||
if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"])>0)
|
//if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"])>0)
|
||||||
{
|
//{
|
||||||
_regionManager.RequestNavigate("ContentRegion", "SettingMainWindow");
|
// _regionManager.RequestNavigate("ContentRegion", "SettingMainWindow");
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
{
|
||||||
_regionManager.RequestNavigate("ContentRegion", "SettingWindow");
|
_regionManager.RequestNavigate("ContentRegion", "SettingWindow");
|
||||||
}
|
}
|
||||||
|
|
|
@ -424,18 +424,18 @@ namespace DM_Weight.ViewModels
|
||||||
PremissionPath = "RoleManagerWindow",
|
PremissionPath = "RoleManagerWindow",
|
||||||
};
|
};
|
||||||
PremissionDm sysset3;
|
PremissionDm sysset3;
|
||||||
if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"]) > 0)
|
//if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"]) > 0)
|
||||||
{
|
//{
|
||||||
//有冰箱,需要冰箱设置(两个冰箱)
|
// //有冰箱,需要冰箱设置(两个冰箱)
|
||||||
sysset3 = new PremissionDm
|
// sysset3 = new PremissionDm
|
||||||
{
|
// {
|
||||||
Id = 53,
|
// Id = 53,
|
||||||
PremissionName = "设置",
|
// PremissionName = "设置",
|
||||||
PremissionPath = "SettingMainWindow",
|
// PremissionPath = "SettingMainWindow",
|
||||||
};
|
// };
|
||||||
|
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
{
|
||||||
sysset3 = new PremissionDm
|
sysset3 = new PremissionDm
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,14 +60,14 @@ namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
if (SettingPages is null || SettingPages.Count <= 0)
|
if (SettingPages is null || SettingPages.Count <= 0)
|
||||||
{
|
{
|
||||||
if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"]) <= 1)
|
//if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"]) <= 1)
|
||||||
{
|
{
|
||||||
SettingPages = new ObservableCollection<SettingPage>(SqlSugarHelper.Db.Queryable<SettingPage>().Where(p=>p.Id!="2").ToList());
|
SettingPages = new ObservableCollection<SettingPage>(SqlSugarHelper.Db.Queryable<SettingPage>().Where(p=>p.Id!="2").ToList());
|
||||||
}
|
}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
SettingPages = new ObservableCollection<SettingPage>(SqlSugarHelper.Db.Queryable<SettingPage>().Where(p => p.Id != "3").ToList());
|
// SettingPages = new ObservableCollection<SettingPage>(SqlSugarHelper.Db.Queryable<SettingPage>().Where(p => p.Id != "3").ToList());
|
||||||
}
|
//}
|
||||||
if (SettingPages.Count > 0)
|
if (SettingPages.Count > 0)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(defaultView))
|
if (string.IsNullOrEmpty(defaultView))
|
||||||
|
|
Loading…
Reference in New Issue