...
|
...
|
@@ -12,7 +12,7 @@ |
|
|
</div>
|
|
|
<!-- <dynamicTableComponents :formData="dtInformationData"></dynamicTableComponents>-->
|
|
|
<div class="basic-ul-right" :style="borderStyleF" >
|
|
|
<div v-if="informationDataAll[0].isDisplay=='1'" >
|
|
|
<div v-if="optionsSetUp.isTableTitle" >
|
|
|
<el-row class="backColor" :style="bodyTitleStyle">
|
|
|
<el-col class="padding-10" :style="[tableTitleStyle]" aria-colspan="2">
|
|
|
<span v-if="!titleName" class="link-type" :style="tableTitleStyle" @click="goTrend(informationDataAll[0])">{{informationDataAll[0].name}}</span>
|
...
|
...
|
@@ -44,14 +44,16 @@ |
|
|
</div>
|
|
|
<div class="basic-tbody basic-border-wrap" :style="wrapStyle">
|
|
|
<el-row class="basic-item" :style="itemStyle" v-if="item.isDisplay=='1' && (titleName?index>=0:index>0)" v-for="(item,index) in informationData" :key="index">
|
|
|
<!-- <el-col :style="headStyle" v-if="attrKey.attrKeyVal.indexOf(item.code)>0 && index>0" class="basic-border basic-item-title basic-flex backColor" :span="10">-->
|
|
|
<!-- <el-col :style="headStyle" v-if="attrKey.attrKeyVal.indexOf(item.nameCode)>0 && index>0" class="basic-border basic-item-title basic-flex backColor" :span="10">-->
|
|
|
<el-col :style="[headStyle,borderStlye,lineHeightStyle]" v-if="(titleName?index>=0:index>0)" class="basic-border basic-item-title basic-flex backColor" :span="10">
|
|
|
{{ item.name }}
|
|
|
</el-col>
|
|
|
<!-- <el-col :style="bodyStyle" v-if="attrKey.attrKeyVal.indexOf(item.code)>0 && index>0 " class="basic-border basic-flex basic-item-content" :span="14"><span>{{ item.value }}</span>-->
|
|
|
<el-col :style="[bodyStyle,borderStlye,lineHeightStyle,borderStyleRight(index)]" v-if="(titleName?index>=0:index>0) " class="basic-border basic-flex basic-item-content" :span="14"><span>{{ item.value }}</span>
|
|
|
<!-- <el-col :style="bodyStyle" v-if="attrKey.attrKeyVal.indexOf(item.nameCode)>0 && index>0 " class="basic-border basic-flex basic-item-content" :span="14"><span>{{ item.value }}</span>-->
|
|
|
<el-col :style="[bodyStyle,borderStlye,lineHeightStyle,borderStyleRight(index)]" v-if="(titleName?index>=0:index>0) " class="basic-border basic-flex basic-item-content" :span="14">
|
|
|
<span :class="{'link-type':item.nameCode=='resName'}" @click="goTrend({resId:resId,resType:resType})">{{ item.value }}</span>
|
|
|
|
|
|
</el-col>
|
|
|
<!-- && attrKey.attrKeyVal.includes(item.code)-->
|
|
|
<!-- && attrKey.attrKeyVal.includes(item.nameCode)-->
|
|
|
</el-row>
|
|
|
<el-row class="basic-item 111" :style="[itemStyle,borderStlyeLast]" v-if="optionsSetUp.isTowColumn && informationData.length%2==0">
|
|
|
<el-col class="basic-border basic-item-title basic-flex" :span="10">
|
...
|
...
|
@@ -95,7 +97,7 @@ |
|
|
optionsSetUp: {},
|
|
|
optionsPosition: {},
|
|
|
optionsData: {},
|
|
|
informationData: [{name:'',code:''}],
|
|
|
informationData: [{name:'',nameCode:''}],
|
|
|
informationDataAll: [{display:1}],
|
|
|
dataLength:0,
|
|
|
tableDate: [],
|
...
|
...
|
@@ -324,7 +326,7 @@ |
|
|
const resData = this.optionsData;
|
|
|
resData.dataType == "staticData"
|
|
|
? this.handlerStaticData(resData.staticData)
|
|
|
: this.handlerDynamicData(resData.dynamicData, resData.refreshTime);
|
|
|
: this.handlerDynamicData(resData.dynamicData, resData.refreshTime,resData.isRefresh);
|
|
|
},
|
|
|
handlerStaticData(data) {
|
|
|
|
...
|
...
|
@@ -343,7 +345,7 @@ |
|
|
this.addTableData=[];
|
|
|
this.informationDataAll.map((item,index)=>{
|
|
|
this.addTableData.push({
|
|
|
key:item.code,
|
|
|
key:item.nameCode,
|
|
|
name:item.name,
|
|
|
width:"50%",
|
|
|
isDisplay:item.isDisplay,
|
...
|
...
|
@@ -355,9 +357,9 @@ |
|
|
this.setDisplay();
|
|
|
|
|
|
},
|
|
|
handlerDynamicData(data, refreshTime) {
|
|
|
handlerDynamicData(data, refreshTime,isRefresh) {
|
|
|
if (!data) return;
|
|
|
if (this.ispreview) {
|
|
|
if (this.ispreview && isRefresh) {
|
|
|
this.getEchartData(data);
|
|
|
this.flagInter = setInterval(() => {
|
|
|
this.getEchartData(data);
|
...
|
...
|
@@ -369,35 +371,38 @@ |
|
|
getEchartData(val) {
|
|
|
const data = this.queryEchartsData(val);
|
|
|
data.then(res => {
|
|
|
if (res && res[0].code == 0){
|
|
|
if (res && res[0].code == 0){
|
|
|
this.informationDataAll = res[0].data;
|
|
|
if (this.informationDataAll && this.informationDataAll.length > 0) {
|
|
|
this.informationDataAll.map(item => {
|
|
|
if (typeof (item.value) != 'string') {
|
|
|
item.value =item.value[0].state;
|
|
|
}
|
|
|
if(this.tableHeadInfos.length==0) {
|
|
|
item.isDisplay = '1';
|
|
|
}
|
|
|
|
|
|
})
|
|
|
}else if(res && res.length>0){
|
|
|
this.informationDataAll=res;
|
|
|
}
|
|
|
|
|
|
if (this.informationDataAll && this.informationDataAll.length > 0) {
|
|
|
this.informationDataAll.map(item => {
|
|
|
if (item.value && typeof (item.value) != 'string' && item.value[0]) {
|
|
|
item.value =item.value[0].state;
|
|
|
}
|
|
|
if(this.tableHeadInfos.length==0) {
|
|
|
item.isDisplay = '1';
|
|
|
}
|
|
|
this.setDisplay();
|
|
|
let addTableData=[];
|
|
|
this.informationDataAll.map((item,index)=>{
|
|
|
addTableData.push({
|
|
|
key:item.code,
|
|
|
name:item.name,
|
|
|
width:"50%",
|
|
|
isDisplay:item.isDisplay,
|
|
|
state:item.state,
|
|
|
value:item.value
|
|
|
})
|
|
|
})
|
|
|
|
|
|
this.$store.commit('CHANGW_HEAD_INFO', addTableData);
|
|
|
this.hackResetFun();
|
|
|
}
|
|
|
|
|
|
})
|
|
|
}
|
|
|
this.setDisplay();
|
|
|
let addTableData=[];
|
|
|
this.informationDataAll.map((item,index)=>{
|
|
|
addTableData.push({
|
|
|
key:item.nameCode,
|
|
|
name:item.name,
|
|
|
width:"50%",
|
|
|
isDisplay:item.isDisplay,
|
|
|
state:item.state,
|
|
|
value:item.value
|
|
|
})
|
|
|
})
|
|
|
|
|
|
this.$store.commit('CHANGW_HEAD_INFO', addTableData);
|
|
|
this.hackResetFun();
|
|
|
|
|
|
|
|
|
});
|
...
|
...
|
@@ -412,9 +417,8 @@ |
|
|
//设置信息列表数据每一行是否显示
|
|
|
setDisplay() {
|
|
|
let head=this.optionsSetUp.dynamicAddTable;
|
|
|
|
|
|
for(let i=0;i<head.length;i++){
|
|
|
if(head[i].key==this.informationDataAll[i].code){
|
|
|
if(this.informationDataAll[i] && head[i].key==this.informationDataAll[i].nameCode){
|
|
|
this.informationDataAll[i].isDisplay=head[i].isDisplay;
|
|
|
}
|
|
|
}
|
...
|
...
|
|