zhangjie 2 tahun lalu
induk
melakukan
4667b44356

+ 16 - 0
src/features/allAnalysis/AllAnalysis2.vue

@@ -24,6 +24,7 @@
         <a-table
           style="width: 100%; overflow-x: scroll"
           rowKey="id"
+          :scroll="{ x: 1200 }"
           :columns="columns"
           :data-source="data"
           :pagination="{
@@ -143,56 +144,69 @@ const columns = [
     title: "科目",
     dataIndex: "course",
     slots: { customRender: "course" },
+    width: 200,
+    ellipses: true,
   },
   {
     title: "试卷类型",
     dataIndex: "paperType",
+    width: 100,
   },
   {
     title: "起始计算分",
     dataIndex: "startScore",
+    width: 100,
   },
   {
     title: "样本数",
     dataIndex: "totalCount",
     sorter: true,
+    width: 100,
   },
   {
     title: "满分",
     dataIndex: "totalScore",
+    width: 100,
   },
   {
     title: "最高分",
     dataIndex: "maxScore",
+    width: 100,
   },
   {
     title: "最低分",
     dataIndex: "minScore",
+    width: 100,
   },
   {
     title: "全距",
     dataIndex: "allRange",
     sorter: true,
+    width: 100,
   },
   {
     title: "平均分",
     dataIndex: "avgScore",
     sorter: true,
+    width: 100,
   },
   {
     title: "标准差",
     dataIndex: "stdev",
     sorter: true,
+    width: 100,
   },
   {
     title: "差异系数",
     dataIndex: "coefficient",
     sorter: true,
+    width: 100,
   },
   {
     title: "信度",
     dataIndex: "reliability1",
     sorter: true,
+    width: 100,
   },
   // {
   //   title: "信度2",
@@ -202,12 +216,14 @@ const columns = [
     title: "难度",
     dataIndex: "difficulty",
     sorter: true,
+    width: 100,
   },
   {
     title: "操作",
     key: "action",
     slots: { customRender: "action" },
     width: 100,
+    fixed: "right",
   },
 ];
 

+ 6 - 6
src/features/paperAnalysis/QuestionAttr.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
-    <div class="tw-flex tw-justify-end tw-mb-2">
+    <!-- <div class="tw-flex tw-justify-end tw-mb-2">
       <a-button @click="openModal">说明</a-button>
-    </div>
+    </div> -->
 
     <a-table
       style="width: 100%; overflow-x: scroll"
@@ -15,7 +15,7 @@
 </template>
 
 <script setup lang="ts">
-import EventBus from "@/plugins/eventBus";
+// import EventBus from "@/plugins/eventBus";
 import { SASQuestion } from "@/types";
 
 const props = defineProps<{ questions: SASQuestion[] }>();
@@ -88,7 +88,7 @@ const columns = [
   },
 ];
 
-function openModal() {
-  EventBus.emit("SHOW_SETTING", "DESCRIBE060");
-}
+// function openModal() {
+//   EventBus.emit("SHOW_SETTING", "DESCRIBE060");
+// }
 </script>

+ 6 - 6
src/features/paperAnalysis/QuestionBianPai.vue

@@ -19,17 +19,17 @@
         />
       </div>
 
-      <a-button
+      <!-- <a-button
         style="margin-left: -100px; margin-right: 20px"
         @click="openModal"
         >说明</a-button
-      >
+      > -->
     </div>
   </div>
 </template>
 
 <script setup lang="ts">
-import EventBus from "@/plugins/eventBus";
+// import EventBus from "@/plugins/eventBus";
 import { SASQuestion } from "@/types";
 import { EChartsOption } from "echarts";
 
@@ -53,9 +53,9 @@ const columns = [
   },
 ];
 
-function openModal() {
-  EventBus.emit("SHOW_SETTING", "DESCRIBE050");
-}
+// function openModal() {
+//   EventBus.emit("SHOW_SETTING", "DESCRIBE050");
+// }
 
 function chartOption(questions: SASQuestion[]) {
   // console.log(questions);

+ 8 - 1
src/features/userManagement/UserManagement.vue

@@ -224,6 +224,12 @@ async function clickSearch() {
 }
 
 watch(() => [pageNo, pageSize], fetchData);
+watch(
+  () => store.isSuperAdmin,
+  (val) => {
+    rootOrgId = val ? null : store.userInfo.rootOrgId;
+  }
+);
 
 async function fetchData() {
   if (!rootOrgId) return;
@@ -330,10 +336,11 @@ const initUser = <User>(<unknown>{
   role: "",
   rootOrgId: store.isSuperAdmin ? null : store.userInfo.rootOrgId,
 });
-const userObj = reactive({ ...initUser });
+let userObj = reactive({ ...initUser });
 
 const newUser = () => {
   Object.assign(userObj, initUser);
+  userObj.rootOrgId = rootOrgId as number;
   showModal(userObj);
 };