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.
47 lines
1.2 KiB
47 lines
1.2 KiB
4 years ago
|
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 === 'scriptoracle' || opCode === 'scriptmysql') {
|
||
|
var dbType = '';
|
||
|
if (opCode === 'scriptoracle') {
|
||
|
dbType = 'oracle';
|
||
|
} else if (opCode === 'scriptmysql') {
|
||
|
dbType = 'mysql'
|
||
|
} else {
|
||
|
Store.messager.warn('只能导出oracle、mysql脚本');
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var ScriptWin = require('./scriptwin3');
|
||
|
var win = new ScriptWin({
|
||
|
dataRow: this.dsMaster.currentRow,
|
||
|
dbType: dbType
|
||
|
});
|
||
|
win.open();
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
this.super('doOp', opCode);
|
||
|
}
|
||
|
|
||
|
Biz.prototype.getOpEnabled = function (opCode) {
|
||
|
if (opCode == 'export') {
|
||
|
return this.isEdit();
|
||
|
}
|
||
|
|
||
|
return this.super('getOpEnabled', opCode);
|
||
|
};
|
||
|
return Biz;
|
||
|
})
|