change - sensorInfo页面添加编辑选择监控单元500问题处理

main
wenjy 3 years ago
parent 521a677b6f
commit ea6171386a

@ -98,7 +98,7 @@
/* 选择监控单元树 */ /* 选择监控单元树 */
function selectMonitorTree() { function selectMonitorTree() {
var deptId = $.common.isEmpty($("#monitorUnitId").val()) ? "100" : $("#monitorUnitId").val(); var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
var url = ctx + "base/monitorUnitInfo/selectMonitorUnitInfoTree/" + deptId; var url = ctx + "base/monitorUnitInfo/selectMonitorUnitInfoTree/" + deptId;
var options = { var options = {
title: '选择部门', title: '选择部门',
@ -122,6 +122,7 @@
var str = localStorage.getItem(cp_keynum); var str = localStorage.getItem(cp_keynum);
var num = JSON.parse(str); var num = JSON.parse(str);
if(num != null) { if(num != null) {
alert(num.cp_num_value.substring(0, num.cp_num_value.indexOf('/')));
$("#treeId").val(num.cp_num_value.substring(0, num.cp_num_value.indexOf('/'))); $("#treeId").val(num.cp_num_value.substring(0, num.cp_num_value.indexOf('/')));
$("#treeName").val(num.cp_num_value.substring(num.cp_num_value.indexOf('/')+1,num.cp_num_value.length )); $("#treeName").val(num.cp_num_value.substring(num.cp_num_value.indexOf('/')+1,num.cp_num_value.length ));

@ -95,7 +95,7 @@
/* 选择监控单元树 */ /* 选择监控单元树 */
function selectMonitorTree() { function selectMonitorTree() {
var deptId = $.common.isEmpty($("#monitorUnitId").val()) ? "100" : $("#monitorUnitId").val(); var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
var url = ctx + "base/monitorUnitInfo/selectMonitorUnitInfoTree/" + deptId; var url = ctx + "base/monitorUnitInfo/selectMonitorUnitInfoTree/" + deptId;
var options = { var options = {
title: '选择部门', title: '选择部门',

@ -264,13 +264,14 @@
function zOnClick(event, treeId, treeNode) { function zOnClick(event, treeId, treeNode) {
$("#monitorunitId").val(treeNode.id); $("#monitorunitId").val(treeNode.id);
$.table.search(); $.table.search();
initTable(treeNode.id);
var num = new Object; var num = new Object;
num.cp_keynum = "key_num"; num.cp_keynum = "key_num";
num.cp_num_value = treeNode.id + "/" + treeNode.name; num.cp_num_value = treeNode.id + "/" + treeNode.name;
var str = JSON.stringify(num); // 将对象转换为字符串 var str = JSON.stringify(num); // 将对象转换为字符串
localStorage.setItem(num.cp_keynum, str); localStorage.setItem(num.cp_keynum, str);
//initTable(treeNode.id);
} }
} }

Loading…
Cancel
Save