| | |
| | | <el-descriptions-item label="剩余天数">{{ curProject === null ? '0' : '0' }}</el-descriptions-item> |
| | | <el-descriptions-item label="总任务数">{{ curProject === null ? '0' : curProject.totalTask }}</el-descriptions-item> |
| | | <el-descriptions-item label="完成任务数">{{ curProject === null ? '0' : curProject.completeTask }}</el-descriptions-item> |
| | | <el-descriptions-item label="任务完成比">{{ curProject === null ? '0%' : (curProject.completeTask / curProject.totalTask) * 100 + '%' }}</el-descriptions-item> |
| | | <el-descriptions-item label="任务完成比">{{ curProject === null ? '0%' : (parseFloat((curProject.completeTask / curProject.totalTask) * 100) ).toFixed(2)+ '%' }}</el-descriptions-item> |
| | | <el-descriptions-item label="总工时数">{{ curProject === null ? '0.0' : curProject.totalHours }}</el-descriptions-item> |
| | | <el-descriptions-item label="完成工时数">{{ curProject === null ? '0.0' : curProject.completeHours }}</el-descriptions-item> |
| | | <el-descriptions-item label="工时完成比">{{ curProject === null ? '0%' : (curProject.completeHours / curProject.totalHours) * 100 + '%' }}</el-descriptions-item> |
| | | <el-descriptions-item label="工时完成比">{{ curProject === null ? '0%' : (parseFloat((curProject.completeHours / curProject.totalHours) * 100)).toFixed(2) + '%' }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-card> |
| | | </div> |
| | |
| | | <rrOperation :crud="crud" /> |
| | | </div> |
| | | <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
| | | <crudOperation :permission="permission" /> |
| | | <crudOperation v-if="this.crud.query.flag" :permission="permission" /> |
| | | <!--表单组件--> |
| | | <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
| | | <el-form ref="form" :model="form" :rules="rules" size="small" label-width="110px"> |
| | |
| | | <template slot="append">小时</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="所属员工" prop="userId"> |
| | | <el-select v-model="form.userIdList" multiple filterable clearable placeholder="请选择" style="width: 340px;"> |
| | | <el-form-item label="任务负责人" prop="userId"> |
| | | <el-select v-model="form.userIdList" :no-data-text=" '未任务成员' " multiple filterable clearable placeholder="请选择" style="width: 340px;"> |
| | | <el-option |
| | | v-for="item in containUserList" |
| | | :key="item.id" |
| | | :label="item.nickName" |
| | | :value="item.id" |
| | | > |
| | | <span style="float: left">{{ item.nickName }}</span> |
| | | <span style="float: right; color: #8492a6; font-size: 13px">{{ item.levelName }}</span> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="任务成员" prop="containUserList"> |
| | | <el-select v-model="form.containUserList" multiple filterable clearable placeholder="请选择" style="width: 340px;"> |
| | | <el-option |
| | | v-for="item in users" |
| | | :key="item.id" |
| | |
| | | row-key="id" |
| | | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
| | | @selection-change="crud.selectionChangeHandler" |
| | | @row-click="getTaskUser" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column :show-overflow-tooltip="true" prop="name" label="名称" fixed="left" width="180" /> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="description" label="描述" /> |
| | | <el-table-column v-if="checkPer(['admin','task:divide','task:edit','task:del'])" label="操作" width="180px" align="center" fixed="right"> |
| | | <el-table-column v-if="checkPer(['admin','task:divide','task:edit','task:del']) && this.crud.query.flag === true" label="操作" width="180px" align="center" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <udOperation :data="scope.row" :permission="permission" /> |
| | | </template> |
| | |
| | | tags: [], |
| | | // tag标签 |
| | | inputVisible: false, |
| | | inputValue: '' |
| | | inputValue: '', |
| | | containUserList: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | queryByProjectId(project) { |
| | | this.crud.resetQuery(false) |
| | | this.crud.query.projectId = project.id |
| | | this.crud.query.flag = project.flag |
| | | this.crud.toQuery() |
| | | this.getProjectTotal() |
| | | }, |
| | |
| | | this.tags = res |
| | | }) |
| | | }, |
| | | getTaskUser(even) { |
| | | this.containUserList = [] |
| | | var containList = even.containUserList |
| | | for (var i = 0; i < this.users.length; i++) { |
| | | for (var j = 0; j < containList.length; j++) { |
| | | if (containList[j] === this.users[i].id) { |
| | | this.containUserList.push(this.users[i]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | handleClose(id) { |
| | | this.form.tagList.splice(id, 1) |
| | | }, |