| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- /**
- * 学科信息
- */
- Ext.define('school.view.basic.subject.List', {
- extend: 'school.view.core.base.BasePanel',
- xtype: 'basic-subject-list',
- // dataUrl: 'http://10.1.80.47:9560/subject/list',
- dataUrl: '/api/school/subject/list',
- _title: '学科信息',
- caller: 'Subject',
- pathKey: 'subject',
-
- controller: 'basic-subject-list',
- viewModel: 'basic-subject-list',
- initComponent: function() {
- var me = this;
- Ext.apply(this, {
- searchField: [{
- xtype: 'textfield',
- name: 'subject_name',
- fieldLabel: '名称'
- }],
-
- gridConfig: {
- addTitle: '学科信息',
- addXtype: 'basic-subject-detail',
- idField: 'subject_id',
- codeField: null,
- detailField: null,
- dataUrl: me.dataUrl,
- caller: null,
- rootProperty: 'data.list',
- totalProperty: 'data.total',
- actionColumn: [],
- selModel: {
- type: 'cellmodel'
- },
- hiddenTools: false,
- toolBtns: [{
- xtype: 'button',
- text: '新增',
- handler: 'onAddClick'
- }],
- columns : [{
- text: 'id',
- dataIndex: 'subject_id',
- hidden: true
- }, {
- text: '名称',
- dataIndex: 'subject_name',
- width: 150
- }, {
- xtype:'actioncolumn',
- width:70,
- dataIndex:'actioncolumn',
- text:'操作',
- align: 'center',
- items: [{
- tooltip: '编辑',
- iconCls: 'x-fa fa-pencil fa-fw',
- scope:this,
- listeners: {
- click: function() {
- debugger;
- }
- }
- },{
- text:'删除',
- iconCls:'x-fa fa-trash-o fa-fw',
- tooltip: '删除',
- scope:this
- }],
- listeners: {
- click: 'onActionClick'
- }
- }]
- },
- });
- this.callParent(arguments);
- },
- listeners: {
- load: function() {
- Ext.StoreMgr.get('store_subject').load();
- }
- }
- });
|