Authored by 鲁尚清

sql 全部参数改为动态传参

@@ -139,7 +139,12 @@ export default { @@ -139,7 +139,12 @@ export default {
139 }, 139 },
140 formData:{ 140 formData:{
141 handler(val){ 141 handler(val){
142 - this.formDataNew=val 142 + this.formDataNew=val,
  143 + this.formDataNew.map(item=>{
  144 + if(!item.isDisplay){
  145 + item.isDisplay=1
  146 + }
  147 + })
143 }, 148 },
144 deep:true 149 deep:true
145 } 150 }
@@ -207,6 +212,11 @@ export default { @@ -207,6 +212,11 @@ export default {
207 setFormData(){ 212 setFormData(){
208 if(this.tableHeadInfos){ 213 if(this.tableHeadInfos){
209 this.formDataNew=this.tableHeadInfos; 214 this.formDataNew=this.tableHeadInfos;
  215 + this.formDataNew.map(item=>{
  216 + if(!item.isDisplay){
  217 + item.isDisplay=1
  218 + }
  219 + })
210 } 220 }
211 }, 221 },
212 //搜索指标 222 //搜索指标
@@ -110,7 +110,7 @@ export default { @@ -110,7 +110,7 @@ export default {
110 for (let i = 0; i < this.userNameList.length; i++) { 110 for (let i = 0; i < this.userNameList.length; i++) {
111 contextData[this.userNameList[i].paramName] = this.userNameList[ 111 contextData[this.userNameList[i].paramName] = this.userNameList[
112 i 112 i
113 - ].sampleItem; 113 + ].sampleItem+'';
114 } 114 }
115 let locationUrl=this.$route.query; 115 let locationUrl=this.$route.query;
116 for(let key in contextData){ 116 for(let key in contextData){
@@ -31,12 +31,12 @@ @@ -31,12 +31,12 @@
31 </el-col> 31 </el-col>
32 <!-- && attrKey.attrKeyVal.includes(item.code)--> 32 <!-- && attrKey.attrKeyVal.includes(item.code)-->
33 </el-row> 33 </el-row>
34 -<!-- <el-row class="basic-item 111" :style="[itemStyle,borderStlyeLast]" v-if="dataLength==informationData.length && informationData.length%2==0"> 34 + <el-row class="basic-item 111" :style="[itemStyle,borderStlyeLast]" v-if="informationData.length%2==0">
35 <el-col class="basic-border basic-item-title basic-flex" :span="10"> 35 <el-col class="basic-border basic-item-title basic-flex" :span="10">
36 </el-col> 36 </el-col>
37 <el-col class="basic-border basic-flex basic-item-content" :span="14"><span></span> 37 <el-col class="basic-border basic-flex basic-item-content" :span="14"><span></span>
38 </el-col> 38 </el-col>
39 - </el-row>--> 39 + </el-row>
40 </div> 40 </div>
41 41
42 </div> 42 </div>
@@ -297,19 +297,19 @@ @@ -297,19 +297,19 @@
297 297
298 }) 298 })
299 } 299 }
300 - this.setDisplay();  
301 -  
302 - this.dataLength=this.informationData.length;  
303 - console.log("this.dataLength",this.dataLength)  
304 let addTableData=[]; 300 let addTableData=[];
305 this.informationDataAll.map((item,index)=>{ 301 this.informationDataAll.map((item,index)=>{
306 addTableData.push({ 302 addTableData.push({
307 key:item.code, 303 key:item.code,
308 name:item.name, 304 name:item.name,
309 width:"50%", 305 width:"50%",
310 - isDisplay:item.isDisplay 306 + // isDisplay:item.isDisplay,
  307 + state:item.state,
  308 + value:item.value
311 }) 309 })
312 }) 310 })
  311 + this.setDisplay();
  312 +
313 this.$store.commit('CHANGW_HEAD_INFO', addTableData); 313 this.$store.commit('CHANGW_HEAD_INFO', addTableData);
314 }, 314 },
315 handlerDynamicData(data, refreshTime) { 315 handlerDynamicData(data, refreshTime) {
@@ -341,7 +341,6 @@ @@ -341,7 +341,6 @@
341 if (this.imgStyle.dataNum) { 341 if (this.imgStyle.dataNum) {
342 this.informationData = this.informationDataAll.slice(0, this.imgStyle.dataNum); 342 this.informationData = this.informationDataAll.slice(0, this.imgStyle.dataNum);
343 } 343 }
344 - this.dataLength=this.informationData.length;  
345 let addTableData=[]; 344 let addTableData=[];
346 this.informationDataAll.map((item,index)=>{ 345 this.informationDataAll.map((item,index)=>{
347 addTableData.push({ 346 addTableData.push({
@@ -370,20 +369,31 @@ @@ -370,20 +369,31 @@
370 head.map(hv=>{ 369 head.map(hv=>{
371 arr.push({ 370 arr.push({
372 code:hv.key, 371 code:hv.key,
373 - isDisplay:hv.isDisplay 372 + name:hv.name,
  373 + isDisplay:hv.isDisplay,
  374 + state:hv.state,
  375 + value:hv.value
374 }) 376 })
375 }) 377 })
376 - this.informationDataAll.map(item=>{ 378 + /*this.informationDataAll.map(item=>{
  379 + console.log("&&&&&&",item)
377 arr.map(hv=>{ 380 arr.map(hv=>{
378 - if(item.code==hv.key){ 381 + if(item.code==hv.code){
  382 + console.log("***")
379 item.isDisplay=hv.isDisplay; 383 item.isDisplay=hv.isDisplay;
380 } 384 }
381 }) 385 })
382 - }) 386 + })*/
  387 + this.informationDataAll=arr;
  388 + /* for(let i=0;i<arr.length;i++){
  389 + if(arr[i].code==this.informationDataAll[i].code){
  390 + this.informationDataAll[i].isDisplay=arr[i].isDisplay;
  391 + }
  392 + }*/
383 if (this.imgStyle.dataNum) { 393 if (this.imgStyle.dataNum) {
384 this.informationData = this.informationDataAll.slice(0, this.imgStyle.dataNum); 394 this.informationData = this.informationDataAll.slice(0, this.imgStyle.dataNum);
385 } 395 }
386 - console.log(" this.informationData", this.informationData) 396 + console.log(" this.informationData",head,arr,this.informationDataAll, this.informationData)
387 }, 397 },
388 pressingTimes() { 398 pressingTimes() {
389 this.pressingVisible = true; 399 this.pressingVisible = true;
@@ -299,22 +299,24 @@ export default { @@ -299,22 +299,24 @@ export default {
299 getEchartData(val) { 299 getEchartData(val) {
300 const data = this.queryEchartsData(val); 300 const data = this.queryEchartsData(val);
301 data.then(res => { 301 data.then(res => {
302 - if(this.optionsData.dynamicData.contextData.isMore){  
303 - console.log("all")  
304 - this.listAll=res;  
305 - this.loadingAll = false;  
306 - if (this.listAll && this.listAll.length > 0) {  
307 - this.totalAll = this.listAll[0].lineCount;  
308 - }  
309 - }else{ 302 + // if(this.optionsData.dynamicData.contextData.isMore){
  303 + // console.log("all")
  304 + // this.listAll=res;
  305 + // this.loadingAll = false;
  306 + // this.loading = false;
  307 + // if (this.listAll && this.listAll.length > 0) {
  308 + // this.totalAll = this.listAll[0].lineCount;
  309 + // }
  310 + // }else{
310 console.log("111") 311 console.log("111")
311 312
312 this.list = res; 313 this.list = res;
313 this.loading = false; 314 this.loading = false;
  315 + this.loadingAll = false;
314 if (this.list && this.list.length > 0) { 316 if (this.list && this.list.length > 0) {
315 this.total = this.list[0].lineCount; 317 this.total = this.list[0].lineCount;
316 } 318 }
317 - } 319 + // }
318 320
319 321
320 this.hackResetFun(); 322 this.hackResetFun();
@@ -400,34 +402,36 @@ export default { @@ -400,34 +402,36 @@ export default {
400 let serviceTop = 44; 402 let serviceTop = 44;
401 403
402 let hotelTop = 344; 404 let hotelTop = 344;
  405 + if(e.target.scrollTop){
  406 + if (e.target.scrollTop > 44 && e.target.scrollTop < 344) {
403 407
404 - if (e.target.scrollTop > 44 && e.target.scrollTop < 344) { 408 + this.selectNum = 0;
  409 + }
405 410
406 - this.selectNum = 0;  
407 - } 411 + if (e.target.scrollTop > 344) {
408 412
409 - if (e.target.scrollTop > 344) { 413 + this.selectNum = 1;
410 414
411 - this.selectNum = 1; 415 + }
  416 + let scrollHeight=e.target.documentElement.scrollTop;
412 417
413 - }  
414 - let scrollHeight=e.target.documentElement.scrollTop; 418 + if (self != top) {
  419 + //嵌入到监控系统iframe中弹框位置样式
  420 + if(scrollHeight<600){
  421 + // this.marginStyle+="margin-top:"+(110)+'px;';
415 422
416 - if (self != top) {  
417 - //嵌入到监控系统iframe中弹框位置样式  
418 - if(scrollHeight<600){  
419 - // this.marginStyle+="margin-top:"+(110)+'px;'; 423 + }else{
  424 + // this.marginStyle+="margin-top:"+(230)+'px;';
420 425
421 - }else{  
422 - // this.marginStyle+="margin-top:"+(230)+'px;'; 426 + }
  427 + this.marginStyle+="top:"+(scrollHeight+60)+'px;';
423 428
  429 + }else{
  430 + //ajreport中弹框位置样式
  431 + this.marginStyle+="top:"+(scrollHeight)+'px;';
424 } 432 }
425 - this.marginStyle+="top:"+(scrollHeight+60)+'px;';  
426 -  
427 - }else{  
428 - //ajreport中弹框位置样式  
429 - this.marginStyle+="top:"+(scrollHeight)+'px;';  
430 } 433 }
  434 +
431 }, 435 },
432 //打开详情页 436 //打开详情页
433 goTrend(item, itemChildKey) { 437 goTrend(item, itemChildKey) {
@@ -453,7 +457,6 @@ export default { @@ -453,7 +457,6 @@ export default {
453 let limit = 30; 457 let limit = 30;
454 let page = parseInt(this.currentPage - 1) * limit; 458 let page = parseInt(this.currentPage - 1) * limit;
455 //改变参数值-月季度年,重新加载动态数据--待测 459 //改变参数值-月季度年,重新加载动态数据--待测
456 - console.log("&&&&&&&&&",page,limit)  
457 this.optionsData.dynamicData.contextData.page = page; 460 this.optionsData.dynamicData.contextData.page = page;
458 this.optionsData.dynamicData.contextData.limit = 30; 461 this.optionsData.dynamicData.contextData.limit = 30;
459 this.optionsData.dynamicData.contextData.isMore = true; 462 this.optionsData.dynamicData.contextData.isMore = true;