You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.3 KiB

define(function (require, exports, module) {
var BaseBiz = require('system/base/biz');
function Biz(dict) {
BaseBiz.call(this, dict);
}
inherits(Biz, BaseBiz);
Biz.prototype.initialize = function () {
this.dsMaster.onlySaveCurrent = true;
};
Biz.prototype.doOp = function (opCode) {
var self = this;
if (opCode === 'exportmysqlscript') {
self.openScriptWindow({
type: 'mysql'
});
}
if (opCode === 'exportoraclescript') {
self.openScriptWindow({
type: 'oracle'
});
}
this.super('doOp', opCode);
}
Biz.prototype.openScriptWindow = function (params) {
if (!this.dsMaster.currentRow) {
Store.messager.err('当前行不能为空');
return;
}
var ScriptWin = require('./scriptwin5');
var win = new ScriptWin({
dataRow: this.dsMaster.currentRow,
scriptType: params.type
});
win.open();
return;
}
Biz.prototype.getOpEnabled = function (opCode) {
if (opCode == 'export') {
return this.isEdit();
}
return this.super('getOpEnabled', opCode);
};
return Biz;
})