Commit 2ad30a03dc63383c3b11e2ba142679dbc5bc6b6b

Authored by liujun001
1 parent 5dbff3d0

通过URL传参访问车辆和通道信息

src/main/resources/static/other/video/video.js
@@ -178,7 +178,7 @@ function treeClickBack(fun){ @@ -178,7 +178,7 @@ function treeClickBack(fun){
178 178
179 function lasyCarNo(node, tree) { 179 function lasyCarNo(node, tree) {
180 if (isEmpty(node.initChild) || false === node.initChild) { 180 if (isEmpty(node.initChild) || false === node.initChild) {
181 - if (node.data.type < 200) { 181 + if (node.data.type < 200 && node.data.type > 0) {
182 $.getJSON("/video/tree/carNo/" + node.data.code, function (data) { 182 $.getJSON("/video/tree/carNo/" + node.data.code, function (data) {
183 if (treeData) { 183 if (treeData) {
184 $.each(treeData, function (index, d) { 184 $.each(treeData, function (index, d) {
@@ -225,20 +225,23 @@ function layCarNoChildren(oldData, node, data, result) { @@ -225,20 +225,23 @@ function layCarNoChildren(oldData, node, data, result) {
225 225
226 function layCarNoConcatArr(d, node, data, result) { 226 function layCarNoConcatArr(d, node, data, result) {
227 if (d.id === node.data.id && d.type === node.data.type) { 227 if (d.id === node.data.id && d.type === node.data.type) {
228 - d.children = []; 228 +
229 229
230 layDataClose(treeData); 230 layDataClose(treeData);
231 layDataParent(d,treeData,treeData); 231 layDataParent(d,treeData,treeData);
232 d.spread = true; 232 d.spread = true;
233 d.initChild= true; 233 d.initChild= true;
234 - console.log(treeData) 234 +
235 if (result) { 235 if (result) {
236 $.each(data, function (index, d1) { 236 $.each(data, function (index, d1) {
237 d1.wvpLiveBroadcast = result.wvpLiveBroadcast; 237 d1.wvpLiveBroadcast = result.wvpLiveBroadcast;
238 }) 238 })
239 } 239 }
240 -  
241 - d.children = d.children.concat(data); 240 + if( data){
  241 + d.children = data;
  242 + }
  243 + // d.children = [];
  244 + // d.children = d.children.concat(data);
242 if (result) { 245 if (result) {
243 d.wvpLiveBroadcast = result.wvpLiveBroadcast; 246 d.wvpLiveBroadcast = result.wvpLiveBroadcast;
244 } 247 }