| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <!--工具栏--> |
| | | <el-row :gutter="15"> |
| | | <el-row v-loading="taskLoading" :gutter="15"> |
| | | <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="7"> |
| | | <el-card class="box-card" shadow="never"> |
| | | <el-card class="box-card" shadow="never" style="width: 750px"> |
| | | <el-tabs v-model="tobeOver" style="height: 200px;" @tab-click="handleClickTobeTasked"> |
| | | <el-tab-pane v-loading="crud.loading" :label="tobeTasked" name="first"> |
| | | <el-card class="box-card"> |
| | | <div v-for="o in adventTasks" :key="o.id" style="height: 70px"> |
| | | {{ o.name }}      {{ o.taskEndDate }} |
| | | <el-button type="primary" size="mini" style="float: right" @click="quickFilling(o)">填写日报</el-button> |
| | | </div> |
| | | </el-card> |
| | | <el-tab-pane :label="tobeTasked" name="first"> |
| | | <el-table |
| | | :data="adventTasks" |
| | | height="180" |
| | | :show-header="false" |
| | | > |
| | | <el-table-column |
| | | prop="name" |
| | | :show-overflow-tooltip="true" |
| | | min-width="180px" |
| | | /> |
| | | <el-table-column |
| | | prop="taskStartDate" |
| | | :show-overflow-tooltip="true" |
| | | min-width="180px" |
| | | /> |
| | | <el-table-column |
| | | prop="taskEndDate" |
| | | :show-overflow-tooltip="true" |
| | | min-width="180px" |
| | | /> |
| | | <el-table-column width="100px" style="align-items: center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" size="mini" @click="quickFilling(scope.row)">填写日报</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="17"> |
| | | <el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="17" style="padding-left: 250px"> |
| | | <el-card class="box-card" shadow="never"> |
| | | <el-tabs v-model="activeName" style="height: 200px;" @tab-click="handleClick"> |
| | | <el-tabs v-model="activeName" style="height: 200px;"> |
| | | <el-tab-pane :label="tasking" name="first"> |
| | | <el-card class="box-card"> |
| | | <div v-for="o in 5" :key="o" class="text item" style="height: 35px"> |
| | | {{ '列表内容 ' + o }} |
| | | </div> |
| | | </el-card> |
| | | <el-table |
| | | v-if="ongoingTasks.length != 0" |
| | | :data="ongoingTasks" |
| | | height="180" |
| | | :show-header="false" |
| | | > |
| | | <el-table-column |
| | | prop="name" |
| | | :show-overflow-tooltip="true" |
| | | min-width="180px" |
| | | /> |
| | | <el-table-column |
| | | prop="taskStartDate" |
| | | :show-overflow-tooltip="true" |
| | | min-width="180px" |
| | | /> |
| | | <el-table-column |
| | | prop="taskEndDate" |
| | | :show-overflow-tooltip="true" |
| | | min-width="180px" |
| | | /> |
| | | <el-table-column width="100px" style="align-items: center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" size="mini" @click="quickFilling(scope.row)">填写日报</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span v-else>暂无任务</span> |
| | | </el-tab-pane> |
| | | <el-tab-pane :label="tobeTask" name="second"> |
| | | <el-card class="box-card"> |
| | | <div v-for="o in 5" :key="o" class="text item" style="height: 35px"> |
| | | {{ '列表内容 ' + o }} |
| | | </div> |
| | | </el-card> |
| | | <el-table |
| | | v-if="taskNotStarted.length != 0" |
| | | :data="taskNotStarted" |
| | | height="180" |
| | | :show-header="false" |
| | | > |
| | | <el-table-column |
| | | prop="name" |
| | | :show-overflow-tooltip="true" |
| | | min-width="180px" |
| | | /> |
| | | <el-table-column |
| | | prop="taskStartDate" |
| | | :show-overflow-tooltip="true" |
| | | min-width="180px" |
| | | /> |
| | | <el-table-column |
| | | prop="taskEndDate" |
| | | :show-overflow-tooltip="true" |
| | | min-width="180px" |
| | | /> |
| | | <el-table-column width="100px" style="align-items: center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" size="mini" @click="quickFilling(scope.row)">填写日报</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span v-else>暂无任务</span> |
| | | </el-tab-pane> |
| | | <!--<el-tab-pane label="未分配任务" name="third" style=":display: false">未分配任务</el-tab-pane>--> |
| | | </el-tabs> |
| | |
| | | // 检索项目列表 |
| | | queryProjects: [], |
| | | adventTasks: [], |
| | | ongoingTasks: [], |
| | | taskNotStarted: [], |
| | | // 检索任务列表 |
| | | queryTasks: [], |
| | | // 表单项目列表 |
| | |
| | | tobeTask: '未着手任务', |
| | | tobeTasked: '临期任务', |
| | | currentTask: null, |
| | | pane_loading: true |
| | | taskLoading: true |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | // 获取检索项目 |
| | | this.getQueryProject() |
| | | this.getAdventTasks() |
| | | this.getOngoingTasks() |
| | | this.getTaskNotStarted() |
| | | return true |
| | | }, |
| | | getAdventTasks() { |
| | | crudTaskUser.getAdventTasks().then(res => { |
| | | this.adventTasks = res |
| | | }) |
| | | }, |
| | | getOngoingTasks() { |
| | | crudTaskUser.getOngoingTasks().then(res => { |
| | | this.ongoingTasks = res |
| | | }) |
| | | }, |
| | | getTaskNotStarted() { |
| | | crudTaskUser.getTaskNotStarted().then(res => { |
| | | this.taskNotStarted = res |
| | | }) |
| | | }, |
| | | handleClick(tab, event) { |
| | |
| | | // 检索项目列表 |
| | | this.queryProjects = res |
| | | this.formProjects = res |
| | | }) |
| | | |
| | | // 获取任务列表 |
| | | crudTask.getAllOfDaily({ projectId: this.query.projectId }).then(res => { |
| | | // 检索任务列表 |
| | | this.queryTasks = res |
| | | }) |
| | | }, |
| | | // 检索项目变更 |
| | |
| | | } |
| | | }, |
| | | quickFilling(object) { |
| | | console.log(object) |
| | | this.currentTask = object |
| | | this.crud.toAdd() |
| | | }, |
| | | [CRUD.HOOK.afterRefresh]() { |
| | | this.taskLoading = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | adventTable tr:first-child { |
| | | display: none; |
| | | } |
| | | </style> |