zhangjie 1 rok temu
rodzic
commit
0ec6ff62d0

+ 1 - 1
src/components/CommonRangeConfig.vue

@@ -1,6 +1,6 @@
 <template>
   <a-modal
-    v-model:visible="rangeConfigVisible"
+    v-model:open="rangeConfigVisible"
     title="分段设置"
     okText="确定"
     cancelText="取消"

+ 1 - 1
src/components/ExplainModal.vue

@@ -1,7 +1,7 @@
 <template>
   <a-modal
     ref="theModal"
-    v-model:visible="visible"
+    v-model:open="visible"
     title="报告说明信息页"
     okText="确定"
     @ok="visible = false"

+ 2 - 2
src/components/ProjectStatusSelect.vue

@@ -1,10 +1,10 @@
 <template>
   <a-select
-    placeholder="分析状态"
+    placeholder="请选择"
+    title="分析状态"
     allowClear
     :disabled="props.disabled"
     :value="valueStr"
-    style="width: 120px"
     @change="handleChange"
   >
     <a-select-option

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

@@ -39,14 +39,16 @@
           }"
           @change="tableChange"
         >
-          <template #course="{ record }">
-            <a>{{ `${record.courseName}(${record.courseCode})` }}</a>
-          </template>
-          <template #action="{ record }">
-            <span>
-              <!-- <a-button @click="openModal">说明</a-button> -->
-              <a-button @click="goPaperAnalysis(record)">详情</a-button>
-            </span>
+          <template #bodyCell="{ column, text, record }">
+            <template v-if="column.dataIndex === 'course'">
+              <a>{{ `${record.courseName}(${record.courseCode})` }}</a>
+            </template>
+            <template v-if="column.dataIndex === 'action'">
+              <span>
+                <!-- <a-button @click="openModal">说明</a-button> -->
+                <a-button @click="goPaperAnalysis(record)">详情</a-button>
+              </span>
+            </template>
           </template>
         </a-table>
       </div>
@@ -164,7 +166,6 @@ const columns = [
   {
     title: "科目",
     dataIndex: "course",
-    slots: { customRender: "course" },
     width: 200,
     ellipses: true,
   },
@@ -241,8 +242,7 @@ const columns = [
   },
   {
     title: "操作",
-    key: "action",
-    slots: { customRender: "action" },
+    dataIndex: "action",
     width: 100,
     fixed: "right",
   },

+ 38 - 39
src/features/courseManagement/CourseManagement.vue

@@ -85,43 +85,48 @@
           },
         }"
       >
-        <template #rootOrgName="{ record }">
-          <a-tooltip placement="topLeft">
-            <template #title
-              >{{ record.rootOrgName }}({{ record.rootOrgCode }})</template
-            >
-            {{ record.rootOrgName }}({{ record.rootOrgCode }})
-          </a-tooltip>
-        </template>
-        <template #name="{ record }">
-          <a-tooltip placement="topLeft">
-            <template #title>{{ record.name }}</template>
-            {{ record.name }}
-          </a-tooltip>
-        </template>
-        <template #type="{ text }">
-          <span>{{ $filters.courseTypeFilter(text) }}</span>
-        </template>
-        <template #enable="{ text }">
-          <status-tag :value="text" type="enable"></status-tag>
-        </template>
-        <template #action="{ record }">
-          <div v-if="store.isGreaterThanEqualRootOrgAdmin" class="action-cell">
-            <a-button type="text" @click="showModal(record)">编辑</a-button>
-            <a-button
-              type="text"
-              :danger="record.enable"
-              @click="handleToggleCourses(!record.enable, [record.id])"
+        <template #bodyCell="{ column, text, record }">
+          <template v-if="column.dataIndex === 'rootOrgName'">
+            <a-tooltip placement="topLeft">
+              <template #title
+                >{{ record.rootOrgName }}({{ record.rootOrgCode }})</template
+              >
+              {{ record.rootOrgName }}({{ record.rootOrgCode }})
+            </a-tooltip>
+          </template>
+          <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 === 'type'">
+            <span>{{ $filters.courseTypeFilter(text) }}</span>
+          </template>
+          <template v-if="column.dataIndex === 'enable'">
+            <status-tag :value="text" type="enable"></status-tag>
+          </template>
+          <template v-if="column.dataIndex === 'action'">
+            <div
+              v-if="store.isGreaterThanEqualRootOrgAdmin"
+              class="action-cell"
             >
-              {{ record.enable ? "禁用" : "启用" }}
-            </a-button>
-          </div>
+              <a-button type="text" @click="showModal(record)">编辑</a-button>
+              <a-button
+                type="text"
+                :danger="record.enable"
+                @click="handleToggleCourses(!record.enable, [record.id])"
+              >
+                {{ record.enable ? "禁用" : "启用" }}
+              </a-button>
+            </div>
+          </template>
         </template>
       </a-table>
     </div>
 
     <a-modal
-      v-model:visible="visible"
+      v-model:open="visible"
       title="科目信息页"
       okText="确定"
       cancelText="取消"
@@ -157,7 +162,7 @@
     </a-modal>
 
     <a-modal
-      v-model:visible="importModalVisible"
+      v-model:open="importModalVisible"
       title="批量科目导入"
       okText="确定"
       cancelText="取消"
@@ -196,7 +201,6 @@ import { message } from "ant-design-vue";
 import { watch, onMounted, ref, reactive, toRaw, h } from "vue";
 
 const store = useMainStore();
-store.currentLocation = "基础管理 / 科目管理";
 
 let rootOrgId = $ref(undefined as unknown as number);
 let type = $ref(undefined as unknown as Course_Type); // 科目类型
@@ -242,7 +246,6 @@ const columns = [
     title: "学校",
     dataIndex: "rootOrgName",
     minWidth: 200,
-    slots: { customRender: "rootOrgName" },
     ellipses: true,
   },
   {
@@ -253,19 +256,16 @@ const columns = [
   {
     title: "科目名称",
     dataIndex: "name",
-    slots: { customRender: "name" },
     minWidth: 120,
   },
   {
     title: "科目类型",
     dataIndex: "type",
-    slots: { customRender: "type" },
     width: 100,
   },
   {
     title: "状态",
     dataIndex: "enable",
-    slots: { customRender: "enable" },
     width: 120,
   },
   {
@@ -290,8 +290,7 @@ const columns = [
   },
   {
     title: "操作",
-    key: "action",
-    slots: { customRender: "action" },
+    dataIndex: "action",
     fixed: "right",
     width: 120,
   },

+ 9 - 6
src/features/login/Login.vue

@@ -51,6 +51,7 @@ import { useRouteQuery } from "@vueuse/router";
 import { useRouter } from "vue-router";
 import { useMainStore } from "@/store";
 import useLoading from "@/hooks/loading";
+import useAuth from "@/hooks/auth";
 
 import { reactive } from "vue";
 import type { Rule } from "ant-design-vue/es/form";
@@ -86,20 +87,22 @@ async function submit() {
 
   if (loading.value) return;
   setLoading(true);
+  const loginRootOrgId = parseInt(rootOrgId?.toString() ?? "1");
   const res = await loginByUsername({
     accountValue: formData.accountValue,
     password: formData.password,
-    rootOrgId: parseInt(rootOrgId?.toString() ?? "1"),
+    rootOrgId: loginRootOrgId,
   }).catch(() => {});
   setLoading(false);
   if (!res) return;
 
   console.log(res);
-  store.setUserInfo(res.data);
-  if (rootOrgId === "1") {
-    void router.push("/basic/rootOrg");
-  } else {
-    void router.push("/project/projectManagement");
+  store.setUserInfo({ ...res.data, loginRootOrgId });
+  const { menus } = useAuth(store.userInfo.role);
+  if (menus.value.length) {
+    router.push({
+      name: menus.value[0].url,
+    });
   }
 }
 </script>

+ 1 - 1
src/features/paperAnalysis/QuestionDifficultyGroup.vue

@@ -74,7 +74,7 @@
     />
 
     <a-modal
-      v-model:visible="visible"
+      v-model:open="visible"
       title="按本科目试卷成绩分组"
       okText="确定"
       cancelText="取消"

+ 1 - 1
src/features/paperAnalysis/QuestionTypeDifficulty.vue

@@ -141,7 +141,7 @@
     </div>
 
     <a-modal
-      v-model:visible="importModalVisible"
+      v-model:open="importModalVisible"
       title="题型设置导入"
       okText="确定"
       cancelText="取消"

+ 1 - 1
src/features/paperAnalysis/QuestionTypeDiscrimination.vue

@@ -141,7 +141,7 @@
     </div>
 
     <a-modal
-      v-model:visible="importModalVisible"
+      v-model:open="importModalVisible"
       title="题型设置导入"
       okText="确定"
       cancelText="取消"

+ 1 - 1
src/features/paperAnalysis/SelectProject.vue

@@ -1,6 +1,6 @@
 <template>
   <a-modal
-    v-model:visible="visible"
+    v-model:open="visible"
     title="选择对比项目"
     okText="确定"
     cancelText="取消"

+ 15 - 26
src/features/projectCompareManagement/ProjectCompareManagement.vue

@@ -40,31 +40,22 @@
           },
         }"
       >
-        <template #courseName="{ record }">
-          <a-tooltip placement="topLeft">
-            <template #title
-              >{{ record.courseName }}({{ record.courseCode }})</template
-            >
-            {{ record.courseName }}({{ record.courseCode }})
-          </a-tooltip>
-          <!-- <a>{{ record.courseName }}({{ record.courseCode }})</a> -->
+        <template #bodyCell="{ column, text, record }">
+          <template v-if="column.dataIndex === 'courseName'">
+            <a-tooltip placement="topLeft">
+              <template #title
+                >{{ record.courseName }}({{ record.courseCode }})</template
+              >
+              {{ record.courseName }}({{ record.courseCode }})
+            </a-tooltip>
+          </template>
+          <template v-if="column.dataIndex === 'projectName'">
+            <a-tooltip placement="topLeft">
+              <template #title>{{ record.projectName }}</template>
+              {{ record.projectName }}
+            </a-tooltip>
+          </template>
         </template>
-        <template #projectName="{ record }">
-          <a-tooltip placement="topLeft">
-            <template #title>{{ record.projectName }}</template>
-            {{ record.projectName }}
-          </a-tooltip>
-          <!-- <a>{{ record.courseName }}({{ record.courseCode }})</a> -->
-        </template>
-        <!-- <template #action="{ record }">
-          <span>
-            <a-button
-              v-if="record.projectId !== contrastProjectId"
-              @click="goCompareDetail(record.courseCode)"
-              >查看详情</a-button
-            >
-          </span>
-        </template> -->
       </a-table>
     </div>
   </div>
@@ -191,7 +182,6 @@ const columns = [
   {
     title: "科目",
     dataIndex: "courseName",
-    slots: { customRender: "courseName" },
     fixed: "left",
     width: 140,
     ellipsis: true,
@@ -201,7 +191,6 @@ const columns = [
     dataIndex: "projectName",
     width: 150,
     ellipsis: true,
-    slots: { customRender: "projectName" },
   },
   {
     title: "试卷名称",

+ 129 - 123
src/features/projectManagement/ProjectManagement.vue

@@ -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",
   },
 ];

+ 10 - 10
src/features/projectPapersManagement/ProjectPapersManagement.vue

@@ -35,13 +35,15 @@
           },
         }"
       >
-        <template #course="{ record }">
-          <a>{{ `${record.courseName}(${record.courseCode})` }}</a>
-        </template>
-        <template #action="{ record }">
-          <span>
-            <a-button @click="goPaperAnalysis(record)">查看分析结果</a-button>
-          </span>
+        <template #bodyCell="{ column, record }">
+          <template v-if="column.dataIndex === 'course'">
+            <a>{{ `${record.courseName}(${record.courseCode})` }}</a>
+          </template>
+          <template v-if="column.dataIndex === 'action'">
+            <span>
+              <a-button @click="goPaperAnalysis(record)">查看分析结果</a-button>
+            </span>
+          </template>
         </template>
       </a-table>
     </div>
@@ -99,7 +101,6 @@ const columns = [
   {
     title: "科目",
     dataIndex: "course",
-    slots: { customRender: "course" },
   },
   {
     title: "试卷类型",
@@ -115,8 +116,7 @@ const columns = [
   },
   {
     title: "操作",
-    key: "action",
-    slots: { customRender: "action" },
+    dataIndex: "action",
   },
 ];
 

+ 12 - 12
src/features/projectParamsManagement/ProjectParamsManagement.vue

@@ -30,19 +30,21 @@
           },
         }"
       >
