[AppleScript] 纯文本查看 复制代码 debugger;
if(this.page.parameters === undefined){
return "没有传入参数"
}else{
var id = this.page.parameters.formobject.id;
var schoolcode = this.page.parameters.formobject.parentid;
var parentid = this.page.parameters.formobject.parentid;
var label = this.page.parameters.formobject.label;
var level = this.page.parameters.formobject.level;
//表示父节点
if (level == 1) {
this.form.get("schoolname").node.set("html",label);
var view = this.form.get("viewbuilding");
var filterList = [];
if (id != "") {
filterList.push({
"logic": "and",
"path": "parentschoolname",
"comparison": "like",
"value": id,
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": { "code": "return \"" + id + "\";", "html": "return \"" + id + "\";" },
"otherValue": ""
});
}
view.json.loadView = "yes";
view.json.filterList = filterList;
this.form.get("viewbuilding").reload();
document.getElementById('div_4').style.display = 'block';
document.getElementById('div_1').style.display = 'none';
} else if (level==2) {
//表示子节点
this.form.get("buildname").node.set("html",label);
this.data.parentdocid = id;
this.data.schoolcode = schoolcode;
this.data.fieldname = label;
var view = this.form.get("viewsite");
var filterList = [];
if (parentid != "") {
//过滤出对应学校的建筑信息
filterList.push({
"logic": "and",
"path": "schoolcode",
"comparison": "like",
"value": parentid,
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": { "code": "return \"" + parentid + "\";", "html": "return \"" + parentid + "\";" },
"otherValue": ""
});
//过滤出对应学校下建筑楼对应的信息
filterList.push({
"logic": "and",
"path": "parentdocid",
"comparison": "like",
"value": id,
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": { "code": "return \"" + id + "\";", "html": "return \"" + id + "\";" },
"otherValue": ""
});
view.json.loadView = "yes";
view.json.filterList = filterList;
this.form.get("viewsite").reload();
document.getElementById('div_4').style.display = 'none';
document.getElementById('div_1').style.display = 'block';
}
}
}
|