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 178  
179 179 function lasyCarNo(node, tree) {
180 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 182 $.getJSON("/video/tree/carNo/" + node.data.code, function (data) {
183 183 if (treeData) {
184 184 $.each(treeData, function (index, d) {
... ... @@ -225,20 +225,23 @@ function layCarNoChildren(oldData, node, data, result) {
225 225  
226 226 function layCarNoConcatArr(d, node, data, result) {
227 227 if (d.id === node.data.id && d.type === node.data.type) {
228   - d.children = [];
  228 +
229 229  
230 230 layDataClose(treeData);
231 231 layDataParent(d,treeData,treeData);
232 232 d.spread = true;
233 233 d.initChild= true;
234   - console.log(treeData)
  234 +
235 235 if (result) {
236 236 $.each(data, function (index, d1) {
237 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 245 if (result) {
243 246 d.wvpLiveBroadcast = result.wvpLiveBroadcast;
244 247 }
... ...