From 91077d1da4291cc1d8d72e6f9951914f4a822c06 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Fri, 4 Sep 2020 16:37:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=9A=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E7=AE=A1=E7=90=86=EF=BC=9B=E8=B0=83=E6=95=B4=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E9=A3=8E=E6=A0=BC=E7=9A=84=E6=A0=B7=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/LGMapController.cs | 335 +++++---------- .../Controllers/LGTypeController.cs | 85 ++-- .../LR_LGManager/Views/LGMap/AddForm.cshtml | 9 +- .../Areas/LR_LGManager/Views/LGMap/AddForm.js | 77 ++-- .../Views/LGMap/DataItemLG.cshtml | 7 +- .../LR_LGManager/Views/LGMap/DataItemLG.js | 224 +++++----- .../LR_LGManager/Views/LGMap/Form.cshtml | 3 +- .../Areas/LR_LGManager/Views/LGMap/Form.js | 155 +++---- .../LR_LGManager/Views/LGMap/Index.cshtml | 17 +- .../Areas/LR_LGManager/Views/LGMap/Index.js | 183 ++++---- .../Views/LGMap/SystemModuleLG.cshtml | 13 +- .../Views/LGMap/SystemModuleLG.js | 394 +++++++++--------- .../LR_LGManager/Views/LGType/Form.cshtml | 18 +- .../Areas/LR_LGManager/Views/LGType/Form.js | 62 +-- .../LR_LGManager/Views/LGType/Index.cshtml | 19 +- .../Areas/LR_LGManager/Views/LGType/Index.js | 125 +++--- .../Controllers/UserCenterController.cs | 9 + .../Learun.Application.Web.csproj | 8 + .../Views/Home/AdminAccordion.cshtml | 8 +- .../Views/Home/AdminAccordion/Index.css | 330 +++++++++------ .../Views/Home/AdminDefault.cshtml | 7 +- .../Views/Home/AdminDefault/index.css | 17 +- .../Views/Home/AdminDefaultForDC.cshtml | 4 + .../Views/Home/AdminNavigation.cshtml | 11 +- .../Views/Home/AdminTop.cshtml | 4 + .../Views/Home/AdminTop/Index.css | 311 ++++++++------ .../Views/Home/AdminWindos.cshtml | 6 +- .../Views/Home/AdminWindos/Index.css | 373 ++++++++++------- .../Views/LR_Content/plugin/scroll/scroll.js | 2 +- .../LR_Content/script/lr-language - 副本.js | 139 ++++++ .../Views/LR_Content/script/lr-language.js | 236 +++++------ .../Views/Login/Default/Index.js | 4 +- .../Views/UserCenter/Index.cshtml | 10 + .../Views/UserCenter/LanguageForm.cshtml | 13 + .../Views/UserCenter/LanguageForm.css | 19 + .../Views/UserCenter/LanguageForm.js | 35 ++ .../LR_LGManager/LR_Lg_MapMap.cs | 4 +- .../LR_LGManager/LR_Lg_TypeMap.cs | 4 +- .../Learun.Application.Mapping.csproj | 4 + .../LR_LGManager/LGMap/LGMapBLL.cs | 143 ------- .../LR_LGManager/LGMap/LGMapIBLL.cs | 50 --- .../LR_LGManager/LGMap/LGMapService.cs | 216 ---------- .../LR_LGManager/LGMap/LR_Lg_MapEntity.cs | 60 --- .../LR_LGManager/LGType/LGTypeBLL.cs | 144 ------- .../LR_LGManager/LGType/LGTypeIBLL.cs | 50 --- .../LR_LGManager/LGType/LGTypeService.cs | 182 -------- .../LR_LGManager/LGType/LR_Lg_TypeEntity.cs | 60 --- .../Learun.Application.TwoDevelopment.csproj | 8 - 48 files changed, 1829 insertions(+), 2368 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-language - 副本.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/LanguageForm.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/LanguageForm.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Views/UserCenter/LanguageForm.js delete mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LGMap/LGMapBLL.cs delete mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LGMap/LGMapIBLL.cs delete mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LGMap/LGMapService.cs delete mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LGMap/LR_Lg_MapEntity.cs delete mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LGType/LGTypeBLL.cs delete mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LGType/LGTypeIBLL.cs delete mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LGType/LGTypeService.cs delete mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/LGType/LR_Lg_TypeEntity.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Controllers/LGMapController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Controllers/LGMapController.cs index f96c0cfce..af8a66a16 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Controllers/LGMapController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Controllers/LGMapController.cs @@ -1,26 +1,21 @@ -using Learun.Application.TwoDevelopment.LR_LGManager; +using Learun.Application.Language; using Learun.Util; -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Web.Mvc; namespace Learun.Application.Web.Areas.LR_LGManager.Controllers { /// - /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 - /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架 + /// Copyright (c) 2013-2018 上海力软信息技术有限公司 /// 创 建:超级管理员 - /// 日 期:2018-09-29 14:51 - /// 描 述:语言映射 + /// 日 期:2018-04-10 15:00 + /// 描 述:语言映照 /// public class LGMapController : MvcControllerBase { private LGMapIBLL lGMapIBLL = new LGMapBLL(); - #region 视图功能 + #region 视图功能 /// /// 主页面 @@ -40,63 +35,68 @@ namespace Learun.Application.Web.Areas.LR_LGManager.Controllers { return View(); } - - public ActionResult AddForm(string keyValue) + /// + /// 数据字典语言 + /// + /// + [HttpGet] + public ActionResult DataItemLG() { return View(); } - /// - /// 字典翻译 - /// - /// ActionResult. - public ActionResult DataItemLG() + /// 系统功能语言 + /// + /// + [HttpGet] + public ActionResult SystemModuleLG() { return View(); } - /// - /// Systems the module lg. 系统模块翻译 - /// - /// ActionResult. - public ActionResult SystemModuleLG() + /// 新增 + /// + /// + [HttpGet] + public ActionResult AddForm() { return View(); } #endregion - #region 获取数据 - + #region 获取数据 /// - /// 获取页面显示列表数据 + /// 获取列表数据 + /// 编码 + /// + /// + public ActionResult GetListByTypeCode(string TypeCode) + { + var data = lGMapIBLL.GetListByTypeCode(TypeCode); + return Success(data); + } + /// + /// 获取列表数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = lGMapIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取列表分页数据 + /// 分页参数 /// - /// 查询参数 /// [HttpGet] [AjaxOnly] public ActionResult GetPageList(string pagination, string queryJson, string typeList) { - //节后再说吧 - //这里很复杂的写法呢 Pagination paginationobj = pagination.ToObject(); var data = lGMapIBLL.GetPageList(paginationobj, queryJson, typeList); - //var lrltMapEntities = data as LR_Lg_MapEntity[] ?? data.ToArray(); - //var datagroup = lrltMapEntities.GroupBy(p => p.F_TypeCode); - //List facade= new List(); - - //foreach (IGrouping lgMapEntities in datagroup) - //{ - // var newlist= typeList.Split(','); - // Dictionary newobject = new Dictionary(); - // foreach (var s in newlist) - // { - // newobject.Add(s, lgMapEntities.First(p => p.F_TypeCode==s).F_Name); - // } - // newobject.Add("f_code", lgMapEntities.Key); - // newobject.Add("rownum", lgMapEntities.Key); - - - //} var jsonData = new { rows = data, @@ -105,225 +105,102 @@ namespace Learun.Application.Web.Areas.LR_LGManager.Controllers records = paginationobj.records }; return Success(jsonData); - // return null; } /// /// 获取表单数据 + /// 主键 /// /// [HttpGet] [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var LR_Lg_MapData = lGMapIBLL.GetLR_Lg_MapEntity(keyValue); - var jsonData = new - { - LR_Lg_Map = LR_Lg_MapData, - }; - return Success(jsonData); + var data = lGMapIBLL.GetEntity(keyValue); + return Success(data); } - #endregion - - #region 提交数据 - /// - /// 删除实体数据 - /// 主键 + /// 根据名称获取列表 + /// F_Name /// /// - [HttpPost] + [HttpGet] [AjaxOnly] - public ActionResult DeleteForm(string keyValue) + public ActionResult GetListByName(string keyValue) { - lGMapIBLL.DeleteEntity(keyValue); - return Success("删除成功!"); + var data = lGMapIBLL.GetListByName(keyValue); + return Success(data); } /// - /// 保存实体数据(新增、修改) - /// 主键 + /// 根据名称与类型获取列表 + /// F_Name + /// typeCode /// /// - - - #endregion - - #region 扩展 - - + [HttpGet] + [AjaxOnly] public ActionResult GetListByNameAndType(string keyValue, string typeCode) { - var qu = new - { - F_TypeCode = typeCode, - F_Name = keyValue - }; - - var tcList = lGMapIBLL.GetList(qu.ToJson()); - return Success(tcList); + var data = lGMapIBLL.GetListByNameAndType(keyValue, typeCode); + return Success(data); } - - public ActionResult GetLanguageByCode(string typeCode, bool isMain, string ver) - { - var qu = new + /// + /// 根据语言类型编码获取语言包 + /// + /// 语言类型编码 + /// 版本号 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetLanguageByCode(string typeCode,string ver,bool isMain) { + var data = lGMapIBLL.GetMap(typeCode, isMain); + string md5 = Md5Helper.Encrypt(data.ToJson(), 32); + if (md5 == ver) { - F_TypeCode = typeCode, - F_isMain = isMain - }; - - var tcList = lGMapIBLL.GetList(qu.ToJson()); - - Dictionary keyValuePairs = new Dictionary(); - foreach (var item in tcList) + return Success("no update"); + } + else { - try - { - if (isMain) - { - keyValuePairs.Add(item.F_Name, item.F_Code); - - } - else - { - keyValuePairs.Add(item.F_Code, item.F_Name); - } - } - catch (Exception) + var jsondata = new { - - //throw; - } - - + data = data, + ver = md5 + }; + return Success(jsondata); } - var resData = new { data = keyValuePairs }; - return Success(resData); } - public ActionResult GetList(string queryJson) - { - IEnumerable modellist = lGMapIBLL.GetList(queryJson); - return Success(modellist); - } + #endregion + #region 提交数据 /// - /// Saves the muti lg form. - /// - /// The name list. - /// The new name list. - /// The code. - /// ActionResult. + /// 删除实体数据 + /// 主键 + /// + /// [HttpPost] - [ValidateAntiForgeryToken] [AjaxOnly] - public ActionResult SaveForm(string nameList, string newNameList, string code) - { - try - { - if (string.IsNullOrEmpty(code)) - { - string mycode = Guid.NewGuid().ToString(); - var mydict = newNameList.ToObject>(); - foreach (var kvalue in mydict) - { - - LgMapEntity lrltMap = new LgMapEntity(); - lrltMap.F_TypeCode = kvalue.Key; - lrltMap.F_Code = mycode; - lrltMap.F_Name = kvalue.Value; - lGMapIBLL.SaveEntity("", lrltMap); - } - } - else - { - var list = lGMapIBLL.GetList(new { F_Code = code }.ToJson()); - var mydict = newNameList.ToObject>(); - if (mydict.Count != list.Count()) - { - foreach (var mydictKey in mydict.Keys) - { - if (list.Count(p => p.F_TypeCode.ToLower() == mydictKey.ToLower()) == 0) - { - LgMapEntity lge = new LgMapEntity(); - lge.F_TypeCode = mydictKey; - lge.F_Code = code; - lge.F_Name = mydict[mydictKey]; - lGMapIBLL.SaveEntity("", lge); - - } - } - } - foreach (LgMapEntity mapEntity in list) - { - var objNewName = newNameList.ToObject(); - - if (objNewName.ContainsKey(mapEntity.F_TypeCode)) - { - mapEntity.F_Name = objNewName[mapEntity.F_TypeCode].ToString(); - lGMapIBLL.SaveEntity(mapEntity.F_Id, mapEntity); - } - } - } - } - catch (Exception e) - { - return Fail("保存异常!"); - - } - return Success("保存成功"); - } - - - public ActionResult InitLG() + public ActionResult DeleteForm(string keyValue) { - var allfiles = System.IO.Directory.GetFiles("D:\\dataitem\\", "*.txt"); - foreach (string file in allfiles) - { - string jsonData = System.IO.File.ReadAllText(file, Encoding.Default); - - var mydata = jsonData.ToObject>(); - - foreach (var d in mydata.data.rows) - { - try - { - lGMapIBLL.SaveEntity("", new LgMapEntity() - { - F_Code = d.f_code, - F_Id = d.f_id, - F_TypeCode = d.f_typecode, - F_Name = d.f_name - }); - } - catch (Exception e) - { - - - } - - } - - } - - return Success("成了啊"); + lGMapIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); } - - public class FacadeNameListForm + /// + /// 保存实体数据(新增、修改) + /// 原列表 + /// 新列表 + /// F_Code + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string nameList, string newNameList, string code) { - public List rows { get; set; } + lGMapIBLL.SaveEntity(nameList, newNameList, code); + return Success("保存成功!"); } + #endregion - public class MyRow - { - public string f_code { get; set; } - public string f_id { get; set; } - public string f_name { get; set; } - public string f_typecode { get; set; } - - } } - - #endregion -} - - +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Controllers/LGTypeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Controllers/LGTypeController.cs index 49540a873..5fdbd2439 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Controllers/LGTypeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Controllers/LGTypeController.cs @@ -1,23 +1,21 @@ -using Learun.Util; -using System.Data; -using Learun.Application.TwoDevelopment.LR_LGManager; +using Learun.Application.Language; +using Learun.Util; using System.Web.Mvc; -using System.Collections.Generic; namespace Learun.Application.Web.Areas.LR_LGManager.Controllers { /// - /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 - /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架 + /// Copyright (c) 2013-2018 上海力软信息技术有限公司 /// 创 建:超级管理员 - /// 日 期:2018-09-29 15:01 - /// 描 述:多语言映射 + /// 日 期:2018-04-10 15:08 + /// 描 述:语言类型 /// public class LGTypeController : MvcControllerBase { private LGTypeIBLL lGTypeIBLL = new LGTypeBLL(); - #region 视图功能 + #region 视图功能 /// /// 主页面 @@ -26,7 +24,7 @@ namespace Learun.Application.Web.Areas.LR_LGManager.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,16 +33,27 @@ namespace Learun.Application.Web.Areas.LR_LGManager.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } #endregion - #region 获取数据 + #region 获取数据 /// - /// 获取页面显示列表数据 + /// 获取列表数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = lGTypeIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取列表分页数据 + /// 分页参数 /// - /// 查询参数 /// [HttpGet] [AjaxOnly] @@ -62,34 +71,32 @@ namespace Learun.Application.Web.Areas.LR_LGManager.Controllers return Success(jsonData); } /// - /// 获取语言类表 - /// - /// The query josn. - /// ActionResult. + /// 获取表单数据 + /// 主键 + /// + /// [HttpGet] [AjaxOnly] - public ActionResult GetList(string queryJson) + public ActionResult GetFormData(string keyValue) { - var modellist= lGTypeIBLL.GetList(queryJson); - return Success(modellist); + var data = lGTypeIBLL.GetEntity(keyValue); + return Success(data); } /// - /// 获取表单数据 + /// 获取实体数据 + /// 主键 /// /// [HttpGet] [AjaxOnly] - public ActionResult GetFormData(string keyValue) + public ActionResult GetEntityByCode(string keyValue) { - var LR_Lg_TypeData = lGTypeIBLL.GetLR_Lg_TypeEntity( keyValue ); - var jsonData = new { - LR_Lg_Type = LR_Lg_TypeData, - }; - return Success(jsonData); + var data = lGTypeIBLL.GetEntityByCode(keyValue); + return Success(data); } #endregion - #region 提交数据 + #region 提交数据 /// /// 删除实体数据 @@ -111,13 +118,23 @@ namespace Learun.Application.Web.Areas.LR_LGManager.Controllers [HttpPost] [ValidateAntiForgeryToken] [AjaxOnly] - public ActionResult SaveForm(string keyValue, string strEntity) + public ActionResult SaveForm(string keyValue, LGTypeEntity entity) + { + lGTypeIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + /// + /// 设为主语言 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult SetMainLG(string keyValue) { - LgTypeEntity entity = strEntity.ToObject(); - lGTypeIBLL.SaveEntity(keyValue,entity); + lGTypeIBLL.SetMainLG(keyValue); return Success("保存成功!"); } #endregion - } -} +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/AddForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/AddForm.cshtml index 3ffcfb79d..9f13429ee 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/AddForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/AddForm.cshtml @@ -1,12 +1,9 @@ - -@{ - ViewBag.Title = "AddForm"; +@{ + ViewBag.Title = "语言映照"; Layout = "~/Views/Shared/_Form.cshtml"; } -
- -@Html.AppendJsFile("/Areas/LR_LGManager/Views/LGMap/AddForm.js"); +@Html.AppendJsFile("/Areas/LR_LGManager/Views/LGMap/AddForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/AddForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/AddForm.js index 12a87913c..dc81a6183 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/AddForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/AddForm.js @@ -1,53 +1,60 @@ -var acceptClick; -var keyValue = request("keyValue"); +/* * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:超级管理员 + * 日 期:2018-04-10 15:00 + * 描 述:语言映照 + */ +var acceptClick; +var keyValue = request('keyValue'); var bootstrap = function ($, learun) { + "use strict"; var selectedRow = learun.frameTab.currentIframe().selectedRow; var page = { init: function () { page.bind(); }, bind: function () { - var e = []; - learun.httpAsyncGet(top.$.rootUrl + "/LR_LGManager/LGType/GetList", - function (res) { - if (res.data) { - for (var g = 0; g < res.data.length; g++) { - var f = '
' + - res.data[g].F_Name + - '*
'; - e.push(f); - } - $("#form .lr-form-item:last").parent().append(e); - $("#form .lr-form-item:first").remove(); + var data = []; + //获取语言类型 + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGType/GetList', function (res) { + if (res.data) { + for (var i = 0; i < res.data.length; i++) { + var html = '
' + res.data[i].F_Name + '*
'; + data.push(html); } - if (!!selectedRow) { - $("#form").lrSetFormData(d); - } - $("#" + keyValue).attr("disabled", "disabled"); - }); + //根据类型添加表单 + $('#form .lr-form-item:last').parent().append(data); + $('#form .lr-form-item:first').remove(); + } + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + } + + $('#' + keyValue).attr('disabled', 'disabled'); + }); } }; + // 保存数据 acceptClick = function (callBack) { - if (!$("#form").lrValidform()) { + if (!$('#form').lrValidform()) { return false; } - var g = ""; - var f = ""; + var nameList = ""; + var code = ""; if (!!selectedRow) { - f = selectedRow.F_Code; + //原始值 + code = selectedRow["F_Code"]; delete selectedRow.F_Code; - g = JSON.stringify(d); + nameList = JSON.stringify(selectedRow); } - var h = JSON.stringify($("#form").lrGetFormData()); - $.lrSaveForm(top.$.rootUrl + "/LR_LGManager/LGMap/SaveForm?nameList=" + g + "&newNameList=" + h + "&code=" + f, - {}, - function (i) { - if (!!callBack) { - callBack(); - } - }); + //表单值 + var newNameList = JSON.stringify($('#form').lrGetFormData()); + $.lrSaveForm(top.$.rootUrl + '/LR_LGManager/LGMap/SaveForm?nameList=' + nameList + "&newNameList=" + newNameList + "&code=" + code, {}, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); }; page.init(); -}; \ No newline at end of file +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/DataItemLG.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/DataItemLG.cshtml index 18865307a..67a78f8e0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/DataItemLG.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/DataItemLG.cshtml @@ -1,10 +1,7 @@ - -@{ +@{ ViewBag.Title = "数据字典"; Layout = "~/Views/Shared/_Index.cshtml"; } - -
@@ -33,5 +30,5 @@
- @Html.AppendJsFile("/Areas/LR_LGManager/Views/LGMap/DataItemLG.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/DataItemLG.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/DataItemLG.js index 9992452c8..125eef898 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/DataItemLG.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/DataItemLG.js @@ -1,139 +1,137 @@ -var refreshGirdData; +/* + * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:力软-前端开发组 + * 日 期:2017.03.22 + * 描 述:功能模块 + */ +var refreshGirdData; // 更新数据 var selectedRow; var formHeight; var keyValue; var bootstrap = function ($, learun) { - var classify_itemCode = ""; + "use strict"; + var classify_itemCode = ''; var page = { init: function () { page.inittree(); page.initGrid(); page.bind(); - }, bind: function () { - $("#btn_Search").on("click", function () { - var keyword = $("#txt_Keyword").val(); - page.search({ - keyword: keyword - }); + }, + bind: function () { + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + page.search({ keyword: keyword }); }); - $("#lr_refresh").on("click", function () { + // 刷新 + $('#lr_refresh').on('click', function () { location.reload(); }); - $("#lr_edit").on("click", - function () { - selectedRow = $("#gridtable").jfGridGet("rowdata"); - if (learun.checkrow(selectedRow)) { - learun.layerForm({ - id: "form", - title: "编辑", - url: top.$.rootUrl + "/LR_LGManager/LGMap/AddForm?keyValue=" + keyValue, - width: 400, - height: formHeight, - callBack: function (e) { - return top[e].acceptClick(page.search); - } - }); - } - }); - }, inittree: function () { - - - $("#lr_left_tree").lrtree({ - url: top.$.rootUrl + "/LR_SystemModule/DataItem/GetClassifyTree", - nodeClick: function (e) { - classify_itemCode = e.value; - $("#titleinfo").text(e.text + "(" + classify_itemCode + ")"); + // 编辑 + $('#lr_edit').on('click', function () { + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(selectedRow)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LR_LGManager/LGMap/AddForm?keyValue=' + keyValue, + width: 400, + height: formHeight, + callBack: function (id) { + return top[id].acceptClick(page.search); + } + }); + } + }); + }, + inittree: function () { + $('#lr_left_tree').lrtree({ + url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetClassifyTree', + nodeClick: function (item) { + classify_itemCode = item.value; + $('#titleinfo').text(item.text + '(' + classify_itemCode + ')'); page.search(); } }); - - - - - }, initGrid: function () { - var e = []; - learun.httpAsyncGet(top.$.rootUrl + "/LR_LGManager/LGType/GetList", - function (h) { - if (h.data) { - e.push({ - label: "项目值", - name: h.data[0].F_Code, - width: 200, - align: "left" - }); - keyValue = h.data[0].F_Code; - for (var f = 1; f < h.data.length; f++) { - var g = { - label: h.data[f].F_Name, - name: h.data[f].F_Code, - width: 200, - align: "left" - }; - e.push(g); - } - $("#gridtable").jfGrid({ - headData: e, - dblclick: function (i) { - if (learun.checkrow(i)) { - selectedRow = i; - i.F_Code = keyValue; - learun.layerForm({ - id: "form", - title: "编辑", - url: top.$.rootUrl + "/LR_LGManager/LGMap/AddForm?keyValue=" + keyValue, - width: 400, - height: formHeight, - callBack: function (j) { - return top[j].acceptClick(page.search); - } - }); - } + }, + initGrid: function () { + var data = []; + //获取语言类型 + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGType/GetList', function (res) { + if (res.data) { + data.push({ label: "项目值", name: res.data[0].F_Code, width: 200, align: "left" }); + keyValue = res.data[0].F_Code;//主语言 + for (var i = 1; i < res.data.length; i++) { + var obj = { label: res.data[i].F_Name, name: res.data[i].F_Code, width: 200, align: "left" }; + data.push(obj); + } + $('#gridtable').jfGrid({ + headData: data, + dblclick: function (row) { + if (learun.checkrow(row)) { + selectedRow = row; + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LR_LGManager/LGMap/AddForm?keyValue=' + keyValue, + width: 400, + height: formHeight, + callBack: function (id) { + return top[id].acceptClick(page.search); + } + }); } - }); - page.search(); - if (h.data.length <= 3) { - formHeight = 230; - } else { - formHeight = 230 + (h.data.length - 3) * 40; } + }); + page.search(); + if (res.data.length <= 3) { + formHeight = 230; } - }); - }, search: function (f) { - var g = []; - var e = {}; - learun.httpAsyncGet(top.$.rootUrl + "/LR_SystemModule/DataItem/GetDetailList?itemCode=" + classify_itemCode, - function (h) { - learun.httpAsyncGet(top.$.rootUrl + "/LR_LGManager/LGMap/GetList", - function (n) { - if (h.data && n.data) { - for (var k = 0; k < h.data.length; k++) { - var o = n.data.find(function (i) { - return i.F_Name == h.data[k].F_ItemName; - }); - if (typeof o != "undefined") { - var m = n.data.filter(function (i) { - return i.F_Code == o.F_Code; - }); - for (var l = 0; l < m.length; l++) { - e[m[l].F_TypeCode] = m[l].F_Name; - e.F_Code = m[l].F_Code; - } - } else { - e[keyValue] = h.data[k].F_ItemName; - e.F_Code = ""; - } - g.push(e); - e = {} + else { + formHeight = 230 + (res.data.length - 3) * 40; + } + } + }); + }, + search: function (param) { + //获取表数据并赋值 + var rowData = []; + var obj = {}; + learun.httpAsyncGet(top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList?itemCode=' + classify_itemCode, function (res) { + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGMap/GetList', function (mapRes) { + if (res.data && mapRes.data) { + for (var i = 0; i < res.data.length; i++) { + var val = mapRes.data.find(function (element) { + return element.F_Name == res.data[i].F_ItemName; + }); + if (typeof val != 'undefined') { + var list = mapRes.data.filter(function (element) { + return element.F_Code == val.F_Code; + }); + for (var j = 0; j < list.length; j++) { + obj[list[j].F_TypeCode] = list[j].F_Name; + obj.F_Code = list[j].F_Code;//每一行数据的F_Code } - $("#gridtable").jfGridSet("refreshdata", g); - g = []; } - }); + else { + obj[keyValue] = res.data[i].F_ItemName; + obj.F_Code = ""; + } + rowData.push(obj); + obj = {}; + } + $('#gridtable').jfGridSet('refreshdata', rowData); + rowData = []; + } }); + }); } }; + // 保存数据后回调刷新 refreshGirdData = function () { page.search(); - }; + } + page.init(); -}; \ No newline at end of file +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Form.cshtml index 14155a08c..b4d1ee27e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Form.cshtml @@ -1,10 +1,9 @@ @{ - ViewBag.Title = "语言映射"; + ViewBag.Title = "语言映照"; Layout = "~/Views/Shared/_Form.cshtml"; }
- @Html.AppendJsFile("/Areas/LR_LGManager/Views/LGMap/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Form.js index 40c9c0e99..65bfab9ee 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Form.js @@ -1,84 +1,99 @@ -var acceptClick; +/* * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:超级管理员 + * 日 期:2018-04-10 15:00 + * 描 述:语言映照 + */ +var acceptClick; var mainType; -var keyValue = request("keyValue"); -var bootstrap = function (a, b) { - var d = b.frameTab.currentIframe().selectedRow; - var c = { +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + var page = { init: function () { - c.bind() + page.bind(); }, bind: function () { - var e = []; - b.httpAsyncGet(top.$.rootUrl + "/LR_LGManager/LGType/GetList", - function (h) { - if (h.data) { - for (var g = 0; g < h.data.length; g++) { - var f = '
' + h.data[g].F_Name + '*
'; - e.push(f) - } - mainType = h.data[0].F_Code.toLowerCase(); - a("#form .lr-form-item:last").parent().append(e); - a("#form .lr-form-item:first").remove() - } - if (!!d) { - a("#form").lrSetFormData(d) + var data = []; + //获取语言类型 + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGType/GetList', function (res) { + if (res.data) { + for (var i = 0; i < res.data.length; i++) { + var html = '
' + res.data[i].F_Name + '*
'; + data.push(html); } - }) + mainType = res.data[0].F_Code.toLowerCase(); + //根据类型添加表单 + $('#form .lr-form-item:last').parent().append(data); + $('#form .lr-form-item:first').remove(); + } + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + } + }); } }; - acceptClick = function (e) { - if (!a("#form").lrValidform()) { - return false + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; } - var h = ""; - var f = ""; - if (!!d) { - f = d.f_code; - delete d.f_code; - h = JSON.stringify(d) + var nameList = ""; + var code = ""; + if (!!selectedRow) { + //原始值 + code = selectedRow["f_code"]; + delete selectedRow.f_code; + nameList = JSON.stringify(selectedRow); } - var g = a("#form").lrGetFormData(); - var i = JSON.stringify(g); + //表单值 + var formData = $('#form').lrGetFormData(); + var newNameList = JSON.stringify(formData); if (!keyValue) { - b.httpAsyncGet(top.$.rootUrl + "/LR_LGManager/LGMap/GetListByNameAndType?keyValue=" + g[mainType] + "&typeCode=" + mainType, - function (j) { - if (j.data.length != 0) { - b.alert.warning("主语言项不能重复!"); - return false - } else { - a.lrSaveForm(top.$.rootUrl + "/LR_LGManager/LGMap/SaveForm?nameList=" + h + "&newNameList=" + i + "&code=" + f, {}, - function (k) { - if (!!e) { - e() - } - }) - } - }) - } else { - if (g[mainType] != d[mainType]) { - b.httpAsyncGet(top.$.rootUrl + "/LR_LGManager/LGMap/GetListByNameAndType?keyValue=" + g[mainType] + "&typeCode=" + mainType, - function (j) { - if (j.data.length != 0) { - b.alert.warning("主语言项不能重复!"); - return false - } else { - a.lrSaveForm(top.$.rootUrl + "/LR_LGManager/LGMap/SaveForm?nameList=" + h + "&newNameList=" + i + "&code=" + f, {}, - function (k) { - if (!!e) { - e() - } - }) + //判断主语言是否重复 + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGMap/GetListByNameAndType?keyValue=' + formData[mainType] + '&typeCode=' + mainType, function (res) { + if (res.data.length != 0) { + learun.alert.warning("主语言项不能重复!"); + return false; + } + else { + $.lrSaveForm(top.$.rootUrl + '/LR_LGManager/LGMap/SaveForm?nameList=' + nameList + "&newNameList=" + newNameList + "&code=" + code, {}, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); } - }) - } else { - a.lrSaveForm(top.$.rootUrl + "/LR_LGManager/LGMap/SaveForm?nameList=" + h + "&newNameList=" + i + "&code=" + f, {}, - function (j) { - if (!!e) { - e() - } - }) + }); + } + }); + } + else { + if (formData[mainType] != selectedRow[mainType]) { + //判断主语言是否重复 + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGMap/GetListByNameAndType?keyValue=' + formData[mainType] + '&typeCode=' + mainType, function (res) { + if (res.data.length != 0) { + learun.alert.warning("主语言项不能重复!"); + return false; + } + else { + $.lrSaveForm(top.$.rootUrl + '/LR_LGManager/LGMap/SaveForm?nameList=' + nameList + "&newNameList=" + newNameList + "&code=" + code, {}, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } + }); + } + else { + $.lrSaveForm(top.$.rootUrl + '/LR_LGManager/LGMap/SaveForm?nameList=' + nameList + "&newNameList=" + newNameList + "&code=" + code, {}, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); } } }; - c.init() -}; \ No newline at end of file + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Index.cshtml index 9bb134f94..cd72439db 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Index.cshtml @@ -1,9 +1,7 @@ - -@{ - ViewBag.Title = "数据字典"; +@{ + ViewBag.Title = "语言映照"; Layout = "~/Views/Shared/_Index.cshtml"; } -
@@ -13,7 +11,7 @@
@@ -21,9 +19,9 @@
@@ -31,5 +29,4 @@ - -@Html.AppendJsFile("/Areas/LR_LGManager/Views/LGMap/Index.js"); +@Html.AppendJsFile("/Areas/LR_LGManager/Views/LGMap/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Index.js index f262032e9..fb7713ffc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/Index.js @@ -1,111 +1,106 @@ -var selectedRow; +/* * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:超级管理员 + * 日 期:2018-04-10 15:00 + * 描 述:语言映照 + */ +var selectedRow; var refreshGirdData; var formHeight; -var bootstrap = function (a, b) { - var c = { +var bootstrap = function ($, learun) { + "use strict"; + var page = { init: function () { - c.initGrid(); - c.bind() + page.initGrid(); + page.bind(); }, bind: function () { - a("#btn_Search").on("click", - function () { - var d = a("#txt_Keyword").val(); - c.search({ - keyword: d - }) - }); - a("#lr_refresh").on("click", - function () { - location.reload() + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + page.search({ keyword: keyword }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + selectedRow = null; + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/LR_LGManager/LGMap/Form', + width: 400, + height: formHeight, + callBack: function (id) { + return top[id].acceptClick(page.search); + } }); - a("#lr_add").on("click", - function () { - selectedRow = null; - b.layerForm({ - id: "form", - title: "新增", - url: top.$.rootUrl + "/LR_LGManager/LGMap/Form", + }); + // 编辑 + $('#lr_edit').on('click', function () { + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(selectedRow)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LR_LGManager/LGMap/Form?keyValue=' + selectedRow.f_code, width: 400, height: formHeight, - callBack: function (d) { - return top[d].acceptClick(c.search) + callBack: function (id) { + return top[id].acceptClick(page.search); } - }) - }); - a("#lr_edit").on("click", - function () { - selectedRow = a("#gridtable").jfGridGet("rowdata"); - if (b.checkrow(selectedRow)) { - b.layerForm({ - id: "form", - title: "编辑", - url: top.$.rootUrl + "/LR_LGManager/LGMap/Form?keyValue=" + selectedRow.f_code, - width: 400, - height: formHeight, - callBack: function (d) { - return top[d].acceptClick(c.search) - } - }) - } - }); - a("#lr_delete").on("click", - function () { - selectedRow = a("#gridtable").jfGridGet("rowdata"); - if (b.checkrow(selectedRow)) { - b.layerConfirm("是否确认删除该项!", - function (d) { - if (d) { - b.deleteForm(top.$.rootUrl + "/LR_LGManager/LGMap/DeleteForm", { - keyValue: selectedRow.f_code - }, - function () { - c.search() - }) - } - }) - } - }) + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(selectedRow)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LR_LGManager/LGMap/DeleteForm', { keyValue: selectedRow["f_code"] }, function () { + page.search() + }); + } + }); + } + }); }, initGrid: function () { - var d = []; - b.httpAsyncGet(top.$.rootUrl + "/LR_LGManager/LGType/GetList", - function (g) { - if (g.data) { - var h = []; - for (var e = 0; e < g.data.length; e++) { - var f = { - label: g.data[e].F_Name, - name: g.data[e].F_Code.toLowerCase(), - width: 200, - align: "left" - }; - d.push(f); - h.push(g.data[e].F_Code) - } - a("#gridtable").jfGrid({ - url: top.$.rootUrl + "/LR_LGManager/LGMap/GetPageList?typeList=" + h, - headData: d, - isPage: true, - }); - c.search(); - if (g.data.length <= 3) { - formHeight = 230 - } else { - formHeight = 230 + (g.data.length - 3) * 40 - } + var data = []; + //获取语言类型 + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGType/GetList', function (res) { + if (res.data) { + var typeList = []; + for (var i = 0; i < res.data.length; i++) { + var obj = { label: res.data[i].F_Name, name: res.data[i].F_Code.toLowerCase(), width: 200, align: "left" }; + data.push(obj); + typeList.push(res.data[i].F_Code); + } + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LR_LGManager/LGMap/GetPageList?typeList=' + typeList, + headData: data, + isPage: true, + }); + page.search(); + if (res.data.length <= 3) { + formHeight = 230; + } + else { + formHeight = 230 + (res.data.length - 3) * 40; } - }) + } + }); }, - search: function (d) { - d = d || {}; - a("#gridtable").jfGridSet("reload", { - queryJson: JSON.stringify(d) - }) + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) } ); } }; refreshGirdData = function () { - c.search() + $('#gridtable').jfGridSet('reload'); }; - c.init() -}; \ No newline at end of file + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/SystemModuleLG.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/SystemModuleLG.cshtml index 2c9afb279..d9cd90a51 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/SystemModuleLG.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/SystemModuleLG.cshtml @@ -1,9 +1,9 @@ - -@{ - ViewBag.Title = "系统模块翻译"; - Layout = "~/Views/Shared/_Index.cshtml"; -} +@{ + /**/ + ViewBag.Title = "系统功能"; + Layout = "~/Views/Shared/_Index.cshtml"; +}
@@ -31,6 +31,5 @@
- - @Html.AppendJsFile("/Areas/LR_LGManager/Views/LGMap/SystemModuleLG.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/SystemModuleLG.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/SystemModuleLG.js index e60784b24..5a8b0a172 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/SystemModuleLG.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGMap/SystemModuleLG.js @@ -1,226 +1,220 @@ -var refreshGirdData; +/* + * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:力软-前端开发组 + * 日 期:2017.03.22 + * 描 述:功能模块 + */ +var refreshGirdData; // 更新数据 var selectedRow; var formHeight; var keyValue; var moduleType = true; -var bootstrap = function (a, b) { - var c = "0"; - var d = { +var bootstrap = function ($, learun) { + "use strict"; + var moduleId = '0'; + var page = { init: function () { - d.inittree(); - d.initGrid(); - d.bind() + page.inittree(); + page.initGrid(); + page.bind(); }, bind: function () { - a("#btn_Search").on("click", - function () { - var e = a("#txt_Keyword").val(); - d.search({ - parentId: c, - keyword: e - }) - }); - a("#lr_refresh").on("click", - function () { - location.reload() - }); - a("#lr_edit").on("click", - function () { - selectedRow = a("#gridtable").jfGridGet("rowdata"); - if (b.checkrow(selectedRow)) { - b.layerForm({ - id: "form", - title: "编辑", - url: top.$.rootUrl + "/LR_LGManager/LGMap/AddForm?keyValue=" + keyValue, - width: 400, - height: formHeight, - callBack: function (e) { - return top[e].acceptClick(function () { - d.search({ - parentId: c - }) - }) - } - }) - } - }) + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + page.search({ parentId: moduleId, keyword: keyword }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 编辑 + $('#lr_edit').on('click', function () { + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(selectedRow)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LR_LGManager/LGMap/AddForm?keyValue=' + keyValue, + width: 400, + height: formHeight, + callBack: function (id) { + return top[id].acceptClick(function(){ + page.search({ parentId: moduleId }); + }); + } + }); + } + }); }, inittree: function () { - a("#module_tree").lrtree({ - url: top.$.rootUrl + "/LR_SystemModule/Module/GetModuleTree", - nodeClick: d.treeNodeClick - }) + $('#module_tree').lrtree({ + url: top.$.rootUrl + '/LR_SystemModule/Module/GetModuleTree', + nodeClick: page.treeNodeClick + }); }, - treeNodeClick: function (e) { - c = e.id; - moduleType = e.hasChildren; - a("#titleinfo").text(e.text); - d.search({ - parentId: c - }) + treeNodeClick: function (item) { + moduleId = item.id; + moduleType = item.hasChildren + $('#titleinfo').text(item.text); + page.search({ parentId: moduleId }); }, initGrid: function () { - var e = []; - b.httpAsyncGet(top.$.rootUrl + "/LR_LGManager/LGType/GetList", - function (h) { - if (h.data) { - e.push({ - label: "名称", - name: h.data[0].F_Code, - width: 200, - align: "left" - }); - keyValue = h.data[0].F_Code; - for (var f = 1; f < h.data.length; f++) { - var g = { - label: h.data[f].F_Name, - name: h.data[f].F_Code, - width: 200, - align: "left" - }; - e.push(g) - } - a("#gridtable").jfGrid({ - headData: e, - dblclick: function (i) { - if (b.checkrow(i)) { - selectedRow = i; - b.layerForm({ - id: "form", - title: "编辑", - url: top.$.rootUrl + "/LR_LGManager/LGMap/AddForm?keyValue=" + keyValue, - width: 400, - height: formHeight, - callBack: function (j) { - return top[j].acceptClick(function () { - d.search({ - parentId: c - }) - }) - } - }) - } + var data = []; + //获取语言类型 + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGType/GetList', function (res) { + if (res.data) { + data.push({ label: "名称", name: res.data[0].F_Code, width: 200, align: "left" }); + keyValue = res.data[0].F_Code;//主语言 + for (var i = 1; i < res.data.length; i++) { + var obj = { label: res.data[i].F_Name, name: res.data[i].F_Code, width: 200, align: "left" }; + data.push(obj); + } + $('#gridtable').jfGrid({ + headData: data, + dblclick: function (row) { + if (learun.checkrow(row)) { + selectedRow = row; + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LR_LGManager/LGMap/AddForm?keyValue=' + keyValue, + width: 400, + height: formHeight, + callBack: function (id) { + return top[id].acceptClick(function () { + page.search({ parentId: moduleId }); + }); + } + }); } - }); - d.search({ - parentId: c - }); - if (h.data.length <= 3) { - formHeight = 230 - } else { - formHeight = 230 + (h.data.length - 3) * 40 } + }); + page.search({ parentId: moduleId }); + if (res.data.length <= 3) { + formHeight = 230; } - }) + else { + formHeight = 230 + (res.data.length - 3) * 40; + } + } + }); }, - search: function (f) { - var g = []; - var e = {}; - if (moduleType) { - b.httpAsyncGet(top.$.rootUrl + "/LR_SystemModule/Module/GetModuleListByParentId?parentId=" + f.parentId, - function (h) { - b.httpAsyncGet(top.$.rootUrl + "/LR_LGManager/LGMap/GetList", - function (n) { - if (h.data && n.data) { - for (var k = 0; k < h.data.length; k++) { - var o = n.data.find(function (i) { - return i.F_Name == h.data[k].F_FullName - }); - if (typeof o != "undefined") { - var m = n.data.filter(function (i) { - return i.F_Code == o.F_Code - }); - for (var l = 0; l < m.length; l++) { - e[m[l].F_TypeCode] = m[l].F_Name; - e.F_Code = m[l].F_Code - } - } else { - e[keyValue] = h.data[k].F_FullName; - e.F_Code = "" - } - g.push(e); - e = {} + search: function (param) { + //获取表数据并赋值 + var rowData = []; + var obj = {}; + if (moduleType) {//判断是否有下级 + learun.httpAsyncGet(top.$.rootUrl + '/LR_SystemModule/Module/GetModuleListByParentId?parentId=' + param.parentId, function (res) { + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGMap/GetList', function (mapRes) { + if (res.data && mapRes.data) { + for (var i = 0; i < res.data.length; i++) { + var val = mapRes.data.find(function (element) { + return element.F_Name == res.data[i].F_FullName; + }); + if (typeof val != 'undefined') { + var list = mapRes.data.filter(function (element) { + return element.F_Code == val.F_Code; + }); + for (var j = 0; j < list.length; j++) { + obj[list[j].F_TypeCode] = list[j].F_Name; + obj.F_Code = list[j].F_Code;//每一行数据的F_Code } - a("#gridtable").jfGridSet("refreshdata", g); - g = [] } - }) - }) - } else { - b.httpAsyncGet(top.$.rootUrl + "/LR_SystemModule/Module/GetFormData?keyValue=" + f.parentId, - function (h) { - b.httpAsyncGet(top.$.rootUrl + "/LR_LGManager/LGMap/GetList", - function (n) { - if (h.data && n.data) { - for (var k = 0; k < h.data.moduleButtons.length; k++) { - var o = n.data.find(function (i) { - return i.F_Name == h.data.moduleButtons[k].F_FullName - }); - if (typeof o != "undefined") { - var m = n.data.filter(function (i) { - return i.F_Code == o.F_Code - }); - for (var l = 0; l < m.length; l++) { - e[m[l].F_TypeCode] = m[l].F_Name; - e.F_Code = m[l].F_Code - } - } else { - e[keyValue] = h.data.moduleButtons[k].F_FullName; - e.F_Code = "" - } - g.push(e); - e = {} + else { + obj[keyValue] = res.data[i].F_FullName; + obj.F_Code = ""; + } + rowData.push(obj); + obj = {}; + } + $('#gridtable').jfGridSet('refreshdata', rowData); + rowData = []; + } + }); + }); + } + else {//展示按钮与列 + learun.httpAsyncGet(top.$.rootUrl + '/LR_SystemModule/Module/GetFormData?keyValue=' + param.parentId, function (res) { + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGMap/GetList', function (mapRes) { + if (res.data && mapRes.data) { + // 按钮信息 + for (var i = 0; i < res.data.moduleButtons.length; i++) { + var val = mapRes.data.find(function (element) { + return element.F_Name == res.data.moduleButtons[i].F_FullName; + }); + if (typeof val != 'undefined') { + var list = mapRes.data.filter(function (element) { + return element.F_Code == val.F_Code; + }); + for (var j = 0; j < list.length; j++) { + obj[list[j].F_TypeCode] = list[j].F_Name; + obj.F_Code = list[j].F_Code;//每一行数据的F_Code } - for (var k = 0; k < h.data.moduleColumns.length; k++) { - var o = n.data.find(function (i) { - return i.F_Name == h.data.moduleColumns[k].F_FullName - }); - if (typeof o != "undefined") { - var m = n.data.filter(function (i) { - return i.F_Code == o.F_Code - }); - for (var l = 0; l < m.length; l++) { - e[m[l].F_TypeCode] = m[l].F_Name; - e.F_Code = m[l].F_Code - } - } else { - e[keyValue] = h.data.moduleColumns[k].F_FullName; - e.F_Code = "" - } - g.push(e); - e = {} + } + else { + obj[keyValue] = res.data.moduleButtons[i].F_FullName; + obj.F_Code = ""; + } + rowData.push(obj); + obj = {}; + } + // 列表信息 + for (var i = 0; i < res.data.moduleColumns.length; i++) { + var val = mapRes.data.find(function (element) { + return element.F_Name == res.data.moduleColumns[i].F_FullName; + }); + if (typeof val != 'undefined') { + var list = mapRes.data.filter(function (element) { + return element.F_Code == val.F_Code; + }); + for (var j = 0; j < list.length; j++) { + obj[list[j].F_TypeCode] = list[j].F_Name; + obj.F_Code = list[j].F_Code;//每一行数据的F_Code } - for (var k = 0; k < h.data.moduleFields.length; k++) { - var o = n.data.find(function (i) { - return i.F_Name == h.data.moduleFields[k].F_FullName - }); - if (typeof o != "undefined") { - var m = n.data.filter(function (i) { - return i.F_Code == o.F_Code - }); - for (var l = 0; l < m.length; l++) { - e[m[l].F_TypeCode] = m[l].F_Name; - e.F_Code = m[l].F_Code - } - } else { - e[keyValue] = h.data.moduleFields[k].F_FullName; - e.F_Code = "" - } - g.push(e); - e = {} + } + else { + obj[keyValue] = res.data.moduleColumns[i].F_FullName; + obj.F_Code = ""; + } + rowData.push(obj); + obj = {}; + } + // 表单字段 + for (var i = 0; i < res.data.moduleFields.length; i++) { + var val = mapRes.data.find(function (element) { + return element.F_Name == res.data.moduleFields[i].F_FullName; + }); + if (typeof val != 'undefined') { + var list = mapRes.data.filter(function (element) { + return element.F_Code == val.F_Code; + }); + for (var j = 0; j < list.length; j++) { + obj[list[j].F_TypeCode] = list[j].F_Name; + obj.F_Code = list[j].F_Code;//每一行数据的F_Code } - a("#gridtable").jfGridSet("refreshdata", g); - g = [] } - }) - }) + else { + obj[keyValue] = res.data.moduleFields[i].F_FullName; + obj.F_Code = ""; + } + rowData.push(obj); + obj = {}; + } + + $('#gridtable').jfGridSet('refreshdata', rowData); + rowData = []; + } + }); + }); } } }; + // 保存数据后回调刷新 refreshGirdData = function () { - d.search({ - parentId: c - }) - }; - d.init() -}; \ No newline at end of file + page.search({ parentId: moduleId }); + } + + page.init(); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Form.cshtml index ff8447db4..0fdb6dc00 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Form.cshtml @@ -1,19 +1,15 @@ @{ - ViewBag.Title = "多语言映射"; + ViewBag.Title = "语言类型"; Layout = "~/Views/Shared/_Form.cshtml"; } -
-
-
名称*
+
+
+
名称*
-
-
编码*
- +
+
编码*
+
- @*
-
是否主语言
- -
*@
@Html.AppendJsFile("/Areas/LR_LGManager/Views/LGType/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Form.js index 7aff5d79f..fcd2e94d1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Form.js @@ -1,48 +1,60 @@ -/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) - * Copyright (c) 2013-2018 北京泉江科技有限公司 +/* * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 * 创建人:超级管理员 - * 日 期:2018-09-29 15:01 - * 描 述:多语言映射 + * 日 期:2018-04-10 15:08 + * 描 述:语言类型 */ var acceptClick; var keyValue = request('keyValue'); var bootstrap = function ($, learun) { "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; var page = { init: function () { - $('.lr-form-wrap').lrscroll(); - page.bind(); page.initData(); }, bind: function () { }, initData: function () { - if (!!keyValue) { - $.lrSetForm(top.$.rootUrl + '/LR_LGManager/LGType/GetFormData?keyValue=' + keyValue, function (data) { - for (var id in data) { - if (!!data[id].length && data[id].length > 0) { - $('#' + id ).jfGridSet('refreshdata', data[id]); - } - else { - $('[data-table="' + id + '"]').lrSetFormData(data[id]); - } - } - }); + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); } } }; // 保存数据 acceptClick = function (callBack) { - if (!$('body').lrValidform()) { + if (!$('#form').lrValidform()) { return false; } - var postData = { - strEntity: JSON.stringify($('body').lrGetFormData()) - }; - $.lrSaveForm(top.$.rootUrl + '/LR_LGManager/LGType/SaveForm?keyValue=' + keyValue, postData, function (res) { - // 保存成功后才回调 - if (!!callBack) { - callBack(); + var postData = $('#form').lrGetFormData(); + postData.F_Code = postData.F_Code.toLowerCase(); + postData.F_IsMain = 0; + postData['__RequestVerificationToken'] = $.lrToken; + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGType/GetEntityByCode?keyValue=' + postData.F_Code, function (res) { + //判断编辑是否更改编码 + if (res.data) { + learun.alert.warning("编码已存在"); + return false; + } + else { + if (!(selectedRow && selectedRow.F_Code === postData.F_Code) && keyValue) { + selectedRow.F_Code = postData.F_Code; + selectedRow.F_Name = postData.F_Name; + $.lrSaveForm(top.$.rootUrl + '/LR_LGManager/LGType/SaveForm?keyValue=' + keyValue, selectedRow, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } + else if (!keyValue) { + $.lrSaveForm(top.$.rootUrl + '/LR_LGManager/LGType/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } } }); }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Index.cshtml index f2246ea27..e77e3cc47 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Index.cshtml @@ -1,29 +1,30 @@ @{ - ViewBag.Title = "多语言映射"; + ViewBag.Title = "语言类型"; Layout = "~/Views/Shared/_Index.cshtml"; } -
+
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Index.js index 6fb8a9ee5..8e2bcc7a0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_LGManager/Views/LGType/Index.js @@ -1,26 +1,23 @@ -/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) - * Copyright (c) 2013-2018 北京泉江科技有限公司 +/* * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 * 创建人:超级管理员 - * 日 期:2018-09-29 15:01 - * 描 述:多语言映射 + * 日 期:2018-04-10 15:08 + * 描 述:语言类型 */ -var refreshGirdData; var selectedRow; +var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var page = { init: function () { - page.initGird(); + page.initGrid(); page.bind(); }, bind: function () { - - - $("#btn_Search").on("click", function () { - var keyword = $("#txt_Keyword").val(); - page.search({ - keyword: keyword - }); + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + page.search({ keyword: keyword }); }); // 刷新 $('#lr_refresh').on('click', function () { @@ -30,9 +27,9 @@ var bootstrap = function ($, learun) { $('#lr_add').on('click', function () { selectedRow = null; learun.layerForm({ - id: "form", - title: "新增", - url: top.$.rootUrl + "/LR_LGManager/LGType/Form", + id: 'form', + title: '新增', + url: top.$.rootUrl + '/LR_LGManager/LGType/Form', width: 300, height: 180, callBack: function (id) { @@ -43,11 +40,12 @@ var bootstrap = function ($, learun) { // 编辑 $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('F_Id'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); if (learun.checkrow(keyValue)) { learun.layerForm({ - id: "form", - title: "编辑", - url: top.$.rootUrl + "/LR_LGManager/LGType/Form?keyValue=" + keyValue, + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LR_LGManager/LGType/Form?keyValue=' + keyValue, width: 300, height: 180, callBack: function (id) { @@ -59,65 +57,80 @@ var bootstrap = function ($, learun) { // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('F_Id'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); if (learun.checkrow(keyValue)) { - selectedRow = $("#gridtable").jfGridGet("rowdata"); if (selectedRow.F_IsMain === 1) { learun.alert.warning("主语言不能删除!"); return false; } - learun.layerConfirm('是否确认删除该项!', function (res) { - if (res) { - learun.deleteForm(top.$.rootUrl + '/LR_LGManager/LGType/DeleteForm', { keyValue: keyValue}, function () { - refreshGirdData(); + learun.httpAsyncGet(top.$.rootUrl + '/LR_LGManager/LGMap/GetListByTypeCode?TypeCode=' + selectedRow.F_Code, function (res) { + if (res.data.length != 0) { + learun.alert.warning("请先删除编码对应数据!"); + return false; + } + else { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LR_LGManager/LGType/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } }); } }); } }); - // 打印 - $('#lr_print').on('click', function () { - $('#gridtable').jqprintTable(); + $('#lr_mainlg').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认设为主语言!', function (res, index) { + if (res) { + learun.loading(true, '正在设置主语言'); + learun.httpAsyncPost(top.$.rootUrl + '/LR_LGManager/LGType/SetMainLG', { keyValue: keyValue }, function (res) { + learun.loading(false); + if (res.code == learun.httpCode.success) { + learun.alert.success(res.info); + refreshGirdData(); + } + else { + learun.alert.error(res.info); + learun.httpErrorLog(res.info); + } + top.layer.close(index) + }); + } + }) + } }); }, - // 初始化列表 - initGird: function () { + initGrid: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/LR_LGManager/LGType/GetPageList', - headData: [{ - label: "名称", - name: "F_Name", - width: 200, - align: "left" - }, { - label: "编码", - name: "F_Code", - width: 300, - align: "left" - }, { - label: "主语言", - name: "F_IsMain", - width: 80, - align: "left", - formatter: function (d) { - if (d == 1) { - return ''; - } else { - return ''; + url: top.$.rootUrl + '/LR_LGManager/LGType/GetList', + headData: [ + { label: '名称', name: 'F_Name', width: 200, align: "left" }, + { label: '编码', name: 'F_Code', width: 300, align: "left" }, + { + label: '主语言', name: 'F_IsMain', width: 80, align: "left", + formatter: function (cellvalue) { + if (cellvalue == 1) { + return ''; + } + else return ''; } - } - }], - mainId:'F_Id', - isPage: true + }, + ], + mainId: 'F_Id', + reloadSelected: true, }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { - page.search(); + $('#gridtable').jfGridSet('reload'); }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UserCenterController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UserCenterController.cs index 184e87321..dff37f673 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UserCenterController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UserCenterController.cs @@ -163,6 +163,15 @@ namespace Learun.Application.Web.Controllers ViewBag.isCheck = checkMark; return View(); } + /// + /// 个人中心-语言设置 + /// + /// + [HttpGet] + public ActionResult LanguageForm() + { + return View(); + } #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 11b899a54..57e62cbbd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -3805,6 +3805,7 @@ + @@ -4858,6 +4859,8 @@ + + @@ -6132,6 +6135,10 @@ {DB34DFC9-7227-41FA-88AA-832DBF247811} Learun.Application.IM + + {36083FBB-CE7F-4EE0-8459-C4B60A2DD070} + Learun.Application.Language + {79f8e2f1-08e7-4336-93e0-512b39f9dd54} Learun.Application.Mapping @@ -6852,6 +6859,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion.cshtml index e7db8eb42..8326a0c94 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion.cshtml @@ -4,10 +4,16 @@ } @Html.AppendCssFile("/Views/Home/AdminAccordion/index.css")
- +
+ +
+ + +
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion/Index.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion/Index.css index 8edcbe15c..6dfbeda91 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion/Index.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminAccordion/Index.css @@ -1,4 +1,11 @@ -.lr-logo-title { +/* + * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:力软-前端开发组 + * 日 期:2017.03.16 + * 描 述:手风琴风格皮肤样式表 + */ +.lr-logo-title { display: block; position: absolute; top: 0; @@ -9,18 +16,18 @@ white-space: nowrap; left: 10px; line-height: 55px; - color: #fff !important + color: #fff !important; } .lr-logo-title img { - width: 320px + width: 320px; } - +/*顶部*/ .lr-frame-top { height: 60px; - background: #1d1d1d + background: #1d1d1d; } - +/*菜单*/ .lr-frame-menu { top: 0; width: 200px; @@ -28,15 +35,15 @@ z-index: 1; background: #282828; box-shadow: 1px 0 20px rgba(0,0,0,0.08); - padding: 90px 0 35px 0 + padding: 90px 0 35px 0; } .lr-frame-menu .lr-menu-item { height: 36px; line-height: 36px; - padding: 0 15px; + padding: 0px 15px; color: #fff; - font-size: 13px + font-size: 13px; } .lr-first-menu-list > li > .lr-menu-item:hover { @@ -44,60 +51,73 @@ } .lr-first-menu-list > li > .lr-menu-item.open { - background: #156edb + background: #156edb; } + .lr-frame-menu .lr-menu-item-icon { font-size: 14px; - opacity: .9; + opacity: 0.9; filter: alpha(opacity=90); width: 17px; margin-right: 8px; vertical-align: middle; - margin-bottom: 1px + margin-bottom: 1px; } .lr-frame-menu .lr-menu-item-arrow { position: absolute; right: 10px; - line-height: 36px + line-height: 36px; } -.lr-second-menu-list, .lr-three-menu-list, .lr-fourth-menu-list { + + + +.lr-second-menu-list, +.lr-three-menu-list { position: relative; width: 100%; - background-color: #1d1d1d + background-color: #1d1d1d; } .lr-second-menu-list .lr-menu-item { padding-left: 40px; - padding-right: 15px + padding-right: 15px; } .lr-second-menu-list .lr-menu-item:hover { - background-color: #393939 + background-color: #393939; } .lr-three-menu-list .lr-menu-item { - padding-left: 60px + padding-left: 60px; + } + +.lr-four-menu-list { + display: none; +} + + .lr-four-menu-list .lr-menu-item { + padding-left: 80px; } .lr-menu-item.open > .lr-menu-item-arrow > i { -webkit-transform: rotate(-90deg); -ms-transform: rotate(-90deg); -o-transform: rotate(-90deg); - transform: rotate(-90deg) + transform: rotate(-90deg); } - +/*tabs条*/ .lr-frame-tabs { top: 0; height: 60px; z-index: 2; - padding: 0 60px 0 405px + padding: 0px 60px 0px 405px; } .lr-frame-tabItem:first-child { - border-left: 1px solid #2a2f32 + border-left: 1px solid #2a2f32; } .lr-frame-tabItem { @@ -106,23 +126,23 @@ font-size: 14px; border-right: 1px solid #2a2f32; color: #fff; - margin-left: 0 + margin-left: 0px; } .lr-frame-tabItem.active { - background: #444 + background: #444; } .lr-frame-tabItem .reomve { top: 24px; - right: 4px + right: 4px; } - +/*功能窗口*/ .lr-frame-main { - padding: 60px 0 0 200px; - background: #eaedf1 + padding: 60px 0px 0px 200px; + background: #eaedf1; } - +/*个人设置和头像*/ .lr-frame-personCenter { bottom: 0; left: 0; @@ -130,14 +150,14 @@ width: 200px; line-height: 35px; padding: 0 10px; - background: #282828 + background: #282828; } .lr-frame-personCenter > .dropdown-toggle { height: 100%; line-height: 35px; border-top: 1px solid rgba(248,248,248,0.2); - color: #fff + color: #fff; } .lr-frame-personCenter > .dropdown-toggle > img { @@ -146,7 +166,7 @@ height: 18px; border: 2px solid #fff; border-radius: 50%; - margin: 8px 10px 0 0 + margin: 8px 10px 0 0; } .lr-frame-personCenter .dropdown-menu { @@ -154,24 +174,25 @@ position: absolute; left: 10px; top: -172px; - background: #282828 + background: #282828; } .lr-frame-personCenter .dropdown-menu > li > a { padding: 10px 15px; color: #fff; - font-size: 12px + font-size: 12px; } .lr-frame-personCenter .dropdown-menu > li > a:hover { background: #393939; - color: #fff + color: #fff; } .lr-frame-personCenter .divider { - background-color: #63656B + background-color: #63656B; } +/*风尚版独有-菜单缩进按钮*/ .lr-frame-menu-btn { position: absolute; left: 0; @@ -184,18 +205,19 @@ cursor: pointer; color: #aeb9c2; background-color: #4A5064; - z-index: 2 + z-index: 2; } .lr-frame-menu-btn:hover { background-color: #4A5064; - color: #fff + color: #fff; } .lr-frame-menu-btn i { - opacity: .5 + opacity: .5; } +/*全屏*/ .lr_frame_fullscreen { top: 0; right: 0; @@ -203,37 +225,44 @@ width: 30px; line-height: 60px; text-align: center; - z-index: 3 + z-index: 3; } .lr_frame_fullscreen a { font-size: 14px; - color: #c1c3c9 + color: #c1c3c9; } .lr_frame_fullscreen a:hover { - color: #fff + color: #fff; } +/*菜单关闭后显示样式*/ .lr-menu-closed .lr-frame-menu { - width: 50px + width: 50px; } -.lr-menu-closed .lr-frame-menu-wrap span, .lr-menu-closed .lr-frame-menu-wrap .lr-menu-item-arrow, .lr-menu-closed .lr-meun-had > a { - display: none +.lr-menu-closed .lr-frame-menu-wrap .lr-three-menu-list { + display: block; } -.lr-menu-closed .lr-frame-menu-wrap a { - padding: 0; - text-align: center +.lr-menu-closed .lr-frame-menu-wrap .lr-four-menu-list { + display: block; } -.lr-menu-closed .lr-frame-menu-wrap .lr-three-menu-list { - display: block +.lr-menu-closed .lr-frame-menu-wrap span, +.lr-menu-closed .lr-frame-menu-wrap .lr-menu-item-arrow, +.lr-menu-closed .lr-meun-had > a { + display: none; +} + +.lr-menu-closed .lr-frame-menu-wrap a { + padding: 0px; + text-align: center; } .lr-menu-closed .lr-frame-menu-wrap .lr-menu-item-icon { - margin: 0 + margin: 0px; } .lr-menu-closed .lr-frame-menu-btn { @@ -241,37 +270,39 @@ -ms-transform: rotate(-180deg); -o-transform: rotate(-180deg); transform: rotate(-180deg); - width: 50px + width: 50px; } .lr-menu-closed .lr-frame-personCenter { width: 50px; - padding: 0 + padding: 0px; } .lr-menu-closed .lr-frame-personCenter .dropdown-menu { - padding: 0 + padding: 0px; } .lr-menu-closed .lr-frame-personCenter > .dropdown-toggle { line-height: 50px; - text-align: center + text-align: center; } .lr-menu-closed .lr-frame-personCenter > .dropdown-toggle > img { float: initial; - margin: 0 + margin: 0; } .lr-menu-closed .lr-frame-personCenter > .dropdown-toggle > span { - display: none + display: none; } .lr-menu-closed .lr-frame-main { - padding: 60px 0 0 50px + padding: 60px 0px 0px 50px; } +/*即时通讯*/ + .lr-im-bell { position: fixed; right: 30px; @@ -283,11 +314,11 @@ text-align: center; cursor: pointer; z-index: 51; - display: none + display: none; } .lr-im-bell > i { - font-size: 18px + font-size: 18px; } .lr-im-bell > .point { @@ -297,9 +328,10 @@ top: 17px; width: 8px; height: 8px; - border-radius: 50% + border-radius: 50%; } + .lr-im-body { position: fixed; right: 10px; @@ -309,11 +341,11 @@ background: #F9FBFB; z-index: 50; padding-left: 40px; - display: none + display: none; } .lr-im-body.open { - display: block + display: block; } .lr-im-title { @@ -322,7 +354,7 @@ left: 0; background: #3A3845; width: 40px; - height: 100% + height: 100%; } .lr-im-title .title-item { @@ -335,15 +367,15 @@ color: #696972; font-size: 18px; line-height: 50px; - text-align: center + text-align: center; } .lr-im-title .title-item.active { - color: #fff + color: #fff; } .lr-im-title .title-item.title-item-two { - top: 50px + top: 50px; } .lr-im-content { @@ -352,24 +384,24 @@ height: 100%; display: none; border: 1px solid #E5E5E5; - border-left: 0 + border-left: 0; } .lr-im-content.active { - display: block + display: block; } .lr-im-msg-list { position: relative; width: 100%; - height: 100% + height: 100%; } .lr-im-msg-list .msg-item { position: relative; width: 100%; height: 50px; - cursor: pointer + cursor: pointer; } .lr-im-msg-list .msg-item:after { @@ -380,25 +412,30 @@ width: 218px; background: #E5E5E5; bottom: 0; - left: 10px + left: 10px; } - .lr-im-msg-list .msg-item .msglist-close { + .lr-im-msg-list .msg-item .remove { position: absolute; - top: 15px; - left: 5px; + top: 0px; + left: 0px; color: #333; font-size: 12px; - display: none + display: none; + } + + .lr-im-msg-list .msg-item:hover .remove { + display: block; } + .lr-im-msg-list .msg-item .photo { position: absolute; width: 30px; height: 30px; border-radius: 3px; top: 10px; - left: 10px + left: 10px; } .lr-im-msg-list .msg-item .icon { @@ -412,13 +449,13 @@ background-color: #1D6DC5; color: #fff; font-size: 18px; - text-align: center + text-align: center; } .lr-im-msg-list .msg-item img { width: 100%; height: 100%; - border-radius: 3px + border-radius: 3px; } .lr-im-msg-list .msg-item .name { @@ -426,11 +463,11 @@ top: 8px; left: 50px; height: 16px; - color: #333; + color: #333333; font-size: 12px; overflow: hidden; text-overflow: ellipsis; - white-space: nowrap + white-space: nowrap; } .lr-im-msg-list .msg-item .msg { @@ -443,7 +480,7 @@ font-size: 12px; overflow: hidden; text-overflow: ellipsis; - white-space: nowrap + white-space: nowrap; } .lr-im-msg-list .msg-item .date { @@ -453,11 +490,12 @@ height: 16px; color: #666; font-size: 12px; - text-align: right + text-align: right; } + .lr-im-userlist { - padding-top: 40px + padding-top: 40px; } .lr-im-search { @@ -467,7 +505,7 @@ width: 100%; height: 40px; font-size: 0; - padding: 10px 20px + padding: 10px 20px; } .lr-im-search i { @@ -477,7 +515,7 @@ font-size: 12px; font-weight: 100; color: #999; - z-index: 1 + z-index: 1; } .lr-im-search input { @@ -491,34 +529,35 @@ border-radius: 3px; box-sizing: border-box; color: #999; - outline: 0; - text-indent: 20px + outline: none; + text-indent: 20px; } .lr-im-search input::-webkit-input-placeholder { - text-align: center + text-align: center; } - .lr-im-search input::-moz-placeholder { - text-align: center + .lr-im-search input::-moz-placeholder { /* Mozilla Firefox 19+ */ + text-align: center; } - .lr-im-search input:-moz-placeholder { - text-align: center + .lr-im-search input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ + text-align: center; } - .lr-im-search input:-ms-input-placeholder { - text-align: center + .lr-im-search input:-ms-input-placeholder { /* Internet Explorer 10-11 */ + text-align: center; } + .lr-im-content-userlist { position: relative; width: 100%; - height: 100% + height: 100%; } .lr-im-content-userlist .lr-scroll-box { - padding: 0 20px + padding: 0 20px; } .lr-im-item-name { @@ -528,33 +567,34 @@ line-height: 30px; cursor: pointer; font-size: 12px; - color: #666 + color: #666; } .lr-im-item-name > i { color: #999; font-size: 14px; - margin: 3px + margin: 3px; } + .lr-im-item-name.open > i { -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); -ms-transform: rotate(90deg); -o-transform: rotate(90deg); - transform: rotate(90deg) + transform: rotate(90deg); } .lr-im-user-list { position: relative; - width: 100% + width: 100%; } .lr-im-user { position: relative; height: 43px; line-height: 43px; - padding-left: 40px + padding-left: 40px; } .lr-im-user > img { @@ -563,7 +603,7 @@ left: 0; width: 30px; height: 30px; - border-radius: 50% + border-radius: 50%; } .lr-im-black-overlay { @@ -575,11 +615,11 @@ overflow: hidden; background: rgba(51,51,51,0.4); z-index: 52; - display: none + display: none; } .lr-im-black-overlay.open { - display: block + display: block; } .lr-im-dialog { @@ -594,7 +634,7 @@ border-radius: 3px; box-shadow: 0 0 2px 0 rgba(0,0,0,0.50); padding-top: 40px; - padding-bottom: 135px + padding-bottom: 135px; } .lr-im-header { @@ -607,7 +647,7 @@ line-height: 39px; padding-left: 10px; font-size: 14px; - color: #333 + color: #333333; } .lr-im-header .im-close { @@ -621,13 +661,13 @@ cursor: pointer; font-size: 12px; color: #333; - font-weight: 100 + font-weight: 100; } .lr-im-msgcontent { position: relative; width: 100%; - height: 100% + height: 100%; } .lr-im-msgcontent-tool { @@ -640,11 +680,11 @@ bottom: 110px; padding-right: 10px; border-top: 1px solid #E5E5E5; - background: #F8F8F8 + background: #F8F8F8; } .lr-im-msgcontent-tool > span { - cursor: pointer + cursor: pointer; } .lr-im-input { @@ -653,7 +693,7 @@ left: 0; width: 100%; height: 110px; - border-top: 1px solid #E5E5E5 + border-top: 1px solid #E5E5E5; } .lr-im-input .inp { @@ -663,7 +703,7 @@ border: 0; outline: 0; padding: 5px; - background: transparent + background: transparent; } .lr-im-msgcontent .im-time { @@ -674,14 +714,15 @@ height: 15px; line-height: 15px; text-align: left; - padding: 0 50px + padding: 0 50px; } .lr-im-msgcontent .me.im-time { - text-align: right + text-align: right; } -.lr-im-msgcontent .im-me, .lr-im-msgcontent .im-other { +.lr-im-msgcontent .im-me, +.lr-im-msgcontent .im-other { position: relative; word-break: break-all; height: auto; @@ -689,11 +730,11 @@ width: 100%; padding: 0 50px; margin-bottom: 10px; - text-align: right + text-align: right; } .lr-im-msgcontent .im-other { - text-align: left + text-align: left; } .lr-im-msgcontent .im-other .headimg { @@ -702,32 +743,34 @@ left: 10px; width: 30px; height: 30px; - border-radius: 50% + border-radius: 50%; } - .lr-im-msgcontent .im-me img, .lr-im-msgcontent .im-other img { + .lr-im-msgcontent .im-me img, + .lr-im-msgcontent .im-other img { width: 100%; height: 100%; - border-radius: 50% + border-radius: 50%; } - .lr-im-msgcontent .im-me .content, .lr-im-msgcontent .im-other .content { + .lr-im-msgcontent .im-me .content, + .lr-im-msgcontent .im-other .content { display: inline-block; - background: #FFF; + background: #FFFFFF; border: 1px solid #E5E5E5; padding: 5px 13px 6px 19px; font-size: 12px; - color: #333; + color: #333333; box-sizing: border-box; position: relative; float: left; max-width: 100%; text-align: left; - line-height: 20px + line-height: 20px; } .lr-im-msgcontent .im-me .content { - float: right + float: right; } .lr-im-msgcontent .im-other .arrow { @@ -746,7 +789,7 @@ z-index: 1; clip: rect(0,8px,8px,0); border-bottom: 0; - border-right: 0 + border-right: 0; } .lr-im-msgcontent .im-me .headimg { @@ -755,9 +798,10 @@ right: 10px; width: 30px; height: 30px; - border-radius: 50% + border-radius: 50%; } + .lr-im-msgcontent .im-me .arrow { width: 8px; height: 8px; @@ -774,36 +818,52 @@ z-index: 1; clip: rect(0,8px,8px,0); border-top: 0; - border-left: 0 + border-left: 0; } .imHasMsg .point { - display: block + display: block; } + + +/*语言设置*/ .lr-lg-setting { position: absolute; top: 21px; left: 333px; font-size: 14px; z-index: 4; - color: #c6c6c6 + color: #c6c6c6; } .lr-lg-setting > a { - color: #c6c6c6 + color: #c6c6c6; } .lr-lg-setting span { - color: #fff + color: #fff; } +.photo .fa { + display: block; + font-size: 20px; + line-height: 30px; + height: 30px; + width: 30px; + border-radius: 5px; + margin: 0 auto; + text-align: center; + color: #fff; + background-color: #985CE2; +} + /*新增*/ -.lr-frame-tabs { +/*.lr-frame-tabs { padding-left:280px; -} +}*/ .lr-frame-top{ background: #3286ed; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml index 51f4ece8a..e6e0c8595 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml @@ -17,9 +17,12 @@
-
+
+
+
+ +
- @* 即时通讯窗体 *@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.css index d45a44968..caecf2978 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.css @@ -358,7 +358,7 @@ text-align: center; cursor: pointer; z-index: 51; - display: none + display: none; } .lr-im-bell > i { @@ -815,3 +815,18 @@ .lr-lg-setting span { color: #3498DB } + + + +.photo .fa { + display: block; + font-size: 20px; + line-height: 30px; + height: 30px; + width: 30px; + border-radius: 5px; + margin: 0 auto; + text-align: center; + color: #fff; + background-color: #985CE2; +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefaultForDC.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefaultForDC.cshtml index d00bdda21..3cbfd3d91 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefaultForDC.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefaultForDC.cshtml @@ -19,6 +19,10 @@
+
+ + +
@* 即时通讯窗体 *@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminNavigation.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminNavigation.cshtml index 21ce8a4df..5e0a56da3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminNavigation.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminNavigation.cshtml @@ -17,7 +17,10 @@
- +
+ + +
@* 即时通讯窗体 *@ @@ -35,8 +38,8 @@
  • 通告 @ViewBag.UnreadNews 条
  • 公文 @ViewBag.UnreadFile 条
  • @*
  • 未完成作业 2 条
  • -
  • 未批改作业 1 条
  • -
  • 备课任务 0 条
  • *@ +
  • 未批改作业 1 条
  • +
  • 备课任务 0 条
  • *@
  •           共 @ViewBag.UnreadNum 条
  • @@ -77,7 +80,7 @@