-        <template #course="{ record }">
-          <a>{{ `${record.courseName}(${record.courseCode})` }}</a>
-        </template>
-        <template #action="{ record }">
-          <span>
-            <a-button @click="showModal(record)">编辑</a-button>
-          </span>
+        <template #bodyCell="{ column, record }">
+          <template v-if="column.dataIndex === 'course'">
+            <a>{{ `${record.courseName}(${record.courseCode})` }}</a>
+          </template>
+          <template v-if="column.dataIndex === 'action'">
+            <span>
+              <a-button @click="showModal(record)">编辑</a-button>
+            </span>
+          </template>
         </template>
       </a-table>
     </div>
 
     <a-modal
-      v-model:visible="visible"
+      v-model:open="visible"
       title="单科线设置页"
       okText="确定"
       cancelText="取消"
@@ -94,7 +96,7 @@
     </a-modal>
 
     <a-modal
-      v-model:visible="importModalVisible"
+      v-model:open="importModalVisible"
       title="单科线批量导入"
       okText="确定"
       cancelText="取消"
@@ -170,7 +172,6 @@ const columns = [
   {
     title: "科目",
     dataIndex: "course",
-    slots: { customRender: "course" },
   },
   {
     title: "起始计算分",
@@ -198,9 +199,8 @@ const columns = [
   // },
   {
     title: "操作",
-    key: "action",
+    dataIndex: "action",
     width: 120,
-    slots: { customRender: "action" },
   },
 ];
 

+ 1 - 1
src/features/report/ReportBatchDownload.vue

@@ -13,7 +13,7 @@
   />
 
   <a-modal
-    v-model:visible="loadModalVisible"
+    v-model:open="loadModalVisible"
     class="report-load-modal"
     centered
     :closable="false"

+ 14 - 14
src/features/rootOrg/RootOrg.vue

@@ -16,21 +16,23 @@
       :data-source="data"
       :pagination="false"
     >
-      <template #enable="{ record }">
-        <status-tag :value="record.enable" type="enable"></status-tag>
-      </template>
-      <template #action="{ record }">
-        <div class="action-cell">
-          <a-button type="text" @click="showModal(record)">编辑</a-button>
-          <a-button type="text" @click="editRootOrgSettings(record.id)"
-            >特殊设置</a-button
-          >
-        </div>
+      <template #bodyCell="{ column, record }">
+        <template v-if="column.dataIndex === 'enable'">
+          <status-tag :value="record.enable" type="enable"></status-tag>
+        </template>
+        <template v-if="column.dataIndex === 'action'">
+          <div class="action-cell">
+            <a-button type="text" @click="showModal(record)">编辑</a-button>
+            <a-button type="text" @click="editRootOrgSettings(record.id)"
+              >特殊设置</a-button
+            >
+          </div>
+        </template>
       </template>
     </a-table>
 
     <a-modal
-      v-model:visible="visible"
+      v-model:open="visible"
       title="学校信息页"
       okText="确定"
       cancelText="取消"
@@ -112,13 +114,11 @@ const columns = [
   {
     title: "状态",
     dataIndex: "enable",
-    slots: { customRender: "enable" },
     width: 120,
   },
   {
     title: "操作",
-    key: "action",
-    slots: { customRender: "action" },
+    dataIndex: "action",
     fixed: "right",
     width: 140,
   },

+ 16 - 16
src/features/subOrg/SubOrg.vue

@@ -58,23 +58,25 @@
           },
         }"
       >
-        <template #enable="{ text }">
-          <a>{{ $filters.booleanEnableDisableFilter(text) }}</a>
-        </template>
-        <template #action="{ record }">
-          <span>
-            <a-button @click="showModal(record)">编辑</a-button>
-            <a-button @click="handleToggleOrg(!record.enable, [record.id])">
-              {{ record.enable ? "禁用" : "启用" }}
-            </a-button>
-            <!-- <a-button @click="handleDelOrg([record.id])">删除</a-button> -->
-          </span>
+        <template #bodyCell="{ column, text, record }">
+          <template v-if="column.dataIndex === 'enable'">
+            <a>{{ $filters.booleanEnableDisableFilter(text) }}</a>
+          </template>
+          <template v-if="column.dataIndex === 'action'">
+            <span>
+              <a-button @click="showModal(record)">编辑</a-button>
+              <a-button @click="handleToggleOrg(!record.enable, [record.id])">
+                {{ record.enable ? "禁用" : "启用" }}
+              </a-button>
+              <!-- <a-button @click="handleDelOrg([record.id])">删除</a-button> -->
+            </span>
+          </template>
         </template>
       </a-table>
     </div>
 
     <a-modal
-      v-model:visible="visible"
+      v-model:open="visible"
       title="机构信息页"
       okText="确定"
       cancelText="取消"
@@ -106,7 +108,7 @@
     </a-modal>
 
     <a-modal
-      v-model:visible="importModalVisible"
+      v-model:open="importModalVisible"
       title="批量机构导入"
       okText="确定"
       cancelText="取消"
@@ -202,7 +204,6 @@ const columns = [
   {
     title: "状态",
     dataIndex: "enable",
-    slots: { customRender: "enable" },
   },
   {
     title: "创建时间",
@@ -222,8 +223,7 @@ const columns = [
   },
   {
     title: "操作",
-    key: "action",
-    slots: { customRender: "action" },
+    dataIndex: "action",
   },
 ];
 

+ 10 - 9
src/features/taskManagement/TaskManagement.vue

@@ -23,13 +23,15 @@
           },
         }"
       >
-        <template #action="{ record }">
-          <span>
-            <a-button v-if="record.filePath" @click="toDownload(record)"
-              >下载文件</a-button
-            >
-            <a-button @click="toDelete(record)">删除</a-button>
-          </span>
+        <template #bodyCell="{ column, record }">
+          <template v-if="column.dataIndex === 'action'">
+            <span>
+              <a-button v-if="record.filePath" @click="toDownload(record)"
+                >下载文件</a-button
+              >
+              <a-button @click="toDelete(record)">删除</a-button>
+            </span>
+          </template>
         </template>
       </a-table>
     </div>
@@ -100,8 +102,7 @@ const columns = [
   },
   {
     title: "操作",
-    key: "action",
-    slots: { customRender: "action" },
+    dataIndex: "action",
     fixed: "right",
     width: 200,
   },

+ 1 - 1
src/features/userManagement/ModifyPwd.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-modal v-model:visible="visible" title="修改密码" :width="500">
+  <a-modal v-model:open="visible" title="修改密码" :width="500">
     <a-form
       ref="formRef"
       :labelCol="{ style: { width: '90px' } }"

+ 38 - 39
src/features/userManagement/UserManagement.vue

@@ -87,45 +87,47 @@
           },
         }"
       >
-        <template #rootOrgName="{ record }">
-          <a-tooltip placement="topLeft">
-            <template #title
-              >{{ record.rootOrgName }}({{ record.rootOrgCode }})</template
-            >
-            {{ record.rootOrgName }}({{ record.rootOrgCode }})
-          </a-tooltip>
-          <!-- <a>{{ record.rootOrgName }}({{ record.rootOrgCode }})</a> -->
-        </template>
-        <template #enable="{ text }">
-          <status-tag :value="text" type="enable"></status-tag>
-        </template>
-        <template #action="{ record }">
-          <div class="action-cell">
-            <a-button type="text" @click="showModal(record)">编辑</a-button>
-            <a-button
-              type="text"
-              :danger="record.enable"
-              @click="handleToggleUsers(!record.enable, [record.id])"
-            >
-              {{ record.enable ? "禁用" : "启用" }}
-            </a-button>
-            <a-button type="text" @click="handleResetUsers([record.id])">
-              重置密码
-            </a-button>
-            <a-button
-              v-if="store.isGreaterThanEqualRootOrgAdmin"
-              type="text"
-              @click="handleUserPrivilege(record.id)"
-            >
-              权限设置
-            </a-button>
-          </div>
+        <template #bodyCell="{ column, text, record }">
+          <template v-if="column.dataIndex === 'rootOrgName'">
+            <a-tooltip placement="topLeft">
+              <template #title
+                >{{ record.rootOrgName }}({{ record.rootOrgCode }})</template
+              >
+              {{ record.rootOrgName }}({{ record.rootOrgCode }})
+            </a-tooltip>
+            <!-- <a>{{ record.rootOrgName }}({{ record.rootOrgCode }})</a> -->
+          </template>
+          <template v-if="column.dataIndex === 'enable'">
+            <status-tag :value="text" type="enable"></status-tag>
+          </template>
+          <template v-if="column.dataIndex === 'action'">
+            <div class="action-cell">
+              <a-button type="text" @click="showModal(record)">编辑</a-button>
+              <a-button
+                type="text"
+                :danger="record.enable"
+                @click="handleToggleUsers(!record.enable, [record.id])"
+              >
+                {{ record.enable ? "禁用" : "启用" }}
+              </a-button>
+              <a-button type="text" @click="handleResetUsers([record.id])">
+                重置密码
+              </a-button>
+              <a-button
+                v-if="store.isGreaterThanEqualRootOrgAdmin"
+                type="text"
+                @click="handleUserPrivilege(record.id)"
+              >
+                权限设置
+              </a-button>
+            </div>
+          </template>
         </template>
       </a-table>
     </div>
 
     <a-modal
