Ver código fonte

更新模型

lcl 3 anos atrás
pai
commit
ae8b30c430

+ 309 - 309
Areas/Admin/Controllers/MainServer/ExportExcelsController.cs

@@ -1,313 +1,313 @@
-/*
- * excel导出数据
- */
-
-using System;
-using System.Web;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Http;
-using Microsoft.Extensions.Logging;
-using Microsoft.Extensions.Options;
-using MySystem.Models;
-using Library;
-using LitJson;
-using MySystemLib;
+// /*
+//  * excel导出数据
+//  */
+
+// using System;
+// using System.Web;
+// using System.Collections.Generic;
+// using System.Diagnostics;
+// using System.Linq;
+// using System.Threading.Tasks;
+// using Microsoft.AspNetCore.Mvc;
+// using Microsoft.AspNetCore.Http;
+// using Microsoft.Extensions.Logging;
+// using Microsoft.Extensions.Options;
+// using MySystem.Models;
+// using Library;
+// using LitJson;
+// using MySystemLib;
 
-namespace MySystem.Areas.Admin.Controllers
-{
-    [Area("Admin")]
-    [Route("Admin/[controller]/[action]")]
-    public class ExportExcelsController : BaseController
-    {
-        public ExportExcelsController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
-        {
-        }
-
-        #region excel导出数据列表
+// namespace MySystem.Areas.Admin.Controllers
+// {
+//     [Area("Admin")]
+//     [Route("Admin/[controller]/[action]")]
+//     public class ExportExcelsController : BaseController
+//     {
+//         public ExportExcelsController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
+//         {
+//         }
+
+//         #region excel导出数据列表
 
-        /// <summary>
-        /// 根据条件查询excel导出数据列表
-        /// </summary>
-        /// <returns></returns>
-        public IActionResult Index(ExportExcels data, string right)
-        {
-            ViewBag.RightInfo = RightInfo;
-            ViewBag.right = right;
+//         /// <summary>
+//         /// 根据条件查询excel导出数据列表
+//         /// </summary>
+//         /// <returns></returns>
+//         public IActionResult Index(ExportExcels data, string right)
+//         {
+//             ViewBag.RightInfo = RightInfo;
+//             ViewBag.right = right;
 
 
-            return View();
-        }
-
-        #endregion
-
-        #region 根据条件查询excel导出数据列表
-
-        /// <summary>
-        /// excel导出数据列表
-        /// </summary>
-        /// <returns></returns>
-        public JsonResult IndexData(ExportExcels data, int page = 1, int limit = 30)
-        {
-
-            Dictionary<string, string> Fields = new Dictionary<string, string>();
-
-            Fields.Add("CreateDate", "3"); //时间
-            Fields.Add("FileName", "1"); //文件名
-            Fields.Add("FileUrl", "1"); //文件路径
-
-
-            string condition = " and Status>-1";
-
-
-            Dictionary<string, object> obj = new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).IndexData("ExportExcels", Fields, "Id desc", "0", page, limit, condition);
-            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
-            foreach (Dictionary<string, object> dic in diclist)
-            {
-
-            }
-            return Json(obj);
-        }
-
-        #endregion
-
-        #region 增加excel导出数据
-
-        /// <summary>
-        /// 增加或修改excel导出数据信息
-        /// </summary>
-        /// <returns></returns>
-        public IActionResult Add(string right)
-        {
-            ViewBag.RightInfo = RightInfo;
-            ViewBag.right = right;
-
-
-            return View();
-        }
-
-        #endregion
-
-        #region 增加excel导出数据
-
-        /// <summary>
-        /// 增加或修改excel导出数据信息
-        /// </summary>
-        /// <returns></returns>
-        [HttpPost]
-        public string Add(ExportExcels data)
-        {
-            Dictionary<string, object> Fields = new Dictionary<string, object>();
-
-            Fields.Add("FileName", data.FileName); //文件名
-            Fields.Add("FileUrl", data.FileUrl); //文件路径
-
-            Fields.Add("SeoTitle", data.SeoTitle);
-            Fields.Add("SeoKeyword", data.SeoKeyword);
-            Fields.Add("SeoDescription", data.SeoDescription);
-            int Id = new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Add("ExportExcels", Fields, 0);
-            AddSysLog(data.Id.ToString(), "ExportExcels", "add");
-            db.SaveChanges();
-
-            return "success";
-        }
-
-        #endregion
-
-        #region 修改excel导出数据
-
-        /// <summary>
-        /// 增加或修改excel导出数据信息
-        /// </summary>
-        /// <returns></returns>
-        public IActionResult Edit(string right, int Id = 0)
-        {
-            ViewBag.RightInfo = RightInfo;
-            ViewBag.right = right;
-
-
-            ExportExcels editData = db.ExportExcels.FirstOrDefault(m => m.Id == Id) ?? new ExportExcels();
-            ViewBag.data = editData;
-            return View();
-        }
-
-        #endregion
-
-        #region 修改excel导出数据
-
-        /// <summary>
-        /// 增加或修改excel导出数据信息
-        /// </summary>
-        /// <returns></returns>
-        [HttpPost]
-        public string Edit(ExportExcels data)
-        {
-            Dictionary<string, object> Fields = new Dictionary<string, object>();
-
-            Fields.Add("FileName", data.FileName); //文件名
-            Fields.Add("FileUrl", data.FileUrl); //文件路径
-
-            Fields.Add("SeoTitle", data.SeoTitle);
-            Fields.Add("SeoKeyword", data.SeoKeyword);
-            Fields.Add("SeoDescription", data.SeoDescription);
-            new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("ExportExcels", Fields, data.Id);
-            AddSysLog(data.Id.ToString(), "ExportExcels", "update");
-            db.SaveChanges();
-
-            return "success";
-        }
-
-        #endregion
-
-        #region 删除excel导出数据信息
-
-        /// <summary>
-        /// 删除excel导出数据信息
-        /// </summary>
-        /// <returns></returns>
-        public string Delete(string Id)
-        {
-            string[] idlist = Id.Split(new char[] { ',' });
-            AddSysLog(Id, "ExportExcels", "del");
-            foreach (string subid in idlist)
-            {
-                int id = int.Parse(subid);
-                Dictionary<string, object> Fields = new Dictionary<string, object>();
-                Fields.Add("Status", -1);
-                new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("ExportExcels", Fields, id);
-            }
-            db.SaveChanges();
-
-            return "success";
-        }
-
-        #endregion
-
-        #region 开启
-
-        /// <summary>
-        /// 开启
-        /// </summary>
-        /// <returns></returns>
-        public string Open(string Id)
-        {
-            string[] idlist = Id.Split(new char[] { ',' });
-            AddSysLog(Id, "ExportExcels", "open");
-            foreach (string subid in idlist)
-            {
-                int id = int.Parse(subid);
-                Dictionary<string, object> Fields = new Dictionary<string, object>();
-                Fields.Add("Status", 1);
-                new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("ExportExcels", Fields, id);
-            }
-            db.SaveChanges();
-            return "success";
-        }
-
-        #endregion
-
-        #region 关闭
-
-        /// <summary>
-        /// 关闭
-        /// </summary>
-        /// <returns></returns>
-        public string Close(string Id)
-        {
-            string[] idlist = Id.Split(new char[] { ',' });
-            AddSysLog(Id, "ExportExcels", "close");
-            foreach (string subid in idlist)
-            {
-                int id = int.Parse(subid);
-                Dictionary<string, object> Fields = new Dictionary<string, object>();
-                Fields.Add("Status", 0);
-                new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("ExportExcels", Fields, id);
-            }
-            db.SaveChanges();
-            return "success";
-        }
-
-        #endregion
-
-        #region 排序
-        /// <summary>
-        /// 排序
-        /// </summary>
-        /// <param name="Id"></param>
-        public string Sort(int Id, int Sort)
-        {
-            new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Sort("ExportExcels", Sort, Id);
-
-            AddSysLog(Id.ToString(), "ExportExcels", "sort");
-            return "success";
-        }
-        #endregion
-
-        #region 导入数据
-        /// <summary>
-        /// 导入数据
-        /// </summary>
-        /// <param name="ExcelData"></param>
-        public string Import(string ExcelData)
-        {
-            ExcelData = HttpUtility.UrlDecode(ExcelData);
-            JsonData list = JsonMapper.ToObject(ExcelData);
-            for (int i = 1; i < list.Count; i++)
-            {
-                JsonData dr = list[i];
-
-                db.ExportExcels.Add(new ExportExcels()
-                {
-                    CreateDate = DateTime.Now,
-                    UpdateDate = DateTime.Now,
-
-                });
-                db.SaveChanges();
-            }
-            AddSysLog("0", "ExportExcels", "Import");
-            return "success";
-        }
-        #endregion
-
-        #region 导出Excel
-
-        /// <summary>
-        /// 导出Excel
-        /// </summary>
-        /// <returns></returns>
-        public JsonResult ExportExcel(ExportExcels data)
-        {
-            Dictionary<string, string> Fields = new Dictionary<string, string>();
-            Fields.Add("CreateDate", "3"); //时间
-            Fields.Add("FileName", "1"); //文件名
-            Fields.Add("FileUrl", "1"); //文件路径
-
-
-            string condition = " and Status>-1";
-
-
-            Dictionary<string, object> obj = new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).IndexData("ExportExcels", Fields, "Id desc", "0", 1, 20000, condition, "", false);
-            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
-            foreach (Dictionary<string, object> dic in diclist)
-            {
-
-            }
-
-            Dictionary<string, object> result = new Dictionary<string, object>();
-            result.Add("Status", "1");
-            result.Add("Info", "Excel报表-" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".xlsx");
-            result.Add("Obj", diclist);
-            Dictionary<string, object> ReturnFields = new Dictionary<string, object>();
-
-            result.Add("Fields", ReturnFields);
-            AddSysLog("0", "ExportExcels", "ExportExcel");
-            return Json(result);
-        }
-
-        #endregion
-
-    }
-}
+//             return View();
+//         }
+
+//         #endregion
+
+//         #region 根据条件查询excel导出数据列表
+
+//         /// <summary>
+//         /// excel导出数据列表
+//         /// </summary>
+//         /// <returns></returns>
+//         public JsonResult IndexData(ExportExcels data, int page = 1, int limit = 30)
+//         {
+
+//             Dictionary<string, string> Fields = new Dictionary<string, string>();
+
+//             Fields.Add("CreateDate", "3"); //时间
+//             Fields.Add("FileName", "1"); //文件名
+//             Fields.Add("FileUrl", "1"); //文件路径
+
+
+//             string condition = " and Status>-1";
+
+
+//             Dictionary<string, object> obj = new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).IndexData("ExportExcels", Fields, "Id desc", "0", page, limit, condition);
+//             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+//             foreach (Dictionary<string, object> dic in diclist)
+//             {
+
+//             }
+//             return Json(obj);
+//         }
+
+//         #endregion
+
+//         #region 增加excel导出数据
+
+//         /// <summary>
+//         /// 增加或修改excel导出数据信息
+//         /// </summary>
+//         /// <returns></returns>
+//         public IActionResult Add(string right)
+//         {
+//             ViewBag.RightInfo = RightInfo;
+//             ViewBag.right = right;
+
+
+//             return View();
+//         }
+
+//         #endregion
+
+//         #region 增加excel导出数据
+
+//         /// <summary>
+//         /// 增加或修改excel导出数据信息
+//         /// </summary>
+//         /// <returns></returns>
+//         [HttpPost]
+//         public string Add(ExportExcels data)
+//         {
+//             Dictionary<string, object> Fields = new Dictionary<string, object>();
+
+//             Fields.Add("FileName", data.FileName); //文件名
+//             Fields.Add("FileUrl", data.FileUrl); //文件路径
+
+//             Fields.Add("SeoTitle", data.SeoTitle);
+//             Fields.Add("SeoKeyword", data.SeoKeyword);
+//             Fields.Add("SeoDescription", data.SeoDescription);
+//             int Id = new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Add("ExportExcels", Fields, 0);
+//             AddSysLog(data.Id.ToString(), "ExportExcels", "add");
+//             db.SaveChanges();
+
+//             return "success";
+//         }
+
+//         #endregion
+
+//         #region 修改excel导出数据
+
+//         /// <summary>
+//         /// 增加或修改excel导出数据信息
+//         /// </summary>
+//         /// <returns></returns>
+//         public IActionResult Edit(string right, int Id = 0)
+//         {
+//             ViewBag.RightInfo = RightInfo;
+//             ViewBag.right = right;
+
+
+//             ExportExcels editData = db.ExportExcels.FirstOrDefault(m => m.Id == Id) ?? new ExportExcels();
+//             ViewBag.data = editData;
+//             return View();
+//         }
+
+//         #endregion
+
+//         #region 修改excel导出数据
+
+//         /// <summary>
+//         /// 增加或修改excel导出数据信息
+//         /// </summary>
+//         /// <returns></returns>
+//         [HttpPost]
+//         public string Edit(ExportExcels data)
+//         {
+//             Dictionary<string, object> Fields = new Dictionary<string, object>();
+
+//             Fields.Add("FileName", data.FileName); //文件名
+//             Fields.Add("FileUrl", data.FileUrl); //文件路径
+
+//             Fields.Add("SeoTitle", data.SeoTitle);
+//             Fields.Add("SeoKeyword", data.SeoKeyword);
+//             Fields.Add("SeoDescription", data.SeoDescription);
+//             new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("ExportExcels", Fields, data.Id);
+//             AddSysLog(data.Id.ToString(), "ExportExcels", "update");
+//             db.SaveChanges();
+
+//             return "success";
+//         }
+
+//         #endregion
+
+//         #region 删除excel导出数据信息
+
+//         /// <summary>
+//         /// 删除excel导出数据信息
+//         /// </summary>
+//         /// <returns></returns>
+//         public string Delete(string Id)
+//         {
+//             string[] idlist = Id.Split(new char[] { ',' });
+//             AddSysLog(Id, "ExportExcels", "del");
+//             foreach (string subid in idlist)
+//             {
+//                 int id = int.Parse(subid);
+//                 Dictionary<string, object> Fields = new Dictionary<string, object>();
+//                 Fields.Add("Status", -1);
+//                 new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("ExportExcels", Fields, id);
+//             }
+//             db.SaveChanges();
+
+//             return "success";
+//         }
+
+//         #endregion
+
+//         #region 开启
+
+//         /// <summary>
+//         /// 开启
+//         /// </summary>
+//         /// <returns></returns>
+//         public string Open(string Id)
+//         {
+//             string[] idlist = Id.Split(new char[] { ',' });
+//             AddSysLog(Id, "ExportExcels", "open");
+//             foreach (string subid in idlist)
+//             {
+//                 int id = int.Parse(subid);
+//                 Dictionary<string, object> Fields = new Dictionary<string, object>();
+//                 Fields.Add("Status", 1);
+//                 new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("ExportExcels", Fields, id);
+//             }
+//             db.SaveChanges();
+//             return "success";
+//         }
+
+//         #endregion
+
+//         #region 关闭
+
+//         /// <summary>
+//         /// 关闭
+//         /// </summary>
+//         /// <returns></returns>
+//         public string Close(string Id)
+//         {
+//             string[] idlist = Id.Split(new char[] { ',' });
+//             AddSysLog(Id, "ExportExcels", "close");
+//             foreach (string subid in idlist)
+//             {
+//                 int id = int.Parse(subid);
+//                 Dictionary<string, object> Fields = new Dictionary<string, object>();
+//                 Fields.Add("Status", 0);
+//                 new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("ExportExcels", Fields, id);
+//             }
+//             db.SaveChanges();
+//             return "success";
+//         }
+
+//         #endregion
+
+//         #region 排序
+//         /// <summary>
+//         /// 排序
+//         /// </summary>
+//         /// <param name="Id"></param>
+//         public string Sort(int Id, int Sort)
+//         {
+//             new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Sort("ExportExcels", Sort, Id);
+
+//             AddSysLog(Id.ToString(), "ExportExcels", "sort");
+//             return "success";
+//         }
+//         #endregion
+
+//         #region 导入数据
+//         /// <summary>
+//         /// 导入数据
+//         /// </summary>
+//         /// <param name="ExcelData"></param>
+//         public string Import(string ExcelData)
+//         {
+//             ExcelData = HttpUtility.UrlDecode(ExcelData);
+//             JsonData list = JsonMapper.ToObject(ExcelData);
+//             for (int i = 1; i < list.Count; i++)
+//             {
+//                 JsonData dr = list[i];
+
+//                 db.ExportExcels.Add(new ExportExcels()
+//                 {
+//                     CreateDate = DateTime.Now,
+//                     UpdateDate = DateTime.Now,
+
+//                 });
+//                 db.SaveChanges();
+//             }
+//             AddSysLog("0", "ExportExcels", "Import");
+//             return "success";
+//         }
+//         #endregion
+
+//         #region 导出Excel
+
+//         /// <summary>
+//         /// 导出Excel
+//         /// </summary>
+//         /// <returns></returns>
+//         public JsonResult ExportExcel(ExportExcels data)
+//         {
+//             Dictionary<string, string> Fields = new Dictionary<string, string>();
+//             Fields.Add("CreateDate", "3"); //时间
+//             Fields.Add("FileName", "1"); //文件名
+//             Fields.Add("FileUrl", "1"); //文件路径
+
+
+//             string condition = " and Status>-1";
+
+
+//             Dictionary<string, object> obj = new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).IndexData("ExportExcels", Fields, "Id desc", "0", 1, 20000, condition, "", false);
+//             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+//             foreach (Dictionary<string, object> dic in diclist)
+//             {
+
+//             }
+
+//             Dictionary<string, object> result = new Dictionary<string, object>();
+//             result.Add("Status", "1");
+//             result.Add("Info", "Excel报表-" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".xlsx");
+//             result.Add("Obj", diclist);
+//             Dictionary<string, object> ReturnFields = new Dictionary<string, object>();
+
+//             result.Add("Fields", ReturnFields);
+//             AddSysLog("0", "ExportExcels", "ExportExcel");
+//             return Json(result);
+//         }
+
+//         #endregion
+
+//     }
+// }

