Browse Source

项目、任务列表状态列展示

master
小久哥 3 years ago
parent
commit
86b72b77f0
  1. 9
      src/views/farm/project/index.vue
  2. 11
      src/views/farm/task/index.vue

9
src/views/farm/project/index.vue

@ -53,8 +53,15 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list" stripe >
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="项目状态" align="center" prop="state" >
<template slot-scope="scope">
<el-button type="success" v-if="scope.row.state == 0">计划中</el-button>
<el-button type="success" v-if="scope.row.state == 1">进行中</el-button>
<el-button type="success" v-if="scope.row.state == 2">已完成</el-button>
</template>
</el-table-column>
<el-table-column label="项目名" align="center" prop="name" />
<el-table-column label="项目内容" align="center" prop="content" />
<!-- <el-table-column label="项目内容" align="center" prop="content" /> -->
<el-table-column label="区域名" align="center" prop="areas" width="80" >
<template slot-scope="scope">
<span>{{areasConvert(scope.row.areas)}}</span>

11
src/views/farm/task/index.vue

@ -47,6 +47,17 @@
<!-- 列表 -->
<el-table v-loading="loading" stripe :data="list">
<el-table-column label="任务ID" align="center" prop="id" />
<el-table-column label="任务状态" align="center" prop="status" >
<template slot-scope="scope">
<el-button type="success" v-if="scope.row.status == 0">计划中</el-button>
<el-button type="success" v-if="scope.row.status == 1">准备中</el-button>
<el-button type="success" v-if="scope.row.status == 2">已开始</el-button>
<el-button type="danger" v-if="scope.row.status == 3">异常状态</el-button>
<el-button type="success" v-if="scope.row.status == 4">任务完成</el-button>
<el-button type="danger" v-if="scope.row.status == 5">返工</el-button>
<el-button type="danger" v-if="scope.row.status == 6">任务关闭</el-button>
</template>
</el-table-column>
<el-table-column label="项目名" align="center" prop="projectName">
<template slot-scope="scope">
<span>{{scope.row.projectName}}</span>

Loading…
Cancel
Save