weicd
2023-11-07 d38392f1bc5b437feaec39da315926e1f5bdccf2
eladmin-web-master/src/views/task/taskUser/index.vue
@@ -28,7 +28,7 @@
              <el-card v-for="task in taskDatas" :key="task.id" class="box-card" :class="{ 'active': task === selectedTask }" style="margin-bottom: 10px;cursor:pointer" shadow="hover" @click.native="handleNodeClick(task)">
                <div>
                  {{ task.name }}
                  <i class="el-icon-search" style="float: right;" @click="showTaskDetail(task)" />
                  <i class="el-icon-search" style="float: right;" @click.stop="showTaskDetail(task)" />
                </div>
              </el-card>
            </div>
@@ -118,6 +118,51 @@
          </div>
          <div style="color: red;font-size: 12px;margin-left: 3px;margin-top: 11px;">* 非已完成的任务的详细信息</div>
        </el-dialog>
        <el-dialog
          title="临期任务"
          v-loading="taskLoading_L"
          :visible.sync="dialogVisible_task_LQ"
          @closed="setNull"
          @close="dialogLoading_task_LQ = false"
        >
        <el-card class="box-card" shadow="never">
          <el-tabs v-model="tobeOver" style="height: 220px;" @tab-click="handleClickTobeTasked">
            <el-tab-pane :label="tobeTasked" name="first">
              <el-table
                :data="advList"
                height="180"
                :show-header="false"
              >
                <el-table-column :show-overflow-tooltip="true" prop="name" fixed="left"  min-width="180px">
                  <template slot-scope="scope">
                    <el-tag slot="reference">{{ scope.row.name }}</el-tag>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="taskStartDate"
                  :show-overflow-tooltip="true"
                  min-width="180px"
                />
                <el-table-column
                  prop="taskEndDate"
                  :show-overflow-tooltip="true"
                  min-width="180px"
                />
              </el-table>
            </el-tab-pane>
          </el-tabs>
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage"
            :page-sizes="[10, 20, 30, 40]"
            :page-size="pageSize"
            layout="total, prev, pager, next, sizes , jumper"
            :total="total"
          ></el-pagination>
        </el-card>
        </el-dialog>
        <!--工具栏-->
        <div class="head-container">
          <div>
@@ -154,13 +199,34 @@
            <el-button
              slot="right"
              v-permission="permission.generate"
              :disabled="crud.selections.length !== 1"
              class="filter-item"
              size="mini"
              type="primary"
              icon="el-icon-search"
              style="margin-right: 6px;"
              @click="showDetail(crud.selections[0])"
            >任务详情</el-button>
            <el-button
              slot="right"
              v-permission="permission.generate"
              class="filter-item"
              size="mini"
              type="primary"
              icon="el-icon-check"
              style="margin-right: 60px;"
              style="margin-right: 6px;"
              @click="taskCompleted"
            >任务完结</el-button>
            <el-button
              slot="right"
              v-permission="permission.generate"
              class="filter-item"
              size="mini"
              type="primary"
              icon="el-icon-tickets"
              style="margin-right: 60px;"
              @click="adventTesk()"
            >临期任务</el-button>
          </crudOperation>
          <div>
            <span> 当前任务:<i> {{ selectedTaskName }} </i>
@@ -259,15 +325,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-tooltip class="item" effect="light" :open-delay="1000" placement="top" :disabled="!flag">
              <!-- <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 style="cursor: pointer;">查看详情</h4>
                  </div>
                </div>
                <el-tag v-if="scope.row.userNickName" style="cursor: pointer;">{{ scope.row.userNickName }}</el-tag>
                </div> -->
                <el-tag v-if="scope.row.userNickName">{{ scope.row.userNickName }}</el-tag>
                <el-tag v-else>未指定</el-tag>
              </el-tooltip>
              <!-- </el-tooltip> -->
            </template>
          </el-table-column>
          <el-table-column :show-overflow-tooltip="true" prop="performanceHours" label="绩效工时" width="80" />
@@ -434,8 +500,11 @@
      selectedTask: '',
      dialogVisible_taskUser: false,
      dialogLoading_taskUser: true,
      taskLoading_L: true,
      dialogVisible_task: false,
      dialogVisible_task_LQ: false,
      dialogLoading_task: true,
      dialogLoading_task_LQ: true,
      steps: [],
      TaskName: '',
      expectedHours: '',
@@ -443,7 +512,13 @@
      taskUserDetail: {},
      taskDetail: {},
      taskProgress: '',
      ProgressStatus: ''
      ProgressStatus: '',
      advList: [],
      tobeOver: 'first',
      tobeTasked: '任务详细',
      total: 0,
      currentPage: 1,
      pageSize: 10
    }
  },
  computed: {
@@ -511,6 +586,9 @@
      // }
      return true
    },
    // [CRUD.HOOK.afterCrudDelete]() {
    //   this.advList = []
    // },
    disabledDate(time) {
      return time.getTime() < new Date(this.planStartTime) - 8.64e7 || time.getTime() > new Date(this.planEndTime).getTime()
    },
@@ -615,6 +693,24 @@
      this.crud.toQuery()
      this.getUser(this.query.taskId)
      this.getProUser(this.query.taskId)
    },
    handleSizeChange(val) {
       this.pageSize = val;
       this.adventTesk();
    },
    handleCurrentChange(val) {
       this.currentPage = val;
       this.adventTesk();
    },
    // 临期任务
    adventTesk() {
      this.dialogVisible_task_LQ = true
      // 点击侧面查询临期任务
      crudTaskUser.getTaskUserAdvent(this.query.taskId, this.currentPage, this.pageSize).then(res => {
        this.advList = res.data
        this.total = res.total
        this.taskLoading_L = false
      })
    },
    beforeUpload(file) {
      const isLt1M = file.size / 1024 / 1024 < 1
@@ -765,6 +861,7 @@
      this.taskUserDetail = {}
      this.dialogLoading_taskUser = true
      this.dialogLoading_task = true
      this.dialogLoading_task_LQ = true
    },
    showTaskDetail(e) {
      this.taskDetail = {}