parent
d09efef6f5
commit
3b958606fa
|
@ -1419,7 +1419,24 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|||
recipe.Revisor = BaseApp.Instance.UserContext.LoginName;
|
||||
recipe.ReviseTime = DateTime.Now;
|
||||
|
||||
result = _recipeProvider.WriteRecipeFile(recipe.PrefixPath, recipe.Name, recipe.GetXmlString());
|
||||
var recipeXmlString = "";
|
||||
try
|
||||
{
|
||||
recipeXmlString = recipe.GetXmlString();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
DialogBox.ShowError($"Unable to generate recipe xml file, {ex.Message}");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(recipeXmlString))
|
||||
{
|
||||
DialogBox.ShowError($"Unable to generate recipe xml file, the xml string is empty.");
|
||||
return false;
|
||||
}
|
||||
|
||||
result = _recipeProvider.WriteRecipeFile(recipe.PrefixPath, recipe.Name, recipeXmlString);
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
@ -1429,7 +1446,7 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Save failed!");
|
||||
DialogBox.ShowError("Unable to transfer the recipe to RT, please see the RT logs for details.");
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -1022,13 +1022,17 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel
|
|||
newStep.Add(param);
|
||||
}
|
||||
|
||||
if (RecipeType == RecipeType.Process)
|
||||
newStep.Permission = stepMp;
|
||||
else
|
||||
newStep.Permission = MenuPermissionEnum.MP_READ_WRITE;
|
||||
|
||||
foreach (var param in newStep)
|
||||
{
|
||||
// 根据列权限设置参数访问权限
|
||||
param.ColumnPermChangedCallback?.Invoke(param);
|
||||
}
|
||||
|
||||
newStep.Permission = stepMp;
|
||||
return newStep;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue