本文整理汇总了TypeScript中ts/opg.ts.default.api.auditMedias方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ts.default.api.auditMedias方法的具体用法?TypeScript ts.default.api.auditMedias怎么用?TypeScript ts.default.api.auditMedias使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ts/opg.ts.default.api
的用法示例。
在下文中一共展示了ts.default.api.auditMedias方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: opg
).then(() => {
//媒体文件
opg.api.auditMedias({assetId, orderId}, (data) => {
let arr = data.amsMediaFiles;
if (arr && arr.length)
mediaRow = arr[0];
else
return;
//
let comment: any;
try {
comment = JSON.parse(data.comment);
}
catch (e) {
comment = [];
}
let mediaInfo: MediaInfo = {
fileId: mediaRow.id,
filePath: mediaRow.workPath,
commentArray: comment,
orderId: orderId,
writable: false,
};
//媒体文件表
let tbMedia = opg('#tbVideo').table({
data: arr,
columns: [
{
text: '生产库',
src: 'workPath'
},
/*{
text: '审核状态',
src: 'auditStatus',
width: 150,
render: (val) => {
return mediaAuditStatus[val];
}
},*/
{
text: '操作',
src: 'workStatus',
width: 150,
render: (workStatus, i, row) => {
//if (workStatus == 3) {
if (!orderRow.executor || (orderRow.executor == currentUser.loginName)) {
mediaInfo.writable = true;
return `<button class="btnAudit btn-mini btn-warning" data-flid="${row.id}" data-ordid="${orderId}">审片</button>`;
}
else {
mediaInfo.writable = false;
return `<button class="btnView btn-mini btn-info" data-flid="${row.id}" data-ordid="${orderId}">查看</button>`;
}
//}
//return '';
}
},
]
});
//审片(4审)
tbMedia.tbody.on('click', '.btnAudit, .btnView', () => {
opg.dispatch('MediaInfoLoaded', mediaInfo);
if (mediaInfo.writable) {
//opg.api.auditFile({fileId: mediaInfo.fileId}, () => {
//todo: 状态切换有多种情况,目前就只做 待审核 & 审核中 切换
mediaRow.auditStatus = 1;
tbMedia.update();
//});
}
});
});
//元数据
opg.api.meta({assetId}, (data) => {
data.length = opg.format.timeLength(data.length);
data.vodArrange = contentUsages[data.vodArrange] || '';
data.copyrightType = copyRightTypes[data.copyrightType] || '';
data.defaultPriceType = priceTypes[data.defaultPriceType] || '';
data.sourceType = serialSourceTypes[data.sourceType] || '';
data.starLevel = starLevels[data.starLevel] || '';
data.rating = ratings[data.rating] || '';
if (data.originDate) data.originDate = data.originDate.split(' ')[0];
for (let attr in data) {
$(document.getElementById(attr)).text(`${data[attr]}`);
}
//todo:可能会有扩展类别
if (data.type != 1000) {
$('.forOne').find('*').css('visibility', 'visible');
}
else {
//.........这里部分代码省略.........