本文整理汇总了TypeScript中ts/opg.ts.default.alert方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ts.default.alert方法的具体用法?TypeScript ts.default.alert怎么用?TypeScript ts.default.alert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ts/opg.ts.default
的用法示例。
在下文中一共展示了ts.default.alert方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
opg.api.contracts({programId}, function (data) {
if(data && data.length){
let th = $(`<tr class="subTHead esd_${programId}">
<th></th><th>录入时间</th><th>合同号</th>
<th>版权类型</th><th>版权开始时间</th><th>版权结束时间</th>
</tr>`).insertAfter(tr);
th.bindList({
list: data ,
template: '<tr class="subTBody esd_' + programId + '">' +
'<td></td><td class="text-center">${createDate:=gDate}</td><td class="text-center">${contract:=gCtr}</td>' +
'<td class="text-center">${copyrightTypeDesc}</td><td class="text-center">${copyrightBeginDate:=gDate}</td><td class="text-center">${copyrightEndDate:=gDate}</td>' +
'</tr>',
itemRender:{
gCtr : function (contract){
if(contract)
return contract.contractNumber;
return '';
},
gDate : function (d){
return `${d.split(' ')[0]}`;
}
},
mode: 'after'
});
cur.toggleClass('ellipse expanded');
}
else{
opg.alert('没有版权信息');
}
})
示例2: function
opg.api.authRegion2({parentId}, function (data) {
if(data.results && data.results.length){
let th = $(`<tr class="subTHead esd_${parentId}">
<th></th><th>二级地域名</th><th>二级地域</th>
</tr>`).insertAfter(tr);
th.bindList({
list: data.results ,
template: '<tr class="subTBody esd_' + parentId + '">' +
'<td></td><td class="text-center">${name}</td><td class="text-center">${regionType:=renderType}</td>' +
'</tr>',
mode: 'after',
itemRender: {
renderType : function (val) {
return val==0?'根域':'二级地域';
}
}
});
cur.toggleClass('ellipse expanded');
}
else{
opg.alert('没有二级地域');
}
})
示例3: function
tbGroup.tbody.on('click', '.btn-info', function () {
let btn = $(this), i = btn.data('index'), obj = tbGroup.data[i];
if (obj.id in checkedGroupDataHash) {
return opg.alert(`“${obj.name}”已添加`);
}
else {
checkedGroupData.push(obj);
checkedGroupDataHash = opg.convert.arrayToHash(checkedGroupData, 'id');
tbSelected.update(checkedGroupData);
}
});
示例4: opg
$('#btnCollect').click(function () {
let url = $('#doubanUrl').val();
if(!url)
return opg.alert('请输入豆瓣的内容网址');
let pop = opg('<div style="display: table-cell; vertical-align: middle; text-align: center; font-size: 16px;">正在采集,请稍候 ...</div>').popup({
});
opg.api.collectDoubanInfo.set('onError' , function () {
pop.close();
opg.err('采集发生错误,请联系管理员');
});
opg.api.collectDoubanInfo({doubanUrl: url} , function (data) {
pop.close();
opg.ok('采集完成');
});
});
示例5: function
opg.api.medias({id: esd}, (data) => {
if (data && data.length) {
/*let th = $(`<tr class="subTHead esd_${esd}">
<th></th><th>录入时间</th><th>合同号</th>
<th>版权类型</th><th>版权开始时间</th><th>版权结束时间</th>
</tr>`).insertAfter(tr);*/
let tr = $(`<tr class="esd_${esd}"></tr>`);
let td = $('<td colspan="8" style="padding: 3px;"></td>').appendTo(tr);
let tb = $('<table class="grid"></table>').appendTo(td);
tb.append(`<tbody><tr class="subTHead">
<th>生产库</th><th style="width: 90px;">生产状态</th>
<th style="width: 90px;">备份</th><th style="width: 90px;">云上备份</th>
<th style="width: 180px;">编码格式</th><th style="width: 90px;">视频尺寸</th>
<th style="width: 90px;">音频格式</th>
</tr></tbody>`);
tb.bindList({
list: data,
template: '<tr class="subTBody">' +
'<td class="text-center">${workPath}</td><td class="text-center">${workStatusDesc}</td>' +
'<td class="text-center">${offlineStatusDesc}</td><td class="text-center">${cloudBackupStatusDesc}</td>' +
'<td class="text-center">${movieTypeDesc}</td><td class="text-center">${screenFormatDesc}</td>' +
'<td class="text-center">${audioType}</td>' +
'</tr>',
itemRender: {
btnDeleteFile: function (v, i, row) {
if (v)
return `<button class="btn-mini btn-danger btnDeleteFile" data-id="${row.id}" data-idx="${row[':index']}">删除</button>`;
return '';
}
},
mode: 'append'
});
tr.insertAfter(srcTr);
cur.toggleClass('ellipse expanded');
}
else {
opg.alert('没有相关信息');
}
})
示例6: function
let showVersionDialog = function () {
/*opg.alert(`<span>
<span style="display: inline-block;width: 80px;">front-end:</span>${cfg.version}
</span><br>
<span style="display: inline-block;width: 80px;">back-end:</span>${backendVersion}`, $.noop, {
title: '关于 IMSP',
width: 300
});*/
let html = `<div style="height: 80px; font-size: 12px; color: #555; padding-top: 12px;">
<img src="/css/img/opg-logo1.png" style="width:185px; height: 76px; float: left; margin: 10px 42px 32px 32px;">
<h2 style="font-size: 32px; margin-bottom: 3px;">CMS v6</h2>
<span style="font-size: 12px;"><span style="display: inline-block;width: 80px;font-size: 12px;">front-end:</span>${cfg.version}</span><br>
<span style="display: inline-block;width: 80px;font-size: 12px;">back-end:</span>${backendVersion}
</div>` ;
opg.alert(html , $.noop , {
title: '关于 IMSP',
width: 500
})
};
示例7: function
opg.api.getOrders({taskId}, function (data) {
if (data && data.length) {
let th = $(`<tr class="subTHead esd_${taskId}">
<th>工位名称</th><th colspan="2">开始时间</th><th colspan="2">结束时间</th>
<th>操作员</th><th>耗时</th><th>执行状态</th><th colspan="2">描述</th>
</tr>`).insertAfter(tr);
th.bindList({
list: data,
template: '<tr class="subTBody esd_' + taskId + '">' +
'<td class="text-center">${stepCodeDesc}</td><td class="text-center" colspan="2">${beginTime}</td><td class="text-center" colspan="2">${endTime}</td>' +
'<td class="text-center">${executor}</td><td class="text-center">${spendDesc}</td><td class="text-center">${statusDesc}</td><td class="text-center" colspan="2">${message}</td>' +
'</tr>',
mode: 'after',
});
cur.toggleClass('ellipse expanded');
}
else {
opg.alert('没有工单信息');
}
});
示例8: function
opg.api.checkAuditPermission({orderId}, function (data) {
if (data.result) {
if(!row.executor)
tb.update();
let popWin = openInfoWindow(assetId, idx, {
title: title,
btnMax: true,
width: 900,
height: 500,
buttons: {
btnPutBack: {
className: 'btn-warning',
text: '打回',
onClick: function () {
AuditPutBack.showWindow(2 , orderId , title , popWin , tb);
return true;
}
},
ok: {
className: 'btn-success',
text: '通过',
onClick: function () {
let form = $(`<div style="padding: 10px;"><table class="search-table">
<tr>
<td class="lead">节目名称</td>
<td style="width: auto;">${title}</td>
</tr>
<tr>
<td class="lead">生产流程</td>
<td style="width: auto;">
<label class="lbAutoWidth"><input type="checkbox" name="collectCatalog" value="1" checked />非编</label>、
<label class="lbAutoWidth"><input type="checkbox" name="collectAudit3" value="1" checked />三审</label>
</td>
</tr>
</table></div>`);
top.opg(form).popup({
title: '确定通过',
width: 420,
height: 200,
buttons: {
ok: {
text: '确定',
className: 'btn-success',
onClick: function () {
let p = this as PopUp;
let param = form.fieldsToJson();
param.orderId = orderId;
param.collectCatalog = (param.collectCatalog == '1');
param.collectAudit3 = (param.collectAudit3 == '1');
opg.api.pass(param, () => {
tb.update();
p.close();
popWin.close();
});
return true;
}
},
cancel: '返回',
}
});
return true;
}
},
cancel: {
className: 'btn',
text: '取消' ,
onClick : function(){
opg.api.cancelAuditOrder({orderId} , ()=>{
tb.update();
popWin.close();
});
return true;
}
},
returnBtn: '返回',
}
});
}
else{
opg.alert(data.message , ()=>{
viewMeta(assetId, title, idx);
});
}
});