修改前样式

\"\"

修改后样式

\"\"

jtable使用代码

 _$faultDeviceTable.jtable({

            // : \"故障设备\",
            paging: true,
            sorting: true,
            multiSorting: true,
            actions: {
                listAction: {
                    method: _repairManagementService.getFaultDeviceLibraries
                }
            },

            fields: {
                id: {
                    key: true,
                    list: false
                },
                actions: {
                    type: \'record-actions\',
                    cssClass: \'btn btn-xs btn-primary blue\',
                    text: \'<i class=\"fa fa-cog\"></i> \' + app.localize(\'Actions\') 
                        + \' <span class=\"caret\"></span>\',
                    items: [
                      
                        {
                            text: app.localize(\'Edit\'),
                            //visible: function () {
                            //    return _permissions.edit;
                            //},
                            action: function (data) {
                                _createOrEditModal.open({ id: data.record.id });
                            }
                        }, {
                            text: app.localize(\'Details\'),
                            //visible: function () {
                            //    return _permissions.changePermissions;
                            //},
                            //action: function (data) {
                            //    _userPermissionsModal.open({ id: data.record.id });
                            //}
                        },  {
                            text: app.localize(\'Delete\'),
                            //visible: function () {
                            //    return _permissions.delete;
                            //},
                            action: function (data) {
                                deleteFaultDevice(data.record);
                            }
                        }]
                },
                deviceId: {
                     : \"机台号\",
                    width: \'10%\'
                },
                faultTime: {
                     : \"故障时间\",
                    width: \'20%\',
                    display: function (data) {
                        return moment(data.record.markedDateTime).format(\'L\');
                    }
                },
                proposer: {
                     : \"报修人\",
                    width: \'15%\'
                },
                faultDe ion: {
                     : \"故障描述\",
                    width: \'40%\'
                }
            }            
        });

样式修改代码

$(\'#faultDeviceTable\').find(\".jtable thead\")
    .css({ \"color\": \"#0f0a11\", \"background\": \"#e4e4e4\" });
$(\'#faultDeviceTable\').find(\".jtable button\")
    .css({ \"color\": \"#0f0a11\", \"background\": \"#e4e4e4\" });
$(\'#faultDeviceTable\').find(\" span\")
    .css({ \"color\": \"#23547C\", \"background\": \"#e4e4e4\" });
$(\'#faultDeviceTable\').find(\" div.jtable-bottom-panel\")
    .css({ \"color\": \"#169bd5\", \"background\": \"#e4e4e4\" });

 

收藏 打印