本文整理匯總了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);
});
}
});