xiangpei
2025-03-05 f749664174cde1fcc88873072ac0009478fe8dd5
主公司可以查看、办理子公司的任务
3个文件已修改
12 ■■■■■ 已修改文件
src/store/modules/user.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/component/BasicInfo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectProcess/detail/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js
@@ -8,6 +8,7 @@
    name: '',
    avatar: '',
    deptId: null,
    childDeptIds: [],
    deptName: '',
    roles: [],
    roleIds: [],
@@ -35,6 +36,9 @@
    },
    SET_DEPT: (state, deptId) => {
      state.deptId = deptId
    },
    SET_CHILD_DEPT: (state, deptIds) => {
      state.childDeptIds = deptIds
    },
    SET_DEPT_NAME: (state, deptName) => {
      state.deptName = deptName
@@ -78,6 +82,7 @@
          commit('SET_ROLE_IDS', user.roles.map(role => role.roleId))
          commit('SET_NAME', user.userName)
          commit('SET_DEPT', user.deptId)
          commit('SET_CHILD_DEPT', res.childDeptList)
          commit('SET_DEPT_NAME', user.dept ? user.dept.deptName : '')
          commit('SET_AVATAR', avatar)
src/views/projectEngineering/projectLibrary/component/BasicInfo.vue
@@ -120,7 +120,7 @@
            <el-col :span="6">
              <el-form-item label="项目状态" label-width="100px" prop="projectStatus" style="width: 100%">
                <el-select v-model="projectForm.projectStatus" clearable placeholder="请选择" @change="handleProjectStatusChange" style="width: 100%">
                <el-select v-model="projectForm.projectStatus" clearable placeholder="请选择" style="width: 100%">
                  <el-option v-for="item in dict.type.sys_project_status" :key="item.value" :label="item.label"
                             :value="item.value"/>
                </el-select>
src/views/projectProcess/detail/index.vue
@@ -417,12 +417,9 @@
    showHandle(row) {
      if (row.taskStatus === '待办' || row.taskStatus === '挂起') {
        if (row.handlerType === "USER") {
          console.log(row.handlerId.indexOf(this.$store.state.user.id) !== -1, "我是不是")
          return row.handlerId.indexOf(this.$store.state.user.id) !== -1
        } else if (row.handlerType === "DEPT") {
          console.log(this.$store.state.user.deptId, "部门id", row.handlerUnitId)
          return row.handlerUnitId.indexOf(this.$store.state.user.deptId) !== -1
          // return this.$store.state.user.name === '市发展改革委' || this.$store.state.user.name === '市住建局'
          return row.handlerUnitId.indexOf(this.$store.state.user.deptId) !== -1 || row.handlerUnitId.some(id => this.$store.state.user.childDeptIds.indexOf(id) !== -1)
        } else if (row.handlerType === "ROLE") {
          return row.handlerUnitId.some(roleId => this.$store.state.user.roleIds.indexOf(roleId) !== -1)
        }