Merge branch 'zhaoss' of http://192.168.1.110:5678/r/pms-upgrade into master
| | |
| | | > |
| | | 分配 |
| | | </el-button> |
| | | <el-button |
| | | slot="right" |
| | | v-permission="permission.seeDivide" |
| | | class="filter-item" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-share" |
| | | :disabled="crud.selections.length !== 1" |
| | | style="margin-left: 4px !important;" |
| | | @click="toSeeDivide(crud.selections[0])" |
| | | > |
| | | 查看分配 |
| | | </el-button> |
| | | <el-button |
| | | slot="right" |
| | | v-permission="permission.seeDaliy" |
| | | class="filter-item" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-share" |
| | | :disabled="crud.selections.length !== 1" |
| | | style="margin-left: 4px !important;" |
| | | @click="toSeeDaliy(crud.selections[0])" |
| | | > |
| | | 查看日报 |
| | | </el-button> |
| | | </crudOperation> |
| | | <!--表单组件--> |
| | | <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
| | |
| | | edit: ['admin', 'task:edit'], |
| | | del: ['admin', 'task:del'], |
| | | download: ['admin', 'task:download'], |
| | | divide: ['admin', 'task:divide'] |
| | | divide: ['admin', 'task:divide'], |
| | | seeDivide: ['admin', 'task:seeDivide'], |
| | | seeDaliy: ['admin', 'task:seeDaliy'] |
| | | }, |
| | | rules: { |
| | | name: [ |
| | |
| | | // 分配表单状态 |
| | | this.divideStatus = true |
| | | }, |
| | | // 查看任务分配 |
| | | toSeeDivide(data) { |
| | | // 跳转页面 |
| | | this.$router.push({ |
| | | name: 'TaskUser', |
| | | params: { |
| | | projectId: data.projectId, |
| | | taskId: data.id |
| | | } |
| | | }) |
| | | }, |
| | | // 查看任务日报 |
| | | toSeeDaliy(data) { |
| | | // 跳转页面 |
| | | this.$router.push({ |
| | | name: 'TaskDaliy', |
| | | params: { |
| | | projectId: data.projectId, |
| | | taskId: data.id |
| | | } |
| | | }) |
| | | }, |
| | | // 分配表单关闭 |
| | | divideClose() { |
| | | // 分配表单状态 |
| | |
| | | methods: { |
| | | // 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
| | | [CRUD.HOOK.beforeRefresh]() { |
| | | // 判断传参是否为空 |
| | | if (this.$route.params.projectId != null && this.$route.params.projectId !== '' && this.crud.query.projectId === undefined) { |
| | | // 检索条件赋值 |
| | | this.$set(this.crud.query, 'projectId', Number(this.$route.params.projectId)) |
| | | // 获取任务列表 |
| | | crudTask.getAll({ projectId: this.query.projectId }).then(res => { |
| | | // 检索任务列表 |
| | | this.queryTasks = res |
| | | }) |
| | | } |
| | | // 判断传参是否为空 |
| | | if (this.$route.params.taskId != null && this.$route.params.taskId !== '' && this.crud.query.taskId === undefined) { |
| | | // 检索条件赋值 |
| | | this.$set(this.crud.query, 'taskId', Number(this.$route.params.taskId)) |
| | | } |
| | | // 用户角色级别数组 |
| | | const userRolesLevel = this.user.roles.map(({ level }) => level) |
| | | // 用户最大角色级别 |
| | |
| | | methods: { |
| | | // 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
| | | [CRUD.HOOK.beforeRefresh]() { |
| | | // 判断传参是否为空 |
| | | if (this.$route.params.projectId != null && this.$route.params.projectId !== '' && this.crud.query.projectId === undefined) { |
| | | // 检索条件赋值 |
| | | this.$set(this.crud.query, 'projectId', Number(this.$route.params.projectId)) |
| | | // 获取任务列表 |
| | | crudTask.getAll({ projectId: this.query.projectId }).then(res => { |
| | | // 检索任务列表 |
| | | this.queryTasks = res |
| | | }) |
| | | } |
| | | // 判断传参是否为空 |
| | | if (this.$route.params.taskId != null && this.$route.params.taskId !== '' && this.crud.query.taskId === undefined) { |
| | | // 检索条件赋值 |
| | | this.$set(this.crud.query, 'taskId', Number(this.$route.params.taskId)) |
| | | } |
| | | // 用户角色级别数组 |
| | | const userRolesLevel = this.user.roles.map(({ level }) => level) |
| | | // 用户最大角色级别 |
| | |
| | | // 检索任务列表 |
| | | this.queryTasks = [] |
| | | } else { |
| | | // 获取父级任务 |
| | | // 获取任务列表 |
| | | crudTask.getAll({ projectId: this.query.projectId }).then(res => { |
| | | // 检索任务列表 |
| | | this.queryTasks = res |