|
@@ -37,10 +37,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
{
|
|
|
field: 'type',
|
|
|
title: __('Type'),
|
|
|
- custom: {channel: 'info', list: 'success', link: 'primary', home_button: 'warning', footer_button: 'danger'},
|
|
|
+ custom: {channel: 'info', list: 'success', link: 'primary', home: 'warning', footer: 'danger'},
|
|
|
formatter: Table.api.formatter.flag
|
|
|
},
|
|
|
- {field: 'model_name', title: __('Model_name'), operate: false},
|
|
|
+ // {field: 'model_name', title: __('Model_name'), operate: false},
|
|
|
{field: 'name', title: __('Name'), align: 'left'},
|
|
|
{
|
|
|
field: 'url', title: __('Url'), operate: false, formatter: function (value, row, index) {
|
|
@@ -48,28 +48,28 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
}
|
|
|
},
|
|
|
{field: 'flag', title: __('Flag'), operate: 'find_in_set', searchList: Config.flagList, formatter: Table.api.formatter.flag},
|
|
|
- {
|
|
|
- field: 'spiders', title: __('Spiders'), visible: Config.spiderRecord || false, operate: false, formatter: function (value, row, index) {
|
|
|
- if (!$.isArray(value) || value.length === 0) {
|
|
|
- return '-';
|
|
|
- }
|
|
|
- var html = [];
|
|
|
- $.each(value, function (i, j) {
|
|
|
- var color = 'default', title = '暂无来访记录';
|
|
|
- if (j.status === 'today') {
|
|
|
- color = 'danger';
|
|
|
- title = "今天有来访记录";
|
|
|
- } else if (j.status === 'pass') {
|
|
|
- color = 'success';
|
|
|
- title = "最后来访日期:" + j.date;
|
|
|
- }
|
|
|
- html.push('<span class="label label-' + color + '" data-toggle="tooltip" data-title="' + j.title + ' ' + title + '">' + j.title.substr(0, 1) + '</span>');
|
|
|
- });
|
|
|
- return html.join(" ");
|
|
|
- }
|
|
|
- },
|
|
|
- {field: 'items', title: __('Items')},
|
|
|
- {field: 'vip', title: __('Vip')},
|
|
|
+ // {
|
|
|
+ // field: 'spiders', title: __('Spiders'), visible: Config.spiderRecord || false, operate: false, formatter: function (value, row, index) {
|
|
|
+ // if (!$.isArray(value) || value.length === 0) {
|
|
|
+ // return '-';
|
|
|
+ // }
|
|
|
+ // var html = [];
|
|
|
+ // $.each(value, function (i, j) {
|
|
|
+ // var color = 'default', title = '暂无来访记录';
|
|
|
+ // if (j.status === 'today') {
|
|
|
+ // color = 'danger';
|
|
|
+ // title = "今天有来访记录";
|
|
|
+ // } else if (j.status === 'pass') {
|
|
|
+ // color = 'success';
|
|
|
+ // title = "最后来访日期:" + j.date;
|
|
|
+ // }
|
|
|
+ // html.push('<span class="label label-' + color + '" data-toggle="tooltip" data-title="' + j.title + ' ' + title + '">' + j.title.substr(0, 1) + '</span>');
|
|
|
+ // });
|
|
|
+ // return html.join(" ");
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // {field: 'items', title: __('Items')},
|
|
|
+ // {field: 'vip', title: __('Vip')},
|
|
|
{
|
|
|
field: 'weigh',
|
|
|
title: __('Weigh'),
|
|
@@ -118,13 +118,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
events: Table.api.events.operate,
|
|
|
formatter: Table.api.formatter.operate,
|
|
|
buttons: [
|
|
|
- {
|
|
|
- name: 'addsub',
|
|
|
- text: '添加子栏目',
|
|
|
- classname: 'btn btn-info btn-xs btn-dialog',
|
|
|
- icon: 'fa fa-plus',
|
|
|
- url: 'cms/channel/add/parent_id/{ids}/type/{type}'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // name: 'addsub',
|
|
|
+ // text: '添加子栏目',
|
|
|
+ // classname: 'btn btn-info btn-xs btn-dialog',
|
|
|
+ // icon: 'fa fa-plus',
|
|
|
+ // url: 'cms/channel/add/parent_id/{ids}/type/{type}'
|
|
|
+ // },
|
|
|
{
|
|
|
name: 'editor',
|
|
|
classname: 'btn btn-xs btn-warning btn-dialog',
|
|
@@ -135,7 +135,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
return 'cms/channel/add_chief?ids=' + row.id;
|
|
|
},
|
|
|
visible: function (row) {
|
|
|
- if (row.pid == 1) {
|
|
|
+ console.log(row);
|
|
|
+ if (row.type == 'channel') {
|
|
|
return true;
|
|
|
}
|
|
|
},
|
|
@@ -158,7 +159,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
var options = table.bootstrapTable('getOptions');
|
|
|
options.pageNumber = 1;
|
|
|
options.queryParams = function (params) {
|
|
|
- params.model_id = value;
|
|
|
+ // params.model_id = value;
|
|
|
+ params.type = value;
|
|
|
return params;
|
|
|
};
|
|
|
table.bootstrapTable('refresh', {});
|