zhangjie 2 yıl önce
ebeveyn
işleme
91da131f93

+ 2 - 2
src/api/allAnalysisPage.ts

@@ -8,7 +8,7 @@ export function getSasPaperList(params: {
   pageNo?: number;
   pageSize?: number;
   sortColName?: string;
-  sortOrder?:string;
+  sortOrder?: string;
 }) {
   return httpApp.post<any, ServerPageResponse<SASPaper>>(
     "/api/ess/sasPaper/page",
@@ -50,5 +50,5 @@ export function batchExportProjectReport(params: {
   compareProjectId?: number;
   projectId: number;
 }) {
-  return httpApp.post("/api/ess/project/report/export",{},{params});
+  return httpApp.post("/api/ess/project/report/export", {}, { params });
 }

+ 14 - 0
src/api/taskManagement.ts

@@ -0,0 +1,14 @@
+import { httpApp } from "@/plugins/axiosApp";
+import { TaskItem, ServerPageResponse } from "@/types";
+
+/** 试卷特征数分页查询 */
+export function getTaskList(params: {
+  pageNo: number;
+  pageSize: number;
+  taskType?: string;
+}) {
+  return httpApp.post<any, ServerPageResponse<TaskItem>>(
+    "/api/ess/operate/task/page",
+    params
+  );
+}

+ 3 - 3
src/features/allAnalysis/AllAnalysis2.vue

@@ -103,7 +103,6 @@ let courseId = $ref(undefined as unknown as number);
 const route = useRoute();
 const projectId = +route.params.projectId;
 let curProject = $ref<Project>({} as Project);
-let compareProjectId = $ref<number>();
 
 let activeTab = $ref("1");
 
@@ -327,8 +326,9 @@ function exportReport() {
   // eslint-disable-next-line @typescript-eslint/no-unsafe-call
   selectProjectRef.showModal();
 }
-async function projectSelected(projectId: number) {
-  compareProjectId = projectId;
+async function projectSelected(compareProjectId: number) {
+  console.log(compareProjectId);
+
   await batchExportProjectReport({
     projectId,
     compareProjectId,

+ 137 - 0
src/features/taskManagement/TaskManagement.vue

@@ -0,0 +1,137 @@
+<template>
+  <div>
+    <div class="tw-bg-white tw-p-5 tw-rounded-xl tw-mb-5">
+      <a-button class="query-btn" @click="clickSearch">查询</a-button>
+    </div>
+
+    <div class="tw-bg-white tw-p-5 tw-rounded-xl">
+      <a-table
+        rowKey="id"
+        :columns="columns"
+        :scroll="{ x: 1200 }"
+        :data-source="data"
+        :pagination="{
+          pageSize: pageSize,
+          current: pageNo,
+          total: totalElements,
+          showTotal: () => ``,
+          onChange: (pageNoChanged, pageSizeChanged) => {
+            pageNo = pageNoChanged;
+            pageSize = pageSizeChanged;
+          },
+        }"
+      >
+        <template #action="{ record }">
+          <span>
+            <a-button @click="toDelete(record)">编辑</a-button>
+          </span>
+        </template>
+      </a-table>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { getTaskList } from "@/api/taskManagement";
+import { useMainStore } from "@/store";
+import { TaskItem } from "@/types";
+// import { downloadFileURL } from "@/utils/utils";
+// import { message } from "ant-design-vue";
+import { watch, onMounted } from "vue";
+
+const store = useMainStore();
+store.currentLocation = "基础管理 / 用户管理";
+
+let data = $ref<TaskItem[]>([]);
+let pageSize = $ref(10);
+let pageNo = $ref(1);
+let totalElements = $ref(0);
+async function search() {
+  await fetchData();
+}
+
+async function clickSearch() {
+  pageNo = 1;
+  await fetchData();
+}
+
+watch(() => [pageNo, pageSize], fetchData);
+
+async function fetchData() {
+  const res = await getTaskList({
+    pageSize,
+    pageNo,
+  });
+  // console.log(res);
+  data = res.data.content;
+  pageNo = res.data.pageNo;
+  pageSize = res.data.pageSize;
+  totalElements = res.data.totalElements;
+}
+
+const columns = [
+  {
+    title: "学校",
+    dataIndex: "rootOrgName",
+    width: 200,
+    slots: { customRender: "rootOrgName" },
+    ellipses: true,
+  },
+  {
+    title: "姓名",
+    dataIndex: "name",
+    width: 80,
+  },
+  {
+    title: "登录名",
+    dataIndex: "loginName",
+    width: 100,
+  },
+  {
+    title: "角色",
+    dataIndex: "roleName",
+    width: 120,
+  },
+  {
+    title: "状态",
+    dataIndex: "enable",
+    slots: { customRender: "enable" },
+    width: 60,
+  },
+  {
+    title: "创建时间",
+    dataIndex: "createTime",
+    width: 180,
+  },
+  {
+    title: "创建人",
+    dataIndex: "creator",
+    width: 80,
+  },
+  {
+    title: "更新时间",
+    dataIndex: "updateTime",
+    width: 180,
+  },
+  {
+    title: "更新人",
+    dataIndex: "updater",
+    width: 80,
+  },
+  {
+    title: "操作",
+    key: "action",
+    slots: { customRender: "action" },
+    fixed: "right",
+    width: 270,
+  },
+];
+
+onMounted(async () => {
+  await search();
+});
+
+function toDelete(row: TaskItem) {
+  console.log(row);
+}
+</script>

+ 18 - 4
src/types/index.ts

@@ -1,6 +1,8 @@
-
-
-export type RoleCode = "ORG_ADMIN" | "SUPER_ADMIN" | "ROOT_ORG_ADMIN" | "COURSE_ADMIN";
+export type RoleCode =
+  | "ORG_ADMIN"
+  | "SUPER_ADMIN"
+  | "ROOT_ORG_ADMIN"
+  | "COURSE_ADMIN";
 
 export interface Role {
   roleId: number;
@@ -9,7 +11,9 @@ export interface Role {
 }
 
 export interface RoleOption {
-  id: number; name: string; code: RoleCode
+  id: number;
+  name: string;
+  code: RoleCode;
 }
 
 export type Course_Type = "PUBLIC" | "MAJOR";
@@ -330,3 +334,13 @@ export interface ImportResponse {
     failRecords: { lineNum: number; msg: string }[];
   };
 }
+
+export interface TaskItem {
+  id: number;
+  filePath: string;
+  spentTime: string;
+  status: "WAITING" | "PROCESSING" | "FAILED" | "SUCCESS";
+  statusMsg: string;
+  statusName: string;
+  taskTypeName: string;
+}