|
@@ -15,7 +15,8 @@ |
|
@@ -15,7 +15,8 @@ |
15
|
<div @mouseenter="mouseFun" @mouseleave="leaveFun" v-if="informationData[0].isDisplay=='1'">
|
15
|
<div @mouseenter="mouseFun" @mouseleave="leaveFun" v-if="informationData[0].isDisplay=='1'">
|
16
|
<el-row class="backColor">
|
16
|
<el-row class="backColor">
|
17
|
<el-col class="padding-10" :style="[borderStlye,tableTitleStyle]" aria-colspan="2">
|
17
|
<el-col class="padding-10" :style="[borderStlye,tableTitleStyle]" aria-colspan="2">
|
18
|
- <a class="link-type" :style="tableTitleStyle" :href="jkAddress.jkUrl" target="_blank">{{informationData[0].name}}</a>
|
18
|
+ <span class="link-type" :style="tableTitleStyle" @click="goTrend(informationData[0])">{{informationData[0].name}}</span>
|
|
|
19
|
+<!-- <a class="link-type" :style="tableTitleStyle" :href="jkAddress.jkUrl" target="_blank"></a>-->
|
19
|
<i class="el-icon-info" v-if="visible" @click="resTopo"/>
|
20
|
<i class="el-icon-info" v-if="visible" @click="resTopo"/>
|
20
|
</el-col>
|
21
|
</el-col>
|
21
|
</el-row>
|
22
|
</el-row>
|
|
@@ -59,6 +60,7 @@ |
|
@@ -59,6 +60,7 @@ |
59
|
<script>
|
60
|
<script>
|
60
|
// import customMenuBox from "../../designerComponents/customMenuBox";//下探组件
|
61
|
// import customMenuBox from "../../designerComponents/customMenuBox";//下探组件
|
61
|
import customDialog from "../../designerComponents/customDialog";
|
62
|
import customDialog from "../../designerComponents/customDialog";
|
|
|
63
|
+ import {mapGetters} from "_vuex@3.0.1@vuex";
|
62
|
// import dynamicTableComponents from "../../designerComponents/dynamicTableComponents";
|
64
|
// import dynamicTableComponents from "../../designerComponents/dynamicTableComponents";
|
63
|
|
65
|
|
64
|
export default {
|
66
|
export default {
|
|
@@ -86,7 +88,8 @@ |
|
@@ -86,7 +88,8 @@ |
86
|
topoSrc: '',
|
88
|
topoSrc: '',
|
87
|
resUrl: 'http://www.baidu.com', //跳转详情页面
|
89
|
resUrl: 'http://www.baidu.com', //跳转详情页面
|
88
|
topoVisible: false, //资源topo弹框
|
90
|
topoVisible: false, //资源topo弹框
|
89
|
- dialogName: "" //弹框标题
|
91
|
+ dialogName: "" ,//弹框标题
|
|
|
92
|
+ addTableData:[],//传递的表头设置的内容
|
90
|
}
|
93
|
}
|
91
|
},
|
94
|
},
|
92
|
components: {customDialog},//customMenuBox
|
95
|
components: {customDialog},//customMenuBox
|
|
@@ -95,7 +98,8 @@ |
|
@@ -95,7 +98,8 @@ |
95
|
ispreview: Boolean,
|
98
|
ispreview: Boolean,
|
96
|
},
|
99
|
},
|
97
|
computed: {
|
100
|
computed: {
|
98
|
- transStyle() {
|
101
|
+ ...mapGetters(['tableHeadInfos']),
|
|
|
102
|
+ transStyle() {
|
99
|
return this.objToOne(this.options);
|
103
|
return this.objToOne(this.options);
|
100
|
},
|
104
|
},
|
101
|
styleObj() {
|
105
|
styleObj() {
|
|
@@ -287,30 +291,33 @@ |
|
@@ -287,30 +291,33 @@ |
287
|
: this.handlerDynamicData(resData.dynamicData, resData.refreshTime);
|
291
|
: this.handlerDynamicData(resData.dynamicData, resData.refreshTime);
|
288
|
},
|
292
|
},
|
289
|
handlerStaticData(data) {
|
293
|
handlerStaticData(data) {
|
|
|
294
|
+
|
290
|
this.informationDataAll = data;
|
295
|
this.informationDataAll = data;
|
291
|
if (this.informationDataAll && this.informationDataAll.length > 0) {
|
296
|
if (this.informationDataAll && this.informationDataAll.length > 0) {
|
292
|
this.informationDataAll.map(item => {
|
297
|
this.informationDataAll.map(item => {
|
293
|
if (typeof (item.value) != 'string') {
|
298
|
if (typeof (item.value) != 'string') {
|
294
|
item.value = item.value[0].state;
|
299
|
item.value = item.value[0].state;
|
295
|
}
|
300
|
}
|
296
|
- item.isDisplay='1';
|
301
|
+ if(this.tableHeadInfos.length==0) {
|
|
|
302
|
+ item.isDisplay = '1';
|
|
|
303
|
+ }
|
297
|
|
304
|
|
298
|
})
|
305
|
})
|
299
|
}
|
306
|
}
|
300
|
- let addTableData=[];
|
307
|
+ this.addTableData=[];
|
301
|
this.informationDataAll.map((item,index)=>{
|
308
|
this.informationDataAll.map((item,index)=>{
|
302
|
- addTableData.push({
|
309
|
+ this.addTableData.push({
|
303
|
key:item.code,
|
310
|
key:item.code,
|
304
|
name:item.name,
|
311
|
name:item.name,
|
305
|
width:"50%",
|
312
|
width:"50%",
|
306
|
- // isDisplay:item.isDisplay,
|
313
|
+ isDisplay:item.isDisplay,
|
307
|
state:item.state,
|
314
|
state:item.state,
|
308
|
value:item.value
|
315
|
value:item.value
|
309
|
})
|
316
|
})
|
310
|
})
|
317
|
})
|
311
|
- this.setDisplay();
|
318
|
+ this.$store.commit('CHANGW_HEAD_INFO', this.addTableData);
|
|
|
319
|
+ this.setDisplay();
|
312
|
|
320
|
|
313
|
- this.$store.commit('CHANGW_HEAD_INFO', addTableData);
|
|
|
314
|
},
|
321
|
},
|
315
|
handlerDynamicData(data, refreshTime) {
|
322
|
handlerDynamicData(data, refreshTime) {
|
316
|
if (!data) return;
|
323
|
if (!data) return;
|
|
@@ -333,7 +340,9 @@ |
|
@@ -333,7 +340,9 @@ |
333
|
if (typeof (item.value) != 'string') {
|
340
|
if (typeof (item.value) != 'string') {
|
334
|
item.value = item.value[0].state;
|
341
|
item.value = item.value[0].state;
|
335
|
}
|
342
|
}
|
336
|
- item.isDisplay='1';
|
343
|
+ if(this.tableHeadInfos.length==0) {
|
|
|
344
|
+ item.isDisplay = '1';
|
|
|
345
|
+ }
|
337
|
|
346
|
|
338
|
})
|
347
|
})
|
339
|
}
|
348
|
}
|
|
@@ -347,11 +356,12 @@ |
|
@@ -347,11 +356,12 @@ |
347
|
key:item.code,
|
356
|
key:item.code,
|
348
|
name:item.name,
|
357
|
name:item.name,
|
349
|
width:"50%",
|
358
|
width:"50%",
|
350
|
- isDisplay:item.isDisplay
|
359
|
+ isDisplay:item.isDisplay,
|
|
|
360
|
+ state:item.state,
|
|
|
361
|
+ value:item.value
|
351
|
})
|
362
|
})
|
352
|
})
|
363
|
})
|
353
|
this.$store.commit('CHANGW_HEAD_INFO', addTableData);
|
364
|
this.$store.commit('CHANGW_HEAD_INFO', addTableData);
|
354
|
-
|
|
|
355
|
this.hackResetFun();
|
365
|
this.hackResetFun();
|
356
|
});
|
366
|
});
|
357
|
},
|
367
|
},
|
|
@@ -365,35 +375,15 @@ |
|
@@ -365,35 +375,15 @@ |
365
|
//设置信息列表数据每一行是否显示
|
375
|
//设置信息列表数据每一行是否显示
|
366
|
setDisplay() {
|
376
|
setDisplay() {
|
367
|
let head=this.optionsSetUp.dynamicAddTable;
|
377
|
let head=this.optionsSetUp.dynamicAddTable;
|
368
|
- let arr=[];
|
|
|
369
|
- head.map(hv=>{
|
|
|
370
|
- arr.push({
|
|
|
371
|
- code:hv.key,
|
|
|
372
|
- name:hv.name,
|
|
|
373
|
- isDisplay:hv.isDisplay,
|
|
|
374
|
- state:hv.state,
|
|
|
375
|
- value:hv.value
|
|
|
376
|
- })
|
|
|
377
|
- })
|
|
|
378
|
- /*this.informationDataAll.map(item=>{
|
|
|
379
|
- console.log("&&&&&&",item)
|
|
|
380
|
- arr.map(hv=>{
|
|
|
381
|
- if(item.code==hv.code){
|
|
|
382
|
- console.log("***")
|
|
|
383
|
- item.isDisplay=hv.isDisplay;
|
|
|
384
|
- }
|
|
|
385
|
- })
|
|
|
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;
|
378
|
+
|
|
|
379
|
+ for(let i=0;i<head.length;i++){
|
|
|
380
|
+ if(head[i].key==this.informationDataAll[i].code){
|
|
|
381
|
+ this.informationDataAll[i].isDisplay=head[i].isDisplay;
|
391
|
}
|
382
|
}
|
392
|
- }*/
|
383
|
+ }
|
393
|
if (this.imgStyle.dataNum) {
|
384
|
if (this.imgStyle.dataNum) {
|
394
|
this.informationData = this.informationDataAll.slice(0, this.imgStyle.dataNum);
|
385
|
this.informationData = this.informationDataAll.slice(0, this.imgStyle.dataNum);
|
395
|
}
|
386
|
}
|
396
|
- console.log(" this.informationData",head,arr,this.informationDataAll, this.informationData)
|
|
|
397
|
},
|
387
|
},
|
398
|
pressingTimes() {
|
388
|
pressingTimes() {
|
399
|
this.pressingVisible = true;
|
389
|
this.pressingVisible = true;
|
|
@@ -425,7 +415,19 @@ |
|
@@ -425,7 +415,19 @@ |
425
|
},
|
415
|
},
|
426
|
okFunc() {
|
416
|
okFunc() {
|
427
|
this.topoVisible = false;
|
417
|
this.topoVisible = false;
|
428
|
- }
|
418
|
+ },
|
|
|
419
|
+ //打开详情页
|
|
|
420
|
+ goTrend(item) {
|
|
|
421
|
+ let param = {
|
|
|
422
|
+ type:'detail',
|
|
|
423
|
+ data:{
|
|
|
424
|
+ resId: item.resId,
|
|
|
425
|
+ resType: item.resType
|
|
|
426
|
+ }
|
|
|
427
|
+
|
|
|
428
|
+ }
|
|
|
429
|
+ window.parent.postMessage(param, '*')
|
|
|
430
|
+ },
|
429
|
|
431
|
|
430
|
},
|
432
|
},
|
431
|
}
|
433
|
}
|
|
@@ -478,6 +480,7 @@ |
|
@@ -478,6 +480,7 @@ |
478
|
.link-type {
|
480
|
.link-type {
|
479
|
white-space: nowrap;
|
481
|
white-space: nowrap;
|
480
|
color: #0d82e9;
|
482
|
color: #0d82e9;
|
|
|
483
|
+ cursor: pointer;
|
481
|
}
|
484
|
}
|
482
|
|
485
|
|
483
|
.title-name {
|
486
|
.title-name {
|