Пример #1
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 3 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"

            var dic = ViewData["value"] as OfficeAutomation.Models.dictionary;

#line default
#line hidden
            BeginContext(153, 25, true);
            WriteLiteral("<!DOCTYPE html>\r\n<html>\r\n");
            EndContext();
            BeginContext(178, 317, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("head", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "8e7120aba462423783bbd873870d15a2", async() => {
                BeginContext(184, 150, true);
                WriteLiteral("\r\n    <meta charset=\"utf-8\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1\">\r\n    <title>添加角色</title>\r\n    ");
                EndContext();
                BeginContext(334, 44, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "603241a253ec40f79dab67f3a5fafae6", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(378, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(384, 49, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "a5ddac42a95045769c58123dd023a42b", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(433, 8, true);
                WriteLiteral("\r\n\r\n    ");
                EndContext();
                BeginContext(441, 45, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "c516e22bd713444999f5fe43b46a153b", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(486, 2, true);
                WriteLiteral("\r\n");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_HeadTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_HeadTagHelper);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(495, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            BeginContext(497, 5154, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("body", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "bce7ec30fa0c4f589628012dd644dddf", async() => {
                BeginContext(535, 190, true);
                WriteLiteral("\r\n    <div class=\"layui-container\">\r\n        <div class=\"layui-row \">\r\n\r\n            <div class=\"layui-col-md12\">\r\n\r\n                <div style=\"margin-top: 3.5em; \">\r\n\r\n                    ");
                EndContext();
                BeginContext(725, 2886, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "41bfb3fd3d8442ecbfb0be3edb8f3db6", async() => {
                    BeginContext(750, 230, true);
                    WriteLiteral("\r\n\r\n\r\n                        <div class=\"layui-form-item\">\r\n                            <label class=\"layui-form-label\"><span class=\"text-red\">*</span>角色名称:</label>\r\n                            <div class=\"layui-input-block\">\r\n\r\n");
                    EndContext();
#line 32 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"

                    if (dic != null)
                    {
#line default
#line hidden
                        BeginContext(1109, 178, true);
                        WriteLiteral("                                        <input type=\"text\" name=\"dicvalue\" id=\"dicvalue\" required lay-verify=\"required\" placeholder=\"请输入角色\" autocomplete=\"off\" class=\"layui-input\"");
                        EndContext();
                        BeginWriteAttribute("value", " value=\"", 1287, "\"", 1305, 1);
#line 35 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                        WriteAttributeValue("", 1295, dic.value, 1295, 10, false);

#line default
#line hidden
                        EndWriteAttribute();
                        BeginContext(1306, 3, true);
                        WriteLiteral(">\r\n");
                        EndContext();
#line 36 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                    }
                    else
                    {
#line default
#line hidden
                        BeginContext(1429, 181, true);
                        WriteLiteral("                                        <input type=\"text\" name=\"dicvalue\" id=\"dicvalue\" required lay-verify=\"required\" placeholder=\"请输入角色\" autocomplete=\"off\" class=\"layui-input\">\r\n");
                        EndContext();
#line 40 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                    }


#line default
#line hidden
                    BeginContext(1684, 290, true);
                    WriteLiteral(@"                            </div>
                        </div>

                        <div class=""layui-form-item"">
                            <label class=""layui-form-label""><span class=""text-red"">*</span>功能:</label>
                            <div class=""layui-input-block"">
");
                    EndContext();
#line 48 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                    foreach (var item in Model)
                    {
                        if ((int)ViewData["id"] == 0)
                        {
#line default
#line hidden
                            BeginContext(2181, 80, true);
                            WriteLiteral("                                            <input type=\"checkbox\" name=\"effect\"");
                            EndContext();
                            BeginWriteAttribute("value", " value=\"", 2261, "\"", 2277, 1);
#line 52 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 2269, item.id, 2269, 8, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginWriteAttribute("title", " title=\"", 2278, "\"", 2296, 1);
#line 52 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 2286, item.name, 2286, 10, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginContext(2297, 3, true);
                            WriteLiteral(">\r\n");
                            EndContext();
#line 53 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                            continue;
                        }
                        DAL_Dictionary dalDictionary = new DAL_Dictionary();
                        int count = dalDictionary.IfRelatedByRole(dic.value.ToString(), item.id);
                        if (count > 0)
                        {
#line default
#line hidden
                            BeginContext(2690, 76, true);
                            WriteLiteral("                                        <input type=\"checkbox\" name=\"effect\"");
                            EndContext();
                            BeginWriteAttribute("value", " value=\"", 2766, "\"", 2782, 1);
#line 59 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 2774, item.id, 2774, 8, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginWriteAttribute("title", " title=\"", 2783, "\"", 2801, 1);
#line 59 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 2791, item.name, 2791, 10, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginContext(2802, 11, true);
                            WriteLiteral(" checked>\r\n");
                            EndContext();
#line 60 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                        }
                        else
                        {
#line default
#line hidden
                            BeginContext(2933, 76, true);
                            WriteLiteral("                                        <input type=\"checkbox\" name=\"effect\"");
                            EndContext();
                            BeginWriteAttribute("value", " value=\"", 3009, "\"", 3025, 1);
#line 63 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 3017, item.id, 3017, 8, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginWriteAttribute("title", " title=\"", 3026, "\"", 3044, 1);
#line 63 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 3034, item.name, 3034, 10, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginContext(3045, 3, true);
                            WriteLiteral(">\r\n");
                            EndContext();
#line 64 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                        }
                    }

#line default
#line hidden
                    BeginContext(3124, 480, true);
                    WriteLiteral(@"                            </div>
                        </div>
                        <div class=""layui-form-item"">
                            <div class=""layui-input-block"">
                                <button class=""layui-btn"" lay-submit lay-filter=""formDemo"">立即提交</button>
                                <button type=""reset"" class=""layui-btn layui-btn-primary"">重置</button>
                            </div>
                        </div>
                    ");
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(3611, 983, true);
                WriteLiteral(@"
                </div>
            </div>
        </div>
    </div>

    <script>

    var layui = layui.config({
        base: '/plus/' //静态资源所在路径
    }).use(['layer', 'form', 'jquery','upload'], function () {
        var form = layui.form;
        var $ = layui.jquery;
        var layer = layui.layer;
        var once = $(""#dicvalue"").val();
        form.on('submit(formDemo)', function (data) {
            var index = layer.msg('数据提交中,请稍候', { icon: 16, shade: 0.01, time: 10 });
            var upData = data.field;

            var effectid = """";
            $('input:checkbox[name=effect]:checked').each(function(i){
                if(0==i){
                    effectid = $(this).val();
                }else{
                    effectid += ("",""+$(this).val());
                }
            });

            $.ajax({
                type: ""post"",
                url: ""../Users/UpdateRole"",
                data: {
                    id:");
                EndContext();
                BeginContext(4595, 14, false);
#line 107 "D:\项目\OfficeAutomation\OfficeAutomation\Views\Users\AddRole.cshtml"
                Write(ViewData["id"]);

#line default
#line hidden
                EndContext();
                BeginContext(4609, 1035, true);
                WriteLiteral(@",
                    dicvalue : upData.dicvalue,
                    reserve1: effectid,
                    NotMapped:once
                },
                dataType: ""json"",
                success: function(data) {
                    layer.close(index);
                    if (data.code == ""0"" || data.code == 0) {
                        layer.alert(""操作成功"", { icon: 6 },
                        function(index) {
                            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                            parent.layer.close(index); //再执行关闭
                            parent.location.reload(); // 刷新父级
                        });

                        //location.reload();
                        return false;
                    } else {
                        layer.alert(data.msg, { icon: 5 });
                    }
                    console.log(data);

                }
            });

            return false;
        });

    });
    ");
                WriteLiteral("</script>\r\n");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(5651, 9, true);
            WriteLiteral("\r\n</html>");
            EndContext();
        }
Пример #2
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 3 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"

            var dic = ViewData["value"] as OfficeAutomation.Models.dictionary;

#line default
#line hidden
            BeginContext(148, 23, true);
            WriteLiteral("<!DOCTYPE html>\n<html>\n");
            EndContext();
            BeginContext(171, 309, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("head", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "38810ddef41f42f284d9bc6a13e715c7", async() => {
                BeginContext(177, 146, true);
                WriteLiteral("\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1\">\n    <title>添加角色</title>\n    ");
                EndContext();
                BeginContext(323, 44, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "1a0abf96a8544cf9b00d33c789edee02", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(367, 5, true);
                WriteLiteral("\n    ");
                EndContext();
                BeginContext(372, 49, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "d154eb4044034bbca394a0399beb7c92", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(421, 6, true);
                WriteLiteral("\n\n    ");
                EndContext();
                BeginContext(427, 45, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "7236247fa916406f9e306a13949f6d2c", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(472, 1, true);
                WriteLiteral("\n");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_HeadTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_HeadTagHelper);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(480, 1, true);
            WriteLiteral("\n");
            EndContext();
            BeginContext(481, 5033, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("body", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "a4ba8b4fbc2d46688169357f41392750", async() => {
                BeginContext(519, 182, true);
                WriteLiteral("\n    <div class=\"layui-container\">\n        <div class=\"layui-row \">\n\n            <div class=\"layui-col-md12\">\n\n                <div style=\"margin-top: 3.5em; \">\n\n                    ");
                EndContext();
                BeginContext(701, 2836, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "c78d0f9a1508410b8cc57272efff1d4b", async() => {
                    BeginContext(726, 223, true);
                    WriteLiteral("\n\n\n                        <div class=\"layui-form-item\">\n                            <label class=\"layui-form-label\"><span class=\"text-red\">*</span>角色名称:</label>\n                            <div class=\"layui-input-block\">\n\n");
                    EndContext();
#line 32 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"

                    if (dic != null)
                    {
#line default
#line hidden
                        BeginContext(1075, 178, true);
                        WriteLiteral("                                        <input type=\"text\" name=\"dicvalue\" id=\"dicvalue\" required lay-verify=\"required\" placeholder=\"请输入角色\" autocomplete=\"off\" class=\"layui-input\"");
                        EndContext();
                        BeginWriteAttribute("value", " value=\"", 1253, "\"", 1271, 1);
#line 35 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                        WriteAttributeValue("", 1261, dic.value, 1261, 10, false);

#line default
#line hidden
                        EndWriteAttribute();
                        BeginContext(1272, 2, true);
                        WriteLiteral(">\n");
                        EndContext();
#line 36 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                    }
                    else
                    {
#line default
#line hidden
                        BeginContext(1391, 180, true);
                        WriteLiteral("                                        <input type=\"text\" name=\"dicvalue\" id=\"dicvalue\" required lay-verify=\"required\" placeholder=\"请输入角色\" autocomplete=\"off\" class=\"layui-input\">\n");
                        EndContext();
#line 40 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                    }


#line default
#line hidden
                    BeginContext(1643, 284, true);
                    WriteLiteral(@"                            </div>
                        </div>

                        <div class=""layui-form-item"">
                            <label class=""layui-form-label""><span class=""text-red"">*</span>功能:</label>
                            <div class=""layui-input-block"">
");
                    EndContext();
#line 48 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                    foreach (var item in Model)
                    {
                        if ((int)ViewData["id"] == 0)
                        {
#line default
#line hidden
                            BeginContext(2130, 80, true);
                            WriteLiteral("                                            <input type=\"checkbox\" name=\"effect\"");
                            EndContext();
                            BeginWriteAttribute("value", " value=\"", 2210, "\"", 2226, 1);
#line 52 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 2218, item.id, 2218, 8, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginWriteAttribute("title", " title=\"", 2227, "\"", 2245, 1);
#line 52 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 2235, item.name, 2235, 10, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginContext(2246, 2, true);
                            WriteLiteral(">\n");
                            EndContext();
#line 53 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                            continue;
                        }
                        DAL_Dictionary dalDictionary = new DAL_Dictionary();
                        int count = dalDictionary.IfRelatedByRole(dic.value.ToString(), item.id);
                        if (count > 0)
                        {
#line default
#line hidden
                            BeginContext(2632, 76, true);
                            WriteLiteral("                                        <input type=\"checkbox\" name=\"effect\"");
                            EndContext();
                            BeginWriteAttribute("value", " value=\"", 2708, "\"", 2724, 1);
#line 59 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 2716, item.id, 2716, 8, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginWriteAttribute("title", " title=\"", 2725, "\"", 2743, 1);
#line 59 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 2733, item.name, 2733, 10, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginContext(2744, 10, true);
                            WriteLiteral(" checked>\n");
                            EndContext();
#line 60 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                        }
                        else
                        {
#line default
#line hidden
                            BeginContext(2871, 76, true);
                            WriteLiteral("                                        <input type=\"checkbox\" name=\"effect\"");
                            EndContext();
                            BeginWriteAttribute("value", " value=\"", 2947, "\"", 2963, 1);
#line 63 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 2955, item.id, 2955, 8, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginWriteAttribute("title", " title=\"", 2964, "\"", 2982, 1);
#line 63 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                            WriteAttributeValue("", 2972, item.name, 2972, 10, false);

#line default
#line hidden
                            EndWriteAttribute();
                            BeginContext(2983, 2, true);
                            WriteLiteral(">\n");
                            EndContext();
#line 64 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                        }
                    }

#line default
#line hidden
                    BeginContext(3058, 472, true);
                    WriteLiteral(@"                            </div>
                        </div>
                        <div class=""layui-form-item"">
                            <div class=""layui-input-block"">
                                <button class=""layui-btn"" lay-submit lay-filter=""formDemo"">立即提交</button>
                                <button type=""reset"" class=""layui-btn layui-btn-primary"">重置</button>
                            </div>
                        </div>
                    ");
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(3537, 951, true);
                WriteLiteral(@"
                </div>
            </div>
        </div>
    </div>

    <script>

    var layui = layui.config({
        base: '/plus/' //静态资源所在路径
    }).use(['layer', 'form', 'jquery','upload'], function () {
        var form = layui.form;
        var $ = layui.jquery;
        var layer = layui.layer;
        var once = $(""#dicvalue"").val();
        form.on('submit(formDemo)', function (data) {
            var index = layer.msg('数据提交中,请稍候', { icon: 16, shade: 0.01, time: 10 });
            var upData = data.field;

            var effectid = """";
            $('input:checkbox[name=effect]:checked').each(function(i){
                if(0==i){
                    effectid = $(this).val();
                }else{
                    effectid += ("",""+$(this).val());
                }
            });

            $.ajax({
                type: ""post"",
                url: ""../Users/UpdateRole"",
                data: {
                    id:");
                EndContext();
                BeginContext(4489, 14, false);
#line 107 "C:\Users\DannyJiang\Desktop\OfficeAutomation-master\OfficeAutomation\Views\Users\AddRole.cshtml"
                Write(ViewData["id"]);

#line default
#line hidden
                EndContext();
                BeginContext(4503, 1004, true);
                WriteLiteral(@",
                    dicvalue : upData.dicvalue,
                    reserve1: effectid,
                    NotMapped:once
                },
                dataType: ""json"",
                success: function(data) {
                    layer.close(index);
                    if (data.code == ""0"" || data.code == 0) {
                        layer.alert(""操作成功"", { icon: 6 },
                        function(index) {
                            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                            parent.layer.close(index); //再执行关闭
                            parent.location.reload(); // 刷新父级
                        });

                        //location.reload();
                        return false;
                    } else {
                        layer.alert(data.msg, { icon: 5 });
                    }
                    console.log(data);

                }
            });

            return false;
        });

    });
    </script>
");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(5514, 8, true);
            WriteLiteral("\n</html>");
            EndContext();
        }