churf
2023-08-31 b3e2d40e907e21e828214b3d65e7c94096e68c70
eladmin-web-master/src/views/task/taskUser/index.vue
@@ -54,6 +54,25 @@
      </el-col>
      <!--任务分配数据-->
      <el-col :span="18">
        <el-dialog
          title="任务详情"
          :visible.sync="dialogVisible"
          width="600px"
          @closed="steps = null"
          @close="dialogLoading = true"
        >
          <div v-if="steps !== null " v-loading="dialogLoading" class="block">
            <el-timeline>
              <el-timeline-item v-for="(item,index) in steps" :key="index" :timestamp="item.fillDate" :color="item.color">
                <el-card>
                  <h4>{{ item.title }}</h4>
                </el-card>
              </el-timeline-item>
            </el-timeline>
          </div>
          <div v-else v-loading="dialogLoading" class="block">
            <p>暂无信息</p></div>
        </el-dialog>
        <!--工具栏-->
        <div class="head-container">
          <div>
@@ -187,7 +206,7 @@
          <el-table-column type="selection" width="55" />
          <el-table-column :show-overflow-tooltip="true" prop="name" label="名称" fixed="left" width="270">
            <template slot-scope="scope">
              <el-tag>{{ scope.row.name }}</el-tag>
              <el-tag slot="reference">{{ scope.row.name }}</el-tag>
            </template>
          </el-table-column>
          <el-table-column :show-overflow-tooltip="true" prop="taskStartDate" label="任务开始时间" width="140" />
@@ -195,8 +214,15 @@
          <el-table-column :show-overflow-tooltip="true" prop="taskHours" label="任务工时" width="80" />
          <el-table-column :show-overflow-tooltip="true" prop="userNickName" label="所属员工" width="100">
            <template slot-scope="scope">
              <el-tag v-if="scope.row.userNickName">{{ scope.row.userNickName }}</el-tag>
              <el-tag v-else>未指定</el-tag>
              <el-tooltip class="item" effect="light" :open-delay="1000" placement="top" :disabled="!flag">
                <div slot="content" class="slot-style">
                  <div @click="showDetail(scope.row)">
                    <h4>查看详情</h4>
                  </div>
                </div>
                <el-tag v-if="scope.row.userNickName">{{ scope.row.userNickName }}</el-tag>
                <el-tag v-else>未指定</el-tag>
              </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column :show-overflow-tooltip="true" prop="performanceHours" label="绩效工时" width="80" />
@@ -241,7 +267,6 @@
        </el-table>
        <!--表格渲染-->
        <!--分页组件-->
        <pagination />
        <!--表单组件-->
        <el-dialog :close-on-click-modal="false" :before-close="closeGenerate" :visible.sync="generateStatus" title="导入任务分配信息" width="720px">
          <el-form ref="generateForm" size="small" label-width="80px">
@@ -259,7 +284,6 @@
    </el-row>
  </div>
</template>
<script>
import crudTaskUser from '@/api/task/taskUser'
import crudTask from '@/api/task/task'
@@ -360,7 +384,10 @@
      uploading: true,
      flag: false,
      infinite: false,
      selectedTask: ''
      selectedTask: '',
      dialogVisible: false,
      dialogLoading: true,
      steps: []
    }
  },
  computed: {
@@ -612,6 +639,14 @@
          title: '确认成功'
        })
      })
    },
    showDetail(e) {
      this.dialogVisible = true
      // 发送taskUser,获取所有的日报信息,并在后台进行处理,将处理后的结果返回给前端的steps中,进行显示
      crudTaskUser.getTaskUserDetail(e.id).then(res => {
        this.steps = res
        this.dialogLoading = false
      })
    }
  }
}
@@ -656,4 +691,5 @@
    /* 添加长亮效果的样式 */
    color: #1890ff;
  }
</style>