| | |
| | | </el-form-item> |
| | | <el-form-item v-if="form.newTaskProgress === 100" label="任务状态"> |
| | | <el-switch |
| | | v-model="form.Is_ok" |
| | | v-model="form.is_ok" |
| | | v-permission="permission.list" |
| | | active-text="已完成" |
| | | /> |
| | |
| | | <el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!--表格渲染--> |
| | | <el-table |
| | | ref="table" |
| | | v-loading="crud.loading" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="performanceHours" label="绩效工时" width="80" /> |
| | | <el-table-column :show-overflow-tooltip="true" prop="newTaskProgress" label="任务进度" width="80" /> |
| | | <el-table-column :show-overflow-tooltip="true" label="任务进度" width="80"> |
| | | <template slot-scope="scope"> |
| | | <span style="margin-left: 10px">{{ scope.row.newTaskProgress }}%</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="taskStatus" label="任务状态" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-tag>{{ dict.label[taskStatus][scope.row.taskStatus] }}</el-tag> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--表格渲染--> |
| | | <!--分页组件--> |
| | | <pagination /> |
| | | <!--表单组件--> |
| | |
| | | import { mapGetters } from 'vuex' |
| | | import constant from '@/utils/constant' |
| | | import UploadExcelComponent from '@/components/UploadExcel/index.vue' |
| | | const defaultForm = { id: null, userId: null, projectId: null, task: { id: null }, taskStartDate: null, taskEndDate: null, taskHours: null, newTaskProgress: null, taskStatus: null, remarks: null, divideUserIds: [], Is_ok: false } |
| | | const defaultForm = { id: null, userId: null, projectId: null, task: { id: null }, taskStartDate: null, taskEndDate: null, taskHours: null, newTaskProgress: null, taskStatus: null, remarks: null, divideUserIds: [], is_ok: null } |
| | | export default { |
| | | name: 'TaskUser', |
| | | // eslint-disable-next-line vue/no-unused-components |
| | |
| | | }) |
| | | }, |
| | | taskCompleted() { |
| | | |
| | | const selectData = this.$refs.table.selection |
| | | var changesId = [] |
| | | for (var i = 0; i < selectData.length; i++) { |
| | | if (selectData[i].newTaskProgress !== 100) { |
| | | this.$notify.error({ |
| | | title: '任务进度未达到100%' |
| | | }) |
| | | return |
| | | } |
| | | changesId.push(selectData[i].id) |
| | | } |
| | | // 当程序执行到这里时,说明选择的都是已经达到100的任务 |
| | | crudTaskUser.changeStatus(changesId).then(res => { |
| | | this.crud.toQuery() |
| | | this.$notify.success({ |
| | | title: '确认成功' |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |