username@email.com
2021-10-28 0047bb0d2ba509f8a3cde4e06961edb19f9d1163
提交
2个文件已修改
2个文件已添加
470 ■■■■■ 已修改文件
zhengcaioa/DTO/ExpertTestTopicDTO.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/ExpertTestTopic/shititongji.cshtml 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/ExpertTestTopic/tongjiIndex.cshtml 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/ExpertTestTopicDTO.cs
@@ -50,8 +50,8 @@
        public string[] Flag { get; set; }
        public string[] Fatiaomingxi { get; set; }
        public decimal Shuliang { get; set; }
    }
zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs
@@ -11,6 +11,7 @@
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using System.Transactions;
using zhengcaioa.IService;
@@ -876,6 +877,170 @@
            return new JsonResult(resultEntity);
        }
        public IActionResult shititongji()
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            var expertTestTopicDTOs = new List<ExpertTestTopicDTO>();
            var expertTestTopicDTOs1 = _expertTestTopicService.GetList();
            var sysCodeDtls = _liaotianService.GetSYScode("expert_test_topic", "topictype");
            var sysCodeDtls1 = _liaotianService.GetSYScode("expert_test_topic", "zhishitype");
            foreach (var sysCodeDtl1 in sysCodeDtls1)
            {
                foreach (var sysCodeDtl in sysCodeDtls)
                {
                    var shuliang = expertTestTopicDTOs1.Count(x => x.Zhishitype == sysCodeDtl1.CodeSn && x.Topictype == sysCodeDtl.CodeSn);
                    var expertTestTopicDTO = new ExpertTestTopicDTO();
                    expertTestTopicDTO.Shuliang = shuliang;
                    var sysCodeDtl2 = sysCodeDtls1.Where(x => x.CodeSn == sysCodeDtl1.CodeSn).FirstOrDefault();
                    if (sysCodeDtl2 != null)
                    {
                        expertTestTopicDTO.ZhishitypeName = sysCodeDtl2.Comments;
                    }
                    expertTestTopicDTO.Zhishitype = sysCodeDtl1.CodeSn;
                    expertTestTopicDTO.Topictype = sysCodeDtl.CodeSn;
                    expertTestTopicDTOs.Add(expertTestTopicDTO);
                }
            }
            //ViewBag.topictype = sysCodeDtls;
            //ViewBag.zhishitype = sysCodeDtls1;
            //ViewBag.listExpertTestTopicDTO = expertTestTopicDTOs;
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.Append("<table style=\"width:50%;\">");
            stringBuilder.Append(" <tr>");
            stringBuilder.Append("<td style=\"width:25%;\"> 知识点/题型</td>");
            foreach (var sysCodeDtl in sysCodeDtls)
            {
                stringBuilder.Append("<td style = \"width:25%;\" > " + sysCodeDtl.Comments + "</td >");
            }
            stringBuilder.Append(" </tr>");
            int i = 0;
            foreach(var ExpertTestTopicDTO in expertTestTopicDTOs)
            {
                if(i != 0 && i % 3 == 0)
                {
                    stringBuilder.Append(" </tr>");
                }
                if(i == 0 || i % 3 == 0)
                {
                    stringBuilder.Append("<tr>");
                    stringBuilder.Append(" <td>" + ExpertTestTopicDTO.ZhishitypeName + "</td>");
                }
                stringBuilder.Append("<td><a onclick=\"OpenWindow(' ','98%','100%', '/ExpertTestTopic/tongjiIndex?Topictype=" + ExpertTestTopicDTO.Topictype + "&Zhishitype=" + ExpertTestTopicDTO.Zhishitype + "')\"  >             " + ExpertTestTopicDTO.Shuliang +"</a></td>");
                if (i == expertTestTopicDTOs.Count - 1)
                {
                    stringBuilder.Append(" </tr>");
                }
                i++;
            }
            stringBuilder.Append("</table>");
            ViewBag.htmlstring = stringBuilder.ToString(); ;
            return View();
        }
        public IActionResult tongjiIndex(string Topictype="", string Zhishitype = "")
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            List<ActionEntity> actionlist = new List<ActionEntity>();
            ActionEntity actionEntity = new ActionEntity();
            actionEntity.OpenType = 0;
            actionEntity.ActionUrl = "";
            actionEntity.ActionFun = "Search";
            actionEntity.PageIco = "fa fa-search";
            actionEntity.ActionName = "查询";
            actionlist.Add(actionEntity);
            //ActionEntity actionEntity1 = new ActionEntity();
            //actionEntity1.OpenType = 0;
            //actionEntity1.ActionUrl = "";
            //actionEntity1.ActionFun = "Add";
            //actionEntity1.PageIco = "fa fa-plus";
            //actionEntity1.ActionName = "新增";
            //actionlist.Add(actionEntity1);
            //ActionEntity actionEntity2 = new ActionEntity();
            //actionEntity2.OpenType = 0;
            //actionEntity2.ActionUrl = "";
            //actionEntity2.ActionFun = "Print";
            //actionEntity2.PageIco = "fa fa-print";
            //actionEntity2.ActionName = "打印";
            //actionlist.Add(actionEntity2);
            ViewData["ActionInfo"] = actionlist;
            ViewBag.Topictype1 = Topictype;
            ViewBag.Zhishitype1 = Zhishitype;
            ViewBag.topictype = _liaotianService.GetSYScode("expert_test_topic", "topictype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.zhishitype = _liaotianService.GetSYScode("expert_test_topic", "zhishitype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.zhongdian = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.jiexi_status = _liaotianService.GetSYScode("expert_test_topic", "jiexi_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.shenpi_status = _liaotianService.GetSYScode("expert_test_topic", "shenpi_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            var areaDTOs = _areaService.GetList().Where(x => x.ParentId == "0     ").ToList();
            foreach (var areaDTO in areaDTOs)
            {
                if (areaDTO.CodeId == "510000")
                {
                    areaDTOs.Remove(areaDTO);
                    break;
                }
            }
            var areaDTOsic = new AreaDTO();
            areaDTOsic.CodeId = "510000";
            areaDTOsic.Name = "四川省";
            areaDTOsic.ParentId = "0     ";
            areaDTOs.Insert(1, areaDTOsic);
            ViewBag.Area = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); ;
            return View();
        }
    }
}
zhengcaioa/zhengcaioa/Views/ExpertTestTopic/shititongji.cshtml
New file
@@ -0,0 +1,155 @@
@using DTO;
@{
    ViewBag.Title = "ExpertTestTopic";
    Layout = null;
    //List<ExpertTestTopicDTO> ExpertTestTopicDTOs = ViewBag.listExpertTestTopicDTO as List<ExpertTestTopicDTO>; //问题类型
    //List<SysCodeDtl> topictype = ViewBag.topictype as List<SysCodeDtl>; //题目类型
    //List<SysCodeDtl> zhishitype = ViewBag.zhishitype as List<SysCodeDtl>; //知识点
    string htmlstring = ViewBag.htmlstring as string;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>@SiteConfig.SiteName</title>
    <meta name="keywords" content="@SiteConfig.Keywords">
    <meta name="description" content="@SiteConfig.Description">
    <meta name="author" content="@SiteConfig.Author">
    <link rel="icon" type="image/x-icon" href="@SiteConfig.ShortcutIcon">
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <!-- UC强制全屏 -->
    <meta name="full-screen" content="yes">
    <!-- QQ强制全屏 -->
    <meta name="x5-fullscreen" content="true">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link href="~/css/bootstrap.min.css" rel="stylesheet">
    <link href="~/css/font-awesome.min.css" rel="stylesheet">
    <link href="~/css/animate.min.css" rel="stylesheet">
    @*<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">*@
    <link href="~/css/style.min.css" rel="stylesheet">
    <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
    @*<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">*@
    @*<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">*@
    <link href="~/css/style.min.css" rel="stylesheet">
    <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
    <link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" />
    <style type="text/css">
        body {
            text-align: center;
            font-size: 16px;
        }
        table {
            border-collapse: collapse;
            border: none;
            width: 900px;
            margin-left: 15px;
            text-align: left;
            line-height:36px;
        }
        td {
            border: solid #e5e5e5 1px;
        }
    </style>
    <!-- jqgrid-->
    @*<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">*@
    <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
    <script src="~/js/bootstrap.min.js"></script>
    @*<script src="~/js/plugins/bootstro/bootstro.js"></script>*@
    <!--容器-->
    @*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@
    @*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@
    @*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@
    <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
    @*<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>*@
    <script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
    @*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@
    @*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@
    <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
    <script src="~/js/plugins/webuploader/webuploader.min.js"></script>
    <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
    <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
    @*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@
    @*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@
    <script src="~/js/TUJS.js"></script>
</head>
<body>
    @Html.Raw(htmlstring);
    @*<table>
            <tr>
                <td style="width:25%;"> 知识点/题型</td>
                @foreach (var sysCodeDtl in topictype)
                {
                    <td style="width:25%;"> @sysCodeDtl.Comments </td>
                }
            </tr>
            @{
                int i = 0;
            }
            @foreach (var ExpertTestTopicDTO in ExpertTestTopicDTOs)
            {
                @if (i != 0 && i % 3 == 0)
                {
                    Html.Raw(" </tr>");
                }
                @if (i == 0 || i % 3 == 0)
                {
                    Html.Raw("<tr>");
                    Html.Raw(" <td>" + ExpertTestTopicDTO.ZhishitypeName + "</td>");
                }
                <td> @Html.Raw(ExpertTestTopicDTO.Shuliang)</td>
                @if (i == ExpertTestTopicDTOs.Count-1)
                {
                    Html.Raw(" </tr>");
                }
                i++;
            }
        </table>*@
</body>
<script type="text/javascript">
    //window.print();
</script>
</html>
zhengcaioa/zhengcaioa/Views/ExpertTestTopic/tongjiIndex.cshtml
New file
@@ -0,0 +1,148 @@
@{
    ViewBag.Title = "ExpertTestTopic";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        var topictype = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.topictype))';
        var zhishitype = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.zhishitype))';
        var zhongdian = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.zhongdian))';
        var jiexi_status = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.jiexi_status))';
        var shenpi_status = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shenpi_status))';
        var Area = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Area))';
        var Topictype = '@Html.Raw(ViewBag.Topictype1)';
        var Zhishitype =  '@Html.Raw(ViewBag.Zhishitype1)';
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            {
                label: '题型', name: 'TopictypeName', labtype: 'txt', hidden: false, width: 40
            },
            {
                label: '知识点', name: 'ZhishitypeName', labtype: 'txt', hidden: false, width: 40
            },
            { label: '区域', name: 'AreaName', labtype: 'txt', hidden: false, width: 40 },
            { label: '试题', name: 'Topic', labtype: 'txt', hidden: false, width: 300 },
            { label: '答案', name: 'Anwsers', labtype: 'txt', hidden: false, width: 40 },
            { label: '重点标注', name: 'ZhongdianName', labtype: 'txt', hidden: false, width: 40 },
            { label: '审核', name: 'ShenpiStatusName', labtype: 'txt', hidden: false, width: 40 },
            { label: '答案对应的法条', name: 'Jiexi', labtype: 'txt', hidden: false, width: 300 },
        ];
        dataUrl = "/ExpertTestTopic/GetList?Topictype=" + Topictype + "&Zhishitype=" + Zhishitype;
        searchCol = [
            { label: '区域', name: 'Area', labtype: 'combox', hidden: false, data: JSON.parse(Area), cwidth: '5%', cccwidth: '15%' },
            { label: '题型', name: 'Topictype', labtype: 'combox', hidden: false, data: JSON.parse(topictype), cwidth: '5%', cccwidth: '15%' },
            { label: '知识点', name: 'Zhishitype', labtype: 'combox', hidden: false, data: JSON.parse(zhishitype), cwidth: '5%', cccwidth: '15%' },
            { label: '重点标注', name: 'Zhongdian', labtype: 'combox', hidden: false, data: JSON.parse(zhongdian), cwidth: '5%', cccwidth: '15%' },
            { label: '解析', name: 'JiexiStatus', labtype: 'combox', hidden: false, data: JSON.parse(jiexi_status), cwidth: '5%', cccwidth: '15%' },
            { label: '审核', name: 'ShenpiStatus', labtype: 'combox', hidden: false, data: JSON.parse(shenpi_status), cwidth: '5%', cccwidth: '15%' },
            { label: '试题', name: 'Topic', labtype: 'txt', hidden: false },
        ];
        var _pagedel = function (id) {
            if (confirm('是否删除记录')) {
                $.ajax({
                    type: "GET",
                    url: "/ExpertTestTopic/Nullify?Id=" + id,
                    dataType: "json",
                    global: false,
                    data: '',
                    success: function (data) {
                        if (data.Result) {
                            layer.msg('删除成功', { icon: 6 });
                            window._reloadPageData();
                        }
                        else {
                            // toastr.error("");
                            layer.msg('删除失败', { icon: 5 });
                        }
                    },
                    error: function () {
                        if ($.isNumber(imgLoad)) {
                            layer.close(imgLoad);
                        }
                        //toastr.error("保存失败");
                        layer.msg('保存失败', { icon: 5 });
                    }
                });
            }
        }
        var _pageSearch = function () {
            $("#jqGrid").jqGrid('setGridParam', {
                url: '/ExpertTestTopic/GetList', postData: jsons, page: 1
            }); //重新载入
            var jsons = GetSearchEnd();
            if (jsons == false) {
                msg.info("请录入查询条件");
                return false;
            }
            LoadGrid(jsons);
        }
        $(document).ready(function () {
            $("#PBSTopictype").val(Topictype);
            $("#PBSTopictype").trigger('chosen:updated');//更新选项
            $("#PBSZhishitype").val(Zhishitype);
            $("#PBSZhishitype").trigger('chosen:updated');//更新选项
        });
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除成功");
        /**/
    }
        }
    </script>
}
@section footerScripts{
    <script type="text/javascript">
    </script>
}