📄 dict.js
字号:
/**
* 公用方法: 调用入口
* 参数:
* path ----------- 上下文路径[ request.getContextPath() ]
* dictName ------- 父字典名称(必选项)
* currenDictId --- 当前已选择的字典ID(可选项)
* dWidth --------- 窗口宽度(可选项)
* dHeight -------- 窗口高度(可选项)
*/
function dictionaryDialog(path, dictName, currenDictId, dWidth, dHeight){
if(path==null){
path = "";
}
if(dWidth==null){
dWidth = 400;
}
if(dHeight==null){
dHeight = 400;
}
if(dictName==null){
dictName = "";
}
var styles = "dialogHeight:"+dHeight+"px;dialogWidth:"+dWidth+"px;center:yes; help:no; resizable:no; status:no";
var objReturn = window.showModalDialog(path+"/dictionaryAction.do?method=commonChooseDictionary&parentName="+dictName+"¤DictId="+currenDictId,
"字典选择",
styles);
return objReturn;
}
/**
* 字典管理方法: 调用入口
* 参数:
* path -------- 上下文路径[ request.getContextPath() ]
* oldDictId --- 原字典ID(可选项)
* dWidth ------ 窗口宽度(可选项)
* dHeight ----- 窗口高度(可选项)
*/
function chooseDictionary(path, oldDictId, dWidth, dHeight){
if(path==null){
path = "";
}
if(dWidth==null){
dWidth = 400;
}
if(dHeight==null){
dHeight = 400;
}
if(oldDictId==null){
oldDictId = "";
}
var styles = "dialogHeight:"+dHeight+"px;dialogWidth:"+dWidth+"px;center:yes; help:no; resizable:no; status:no";
var objReturn = window.showModalDialog(path+"/dictionaryAction.do?method=chooseDictionary&dictId="+oldDictId,
"字典选择",
styles);
return objReturn;
}
// 设置值 到树显示页中
function setDictionaryValue(choiceId, choiceName){
with(self.parent.choiceDictionaryForm){
dictId.value = choiceId;
dictName.value = choiceName;
}
}
//==========================================================================
// 根据选择返回值对象
function choiceDictionary(){
with(document.choiceDictionaryForm){
if(dictId.value.length>0){
var vDictionary = new Dictionary(dictId.value, dictName.value);
window.returnValue = vDictionary;
}
}
clickCancel();
}
// 关闭窗口
function clickCancel(){
parent.window.close();
}
//清空操作
function clickClear(){
window.returnValue = new Dictionary("","");
window.close();
}
// 定义返回值对象
function Dictionary(dictionaryId, dictionaryName){
this.dictId = dictionaryId;
this.dictName = dictionaryName;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -