From f48478135272fa9c3b60ac53434097d225820fa3 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期五, 29 三月 2024 16:29:47 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before into master --- src/views/common/ztt-table.vue | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/views/common/ztt-table.vue b/src/views/common/ztt-table.vue index 4996b43..4fc75c2 100644 --- a/src/views/common/ztt-table.vue +++ b/src/views/common/ztt-table.vue @@ -150,6 +150,7 @@ v-on="$listeners" :highlight-current-row="true" :row-key="rowKey" + :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @row-dblclick="dbClickRow" @row-contextmenu="contextMenu" @header-click="headClick" @@ -325,11 +326,16 @@ <template v-else> <template v-if="!item.render"> <template v-if="item.formatter"> - <span v-if="item.isTag" style="text-align: center;"> + <span v-if="item.isTag&&scope.row[item.prop]!=null" style="text-align: center;"> <el-tag style="width:60px;margin: 3px;" :type="scope.row[item.prop] == 0 ? 'success' : 'info'"> <span v-html="item.formatter(scope.row, item, scope.row[item.prop])"></span> </el-tag> </span> + <span v-if="item.isTags&&scope.row[item.prop]!=null" style="text-align: center;"> + <el-tag style="width:60px;margin: 3px;" :type="scope.row[item.prop] == '姝e父' ? 'success' : (scope.row[item.prop] == '寮傚父'?'warning':(scope.row[item.prop] == '杩斾慨'?'danger':'info'))"> + <span v-html="item.formatter(scope.row, item, scope.row[item.prop])"></span> + </el-tag> + </span> <span v-else v-html=" item.formatter(scope.row, item, scope.row[item.prop]) -- Gitblit v1.9.3