+ 0 - 217
Areas/Admin/Views/MainServer/ExportExcels/Edit.cshtml

@@ -1,217 +0,0 @@
-@using MySystem.Models;
-@{ExportExcels editData = ViewBag.data as ExportExcels;}
-@{
-    string RightInfo = ViewBag.RightInfo as string;
-    string right = ViewBag.right as string;
-    
-}
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8">
-    <title>excel导出数据(修改)</title>
-    <meta name="renderer" content="webkit">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
-    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
-    <script src="/admin/js/jquery-1.10.1.min.js"></script>
-    <script src="/admin/js/LAreaData2.js"></script>
-</head>
-<body>
-
-    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
-        <input type="hidden" name="Id" value="@editData.Id" />
-        
-        <div class="layui-card">
-          <div class="layui-card-body">
-            <div class="layui-tab" lay-filter="mytabbar">
-                <ul class="layui-tab-title">
-                    <li class="layui-this" lay-id="1">基本信息</li>
-                </ul>
-                <div class="layui-tab-content mt20">
-                    <div class="layui-tab-item layui-show">
-<div class="layui-form-item">
-<label class="layui-form-label">文件名</label>
-<div class="layui-input-inline">
-<input class="layui-input" type="text" id="FileName" name="FileName" value="@editData.FileName" maxlength="50" lay-verify="required|" autocomplete="off" placeholder="请输入文件名">
-</div>
-</div>
-<div class="layui-form-item">
-<label class="layui-form-label">文件路径</label>
-<div class="layui-input-inline">
-<input class="layui-input" type="text" id="FileUrl" name="FileUrl" value="@editData.FileUrl" maxlength="500" lay-verify="required|" autocomplete="off" placeholder="请输入文件路径">
-</div>
-</div>
-
-</div>
-
-                </div>
-            </div>
-            <div class="layui-form-item layui-hide">
-                <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit" value="确认">
-            </div>
-          </div>
-        </div>
-    </div>
-
-    <script src="/layuiadmin/layui/layui.js"></script>
-    <script src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js"></script>
-    <script src="/other/mybjq/kindeditor-min.js"></script>
-    <script src="/other/mybjq/lang/zh_CN.js"></script>
-    <script>
-        
-        
-        //编辑器
-        KindEditor.ready(function (K) {
-            
-        });
-
-        var ids = "";
-        function getChildren(obj) {
-            $.each(obj, function (index, value) {
-                var id = obj[index].id;
-                ids += id + ",";
-                var children = obj[index].children;
-                if (children) {
-                    getChildren(children);
-                }
-            });
-        }
-
-        function AreasProvinceInit(tagId, areasVal, form) {
-            for (var i = 0; i < provs_data.length; i++) {
-                var sel = "";
-                if (areasVal.indexOf(provs_data[i].text) > -1) {
-                    sel = " selected=selected";
-                }
-                $("#" + tagId + "Province").append('<option value="' + provs_data[i].value + '"' + sel + '>' + provs_data[i].text + '</option>');
-            }
-            form.render();
-        }
-
-        function AreasProvinceSelected(tagId, areasVal, form, value) {
-            $("#" + tagId + "City").html('<option value="">市</option>');
-            var list = citys_data[value];
-            for (var i = 0; i < list.length; i++) {
-                var sel = "";
-                if (areasVal.indexOf(list[i].text) > -1) {
-                    sel = " selected=selected";
-                }
-                $("#" + tagId + "City").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
-            }
-            $("#" + tagId + "Area").html('<option value="">县/区</option>');
-            form.render();
-            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
-        }
-
-        function AreasCitySelected(tagId, areasVal, form, value) {
-            $("#" + tagId + "Area").html('<option value="">县/区</option>');
-            var list = dists_data[value];
-            for (var i = 0; i < list.length; i++) {
-                var sel = "";
-                if (areasVal.indexOf(list[i].text) > -1) {
-                    sel = " selected=selected";
-                }
-                $("#" + tagId + "Area").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
-            }
-            form.render();
-            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
-        }
-
-        function AreasAreaSelected(tagId, form) {
-            form.render();
-            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
-        }
-        function movePrev(obj, tagId) {
-            $(obj).parent().prev().insertAfter($(obj).parent());
-            checkPics(tagId);
-        }
-        function moveNext(obj, tagId) {
-            $(obj).parent().next().insertBefore($(obj).parent());
-            checkPics(tagId);
-        }
-        function deletePic(obj, tagId) {
-            $(obj).parent().remove();
-            checkPics(tagId);
-        }
-        function checkPics(tagId) {
-            var pics = "";
-            var texts = "";
-            $("#" + tagId + "Image div img").each(function (i) {
-                pics += $(this).attr("src").replace(osshost, '') + "|";
-            });
-            $("#" + tagId + "Image div input").each(function (i) {
-                texts += $(this).val() + "|";
-            });
-            if (pics == "") {
-                $("#" + tagId).val("");
-            } else {
-                pics = pics.substring(0, pics.length - 1);
-                texts = texts.substring(0, pics.length - 1);
-                $("#" + tagId).val(pics + "#cut#" + texts);
-            }
-        }
-        function checkBox(tagId) {
-            var text = "";
-            $("input[type=checkbox][name=" + tagId + "List]:checked").each(function (i) {
-                text += $(this).val() + ",";
-            });
-            $("#" + tagId).val(text);
-        }
-        function showBigPic(picpath) {
-            parent.layer.open({
-                type: 1,
-                title: false,
-                closeBtn: 0,
-                shadeClose: true,
-                area: ['auto', 'auto'],
-                content: '<img src="' + picpath + '" style="max-width:800px; max-height:800px;" />'
-            });
-        }
-
-        var tree;
-        var element;
-        var upload;
-        layui.config({
-            base: '/layuiadmin/' //静态资源所在路径
-        }).extend({
-            index: 'lib/index' //主入口模块
-        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
-            var $ = layui.$
-                , form = layui.form
-                , layer = layui.layer
-                , layedit = layui.layedit
-                , laydate = layui.laydate
-                , croppers = layui.croppers
-                , transfer = layui.transfer
-                , util = layui.util;
-            tree = layui.tree;
-            element = layui.element;
-            upload = layui.upload;
-        
-            //Hash地址的定位
-            var layid = location.hash.replace(/^#test=/, '');
-            element.tabChange('test', layid);
-            element.on('tab(test)', function (elem) {
-                location.hash = 'test=' + $(this).attr('lay-id');
-            });
-    
-            //日期
-            
-
-            //上传文件
-            
-
-            //穿梭框
-            
-
-            //TreeView,比如权限管理
-            
-
-            //省市区
-            
-        })
-
-    </script>
-</body>
-</html>

+ 21 - 0
Models/ExportExcels.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class ExportExcels
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string FileName { get; set; }
+        public int SysId { get; set; }
+        public string FileUrl { get; set; }
+    }
+}

