赵士淞
2023-01-16 b5c0c4df9b21086ad61aa6170137f70e8fffd623
修复
3 files modified
84 ■■■■■ changed files
eladmin-web-master/src/views/task/task/index.vue 52 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/task/taskDaliy/index.vue 15 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/task/taskUser/index.vue 17 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/task/task/index.vue
@@ -53,6 +53,32 @@
        >
          分配
        </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">
@@ -300,7 +326,9 @@
        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: [
@@ -480,6 +508,28 @@
      // 分配表单状态
      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() {
      // 分配表单状态
eladmin-web-master/src/views/task/taskDaliy/index.vue
@@ -273,6 +273,21 @@
  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)
      // 用户最大角色级别
eladmin-web-master/src/views/task/taskUser/index.vue
@@ -288,6 +288,21 @@
  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)
      // 用户最大角色级别
@@ -323,7 +338,7 @@
        // 检索任务列表
        this.queryTasks = []
      } else {
        // 获取父级任务
        // 获取任务列表
        crudTask.getAll({ projectId: this.query.projectId }).then(res => {
          // 检索任务列表
          this.queryTasks = res