Michael Wang 3 vuotta sitten
vanhempi
commit
5984e367bf

+ 4 - 1
src/api/paperAnalysisPage.ts

@@ -7,7 +7,10 @@ export function getPaper(id: number) {
 
 /** 试卷分析-查询指定试卷全卷信息 */
 export function getSasPaper(id: number) {
-  return httpApp.post("/api/ess/sasPaper/" + id);
+  return httpApp.post(
+    "/api/ess/sasPaper/findOne",
+    new URLSearchParams([["paperId", id + ""]])
+  );
 }
 
 /** 试题题目编排,试卷特征量数,试题难度分组分布 */

+ 5 - 0
src/api/rootOrgPage.ts

@@ -35,3 +35,8 @@ export function getRootOrgSettingsOfKey(orgId: number, key: string) {
 export function saveOrgSetting(orgId: number, properties: any) {
   return httpApp.post(`/api/ess/root/org/property/save`, { orgId, properties });
 }
+
+/** 同步顶级机构 */
+export function syncRootOrg() {
+  return httpApp.post(`/api/ess/root/org/sync`);
+}

+ 40 - 9
src/components/Layout.vue

@@ -4,7 +4,7 @@
       <div class="tw-text-center tw-py-10">qm logo</div>
       <a-menu style="width: 240px" mode="inline" :open-keys="['sub1', 'sub2']">
         <a-sub-menu key="sub1">
-          <template #icon> icon </template>
+          <template #icon> <span class="basic-icon"></span> </template>
           <template #title>基础管理</template>
           <a-menu-item key="11">
             <router-link active-class="active-route" to="/basic/rootOrg">
@@ -33,7 +33,7 @@
           </a-menu-item>
         </a-sub-menu>
         <a-sub-menu key="sub2">
-          <template #icon> icon </template>
+          <template #icon> <span class="project-icon"></span> </template>
           <template #title>项目管理</template>
           <a-menu-item key="21">
             <router-link
@@ -48,18 +48,21 @@
     </div>
     <div class="tw-h-screen" style="width: calc(100% - 240px)">
       <div
-        class="tw-bg-white tw-flex tw-justify-between"
-        style="border-left: 1px solid var(--app-main-bg-color)"
+        class="tw-bg-white tw-flex tw-justify-between tw-items-center"
+        style="border-left: 1px solid var(--app-main-bg-color); height: 56px"
       >
         <div>
-          当前所在位置:<span class="location-teleport">{{
-            store.currentLocation
-          }}</span>
+          <span class="current-location-icon"></span>
+          <span style="color: var(--app-secondary-text-color)">
+            当前所在位置:<span class="location-teleport">{{
+              store.currentLocation
+            }}</span></span
+          >
         </div>
-        <div class="tw-flex tw-cursor-pointer">
+        <div class="tw-flex tw-items-center tw-cursor-pointer tw-gap-2 tw-mr-2">
           <div>{{ store.userInfo.displayName }}</div>
 
-          <div @click="doLogout">退出</div>
+          <div class="logout-icon" @click="doLogout"></div>
         </div>
       </div>
       <router-view class="tw-m-8"></router-view>
@@ -83,4 +86,32 @@ async function doLogout() {
 .active-route {
   color: #4d66fd;
 }
+
+.basic-icon {
+  background-image: url(./images/基础管理.png);
+  margin-right: -2px;
+  width: 16px;
+  height: 16px;
+}
+
+.project-icon {
+  background-image: url(./images/项目管理.png);
+  margin-right: -2px;
+  width: 16px;
+  height: 16px;
+}
+
+.current-location-icon {
+  background-image: url(./images/当前位置.png);
+  margin-left: 20px;
+  display: inline-block;
+  width: 10px;
+  height: 10px;
+}
+
+.logout-icon {
+  background-image: url(./images/退出.png);
+  width: 32px;
+  height: 32px;
+}
 </style>

BIN
src/components/images/基础管理.png


BIN
src/components/images/当前位置.png


BIN
src/components/images/退出.png


BIN
src/components/images/项目管理.png


+ 9 - 3
src/features/rootOrg/RootOrg.vue

@@ -18,9 +18,9 @@
       <span class="tw-mr-4"></span>
       <StateSelect v-model:value="enable" />
       <span class="tw-mr-4"></span>
-      <a-button @click="search">查询</a-button>
+      <a-button class="query-btn" @click="search">查询</a-button>
 
-      <a-button style="float: right">同步</a-button>
+      <a-button @click="handleRootOrgSync" style="float: right">同步</a-button>
     </div>
 
     <div class="tw-bg-white tw-p-5 tw-rounded-xl">
@@ -81,9 +81,10 @@
 </template>
 
 <script setup lang="ts">
-import { getRootOrgList, updateRootOrg } from "@/api/rootOrgPage";
+import { getRootOrgList, syncRootOrg, updateRootOrg } from "@/api/rootOrgPage";
 import router from "@/router";
 import { useMainStore } from "@/store";
+import { message } from "ant-design-vue";
 import { ref, onMounted, reactive } from "vue";
 
 const store = useMainStore();
@@ -165,4 +166,9 @@ const rootOrgObj = reactive({
   enable: true,
   domainName: "",
 });
+
+async function handleRootOrgSync() {
+  await syncRootOrg();
+  message.success("操作成功");
+}
 </script>

+ 14 - 1
src/styles/global.css

@@ -6,7 +6,8 @@
   --app-container-bg-color: white;
   --app-main-bg-color: #dee4f3;
   --app-main-text-color: #283e76;
-  --app-min-width: 1024px;
+  --app-secondary-text-color: #9193a1;
+  --app-min-width: 1280px;
   --app-bold-text-color: #435488;
   --app-small-header-text-color: #7584ac;
   --app-score-color: #5d65ff;
@@ -46,6 +47,13 @@ body {
   top: -4px;
 }
 
+button.ant-btn {
+  height: 32px;
+  padding: 4px 16px;
+  font-size: 14px;
+  border-radius: 32px;
+}
+
 button.ant-btn span[role="img"] {
   display: inline-flex !important;
 }
@@ -53,3 +61,8 @@ button.ant-btn span[role="img"] {
 button.ant-btn-primary {
   background-color: var(--app-primary-button-bg-color);
 }
+
+button.ant-btn.query-btn {
+  background-color: #fe8398;
+  color: white;
+}