目录
omsUtils
this.$OMS2.omsUtils.getPermissions(this,'btnConfig','orderManager');
| Method | 说明 | 参数 | 返回 |
|---|
| msgTips | $Message类型的提示框 | (self, type, tips, tipsType = 1) | |
| modalShow | $Model类型的提示框 | (self, tips, okKey, data, ...callback) | |
| getPermissions | 获取按钮权限 | (self, arrry, params, isIndependent) | 接口返回的button集 |
| 其它 | 更多方法:omsUtils | …… | …… |
1. msgTips() 方法
this.$OMS2.omsUtils.msgTips(self, type, tips, tipsType = 1)
| 参数 | 描述 |
|---|
| self | {object},指向当前this |
| type | {string},(eg.'warning'/'error'/'success'……) |
| tips | {string},当tipsType=1或不传时,tips为语言包中modalTips对应的key;当tipsType!=1时,tips为要展示的提示信息(如接口直接返回的message) |
| tipsType | {number},默认为1,等于1则使用语言包中的modalTips,不等于1则使用传过来的tips |
mounted() {
const _this = this;
if(true) {
this.$OMS2.omsUtils.msgTips(_this,'warning','警告!',2);
} else {
this.$OMS2.omsUtils.msgTips(_this,'warning','a1',1);
}
2. modalShow() 方法
-
用于弹出复杂的$Modal类型的提示框。(确认按钮有特殊处理逻辑)
-
语法
this.$OMS2.omsUtils.modalShow(self, tips, okKey, data, ...callback)
| 参数 | 描述 |
|---|
| self | {object},指向当前this |
| tips | {string},匹配 modalTitle[tips] |
| okKey | {string},点击确定要调用的接口,eg."common.queryList" |
| data | {Object},点击确定调用的接口的入参 |
| callback | {...any},callback |
mounted() {
const _this = this;
let params = { ids, type: '1' };
if (true) {
this.$OMS2.omsUtils.modalShow(_this, 'g7', 'orderCenter.auditOrderReserve', params, 'all', function (res) {
if (res.data.code === 0) {
this.$OMS2.omsUtils.msgTips(self, 'success', res.data.message);
}
});
} else {
this.$OMS2.omsUtils.modalShow(_this, 'm9', 'orderCenter.updateReturnBOrder', params);
}
}
1. msgTips() 方法
this.$OMS2.omsUtils.msgTips(self, type, tips, tipsType = 1)
| 参数 | 描述 |
|---|
| self | {object},指向当前this |
| type | {string},(eg.'warning'/'error'/'success'……) |
| tips | {string},当tipsType=1或不传时,tips为语言包中modalTips对应的key;当tipsType!=1时,tips为要展示的提示信息(如接口直接返回的message) |
| tipsType | {number},默认为1,等于1则使用语言包中的modalTips,不等于1则使用传过来的tips |
mounted() {
const _this = this;
if(true) {
this.$OMS2.omsUtils.msgTips(_this,'warning','警告!',2);
} else {
this.$OMS2.omsUtils.msgTips(_this,'warning','a1',1);
}