xiangpei
2024-11-30 2c6073b49f0da22eaed131758afbf8408edd101e
src/views/components/noticeTable.vue
@@ -10,13 +10,13 @@
                >
                    流程待办
                </div>
                <!-- <div
                    :class="{ active: currentTab === 'progress' }"
        <div
          :class="{ active: currentTab === 'schedule' }"
                    class="tab"
                    @click="switchTab('progress')"
          @click="switchTab('schedule')"
                >
                    进度待办
                </div> -->
        </div>
            </div>
        </div>
        <el-table
@@ -24,7 +24,7 @@
            :header-cell-style="{
                background: '#F5F7FC',
                color: '#454B5E',
                fontSize: '12px'
        fontSize: '12px',
            }"
            height="280"
            max-height="280"
@@ -76,8 +76,8 @@
    </div>
</template>
<script>
import { getTodo } from '@/api/message';
import { getProjectProcessTodo } from "@/api/projectProcess/projectProcess.js";
import { getProjectPlanToDoList } from "@/api/projectPlan";
export default {
    data() {
        return {
@@ -85,59 +85,116 @@
            total: 0,
            queryParams: {
                pageNum: 1,
                pageSize: 10
        pageSize: 5,
            },
            tableData: [],
            currentTableHeaders: [
                { label: '流程环节', prop: 'name', minWidth: 150, align: 'left' },
                { label: '申请项目', prop: 'businessName', minWidth: 150, align: 'left' },
                { label: '审批人', prop: 'assigneeName', minWidth: 100, align: 'left' },
                { label: '剩余时间', prop: 'remainingTime', minWidth: 143, align: 'left' }
            ]
        }
      currentTableHeaders: [],
      processTableHeaders: [
        { label: "流程环节", prop: "taskName", minWidth: 150, align: "left" },
        {
          label: "申请项目",
          prop: "processName",
          minWidth: 150,
          align: "left",
        },
        { label: "审批人", prop: "handlerName", minWidth: 100, align: "left" },
        { label: "完成情况", prop: "taskStatus", minWidth: 143, align: "left" },
        {
          label: "剩余时间",
          prop: "remainingTime",
          minWidth: 143,
          align: "left",
        },
      ],
      scheduleTableHeaders: [
        {
          label: "待办事项",
          prop: "projectPlanInfoTitle",
          minWidth: 150,
          align: "left",
        },
        {
          label: "对应项目",
          prop: "projectName",
          minWidth: 150,
          align: "left",
        },
        { label: "审批人", prop: "assigneeName", minWidth: 100, align: "left" },
        {
          label: "状态",
          prop: "progressStatusStr",
          minWidth: 143,
          align: "left",
        },
        {
          label: "剩余时间",
          prop: "remainder",
          minWidth: 143,
          align: "left",
        },
      ],
    };
    },
    props: {
        calculation: Array,
        countExceptionProjectData:Object,
    },
    created() {
    (this.currentTab = "process"),
      (this.currentTableHeaders = this.processTableHeaders);
        this.getList();
    },
    methods: {
        async getList() {
            const resp = await getTodo(this.queryParams);
      var resp;
      this.total = 0;
      this.tableData = [];
      if (this.currentTab == "process") {
        resp = await getProjectProcessTodo(this.queryParams);
            if (resp.code === 200) {
                this.total.value = resp.total;
                this.tableData.value = resp.rows;
          this.total = resp.total;
          this.tableData = resp.taskList;
        }
      } else {
        resp = await getProjectPlanToDoList(this.queryParams);
        if (resp.code === 200) {
          this.total = resp.total;
          this.tableData = resp.data;
        }
            }
        },
        handleDetail(row) {
            console.log(111);
      if (this.currentTab == "process") {
      } else {
        row.id = row.planId;
            this.$router.push({
                path: '/projectManage/nodeDetails',
          path: "/projectManage/progressRecord",
                query: {
                    taskId: row.id,
                    id: row.businessKey,
                    disabled: 'true'
                }
            data: row,
          },
            });
      }
        },
        handleUpdate(row) {
      if (this.currentTab == "process") {
      } else {
        row.id = row.planId;
            this.$router.push({
                path: '/projectManage/nodeDetails',
          path: "/projectManage/progressRecord",
                query: {
                    taskId: row.id,
                    id: row.businessKey
                }
            data: row,
          },
            });
            console.log(111);
      }
        },
        switchTab(tab) {
            this.currentTab = tab;
        }
    }
}
      this.currentTableHeaders =
        tab == "process" ? this.processTableHeaders : this.scheduleTableHeaders;
      this.getList();
    },
  },
};
</script>
<style lang="scss" scoped>
@@ -170,8 +227,7 @@
}
::v-deep .el-pagination .btn-prev .el-icon,
 ::v-deep .el-pagination .btn-next .el-icon
{
::v-deep .el-pagination .btn-next .el-icon {
    display: inline;
}
.flex {
@@ -179,5 +235,4 @@
    justify-content: space-between;
    font-size: 12px;
}
</style>