diff --git a/CoreCms.Net.Model/CoreCms.Net.Model.xml b/CoreCms.Net.Model/CoreCms.Net.Model.xml index 90b5e8ef..6fdd4a24 100644 --- a/CoreCms.Net.Model/CoreCms.Net.Model.xml +++ b/CoreCms.Net.Model/CoreCms.Net.Model.xml @@ -13004,6 +13004,11 @@ 是否最后节点,无下级节点 + + + 是否属于父节点 + + 是否选中 0否1是 @@ -13014,6 +13019,11 @@ 子 + + + 其他数据 + + Dtree List集合数据格式 diff --git a/CoreCms.Net.Model/ViewModels/UI/DTree.cs b/CoreCms.Net.Model/ViewModels/UI/DTree.cs index af0e6803..0ab602f8 100644 --- a/CoreCms.Net.Model/ViewModels/UI/DTree.cs +++ b/CoreCms.Net.Model/ViewModels/UI/DTree.cs @@ -47,6 +47,11 @@ namespace CoreCms.Net.Model.ViewModels.UI /// public bool last { get; set; } + /// + /// 是否属于父节点 + /// + public bool isParent { get; set; } + /// /// 是否选中 0否1是 /// @@ -56,6 +61,13 @@ namespace CoreCms.Net.Model.ViewModels.UI /// 子 /// public object children { get; set; } + + /// + /// 其他数据 + /// + public object otherData { get; set; } + + } /// diff --git a/CoreCms.Net.Uni-App/CoreShop/App.vue b/CoreCms.Net.Uni-App/CoreShop/App.vue index d4f7507a..3422367f 100644 --- a/CoreCms.Net.Uni-App/CoreShop/App.vue +++ b/CoreCms.Net.Uni-App/CoreShop/App.vue @@ -11,7 +11,7 @@ }, onLaunch() { //版本设置 - const version = '0.6.9' + const version = '0.7.0' // 开发环境才提示,生产环境不会提示 if (process.env.NODE_ENV === 'development') { console.log(`\n %c \u6838\u5fc3\u5546\u57ce\u7cfb\u7edf\u0020\u0043\u006f\u0072\u0065\u0053\u0068\u006f\u0070 V${version} %c \u0068\u0074\u0074\u0070\u0073\u003a\u002f\u002f\u0077\u0077\u0077\u002e\u0063\u006f\u0072\u0065\u0073\u0068\u006f\u0070\u002e\u0063\u006e\u002f \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #f1f1f1; padding:5px 0;'); diff --git a/CoreCms.Net.Utility/Helper/GoodsHelper.cs b/CoreCms.Net.Utility/Helper/GoodsHelper.cs index d4ab3c48..eedffe30 100644 --- a/CoreCms.Net.Utility/Helper/GoodsHelper.cs +++ b/CoreCms.Net.Utility/Helper/GoodsHelper.cs @@ -71,6 +71,8 @@ namespace CoreCms.Net.Utility.Helper parentTree.title = item.name; parentTree.parentId = item.parentId.ToString(); parentTree.last = !oldNavs.Exists(p => p.parentId == item.id); + parentTree.isParent = !parentTree.last; + parentTree.otherData = item; childTree.Add(parentTree); parentTree.children = GetMenus(oldNavs, item.id); diff --git a/CoreCms.Net.Web.Admin/Controllers/Good/CoreCmsGoodsCategoryController.cs b/CoreCms.Net.Web.Admin/Controllers/Good/CoreCmsGoodsCategoryController.cs index a1bffacf..fd050a52 100644 --- a/CoreCms.Net.Web.Admin/Controllers/Good/CoreCmsGoodsCategoryController.cs +++ b/CoreCms.Net.Web.Admin/Controllers/Good/CoreCmsGoodsCategoryController.cs @@ -74,7 +74,7 @@ namespace CoreCms.Net.Web.Admin.Controllers //获取数据 var list = await _coreCmsGoodsCategoryServices.QueryListByClauseAsync(p => p.id > 0, p => p.sort, OrderByType.Asc, true, true); //返回数据 - jm.data = list; + jm.data = GoodsHelper.GetTree(list,false).data; jm.code = 0; jm.msg = "数据调用成功!"; return jm; diff --git a/CoreCms.Net.Web.Admin/appsettings.json b/CoreCms.Net.Web.Admin/appsettings.json index 5b4d7dd5..b2f250d7 100644 --- a/CoreCms.Net.Web.Admin/appsettings.json +++ b/CoreCms.Net.Web.Admin/appsettings.json @@ -18,7 +18,7 @@ "AppPcUrl": "https://pc.test.pro.coreshop.cn/", //PC端访问地址 "AppH5Url": "https://h5.test.pro.coreshop.cn/", //H5端访问地址 "AppInterFaceUrl": "https://api.test.pro.coreshop.cn/", //接口请求地址 - "AppVersion": "CoreShopProfessional v0.6.9" + "AppVersion": "CoreShopProfessional v0.7.0" }, //redis为必须启动项,请保持redis为正常可用 "RedisConfig": { diff --git a/CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/config.js b/CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/config.js index ad5b7e95..0c0d735f 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/config.js +++ b/CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/config.js @@ -23,7 +23,7 @@ layui.define(['all'], function (exports) { pageTabs: false, // 是否开启页面选项卡功能。单页版不推荐开启 name: '核心商城系统', - version: 'CoreShopProfessional v0.6.9', + version: 'CoreShopProfessional v0.7.0', name: 'layuiAdmin', tableName: 'CoreShop', // 本地存储表名 MOD_NAME: 'admin', // 模块事件名 diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/create.html index e29013a5..4c6583da 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/create.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/create.html @@ -33,7 +33,7 @@
-
请输入数字
+
请输入数字,排序从小到大
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/edit.html index 32ed0663..720b9bec 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/edit.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/edit.html @@ -34,7 +34,7 @@
-
请输入数字
+
请输入数字,排序从小到大
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/index.html index b5f81329..1ae85617 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/index.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/good/goodscategory/index.html @@ -68,15 +68,14 @@ customName: { id: 'id', pid: 'parentId', - name: 'name', - // isParent:'isParent' + name: 'title', }, view: { showIcon: false, indent: 25 }, data: { - isSimpleData: true, + //isSimpleData: true, }, callback: {} }, @@ -85,17 +84,17 @@ cols: [ [ { field: 'id', title: '序列', width: 60, sort: false }, - { field: 'name', title: '名称', sort: false }, + { field: 'title', title: '名称', sort: false }, { field: 'sort', title: '排序', sort: false, width: 105, templet: function (d) { - return d.sort; + return d.otherData.sort } }, { field: 'imageUrl', title: '图片', width: 80, sort: false, templet: function (d) { - if (d.imageUrl) { - return ''; + if (d.otherData.imageUrl) { + return ''; } else { return ''; } @@ -106,10 +105,7 @@ ] ], done: function (res, curr, count) { - treeTable.expandAll('treeTableBox', true); // 打开全部节点 - //console.log(res); // 得到当前渲染的数据 - //console.log(curr); // 得到当前页码 - //console.log(count); // 得到数据总量 + treeTable.expandAll('treeTableBox', true); }, page: false }); @@ -243,5 +239,5 @@ \ No newline at end of file diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysmenu/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysmenu/index.html index db531b61..668d8618 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysmenu/index.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysmenu/index.html @@ -84,7 +84,6 @@ id: 'id', pid: 'parentId', name: 'menuName', - //isParent: 'isParent' }, view: { showIcon: false, @@ -125,8 +124,12 @@ //{field: 'createTime', title: '创建时间'}, {title: '操作', toolbar: '#LAY-app-SysMenu-tableBox-bar', align: 'center', width: 180} ]], - page: false - + initSort: { + field: 'sortNumber', + type: 'asc' + }, + //autoSort: false, + page: false }); //重载form form.render(); diff --git a/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.xml b/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.xml index 1927aabb..ab448627 100644 --- a/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.xml +++ b/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.xml @@ -272,7 +272,7 @@ 优惠券接口
- + 构造函数 diff --git a/CoreCms.Net.Web.WebApi/appsettings.json b/CoreCms.Net.Web.WebApi/appsettings.json index bd56011b..82dd30ac 100644 --- a/CoreCms.Net.Web.WebApi/appsettings.json +++ b/CoreCms.Net.Web.WebApi/appsettings.json @@ -18,7 +18,7 @@ "AppPcUrl": "https://pc.test.pro.coreshop.cn/", //PC端访问地址 "AppH5Url": "https://h5.test.pro.coreshop.cn/", //H5端访问地址 "AppInterFaceUrl": "https://api.test.pro.coreshop.cn/", //接口请求地址 - "AppVersion": "CoreShopProfessional v0.6.9" + "AppVersion": "CoreShopProfessional v0.7.0" }, //redis为必须启动项,请保持redis为正常可用 "RedisConfig": {