|
@@ -7,6 +7,10 @@
|
|
|
<TableHeaderCell :label="col.pagename" :filter-options="tableDataFilters[col.pagecode]" :filter-values.sync="filterValues[col.pagecode]" filter-style="arrow" :sortable="!!col.enablesort" :sort-rule.sync="tableDataSortRules[col.pagecode]" />
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="!col.backgroundcolorexpression">{{ scope.row[col.pagecode] }}</span>
|
|
|
+ <div v-else :class="isTrue(scope.row[col.pagecode],col.backgroundcolorexpression )"></div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-if="dealedTableData.length && tableBtns.length" fixed="right" width="240" label="操作">
|
|
|
<template slot-scope="scope">
|
|
@@ -221,6 +225,9 @@ export default {
|
|
|
this.$refs['table']?.doLayout()
|
|
|
},
|
|
|
methods: {
|
|
|
+ isTrue(row,data){
|
|
|
+ return eval(data)
|
|
|
+ },
|
|
|
load () {
|
|
|
this.$emit('load')
|
|
|
},
|
|
@@ -310,6 +317,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+
|
|
|
.table-wrapper {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
@@ -321,6 +329,18 @@ export default {
|
|
|
font-size: 14px;
|
|
|
font-family: Helvetica, "Microsoft YaHei";
|
|
|
letter-spacing: 0;
|
|
|
+ .success{
|
|
|
+ width:15px;
|
|
|
+ height:15px;
|
|
|
+ background:#0fc956;
|
|
|
+ margin-left: calc(50% - 8px);
|
|
|
+ }
|
|
|
+ .error{
|
|
|
+ width:15px;
|
|
|
+ height:15px;
|
|
|
+ background:#c92b0f;
|
|
|
+ margin-left: calc(50% - 8px);
|
|
|
+ }
|
|
|
}
|
|
|
.cell-click {
|
|
|
cursor: pointer;
|