|
|
@@ -36,18 +36,18 @@ Ext.define('school.view.interaction.notice.List', {
|
|
|
}),
|
|
|
minChars: 0,
|
|
|
queryMode: 'local'
|
|
|
- }, {
|
|
|
- xtype: 'condatefield',
|
|
|
- name: 'publish_date',
|
|
|
- fieldLabel: '发布时间',
|
|
|
- columnWidth: 0.5
|
|
|
+ // }, {
|
|
|
+ // xtype: 'condatefield',
|
|
|
+ // name: 'publish_date',
|
|
|
+ // fieldLabel: '发布时间',
|
|
|
+ // columnWidth: 0.5
|
|
|
}],
|
|
|
|
|
|
gridConfig: {
|
|
|
addTitle: '学校通知',
|
|
|
addXtype: 'interaction-notice-schoolnotice',
|
|
|
idField: 'notify_id',
|
|
|
- codeField: null,
|
|
|
+ codeField: 'notify_title',
|
|
|
detailField: 'notify_title',
|
|
|
dataUrl: me.dataUrl,
|
|
|
caller: null,
|
|
|
@@ -62,6 +62,12 @@ Ext.define('school.view.interaction.notice.List', {
|
|
|
},
|
|
|
hiddenTools: false,
|
|
|
toolBtns: [{
|
|
|
+ xtype: 'button',
|
|
|
+ text: '新增',
|
|
|
+ handler: function() {
|
|
|
+ school.util.BaseUtil.openTab('interaction-notice-schoolnotice', '新增学校通知', 'interaction-notice-schoolnotice-add');
|
|
|
+ }
|
|
|
+ }, {
|
|
|
xtype: 'button',
|
|
|
text: '删除',
|
|
|
handler: function() {
|
|
|
@@ -97,12 +103,6 @@ Ext.define('school.view.interaction.notice.List', {
|
|
|
school.util.BaseUtil.showErrorToast('删除失败: ' + e.message);
|
|
|
});
|
|
|
}
|
|
|
- }, {
|
|
|
- xtype: 'button',
|
|
|
- text: '新增',
|
|
|
- handler: function() {
|
|
|
- school.util.BaseUtil.openTab('interaction-notice-schoolnotice', '新增学校通知', 'interaction-notice-schoolnotice-add');
|
|
|
- }
|
|
|
}],
|
|
|
columns : [{
|
|
|
text: 'id',
|
|
|
@@ -112,15 +112,15 @@ Ext.define('school.view.interaction.notice.List', {
|
|
|
text: '标题',
|
|
|
dataIndex: 'notify_title',
|
|
|
width: 120,
|
|
|
- tdCls: 'x-detail-column',
|
|
|
- listeners: {
|
|
|
- click: function(view, td, row, col, e, record, tr, eOpts, event) {
|
|
|
- let gridConfig = me.gridConfig;
|
|
|
- school.util.BaseUtil.openTab(gridConfig.addXtype, gridConfig.addTitle + '(' + record.get('notify_title') + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
|
|
|
- initId: record.get(gridConfig.idField)
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ // tdCls: 'x-detail-column',
|
|
|
+ // listeners: {
|
|
|
+ // click: function(view, td, row, col, e, record, tr, eOpts, event) {
|
|
|
+ // let gridConfig = me.gridConfig;
|
|
|
+ // school.util.BaseUtil.openTab(gridConfig.addXtype, gridConfig.addTitle + '(' + record.get('notify_title') + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
|
|
|
+ // initId: record.get(gridConfig.idField)
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}, {
|
|
|
text: '内容',
|
|
|
dataIndex: 'notify_details',
|
|
|
@@ -146,69 +146,5 @@ Ext.define('school.view.interaction.notice.List', {
|
|
|
},
|
|
|
});
|
|
|
this.callParent(arguments);
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 处理部分字段值
|
|
|
- */
|
|
|
- getConditionValue: function (field, value) {
|
|
|
- var me = this,
|
|
|
- xtypes = field.getXTypes().split('/'),
|
|
|
- conditionValue;
|
|
|
- if (me.isContainsAny(xtypes, ['datefield'])) {
|
|
|
- conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
|
|
|
- } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
|
|
|
- var from = value.from,
|
|
|
- to = value.to;
|
|
|
-
|
|
|
- conditionValue = from + ',' + to;
|
|
|
- } else if (me.isContainsAny(xtypes, ['condatefield'])) {
|
|
|
- var from = value.from,
|
|
|
- to = value.to;
|
|
|
-
|
|
|
- conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
|
|
|
- } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
|
|
|
- conditionValue = value;
|
|
|
- } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
|
|
|
- conditionValue = value;
|
|
|
- } else if (me.isContainsAny(xtypes, ['multicombo'])) {
|
|
|
- conditionValue = value.map ? value.map(function (v) {
|
|
|
- return v.value;
|
|
|
- }).join(',') : '';
|
|
|
- } else {
|
|
|
- conditionValue = value;
|
|
|
- }
|
|
|
-
|
|
|
- return conditionValue;
|
|
|
- },
|
|
|
-
|
|
|
- getExtraParams: function(store, op, condition) {
|
|
|
- var temp = {};
|
|
|
-
|
|
|
- for(let x = 0; x < condition.length; x++) {
|
|
|
- let c = condition[x];
|
|
|
- if(c.field == 'keyword') {
|
|
|
- temp.keyword = c.value;
|
|
|
- }else if(c.field == 'date') {
|
|
|
- temp.fromDate = new Date(c.value.split(',')[0]).getTime();
|
|
|
- temp.endDate = new Date(c.value.split(',')[1]).getTime();
|
|
|
- }else if(c.field == 'quoted') {
|
|
|
- temp.quoted = c.value == 'all' ? null : c.value;
|
|
|
- }else if(c.field == 'closed') {
|
|
|
- // temp.endDate = c.value == 'all' ? null : (
|
|
|
- // c.value == '0' ?
|
|
|
- // );
|
|
|
- }
|
|
|
- }
|
|
|
- let obj = {
|
|
|
- pageNumber: store.exportNumber?store.exportNumber:op._page,
|
|
|
- pageSize: store.exportPageSize?store.exportPageSize:store.pageSize
|
|
|
- };
|
|
|
- for(let k in temp) {
|
|
|
- if(!!temp[k]) {
|
|
|
- obj[k] = temp[k];
|
|
|
- }
|
|
|
- }
|
|
|
- return obj;
|
|
|
- },
|
|
|
+ }
|
|
|
});
|