本文整理汇总了TypeScript中ts/util/store.store.get方法的典型用法代码示例。如果您正苦于以下问题:TypeScript store.get方法的具体用法?TypeScript store.get怎么用?TypeScript store.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ts/util/store.store
的用法示例。
在下文中一共展示了store.get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: shortenDate
).done(() => {
if (isEdit) {
$('.forCreat').remove();
opg.api.findProgramContract({relCopyrightProgramId}, (data) => {
contractFullMeta = data;
contractId = data.contractId;
contractNumber = data.contractNumber;
let contract = data.contract || {};
let program = data.program || {};
$('#tbdProgram').jsonToFields(program);
$('#tbdContract').jsonToFields(contract);
//
data.authorizedCorp = data.authorizedCorp ? data.authorizedCorp.split(',') : [];
data.authorizedPlatform = data.authorizedPlatform ? data.authorizedPlatform.split(',') : [];
data.transmitMode = data.transmitMode ? data.transmitMode.split(',') : [];
data.copyrightBeginDate = shortenDate(data.copyrightBeginDate);
data.copyrightEndDate = shortenDate(data.copyrightEndDate);
data.shareMoneyBeginDate = shortenDate(data.shareMoneyBeginDate);
data.shareMoneyEndDate = shortenDate(data.shareMoneyEndDate);
$('#tbd').jsonToFields(data);
$('#copyrightRealBeginDate').text(shortenDate(data.copyrightRealBeginDate));
$('#copyrightRealEndDate').text(shortenDate(data.copyrightRealEndDate));
$('#copyrightType').text(copyrightType[data.copyrightType]);
//$('#spTransmitMode').text(data.transmitModeCNDesc);
//$('#chargeRequire').text(data.chargeRequire);
//$('#authorizedLifeDesc').text(data.authorizedLifeDesc);
});
}
else {
$('.forEdit').remove();
const currentUser = store.get('userInfo');
$('#personInCharge').val(currentUser.name);
$('#contractNumber').val(contractNumber);
}
});
示例2: exportAll
/***
* 导出全量
*/
static exportAll(){
let loading = $('#opgAjaxLoading');
loading.show();
let req = new XMLHttpRequest();
req.open('GET', opg.api.download.get('url'), true);
req.responseType = 'blob';
req.setRequestHeader('X-Token', store.get('X-Token'));
req.onload = function (e) {
//console.log(req.getResponseHeader('Content-Disposition'));
loading.hide();
if(req.status==200 || req.status == 0){
let blob = req.response;
let fileName = 'allcopyright.csv';
if (window.navigator && window.navigator.msSaveBlob) {
window.navigator.msSaveBlob(blob , fileName);
}
else {
let link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = fileName;
document.body.appendChild(link);
link.click();
setTimeout(function(){
document.body.removeChild(link);
window.URL.revokeObjectURL(link.href);
}, 100);
}
}
else{
opg.err(req.statusText);
}
};
req.send();
}
示例3:
import opg from 'ts/opg.ts';
import Panel from "ts/ui/Panel.ts";
import Table from "ts/ui/Table.ts";
import {Combo} from 'ts/ui/Combo' ;
import {store, Cache} from 'ts/util/store';
import PopUp from "ts/ui/Popup";
import AuditPutBack from '../@comm/auditPutBack' ;
let currentUser = store.get('userInfo');
console.log('currentUser', currentUser);
opg.api({
contentType: 'content/contentType/findAll',
sourceTypes: 'system/collection/collectSourceEnum',
audit: 'audit/findPage?stepCode=collect_audit',
checkAuditPermission: 'audit/checkAuditPermission/${orderId}', //检查审核权限
'pass!POST': 'audit/pass',
'cancelAuditOrder!!': 'audit/cancelAuditOrder/${orderId}', //取消审核
'delete!DELETE!': 'transcode/business/delete/${id}',
});
let panel: Panel = opg.wrapPanel('#tbSearch', {
title: '二审工单查询',
btnSearchText: '<i class="ico-find"></i> 查询'
});
Combo.makeClearableInput($('#createTimeBegin').datetimepicker({
timepicker: false,
closeOnDateSelect: true,
示例4: function
import opg from "./opg";
import {store} from 'ts/util/store';
store.use('sessionStorage');
interface IConfig {
apiServer: string ;
ajaxTimeOut: number;
loginPage: string;
version: string;
onServerError?: Function;
onUnauthorizedError?:Function;
}
let cfg: IConfig = {
apiServer: store.get('apiServer') || (window.CONFIG ? window.CONFIG.apiServer : null),
ajaxTimeOut: 30000,
loginPage: '/page/index.html',
version: '6.7.3_20171117',
};
cfg.onUnauthorizedError = function () {
let param = '', url = cfg.loginPage;
if (top.window.location.hash) {
param = '?returnUrl=' + encodeURIComponent(top.window.location.hash);
url += param;
}
top.window.location.href = url;
};
示例5: function
return function () {
if (!form) {
let currentUser = store.get('userInfo');
let strForm = `<form style="width: 490px; padding: 20px;">
<p>当前用户:<b>${currentUser.loginName}</b></p>
<p><label>原有密码: <input id="old_password" name="old_password" type="password" maxlength="15" style="width:150px;"/></label></p>
<p><label>新设密码: <input id="new_password" name="new_password" type="password" maxlength="15" style="width:150px;"/></label> <span class="text-gray"> (密码8~15位,大小写字母数字混合)</span></p>
<p><label>重新输入: <input id="again_password" name="again_password" type="password" maxlength="15" style="width:150px;"/></label> <span class="text-gray"> (再次确认您要修改的密码)</span></p>
</form>`;
form = $(strForm);
pop = opg.confirm(form, function () {
let obj = form.fieldsToJson();
if (!obj.old_password) {
$('#old_password').iptError('原密码不能为空');
}
else if (!obj.new_password) {
$('#new_password').iptError('新密码不能为空');
}
else if (obj.new_password.length < 8 || obj.new_password.length > 15) {
$('#new_password').iptError('密码长度需要8~15位');
}
else if (!(/(?=.*[A-Z])(?=.*[a-z])(?=.*\d)/).test(obj.new_password)) {
$('#new_password').iptError('密码需要由大小写数字混合');
}
else if (obj.new_password != obj.again_password) {
$('#again_password').iptError('新密码两次输入不一致');
}
else {
opg.api.editPassword(obj, function (json) {
if (json.result) {
pop.close();
opg.ok('修改成功');
}
else
opg.err('修改失败');
});
}
return true;
}, {
title: '修改密码',
show: false,
destroy: false
});
}
else {
form[0].reset();
}
pop.open();
};
示例6:
import opg from 'ts/opg.ts';
import {store, Cache} from 'ts/util/store';
import cfg from 'ts/app.cfg.ts';
import PopUp from "ts/ui/Popup";
opg.api({
backendVersion: 'base/version'
});
//opg.api.menu(function (json) {
let permissions = store.get('permissons');
let menu = {}, curMainMenuId;
for (let i = 0, l = permissions.length; i < l; i++) {
let mn = permissions[i];
menu['#' + mn.id] = mn;
}
let mainMenu = $('#mainMenu'),
subMenu = $('#subMenu'),
divTd = $('#td') ,
mainFrame: JQuery = $('#mainFrame') ,
mainFrameWindow :Window = (mainFrame[0] as HTMLIFrameElement).contentWindow as Window;
/*if (permissions.length > 6) {