+ 43 - 10
Models/WebCMSEntities.cs

@@ -48,6 +48,7 @@ namespace MySystem.Models
         public virtual DbSet<CouponsForUser> CouponsForUser { get; set; }
         public virtual DbSet<CustomTagSet> CustomTagSet { get; set; }
         public virtual DbSet<ErpCompanys> ErpCompanys { get; set; }
+        public virtual DbSet<ExportExcels> ExportExcels { get; set; }
         public virtual DbSet<FileUpdateInfo> FileUpdateInfo { get; set; }
         public virtual DbSet<FluxProfitDetail> FluxProfitDetail { get; set; }
         public virtual DbSet<FluxProfitSummary> FluxProfitSummary { get; set; }
@@ -2731,6 +2732,48 @@ namespace MySystem.Models
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<ExportExcels>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.FileName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.FileUrl)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.SysId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
             modelBuilder.Entity<FileUpdateInfo>(entity =>
             {
                 entity.HasComment("资源文件更新信息");
@@ -7751,8 +7794,6 @@ namespace MySystem.Models
                 entity.HasKey(e => e.OrderNo)
                     .HasName("PRIMARY");
 
-                entity.HasComment("订单号关联表");
-
                 entity.Property(e => e.OrderNo)
                     .HasColumnType("varchar(50)")
                     .HasCharSet("utf8")
@@ -7773,8 +7814,6 @@ namespace MySystem.Models
 
             modelBuilder.Entity<OrderProduct>(entity =>
             {
-                entity.HasComment("订单商品");
-
                 entity.HasIndex(e => e.OrderId)
                     .HasName("OrderProductIndex");
 
@@ -7870,8 +7909,6 @@ namespace MySystem.Models
 
             modelBuilder.Entity<OrderRefund>(entity =>
             {
-                entity.HasComment("退款申请");
-
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.Amount).HasColumnType("decimal(18,2)");
@@ -7953,8 +7990,6 @@ namespace MySystem.Models
 
             modelBuilder.Entity<OrderRefundReason>(entity =>
             {
-                entity.HasComment("退款原因");
-
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
@@ -8002,8 +8037,6 @@ namespace MySystem.Models
 
             modelBuilder.Entity<Orders>(entity =>
             {
-                entity.HasComment("创客订单");
-
                 entity.HasIndex(e => e.StoreId)
                     .HasName("OrdersStoreIdIndex");