mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 19:12:48 +08:00
select支持二维列表的传值
This commit is contained in:
@@ -24,8 +24,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
||||
{ type: "checkbox" },
|
||||
{ field: 'id', width: 80, title: 'ID', totalRowText: '合计:' },
|
||||
{ field: 'sort', width: 80, title: '排序', edit: 'text' },
|
||||
{ field: 'cate.title', minWidth: 80, title: '商品分类', },
|
||||
{ field: 'cate.id', minWidth: 80, title: '商品分类', hide: true, defaultSearchValue: ea.getQueryVariable('cate_id', '') },
|
||||
{ field: 'cate_id', minWidth: 80, title: '商品分类', selectList: ea.getDataBrage('select_list_cate'), selectValue: 'id', selectLabel: 'title', defaultSearchValue: ea.getQueryVariable('cate_id', '') },
|
||||
{ field: 'cate.image', minWidth: 80, title: '分类图片', search: false, templet: ea.table.image },
|
||||
{ field: 'title', minWidth: 80, title: '商品名称', },
|
||||
{ field: 'logo', minWidth: 80, title: '商品图片', search: false, templet: ea.table.image },
|
||||
|
||||
@@ -892,8 +892,23 @@ define(["jquery", "tableSelect", "ckeditor", 'miniTheme', 'tableData', 'citypick
|
||||
}
|
||||
|
||||
// 如果未定义则默认使用value
|
||||
if (val.templet === undefined) {
|
||||
if (cols[i][index]['templet'] === undefined) {
|
||||
cols[i][index]['templet'] = admin.table.value;
|
||||
} else {
|
||||
// 针对特定的模板做数据调整
|
||||
|
||||
if (cols[i][index]['templet'] == admin.table.list) {
|
||||
if (val.selectValue) {
|
||||
|
||||
var newSelectList = {};
|
||||
val.selectList.map(item => {
|
||||
newSelectList[item[val.selectValue]] = item[val.selectLabel];
|
||||
});
|
||||
|
||||
cols[i][index]['selectList'] = newSelectList;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (val.fieldFormat == undefined) {
|
||||
|
||||
Reference in New Issue
Block a user