-      v-model:visible="visible"
+      v-model:open="visible"
       title="用户信息页"
       okText="确定"
       cancelText="取消"
@@ -177,7 +179,7 @@
     </a-modal>
 
     <a-modal
-      v-model:visible="importModalVisible"
+      v-model:open="importModalVisible"
       title="批量用户导入"
       okText="确定"
       cancelText="取消"
@@ -272,7 +274,6 @@ const columns = [
     title: "学校",
     dataIndex: "rootOrgName",
     minWidth: 200,
-    slots: { customRender: "rootOrgName" },
     ellipses: true,
   },
   {
@@ -293,7 +294,6 @@ const columns = [
   {
     title: "状态",
     dataIndex: "enable",
-    slots: { customRender: "enable" },
     width: 100,
   },
   {
@@ -318,8 +318,7 @@ const columns = [
   },
   {
     title: "操作",
-    key: "action",
-    slots: { customRender: "action" },
+    dataIndex: "action",
     fixed: "right",
     width: store.isGreaterThanEqualRootOrgAdmin ? 240 : 180,
   },

+ 5 - 4
src/features/userManagement/UserPrivilegeCourse.vue

@@ -35,7 +35,7 @@
     </div>
 
     <a-modal
-      v-model:visible="visible"
+      v-model:open="visible"
       title="信息页"
       okText="确定"
       cancelText="取消"
@@ -77,8 +77,10 @@
             },
           }"
         >
-          <template #enable="{ text }">
-            <a>{{ $filters.booleanEnableDisableFilter(text) }}</a>
+          <template #bodyCell="{ column, text }">
+            <template v-if="column.dataIndex === 'enable'">
+              <a>{{ $filters.booleanEnableDisableFilter(text) }}</a>
+            </template>
           </template>
         </a-table>
       </div>
@@ -225,7 +227,6 @@ const columns2 = [
   {
     title: "状态",
     dataIndex: "enable",
-    slots: { customRender: "enable" },
   },
 ];
 

+ 5 - 4
src/features/userManagement/UserPrivilegeOrg.vue

@@ -35,7 +35,7 @@
     </div>
 
     <a-modal
-      v-model:visible="visible"
+      v-model:open="visible"
       title="信息页"
       okText="确定"
       cancelText="取消"
@@ -77,8 +77,10 @@
             },
           }"
         >
-          <template #enable="{ text }">
-            <a>{{ $filters.booleanEnableDisableFilter(text) }}</a>
+          <template #bodyCell="{ column, text }">
+            <template v-if="column.dataIndex === 'enable'">
+              <a>{{ $filters.booleanEnableDisableFilter(text) }}</a>
+            </template>
           </template>
         </a-table>
       </div>
@@ -225,7 +227,6 @@ const columns2 = [
   {
     title: "状态",
     dataIndex: "enable",
-    slots: { customRender: "enable" },
   },
 ];
 

+ 3 - 3
src/router/index.ts

@@ -155,9 +155,9 @@ export async function routeLogout(params: {
 }) {
   const store = useMainStore();
   return router.push(
-    `/login?rootOrgId=${
-      store.userInfo.rootOrgId === -1 ? 1 : store.userInfo.rootOrgId
-    }&redirectTo=${encodeURI(params.redirectTo)}`
+    `/login?rootOrgId=${store.userInfo.loginRootOrgId}&redirectTo=${encodeURI(
+      params.redirectTo
+    )}`
   );
 }