/**
|
* 信息选取器
|
*/
|
var wcp = wcp || {};
|
(function () {
|
/**
|
* 人员(综合)信息选择器
|
*/
|
wcp.picker.selectUser = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择用户",
|
deptId: null,
|
multiSelect: true,
|
returnIdType: false,
|
selectDept: false,
|
selectGroup: false,
|
selectRole: false,
|
pickRangeType: null,
|
pickRangeId: null,
|
separator: ",",
|
idElement: null,
|
nameElement: null,
|
deptIdElement: null,
|
deptNameElement: null,
|
hasSelectIds: null,
|
hasSelectNames: null,
|
classification: null,
|
classificationCode: null,
|
selectFrame: "0",
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
|
var title = opts.title ? opts.title : "选择用户";
|
var url = 'management/user/selectUser';
|
var urlParams = "";
|
if (typeof opts.deptId != "undefined" && opts.deptId != null) {
|
urlParams += "&deptId=" + opts.deptId;
|
}
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (typeof opts.returnIdType != "undefined" && opts.returnIdType != null) {
|
urlParams += "&returnIdType=" + opts.returnIdType;
|
}
|
if (typeof opts.selectDept != "undefined" && opts.selectDept != null) {
|
urlParams += "&selectDept=" + opts.selectDept;
|
}
|
if (typeof opts.selectGroup != "undefined" && opts.selectGroup != null) {
|
urlParams += "&selectGroup=" + opts.selectGroup;
|
}
|
if (typeof opts.selectRole != "undefined" && opts.selectRole != null) {
|
urlParams += "&selectRole=" + opts.selectRole;
|
}
|
if (typeof opts.pickRangeType != "undefined" && opts.pickRangeType != null) {
|
urlParams += "&pickRangeType=" + opts.pickRangeType;
|
}
|
if (typeof opts.pickRangeId != "undefined" && opts.pickRangeId != null) {
|
urlParams += "&pickRangeId=" + opts.pickRangeId;
|
}
|
if (typeof opts.classification != "undefined" && opts.classification != null) {
|
urlParams += "&classification=" + opts.classification;
|
}
|
if (typeof opts.classificationCode != "undefined" && opts.classificationCode != null) {
|
urlParams += "&classificationCode=" + opts.classificationCode;
|
}
|
if (typeof opts.selectFrame != "undefined" && opts.selectFrame != null) {
|
urlParams += "&selectFrame=" + opts.selectFrame;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
//console.info(url)
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['1000px', '610px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 部门选择器
|
*/
|
wcp.picker.selectDept = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选部门",
|
deptId: null,
|
multiSelect: true,
|
returnIdType: false,
|
separator: ",",
|
idElement: null,
|
nameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
|
var title = opts.title ? opts.title : "选择部门";
|
var url = 'management/dept/selectDept';
|
var urlParams = "";
|
if (typeof opts.deptId != "undefined" && opts.deptId != null) {
|
urlParams += "&deptId=" + opts.deptId;
|
}
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (typeof opts.returnIdType != "undefined" && opts.returnIdType != null) {
|
urlParams += "&returnIdType=" + opts.returnIdType;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['800px', '570px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
/**
|
* 通知组选择器
|
*/
|
wcp.picker.selectGroup = function (opts, callBack) {
|
//默认参数
|
defaultOpts = {
|
title: "选通知组",
|
groupId: null,
|
multiSelect: true,
|
returnIdType: false,
|
separator: ",",
|
idElement: null,
|
nameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
|
var title = opts.title ? opts.title : "选择部门";
|
var url = 'management/group/selectGroup';
|
var urlParams = "";
|
if (opts.deptId) {
|
urlParams += "&groupId=" + opts.groupId;
|
}
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (typeof opts.returnIdType != "undefined" && opts.returnIdType != null) {
|
urlParams += "&returnIdType=" + opts.returnIdType;
|
}
|
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['800px', '570px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
/**
|
* 角色选择器
|
*/
|
wcp.picker.selectRole = function (opts, callBack) {
|
//默认参数
|
defaultOpts = {
|
title: "选角色",
|
roleId: null,
|
multiSelect: true,
|
returnIdType: false,
|
separator: ",",
|
idElement: null,
|
nameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
|
var title = opts.title ? opts.title : "选择角色";
|
var url = 'management/role/selectRole';
|
var urlParams = "";
|
if (opts.deptId) {
|
urlParams += "&roleId=" + opts.roleId;
|
}
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (typeof opts.returnIdType != "undefined" && opts.returnIdType != null) {
|
urlParams += "&returnIdType=" + opts.returnIdType;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['800px', '570px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
/**
|
* 表单选择器
|
*/
|
wcp.picker.selectForm = function (opts, callBack) {
|
//默认参数
|
defaultOpts = {
|
title: "选表单",
|
moduleId: null,
|
multiSelect: true,
|
separator: ",",
|
idElement: null,
|
nameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
|
var title = opts.title ? opts.title : "选择表单";
|
var url = 'config/form/selectForm';
|
var urlParams = "";
|
if (opts.moduleId) {
|
urlParams += "&moduleId=" + opts.moduleId;
|
}
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['800px', '570px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 选择表单字段
|
*/
|
wcp.picker.selectFormColumn = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择表单字段",
|
multiSelect: true,
|
formId: null,
|
separator: ",",
|
nameElement: null,
|
displayNameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
var title = opts.title ? opts.title : "选择表单字段";
|
var url = 'config/form/selectFormColumn';
|
var urlParams = "";
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (typeof opts.formId != "undefined" && opts.formId != null) {
|
urlParams += "&formId=" + opts.formId;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['1000px', '600px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 选择表字段
|
*/
|
wcp.picker.selectTableColumn = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择字段",
|
tableId: null,
|
tableName: null,
|
moduleId: null,
|
multiSelect: true,
|
separator: ",",
|
nameElement: null,
|
hasSelectIds: null,
|
hasSelectNames: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
var title = opts.title ? opts.title : "选择字段";
|
var url = 'config/table/selectColumn';
|
var urlParams = "";
|
if (typeof opts.tableId != "undefined" && opts.tableId != null) {
|
urlParams += "&tableIds=" + opts.tableId;
|
}
|
if (typeof opts.tableName != "undefined" && opts.tableName != null) {
|
urlParams += "&tableName=" + opts.tableName;
|
}
|
if (typeof opts.moduleId != "undefined" && opts.moduleId != null) {
|
urlParams += "&moduleId=" + opts.moduleId;
|
}
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['1000px', '600px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 选择表
|
*/
|
wcp.picker.selectTable = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择表",
|
multiSelect: true,
|
moduleId: null,
|
separator: ",",
|
nameElement: null,
|
tableNames: null,
|
tableIds: null,
|
idElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
var title = opts.title ? opts.title : "选择表";
|
var url = 'config/table/selecTableIndex';
|
var urlParams = "";
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (typeof opts.moduleId != "undefined" && opts.moduleId != null) {
|
urlParams += "&moduleId=" + opts.moduleId;
|
}
|
if (typeof opts.tableNames != "undefined" && opts.tableNames != null) {
|
urlParams += "&tableNames=" + opts.tableNames;
|
}
|
if (typeof opts.tableIds != "undefined" && opts.tableIds != null) {
|
urlParams += "&tableIds=" + opts.tableIds;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['800px', '500px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 模块选择器
|
*/
|
wcp.picker.selectModule = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择模块",
|
multiSelect: false,
|
separator: ",",
|
idElement: null,
|
nameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
|
var title = opts.title ? opts.title : "选择模块";
|
var url = 'config/module/selectModule';
|
var urlParams = "";
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['800px', '570px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 图标选择器
|
*/
|
wcp.picker.selectIcon = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择图标",
|
multiSelect: false,
|
separator: ",",
|
nameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
|
var title = opts.title ? opts.title : "选择模块";
|
var url = 'general/selectIcon';
|
var urlParams = "";
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['1000px', '600px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 关键字选择
|
*/
|
wcp.picker.selectKeyword = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择关键字",
|
idElement: null,
|
nameElement: null,
|
keywordType: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
var title = opts.title ? opts.title : "选择关键字";
|
var url = 'management/keyword/selectKeywordIndex';
|
var urlParams = "";
|
if (typeof opts.keywordType != "undefined" && opts.keywordType != null) {
|
urlParams += "&keywordType=" + opts.keywordType;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['500px', '600px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 资源选择
|
*/
|
wcp.picker.selectResource = function (opts, callBack) {
|
//默认参数
|
defaultOpts = {
|
title: "选择资源",
|
url: null,
|
openWidth: '800px',
|
openHeight: '570px',
|
layerOpener: window
|
};
|
opts = $.extend({}, defaultOpts, opts);
|
var title = opts.title ? opts.title : "选择资源";
|
var openWidth = opts.openWidth;
|
var openHeight = opts.openHeight;
|
var url = opts.url;
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: [openWidth, openHeight],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
/**
|
* 归档目录模板
|
*/
|
wcp.picker.selectPlanTemplate = function (opts, callBack) {
|
//默认参数
|
defaultOpts = {
|
title: "选择模板",
|
url: null,
|
layerOpener: window
|
};
|
opts = $.extend({}, defaultOpts, opts);
|
var title = opts.title ? opts.title : "选择模板";
|
var url = opts.url;
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['800px', '570px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
/**
|
* 操作选择
|
*/
|
wcp.picker.selectOperation = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择操作",
|
multiSelect: true,
|
moduleId: null,
|
operationPosition: null,
|
idElement: null,
|
displayNameElement: null,
|
nameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
var title = opts.title ? opts.title : "选择操作";
|
var url = 'config/operation/selectOperationIndex';
|
var urlParams = "";
|
if (typeof opts.moduleId != "undefined" && opts.moduleId != null) {
|
urlParams += "&moduleId=" + opts.moduleId;
|
}
|
if (typeof opts.operationPosition != "undefined" && opts.operationPosition != null) {
|
urlParams += "&operationPosition=" + opts.operationPosition;
|
}
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['1000px', '600px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 选择权限
|
*/
|
wcp.picker.selectPermission = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择权限",
|
multiSelect: true,
|
moduleId: null,
|
operationPosition: null,
|
idElement: null,
|
displayNameElement: null,
|
nameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
var title = opts.title ? opts.title : "选择权限";
|
var url = 'config/permission/selectPermissionIndex';
|
var urlParams = "";
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['500px', '600px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 选择页签
|
*/
|
wcp.picker.selectSubtab = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择页签",
|
multiSelect: true,
|
moduleId: null,
|
separator: ",",
|
nameElement: null,
|
idElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
var title = opts.title ? opts.title : "选择页签";
|
var url = 'config/subtab/selecSubtabIndex';
|
var urlParams = "";
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (typeof opts.moduleId != "undefined" && opts.moduleId != null) {
|
urlParams += "&moduleId=" + opts.moduleId;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['1000px', '600px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 选择参数
|
*/
|
wcp.picker.selectParam = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择参数",
|
multiSelect: true,
|
joinParentText:false,
|
keywordId: null,
|
separator: ",",
|
idElement: null,
|
nameElement: null,
|
valueElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
var title = opts.title ? opts.title : "选择参数";
|
var url = 'management/keywordParam/selecParamIndex';
|
var urlParams = "";
|
if (typeof opts.multiSelect != "undefined" && opts.multiSelect != null) {
|
urlParams += "&multiSelect=" + opts.multiSelect;
|
}
|
if (typeof opts.joinParentText != "undefined" && opts.joinParentText != null) {
|
urlParams += "&joinParentText=" + opts.joinParentText;
|
}
|
|
if (typeof opts.keywordId != "undefined" && opts.keywordId != null) {
|
urlParams += "&keywordId=" + opts.keywordId;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
top.layer.open({
|
title: title,
|
type: 2,
|
area: ['800px', '600px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 选择阅读版式
|
*/
|
wcp.picker.selectFormatReading = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择阅读版式",
|
moduleId: null,
|
idElement: null,
|
nameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
var url = 'config/reading/selectReading';
|
var urlParams = "";
|
if (typeof opts.moduleId != "undefined" && opts.moduleId != null) {
|
urlParams += "&moduleId=" + opts.moduleId;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
top.layer.open({
|
title: opts.title,
|
type: 2,
|
area: ['500px', '600px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
|
/**
|
* 选择附件模板
|
*/
|
wcp.picker.selectAttachTemplate = function (opts, callBack) {
|
|
//默认参数
|
defaultOpts = {
|
title: "选择附件模板",
|
moduleId: null,
|
idElement: null,
|
nameElement: null,
|
layerOpener: window
|
};
|
|
opts = $.extend({}, defaultOpts, opts);
|
var url = 'management/attachTemplate/selectTemplateIndex';
|
var urlParams = "";
|
if (typeof opts.moduleId != "undefined" && opts.moduleId != null) {
|
urlParams += "&moduleId=" + opts.moduleId;
|
}
|
if (urlParams != "") {
|
url += "?" + urlParams.substring(1);
|
}
|
top.layer.open({
|
title: opts.title,
|
type: 2,
|
area: ['900px', '520px'],
|
fixed: false, //不固定
|
content: url,
|
success: function (layero, index) {
|
var body = window.top.layer.getChildFrame('body', index);
|
var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
|
//将参数和回调函数传给子页面
|
iframeWin.params.opts = opts;
|
iframeWin.params.callBack = callBack;
|
}
|
});
|
}
|
})();
|