fix: 修复model不显示assetstat的问题

This commit is contained in:
陈劲松
2020-04-16 18:49:55 +08:00
parent 8b7e173b7c
commit 5fe329e576
4 changed files with 50 additions and 30 deletions

View File

@@ -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;