mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:03:27 +08:00
【优化】优化新版treeTable下商品分类及菜单导航树形表格模式的排序问题。
【发布】发布0.7.0版本
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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', // 模块事件名
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" min="0" max="999999" name="sort" id="sort" lay-verType="tips" lay-verify="required|number" class="layui-input" value="1" placeholder="请输入分类排序" lay-reqText="请输入分类排序并为数字" />
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">请输入数字</div>
|
||||
<div class="layui-form-mid layui-word-aux">请输入数字,排序从小到大</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" min="0" max="999999" name="sort" id="sort" lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.model.sort || '' }}" placeholder="请输入分类排序" lay-reqText="请输入分类排序并为数字" />
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">请输入数字</div>
|
||||
<div class="layui-form-mid layui-word-aux">请输入数字,排序从小到大</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
|
||||
@@ -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 '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + d.imageUrl + '")><image style="max-width:28px;max-height:28px;" src="' + d.imageUrl + '" /></a>';
|
||||
if (d.otherData.imageUrl) {
|
||||
return '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + d.otherData.imageUrl + '")><image style="max-width:28px;max-height:28px;" src="' + d.otherData.imageUrl + '" /></a>';
|
||||
} else {
|
||||
return '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + setter.noImagePicUrl + '")><image style="max-width:30px;max-height:30px;" src="' + setter.noImagePicUrl + '" /></a>';
|
||||
}
|
||||
@@ -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 @@
|
||||
|
||||
<!--设置是否显示-->
|
||||
<script type="text/html" id="switch_isShow">
|
||||
<input type="checkbox" name="switch_isShow" value="{{d.id}}" lay-skin="switch" lay-text="显示|关闭" lay-filter="switch_isShow" {{ d.isShow ? 'checked' : '' }}>
|
||||
<input type="checkbox" name="switch_isShow" value="{{d.id}}" lay-skin="switch" lay-text="显示|关闭" lay-filter="switch_isShow" {{ d.otherData.isShow ? 'checked' : '' }}>
|
||||
</script>
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user