easyui dictionary js switch the content displayed jsp page

 

Direct switching from the list

Formatter: function (value) {
var name;
IF (value == 0) {
name = 'pending'
} the else IF (value ==. 1) {
name = 'through'
} the else IF (value == 2) {
name = 'reject'
} the else {
name = 'back to edit'
}
return name;
}

jsp code calls ==== dictionary

1.1 form

<th field="ccy" width="15%" formatter="mrdict.REQ_CCYFormatter" autocomplete="off" >交易币种</th>

1.2 form

$('#fangan_list').datagrid({
width: '800',
height:'100',
striped: true,
fit:true,
pagination:true,scrollbarSize:0,
singleSelect:true,
url:'<%=basePath%>xyData/xyMonitoringDisease/selectOneRecordProgrameList.do?idStr='+ myidStr,

loadMsg: 'Please wait Loading ......',
Columns: [[{
Field: 't_method',
title: 'treatment',
align = left: 'Center',
resizable: to false,
width: '13% ',
Formatter: function (value, Row) // {414
var dict = mrdict treatment;.
var dict O1 = [value];
IF (! O1) {
return value;
} the else {
return O1;
}
}
},

 

Dictionary js code =======

mrdict new new Object = var ();
mrdict name of the person class = "01":. "Chinese name", "06": "Other foreign language formerly known as", "05": "Other foreign language Full Name", "04 ":" English formerly known as (Chinese Pinyin) "," 03 ":" full name in English (Chinese Pinyin) "," 02 ":" Chinese formerly known as "};
. mrdict health level title = {" 6 ": "care", "54": "Deputy Director radiographer", "52": "primary radiographer", "51": "primary radiation technician", "5": "Radiation", "45": "examiner division "," 44 ":" Deputy Chief examiner "," 43 ":" test supervisor technician "," 42 ":" primary inspection technician "," 3 ":" medicine "," 74 ":" advanced treatment division "," 61 ":" nurse "," 55 ":" Radiographers director "," 63 ":" charge nurse "," 64 ":" deputy director of the nurse "," 65 ":" nurse Director "," 7 ":" rehabilitation technician ","71 ":" rehabilitation person "," 72 ":" Primary rehabilitation therapists "," 73 ":" Intermediate therapist "," 41 ":" Primary test technician "," 4 ":" Verify "," 12 ":" physician "," 13 ":" physician "," 23 ":" Intermediate pharmacist in charge "," 14 ":" deputy chief physician "," 15 ":" chief physician "," 22 ":" primary pharmacist "," 2 ":" acceptable "," 21 ":" primary drug person "," 11 ":" healers "," 1 ":" physician "," 35 ":" the pharmacist director "," 34 " : "deputy director of pharmacists", "33": "Intermediate competent pharmacists", "32": "primary pharmacists", "31": "Chinese primary scholar", "62": "nurse," "24 ":" deputy director of pharmacists "," 25 ":" director of pharmacists "," 53 ":" radiology technician in charge "};Intermediate therapist "," 41 ":" primary test technician "," 4 ":" test "," 12 ":" physician "," 13 ":" physician "," 23 ":" Intermediate Pharmacist " "14": "deputy chief physician", "15": "chief physician", "22": "primary pharmacist", "2": "acceptable", "21": "primary drug person", "11": "healers", "1": "physician", "35": "the pharmacist director", "34": "Deputy Director pharmacist", "33": "Intermediate competent pharmacist", "32": "primary pharmacists "," 31 ":" Chinese primary scholar "," 62 ":" nurse "," 24 ":" deputy director of pharmacists "," 25 ":" director of pharmacists "," 53 ":" Radiation Chief Technician"};Intermediate therapist "," 41 ":" primary test technician "," 4 ":" test "," 12 ":" physician "," 13 ":" physician "," 23 ":" Intermediate Pharmacist " "14": "deputy chief physician", "15": "chief physician", "22": "primary pharmacist", "2": "acceptable", "21": "primary drug person", "11": "healers", "1": "physician", "35": "the pharmacist director", "34": "Deputy Director pharmacist", "33": "Intermediate competent pharmacist", "32": "primary pharmacists "," 31 ":" Chinese primary scholar "," 62 ":" nurse "," 24 ":" deputy director of pharmacists "," 25 ":" director of pharmacists "," 53 ":" Radiation Chief Technician"};"14": "deputy chief physician", "15": "chief physician", "22": "primary pharmacist", "2": "acceptable", "21": "Primary drug person", "11": "healers", "1": "physician", "35": "the pharmacist director", "34": "Deputy Director pharmacist", "33": "Intermediate competent pharmacist", "32": "primary pharmacists "," 31 ":" Chinese primary scholar "," 62 ":" nurse "," 24 ":" deputy director of pharmacists "," 25 ":" director of pharmacists "," 53 ":" Radiation Chief Technician"};"14": "deputy chief physician", "15": "chief physician", "22": "primary pharmacist", "2": "acceptable", "21": "Primary drug person", "11": "healers", "1": "physician", "35": "the pharmacist director", "34": "Deputy Director pharmacist", "33": "Intermediate competent pharmacist", "32": "primary pharmacists "," 31 ":" Chinese primary scholar "," 62 ":" nurse "," 24 ":" deputy director of pharmacists "," 25 ":" director of pharmacists "," 53 ":" Radiation Chief Technician"};Junior pharmacists "," 31 ":" Chinese primary scholar "," 62 ":" nurse "," 24 ":" deputy director of pharmacists "," 25 ":" director of pharmacists "," 53 ":" radiology technician in charge "};Junior pharmacists "," 31 ":" Chinese primary scholar "," 62 ":" nurse "," 24 ":" deputy director of pharmacists "," 25 ":" director of pharmacists "," 53 ":" radiology technician in charge "};

= name of the person mrdict function category the Formatter (Val, Row) {.
var = mrdict Data category name of the person;.
the try {
IF {(data.hasOwnProperty (Val)!)
return Val;
}
} the catch (error) {
console.error ( error);
return Val;
}
return Data [Val];
}

mrdict title Health Level function = the Formatter (Val, Row) {.
var title Health Level Data = mrdict;.
the try {
IF {(data.hasOwnProperty (Val)!)
return Val;
}
} the catch (error) {
console.error ( error);
return Val;
}
return Data [Val];
}

Guess you like

Origin www.cnblogs.com/xianz666/p/12035005.html