xiangpei
2025-03-11 84a14c24edf92f7072e50b51ee37143d658ecfd4
src/views/components/noticeTable.vue
@@ -20,6 +20,7 @@
            </div>
        </div>
        <el-table
          v-loading="tableLoading"
            :data="tableData"
            :header-cell-style="{
                background: '#F5F7FC',
@@ -69,12 +70,12 @@
        <div style="width: 100%;display: flex;flex-direction: row-reverse;align-items: center">
          <pagination
            style="width: 100%"
            v-show="total >= 0"
            v-show="total > 0"
            :page-sizes="[4]"
            :limit="queryParams.pageSize"
            :page="queryParams.pageNum"
            :page="queryParams.currentPage"
            :total="total"
            @pagination="getList"
            @pagination="pageChange"
          />
        </div>
      </div>
@@ -86,10 +87,11 @@
export default {
    data() {
        return {
            tableLoading: false,
            currentTab: "process",
            total: 0,
            queryParams: {
                pageNum: 1,
                currentPage: 1,
                pageSize: 4,
            },
            tableData: [],
@@ -164,21 +166,26 @@
        this.getList();
    },
    methods: {
        pageChange(data) {
          this.queryParams.currentPage = data.page
          this.getList()
        },
        async getList() {
            var resp;
            this.total = 0;
            this.tableData = [];
            this.tableLoading = true
            if (this.currentTab == "process") {
                resp = await getProjectProcessTodo(this.queryParams);
                if (resp.code === 200) {
                    this.total = resp.total;
                    this.tableData = resp.taskList;
                    this.tableLoading = false
                }
            } else {
                resp = await getProjectPlanToDoList(this.queryParams);
                if (resp.code === 200) {
                    this.total = resp.total;
                    this.tableData = resp.data;
                    this.tableLoading = false
                }
            }
        },
@@ -187,11 +194,15 @@
                const resp = await getDetailByProcessInsId({ processDefId: row.processDefId, processInsId: row.processInsId });
                if (resp.code === 200 && resp.data.length > 0) {
                    const projectProcess = resp.data[0]
                  sessionStorage.removeItem("projectProDetail")
                    this.$router.push({
                        path: '/projectFlow/detail',
                        query: {
                            projectId: projectProcess.projectId,
                            processDefId: row.processDefId
                          projectId: projectProcess.projectId,
                          processDefId: row.processDefId,
                          processInsId: row.processInsId,
                          deployId: row.deployId,
                          processName: row.processName
                        }
                    })
                }
@@ -209,14 +220,18 @@
            if (this.currentTab == "process") {
                const resp = await getDetailByProcessInsId({ processDefId: row.processDefId, processInsId: row.processInsId });
                if (resp.code === 200 && resp.data.length > 0) {
                    const projectProcess = resp.data[0]
                    this.$router.push({
                        path: '/projectFlow/detail',
                        query: {
                            projectId: projectProcess.projectId,
                            processDefId: row.processDefId
                        }
                    })
                  const projectProcess = resp.data[0]
                  sessionStorage.removeItem("projectProDetail")
                  this.$router.push({
                      path: '/projectFlow/detail',
                      query: {
                        projectId: projectProcess.projectId,
                        processDefId: row.processDefId,
                        processInsId: row.processInsId,
                        deployId: row.deployId,
                        processName: row.processName
                      }
                  })
                }
            } else {
                row.id = row.planId;