...
|
...
|
@@ -15,7 +15,8 @@ |
|
|
<div @mouseenter="mouseFun" @mouseleave="leaveFun" v-if="informationData[0].isDisplay=='1'">
|
|
|
<el-row class="backColor">
|
|
|
<el-col class="padding-10" :style="[borderStlye,tableTitleStyle]" aria-colspan="2">
|
|
|
<a class="link-type" :style="tableTitleStyle" :href="jkAddress.jkUrl" target="_blank">{{informationData[0].name}}</a>
|
|
|
<span class="link-type" :style="tableTitleStyle" @click="goTrend(informationData[0])">{{informationData[0].name}}</span>
|
|
|
<!-- <a class="link-type" :style="tableTitleStyle" :href="jkAddress.jkUrl" target="_blank"></a>-->
|
|
|
<i class="el-icon-info" v-if="visible" @click="resTopo"/>
|
|
|
</el-col>
|
|
|
</el-row>
|
...
|
...
|
@@ -59,6 +60,7 @@ |
|
|
<script>
|
|
|
// import customMenuBox from "../../designerComponents/customMenuBox";//下探组件
|
|
|
import customDialog from "../../designerComponents/customDialog";
|
|
|
import {mapGetters} from "_vuex@3.0.1@vuex";
|
|
|
// import dynamicTableComponents from "../../designerComponents/dynamicTableComponents";
|
|
|
|
|
|
export default {
|
...
|
...
|
@@ -86,7 +88,8 @@ |
|
|
topoSrc: '',
|
|
|
resUrl: 'http://www.baidu.com', //跳转详情页面
|
|
|
topoVisible: false, //资源topo弹框
|
|
|
dialogName: "" //弹框标题
|
|
|
dialogName: "" ,//弹框标题
|
|
|
addTableData:[],//传递的表头设置的内容
|
|
|
}
|
|
|
},
|
|
|
components: {customDialog},//customMenuBox
|
...
|
...
|
@@ -95,7 +98,8 @@ |
|
|
ispreview: Boolean,
|
|
|
},
|
|
|
computed: {
|
|
|
transStyle() {
|
|
|
...mapGetters(['tableHeadInfos']),
|
|
|
transStyle() {
|
|
|
return this.objToOne(this.options);
|
|
|
},
|
|
|
styleObj() {
|
...
|
...
|
@@ -287,30 +291,33 @@ |
|
|
: this.handlerDynamicData(resData.dynamicData, resData.refreshTime);
|
|
|
},
|
|
|
handlerStaticData(data) {
|
|
|
|
|
|
this.informationDataAll = data;
|
|
|
if (this.informationDataAll && this.informationDataAll.length > 0) {
|
|
|
this.informationDataAll.map(item => {
|
|
|
if (typeof (item.value) != 'string') {
|
|
|
item.value = item.value[0].state;
|
|
|
}
|
|
|
item.isDisplay='1';
|
|
|
if(this.tableHeadInfos.length==0) {
|
|
|
item.isDisplay = '1';
|
|
|
}
|
|
|
|
|
|
})
|
|
|
}
|
|
|
let addTableData=[];
|
|
|
this.addTableData=[];
|
|
|
this.informationDataAll.map((item,index)=>{
|
|
|
addTableData.push({
|
|
|
this.addTableData.push({
|
|
|
key:item.code,
|
|
|
name:item.name,
|
|
|
width:"50%",
|
|
|
// isDisplay:item.isDisplay,
|
|
|
isDisplay:item.isDisplay,
|
|
|
state:item.state,
|
|
|
value:item.value
|
|
|
})
|
|
|
})
|
|
|
this.setDisplay();
|
|
|
this.$store.commit('CHANGW_HEAD_INFO', this.addTableData);
|
|
|
this.setDisplay();
|
|
|
|
|
|
this.$store.commit('CHANGW_HEAD_INFO', addTableData);
|
|
|
},
|
|
|
handlerDynamicData(data, refreshTime) {
|
|
|
if (!data) return;
|
...
|
...
|
@@ -333,7 +340,9 @@ |
|
|
if (typeof (item.value) != 'string') {
|
|
|
item.value = item.value[0].state;
|
|
|
}
|
|
|
item.isDisplay='1';
|
|
|
if(this.tableHeadInfos.length==0) {
|
|
|
item.isDisplay = '1';
|
|
|
}
|
|
|
|
|
|
})
|
|
|
}
|
...
|
...
|
@@ -347,11 +356,12 @@ |
|
|
key:item.code,
|
|
|
name:item.name,
|
|
|
width:"50%",
|
|
|
isDisplay:item.isDisplay
|
|
|
isDisplay:item.isDisplay,
|
|
|
state:item.state,
|
|
|
value:item.value
|
|
|
})
|
|
|
})
|
|
|
this.$store.commit('CHANGW_HEAD_INFO', addTableData);
|
|
|
|
|
|
this.hackResetFun();
|
|
|
});
|
|
|
},
|
...
|
...
|
@@ -365,35 +375,15 @@ |
|
|
//设置信息列表数据每一行是否显示
|
|
|
setDisplay() {
|
|
|
let head=this.optionsSetUp.dynamicAddTable;
|
|
|
let arr=[];
|
|
|
head.map(hv=>{
|
|
|
arr.push({
|
|
|
code:hv.key,
|
|
|
name:hv.name,
|
|
|
isDisplay:hv.isDisplay,
|
|
|
state:hv.state,
|
|
|
value:hv.value
|
|
|
})
|
|
|
})
|
|
|
/*this.informationDataAll.map(item=>{
|
|
|
console.log("&&&&&&",item)
|
|
|
arr.map(hv=>{
|
|
|
if(item.code==hv.code){
|
|
|
console.log("***")
|
|
|
item.isDisplay=hv.isDisplay;
|
|
|
}
|
|
|
})
|
|
|
})*/
|
|
|
this.informationDataAll=arr;
|
|
|
/* for(let i=0;i<arr.length;i++){
|
|
|
if(arr[i].code==this.informationDataAll[i].code){
|
|
|
this.informationDataAll[i].isDisplay=arr[i].isDisplay;
|
|
|
|
|
|
for(let i=0;i<head.length;i++){
|
|
|
if(head[i].key==this.informationDataAll[i].code){
|
|
|
this.informationDataAll[i].isDisplay=head[i].isDisplay;
|
|
|
}
|
|
|
}*/
|
|
|
}
|
|
|
if (this.imgStyle.dataNum) {
|
|
|
this.informationData = this.informationDataAll.slice(0, this.imgStyle.dataNum);
|
|
|
}
|
|
|
console.log(" this.informationData",head,arr,this.informationDataAll, this.informationData)
|
|
|
},
|
|
|
pressingTimes() {
|
|
|
this.pressingVisible = true;
|
...
|
...
|
@@ -425,7 +415,19 @@ |
|
|
},
|
|
|
okFunc() {
|
|
|
this.topoVisible = false;
|
|
|
}
|
|
|
},
|
|
|
//打开详情页
|
|
|
goTrend(item) {
|
|
|
let param = {
|
|
|
type:'detail',
|
|
|
data:{
|
|
|
resId: item.resId,
|
|
|
resType: item.resType
|
|
|
}
|
|
|
|
|
|
}
|
|
|
window.parent.postMessage(param, '*')
|
|
|
},
|
|
|
|
|
|
},
|
|
|
}
|
...
|
...
|
@@ -478,6 +480,7 @@ |
|
|
.link-type {
|
|
|
white-space: nowrap;
|
|
|
color: #0d82e9;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
|
|
|
.title-name {
|
...
|
...
|
|