|
@@ -109,6 +109,7 @@ define(['exports'], function (exports) { 'use strict';
|
|
viewConfig: {
|
|
viewConfig: {
|
|
enableTextSelection: true,
|
|
enableTextSelection: true,
|
|
sortOnClick: false,
|
|
sortOnClick: false,
|
|
|
|
+ emptyText: '没有数据'
|
|
},
|
|
},
|
|
selModel: {
|
|
selModel: {
|
|
type: 'checkboxmodel',
|
|
type: 'checkboxmodel',
|
|
@@ -95307,6 +95308,48 @@ define(['exports'], function (exports) { 'use strict';
|
|
return r;
|
|
return r;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ rowMoveUp: function () {
|
|
|
|
+ var grid = this;
|
|
|
|
+ if (!grid.selection) {
|
|
|
|
+ msg('无法对多行进行移动');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var record = grid.selection;
|
|
|
|
+ // const records = grid.selModel.getSelection()
|
|
|
|
+ // if (records.length !== 1) {
|
|
|
|
+ // msg('无法对多行进行移动')
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ //
|
|
|
|
+ // const [record] = records
|
|
|
|
+ var index = grid.store.indexOf(record);
|
|
|
|
+ if (index > 0) {
|
|
|
|
+ grid.store.removeAt(index);
|
|
|
|
+ grid.store.insert(index - 1, record);
|
|
|
|
+ grid.getView().refresh();
|
|
|
|
+ grid.selModel.select([record]);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ rowMoveDown: function () {
|
|
|
|
+ var grid = this;
|
|
|
|
+ // const records = grid.selModel.getSelection()
|
|
|
|
+ // if (records.length !== 1) {
|
|
|
|
+ // msg('无法对多行进行移动')
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ if (!grid.selection) {
|
|
|
|
+ msg('无法对多行进行移动');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var record = grid.selection;
|
|
|
|
+ var index = grid.store.indexOf(record);
|
|
|
|
+ if (index < grid.store.getCount() - 1) {
|
|
|
|
+ grid.store.removeAt(index);
|
|
|
|
+ grid.store.insert(index + 1, record);
|
|
|
|
+ grid.getView().refresh();
|
|
|
|
+ grid.selModel.select([record]);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
getEditRecord: function () {
|
|
getEditRecord: function () {
|
|
var _a, _b;
|
|
var _a, _b;
|
|
var me = this;
|
|
var me = this;
|
|
@@ -95990,7 +96033,6 @@ define(['exports'], function (exports) { 'use strict';
|
|
}
|
|
}
|
|
// throw new TypeError('无法识别的调用方法')
|
|
// throw new TypeError('无法识别的调用方法')
|
|
}
|
|
}
|
|
- //# sourceMappingURL=grid.js.map
|
|
|
|
|
|
|
|
function initTextfield () {
|
|
function initTextfield () {
|
|
var cc = Ext.form.field.Text.prototype.constructor;
|
|
var cc = Ext.form.field.Text.prototype.constructor;
|