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.

45 lines
1.2 KiB

define(function (require, exports, module) {
let BaseBiz = require('apps/rht/base/rhtBiz');
function Biz(vm) {
//继承第一步,构造继承
BaseBiz.call(this, vm);
}
//继承第二步,方法继承
inherits(Biz, BaseBiz);
//按钮事件控制
Biz.prototype.doOp = function (opCode) {
let self = this;
if (opCode == 'showlog') {
self.onshowlog('1');
}
};
//控制主界面按钮状态
Biz.prototype.getOpEnabled = function (opCode) {
let masterRow = this.dsMaster.currentRow;
let isOk = this.super('getOpEnabled', opCode);
if (!isOk) {
return false;
}
if (opCode == 'showlog'){
if (this.isEdit())
return false;
if (!masterRow)
return false;
}
return true;
};
//改变状态处理
Biz.prototype.onshowlog = function () {
let masterRow = this.dsMaster.currentRow;
let sMsg = masterRow ? TypeUtil.toString(masterRow['RunMsg']) : '';
if((masterRow) && (sMsg != "")){
Store.messager.tip(sMsg);
}
return true;
};
return Biz;
});