<select class="form-control" id="officeSel" name="officeSel"></select>
// 工作量页面根据处室查询,因此定义处室下拉列表 lenian 2018 06 29
function officeSel(){
// 定义json数组类型字符串取值(理由:只有运输、货运、机务处有文件工作量,表名:SECURITY_PORTRAIT_PORTFOLIO)
var jsonStr = '[{"ID":102,"NAME":"运输处"},{"ID":103,"NAME":"货运处"},{"ID":1056,"NAME":"机务处"}]';
var data = JSON.parse(jsonStr);//转换为json对象
//alert(JSON.stringify(data));
var officeSel = $("#officeSel");
$("option", $("#officeSel")).remove();
//officeSel.append("<option>请选择业务处室</option>");
var officeid = getUrlParam("officeid");
$(data).each(function() {
officeSel.append("<option value='" + this.ID + "'" + (officeid == this.ID ? " selected" : "") + ">" + this.NAME + "</option>");
});
}