|
@@ -1,30 +1,35 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="tw-bg-white tw-p-5 tw-rounded-xl tw-mb-5">
|
|
|
- <a-input
|
|
|
- v-model:value="name"
|
|
|
- class="tw-mr-4"
|
|
|
- style="width: 178px"
|
|
|
- placeholder="项目名称"
|
|
|
- allowClear
|
|
|
- ></a-input>
|
|
|
-
|
|
|
- <span class="tw-mr-4"></span>
|
|
|
- <ProjectStatusSelect v-model:value="projectStatus" />
|
|
|
- <span class="tw-mr-4"></span>
|
|
|
- <a-button class="query-btn" @click="clickSearch">查询</a-button>
|
|
|
+ <div class="part-box">
|
|
|
+ <a-space class="filter-line" :size="12">
|
|
|
+ <a-input
|
|
|
+ v-model:value="name"
|
|
|
+ placeholder="请输入"
|
|
|
+ prefix="项目名称"
|
|
|
+ allowClear
|
|
|
+ ></a-input>
|
|
|
+ <ProjectStatusSelect v-model:value="projectStatus" />
|
|
|
+ <a-button type="primary" @click="clickSearch">查询</a-button>
|
|
|
+ </a-space>
|
|
|
</div>
|
|
|
|
|
|
- <div
|
|
|
- v-if="store.isGreaterThanEqualRootOrgAdmin"
|
|
|
- class="tw-flex tw-gap-2 tw-my-4"
|
|
|
- >
|
|
|
- <a-button type="primary" @click="newProject">新增</a-button>
|
|
|
- <a-button @click="handleDeleteProjects(selectIds)">批量删除</a-button>
|
|
|
- </div>
|
|
|
+ <div class="part-box">
|
|
|
+ <a-space
|
|
|
+ v-if="store.isGreaterThanEqualRootOrgAdmin"
|
|
|
+ class="part-action"
|
|
|
+ :size="6"
|
|
|
+ >
|
|
|
+ <a-button type="text" @click="newProject">
|
|
|
+ <template #icon> <svg-icon name="add"></svg-icon> </template>新增
|
|
|
+ </a-button>
|
|
|
+ <a-divider type="vertical" />
|
|
|
+ <a-button type="text" @click="handleDeleteProjects(selectIds)">
|
|
|
+ <template #icon> <svg-icon name="delete"></svg-icon> </template>删除
|
|
|
+ </a-button>
|
|
|
+ </a-space>
|
|
|
|
|
|
- <div class="tw-bg-white tw-p-5 tw-rounded-xl">
|
|
|
<a-table
|
|
|
+ class="page-table"
|
|
|
rowKey="id"
|
|
|
:columns="columns"
|
|
|
:scroll="{ x: 1400 }"
|
|
@@ -47,107 +52,113 @@
|
|
|
},
|
|
|
}"
|
|
|
>
|
|
|
- <template #name="{ record }">
|
|
|
- <a-tooltip placement="topLeft">
|
|
|
- <template #title>{{ record.name }}</template>
|
|
|
- {{ record.name }}
|
|
|
- </a-tooltip>
|
|
|
- </template>
|
|
|
- <template #status="{ text }">
|
|
|
- <a>{{ $filters.projectStatusFilter(text) }}</a>
|
|
|
- </template>
|
|
|
- <template #compute="{ text }">
|
|
|
- <a>{{ $filters.booleanYesNoFilter(text) }}</a>
|
|
|
- </template>
|
|
|
- <template #action="{ record }">
|
|
|
- <span>
|
|
|
- <a-button
|
|
|
- v-if="store.isGreaterThanEqualRootOrgAdmin"
|
|
|
- @click="showModal(record)"
|
|
|
- >编辑</a-button
|
|
|
- >
|
|
|
- <a-button
|
|
|
- v-if="store.isGreaterThanEqualRootOrgAdmin"
|
|
|
- @click="handleDeleteProjects([record.id])"
|
|
|
- >
|
|
|
- 删除
|
|
|
- </a-button>
|
|
|
- <a-button
|
|
|
- v-if="
|
|
|
- record.status === 'PROCESSING' &&
|
|
|
- store.isGreaterThanEqualRootOrgAdmin
|
|
|
- "
|
|
|
- @click="handleCancelProject(record.id)"
|
|
|
- >
|
|
|
- 取消计算
|
|
|
- </a-button>
|
|
|
- <a-button
|
|
|
- v-if="
|
|
|
- record.status === 'FINISH' &&
|
|
|
- store.isGreaterThanEqualRootOrgAdmin
|
|
|
- "
|
|
|
- :class="[record.needCompute && 'need-compute']"
|
|
|
- @click="selectRestartProject(record)"
|
|
|
- >
|
|
|
- 重新计算
|
|
|
- </a-button>
|
|
|
- <a-popover placement="bottom" trigger="click">
|
|
|
- <template #content>
|
|
|
- <div class="tw-flex tw-flex-col">
|
|
|
- <a-button
|
|
|
- v-if="!store.isCourseAdmin"
|
|
|
- type="text"
|
|
|
- style="color: white"
|
|
|
- @click="handleLogsOfProject(record.id)"
|
|
|
- >
|
|
|
- 错误报告
|
|
|
- </a-button>
|
|
|
- <a-button
|
|
|
- v-if="
|
|
|
- record.status !== 'PROCESSING' &&
|
|
|
- store.isGreaterThanEqualRootOrgAdmin
|
|
|
- "
|
|
|
- type="text"
|
|
|
- style="color: white"
|
|
|
- @click="goProjectDataSource(record.id)"
|
|
|
- >
|
|
|
- 数据管理
|
|
|
- </a-button>
|
|
|
- <a-button
|
|
|
- v-if="
|
|
|
- record.status !== 'PROCESSING' && !store.isCourseAdmin
|
|
|
- "
|
|
|
- type="text"
|
|
|
- style="color: white"
|
|
|
- @click="goProjectParams(record.id)"
|
|
|
- >
|
|
|
- 参数配置
|
|
|
- </a-button>
|
|
|
- <!-- <a-button
|
|
|
+ <template #bodyCell="{ column, text, record }">
|
|
|
+ <template v-if="column.dataIndex === 'name'">
|
|
|
+ <a-tooltip placement="topLeft">
|
|
|
+ <template #title>{{ record.name }}</template>
|
|
|
+ {{ record.name }}
|
|
|
+ </a-tooltip>
|
|
|
+ </template>
|
|
|
+ <template v-if="column.dataIndex === 'status'">
|
|
|
+ <span>{{ $filters.projectStatusFilter(text) }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-if="column.dataIndex === 'needCompute'">
|
|
|
+ <span>{{ $filters.booleanYesNoFilter(text) }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-if="column.dataIndex === 'action'">
|
|
|
+ <div class="action-cell">
|
|
|
+ <a-button
|
|
|
+ v-if="store.isGreaterThanEqualRootOrgAdmin"
|
|
|
+ type="text"
|
|
|
+ @click="showModal(record)"
|
|
|
+ >编辑</a-button
|
|
|
+ >
|
|
|
+ <a-button
|
|
|
+ v-if="
|
|
|
+ record.status === 'PROCESSING' &&
|
|
|
+ store.isGreaterThanEqualRootOrgAdmin
|
|
|
+ "
|
|
|
+ type="text"
|
|
|
+ @click="handleCancelProject(record.id)"
|
|
|
+ >
|
|
|
+ 取消计算
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ v-if="
|
|
|
+ record.status === 'FINISH' &&
|
|
|
+ store.isGreaterThanEqualRootOrgAdmin
|
|
|
+ "
|
|
|
+ type="text"
|
|
|
+ :danger="record.needCompute"
|
|
|
+ @click="selectRestartProject(record)"
|
|
|
+ >
|
|
|
+ 重新计算
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ v-if="store.isGreaterThanEqualRootOrgAdmin"
|
|
|
+ type="text"
|
|
|
+ @click="handleDeleteProjects([record.id])"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </a-button>
|
|
|
+ <a-popover placement="bottom" trigger="click">
|
|
|
+ <template #content>
|
|
|
+ <div class="tw-flex tw-flex-col">
|
|
|
+ <a-button
|
|
|
+ v-if="!store.isCourseAdmin"
|
|
|
+ type="text"
|
|
|
+ style="color: white"
|
|
|
+ @click="handleLogsOfProject(record.id)"
|
|
|
+ >
|
|
|
+ 错误报告
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ v-if="
|
|
|
+ record.status !== 'PROCESSING' &&
|
|
|
+ store.isGreaterThanEqualRootOrgAdmin
|
|
|
+ "
|
|
|
+ type="text"
|
|
|
+ style="color: white"
|
|
|
+ @click="goProjectDataSource(record.id)"
|
|
|
+ >
|
|
|
+ 数据管理
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ v-if="
|
|
|
+ record.status !== 'PROCESSING' && !store.isCourseAdmin
|
|
|
+ "
|
|
|
+ type="text"
|
|
|
+ style="color: white"
|
|
|
+ @click="goProjectParams(record.id)"
|
|
|
+ >
|
|
|
+ 参数配置
|
|
|
+ </a-button>
|
|
|
+ <!-- <a-button
|
|
|
type="text"
|
|
|
style="color: white"
|
|
|
@click="goProjectPapers(record.id)"
|
|
|
>
|
|
|
试卷列表
|
|
|
</a-button> -->
|
|
|
- <a-button
|
|
|
- type="text"
|
|
|
- style="color: white"
|
|
|
- @click="goAllAnalysis(record.id)"
|
|
|
- >
|
|
|
- 结果查询
|
|
|
- </a-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <a-button>更多</a-button>
|
|
|
- </a-popover>
|
|
|
- </span>
|
|
|
+ <a-button
|
|
|
+ type="text"
|
|
|
+ style="color: white"
|
|
|
+ @click="goAllAnalysis(record.id)"
|
|
|
+ >
|
|
|
+ 结果查询
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <a-button type="text">更多</a-button>
|
|
|
+ </a-popover>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
</div>
|
|
|
|
|
|
<a-modal
|
|
|
- v-model:visible="visible"
|
|
|
+ v-model:open="visible"
|
|
|
title="项目信息页"
|
|
|
okText="确定"
|
|
|
cancelText="取消"
|
|
@@ -170,7 +181,7 @@
|
|
|
</a-modal>
|
|
|
|
|
|
<a-modal
|
|
|
- v-model:visible="showRestartModalVisible"
|
|
|
+ v-model:open="showRestartModalVisible"
|
|
|
title="重新计算"
|
|
|
okText="确定"
|
|
|
cancelText="取消"
|
|
@@ -206,7 +217,6 @@ import { message, Modal } from "ant-design-vue";
|
|
|
import { watch, onMounted, ref, reactive, toRaw } from "vue";
|
|
|
|
|
|
const store = useMainStore();
|
|
|
-store.currentLocation = "项目管理 / 项目列表";
|
|
|
|
|
|
let rootOrgId = $ref(undefined as unknown as number);
|
|
|
let name = $ref("");
|
|
@@ -261,20 +271,17 @@ const columns = [
|
|
|
{
|
|
|
title: "项目名称",
|
|
|
dataIndex: "name",
|
|
|
- width: 180,
|
|
|
- slots: { customRender: "name" },
|
|
|
+ minWidth: 180,
|
|
|
ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
title: "分析状态",
|
|
|
dataIndex: "status",
|
|
|
- slots: { customRender: "status" },
|
|
|
- width: 90,
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: "需重新计算",
|
|
|
dataIndex: "needCompute",
|
|
|
- slots: { customRender: "compute" },
|
|
|
width: 110,
|
|
|
},
|
|
|
{
|
|
@@ -285,7 +292,7 @@ const columns = [
|
|
|
{
|
|
|
title: "创建人",
|
|
|
dataIndex: "creator",
|
|
|
- width: 80,
|
|
|
+ minWidth: 100,
|
|
|
},
|
|
|
{
|
|
|
title: "更新时间",
|
|
@@ -295,13 +302,12 @@ const columns = [
|
|
|
{
|
|
|
title: "更新人",
|
|
|
dataIndex: "updater",
|
|
|
- width: 80,
|
|
|
+ minWidth: 100,
|
|
|
},
|
|
|
{
|
|
|
title: "操作",
|
|
|
- key: "action",
|
|
|
- slots: { customRender: "action" },
|
|
|
- width: 360,
|
|
|
+ dataIndex: "action",
|
|
|
+ width: 240,
|
|
|
fixed: "right",
|
|
|
},
|
|
|
];
|