當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ts.default.api.newAsset方法代碼示例

本文整理匯總了TypeScript中ts/opg.ts.default.api.newAsset方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ts.default.api.newAsset方法的具體用法?TypeScript ts.default.api.newAsset怎麽用?TypeScript ts.default.api.newAsset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ts/opg.ts.default.api的用法示例。


在下文中一共展示了ts.default.api.newAsset方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: function

window['doSave'] = function (pop: Popup, tb: Table, parentWin: Window) {
	let param = $('#tbForm').fieldsToJson({
		onlineTime: {
			require: true,
			type: 'date',
			name: '上線時間',
		},
		episodeStart: {
			require: true,
			type: 'number',
			name: '起始集數',
		},
		episodeEnd: {
			require: true,
			type: 'number',
			name: '結束集數',
		},
		busiCodesList: {
			require: true,
			name: '業務',
		},


	});
	if (param) {
		if (param.episodeEnd < param.episodeStart)
			return opg.warn('結束集數應大等於開始集數');

		for (let i = param.episodeStart, l = param.episodeEnd + 1; i < l; i++) {
			if (programInfo.producedEpisodes.indexOf(i)>-1)
				return opg.warn('新增的劇集含已生產集數');
		}

		param.processType = 'NewAsset'; // 新增內容
		param.assetId = assetId;
		param.episodeNum = param.episodeEnd - param.episodeStart + 1;
		param.seriesFlag = 1;

		/*param.managerName = programInfo.managerName;
		 param.showName = programInfo.showName;
		 param.contentType = programInfo.contentType;
		 param.programLength = programInfo.programLength;
		 param.movieType = programInfo.movieType;
		 param.profile = programInfo.profile;*/

		if (param.onlineTime.indexOf(' 00:00:00') == -1)
			param.onlineTime += ' 00:00:00';


		param.collectAudit = (param.collectAudit == '1');
		param.collectCatalog = (param.collectCatalog == '1');
		param.collectAudit3 = (param.collectAudit3 == '1');


		for (let key in programInfo) {
			if (param[key] === undefined) {
				param[key] = programInfo[key];
			}
		}
		delete param.producedEpisodes;
		delete param.businessStatus;
		delete param.busiCodes;
		delete param.profileDesc;
		delete param.movieTypeDesc;

		if (param.programMediaFileId)
			param.programMediaFileId = +param.programMediaFileId;

		console.log(param);


		opg.api.newAsset(param, (data) => {
			pop.close();
			tb.update();
			parentWin['doCatalog'](data.assetId, data.id, param.managerName);
		});
	}
};
開發者ID:rpdg,項目名稱:fy.js,代碼行數:78,代碼來源:add.ts


注:本文中的ts/opg.ts.default.api.newAsset方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。