创建任务显示状态vue

This commit is contained in:
caoqianming 2021-03-15 09:25:24 +08:00
parent f199b9d68f
commit 19ea893549
2 changed files with 6 additions and 1 deletions

View File

@ -52,6 +52,11 @@
<el-tag v-if="scope.row.is_self" type="success"></el-tag>
</template>
</el-table-column>
<el-table-column label="状态">
<template slot-scope="scope">
<el-tag>{{scope.row.state}}</el-tag>
</template>
</el-table-column>
<el-table-column label="截止日期">
<template slot-scope="scope">{{ scope.row.end_date }}</template>
</el-table-column>

View File

@ -28,4 +28,4 @@ class TaskCreateUpdateSerializer(serializers.ModelSerializer):
class TaskListSerializer(serializers.ModelSerializer):
class Meta:
model = Task
fields = ['name', 'is_self', 'end_date', 'note', 'complete_rate']
fields = ['name', 'is_self', 'end_date', 'note', 'complete_rate', 'state']