ResultView.cshtml 1.78 KB
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@using Hh.Mes.POJO.Response;
@{
    ViewData["Title"] = "保存结果预览";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@model Dictionary<string,Response>
<div class="layui-fluid">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 5px;margin-bottom: 5px;">
        <legend> 代码保存结果</legend>
    </fieldset>
    <table class="layui-table">
        <thead>
            <tr>
                <th>文件路径或菜单按钮</th>
                <th>状态</th>
                <th>结果</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>@item.Key</td>
                    <td style="color:@(item.Value.Status?"":"red")">@item.Value.Status</td>
                    <td>@item.Value.Message</td>
                </tr>
            }
            @if (!Model.Any())
            {
                if (string.IsNullOrWhiteSpace(ViewBag.ErrorMessage))
                {
                    <tr>
                        <td colspan="3" style="text-align:center;">无数据</td>
                    </tr>
                }
                else
                {
                    <tr class="layui-bg-red">
                        <td colspan="3" style="text-align:center;">@ViewBag.ErrorMessage</td>
                    </tr>
                }
            }
        </tbody>
    </table>
    @if (Model.Any(x => x.Value.Status))
    {
        <blockquote class="layui-elem-quote layui-quote-nm">
            保存成功,请重新启动项目并手动在 系统管理=>模块管理 中新增侧边菜单选项
            <br>操作按钮可在 模块管理=>常用菜单 启用或禁用
        </blockquote>
    }
</div>