fix: 修复model不显示assetstat的问题
This commit is contained in:
@@ -24,7 +24,6 @@ export default {
|
||||
#app{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
min-width: 1300px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
|
||||
@@ -1010,6 +1010,41 @@ li{
|
||||
.dc-dropdown {
|
||||
z-index: 2952 !important;
|
||||
}
|
||||
.asset-state .cell {
|
||||
height: 38px;
|
||||
}
|
||||
.asset-state .cell>span {
|
||||
display: block;
|
||||
height: 100%;
|
||||
}
|
||||
.dc-asset-states {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
.dc-asset-state {
|
||||
display: inline-block;
|
||||
min-width: 25px;
|
||||
height: 20px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
margin-right: 6px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.dc-asset-state-total {
|
||||
background-color: #1166bb;
|
||||
margin-right: 15px
|
||||
}
|
||||
.dc-asset-state-in {
|
||||
background-color: #90ee90;
|
||||
}
|
||||
.dc-asset-state-out {
|
||||
background-color: orange;
|
||||
}
|
||||
.dc-asset-state-high {
|
||||
background-color: rgba(255, 0, 0, 0.6);
|
||||
}
|
||||
.chart-box-dropdown {
|
||||
width: 519px;
|
||||
}
|
||||
|
||||
@@ -2,34 +2,6 @@
|
||||
.dc {
|
||||
height: 100%;
|
||||
}
|
||||
.dc-asset-states {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
.dc-asset-state {
|
||||
display: inline-block;
|
||||
min-width: 25px;
|
||||
height: 20px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
margin-right: 6px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.dc-asset-state.dc-asset-state-total {
|
||||
background-color: #1166bb;
|
||||
margin-right: 15px
|
||||
}
|
||||
.dc-asset-state-in {
|
||||
background-color: #90ee90;
|
||||
}
|
||||
.dc-asset-state-out {
|
||||
background-color: orange;
|
||||
}
|
||||
.dc-asset-state-high {
|
||||
background-color: rgba(255, 0, 0, 0.6);
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="dc" >
|
||||
@@ -87,6 +59,7 @@
|
||||
v-scrollBar:el-table
|
||||
:height="mainTableHeight"
|
||||
ref="dcTable"
|
||||
:cell-class-name="assetStatClassName"
|
||||
style="width: 100%;">
|
||||
<el-table-column
|
||||
:resizable="false"
|
||||
@@ -290,6 +263,12 @@
|
||||
//悬浮点击空白隐藏
|
||||
this.$refs.elementset.elementsetHide();
|
||||
},
|
||||
assetStatClassName(param) {
|
||||
if (param.column.label == this.$t("config.dc.assets")) {
|
||||
return "asset-state";
|
||||
}
|
||||
return "";
|
||||
},
|
||||
tablelabelEmit(data) {
|
||||
//获取子组件传过来的参数
|
||||
this.$store.commit('setHeaderTable', data);
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="tableData" border :height="$tableHeight.normal" style="width: 100%;" ref="modelTable" class="nz-table" v-scrollBar:el-table>
|
||||
<el-table :data="tableData" border :height="$tableHeight.normal" style="width: 100%;" ref="modelTable" class="nz-table" v-scrollBar:el-table :cell-class-name="assetStatClassName">
|
||||
<el-table-column :resizable="false" v-for="(item, index) in tablelable" v-if="item.show" :width="item.width"
|
||||
:key="`col-${index}`" :label="item.label">
|
||||
<template slot-scope="scope" :column="item">
|
||||
@@ -196,6 +196,12 @@
|
||||
//悬浮点击空白隐藏
|
||||
this.$refs.elementset.elementsetHide();
|
||||
},
|
||||
assetStatClassName(param) {
|
||||
if (param.column.label == this.$t("config.model.assets")) {
|
||||
return "asset-state";
|
||||
}
|
||||
return "";
|
||||
},
|
||||
tablelabelEmit(data) {
|
||||
//获取子组件传过来的参数
|
||||
this.$store.commit('setHeaderTable', data);
|
||||
@@ -249,6 +255,7 @@
|
||||
this.tableData = [];
|
||||
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
||||
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
||||
this.$set(this.searchLabel, "stat", 1);
|
||||
this.$get('model', this.searchLabel).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.tableData = response.data.list;
|
||||
|
||||
Reference in New Issue
Block a user