当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ts.default方法代码示例

本文整理汇总了TypeScript中ts/opg.ts.default方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ts.default方法的具体用法?TypeScript ts.default怎么用?TypeScript ts.default使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ts/opg.ts的用法示例。


在下文中一共展示了ts.default方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: opg

let panel: Panel = opg.wrapPanel('#tbSearch', {
	title: '内容生产商查询',
	btnSearchText: '<i class="ico-find"></i> 查询'
});

panel.btnSearch.click(function () {
	let param = $('#tbSearch').fieldsToJson();
	param.pageNo = 1 ;
	//console.log(panel.jq, param);
	tb.update(param);
});



let tb = opg('#tb').table({
	titleBar : {
		title : '内容生产商列表',
		buttons :[
			{id: 'btnAdd' , className : 'btn-create' , html: '<i class="ico-create"></i> 新增内容生产商'}
		]
	} ,
	columns: [
		{
			text: '内容生产商名称', width: 200,
			src: 'name'
		},
		{
			text: '内容生产商编码',
			src: 'code'
		},
开发者ID:rpdg,项目名称:fy.js,代码行数:30,代码来源:index.ts

示例2: opg

	tb.update(param);
});

Combo.makeClearableInput($('#createTimeBegin').datetimepicker({
	timepicker: false,
	closeOnDateSelect: true,
	format: 'Y-m-d'
}), $({}));
Combo.makeClearableInput($('#createTimeEnd').datetimepicker({
	timepicker: false,
	closeOnDateSelect: true,
	format: 'Y-m-d'
}), $({}));


opg('#contentType').listBox({
	api: opg.api.contentType,
	value: 'name'
});

opg('#source').listBox({
	api: opg.api.sourceTypes,
	value: 'code',
});


let tb: Table = opg('#tb').table({
	titleBar: {
		title: '待采集列表',
	},
	columns: [
开发者ID:rpdg,项目名称:fy.js,代码行数:31,代码来源:index.ts

示例3:

	configTypes: 'base/produceConfigTypes', //配置关系类型
	conditionKeys: 'base/produceConditionKeys', //配置条件类别类型
	conditionTypes: 'base/produceConditionTypes', //配置条件关系类型
	'addConfig!post': 'produce/rule/saveConfig',//
});


interface Condition {
	key: string ;
	value: string;
	type: string;
}

let conditions: Condition[] = [];

opg('#configType').listBox({
	api: opg.api.configTypes,
	autoPrependBlank: false,
	onAjaxEnd: (json) => {
		json.results = opg.convert.hashToArray(json, (val, key) => {
			return {name: val, id: key};
		});
		//console.log(json);
	},
});


let keyHTML: string = '';
let typeHTML: string = '';

开发者ID:rpdg,项目名称:fy.js,代码行数:29,代码来源:add.ts

示例4: function

).done(function () {
	console.log(222222);

	$.when(
		opg('#catalog').listBox({
			data: toggleData,
		}).createdPromise,

		opg('#backup').listBox({
			data: toggleData,
		}).createdPromise,

		opg('#audit').listBox({
			data: toggleData,
		}).createdPromise,

		//生产类型
		opg('#tbd1_produceType').checkBox({
			api: opg.api.produceTypes,
			name: 'produceTypes',
			value: 'code',
			onAjaxEnd: (json) => {
				json.results = opg.convert.hashToArray(json, (val, key) => {
					return {name: val, code: key};
				});
				//console.log(json);
			},
		}).createdPromise,

		//生产业务
		opg('#td_busiCodes').checkBox({
			api: opg.api.business,
			name: 'busiCodes',
			value: 'bizCode',
		}).createdPromise,

		//节目来源
		opg('#td_sourceTypes').checkBox({
			api: opg.api.sourceTypes,
			name: 'source',
			value: 'code',
		}).createdPromise,

		//转码环境
		opg('#td_transcodeEnvs').radioBox({
			api: opg.api.transcodeEnvs,
			name: 'transcodeEnv',
			value: 'code',
			onAjaxEnd: (json) => {
				json.results = opg.convert.hashToArray(json, (val, key) => {
					return {name: val, code: key};
				});
				//console.log(json);
			},
		}).createdPromise,

		//转码模式
		opg('#transcodePolicys').listBox({
			api: opg.api.transcodePolicys,
			value: 'code',
			onAjaxEnd: (json) => {
				json.results = opg.convert.hashToArray(json, (val, key) => {
					return {name: val, code: key};
				});
			},
		}).createdPromise,

		//转码优先级
		opg('#transcodePrioritys').listBox({
			api: opg.api.transcodePrioritys,
			value: 'code',
			onAjaxEnd: (json) => {
				json.results = opg.convert.hashToArray(json, (val, key) => {
					return {name: val, code: key};
				});
			},
		}).createdPromise,

		//存储类型
		opg('#storageTypes').listBox({
			api: opg.api.storageTypes,
			value: 'code',
			autoPrependBlank: false,
			onAjaxEnd: (json) => {
				json.results = opg.convert.hashToArray(json, (val, key) => {
					return {name: val, code: key};
				});
			},
		}).createdPromise,

	).done(function () {
		console.log(555);
		if (id) {
			opg.api.findById({id: opg.request['id']}, function (data) {
				/**/
				if (data.produceTypes)
					data.produceTypes = data.produceTypes.split(',');

				if (data.busiCodes)
					data.busiCodes = data.busiCodes.split(',');
//.........这里部分代码省略.........
开发者ID:rpdg,项目名称:fy.js,代码行数:101,代码来源:rule.ts

示例5: opg

		id : 2 ,  name: 'bbb' , type : 0, children: [
			{
				id : 21 ,  name: 'bb-1' , type : 0, children: [
					{
						id : 211 ,  name: 'bb-1' , type : 1
					},
				]
			},
			{
				id : 22 ,  name: 'bb-2' , type : 0
			},
		]
	},
];

let tree = opg('#tree').tree({
	api: opg.api.categoryTree ,
	arrSrc : 'children',
	root: '站点分类' ,
	name : 'categoryTree' ,
	template : '<label>${id:=mkChk} ${name}</label>' ,
	render : {
		mkChk : (id , i , row)=>{
			let html = '';
			if(!row.children){
				let chked = (id in checkedCategoryHash)? 'checked': '';
				html += `<input type="checkbox" name="chkCategory" value="${id}" data-name="${row.name}" ${chked}>`;
			}
			return html ;
		}
	}
开发者ID:rpdg,项目名称:fy.js,代码行数:31,代码来源:categoryCheck.ts

示例6:

});

const moduleName = '采集工单监控';

const workStatusHash = {
	'0' : '待采集' ,
	'1' : '采集中' ,
	'2' : '采集完成' ,
	'3' : '采集取消' ,
	'-1' : '采集失败' ,
};
const workStatus = opg.convert.hashToArray(workStatusHash , (val , key)=>{
	return {id : key , name : val};
});

opg('#status').listBox({
	data : workStatus,
});
let panel: Panel = opg.wrapPanel('#tbSearch', {
	title: `${moduleName}`,
	btnSearchText: '<i class="ico-find"></i> 查询'
});

panel.btnSearch.click(function () {
	let param = $('#tbSearch').fieldsToJson();

	if (param.showStart && param.showStart.indexOf(' ') < 0) {
		param.showStart += ' 00:00:00';
	}
	if (param.showEnd && param.showEnd.indexOf(' ') < 0) {
		param.showEnd += ' 23:59:59';
开发者ID:rpdg,项目名称:fy.js,代码行数:31,代码来源:index.ts

示例7: opg

	transcodePrioritys: 'base/transcodePrioritys', //转码优先级
	sourceTypes: 'base/sourceTypes', //节目来源
	transcodeEnvs: 'base/transcodeEnvs', //转码环境
	storageTypes: 'base/storageTypes', //存储类型
	'findById!!': 'produce/rule/${id}', //获取规则元数据
	'upsert!post': 'produce/rule/saveRule',
});

let dynTrs = $('#tbSearch > tbody > tr');
let toggleData = [{id: 1, name: '是'}, {id: 0, name: '否'}];


let produceRuleTypes ;
$.when(
	//规则类型
	produceRuleTypes = opg('#produceRuleTypes').listBox({
		api: opg.api.produceRuleTypes,
		autoPrependBlank: false,
		onAjaxEnd: function (json) {
			json.results = opg.convert.hashToArray(json, (val, key) => {
				return {name: val, code: key};
			});
			console.log('111111', json);
		},
		value: 'code',
		onSelect: function () {
			dynTrs.hide();
			let v = +this.getValue();
			//debugger;
			switch (v) {
				case 1:
开发者ID:rpdg,项目名称:fy.js,代码行数:31,代码来源:rule.ts

示例8: ValidTimeModifier

	createTable(mediaRow) {
		let that = this;
		this.tbMedia = opg('#tbMedia').table({
			data: [],
			columns: [
				{
					text: '内容名称',
					src: 'managerName',
					width: 200,
				},
				{
					text: '内容类型',
					src: 'contentType',
					width: 150,
				},
				{
					text: '已生产业务',
					src: 'busiCodes',
					width: 150,
				},
				{
					text: '生产中业务',
					src: 'produceBusiCodes',
					width: 150,
				},
				{
					text: '创建时间',
					src: 'createTime',
					width: 150,
				},
				{
					text: '时长',
					src: 'length',
					width: 150,
				},
				{
					text: '创建人',
					src: 'creator',
				},
				{
					text: '操作',
					src: 'id',
					width: 180, lign: 'left',
					render: (val, i, row) => {
						let btnHTML = '';
						if (mediaRow.updateValidTime_visible) {
							btnHTML += `
									<button class="btn-mini btn-warning btnModifyTime" data-id="${val}" data-title="${row.managerName}" data-idx="${row[':index']}" data-time="${row.validTime || ''}">修改生效时间</button>
								`;
						}
						if (mediaRow.deleteAsset_visible) {
							btnHTML += `
								<button class="btn-mini btn-danger btnDelete" data-id="${mediaRow.id}" data-title="${row.managerName}" data-idx="${row[':index']}">删除</button>
							`;
						}
						return btnHTML;
					}
				},
			],
			onUpdate: function () {
				opg.api.medias({id: mediaRow.id}, (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></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'
						});

						that.tbMedia.tbody.append(tr);
					}
					else {

//.........这里部分代码省略.........
开发者ID:rpdg,项目名称:fy.js,代码行数:101,代码来源:viewMedia.ts

示例9: function



//wrap as search panel
opg.wrapPanel('#tbSearch', {
	title: '合同列表',
	btnSearchText: '<i class="ico-find"></i> 查询',
	btnSearchClick: function () {
		let param = $('#tbSearch').fieldsToJson();
		param.pageNo = 1;
		//console.log(panel.jq, param);
		tb.update(param);
	},
});


let selMainCategory = opg('#mainCategory').listBox({
	api: opg.api.mainCategory,
	text: 'programType',
	onSelect: () => {
		let parentId = selMainCategory.getValue();
		if (!parentId) parentId = -1;
		selSubCatagory.update({parentId});
	},
});
let selSubCatagory = opg('#minorCategory').listBox({
	lazy: true,
	api: opg.api.subCategory,
	text: 'programType',
});

开发者ID:rpdg,项目名称:fy.js,代码行数:27,代码来源:index.ts


注:本文中的ts/opg.ts.default方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。